:root {
    color-scheme: light;
    --green: #1f7a45;
    --green-dark: #155c34;
    --mint: #e8f4e4;
    --leaf: #76a86a;
    --gold: #d7a642;
    --ink: #17211b;
    --muted: #6a756e;
    --line: #dfe8dc;
    --surface: #ffffff;
    --soft: #f4f7f2;
    --danger: #b83737;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(32, 71, 45, .12);
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --ink: #eef6ee;
        --muted: #a9b7ad;
        --line: #314138;
        --surface: #111a14;
        --soft: #0b120e;
        --mint: #18281d;
        --shadow: 0 18px 50px rgba(0, 0, 0, .35);
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--soft), #eef5ea);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }
.hidden { display: none !important; }
.stack { display: grid; gap: 14px; }

.login-view, .install-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
}

.login-panel, .install-card {
    width: min(460px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: clamp(20px, 5vw, 30px);
}

.install-shell { width: min(760px, 100%); }
.install-card { width: 100%; }
.install-form { display: grid; gap: 14px; }
.install-form h2 { margin: 18px 0 0; font-size: 1rem; }

.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    min-width: 0;
}
.brand-row.compact { margin-bottom: 0; }
.brand-row strong { display: block; font-size: 1.15rem; }
.brand-row span { color: var(--muted); font-size: .9rem; }
.brand-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--green);
    color: transparent;
    font-size: 0;
    font-weight: 800;
}
.brand-mark::before {
    content: "";
    width: 31px;
    height: 31px;
    display: block;
    background: #fff;
    -webkit-mask: url('../icons/tractor-mark.svg') center / contain no-repeat;
    mask: url('../icons/tractor-mark.svg') center / contain no-repeat;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 700;
    font-size: .88rem;
}

