/* TENDMEN – vzhľad: pokojné neutrálne plochy, jemné rámiky, husté tabuľky, akcent zelenomodrá.
   Načíta sa po styles.css a prekrýva ho. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter/inter-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter/inter-latin-400-normal.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: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/inter/inter-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/inter/inter-latin-500-normal.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: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter/inter-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter/inter-latin-600-normal.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: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/inter/inter-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/inter/inter-latin-700-normal.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; }

:root {
  --bg: #f7f8f9; --surface: #ffffff; --surface-2: #f3f4f6; --hover: #eef0f2; --text: #1c1d21; --muted: #6b6f78; --faint: #9a9ea6;
  --line: #e4e6ea; --line-2: #d6d9de; --brand: #1f6f68; --brand-2: #1f6f68; --accent: #1f6f68; --accent-soft: #e2f0ee; --on-accent: #fff;
  --ok: #1e8a52; --ok-bg: #e6f4ec; --warn: #b36b00; --warn-bg: #fdf2dd; --bad: #d1352b; --bad-bg: #fde8e6; --none: #6b6f78; --none-bg: #f1f2f4;
  --off: #9a9ea6; --off-bg: #f5f6f7; --row-line: var(--line);
  --radius: 10px; --radius-sm: 7px; --shadow: 0 1px 2px rgba(16,18,24,.04); --shadow-pop: 0 12px 40px rgba(16,18,24,.18);
  --side: 236px; --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media not all /* tmavý režim vypnutý */ {
  :root {
    --bg: #0e0f11; --surface: #15161a; --surface-2: #1b1d21; --hover: #202226; --text: #e7e8eb; --muted: #8b9099; --faint: #646973;
    --line: #25272c; --line-2: #2f3237; --brand: #4fb3a6; --brand-2: #4fb3a6; --accent: #4fb3a6; --accent-soft: #15302d; --on-accent: #06201d;
    --ok: #4cc283; --ok-bg: #12291d; --warn: #e9a945; --warn-bg: #2c2312; --bad: #f2685e; --bad-bg: #2e1715; --none: #8b9099; --none-bg: #1d1f23;
    --off: #646973; --off-bg: #131417; --shadow: none; --shadow-pop: 0 16px 48px rgba(0,0,0,.55);
  }
}

html, body { background: var(--bg); }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); font-feature-settings: "cv11", "ss01"; letter-spacing: -.005em; }
h1 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 14px; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: -.005em; margin: 0 0 10px; color: var(--text); }
.card > h2:first-child, details.card > summary { font-size: 13px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
::selection { background: var(--accent-soft); }

/* ---------- rozloženie: bočný panel + obsah ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; padding: 14px 10px; overflow-y: auto; }
.side-brand { display: flex; align-items: center; padding: 4px 10px 14px; }
.side-brand img { height: 28px; width: auto; display: block; }
.topbar { position: sticky; top: 0; z-index: 20; height: 48px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line); color: var(--text); display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-left: var(--side); }
@media not all /* tmavý režim vypnutý */ { .topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); } }
.topbar .brand { display: none; }
.topbar .brand img { height: 26px; width: auto; display: block; }
.topbar-right { gap: 8px; }
.topbar-right .muted { color: var(--muted); max-width: 46vw; }
.topbar .btn.ghost { color: var(--text); border-color: var(--line); }
.icon-btn { display: none; appearance: none; border: 0; background: none; color: var(--text); width: 34px; height: 34px; border-radius: 8px; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--hover); }
.container, body.wide .container { max-width: 1240px; margin: 0 0 0 var(--side); padding: 22px 28px 60px; }
body.wide .container { max-width: none; }
.container { max-width: calc(820px + var(--side)); }
@media (min-width: 1500px) { .container:not(body.wide .container) { margin-left: calc(var(--side) + 40px); } }
body.noauth .sidebar, body.noauth .topbar .menu-btn { display: none; }
body.noauth .topbar { margin-left: 0; justify-content: space-between; }
body.noauth .topbar .brand { display: flex; }
body.noauth .container { margin: 0 auto; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-pop); background: var(--surface); }
  body.menu-open .sidebar { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  .topbar { margin-left: 0; justify-content: space-between; padding: 0 12px; padding-top: env(safe-area-inset-top); height: calc(52px + env(safe-area-inset-top)); }
  .topbar .brand { display: flex; margin-right: auto; }
  .icon-btn.menu-btn { display: inline-flex; }
  .container, body.wide .container { margin-left: 0; padding: 16px 14px 70px; max-width: none; }
  .topbar-right #useremail { display: none; }
}

