:root {
  /* Hlavné farby značky: zlatá #CBA75B a hnedá #583934. Modrá #2C5167 je len doplnková. */
  --bg: #faf7f1;
  --surface: #ffffff;
  --surface-2: #f3ebdc;
  --ink: #2b1d1a;
  --muted: #6b5a55;
  --line: #e6dcc9;
  --accent: #583934;
  --accent-ink: #ffffff;
  --accent-soft: #f5ecd9;
  --ok: #2f7d4f;
  --warn: #8a4b12;
  --warn-soft: #fbe9d0;
  --bad: #b3261e;
  --radius: 10px;
  --font-display: "Montserrat", "Segoe UI", Arial, sans-serif;
  --gold: #CBA75B;
  --blue: #2C5167;
  --font-body: "Montserrat", "Segoe UI", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17110f; --surface: #221916; --surface-2: #2e2320; --ink: #f3ebe3; --muted: #bba99f;
    --line: #3d2f2b; --accent: #CBA75B; --accent-ink: #1b120f; --accent-soft: #3a2d1f;
    --ok: #7fcf9c; --warn: #e0a868; --warn-soft: #3a2a1c; --bad: #f08a80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17110f; --surface: #221916; --surface-2: #2e2320; --ink: #f3ebe3; --muted: #bba99f;
  --line: #3d2f2b; --accent: #CBA75B; --accent-ink: #1b120f; --accent-soft: #3a2d1f;
  --ok: #7fcf9c; --warn: #e0a868; --warn-soft: #3a2a1c; --bad: #f08a80;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--font-body);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.label { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- prihlásenie ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 32px 16px; }
.login-card { width: 100%; max-width: 420px; display: grid; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 48px; height: 48px; border-radius: 50%; flex: none; color: #583934;
  display: grid; place-items: center; font: 700 18px var(--font-display); }
.brand h1 { font-size: 24px; }
.brand p { margin: 0; font-size: 14px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 12px 16px; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.field { display: grid; gap: 6px; }
.field input { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--bg); min-height: 48px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pin-dots { display: flex; gap: 12px; justify-content: center; padding: 6px 0; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); }
.pin-dots span.on { background: var(--accent); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pinpad button { min-height: 56px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font: 700 22px var(--font-display); }
.demo { border: 1px dashed var(--warn); background: var(--warn-soft); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.chip:hover { border-color: var(--accent); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; }
.tabs button { border: 0; background: transparent; border-radius: 8px; padding: 10px; font-weight: 700; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); }

/* ---------- appka ---------- */
.shell { min-height: 100%; display: grid; grid-template-columns: 240px 1fr; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 12px; display: grid; grid-template-rows: auto 1fr auto; gap: 20px;
  position: sticky; top: env(safe-area-inset-top, 0px); height: 100vh; }
.nav { display: grid; gap: 2px; align-content: start; overflow-y: auto; min-height: 0; }
.nav button { text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 10px 12px; display: flex; justify-content: space-between; gap: 8px; }
.nav button:hover { background: var(--surface-2); }
.nav button[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 700; box-shadow: inset 4px 0 0 var(--gold); }
.soon { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; align-self: center; }
.who { font-size: 14px; display: grid; gap: 8px; }
.main { padding: 24px 16px 96px; max-width: 1100px; width: 100%; display: grid; gap: 20px; align-content: start; }
@media (min-width: 761px) { .main { padding-inline: 32px; } }
.head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.head h2 { font-size: 28px; }
.badge-demo { font-size: 12px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: 3px 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; align-content: start; }
.card h3 { font-size: 18px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.big { font: 700 34px/1 var(--font-display); }
.rows { display: grid; gap: 0; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.row:first-child { border-top: 0; }
.pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.pill.ok { color: var(--ok); background: var(--accent-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }
.pill.bad { color: var(--bad); background: var(--warn-soft); }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar i.low { background: var(--warn); }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 8px; max-width: 640px; }
.bottom { display: none; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); overflow-x: auto; gap: 4px; }
  .bottom button { flex: 1 0 auto; border: 0; background: transparent; border-radius: 8px; padding: 8px 10px; font-size: 13px; min-height: 48px; }
  .bottom button[aria-current="page"] { background: var(--accent-soft); font-weight: 700; }
  .mtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
}
@media (min-width: 761px) { .mtop { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- modul Sklad / Furmanky ---------- */
#sklad-root { display: grid; gap: 16px; align-content: start; min-width: 0; }
.pill.info { color: var(--accent); background: var(--accent-soft); }
.s-taby { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; max-width: 480px; }
.s-taby button { border: 0; background: transparent; border-radius: 8px; padding: 10px; font-weight: 700; color: var(--muted); min-height: 44px; }
.s-taby button[aria-selected="true"] { background: var(--surface); color: var(--ink); }
.s-rezimy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.s-rezim { border: 2px solid var(--gold); background: var(--surface); color: var(--accent); border-radius: 12px; min-height: 76px; padding: 10px 6px;
  display: grid; place-items: center; gap: 2px; font: 700 16px var(--font-display); transition: transform .15s, box-shadow .15s; }
.s-ikona { font-size: 24px; line-height: 1; }
.s-rezim[aria-pressed="true"] { color: #fff; transform: scale(1.04); box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.s-prijem[aria-pressed="true"] { background: #43a047; border-color: #2e7d32; }
.s-krcmicka[aria-pressed="true"] { background: #235172; border-color: #14334a; }
.s-vydaj[aria-pressed="true"] { background: #e53935; border-color: #b71c1c; }
#s-kamera { width: 100%; max-width: 420px; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #000; border: 4px solid var(--gold); }
/* tlačidlá kamery pripnuté dole – na dosah palca */
.s-kam-miesto { height: 96px; }
.s-kam-lista { position: fixed; left: 0; right: 0; bottom: 20px; z-index: 20; display: flex; justify-content: center; gap: 10px; padding: 0 16px; pointer-events: none; }
.s-kam { pointer-events: auto; border-radius: 14px; min-height: 60px; padding: 14px 18px; font: 700 17px var(--font-display); box-shadow: 0 8px 20px rgba(0,0,0,.3); cursor: pointer; }
.s-kam-zadna { flex: 1 1 auto; max-width: 340px; background: #583934; color: #CBA75B; border: 1px solid #CBA75B; }
.s-kam-predna { flex: 0 0 auto; background: var(--surface); color: var(--accent); border: 2px solid #CBA75B; font-size: 15px; }
.s-kam-stop { flex: 1 1 auto; max-width: 500px; background: #000; color: #CBA75B; border: 2px solid #CBA75B; }
@media (min-width: 761px) { .s-kam-lista { left: 240px; } }
@media (max-width: 760px) { .s-kam-lista { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } }
.s-sprava { border-radius: 12px; padding: 16px 18px; font: 700 20px/1.3 var(--font-display); display: grid; gap: 4px; }
.s-sprava .s-kod { font: 500 14px var(--font-body); opacity: .85; }
.s-ok { background: #e3f1e8; color: #1d5635; }
.s-chyba { background: #fbe4e2; color: #8c1d16; }
.s-info { background: var(--accent-soft); color: var(--ink); }
.s-ovladanie { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.s-rucne { display: flex; gap: 8px; flex: 1 1 280px; min-width: 0; }
.s-rucne input, .s-hladat { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--surface); min-height: 48px; }
.s-zoznam { display: grid; }
.s-riadok { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 38%); gap: 10px; align-items: center; padding: 9px 0 9px 10px;
  border-top: 1px solid var(--line); border-left: 6px solid var(--pf); font-size: 14px; }
.s-riadok:first-child { border-top: 0; }
.s-telo { display: grid; min-width: 0; }
.s-telo strong, .s-telo .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-stav { font-size: 13px; text-align: right; overflow-wrap: anywhere; padding-right: 4px; }
.s-riadok.s-chyba { background: #fbe4e2; color: #8c1d16; }
.s-riadok.s-chyba .muted { color: inherit; }
.s-riadok.s-caka .s-stav { color: var(--muted); }
.s-lista { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.s-lista-tl { display: flex; gap: 8px; flex-wrap: wrap; }
.s-dlazdice { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.s-dlazdica { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 2px; }
.s-dlazdica strong { font: 700 26px/1.1 var(--font-display); }
.s-filtre { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.s-filtre .chip { flex: none; min-height: 40px; }
.s-filtre .chip[aria-pressed="true"] { background: var(--gold); color: #2b1d1a; border-color: var(--gold); }
.s-tabulka { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.s-thead, .s-prow { display: grid; grid-template-columns: 1fr 64px 56px; gap: 8px; align-items: center; padding: 10px 12px; }
.s-thead.s-4, .s-prow.s-4 { grid-template-columns: 1fr 56px 48px 84px; }
.s-thead { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
.s-thead span:not(:first-child), .s-velke { text-align: center; }
.s-produkt { border-top: 1px solid var(--line); border-left: 8px solid var(--pf); }
.s-prow > span:first-child { display: grid; min-width: 0; }
.s-mono { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.s-velke { font: 700 20px var(--font-display); }
.s-zle { color: var(--bad); }
.s-exp { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px 6px 28px; font-size: 13px; background: var(--warn-soft); flex-wrap: wrap; }
.s-exp-zle { background: #fbe4e2; color: #8c1d16; }
.s-furmanky { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.s-furmanka { text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 110px; }
.s-furmanka strong { font: 700 20px var(--font-display); }
.s-furmanka .pill { justify-self: start; }
.s-furmanka:hover { border-color: var(--accent); }
.s-pozn { margin: 0; font-size: 14px; }
.card .btn { justify-self: start; }
@media (max-width: 760px) {
  .s-rezim { min-height: 68px; font-size: 15px; }
  .s-sprava { font-size: 18px; }
  .s-riadok { grid-template-columns: auto minmax(0, 1fr); }
  .s-stav { grid-column: 2; text-align: left; }
  .s-thead.s-4, .s-prow.s-4 { grid-template-columns: 1fr 44px 40px 72px; }
}

/* ---------- tlač (A4, obyčajný papier) ---------- */
#tlac-oblast { display: none; }
@media print {
  @page { size: A4 portrait; margin: 8mm; }
  body.tlaci > *:not(#tlac-oblast) { display: none !important; }
  body.tlaci { background: #fff; color: #000; }
  body.tlaci #tlac-oblast { display: block; font: 11pt/1.3 "Montserrat", Arial, sans-serif; }
  #tlac-oblast h1 { font-size: 16pt; margin: 0 0 2mm; }
  #tlac-oblast .t-datum { margin: 0 0 4mm; font-size: 9pt; }
  #tlac-oblast table { width: 100%; border-collapse: collapse; }
  #tlac-oblast th, #tlac-oblast td { border: 1px solid #999; padding: 1.5mm 2mm; }
  #tlac-oblast th { background: #f1e4c6 !important; font-size: 10pt; }
  #tlac-oblast th:first-child { text-align: left; }
  #tlac-oblast td.t-c { text-align: center; font-weight: 700; font-size: 14pt; width: 22mm; }
  #tlac-oblast td.t-zle { color: #c00; }
  #tlac-oblast tr { break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* označenie testovacej verzie */
.beta { display: inline-block; vertical-align: middle; font: 800 11px/1 var(--font-display); letter-spacing: .08em; color: #2b1d1a; background: var(--gold); border-radius: 999px; padding: 4px 8px; margin-left: 4px; }

/* v0.6 – prihlásenie a správa skladu */
.login-sprava { margin: 0; padding: 10px 12px; border-radius: 8px; font-size: 14px; border: 1px solid var(--line); }
.login-sprava.ok { color: var(--ok); background: var(--accent-soft); }
.login-sprava.chyba { color: var(--bad); background: var(--warn-soft); }
.btn-link { border: 0; background: none; color: var(--accent); text-decoration: underline; padding: 6px 0; min-height: 40px; font: inherit; font-size: 14px; cursor: pointer; justify-self: start; }
.field select { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--bg); min-height: 48px; color: var(--ink); font: inherit; }
.s-test { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); border: 1px solid var(--gold); font-size: 13px; }
.s-test a { color: var(--accent); }
.s-uprava { max-width: 560px; }
.s-riadok-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.s-riadok-form input { min-width: 0; }
.s-mini { min-height: 32px; padding: 4px 10px; font-size: 13px; margin-left: auto; }
.card h3 .s-mini { float: right; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; }
.pouz-karta { max-width: 760px; }
.pouz-form { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr auto; gap: 8px; }
.pouz-form input, .pouz-form select, .pouz-riadok select { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--bg); min-height: 44px; color: var(--ink); font: inherit; min-width: 0; }
.pouz-zoznam { display: grid; }
.pouz-riadok { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pouz-meno { display: grid; min-width: 0; }
.pouz-meno .muted { font-size: 13px; overflow-wrap: anywhere; }
.pouz-akt { display: flex; gap: 6px; align-items: center; font-size: 14px; white-space: nowrap; }
.pouz-vyp { opacity: .55; }
@media (max-width: 640px) {
  .pouz-form { grid-template-columns: 1fr; }
  .pouz-riadok { grid-template-columns: 1fr auto; }
  .pouz-riadok .pouz-meno { grid-column: 1 / -1; }
}

/* v0.8 – detail produktu, varovanie bez signálu */
.s-klik { cursor: pointer; }
.s-klik:hover .s-prow, .s-klik:focus-visible .s-prow { background: var(--accent-soft); }
.s-klik .s-prow > span:first-child strong::after { content: " ›"; color: var(--muted); }
.s-varovanie { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); border: 1px solid var(--warn); color: var(--ink); font-size: 14px; font-weight: 600; }
.s-varovanie-info { background: var(--accent-soft); border-color: var(--line); font-weight: 500; }
.s-varovanie .btn-link { min-height: 0; padding: 0; }
.s-dlazdice-2 { grid-template-columns: repeat(2, 1fr); max-width: 420px; }
.s-baliky { display: grid; }
.s-balik { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.s-balik-vyd { opacity: .6; }
.s-balik-hl { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.s-balik-info { font-size: 13px; }
.s-balik-akcie { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.s-balik-akcie .s-mini { margin-left: 0; float: none; }
.s-mini-exp { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.s-mini-exp input { border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; min-height: 32px; background: var(--bg); color: var(--ink); font: inherit; }
.s-mini-zmaz { margin-left: auto !important; }
.s-prepinac { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.s-pridaj { max-width: 560px; }
.s-pridaj-kod { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 0 0 0 10px; background: var(--bg); }
.s-pridaj-kod input { border: 0; background: transparent; min-height: 44px; padding: 8px; font: inherit; color: var(--ink); min-width: 0; width: 100%; }
#offline-pas { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--warn); color: #1b120f; text-align: center; font: 700 14px var(--font-display, inherit); padding: 6px 12px calc(6px); padding-top: calc(6px + env(safe-area-inset-top)); }
.s-pridaj-kod .s-mono { white-space: nowrap; }
body.bez-signalu { padding-top: 34px; }
.g-tlacidlo { display: flex; justify-content: center; min-height: 44px; }
.g-tlacidlo > .btn { width: 100%; }

/* ---------- Furmanky ---------- */
.main:has(.f-siroke) { max-width: none; }
#furm-root { display: grid; gap: 16px; min-width: 0; }
.f-nadpis { font-size: 16px; margin: 4px 0 -4px; color: var(--muted); }
.f-karty { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.f-karta { text-align: left; gap: 6px; cursor: pointer; font: inherit; color: inherit; }
.f-karta:hover { border-color: var(--gold); }
.f-karta-hore { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.f-datum { font-weight: 700; }
.f-mini { font-size: 12px; }
.f-zle { color: var(--bad); }
.f-sprava { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.f-sprava.f-ok { color: var(--ok); }
.f-sprava.f-chyba { color: var(--bad); background: var(--warn-soft); }
.f-sprava .btn-link { min-height: 0; padding: 0 4px; text-decoration: none; }
.f-lista { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.f-lista-tl { display: flex; gap: 8px; flex-wrap: wrap; }
.f-lista-tl .btn { min-height: 42px; padding: 8px 12px; }
.f-prepinace { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.f-check { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.f-check input { width: 18px; height: 18px; }
.f-seg { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 3px; }
.f-seg button { border: 0; background: transparent; border-radius: 6px; padding: 6px 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.f-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }

/* tabuľka ako v Správe objednávok */
.f-obal { overflow: auto; min-width: 0; max-height: calc(100vh - 220px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.f-tab { border-collapse: separate; border-spacing: 0; font-size: 13px; line-height: 1.3; }
.f-tab th, .f-tab td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 3px 6px; vertical-align: middle; }
.f-tab .f-n { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; font-weight: 600; min-width: 220px; max-width: 280px; }
.f-tab .f-k { position: sticky; left: 220px; z-index: 2; background: var(--surface); width: 58px; min-width: 58px; font-weight: 700; }
.f-tab .f-d { position: sticky; left: 278px; z-index: 2; background: var(--surface); width: 58px; min-width: 58px; box-shadow: 2px 0 0 var(--line); }
.f-tab tr.f-hl .f-n { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.f-tab .f-o { min-width: 128px; max-width: 170px; }
.f-tab tr.f-hl td.f-o { font-size: 12px; cursor: pointer; overflow-wrap: anywhere; }
.f-tab tr.f-hl-meno td.f-o { font-weight: 700; font-size: 13px; }
.f-tab tr.f-hl td.f-o:hover { background: var(--accent-soft); }
.f-tab tr.f-stlpce th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); font-size: 12px; }
.f-tab tr.f-stlpce th.f-n, .f-tab tr.f-stlpce th.f-k, .f-tab tr.f-stlpce th.f-d { z-index: 4; }
.f-tab tr.f-stlpce .btn-link { min-height: 0; padding: 0; font-size: 12px; }
.f-num { text-align: right; font-variant-numeric: tabular-nums; }
.f-tab tr.f-t-sucet th, .f-tab tr.f-t-sucet td { font-weight: 800; }
.f-tab tr.f-t-suma th, .f-tab tr.f-t-suma td { font-weight: 800; background: var(--surface-2); }
.f-tab tr.f-ine th.f-n { font-style: italic; }
.f-bunka { padding: 0 !important; }
.f-bunka input, .f-ks { width: 100%; min-width: 48px; border: 0; background: transparent; padding: 6px; text-align: center; font-weight: 700; font-size: 14px; color: inherit; }
.f-bunka input:focus, .f-ks:focus { background: var(--accent-soft); outline: 2px solid var(--gold); }
.f-ks { width: 64px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
input.f-uklada { background: var(--warn-soft) !important; }
input.f-ulozene { background: #d9ead3 !important; color: #1d1412; }
input.f-zla { outline: 2px solid var(--bad) !important; }
.f-rucne { color: var(--gold); font-weight: 800; }
.f-platba { font-weight: 800; font-size: 11px; }
.f-p-ok { color: #2f7d4f; } .f-p-db { color: #b3261e; } .f-p-fa { color: #2C5167; }
.f-pozn { font-size: 13px; background: var(--warn-soft); border-radius: 6px; padding: 6px 8px; }

/* zoznam (mobil) */
.f-obj-karty { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.f-obj .rows .row, .f-sumar-m .rows .row, .f-polozky .rows .row { border-radius: 6px; padding: 4px 8px; align-items: center; }
.f-sumar-m summary { cursor: pointer; }
.f-sumar-m .f-r-sucet { font-weight: 800; }

/* dialóg */
.f-dialog-pozadie { position: fixed; inset: 0; background: rgba(20, 12, 10, .45); z-index: 20; }
.f-dialog { position: fixed; z-index: 21; left: 50%; top: 4vh; transform: translateX(-50%); width: min(640px, calc(100vw - 24px)); max-height: 92vh; overflow: auto;
  background: var(--surface); border-radius: 14px; padding: 18px; display: grid; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.f-dialog h3 { margin: 0; font-size: 20px; }
.f-form { display: grid; gap: 10px; }
.f-form textarea { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--bg); font: inherit; color: var(--ink); }
.f-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .f-2 { grid-template-columns: 1fr; } }
.f-hladat { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--bg); width: 100%; }
.f-polozky { display: grid; gap: 8px; }
.f-polozky .rows { max-height: 40vh; overflow: auto; }
.f-tl { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.f-akcie { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.f-akcie .btn, .f-dialog .rows .btn { min-height: 40px; padding: 6px 12px; }
.f-dialog .rows .row { align-items: center; }
.f-hr { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 4px 0; }

/* tlač: sumár a štítky */
@media print {
  #tlac-oblast.f-tlac-sumar tr.f-t-sucet td { font-weight: 800; }
  #tlac-oblast.f-tlac-sumar td.t-c { font-size: 12pt; width: 28mm; }
  #tlac-oblast.f-tlac-stitky .f-stitky { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; align-items: start; }
  #tlac-oblast.f-tlac-stitky table.f-stitok { width: 100%; border-collapse: collapse; break-inside: avoid; font-size: 9pt; }
  #tlac-oblast.f-tlac-stitky table.f-stitok th, #tlac-oblast.f-tlac-stitky table.f-stitok td { border: 1px solid #000; padding: 1mm 1.5mm; text-align: center; background: transparent; font-size: 9pt; }
  #tlac-oblast.f-tlac-stitky table.f-stitok th { width: 45%; font-weight: 700; background: #f2f2f2 !important; }
  #tlac-oblast.f-tlac-stitky table.f-stitok th.f-s-pol { text-align: left; font-weight: 600; background: transparent !important; }
  #tlac-oblast.f-tlac-stitky table.f-stitok tr[style] th.f-s-pol, #tlac-oblast.f-tlac-stitky table.f-stitok tr[style] td { background: inherit !important; }
  #tlac-oblast.f-tlac-stitky .f-s-meno { font-weight: 800; font-size: 11pt; }
  #tlac-oblast.f-tlac-stitky tr.f-s-qr th { background: #fff !important; padding: 1mm; }
  #tlac-oblast.f-tlac-stitky tr.f-s-qr svg { width: 30mm; height: 30mm; display: block; margin: 0 auto; }
  #tlac-oblast.f-tlac-stitky tr.f-s-hl th, #tlac-oblast.f-tlac-stitky tr.f-s-hl td { background: #ccc !important; font-weight: 800; }
  #tlac-oblast.f-tlac-stitky td.f-s-ok { background: #d9ead3 !important; color: #1b5e20; font-weight: 800; }
  #tlac-oblast.f-tlac-stitky td.f-s-db { background: #f4cccc !important; color: #b3261e; font-weight: 800; }
  #tlac-oblast.f-tlac-stitky td.f-s-fa { background: #cfe2f3 !important; color: #2C5167; font-weight: 800; }
  #tlac-oblast.f-tlac-stitky td.f-s-suma { color: #b3261e; font-weight: 800; }
}
.f-hladaj-riadok { display: flex; gap: 8px; }
.f-hladaj-riadok .f-hladat { flex: 1; min-height: 48px; }
.f-napl { align-self: center; padding: 6px 10px; }
@media print {
  #tlac-oblast.f-tlac-sumar table.f-t-sumar { width: 150mm; border-collapse: collapse; font-size: 10.5pt; }
  #tlac-oblast.f-tlac-sumar th, #tlac-oblast.f-tlac-sumar td { border: 1px solid #000; padding: .6mm 1.5mm; background: transparent; }
  #tlac-oblast.f-tlac-sumar th.f-t-nazov { text-align: center; font-size: 11pt; font-weight: 800; background: #fff !important; }
  #tlac-oblast.f-tlac-sumar tr.f-t-hl th { background: #d9d9d9 !important; font-size: 10.5pt; text-align: left; }
  #tlac-oblast.f-tlac-sumar tr.f-t-hl th.t-c { text-align: center; }
  #tlac-oblast.f-tlac-sumar td.t-c { text-align: center; font-weight: 400; font-size: 10.5pt; width: 26mm; }
  #tlac-oblast.f-tlac-sumar tr.f-t-medzi td:first-child { text-align: right; color: #e00; font-weight: 800; }
  #tlac-oblast.f-tlac-sumar tr.f-t-polotovar td:first-child { color: #e00; font-weight: 800; }
  #tlac-oblast.f-tlac-sumar tr.f-t-cerveny td { font-weight: 800; }
  #tlac-oblast.f-tlac-sumar tr.f-t-cerveny td:first-child { text-align: right; }
}