input, select, textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    border-radius: 14px;
    padding: 12px 13px;
    outline: none;
}
select { appearance: auto; color: var(--ink); background-color: var(--surface); }
option { color: #17211b; background-color: #ffffff; }
@media (prefers-color-scheme: dark) {
    select { color: #eef6ee; background-color: #0b120e; }
    option { color: #ffffff; background-color: #4c4b52; }
}

textarea { min-height: 82px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(31, 122, 69, .12); }

.btn {
    border: 0;
    border-radius: 14px;
    padding: 12px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    background: var(--mint);
    color: var(--green-dark);
    font-weight: 800;
    cursor: pointer;
    text-align: center;
}
.btn:hover { filter: brightness(.98); }
.btn.primary { background: var(--green); color: #fff; }
.btn.warn { background: #fff3d5; color: #765119; }
.btn.danger { background: #ffe5e5; color: var(--danger); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.full { width: 100%; }
.ico { min-width: 22px; text-align: center; font-size: .78rem; text-transform: uppercase; letter-spacing: 0; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    gap: 14px;
    padding: 12px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.tab {
    white-space: nowrap;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 10px 13px;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
}
.tab.active { background: var(--green); color: #fff; border-color: var(--green); }

.content {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 16px 12px 48px;
}

.page { display: grid; gap: 18px; }
.page-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; }
.page-title h1 { margin: 0; font-size: clamp(1.45rem, 4vw, 2.1rem); }
.page-title h2, .card h2 { margin: 0 0 12px; font-size: 1.1rem; }
.subtle { color: var(--muted); }

.grid { display: grid; gap: 14px; min-width: 0; }
.grid.cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.admin-grid { align-items: start; }

.card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(14px, 3vw, 18px);
    box-shadow: 0 12px 32px rgba(32, 71, 45, .07);
}
.metric { display: grid; gap: 7px; }
.metric strong { font-size: clamp(1.45rem, 6vw, 1.9rem); overflow-wrap: anywhere; }
.metric span { color: var(--muted); font-weight: 700; }

.notice {
    border-radius: 14px;
    padding: 12px 14px;
    margin: 10px 0;
    background: var(--mint);
    color: var(--green-dark);
    font-weight: 700;
}
.notice.error { background: #ffe5e5; color: var(--danger); }
.notice.success { background: var(--mint); color: var(--green-dark); }

.table-wrap {
    width: 100%;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .82rem; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.progress {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--mint);
}
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); }

.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions .btn { min-width: 44px; }
.checkline { display: flex; align-items: center; gap: 10px; }
.checkline input { width: 20px; height: 20px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 160px) 44px; gap: 10px; align-items: end; }
.field-picker { display: grid; gap: 8px; color: var(--muted); font-weight: 700; font-size: .88rem; }
.field-picker > input { display: none; }
.field-choice-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.field-choice {
    width: 100%;
    min-height: 54px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
}
.field-choice strong { color: var(--green); font-size: 1rem; }
.field-choice span { overflow-wrap: anywhere; }
.field-choice em { color: var(--muted); font-style: normal; font-size: .78rem; }
.field-choice.active { border-color: var(--green); background: var(--mint); box-shadow: 0 0 0 3px rgba(31, 122, 69, .12); }
.pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 6px 10px; background: var(--mint); color: var(--green-dark); font-weight: 800; }
.sum-ok { color: var(--green); font-weight: 800; }
.sum-bad { color: var(--danger); font-weight: 800; }
.admin-form { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.live-load-section { display: grid; gap: 12px; }
.live-load-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.live-load-card { display: grid; gap: 12px; }
.live-load-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.live-load-head strong { display: block; font-size: 1.35rem; }
.live-load-head span { color: var(--muted); }
.live-load-meta, .live-quality, .live-field-list { display: grid; gap: 8px; }
.live-load-meta { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.live-quality { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); padding: 10px; border-radius: 14px; background: var(--mint); }
.live-field-list { padding-top: 10px; border-top: 1px solid var(--line); }
.live-field-list span { display: flex; justify-content: space-between; gap: 10px; }
.weather-card { display: grid; gap: 14px; width: 100%; }
.weather-card .weather-refresh { min-height: 38px; padding: 8px 11px; }
.weather-main { display: flex; align-items: baseline; justify-content: flex-start; gap: 18px; }
.weather-main strong { font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.weather-main span { color: var(--muted); font-weight: 800; font-size: 1.05rem; }
.weather-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(120px, 1fr)); }
.weather-grid span { display: grid; gap: 3px; color: var(--muted); padding: 12px; border-radius: 14px; background: var(--mint); }
.weather-grid strong { color: var(--ink); font-size: 1.05rem; }
.weather-card [data-weather-status] { margin: 0; }
.install-prompt {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20;
    width: min(460px, calc(100vw - 36px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.install-prompt strong { display: block; }
.install-prompt span { display: block; color: var(--muted); font-size: .9rem; }
.driver-map-card { display: grid; gap: 14px; width: 100%; }
.driver-map-title { align-items: center; }
.driver-map-actions { justify-content: flex-end; }
.driver-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, .8fr);
    gap: 14px;
    align-items: stretch;
}
.driver-map {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #dbe8d7;
    isolation: isolate;
}
.osm-tile-layer, .osm-marker-layer { position: absolute; inset: 0; }
.osm-marker-layer { z-index: 2; pointer-events: none; }
.osm-tile {
    position: absolute;
    width: 256px;
    height: 256px;
    user-select: none;
    -webkit-user-drag: none;
}
.driver-marker {
    position: absolute;
    z-index: 2;
    transform: translate(-50%, -100%);
    display: grid;
    justify-items: center;
    gap: 7px;
    min-width: 42px;
    pointer-events: auto;
}
.driver-marker span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 4px solid #ffffff;
    border-radius: 999px 999px 999px 5px;
    background: #147a3e;
    color: #ffffff;
    font-size: .95rem;
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
    transform: rotate(-45deg);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .34), 0 0 0 2px rgba(0, 0, 0, .18);
}
.driver-marker span b {
    display: block;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
    transform: rotate(45deg);
}
.driver-marker span::after { content: none; }
.driver-marker em {
    max-width: min(230px, 82vw);
    padding: 7px 11px;
    border-radius: 999px;
    border: 2px solid rgba(0, 0, 0, .22);
    background: #ffffff;
    color: #08140d;
    font-size: .92rem;
    font-style: normal;
    font-weight: 950;
    line-height: 1.05;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28), 0 0 0 2px rgba(255, 255, 255, .75);
}
.driver-marker.combine span { background: #d98200; outline-color: rgba(120, 72, 0, .38); }
.driver-marker.combine em { color: #5f3d00; }
.driver-marker.driver span { background: var(--green); }
.driver-marker.offline span { background: #626b66; outline-color: rgba(42, 48, 45, .45); }
.driver-marker.offline em { color: #4d5350; background: rgba(244, 246, 245, .97); }
.driver-map-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    margin: 0;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}
.osm-attribution {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 3;
    padding: 3px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    color: var(--muted);
    font-size: .72rem;
}
.driver-distance-panel {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--mint);
}
.driver-distance-panel h3 { margin: 0; font-size: 1rem; }
.driver-distance-list { display: grid; gap: 9px; }
.driver-distance-list div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
    padding: 10px;
    border-radius: 14px;
    background: var(--surface);
}
.driver-distance-list span { font-weight: 800; overflow-wrap: anywhere; }
.driver-distance-list strong { color: var(--green-dark); }
.driver-distance-list small { grid-column: 1 / -1; color: var(--muted); font-weight: 700; }

@media (min-width: 760px) {
    .content { padding: 20px 18px 56px; }
    .topbar { padding: 14px 18px; }
}

@media (min-width: 1020px) {
    .topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        padding: 14px 22px;
    }
    .tabs { justify-content: center; }
    .content { padding: 24px 22px 64px; }
}

@media (max-width: 720px) {
    body { background: var(--soft); }
    .topbar { position: static; }
    .brand-row.compact { align-items: flex-start; }
    .tabs { margin-inline: -2px; }
    .tab { flex: 0 0 auto; min-height: 42px; }
    .content { padding: 12px 10px 36px; }
    .page { gap: 14px; }
    .card { border-radius: 16px; }
    .btn { width: 100%; min-height: 46px; }
    .page-title .btn, .actions .btn { width: auto; flex: 1 1 auto; }
    .form-grid { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .field-row .btn { width: 100%; }
    .weather-main { justify-content: space-between; }
    .weather-grid { grid-template-columns: 1fr 1fr; }
    .install-prompt { left: 10px; right: 10px; bottom: 10px; width: auto; grid-template-columns: 1fr; }
    .install-prompt .actions { display: grid; grid-template-columns: 1fr 1fr; }
    .driver-map-layout { grid-template-columns: 1fr; }
    .driver-map { min-height: 340px; border-radius: 16px; }
    .driver-marker { gap: 7px; }
    .driver-marker span { width: 52px; height: 52px; border-width: 4px; font-size: 1rem; }
    .driver-marker em { max-width: min(230px, 78vw); padding: 8px 11px; font-size: .95rem; border-width: 2px; box-shadow: 0 10px 24px rgba(0, 0, 0, .3), 0 0 0 2px rgba(255, 255, 255, .75); }
    .driver-map-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
    .driver-distance-panel { border-radius: 16px; }

    .table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
        display: grid;
        gap: 10px;
    }
    table, thead, tbody, tr, td { display: block; width: 100%; min-width: 0; }
    table { border-collapse: separate; border-spacing: 0; }
    thead { display: none; }
    tbody { display: grid; gap: 10px; }
    tr {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 6px 0;
        box-shadow: 0 8px 22px rgba(32, 71, 45, .06);
    }
    td {
        display: grid;
        grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        border-bottom: 1px solid var(--line);
        padding: 10px 12px;
        overflow-wrap: anywhere;
    }
    td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 800;
        text-transform: uppercase;
        font-size: .76rem;
    }
    tr td:last-child { border-bottom: 0; }
}