/* ---------- navigácia ---------- */
.fnav { display: flex; flex-direction: column; gap: 1px; }
.fnav-in { display: flex; flex-direction: column; gap: 1px; }
.fnav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 7px; color: var(--muted); font-weight: 500; font-size: 13.5px; text-decoration: none; }
.fnav a svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.fnav a:hover { background: var(--hover); color: var(--text); }
.fnav a.on { background: var(--hover); color: var(--text); }
.fnav a.on svg { color: var(--accent); opacity: 1; }
.fnav .nav-sec { font-size: 11.5px; font-weight: 500; color: var(--faint); padding: 14px 10px 4px; }
.fnav .cmdk-btn { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.fnav .cmdk-btn:hover { border-color: var(--line-2); color: var(--text); }
.kbd { margin-left: auto; font-size: 11px; color: var(--faint); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; line-height: 17px; font-family: var(--font); }
.outbox { margin: 10px 10px 0; font-size: 12px; color: var(--warn); background: var(--warn-bg); border-radius: 7px; padding: 6px 8px; cursor: pointer; }

/* ---------- prvky ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 12px; }
details.card > summary { list-style: none; display: flex; align-items: center; gap: 6px; color: var(--text); }
details.card > summary::before { content: "›"; display: inline-block; transition: transform .15s; color: var(--muted); font-size: 16px; line-height: 1; }
details.card[open] > summary::before { transform: rotate(90deg); }
details > summary::-webkit-details-marker { display: none; }
.btn { font-family: var(--font); font-weight: 500; font-size: 13.5px; min-height: 32px; padding: 5px 12px; border-radius: 7px; background: var(--accent); color: var(--on-accent);
  border: 1px solid transparent; box-shadow: 0 1px 0 rgba(0,0,0,.04); text-decoration: none; transition: background .12s, border-color .12s; }
.btn:hover { filter: none; background: color-mix(in srgb, var(--accent) 88%, #000); text-decoration: none; }
@media not all /* tmavý režim vypnutý */ { .btn { color: var(--on-accent); } .btn:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); } }
.btn.secondary, .btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn.secondary:hover, .btn.ghost:hover { background: var(--hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.topbar .btn.ghost { border-color: var(--line); }
.btn.danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.small { min-height: 28px; padding: 3px 10px; font-size: 12.5px; }
.btn-row { gap: 6px; }
label { font-size: 12.5px; font-weight: 500; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], select, textarea {
  width: 100%; font: inherit; font-size: 13.5px; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: 7px; padding: 6px 10px; min-height: 34px;
  transition: border-color .12s, box-shadow .12s; }
textarea { resize: vertical; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--line-2) 60%, var(--muted)); }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .country-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field { margin-bottom: 12px; }
.field .hint { font-size: 12px; }
.grid2 { gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr 1fr; } }
.country-btn { height: 34px; border-radius: 7px; background: var(--surface); border-color: var(--line-2); font-weight: 500; }
.search input { font-size: 15px; letter-spacing: .5px; }
.tabs button { border-radius: 7px; padding: 7px; font-weight: 500; background: var(--surface-2); border-color: var(--line); }
.tabs button[aria-selected=true] { background: var(--surface); color: var(--text); border-color: var(--line-2); box-shadow: var(--shadow); }
@media not all /* tmavý režim vypnutý */ { .tabs button[aria-selected=true] { color: var(--text); } }
.auth { margin-top: 8vh; }

/* stavy: malé štítky s farebnou bodkou */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 1px 8px 1px 7px; border-radius: 999px; line-height: 20px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.chip.ok::before { background: var(--ok); } .chip.warn::before { background: var(--warn); } .chip.bad::before { background: var(--bad); }
.chip.ok, .chip.warn, .chip.bad, .chip.none { background: var(--surface); }
.chip.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.chip.warn { color: var(--text); }
.banner { border-radius: var(--radius); padding: 10px 14px; font-size: 13.5px; border: 1px solid var(--line); background: var(--surface); }
.banner.info { background: var(--surface); }
.banner.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 25%, transparent); color: var(--text); }
.banner.warn strong { color: var(--warn); }
.banner.bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 25%, transparent); color: var(--text); }
.banner.bad strong { color: var(--bad); }
.banner.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--text); }
.banner.ok strong { color: var(--ok); }
.error { font-size: 13px; }
#toast { background: var(--text); color: var(--bg); border-radius: 8px; font-size: 13px; padding: 8px 14px; box-shadow: var(--shadow-pop); }

