/* «Автопарк»: the admin screen (fleet.html), the driver app (index.html) and the printable act
   (fleet-act.html). Colour tokens come from base.css, so light and dark themes work everywhere. */
.fl-tabs{display:flex;gap:4px;flex-wrap:wrap}
.fl-tabs button{border-radius:999px}
.fl-tabs button[aria-selected="true"]{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:600}
.fl-tabs .cnt{font-size:11px;font-weight:700;background:var(--chip);color:var(--ink);border-radius:999px;padding:0 6px;margin-left:5px}
.fl-tabs button[aria-selected="true"] .cnt{background:rgba(255,255,255,.25);color:#fff}
main.fl{padding-block:10px 40px;display:grid;gap:14px}
.fl-card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:14px 16px;min-width:0}
.fl-card h2{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.fl-card .sub{font-size:12.5px;color:var(--muted);margin:-6px 0 10px}
.fl-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}
.fl-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.fl-tile{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px 14px;display:grid;gap:4px;text-align:left;font:inherit;color:var(--ink);cursor:pointer}
.fl-tile:hover{border-color:var(--wire)}
.fl-tile .v{font-size:26px;font-weight:700;line-height:1.1}
.fl-tile .l{font-size:12.5px;color:var(--muted)}
.fl-tile.bad .v{color:var(--bad)}.fl-tile.warn .v{color:var(--warn)}.fl-tile.good .v{color:var(--good)}
.fl-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:10px}
.fl-tools .sp{flex:1}
.fl-tools input[type=search]{font:inherit;font-size:13px;border:1px solid var(--line);border-radius:999px;padding:5px 12px;background:var(--card);color:var(--ink);min-width:280px}
.fl-primary{background:var(--brand)!important;border-color:var(--brand)!important;color:#fff!important;font-weight:600}
.fl-danger{color:var(--bad)!important}
.fl-link{background:none!important;border:0!important;padding:0!important;color:var(--ink);text-decoration:underline;text-underline-offset:2px;cursor:pointer;font:inherit;border-radius:0!important}
.fl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
table.fl-t{border-collapse:collapse;width:100%;font-size:13px}
.fl-t th{text-align:left;font-size:11.5px;color:var(--muted);font-weight:600;padding:6px 8px;border-bottom:1px solid var(--line);white-space:nowrap}
.fl-t td{padding:7px 8px;border-bottom:1px solid var(--line);vertical-align:top}
.fl-t tr.pick{cursor:pointer}
.fl-t tr.pick:hover td{background:var(--sel)}
.fl-t td.n,.fl-t th.n{text-align:right;white-space:nowrap}
.fl-t .muted,.muted{color:var(--muted)}
.fl-t small{display:block;color:var(--muted);font-size:11.5px}
.plate{display:inline-block;font-weight:700;letter-spacing:.04em;border:1.5px solid var(--ink2);border-radius:4px;padding:0 5px;white-space:nowrap;font-size:12.5px;background:var(--card)}
.badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:1px 9px;font-size:12px;font-weight:600;white-space:nowrap;background:var(--chip);color:var(--ink)}
.badge::before{content:'';width:7px;height:7px;border-radius:50%;background:var(--neutral)}
.b-carpool::before{background:#2e8bb8}.b-active::before{background:var(--good)}.b-repair::before{background:var(--warn)}.b-accident::before{background:var(--bad)}.b-sale::before{background:var(--neutral)}
.b-now{background:var(--bad);color:#fff}.b-now::before{background:#fff}
.b-soon::before{background:var(--bad)}.b-year::before{background:var(--warn)}.b-ok::before{background:var(--good)}
.b-new::before{background:var(--bad)}.b-review::before,.b-insurance::before{background:var(--warn)}.b-closed::before{background:var(--good)}
.b-yes::before{background:var(--good)}.b-no::before{background:var(--bad)}
.fl-empty{padding:18px;text-align:center;color:var(--muted);font-size:13px}
.fl-note{font-size:12.5px;color:var(--muted)}
.fl-banner{display:flex;gap:10px;align-items:center;flex-wrap:wrap;background:var(--chip);border-radius:10px;padding:9px 12px;font-size:13px}
.fl-banner.warn{background:color-mix(in srgb,var(--warn) 16%,var(--card))}
.fl-banner.bad{background:color-mix(in srgb,var(--bad) 14%,var(--card))}
.fl-banner.good{background:color-mix(in srgb,var(--good) 14%,var(--card))}
.fl-list{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.fl-list li{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.fl-bars{display:grid;gap:6px}
.fl-bar{display:grid;grid-template-columns:110px 1fr auto;gap:8px;align-items:center;font-size:12.5px}
.fl-bar i{display:block;height:10px;border-radius:5px;background:var(--brand);min-width:2px}
.fl-kv{display:grid;grid-template-columns:max-content 1fr;gap:4px 14px;font-size:13px;margin:0}
.fl-kv dt{color:var(--muted)}.fl-kv dd{margin:0}

/* dialog */
.fl-lock{overflow:hidden}
.fl-overlay{position:fixed;inset:0;z-index:100;background:rgba(10,20,14,.45);display:flex;align-items:flex-start;justify-content:center;padding:24px 16px;overflow:auto}
.fl-dialog{background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:14px;box-shadow:0 12px 40px rgba(0,0,0,.3);width:min(640px,100%);padding:18px 20px;display:grid;gap:12px}
.fl-dialog.wide{width:min(980px,100%)}
.fl-dialog h2{margin:0;font-size:17px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.fl-dialog .x{margin-left:auto;border-radius:50%;width:30px;height:30px;padding:0}
.fl-form{display:grid;gap:10px}
.fl-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
/* align-content:start — a field with a hint under it must not stretch its neighbours' inputs to its height */
.fl-f{display:grid;gap:3px;min-width:0;align-content:start}
.fl-f>span{font-size:12px;color:var(--muted);font-weight:600}
.fl-f small{font-size:11.5px;color:var(--muted)}
.fl-f input,.fl-f select,.fl-f textarea,.fl-in{font:inherit;font-size:14px;line-height:20px;color:var(--ink);background:var(--card);border:1px solid var(--line);border-radius:8px;padding:0 10px;width:100%;min-width:0}
/* one height for every one-line control (text, number, date, list), so fields in a row line up */
.fl-f input:not([type=checkbox]):not([type=file]),.fl-f select,.fl-in{height:38px}
.fl-f input[type=file]{padding:7px 8px;height:38px}
.fl-f textarea{resize:vertical;min-height:70px;padding:8px 10px}
/* controls that sit in a line with the small round buttons (filters, «Звіт за», replacement rule) */
.fl-tools .fl-in,.fl-tools input[type=number],.fl-tools input[type=search]{height:32px;font-size:13px}
.fl-tools label{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.fl-tools button{height:32px;display:inline-flex;align-items:center}
.fl-check{display:flex;gap:8px;align-items:center;font-size:13.5px}
.fl-err{color:var(--bad);font-size:13px}
.fl-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.fl-sec{border-top:1px solid var(--line);padding-top:10px;display:grid;gap:8px}
.fl-sec h3{margin:0}
.fl-toast{position:fixed;left:50%;bottom:22px;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:var(--ink);color:var(--card);border-radius:999px;padding:9px 16px;font-size:13.5px;z-index:120;transition:opacity .2s,transform .2s;max-width:calc(100% - 32px)}
.fl-toast.on{opacity:1;transform:translate(-50%,0)}
.fl-toast.err{background:var(--bad);color:#fff}

/* driver app: phone first */
.drv{max-width:560px;margin:0 auto;padding:12px 16px 40px;display:grid;gap:12px}
.drv-top{display:flex;align-items:center;gap:10px}
.drv-top .brand{font-weight:800;color:var(--brand);font-size:16px}
.drv-top .sp{flex:1}
.drv-car{display:grid;gap:6px}
.drv-car .plate{font-size:20px;padding:2px 10px;justify-self:start}
.drv-car .model{font-size:17px;font-weight:700}
.drv-big{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.drv-big button{border-radius:12px;padding:14px 10px;font-size:15px;font-weight:600;display:grid;gap:4px;justify-items:center;align-content:center;text-align:center}
.drv-big button small{font-weight:400;font-size:12px;color:inherit;opacity:.85}

/* printable act */
.act{max-width:800px;margin:0 auto;padding:30px 36px;background:#fff;color:#111;font:14px/1.5 "Times New Roman",Times,serif}
.act h1{font-size:18px;text-align:center;margin:0 0 4px;text-transform:uppercase}
.act .c{text-align:center}
.act .line{display:flex;justify-content:space-between;margin:14px 0}
.act table{border-collapse:collapse;width:100%;margin:10px 0}
.act td,.act th{border:1px solid #333;padding:5px 8px;text-align:left;vertical-align:top}
.act .sign{display:grid;grid-template-columns:1fr 1fr;gap:40px;margin-top:40px}
.act .sign div{border-top:1px solid #333;padding-top:4px;font-size:12px}
.act-bar{max-width:800px;margin:12px auto;display:flex;gap:8px;padding:0 16px}
body.act-page{background:var(--bg)}
@media print{.act-bar,#appnav{display:none!important}body.act-page{background:#fff}.act{padding:0}}

@media (max-width:640px){.fl-tools input[type=search]{min-width:0;flex:1}.fl-bar{grid-template-columns:80px 1fr auto}.fl-dialog{padding:14px}}

/* «Дивитись як» bar of the test version (no passwords: switch between the administrator and any driver) */
.fl-switch{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;justify-content:center;background:var(--chip);border-bottom:1px solid var(--line);padding:6px 16px;font-size:13px;color:var(--ink2)}
.fl-switch select{font-size:13px;padding:0 8px;height:30px}
/* a list inside a table row (fuel card → driver) stays as low as the row's text */
.fl-t .fl-in{height:30px;font-size:13px;padding:0 8px}
.chooser{max-width:640px;margin:30px auto;padding:0 16px;display:grid;gap:14px}
.chooser h1{font-size:24px}
.chooser-list{display:grid;gap:8px}
.chooser-list button{display:flex;gap:10px;align-items:center;justify-content:space-between;text-align:left;border-radius:12px;padding:12px 14px;font-size:15px}
.chooser-list button small{color:var(--muted);font-size:12.5px}
.chooser-list button.fl-primary small{color:inherit;opacity:.9}
.drv-back{justify-self:start}

/* ---- dashboards (js/fleet-charts.js). Categorical slots 1–6 of the validated reference palette, in fixed
   order; the dark theme uses the same hues stepped for the dark surface. */
:root{--c1:#2a78d6;--c2:#eb6834;--c3:#1baf7a;--c4:#eda100;--c5:#e87ba4;--c6:#008300;--fc-due:#c93a30}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--c1:#3987e5;--c2:#d95926;--c3:#199e70;--c4:#c98500;--c5:#d55181;--c6:#008300;--fc-due:#ff6b5e}}
.fl-grid-2{grid-template-columns:repeat(auto-fit,minmax(min(100%,460px),1fr))}
.fc-host{min-width:0}
.fc-host svg{display:block;overflow:visible}
.fc-grid{stroke:var(--line);stroke-width:1}
.fc-axis{fill:var(--muted);font-size:11px}
.fc-label{fill:var(--ink);font-size:11.5px;font-weight:600}
.fc-line{fill:none;stroke:var(--c1);stroke-width:2;stroke-linejoin:round}
.fc-area{fill:var(--c1);opacity:.1}
.fc-mbar{fill:var(--c1);opacity:.35}
.fc-dot{fill:var(--c1);stroke:var(--card);stroke-width:2;cursor:pointer}
.fc-dot:hover,.fc-dot:focus{r:6.5}
.fc-zone{fill:var(--fc-due);opacity:.07}
.fc-rule{stroke:var(--fc-due);stroke-width:1.5;stroke-dasharray:5 4}
.fc-pt{fill:var(--c1);stroke:var(--card);stroke-width:2;cursor:pointer}
.fc-pt.now,.fc-pt.soon{fill:var(--fc-due)}
.fc-pt.year{fill:var(--c4)}
.fc-pt.sale{fill:var(--neutral)}
.fc-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;color:var(--ink2);margin-bottom:10px}
.fc-legend span{display:inline-flex;align-items:center;gap:6px}
.fc-legend i{width:10px;height:10px;border-radius:3px;display:inline-block}
.fc-stack{display:grid;gap:8px}
.fc-srow{display:grid;grid-template-columns:minmax(110px,150px) 1fr auto;gap:10px;align-items:center;font-size:12.5px}
.fc-srow.pick{cursor:pointer;border-radius:6px}
.fc-srow.pick:hover{background:var(--sel)}
.fc-slabel{display:grid;gap:1px;min-width:0}
.fc-slabel small{color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fc-strack{min-width:0}
.fc-sbar{display:flex;gap:2px;height:14px}
.fc-seg{display:block;height:100%;min-width:3px;border-radius:2px}
.fc-seg:first-child{border-radius:4px 2px 2px 4px}.fc-seg:last-child{border-radius:2px 4px 4px 2px}.fc-seg:only-child{border-radius:4px}
.fc-seg:focus-visible{outline:2px solid var(--ink);outline-offset:1px}
.fc-sval{font-weight:600;white-space:nowrap;text-align:right}
.fc-tip{position:fixed;z-index:130;pointer-events:none;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:8px;box-shadow:0 6px 20px rgba(0,0,0,.18);padding:7px 10px;font-size:12.5px;display:grid;gap:2px;max-width:260px}
@media (max-width:640px){.fc-srow{grid-template-columns:96px 1fr auto;gap:6px}}

/* two-part status: holding (h-) and condition (k-); the dot carries the colour, the words carry the meaning */
.fl-badges{display:inline-flex;flex-wrap:wrap;gap:4px}
.b-h-assigned::before{background:var(--good)}.b-h-free::before{background:#2e8bb8}.b-h-substitute::before{background:#7a6fb0}
.b-k-ok::before{background:var(--good)}.b-k-repair::before{background:var(--warn)}.b-k-accident::before{background:var(--bad)}.b-k-sale::before{background:var(--neutral)}
.fl-filters{display:grid;gap:6px;margin-bottom:10px}
.fl-filter{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center}
.fl-filter-l{font-size:12px;color:var(--muted);font-weight:600;min-width:92px}

/* free (not assigned) cars are tinted wherever cars are listed; missed monthly reports too */
:root{--free-bg:#e6f1f8;--free-edge:#2e8bb8;--miss-bg:#fbeceb}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--free-bg:#16283a;--free-edge:#5db6e0;--miss-bg:#3a1c1a}}
.fl-t tr.free td{background:var(--free-bg)}
.fl-t tr.free td:first-child{box-shadow:inset 3px 0 0 var(--free-edge)}
.fl-t tr.missed td{background:var(--miss-bg)}

/* ---------------- phone ---------------- */
@media (max-width:700px){
  .top,.bar-sticky,main,.status{padding-inline:12px}
  /* tabs: one row that scrolls sideways instead of four rows of buttons */
  .fl-tabs{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:2px}
  .fl-tabs::-webkit-scrollbar{display:none}
  .fl-tabs button{flex:none}
  .fl-card{padding:12px}
  .fl-tools{gap:6px}
  .fl-tools .sp{display:none}
  .fl-tools input[type=search]{flex:1 1 100%;min-width:0}
  .fl-filter-l{min-width:0;width:100%}
  .fl-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fl-tile .v{font-size:22px}
  /* tables: every row becomes a small card, each cell shows its column name on the left */
  .fl-wrap{overflow:visible}
  table.fl-t,.fl-t tbody,.fl-t tr,.fl-t td{display:block;width:100%}
  .fl-t thead{display:none}
  .fl-t tr{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin-bottom:8px;background:var(--card)}
  .fl-t tr.free{border-left:4px solid var(--free-edge)}
  .fl-t tr.free td,.fl-t tr.missed td{background:transparent}
  .fl-t tr.free td:first-child{box-shadow:none}
  .fl-t tr.missed{background:var(--miss-bg)}
  /* the first column is the card's title across the whole width; the rest go two per line, name above value */
  .fl-t td{border:0;padding:0;display:grid;gap:1px;align-content:start;text-align:left;min-width:0}
  .fl-t td.n{text-align:left}
  .fl-t td:first-child{grid-column:1/-1;font-weight:600}
  .fl-t td:first-child::before{display:none}
  .fl-t td[data-label]::before{content:attr(data-label);color:var(--muted);font-size:11px}
  .fl-t td:not([data-label]){grid-column:1/-1}
  .fl-t td:empty{display:none}
  .fl-t td>*{justify-self:start;max-width:100%}
  .fl-t small{text-align:left}
  /* dialogs take the whole screen */
  .fl-overlay{padding:0}
  .fl-dialog,.fl-dialog.wide{width:100%;min-height:100%;border-radius:0;border:0;padding:14px 12px 24px}
  .fl-actions{justify-content:stretch}
  .fl-actions button{flex:1 1 auto}
  .fl-kv{grid-template-columns:minmax(90px,40%) 1fr}
  .fl-switch{justify-content:flex-start;padding:6px 12px}
  .fl-switch select{flex:1;min-width:0}
}

/* «Автомобілі»: a filter under every column name; names sort */
.fl-sort{background:none;border:0;padding:0;font:inherit;font-size:11.5px;font-weight:600;color:var(--muted);cursor:pointer;white-space:nowrap;border-radius:0}
.fl-sort:hover{color:var(--ink)}
th[aria-sort] .fl-sort{color:var(--ink)}
.fl-frow th{padding:2px 4px 8px;border-bottom:1px solid var(--line);font-weight:400}
.fl-frow .fl-in{height:30px;font-size:12.5px;padding:0 6px;min-width:70px}
.fl-frow .fl-in.on{border-color:var(--brand);background:var(--sel)}
.fl-cars tr.fl-none td{text-align:center;color:var(--muted);padding:18px}
@media (max-width:700px){
  /* the column names hide; the filters stay as a compact grid above the cards */
  .fl-cars thead{display:block}
  .fl-cars thead tr:first-child{display:none}
  .fl-cars .fl-frow{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;border:0;padding:0 0 10px;margin:0;background:transparent}
  .fl-cars .fl-frow th{display:grid;gap:2px;padding:0;border:0;text-align:left}
  .fl-cars .fl-frow th::before{content:attr(data-label);font-size:11px;color:var(--muted);font-weight:600}
  .fl-cars .fl-frow .fl-in{width:100%}
  .fl-cars tr.fl-none{display:block}
}
.fl-mobile-only,.fl-tools .fl-mobile-only{display:none}
@media (max-width:700px){
  .fl-mobile-only,.fl-tools .fl-mobile-only{display:inline-flex}
  .fl-cars:not(.show-f) .fl-frow{display:none}
}

/* driver app accordion (details/summary): tap the title to open or fold a section */
.fl-fold{padding:0}
.fl-fold>summary{list-style:none;display:flex;align-items:center;gap:10px;padding:14px 16px;cursor:pointer;font-weight:700;font-size:15px;min-height:48px}
.fl-fold>summary::-webkit-details-marker{display:none}
.fl-fold>summary::after{content:'';width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin-left:auto;flex:none;transition:transform .15s}
.fl-fold[open]>summary::after{transform:rotate(-135deg)}
.fl-fold-t{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.fl-fold-n{font-size:12.5px;font-weight:600;color:var(--muted);background:var(--chip);border-radius:999px;padding:1px 9px;white-space:nowrap}
.fl-fold-b{padding:0 16px 14px}
.fl-fold[open]>summary{border-bottom:1px solid var(--line);margin-bottom:10px}

/* ---------------------------------------------------------------- icons (thin line, text colour) */
.ic{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:-4px}
button .ic,.fl-btnlink .ic{margin-right:6px;vertical-align:-4px}
button:has(>.ic){display:inline-flex;align-items:center}
.fl-dialog .x .ic{margin:0;width:16px;height:16px}
.fl-tabs button{display:inline-flex;align-items:center;gap:0}
.fl-tabs button .ic{width:16px;height:16px;margin-right:6px;opacity:.8}
.fl-tabs button[aria-selected="true"] .ic{opacity:1}
.fl-tabs .cnt.hot{background:var(--bad);color:#fff}
.fl-card h2 .ic,.fl-sec h3 .ic,.fl-dialog h2 .ic{color:var(--brand)}
.fl-sec h3{display:flex;align-items:center;gap:4px}
.fl-tile .v{display:flex;align-items:center;gap:8px}
.fl-tile .v .ic{width:22px;height:22px;color:var(--muted)}
.fl-banner .ic{flex:none}
.fl-ic-n{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.fl-ic-n .ic{width:15px;height:15px;color:var(--muted)}
.fl-btnlink{display:inline-flex;align-items:center;font-size:13px;color:var(--ink);background:var(--card);border:1px solid var(--line);border-radius:999px;padding:5px 11px;text-decoration:none}
.fl-btnlink:hover{border-color:var(--wire)}
.fl-btnlink.fl-primary .ic{stroke:#fff}

/* plate: like a real Ukrainian number plate, with the blue strip on the left */
.plate{border-left-width:6px;border-left-color:#1d5fa8;padding-left:5px}

/* quick filters above the cars table */
.fl-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.fl-chip{display:inline-flex;align-items:center;gap:0;height:34px;border-radius:999px;padding:0 12px}
.fl-chip .ic{width:16px;height:16px;margin-right:6px;color:var(--muted)}
.fl-chip .n{margin-left:7px;font-size:11.5px;font-weight:700;color:var(--muted)}
.fl-chip.on{background:var(--ink);border-color:var(--ink);color:var(--card)}
.fl-chip.on .ic,.fl-chip.on .n{color:var(--card)}

/* fuel cards ticked in an act */
.fl-checks{display:grid;gap:6px}
.fl-checks .fl-check{border:1px solid var(--line);border-radius:10px;padding:8px 10px}
.fl-checks .fl-check .ic{color:var(--muted)}

/* accident photos */
.fl-hidden-file{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.fl-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}
.fl-photos.small{grid-template-columns:repeat(auto-fill,minmax(84px,1fr));margin-bottom:8px}
.fl-photos figure{position:relative;margin:0;border-radius:10px;overflow:hidden;background:var(--chip);aspect-ratio:4/3}
.fl-photos img{width:100%;height:100%;object-fit:cover;display:block}
.fl-photo-x{position:absolute;top:6px;right:6px;width:32px;height:32px;padding:0;border-radius:50%;display:flex!important;align-items:center;justify-content:center;background:rgba(0,0,0,.6);border:0;color:#fff}
.fl-photo-x .ic{margin:0;width:16px;height:16px}
.fl-photo-empty{display:flex;gap:10px;align-items:center;border:1.5px dashed var(--line);border-radius:10px;padding:14px;color:var(--muted);font-size:13px}
.fl-photo-empty .ic{width:28px;height:28px}

/* tires */
.fl-season{display:inline-flex;align-items:center;gap:5px;font-weight:600;white-space:nowrap}
.fl-season .ic{width:16px;height:16px}
.fl-season.s-winter .ic{color:#1d6fc4}.fl-season.s-summer .ic{color:#c27a00}
.b-sold::before{background:var(--ink2)}.b-k-sold::before{background:var(--ink2)}

/* service requests */
.b-r-new::before{background:var(--bad)}.b-r-accepted::before{background:var(--warn)}.b-r-booked::before{background:#1d6fc4}.b-r-done::before{background:var(--good)}.b-r-rejected::before{background:var(--neutral)}

/* driver app */
.drv-top .brand{display:inline-flex;align-items:center;gap:8px}
.brand-mark{width:30px;height:30px;border-radius:9px;background:var(--brand);color:#fff;display:inline-flex;align-items:center;justify-content:center}
.brand-mark .ic{width:18px;height:18px;margin:0}
.drv-big{grid-template-columns:1fr 1fr}
.drv-big button .ic{width:26px;height:26px;margin:0 0 2px}
.drv-big .drv-dtp{grid-column:1/-1;border-color:var(--bad);color:var(--bad)}
.drv-big .drv-req .ic{color:var(--brand)}
.drv-kinds{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.drv-kinds button{display:flex!important;align-items:center;gap:0;min-height:48px;border-radius:12px;font-weight:600;justify-content:flex-start}
.drv-kinds button .ic{color:var(--brand)}
.drv-kinds button.on{background:var(--brand);border-color:var(--brand);color:#fff}
.drv-kinds button.on .ic{color:#fff}
.drv-req-list li{display:grid;gap:3px;padding:10px 0;border-bottom:1px solid var(--line)}
.drv-req-list li:last-child{border-bottom:0}
.drv-answer{background:var(--sel);border-radius:8px;padding:6px 9px}
.drv-acc-links{display:inline-flex;gap:6px;margin-left:auto}
.drv-acc-links button,.drv-acc-links a{height:34px}

/* printable contract and statement */
.act h2{font-size:14px;margin:16px 0 4px}
.act p{margin:0 0 6px;text-align:justify}
.act .pre{white-space:pre-wrap}
.act-foot{margin-top:30px!important;font-size:11px;color:#555}
.doc-to{margin-left:auto;width:min(320px,100%);margin-bottom:24px;font-size:14px}
.doc-stamp{border:2px solid #b42318;color:#b42318;font-weight:700;text-align:center!important;padding:6px;margin-bottom:12px!important}
.doc-parties div{border-top:0!important;font-size:13px!important;line-height:1.6}
.doc-photos{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:8px 0}
.doc-photos figure{margin:0;break-inside:avoid}
.doc-photos img{width:100%;max-height:300px;object-fit:cover;border:1px solid #999}
.doc-photos figcaption{font-size:11px;color:#555}
@media (max-width:700px){.act{padding:18px 16px}.act .sign{grid-template-columns:1fr;gap:24px}}

/* ================================================================ design pass (approved Claude Design mockup)
   Deep green brand, soft green-grey ground, white cards with 16px corners, Manrope headings over Inter text. */
:root{--head:Manrope,Inter,system-ui,sans-serif;--radius:16px;--free-bg:#fff8ec;--free-edge:#d99a2b}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--free-bg:#2e2616;--free-edge:#e0a63a}}
h1,h2,.fl-tile .v,.drv-car .model,.chooser h1{font-family:var(--head);letter-spacing:-.01em}
h1{font-weight:800}
button{border-radius:10px;padding:7px 13px}
.top{padding-block:18px 10px}
.brand-row{display:flex;align-items:center;gap:12px}
.brand-row h1{font-size:22px;margin:0}
.brand-mark-lg{width:42px;height:42px;border-radius:12px}
.brand-mark-lg .ic{width:24px;height:24px}
.bar-sticky{background:var(--card);border-bottom:1px solid var(--line);border-top:1px solid var(--line);padding-block:6px}
/* tabs read like a navigation menu: the current one is a soft green plate */
.fl-tabs{gap:2px}
.fl-tabs button{border:0;background:transparent;border-radius:10px;height:40px;padding:0 12px;color:var(--ink2);font-weight:500}
.fl-tabs button:hover{background:var(--chip);color:var(--ink)}
.fl-tabs button[aria-selected="true"]{background:var(--sel);color:var(--brand);font-weight:600}
.fl-tabs button[aria-selected="true"] .ic{color:var(--brand)}
.fl-tabs button[aria-selected="true"] .cnt{background:var(--brand);color:#fff}
.fl-tabs .cnt.hot,.fl-tabs button[aria-selected="true"] .cnt.hot{background:var(--bad);color:#fff}
main.fl{gap:16px;padding-block:18px 48px}
.fl-card{border-radius:var(--radius);padding:20px 22px}
.fl-card h2{font-size:17px;font-weight:700}
.fl-tiles{gap:12px}
.fl-tile{border-radius:var(--radius);padding:16px 18px;gap:4px}
.fl-tile .v{font-size:30px;font-weight:800}
.fl-tile .l{font-size:13px;font-weight:500}
.fl-grid{gap:16px}
.fl-primary{border-radius:10px}
.fl-tools button{border-radius:10px}
.fl-tools input[type=search]{border-radius:10px;height:38px!important;font-size:14px!important}
.fl-chip{border-radius:999px}
/* tables: quiet header strip, more air in rows */
.fl-t th{background:#fafbf9;text-transform:uppercase;letter-spacing:.04em;font-size:11px;padding:10px 12px}
.fl-t td{padding:11px 12px;border-bottom-color:#eef2ed;vertical-align:middle}
.fl-frow th{background:#fafbf9}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .fl-t th,:root:not([data-theme="light"]) .fl-frow th{background:var(--chip)}:root:not([data-theme="light"]) .fl-t td{border-bottom-color:var(--line)}}
.fl-t tr.free td:first-child{box-shadow:inset 4px 0 0 var(--free-edge)}
.badge{padding:3px 10px;font-size:12.5px}
.b-h-free::before{background:var(--free-edge)}.b-h-substitute::before{background:#1d6fc4}
.plate{border-radius:5px;padding:1px 6px;font-size:13px}
.fl-dialog{border-radius:20px;padding:22px 24px;box-shadow:0 24px 60px rgba(0,0,0,.25)}
.fl-dialog h2{font-family:var(--head);font-size:19px}
.fl-dialog .x{width:40px;height:40px;border-radius:12px;background:var(--chip);border:0;display:inline-flex!important;align-items:center;justify-content:center}
.fl-f input,.fl-f select,.fl-f textarea,.fl-in{border-radius:10px;border-color:#d5dcd4}
.fl-f input:not([type=checkbox]):not([type=file]),.fl-f select,.fl-in{height:40px}
.fl-banner{border-radius:12px;padding:11px 14px}
.fl-switch{background:var(--card)}
.fl-toast{border-radius:12px}
.chooser h1{font-size:30px}
.chooser-list button{border-radius:14px;padding:14px 16px}
/* driver app: the car being driven is a green hero card, as on the mockup */
.drv{gap:14px}
.drv .fl-card{border-radius:var(--radius)}
.drv-top .brand{font-family:var(--head);font-size:18px}
.drv-hero{background:var(--brand);border-color:var(--brand);color:#fff}
.drv-hero h2{color:#cfe6d8;font-size:12px;text-transform:uppercase;letter-spacing:.06em;font-family:Inter,sans-serif}
.drv-hero .muted,.drv-hero .fl-kv dt{color:#cfe6d8}
.drv-hero .plate{color:#18211b;background:#fff;border-color:#18211b}
.drv-hero .badge{background:rgba(255,255,255,.16);color:#fff}
.drv-big button{display:grid!important;justify-items:center;align-content:center;gap:4px;border-radius:16px;min-height:96px}
.drv-big button.fl-primary{background:var(--ink)!important;border-color:var(--ink)!important}
.drv-big .drv-dtp{min-height:64px;display:flex!important;gap:8px;justify-content:center;align-items:center;background:var(--card)}
.drv-big .drv-dtp small{display:none}
.fl-fold>summary{padding:16px 18px}
.fl-fold-t{flex-wrap:nowrap;gap:8px}.fl-fold-t .ic{color:var(--brand)}

/* «Демо без входу» bar: bright, at the very top, so everyone sees they can look as the admin or as a driver */
.fl-switch{background:linear-gradient(0deg,#0b6b3a,#0b6b3a);color:#fff;border-bottom:0;padding:10px 16px;gap:8px 14px;font-size:14px}
.fl-sw-t{display:inline-flex;align-items:center;gap:7px}
.fl-sw-t .ic{width:20px;height:20px}
.fl-sw-ctl{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.fl-sw-or{opacity:.8;font-size:13px}
.fl-sw-btn{display:inline-flex!important;align-items:center;height:38px;border-radius:10px;border:1.5px solid rgba(255,255,255,.7);background:transparent;color:#fff;font-weight:600;padding:0 14px}
.fl-sw-btn .ic{width:17px;height:17px}
.fl-sw-btn:hover{background:rgba(255,255,255,.12);border-color:#fff}
.fl-sw-btn.on{background:#fff;color:#0b6b3a;border-color:#fff}
.fl-sw-drv{position:relative;display:inline-flex;align-items:center}
.fl-sw-drv .ic{position:absolute;left:10px;width:17px;height:17px;color:#0b6b3a;pointer-events:none}
.fl-switch .fl-sw-sel{font-size:14px;height:38px;border-radius:10px;border:1.5px solid #fff;background:#fff;color:#18211b;font:inherit;font-weight:600;padding:0 10px 0 34px;max-width:min(320px,100%)}
.fl-switch .fl-sw-sel.on{box-shadow:0 0 0 3px #f0b43a}
@media (max-width:700px){.fl-switch{padding:10px 12px}.fl-sw-ctl{width:100%}.fl-sw-drv{flex:1;min-width:0}.fl-switch .fl-sw-sel{width:100%}}
@media (max-width:700px){.fl-sw-t{display:block;width:100%}.fl-sw-t .ic{vertical-align:-5px;margin-right:4px}}

/* ================================================================ layout of the approved mockup */
/* one white header: logo + name, then the menu */
.app-head{background:var(--card);border-bottom:1px solid var(--line)}
.app-head-in{max-width:1400px;margin:0 auto;padding:12px 32px;display:flex;flex-wrap:wrap;align-items:center;gap:12px 28px}
.brand-name{font-family:var(--head);font-weight:800;font-size:17px;letter-spacing:-.01em}
.brand-sub{font-size:12px;color:var(--muted)}
.app-head .fl-tabs{flex:1 1 520px}
.app-head .fl-tabs button{height:44px;font-size:14px}
main.fl,.status{max-width:1400px;padding-inline:32px}
main.fl{padding-block:28px 48px;gap:20px}
/* page title */
.pg-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px}
.pg-sub{font-size:13px;color:var(--muted);font-weight:500}
.pg-title{font-family:var(--head);font-weight:800;font-size:34px;letter-spacing:-.02em;margin:4px 0 0;line-height:1.15}
.pg-actions{display:flex;gap:10px;flex-wrap:wrap}
.pg-actions button{height:44px;padding:0 18px;border-radius:12px;font-weight:600;font-size:14px}
/* headline numbers */
.ov-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.ov-kpi{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px 22px;display:flex!important;flex-direction:column;align-items:flex-start;gap:6px;text-align:left;font:inherit;color:var(--ink);cursor:pointer}
.ov-kpi:hover{border-color:var(--wire)}
.ov-kpi-l{font-size:13px;color:var(--muted);font-weight:500}
.ov-kpi-v{font-family:var(--head);font-weight:800;font-size:32px;letter-spacing:-.02em;line-height:1.1}
.ov-kpi-n{font-size:13px;color:var(--muted);font-weight:500}
.ov-kpi-n.warn{color:#9a4a06}.ov-kpi-n.good{color:var(--good)}
.ov-row2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.ov-row-wide{display:flex;flex-wrap:wrap;gap:16px}
.ov-row-wide>.ov-costs{flex:999 1 640px;min-width:0}
.ov-row-wide>.ov-attn{flex:1 1 360px;min-width:0}
.ov-card{display:flex;flex-direction:column;gap:14px}
.ov-card h2{margin:0}
.ov-ch{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px 12px}
.ov-split{display:flex;height:12px;border-radius:6px;overflow:hidden;gap:2px}
.ov-split i{display:block}
.ov-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.ov-tiles.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.ov-tile{display:flex!important;flex-direction:column;align-items:flex-start;gap:2px;padding:12px 14px;border-radius:12px;border:0;text-align:left;color:var(--ink);font:inherit;cursor:pointer}
.ov-tile:hover{outline:1.5px solid var(--wire)}
.ov-tile span{font-size:13px;color:var(--ink2);display:inline-flex;align-items:center;gap:6px}
.ov-tile b{font-family:var(--head);font-size:22px}
.dot{width:10px;height:10px;border-radius:3px;display:inline-block;flex:none}
.ov-legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:var(--ink2)}
.ov-legend span{display:inline-flex;align-items:center;gap:6px}
.ov-cols{display:flex;align-items:flex-end;gap:14px;height:240px;border-bottom:1px solid var(--line);padding-top:8px}
.ov-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;height:100%;position:relative}
.ov-col-v{font-size:12px;color:var(--ink2);font-weight:600;white-space:nowrap}
.ov-col-bar{width:100%;max-width:56px;display:flex;flex-direction:column;gap:2px;border-radius:8px 8px 0 0;overflow:hidden;min-height:2px}
.ov-col-bar i{display:block;min-height:2px}
.ov-col-l{position:absolute;bottom:-24px;font-size:12px;color:var(--muted);white-space:nowrap}
.ov-costs{padding-bottom:34px}
.ov-alert{display:flex!important;gap:12px;align-items:flex-start;padding:12px;margin:0 -12px;border:0;border-radius:12px;background:transparent;text-align:left;color:var(--ink);font:inherit;cursor:pointer}
.ov-alert:hover{background:var(--chip)}
.ov-alert>span:last-child{display:flex;flex-direction:column;gap:2px}
.ov-alert b{font-size:14px;font-weight:600}
.ov-alert-n{flex:none;width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:15px}
.ov-alert-n.warn{background:#fdf3e3;color:#9a4a06}.ov-alert-n.bad{background:#fcebe7;color:#a32e1a}.ov-alert-n.info{background:#e6eef8;color:#1d5fa8}
.ov-top{display:grid;gap:12px}
.ov-top-row{display:grid!important;grid-template-columns:120px minmax(0,1fr) 120px;gap:12px;align-items:center;border:0;background:transparent;padding:4px;margin:-4px;border-radius:8px;font:inherit;color:var(--ink);cursor:pointer;text-align:left}
.ov-top-row:hover{background:var(--chip)}
.ov-top-row b{text-align:right;font-size:14px}
.ov-track{display:block;height:10px;background:#eef2ed;border-radius:5px;overflow:hidden}
.ov-track i{display:block;height:100%;background:var(--brand);border-radius:5px}
.ov-track.thin{height:8px}
.ov-repl{display:grid;gap:16px}
.ov-repl-row{display:grid!important;gap:6px;border:0;background:transparent;padding:6px;margin:-6px;border-radius:10px;font:inherit;color:var(--ink);cursor:pointer;text-align:left}
.ov-repl-row:hover{background:var(--chip)}
.ov-repl-h{display:flex;justify-content:space-between;align-items:center;gap:8px}
.ov-pill{font-size:13px;padding:4px 10px;border-radius:999px;font-weight:600}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .ov-track{background:var(--chip)}:root:not([data-theme="light"]) .ov-alert-n{filter:brightness(.85)}}
@media (max-width:1000px){.ov-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.ov-row2{grid-template-columns:1fr}}
@media (max-width:700px){
  .app-head-in{padding:10px 12px;gap:8px}
  .app-head .fl-tabs{flex:1 1 100%}
  main.fl,.status{padding-inline:12px}
  main.fl{padding-block:16px 40px}
  .pg-title{font-size:26px}
  .pg-actions{width:100%}.pg-actions button{flex:1}
  .ov-kpi-v{font-size:24px}
  .ov-tiles,.ov-tiles.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ov-cols{gap:6px;height:200px}
  .ov-col-v{font-size:10px}
  .ov-top-row{grid-template-columns:104px minmax(0,1fr) 92px;gap:8px}
}
.ov-row-wide{align-items:flex-start}

/* car card, as on the mockup */
.plate.plate-lg{font-size:22px;padding:4px 12px;border-width:2px;border-left-width:12px;border-radius:7px;letter-spacing:.05em}
.cd-title{font-family:var(--head);font-weight:800;font-size:20px;letter-spacing:-.01em}
.cd-status{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:-4px}
.cd-actions{display:flex;flex-wrap:wrap;gap:8px;background:#fafbf9;border-block:1px solid var(--line);margin-inline:-24px;padding:14px 24px}
.cd-actions button{height:42px;border-radius:12px;font-weight:600}
.cd-actions button:last-child{margin-left:auto}
.cd-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;padding-bottom:6px}
.cd-col{display:flex;flex-direction:column;gap:22px;min-width:0}
.cd-kv{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;margin:0}
.cd-kv .wide{grid-column:1/-1}
.cd-kv dt{font-size:12px;color:var(--muted);font-weight:500;margin-bottom:3px}
.cd-kv dd{margin:0;font-size:15px;font-weight:600}
.cd-kv dd.mono{font-family:ui-monospace,Menlo,Consolas,monospace;letter-spacing:.04em}
.cd-box{display:flex;flex-direction:column;gap:12px;padding:18px;border-radius:14px;background:var(--bg)}
.cd-box-h{display:flex;justify-content:space-between;align-items:center;gap:8px}
.cd-box h3,.cd-sec h3{font-family:var(--head);font-size:15px;font-weight:700;color:var(--ink);margin:0}
.cd-pill{font-size:13px;font-weight:600;padding:4px 12px;border-radius:999px;background:var(--card);color:var(--ink2)}
.cd-bar-h{display:flex;justify-content:space-between;font-size:13px;color:var(--ink2);margin-bottom:6px}
.cd-bar-h b{color:var(--ink)}
.cd-sec{display:flex;flex-direction:column;gap:12px}
.cd-sum{font-family:var(--head);font-size:18px}
.cd-costs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;font-size:13px;color:var(--ink2)}
.cd-costs>span{display:flex;flex-direction:column;gap:2px}
.cd-costs>span>span{display:inline-flex;align-items:center;gap:6px}
.cd-costs b{color:var(--ink)}
.cd-hist{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.cd-hist li{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:12px;align-items:start;padding:8px 0}
.cd-hist li>span:nth-child(2){display:flex;flex-direction:column;gap:2px}
.cd-hist b{font-size:14px;font-weight:600}
.cd-dot{width:10px;height:10px;margin:5px 5px 0;border-radius:50%}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .cd-actions{background:var(--chip)}}
@media (max-width:760px){.cd-grid{grid-template-columns:1fr}.cd-actions{margin-inline:-12px;padding:12px}.cd-actions button:last-child{margin-left:0}.cd-costs{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* driver app header, as on the mockup */
.drv-avatar{width:42px;height:42px;border-radius:50%;background:var(--brand);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:15px;flex:none}
.drv-hello{display:flex;flex-direction:column;line-height:1.2}
.drv-hello small{font-size:12px;color:var(--muted)}
.drv-hello b{font-family:var(--head);font-weight:800;font-size:18px}
.drv-app{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:var(--brand)}
.drv-app .ic{width:16px;height:16px}
.drv .fl-banner.warn{background:#fdf0dc;color:#6e3c04}
.drv .fl-banner.bad{background:#fcebe7;color:#7a2416}
.drv .fl-banner.good{background:var(--sel)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .drv .fl-banner.warn{background:#3a2c12;color:#f3d7a6}:root:not([data-theme="light"]) .drv .fl-banner.bad{background:#3a1c1a;color:#f3b9ae}}