@media (max-width: 420px) {
    .login-panel, .install-card { border-radius: 18px; }
    .brand-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 14px; }
    .brand-mark::before { width: 28px; height: 28px; }
    .page-title { align-items: stretch; }
    .page-title h1 { width: 100%; }
    .weather-grid { grid-template-columns: 1fr; }
    .driver-map { min-height: 320px; }
    .driver-marker span { width: 56px; height: 56px; font-size: 1.05rem; }
    .driver-marker em { max-width: min(220px, 78vw); font-size: .92rem; padding: 7px 10px; }
    td { grid-template-columns: 1fr; gap: 4px; }
}

@media print {
    .topbar, .actions, form, .tabs, .btn { display: none !important; }
    body { background: #fff; }
    .content { width: 100%; padding: 0; }
    .card, .table-wrap { box-shadow: none; border-color: #bbb; }
    table { min-width: 0; }
}









.admin-section { display: grid; gap: 12px; }
.admin-section > h2 { margin: 4px 0 0; font-size: 1.25rem; }
.admin-section .card h3 { margin: 0 0 12px; font-size: 1rem; }
.driver-booking-card { display: grid; gap: 12px; }
.driver-booking-list, .daily-yield-list { display: grid; gap: 10px; }
.driver-booking-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.driver-booking-list article, .shift-active-card, .daily-yield-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 92%, var(--mint));
    padding: 12px;
}
.driver-booking-list article {
    display: grid;
    grid-template-columns: minmax(130px, .8fr) minmax(0, 1.7fr);
    gap: 12px;
    align-items: center;
}
.driver-booking-main { min-width: 0; display: grid; gap: 2px; }
.driver-booking-facts { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; }
.driver-booking-facts > div { min-width: 0; }
.driver-booking-list strong, .shift-active-card strong, .daily-yield-item strong { display: block; overflow-wrap: anywhere; }
.driver-booking-list b { display: block; min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.driver-booking-list span, .shift-active-card span, .daily-yield-item span { color: var(--muted); font-weight: 700; }
.driver-booking-facts span { display: block; font-size: .78rem; line-height: 1.1; }
.shift-active-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; margin-bottom: 12px; }
.shift-filter { margin-bottom: 12px; }
.shift-filter input, .shift-filter select { width: auto; min-width: 180px; }
.daily-yield-card { display: grid; gap: 14px; }
.daily-yield-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.daily-yield-summary article { border: 1px solid var(--line); border-radius: 16px; background: var(--mint); padding: 14px; display: grid; gap: 4px; }
.daily-yield-summary span, .daily-yield-summary em { color: var(--muted); font-style: normal; font-weight: 800; }
.daily-yield-summary strong { font-size: clamp(1.35rem, 4vw, 1.8rem); }
.daily-yield-item { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(120px, auto) minmax(180px, .8fr); gap: 12px; align-items: center; }
.daily-yield-weight, .daily-yield-values { display: grid; gap: 4px; }
.daily-yield-values { grid-template-columns: 1fr 1fr; }
.daily-yield-values b { font-size: 1.2rem; color: var(--ink); }
.daily-yield-item .progress { grid-column: 1 / -1; }
.driver-map { cursor: grab; touch-action: none; }
.driver-map.dragging { cursor: grabbing; }
.map-zoom-in, .map-zoom-out { min-width: 44px; padding-inline: 12px; font-size: 1.1rem; }