/* ---------- tabuľky ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.vtable { font-size: 13px; }
.vtable th, .vtable td { border-right: 0; border-bottom: 1px solid var(--line); padding: 7px 12px; vertical-align: middle; }
.vtable thead th { background: var(--surface); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.vtable thead .c-ecv, .vtable thead th.c-track { background: var(--surface); }
.vtable .c-ecv, .vtable .c-track { background: var(--surface); border-left: 0; }
.vtable tbody tr:hover td, .vtable tbody tr:hover th { background: var(--hover); filter: none; }
.vtable .cell-date { font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.vtable .cell-date::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: transparent; flex: none; }
.vtable .cell-days { margin-left: 14px; font-size: 11.5px; }
.vtable td.c-ok .cell-date { color: var(--text); } .vtable td.c-ok .cell-date::before { background: var(--ok); }
.vtable td.c-warn, .vtable td.c-bad { background: transparent; }
.vtable td.c-warn .cell-date { color: var(--text); } .vtable td.c-warn .cell-date::before { background: var(--warn); } .vtable td.c-warn .cell-days { color: var(--warn); }
.vtable td.c-bad .cell-date { color: var(--bad); } .vtable td.c-bad .cell-date::before { background: var(--bad); } .vtable td.c-bad .cell-days { color: var(--bad); }
.vtable tbody tr:hover td.c-warn, .vtable tbody tr:hover td.c-bad { background: var(--hover); }
.vtable tr.inactive > td, .vtable tr.inactive > th { background: var(--off-bg) !important; }
.legend .lg { border-radius: 999px; font-size: 12px; background: var(--surface); }
.legend .lg.c-bad, .legend .lg.c-warn { background: var(--surface); border: 1px solid var(--line); }
.legend .lg.c-bad { color: var(--bad); } .legend .lg.c-warn { color: var(--warn); }

.ftable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ftable th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ftable td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ftable tbody tr:last-child td { border-bottom: 0; }
.ftable tr.click { cursor: pointer; }
.ftable tr.click:hover td, .ftable tr.click:focus-visible td { background: var(--hover); }
.ftable tr.click:focus-visible { outline: none; }
.ftable tr.inactive td { color: var(--faint); }
.ftable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ftable .pos { color: var(--ok); }
.ftable .nowrap { white-space: nowrap; }
.card .ftable td:first-child, .card .ftable th:first-child { padding-left: 0; }
.card .ftable td:last-child, .card .ftable th:last-child { padding-right: 0; }
.table-wrap .ftable { min-width: 640px; }

/* ---------- stránky vozového parku ---------- */
.phead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; min-height: 32px; }
.phead h1 { margin: 0; }
.addbar { margin: 0 0 12px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.sumline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); padding: 2px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sumline b { color: var(--text); font-weight: 600; }
.sumline .btn { margin-left: auto; }
.card .table-wrap { border: 0; box-shadow: none; border-radius: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.kpi { background: var(--surface); padding: 12px 16px; }
.kpi-l { font-size: 12px; color: var(--muted); }
.kpi-v { font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi.pos .kpi-v { color: var(--ok); } .kpi.neg .kpi-v { color: var(--text); }
.kpis.small .kpi-v { font-size: 15px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .b-cost { fill: var(--line-2); } .chart .b-inc { fill: var(--accent); }
.chart .lbl { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legend .lg.l-cost::before, .legend .lg.l-inc::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--line-2); }
.legend .lg.l-inc::before { background: var(--accent); }
.legend .lg.l-cost, .legend .lg.l-inc { border: 0; padding-left: 0; }
.vpick summary { min-height: 40px; background: var(--fill) !important; border: 0 !important; border-radius: 10px !important; display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 7px; font-weight: 400; background: var(--surface); }
.vpick[open] .vchecks { position: absolute; z-index: 15; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 8px 12px; margin-top: 4px; max-height: 300px; overflow: auto; }
.vchecks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 14px; }
.checkrow { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 400; color: var(--text); margin: 4px 0; cursor: pointer; }
.checkrow input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.docgrid { display: grid; gap: 8px; }
.docrow { display: grid; grid-template-columns: 1.3fr 1fr 150px; gap: 8px; align-items: center; }
.doclbl { font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doclbl .chip { font-size: 11px; }
@media (max-width: 600px) { .docrow { grid-template-columns: 1fr 1fr; } .doclbl { grid-column: 1 / -1; } }
.plist { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 6px; font-size: 13px; }
.plist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* fotky */
.file-btn { position: relative; overflow: hidden; display: inline-flex; color: var(--text); font-weight: 500; }
.file-btn .file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumb { position: relative; width: 76px; height: 76px; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--surface-2); font-size: 12px; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; line-height: 20px; padding: 0; }

/* kontrolný zoznam */
.checkitems { display: grid; gap: 0; margin: 4px 0 12px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.checkitems > .btn { margin: 8px; justify-self: start; }
.citem { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); }
.citem input { grid-column: 2; }
.citem .inote { grid-column: 1 / -1; }
.clabel { font-size: 13.5px; }
.segs { display: inline-flex; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; }
.seg { appearance: none; border: 0; background: var(--surface); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 500; padding: 5px 12px; min-height: 32px; cursor: pointer; }
.seg + .seg { border-left: 1px solid var(--line-2); }
.seg.on-ok { background: var(--ok-bg); color: var(--ok); }
.seg.on-bad { background: var(--bad-bg); color: var(--bad); }
.clist { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; font-size: 13.5px; }
.clist li.ok { color: var(--text); } .clist li.bad { color: var(--bad); }
.tplitems { display: grid; gap: 6px; margin-bottom: 8px; }
.tplrow { display: grid; grid-template-columns: 1fr 130px auto; gap: 6px; }

/* appka vodiča */
.dcard .dhead { display: flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 12px; }
.bigbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 12px; }
.bigbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-weight: 500; font-size: 13px; text-decoration: none; transition: border-color .12s, background .12s; }
.bigbtn span { font-size: 22px; line-height: 1; }
.bigbtn:hover { border-color: var(--line-2); background: var(--hover); text-decoration: none; }
.bigbtns.small .bigbtn { min-height: 58px; font-size: 12.5px; }
.bigbtns.small .bigbtn span { font-size: 18px; }

