/* Vozopis – "Dílna" design: charcoal header band, safety orange, condensed bold headings */

/* ---- fonts (Barlow, SIL OFL 1.1, self-hosted – see fonts/OFL.txt) ---- */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400.81419bf5abb5.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-ext-400.30fe91f5bb42.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/barlow-latin-600.a1e2a2d7d4c0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/barlow-latin-ext-600.7befe7b24353.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("fonts/barlow-latin-700.15481e4eab6d.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("fonts/barlow-latin-ext-700.9b01ea2f83b1.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700.e1180918b873.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-ext-700.a4fc62d81f8b.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---- tokens ----
   Set on body, not :root: Pico defines its colour variables on :root with higher specificity,
   inheritance from body overrides them without a specificity fight. */
body {
  --ink: #17191c;
  --steel: #2a2e33;
  --orange: #e8590c;
  --surface: #fff;
  --surface-2: #f6f7f8;
  --line: #d3d7dc;
  --ok: #1f7a3d; --warn: #b45309; --bad: #c0261b;
  --ok-bg: #e6f4ea; --bad-bg: #fff1f0;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --condensed: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --pico-font-family: "Barlow", system-ui, sans-serif;
  --pico-font-family-monospace: var(--mono);
  --pico-font-size: 106%;
  --pico-background-color: #eceef1;
  --pico-color: var(--ink);
  --pico-h1-color: var(--ink); --pico-h2-color: var(--ink); --pico-h3-color: var(--ink);
  --pico-muted-color: #5b636d;
  --pico-muted-border-color: var(--line);
  --pico-primary: #c2410c;
  --pico-primary-background: #c2410c;
  --pico-primary-border: #c2410c;
  --pico-primary-hover: #9a3412;
  --pico-primary-hover-background: #9a3412;
  --pico-primary-hover-border: #9a3412;
  --pico-primary-underline: rgba(194, 65, 12, .45);
  --pico-primary-focus: rgba(232, 89, 12, .35);
  --pico-primary-inverse: #fff;
  --pico-secondary: #3d444c;
  --pico-secondary-border: #3d444c;
  --pico-card-background-color: var(--surface);
  --pico-card-sectioning-background-color: var(--surface-2);
  --pico-card-box-shadow: none;
  --pico-border-radius: 3px;
  --pico-form-element-background-color: var(--surface);
  --pico-form-element-border-color: #aeb4bb;
  --pico-text-decoration: none;
  background: var(--pico-background-color);
  min-height: 100vh; /* the page background must reach the bottom of the window on short pages */
}
@media (prefers-color-scheme: dark) {
  body {
    --ink: #0e1012;
    --steel: #1d2024;
    --surface: #1c1f23;
    --surface-2: #23272c;
    --line: #353a41;
    --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
    --ok-bg: #12291a; --bad-bg: #331616;
    --pico-background-color: #121417;
    --pico-color: #e4e7eb;
    --pico-h1-color: #f3f4f6; --pico-h2-color: #f3f4f6; --pico-h3-color: #f3f4f6;
    --pico-muted-color: #9aa3ad;
    --pico-primary: #fb8a4c;
    --pico-primary-hover: #fdba74;
    --pico-primary-underline: rgba(251, 138, 76, .5);
    --pico-secondary: #c3c9d0;
    --pico-secondary-border: #6b737c;
    --pico-form-element-border-color: #4a5058;
  }
}

/* ---- type ---- */
h1, h2, h3, .brand, .tab, [role=button], button, th, .pick-title, .reminder-banner, .stats strong { font-family: var(--condensed); }
h1 { font-size: 2.3rem; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; }
h2 { font-size: 1.35rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
h3 { font-weight: 700; }
hgroup p { font-size: 1.05rem; color: var(--pico-muted-color); }
hgroup p strong { font-family: var(--mono); font-size: .9em; }
[role=button], button { text-transform: uppercase; letter-spacing: .05em; font-weight: 700; font-size: 1.05rem; }
th { text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; color: var(--pico-muted-color); }
.muted { color: var(--pico-muted-color); }
.nowrap { white-space: nowrap; }
.km { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; }
.code { font-family: var(--mono); font-size: 1.6rem; letter-spacing: .15rem; }
article { border: 1px solid var(--line); }
nav a, .brand, .search-hits a:not([role=button]) { text-decoration: none; }
.search-hits a:not([role=button]):hover strong { text-decoration: underline; }

/* ---- brand ---- */
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; font-size: 1.25rem; text-transform: uppercase;
  letter-spacing: .03em; line-height: 1.1; }
.brand:hover { color: #fff; }
.brand-mark { background: var(--orange); color: #fff; padding: .15rem .45rem; border-radius: 3px; font-size: 1.15rem; letter-spacing: .06em; }
.brand-name { color: #e5e7eb; }

/* ---- staff header: brand bar + big glove-friendly tabs ---- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  max-width: none; margin: 0; padding: .7rem max(1rem, calc((100vw - 1200px) / 2)); background: var(--ink); color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.topbar-right .muted { color: #9aa3ad; }
.logout { margin: 0; }
.logout button.link { background: none; border: none; width: auto; margin: 0; min-height: 44px; padding: .6rem .2rem;
  color: #fff; text-transform: uppercase; font-size: .85rem; letter-spacing: .06em; }
.logout button.link:hover { color: var(--orange); }
.tabs { background: var(--steel); border-bottom: 4px solid var(--orange); margin-bottom: 2rem; }
.tabs-inner { display: grid; grid-template-columns: repeat(5, 1fr); }
.tab { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 68px; padding: .5rem;
  text-decoration: none; color: #c3c9d0; font-size: 1.2rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  border-right: 1px solid rgba(255, 255, 255, .06); }
.tab:first-child { border-left: 1px solid rgba(255, 255, 255, .06); }
.tab:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.tab[aria-current="page"] { background: var(--orange); color: #fff; }
.tab:focus-visible { outline: 3px solid #fdba74; outline-offset: -3px; }
.tab svg { width: 28px; height: 28px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab span { text-align: center; line-height: 1.15; }

/* ---- public header ---- */
.site-header { max-width: none; background: var(--ink); margin-bottom: 2rem; padding: 0 max(1rem, calc((100vw - 1200px) / 2)); }
.site-header nav { flex-wrap: wrap; }
.site-header nav ul:last-child { flex-wrap: wrap; justify-content: flex-end; }
.site-header nav [role=button] { margin-block: calc(var(--pico-nav-link-spacing-vertical) * -1); } /* Pico pulls it up with a top-only negative margin; links get both */
.site-header a:not(.brand) { color: #e5e7eb; }
.site-header a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--orange); }
.site-header a[role=button] { color: #fff; border-color: var(--orange); background: var(--orange); }

nav[aria-label="breadcrumb"] { margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; font-weight: 600; }
nav[aria-label="breadcrumb"] ul { padding: 0; }
footer.container { font-size: .85rem; }

/* ---- search / pick-list ---- */
.big-search label { margin-bottom: .4rem; font-family: var(--condensed); text-transform: uppercase; letter-spacing: .06em;
  font-weight: 700; color: var(--pico-muted-color); }
.big-search input { font-size: 1.5rem; padding: 1.1rem 1.2rem; border: 2px solid var(--pico-color); font-weight: 600; }
.big-search fieldset[role=group] { margin-bottom: 1rem; }
.big-search fieldset[role=group] button { flex: 0 0 auto; padding: 0 1.6rem; }
form[role=search] input, form[role=search] button { border-radius: 3px !important; }
.pick-title { font-size: 1.2rem; margin: 1rem 0 .5rem; text-transform: uppercase; letter-spacing: .04em; }
.search-hits { padding: 0; }
.search-hits .hit { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.search-hits .hit:last-child { border-bottom: none; }
.search-hits .hit:nth-child(odd) { background: var(--surface-2); }
.search-hits .hit strong { font-size: 1.1rem; }
.search-hits .hit [role=button] { margin: 0; }
.plate { display: inline-block; font-family: var(--mono); font-weight: 700; font-size: .85em; padding: 0 .45rem;
  border: 2px solid #17191c; border-left: 9px solid #1d4ed8; border-radius: 3px; background: #fff; color: #17191c;
  line-height: 1.45; letter-spacing: .04em; white-space: nowrap; }
.reminder-banner { display: block; padding: 1rem 1.2rem; margin-bottom: 1.5rem; min-height: 56px; text-decoration: none;
  background: #fde68a; color: #17191c; border-left: 10px solid #17191c; text-transform: uppercase; font-size: 1.3rem;
  letter-spacing: .03em; font-weight: 700; }
.reminder-banner:hover { color: #17191c; text-decoration: underline; }

/* ---- records as job tickets ---- */
.record { padding: 0; border-left: 6px solid var(--orange); }
.record header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin: 0;
  padding: .7rem 1.1rem; background: #17191c; color: #fff; border: 0; border-radius: 0; }
.record header strong { color: #fff; }
.record header .km { color: #fdba74; }
.record .record-body, .record > p, .record > details { padding: .2rem 1.1rem; }
.record .record-body ul { margin-top: .7rem; }
.record.voided { border-left-color: #9aa3ad; opacity: .7; }
.record.voided header { background: #4b5159; }
.record.voided .record-body { text-decoration: line-through; }

/* ---- badges, alerts ---- */
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 2px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); color: var(--pico-color); }
.badge.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid currentColor; }
.badge.warn { background: #b45309; color: #fff; }
.badge.bad { background: #c0261b; color: #fff; }
.alert { padding: .8rem 1rem; margin-bottom: 1rem; border: 1px solid var(--line); border-left: 8px solid var(--pico-primary);
  background: var(--surface); }
.alert.success { border-left-color: var(--ok); }
.alert.warning, .alert.info { border-left-color: var(--warn); }
.alert.error, .alert.danger { border-left-color: var(--bad); background: var(--bad-bg); }
.errorlist { color: var(--bad); list-style: none; padding: 0; margin: .2rem 0; font-size: .9rem; }
.errorlist li { list-style: none; margin: 0; }
button.danger { background: #c0261b; border-color: #c0261b; color: #fff; }

/* ---- mileage chart ---- */
.chart { background: var(--surface); border: 1px solid var(--line); padding: 1rem; }
.chart svg { width: 100%; height: auto; max-height: 240px; }
.chart polyline { fill: none; stroke: var(--orange); stroke-width: 3; }
.chart circle { fill: var(--pico-color); }
.chart circle.bad { fill: var(--bad); }
.chart figcaption { margin-top: .3rem; }

/* ---- stats, actions, layout bits ---- */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cards article { border-top: 5px solid var(--orange); }
.cards article > header { font-family: var(--condensed); text-transform: uppercase; font-size: 1.3rem; }
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1rem; }
.stats > div { padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--orange); }
.stats > div strong { display: block; font-size: 2.4rem; line-height: 1.1; color: var(--pico-color); }
.stats > div span { color: var(--pico-muted-color); font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.actions > * { margin: 0; }
.vehicle-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.2rem; }
.vehicle-actions [role=button] { margin: 0; min-height: 56px; padding: 0 1.4rem; display: inline-flex; align-items: center; justify-content: center; }
.filter { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.filter label { flex: 0 1 12rem; margin: 0; }
.filter > button, .filter > a { margin: 0 0 var(--pico-spacing); }
.filter .check { flex: 0 0 auto; margin-bottom: calc(var(--pico-spacing) + .85rem); }
.item-row { display: grid; gap: .5rem; grid-template-columns: 1.2fr 2fr 1.5fr; align-items: start; }
.row-action { text-align: right; }
.danger-zone { margin-top: 3rem; }
.qr svg { width: 180px; height: 180px; }
.print-record { border-top: 1px solid var(--line); padding-top: .6rem; margin-bottom: .6rem; }
.print-record h3 { margin-bottom: .2rem; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }
details > summary { min-height: 44px; display: flex; align-items: center; }
table td a:not([role=button]) { display: inline-block; padding: .35rem 0; }

@media (max-width: 900px) {
  .tab { flex-direction: column; gap: .2rem; font-size: 1rem; }
}
@media (max-width: 700px) {
  h1 { font-size: 1.8rem; }
  .item-row { grid-template-columns: 1fr; }
  .brand { font-size: 1rem; gap: .45rem; }
  .brand-mark { font-size: 1rem; }
  .topbar { padding: .6rem 1rem; }
  .topbar-right .muted { display: none; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; margin: 0; border-bottom: 0; border-top: 4px solid var(--orange);
    background: #17191c; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(0, 0, 0, .25); }
  .tabs-inner { padding: 0; }
  .tab { min-height: 64px; padding: .3rem .1rem; border: 0 !important; }
  .tab svg { width: 26px; height: 26px; }
  .tab span { white-space: nowrap; font-size: .78rem; }
  body:has(.tabs) { padding-bottom: 84px; }
  .site-header nav { justify-content: center; }
  .site-header nav ul:first-child { width: 100%; justify-content: center; }
  .site-header nav ul:last-child { justify-content: center; }
  .site-header nav li { padding: .35rem .45rem; }
  .big-search fieldset[role=group] { flex-direction: column; box-shadow: none; border: none; }
  .big-search fieldset[role=group] > * { border-radius: var(--pico-border-radius) !important; width: 100%; margin: 0 0 .5rem; }
  .big-search fieldset[role=group] button { padding: .9rem 1.6rem; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: .6rem 0; border-bottom: 1px solid var(--line); }
  table.stack td { border: none; padding: .15rem 0; white-space: normal; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--pico-muted-color); font-size: .85rem; }
  table.stack .row-action { text-align: left; padding-top: .4rem; }
  .sticky-save { position: sticky; bottom: 0; z-index: 2; padding: .6rem 0; margin: 0;
    background: var(--pico-background-color); border-top: 1px solid var(--line); }
  body:has(.tabs) .sticky-save { bottom: 76px; }
  .stats { gap: .5rem; }
  .stats > div { padding: .6rem; }
  .stats > div strong { font-size: 1.4rem; }
  .stats > div span { font-size: .75rem; }
  .vehicle-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .vehicle-actions .main { grid-column: 1 / -1; min-height: 60px; font-size: 1.15rem; }
  .reminder-banner { font-size: 1.15rem; }
}

@media print {
  :root { --pico-font-size: 11pt; }
  body { background: #fff; color: #000; }
  body > header, body > footer, .tabs, .topbar, .no-print, .alert { display: none !important; }
  main.container { max-width: none; padding: 0; }
  h1, h2, h3, td, p, li { color: #000; }
  .print-card { border: 2px dashed #000; padding: 1rem; }
  .print-record { break-inside: avoid; }
  table { font-size: 10pt; }
}

/* public directory of workshops */
.directory { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.directory article { margin: 0; }
.directory p { margin-bottom: .4rem; }

/* legal texts rendered from Markdown: wide tables scroll inside themselves, not the page */
.legal table { display: block; overflow-x: auto; }
.legal { overflow-wrap: anywhere; }

/* Pico pulls help text up under text inputs (negative margin); under a checkbox that overlaps the label */
input[type=checkbox] + small, input[type=radio] + small { margin-top: .35rem; padding-inline-start: 2rem; }

/* one look for all standalone forms (check a car, owner access, login, signup, password) */
.form-card { max-width: 34rem; margin: 0 auto 2rem; border-top: 4px solid var(--orange); }
.form-card.wide { max-width: 42rem; }
.form-card h1 { margin-bottom: .6rem; }
.form-card form > button { width: 100%; margin-top: .4rem; }
.form-card-foot { margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }

/* button next to an input (e.g. "Načíst z ARES"): one line, so it stays as tall as the input */
[role=group] > button { white-space: nowrap; width: auto; flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* honeypot for spam bots */
#id_kind { margin-bottom: 1rem; }
.demo-banner { background: var(--orange); color: #fff; font-weight: 600; padding: .5rem 0; }
.demo-banner a { color: #fff; text-decoration: underline; }