@media (max-width: 720px) {
    .driver-booking-list article, .daily-yield-item { grid-template-columns: 1fr; }
    .driver-booking-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .daily-yield-values { grid-template-columns: 1fr 1fr; }
    .shift-filter { display: grid; grid-template-columns: 1fr; }
    .shift-filter input, .shift-filter select { width: 100%; min-width: 0; }
}

.admin-shell {
    display: grid;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(32, 71, 45, .07);
}
.admin-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--mint) 52%, var(--surface));
    scrollbar-width: thin;
}
.admin-tab {
    flex: 0 0 auto;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    padding: 10px 13px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}
.admin-tab.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}
.admin-panels { min-width: 0; }
.admin-panel {
    display: none;
    gap: 16px;
    padding: clamp(14px, 3vw, 20px);
}
.admin-panel.active { display: grid; }
.admin-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.admin-panel-head h2, .admin-panel-head h3, .admin-subpanel h3 { margin: 0; }
.admin-panel-head p { margin: 4px 0 0; }
.admin-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 18px;
    align-items: start;
}
.admin-subpanel {
    min-width: 0;
    display: grid;
    gap: 12px;
}
.admin-subpanel .admin-form, .admin-panel > .admin-form { border-bottom: 1px solid var(--line); }

@media (max-width: 720px) {
    .admin-shell { border-radius: 16px; }
    .admin-tabs { padding: 8px; }
    .admin-tab { padding: 9px 11px; }
    .admin-panel-head { align-items: stretch; }
    .admin-panel-head .btn { width: 100%; }
}

.driver-marker em {
    max-width: 170px;
    white-space: normal;
    text-align: center;
    line-height: 1.12;
    overflow-wrap: anywhere;
}
.driver-map-actions {
    gap: 8px;
}
.driver-map-actions .btn {
    min-height: 46px;
    border-radius: 16px;
}
.driver-map-actions .map-zoom-in,
.driver-map-actions .map-zoom-out {
    flex: 0 0 46px;
    width: 46px;
    padding: 0;
    font-size: 1.25rem;
    font-weight: 950;
}
.shift-form {
    align-items: end;
}
.shift-form .btn.primary {
    min-height: 48px;
    border-radius: 16px;
}
#showShiftForm.hidden { display: none !important; }
.brand-mark {
    background: #fff url('../icons/urbanushof-mark.png') center / 88% auto no-repeat;
    border: 1px solid var(--line);
    color: transparent;
}
.brand-mark::before { content: none; }