/* príkazový riadok (Ctrl+K) */
.cmdk-back { position: fixed; inset: 0; background: rgba(10,12,16,.38); z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.cmdk { width: min(620px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; }
.cmdk input { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; box-shadow: none !important; font-size: 15px; padding: 14px 16px; min-height: 50px; }
.cmdk ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.cmdk li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.cmdk li .muted { margin-left: auto; font-size: 12px; }
.cmdk li.sel { background: var(--hover); }
.cmdk .grp { font-size: 11.5px; color: var(--faint); padding: 8px 10px 2px; cursor: default; }

/* tlač / PDF */
@media print {
  .sidebar, .topbar, .phead .btn-row, .filters, #toast, .fnav, .btn { display: none !important; }
  .container, body.wide .container { margin: 0 !important; padding: 0 !important; }
  .card, .kpis, .table-wrap { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}
.fnav .cmdk-btn svg { width: 15px; height: 15px; flex: none; }
.kpis { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpis.small { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) { .kpis.small { grid-template-columns: 1fr; } }
/* záznamy na mobile ako zoznam */
@media (max-width: 640px) {
  .table-wrap .ftable.etable { min-width: 0; }
  .etable thead { display: none; }
  .etable, .etable tbody { display: block; }
  .etable tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "type amt" "desc desc" "meta meta"; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .card .etable tr { padding-left: 0; padding-right: 0; }
  .etable tbody tr:last-child { border-bottom: 0; }
  .etable td { display: block; padding: 0 !important; border: 0 !important; }
  .etable .e-type { grid-area: type; font-weight: 500; }
  .etable .e-amt { grid-area: amt; font-weight: 600; }
  .etable .e-desc { grid-area: desc; color: var(--muted); font-size: 12.5px; }
  .etable .e-date { grid-area: meta; font-size: 12px; color: var(--faint); }
  .etable .e-veh, .etable .e-drv, .etable .e-km { display: none; }
  .etable .e-date::after { content: attr(data-meta); }
}

/* =====================================================================
   Vzhľad v štýle Apple (inšpirácia rozhraním iOS/macOS, bez ich loga a ikon):
   sivé pozadie so zoskupenými bielymi kartami, veľké tučné nadpisy, systémové písmo,
   výplňové polia bez rámikov, tyrkysový akcent značky, spodná lišta v mobile.
   ===================================================================== */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --bg: #F2F2F7; --surface: #FFFFFF; --surface-2: #F2F2F7; --hover: rgba(116,116,128,.08);
  --text: #000000; --muted: rgba(60,60,67,.62); --faint: rgba(60,60,67,.36);
  --line: rgba(60,60,67,.14); --line-2: rgba(60,60,67,.22); --fill: rgba(118,118,128,.12);
  --accent: #00897F; --accent-2: #00D2BE; --accent-soft: rgba(0,210,190,.14); --on-accent: #FFFFFF;
  --ok: #248A3D; --ok-bg: rgba(52,199,89,.14); --warn: #B25000; --warn-bg: rgba(255,149,0,.14); --bad: #D70015; --bad-bg: rgba(255,59,48,.12);
  --radius: 14px; --radius-sm: 10px; --shadow: none; --shadow-pop: 0 18px 50px rgba(0,0,0,.18);
  --side: 248px;
}
@media not all /* tmavý režim vypnutý */ {
  :root {
    --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E; --hover: rgba(120,120,128,.18);
    --text: #FFFFFF; --muted: rgba(235,235,245,.62); --faint: rgba(235,235,245,.32);
    --line: rgba(84,84,88,.55); --line-2: rgba(84,84,88,.8); --fill: rgba(118,118,128,.24);
    --accent: #00D2BE; --accent-2: #00D2BE; --accent-soft: rgba(0,210,190,.18); --on-accent: #00211E;
    --ok: #30D158; --ok-bg: rgba(48,209,88,.16); --warn: #FF9F0A; --warn-bg: rgba(255,159,10,.16); --bad: #FF453A; --bad-bg: rgba(255,69,58,.16);
    --shadow-pop: 0 18px 50px rgba(0,0,0,.6);
  }
}
html, body { background: var(--bg); }
body { font-family: var(--font); font-size: 15px; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; color: var(--text); }
h1 { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
h2 { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.card > h2:first-child, details.card > summary { font-size: 17px; font-weight: 600; }
.muted { color: var(--muted); }
a { color: var(--accent); }
.lc { display: inline-flex; vertical-align: -3px; }
.lc svg { display: block; }

/* bočný panel ako na Macu */
.sidebar { background: color-mix(in srgb, var(--surface-2) 70%, transparent); backdrop-filter: saturate(1.8) blur(30px); -webkit-backdrop-filter: saturate(1.8) blur(30px); border-right: 1px solid var(--line); padding: 16px 12px; }
@media not all /* tmavý režim vypnutý */ { .sidebar { background: rgba(28,28,30,.85); } }
.side-brand { gap: 10px; padding: 4px 8px 18px; }
.side-brand .brand-icon, .topbar .brand-icon { border-radius: 23%; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.side-brand .brand-word { height: 22px; width: auto; display: block; }
.topbar .brand { gap: 8px; align-items: center; }
.topbar .brand .brand-word { height: 20px; width: auto; display: block; }
.fnav a { gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--text); font-weight: 500; font-size: 14px; }
.fnav a .lc { color: var(--accent); }
.fnav a:hover { background: var(--hover); text-decoration: none; }
.fnav a.on { background: var(--accent-soft); color: var(--text); }
.fnav .nav-sec { font-size: 12px; font-weight: 600; color: var(--muted); padding: 16px 10px 4px; }
.fnav .cmdk-btn { background: var(--fill); border: 0; border-radius: 9px; color: var(--muted); padding: 7px 10px; font-size: 14px; }
.fnav .cmdk-btn:hover { color: var(--text); }
.kbd { border: 0; background: var(--surface); color: var(--muted); }
.topbar { background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); border-bottom: 1px solid var(--line); height: 52px; }

/* obsah */
.container, body.wide .container { padding: 26px 34px 70px; }
.phead { margin-bottom: 18px; }
.card { background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: none; padding: 18px 20px; margin-bottom: 16px; }
details.card > summary::before { color: var(--faint); }
.table-wrap { border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: none; }

/* tlačidlá */
.btn { font-family: var(--font); font-weight: 600; font-size: 15px; letter-spacing: -.01em; min-height: 36px; padding: 7px 16px; border-radius: 10px; background: var(--accent); color: var(--on-accent); border: 0; box-shadow: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.secondary, .btn.tinted { background: var(--accent-soft); color: var(--accent); border: 0; }
.btn.secondary:hover, .btn.tinted:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 12%); }
.btn.ghost { background: transparent; color: var(--accent); border: 0; }
.btn.ghost:hover { background: var(--hover); color: var(--accent); }
.topbar .btn.ghost { border: 0; color: var(--accent); }
.btn.danger { background: var(--bad-bg); color: var(--bad); border: 0; }
.btn.small { min-height: 30px; padding: 4px 12px; font-size: 14px; border-radius: 8px; }
@media (max-width: 900px) { .btn { min-height: 44px; } .btn.small { min-height: 36px; } }

/* polia: sivá výplň bez rámika */
label { font-size: 13px; font-weight: 500; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], select, textarea {
  background: var(--fill); border: 1px solid transparent; border-radius: 10px; min-height: 40px; padding: 8px 12px; font-size: 15px; color: var(--text); }
input:hover, select:hover, textarea:hover { border-color: transparent; }
input:focus, select:focus, textarea:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.country-btn { background: var(--fill); border: 0; border-radius: 10px; height: 40px; }
.tabs { background: var(--fill); border-radius: 10px; padding: 2px; gap: 2px; }
.tabs button { border: 0; background: transparent; border-radius: 8px; color: var(--text); font-weight: 500; }
.tabs button[aria-selected=true] { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); }
.checkrow input { accent-color: var(--accent); }

/* štítky a hlásenia */
.chip { border: 0; background: var(--fill); font-size: 12.5px; padding: 2px 9px 2px 8px; }
.chip.ok, .chip.warn, .chip.bad, .chip.none { background: var(--fill); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.banner { border: 0; border-radius: var(--radius); background: var(--surface); }
.banner.warn { background: var(--warn-bg); } .banner.bad { background: var(--bad-bg); } .banner.ok { background: var(--ok-bg); }
#toast { border-radius: 14px; background: color-mix(in srgb, var(--text) 88%, transparent); backdrop-filter: blur(20px); font-weight: 500; }

/* tabuľky: zoskupené zoznamy */
.vtable { font-size: 14px; }
.vtable th, .vtable td { border-bottom: 1px solid var(--line); padding: 10px 14px; }
.vtable thead th { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface); }
.ftable { font-size: 14px; }
.ftable th { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 14px; }
.ftable td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.ftable .e-type .lc { color: var(--accent); margin-right: 6px; }
.att .lc { vertical-align: -2px; margin-left: 4px; }

/* prehľad */
.kpis { gap: 12px; background: transparent; border: 0; border-radius: 0; overflow: visible; }
.kpi { border-radius: var(--radius); padding: 14px 16px; }
.kpi-l { font-size: 13px; font-weight: 500; }
.kpi-v { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.kpis.small .kpi-v { font-size: 18px; }
.chart .b-cost { fill: var(--faint); } .chart .b-inc { fill: var(--accent-2); }
.legend .lg.l-inc::before { background: var(--accent-2); } .legend .lg.l-cost::before { background: var(--faint); }

/* veľké tlačidlá a segmenty */
.bigbtn { border: 0; background: var(--surface); border-radius: 16px; min-height: 84px; font-size: 13.5px; font-weight: 600; }
.bigbtn span { color: var(--accent); }
.bigbtn:hover { background: var(--hover); }
.card .bigbtn { background: var(--fill); }
.segs { border: 0; background: var(--fill); border-radius: 9px; padding: 2px; gap: 2px; }
.seg { background: transparent; border-radius: 7px; color: var(--text); min-height: 34px; }
.seg + .seg { border-left: 0; }
.seg.on-ok { background: var(--surface); color: var(--ok); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg.on-bad { background: var(--surface); color: var(--bad); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.checkitems { border: 0; background: var(--surface); }
.file-btn .lc, .btn .lc { color: inherit; }
.cmdk { border: 0; border-radius: 16px; }
.cmdk li.sel { background: var(--accent-soft); }

/* prihlásenie: veľká ikona appky */
.auth { text-align: left; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 6vh 0 18px; }
.auth-brand img.icon { width: 88px; height: 88px; border-radius: 23%; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.auth-brand img.word { height: 34px; width: auto; }

/* spodná lišta v mobile */
.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.8) blur(24px); -webkit-backdrop-filter: saturate(1.8) blur(24px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font: 500 10.5px var(--font); color: var(--muted); text-decoration: none; background: none; border: 0; padding: 2px 0; cursor: pointer; }
  .tabbar a.on { color: var(--accent); }
  .container, body.wide .container { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 28px; }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
body.noauth .tabbar { display: none; }
@media print { .tabbar { display: none !important; } }

/* len svetlý vzhľad; „končí čoskoro“ červenou namiesto oranžovej */
:root { color-scheme: light; --warn: #E0262D; --warn-bg: rgba(255,59,48,.10); --bad: #B0001A; --bad-bg: rgba(255,59,48,.18); }
.vtable td.c-bad .cell-date, .vtable td.c-bad .cell-days { font-weight: 700; }