@media (max-width: 720px) {
    .driver-map-actions {
        grid-template-columns: 1fr 46px 46px;
        align-items: stretch;
    }
    .driver-map-actions .map-reset,
    .driver-map-actions .location-refresh {
        grid-column: span 3;
    }
    .driver-marker em { max-width: 145px; font-size: .86rem; }
}

.driver-marker.focusable {
    cursor: pointer;
}
.driver-marker.focusable em {
    border-color: rgba(31, 122, 69, .45);
}
.driver-marker.focusable:active span {
    transform: rotate(-45deg) scale(.96);
}

.driver-distance-list .focusable-distance {
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.driver-distance-list .focusable-distance:hover,
.driver-distance-list .focusable-distance:focus-visible {
    border-color: rgba(31, 122, 69, .32);
    box-shadow: 0 8px 20px rgba(32, 71, 45, .12);
    outline: 0;
    transform: translateY(-1px);
}
.active-shift-overview {
    display: grid;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.active-shift-overview h3 { margin: 0; }
.active-shift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 10px;
}
.active-shift-grid article {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--mint);
}
.active-shift-grid strong { overflow-wrap: anywhere; }
.active-shift-grid span,
.active-shift-grid small {
    color: var(--muted);
    font-weight: 800;
}
.shift-form select option:disabled {
    color: #8b938e;
    background: #eef1ee;
}
.quality-fields {
    padding-top: 4px;
}

.driver-marker em {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    max-width: min(190px, 70vw);
}
@media (max-width: 720px) {
    .driver-marker em { max-width: min(160px, 62vw); }
}

.harvest-card { display: grid; gap: 14px; }
.harvest-list { display: grid; gap: 10px; }
.harvest-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, auto) minmax(100px, auto);
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 92%, var(--mint));
}
.harvest-item.done { background: #eef6ee; }
.harvest-item strong { display: block; overflow-wrap: anywhere; }
.harvest-item span,
.harvest-item small { color: var(--muted); font-weight: 800; }
.harvest-item label { margin: 0; }
.harvest-item .btn { justify-self: end; }
@media (max-width: 720px) {
    .harvest-item { grid-template-columns: 1fr; }
    .harvest-item .btn { justify-self: stretch; }
}

.harvest-card {
    gap: 16px;
}
.harvest-filter {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--mint) 50%, var(--surface));
}
.harvest-list {
    gap: 12px;
}
.harvest-item {
    grid-template-columns: minmax(0, 1fr) minmax(145px, .28fr) minmax(92px, .18fr) auto;
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(32, 71, 45, .07);
    border-left: 7px solid #93a19a;
}
.harvest-item.open { border-left-color: #d7a100; }
.harvest-item.partial { border-left-color: #e08322; }
.harvest-item.harvested,
.harvest-item.done { border-left-color: var(--green); background: color-mix(in srgb, var(--surface) 88%, var(--mint)); }
.harvest-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
}
.harvest-main strong {
    font-size: 1.05rem;
    line-height: 1.15;
}
.harvest-main span,
.harvest-main small {
    display: block;
    margin-top: 3px;
}
.harvest-light {
    display: grid;
    place-items: center;
    gap: 4px;
    min-width: 54px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 950;
    text-transform: uppercase;
}
.harvest-light i {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 3px solid #fff;
    background: #93a19a;
    box-shadow: 0 0 0 2px rgba(16, 29, 21, .12), 0 8px 16px rgba(0, 0, 0, .12);
}
.harvest-light.open i { background: #d7a100; }
.harvest-light.partial i { background: #e08322; }
.harvest-light.harvested i { background: var(--green); }
.harvest-item .done-pill {
    justify-self: end;
    background: var(--mint);
    color: var(--green-dark);
}
.harvest-item .btn {
    min-height: 44px;
    border-radius: 14px;
}
@media (max-width: 900px) {
    .harvest-item { grid-template-columns: 1fr 1fr; }
    .harvest-main { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .harvest-filter { grid-template-columns: 1fr; }
    .harvest-item { grid-template-columns: 1fr; }
    .harvest-light { grid-template-columns: auto auto; justify-content: start; min-width: 0; }
    .harvest-main { grid-template-columns: 1fr; gap: 8px; }
    .harvest-item .btn,
    .harvest-item .done-pill { justify-self: stretch; }
}

@media (max-width: 520px) {
    .driver-booking-facts { grid-template-columns: 1fr; }
    .driver-booking-list article { gap: 10px; }
}



