/* NAJEME SA — office portál. Vzhľad podľa návrhu „Alternatíva 02 – Pracovný pult“
   (tmavomodrá #002140, červená #FF4A4A, žltý akcent, svetlomodré plochy, Poppins).
   Všetko lokálne (písma, ikony) — žiadne CDN. Tmavý režim podľa systému. */

@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../vendor/poppins/poppins-latin-500-normal.a09f2fccfee3.woff2") format("woff2"); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2212; }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../vendor/poppins/poppins-latin-ext-500-normal.89f0a93e3f00.woff2") format("woff2"); unicode-range: U+0100-02AF,U+1E00-1EFF; }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("../vendor/poppins/poppins-latin-600-normal.72993dddf88a.woff2") format("woff2"); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2212; }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("../vendor/poppins/poppins-latin-ext-600-normal.4bf15962191b.woff2") format("woff2"); unicode-range: U+0100-02AF,U+1E00-1EFF; }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../vendor/poppins/poppins-latin-700-normal.25b0e113ca7c.woff2") format("woff2"); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2212; }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../vendor/poppins/poppins-latin-ext-700-normal.08561ea67d7f.woff2") format("woff2"); unicode-range: U+0100-02AF,U+1E00-1EFF; }

:root {
  color-scheme: light dark;
  --bg: #f3f6fa; --card: #fff; --ink: #002140; --muted: #60748a; --line: #e0e7ef; --soft: #eaf4ff;
  --hover: #f7faff; --weekend: #f7f8fb; --vik-head: #edf1f7; --sel: #dcebff;
  --coral: #ff4a4a; --yellow: #ffd078; --yellow-2: #ffc357; --navy: #002140; --navy-2: #163e61;
  --ok-bg: #edf6ed; --ok: #357149; --warn-bg: #fff4da; --warn: #815415; --bad-bg: #fdecec; --bad: #bd343d;
  --m-A: #e64852; --m-B: #348653; --m-C: #8265c4; --m-D: #b88014; --m-S: #11897c;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-h: "Poppins", "Segoe UI", system-ui, sans-serif;
  --row: 48px; --r: 13px; --r-s: 8px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101e2c; --card: #192c3d; --ink: #eaf3fc; --muted: #adbdce; --line: #304456; --soft: #243e53;
    --hover: #1e3447; --weekend: #172737; --vik-head: #1a2f42; --sel: #2c4a66;
    --ok-bg: #254532; --ok: #b8edc8; --warn-bg: #514023; --warn: #ffe0a9; --bad-bg: #4a2327; --bad: #ffb4b8;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #edac40; outline-offset: 2px; }
h1 { font: 600 27px/1.3 var(--font-h); letter-spacing: -.9px; margin: 0 0 5px; }
h2 { font: 600 16px/1.5 var(--font-h); letter-spacing: -.35px; margin: 0; }
h3 { font-size: 14px; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.i { width: 17px; height: 17px; flex-shrink: 0; vertical-align: middle; }
.i-lg { width: 22px; height: 22px; }
[hidden] { display: none !important; }

/* --- Hlavička a navigácia ------------------------------------------------- */
.mast { background: var(--card); padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-family: var(--font-h); font-size: 20px; letter-spacing: -.8px; display: flex; align-items: center; gap: 11px; white-space: nowrap; text-decoration: none; color: var(--ink); }
.brand .i { color: var(--coral); width: 32px; height: 32px; }
.brand b { font-weight: 700; }
.brand span { font-weight: 500; }
.brand small { font-family: var(--font); display: block; letter-spacing: 1.8px; font-size: 9px; color: var(--muted); margin-top: 2px; font-weight: 600; }
.user { position: relative; }
.user > button { display: flex; align-items: center; gap: 10px; font-size: 12px; border: 0; background: none; padding: 4px 6px; border-radius: 10px; text-align: left; }
.user > button:hover { background: var(--soft); }
.user small { color: var(--muted); display: block; }
.avatar { display: grid; place-items: center; background: var(--soft); width: 36px; height: 36px; border-radius: 50%; font-weight: 600; flex-shrink: 0; font-size: 13px; }
.avatar.coral { background: var(--coral); color: #fff; }
.user-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,33,64,.16); min-width: 240px; padding: 6px; z-index: 50; }
.user-menu a, .user-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: 500; border: 0; background: none; text-align: left; }
.user-menu a:hover, .user-menu button:hover { background: var(--soft); }
.user-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.pocet { margin-left: auto; background: var(--coral); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 99px; display: inline-grid; place-items: center; padding: 0 6px; }
.nav { display: flex; gap: 3px; padding: 0 28px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: 0; z-index: 20; }
.nav a { color: var(--muted); border-bottom: 3px solid transparent; padding: 14px 17px; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; text-decoration: none; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a.on { color: var(--ink); border-bottom-color: var(--coral); }
.nav .pocet { margin-left: 4px; }

.main { padding: 25px 28px 20px; max-width: 1760px; margin: 0 auto; }
.bottom { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; font-size: 10px; color: var(--muted); flex-wrap: wrap; }

/* --- Nadpis stránky ------------------------------------------------------- */
.heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.heading p { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* --- Tlačidlá a polia ----------------------------------------------------- */
.btn { border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); padding: 9px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 12px; min-height: 38px; text-decoration: none; transition: background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { box-shadow: 0 2px 8px rgba(0,33,64,.07); background: var(--soft); }
.btn.primary { background: var(--yellow); border-color: var(--yellow); color: #002140; }
.btn.primary:hover { background: var(--yellow-2); }
.btn.dark { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.dark:hover { background: var(--navy-2); }
.btn.link { border: 0; background: none; padding: 3px 0; min-height: 30px; box-shadow: none; }
.btn.link:hover { text-decoration: underline; background: none; }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 30px; padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn.icon { min-width: 34px; padding: 5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
input, select, textarea { width: 100%; min-width: 0; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-s); padding: 9px 11px; min-height: 40px; }
textarea { resize: vertical; min-height: 70px; }
input[type=checkbox], input[type=radio] { width: 18px; min-height: 18px; height: 18px; accent-color: var(--navy); }
input[type=color] { padding: 2px; width: 60px; }
.field { display: grid; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 13px; }
.field > span, .field > label { font-weight: 500; }
.field .help { font-size: 11px; }
.field .err, .errorlist { color: var(--bad); font-size: 12px; list-style: none; margin: 0; padding: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 16px; }
.form-grid .c12 { grid-column: span 12; } .form-grid .c8 { grid-column: span 8; } .form-grid .c6 { grid-column: span 6; }
.form-grid .c4 { grid-column: span 4; } .form-grid .c3 { grid-column: span 3; }
.form-sec { grid-column: span 12; font: 600 11px var(--font); text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin: 6px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.form-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.check { display: flex; align-items: center; gap: 8px; padding-top: 24px; color: var(--ink); font-size: 13px; }

/* --- Súhrn (pás štatistík) ------------------------------------------------ */
.summary { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); margin-bottom: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 0; }
.stat { padding: 0 24px; border-right: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px; min-width: 0; text-decoration: none; }
.stat:last-child { border: 0; }
.stat > span { color: var(--muted); font-size: 12px; grid-column: 1 / -1; }
.stat strong { font-size: 30px; line-height: 1.3; letter-spacing: -1px; font-weight: 600; grid-row: 2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat strong small { font-size: 15px; letter-spacing: 0; color: var(--muted); font-weight: 500; margin-left: 3px; }
.stat .stat-icon { grid-row: 2; grid-column: 2; display: grid; place-items: center; background: var(--soft); border-radius: 12px; width: 42px; height: 42px; }
.stat > small { font-size: 11px; color: var(--muted); grid-column: 1 / -1; }

/* --- Rozloženie a panely -------------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.split.wide-side { grid-template-columns: minmax(0, 1fr) 360px; }
.stack { display: grid; gap: 18px; min-width: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; overflow: hidden; }
.panel-head { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head p { color: var(--muted); font-size: 12px; }
.panel-body { padding: 19px 20px; }
.panel-foot { display: flex; justify-content: space-between; gap: 10px; padding: 12px 17px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); flex-wrap: wrap; align-items: center; }
.overline { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); font-weight: 600; }
.sticky-side { position: sticky; top: 64px; display: grid; gap: 18px; }

.tag { font-size: 11px; border-radius: 5px; padding: 3px 7px; display: inline-flex; align-items: center; gap: 4px; background: var(--soft); color: var(--ink); white-space: nowrap; font-weight: 500; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.gray { background: var(--bg); color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.task { display: flex; align-items: center; gap: 13px; padding: 17px 20px; border-bottom: 1px solid var(--line); text-decoration: none; }
.task:last-child { border: 0; }
.task:hover { background: var(--hover); }
.task-icon { display: grid; place-items: center; background: var(--soft); border-radius: 10px; min-width: 36px; height: 36px; }
.task-icon.warn { background: var(--warn-bg); color: var(--warn); }
.task-icon.bad { background: var(--bad-bg); color: var(--bad); }
.task > div:nth-child(2) { flex: 1; min-width: 0; }
.task p { font-size: 12px; margin-top: 4px; color: var(--muted); }
.task .go { font-size: 12px; font-weight: 600; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }

.note { padding: 12px 14px; border-radius: var(--r-s); background: var(--soft); font-size: 12px; }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note + .note { margin-top: 8px; }
.hours { background: var(--navy); color: #fff; padding: 14px 20px; display: flex; gap: 11px; align-items: center; font-size: 12px; }
.hours small { display: block; color: #b9cde0; font-size: 11px; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* --- Menu odznaky --------------------------------------------------------- */
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 23px; padding: 0 4px; border-radius: 5px; font-size: 12px; font-weight: 600; color: #fff; background: var(--m-A); line-height: 1; }
.badge.B { background: var(--m-B); } .badge.C { background: var(--m-C); } .badge.D { background: var(--m-D); } .badge.S { background: var(--m-S); }
.badges { display: inline-flex; gap: 2px; }
.legend { display: flex; gap: 13px; flex-wrap: wrap; font-size: 11px; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.menu-numbers { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 12px; }
.menu-number { border-bottom: 3px solid var(--line); padding: 0 0 13px; position: relative; }
.menu-number::after { content: ""; position: absolute; left: 0; bottom: -3px; height: 3px; width: var(--pct, 0%); background: var(--c, var(--ink)); border-radius: 2px; }
.menu-number strong { display: block; font-size: 24px; margin-top: 9px; font-variant-numeric: tabular-nums; }
.menu-number small { color: var(--muted); font-size: 11px; }

/* --- Tabuľky -------------------------------------------------------------- */
.toolbar { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar input[type=search] { flex: 1; min-width: 180px; }
.toolbar select { width: auto; max-width: 190px; }
.chips { display: inline-flex; gap: 4px; background: var(--bg); padding: 3px; border-radius: 9px; flex-wrap: wrap; }
.chips a, .chips button { border: 0; background: none; padding: 6px 11px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; min-height: 30px; display: inline-flex; align-items: center; gap: 6px; }
.chips .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,33,64,.12); }
.chips .n { font-weight: 500; opacity: .75; font-variant-numeric: tabular-nums; }
.period { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; }
.period a, .period button { border: 1px solid var(--line); border-radius: 7px; background: var(--card); min-width: 32px; min-height: 32px; display: grid; place-items: center; text-decoration: none; padding: 0 6px; }
.period a:hover, .period button:hover { background: var(--soft); }
.scroll { overflow: auto; }
table.tab { border-collapse: collapse; width: 100%; text-align: left; font-size: 12.5px; }
.tab th { background: var(--bg); font-weight: 500; color: var(--muted); font-size: 11px; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tab th.num { text-align: right; }
.tab th[data-sort] { cursor: pointer; user-select: none; }
.tab th.asc::after { content: " ▲"; font-size: 9px; } .tab th.desc::after { content: " ▼"; font-size: 9px; }
.tab td { height: var(--row); padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tab tr:last-child td { border-bottom: 0; }
.tab tbody tr:hover td { background: var(--hover); }
.tab tr.sel td { background: var(--soft); }
.tab tr.click { cursor: pointer; }
.tab td small { display: block; color: var(--muted); font-size: 11px; }
.tab tfoot td { font-weight: 600; background: var(--bg); border-top: 1px solid var(--line); }
.tab .meno { font-weight: 600; text-decoration: none; }
.tab .meno:hover { text-decoration: underline; }
.tab mark { background: #ffe69c; color: #002140; border-radius: 3px; }

/* --- Rýchla zmena (panel pri telefonáte) ---------------------------------- */
.picker { position: relative; }
.picker-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(0,33,64,.16); max-height: 300px; overflow: auto; z-index: 30; padding: 4px; }
.picker-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; font-size: 13px; }
.picker-list button small { display: block; color: var(--muted); font-size: 11px; }
.picker-list button.act, .picker-list button:hover { background: var(--soft); }
.client-intro { display: flex; align-items: center; gap: 10px; margin: 12px 0 12px; }
.client-intro h3 { font-size: 16px; line-height: 1.3; }
.client-intro h3 a { text-decoration: none; }
.client-intro h3 a:hover { text-decoration: underline; }
.client-intro p { font-size: 12px; color: var(--muted); }
.client-meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; line-height: 1.6; }
.client-meta b { color: var(--ink); font-weight: 600; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--bg); padding: 3px; border-radius: 9px; margin-bottom: 14px; }
.seg button { border: 0; background: none; border-radius: 7px; padding: 6px 4px; font-size: 12px; font-weight: 600; color: var(--muted); min-height: 32px; }
.seg button[aria-pressed=true] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,33,64,.14); }
.seg button[aria-pressed=true][data-stav=AKTIVNY] { color: var(--ok); }
.seg button[aria-pressed=true][data-stav=POZASTAVENY] { color: var(--warn); }
.seg button[aria-pressed=true][data-stav=UKONCENY] { color: var(--bad); }
.menu-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 12px; }
.menu-pick button { border: 1px solid var(--line); border-radius: var(--r-s); background: var(--card); padding: 8px 4px; font-weight: 600; min-height: 40px; }
.menu-pick button[aria-pressed=true] { box-shadow: 0 0 0 2px var(--ink); border-color: var(--ink); background: var(--soft); }
.qty { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.qty .seg { margin: 0; flex: 1; }
.preview { font-size: 12px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; min-height: 23px; color: var(--muted); }
.tip { font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 11px; }
.undo { margin-top: 12px; padding: 11px 13px; background: var(--soft); border-radius: 9px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; gap: 10px; }

/* --- Mriežka objednávok --------------------------------------------------- */
.mr-wrap { position: relative; overflow: auto; max-height: calc(100vh - 250px); outline: 0; }
table.mr { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.mr th, .mr td { border-bottom: 1px solid var(--line); padding: 0; }
.mr thead th { position: sticky; top: 0; z-index: 3; background: var(--bg); font-weight: 500; color: var(--muted); font-size: 11px; text-align: center; padding: 7px 2px; line-height: 1.25; }
.mr thead th .dd { display: block; color: var(--ink); font-weight: 600; font-size: 12px; }
.mr thead th.vik { background: var(--vik-head); }
.mr thead th.sviatok { background: var(--bad-bg); }
.mr thead th.dnes { background: var(--navy); color: #fff; }
.mr thead th.dnes .dd { color: #fff; }
.mr .c-klient { position: sticky; left: 0; z-index: 2; background: var(--card); min-width: 210px; max-width: 210px; text-align: left; padding: 6px 12px; box-shadow: 1px 0 0 var(--line); }
.mr thead .c-klient { z-index: 4; background: var(--bg); text-align: left; }
.mr .c-klient a { font-weight: 600; text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr .c-klient a:hover { text-decoration: underline; }
.mr .c-klient small { color: var(--muted); font-size: 11px; display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.mr .c-klient .pz { width: 8px; height: 8px; border-radius: 50%; background: var(--m-D); display: inline-block; cursor: pointer; flex-shrink: 0; }
.mr tr.neaktivny .c-klient a { color: var(--muted); font-weight: 500; }
.mr tr.sel .c-klient, .mr tr.sel td.b { background: var(--soft); }
.mr td.b { min-width: 46px; height: var(--row); text-align: center; cursor: cell; position: relative; user-select: none; }
.mr.tyzden td.b { min-width: 80px; }
.mr td.b.vik { background: var(--weekend); }
.mr td.b .x { color: var(--line); }
.mr td.b .badge { min-width: 19px; height: 21px; font-size: 11px; }
.mr td.b .badges.viac .badge { min-width: 12px; padding: 0 2px; font-size: 10px; }
.mr td.b .kk { font-weight: 700; font-size: 11px; }
.mr td.b.ned::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: var(--bad); transform: rotate(-16deg); }
.mr td.b.sel { background: var(--sel) !important; }
.mr td.b.akt { box-shadow: inset 0 0 0 2px var(--ink); border-radius: 7px; }
.mr td.b.uklada { opacity: .5; }
.mr td.b.chyba { box-shadow: inset 0 0 0 2px var(--coral); }
.mr td.b.flash { animation: flash .9s ease-out; }
@keyframes flash { from { background: #fff1b8; } }
.mr td.sum { min-width: 48px; text-align: center; font-weight: 600; background: var(--bg); font-variant-numeric: tabular-nums; }
.mr tfoot td { position: sticky; bottom: var(--dole, 0); background: var(--bg); z-index: 2; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 11.5px; height: 30px; }
.mr tfoot .c-klient { z-index: 3; background: var(--bg); padding: 0 12px; }
.mr tfoot tr:first-child td { box-shadow: 0 -1px 0 var(--line); }
.mr tfoot tr:last-child td { background: var(--soft); }
.mr tfoot .lbl { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.mr-editor { position: absolute; z-index: 10; border: 2px solid var(--coral); border-radius: 7px; font: 700 13px var(--font); text-transform: uppercase; text-align: center; padding: 0; min-height: 0; box-shadow: 0 6px 18px rgba(0,33,64,.2); }
.mr-help { font-size: 11px; color: var(--muted); }
.mr-help kbd { font: 600 10.5px var(--font); background: var(--card); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--ink); }
.mr-stav { font-weight: 600; }
.mr-stav.ok { color: var(--ok); } .mr-stav.err { color: var(--bad); }
.pop { position: fixed; z-index: 60; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,33,64,.22); width: 340px; max-height: 380px; overflow: auto; }
.pop-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pop ul { list-style: none; margin: 0; padding: 4px 14px 10px; }
.pop li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.pop li:last-child { border: 0; }
.pop li small { color: var(--muted); display: block; }

/* --- Rozvoz --------------------------------------------------------------- */
.route { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.route:last-child { border: 0; }
.route > div:nth-child(2) { flex: 1; min-width: 0; }
.route small { display: block; color: var(--muted); }
.stop-note { color: var(--warn); background: var(--warn-bg); border-radius: 6px; padding: 2px 7px; display: inline-block; font-size: 11.5px; }
.print-head { display: none; }

/* --- Zoznamy (história, poznámky) ----------------------------------------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 12.5px; display: flex; gap: 12px; align-items: flex-start; }
.list li:last-child { border: 0; }
.list li > div { flex: 1; min-width: 0; }
.list small { color: var(--muted); display: block; font-size: 11px; margin-top: 2px; }
details.fold > summary { cursor: pointer; font-weight: 600; list-style: none; display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "+"; color: var(--coral); font-weight: 700; }
details.fold[open] > summary::before { content: "−"; }
dl.data { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; margin: 0; font-size: 12.5px; }
dl.data dt { color: var(--muted); }
dl.data dd { margin: 0; font-weight: 500; }

/* --- Hlášky a dialógy ----------------------------------------------------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: 420px; }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,33,64,.25); font-size: 13px; font-weight: 500; animation: up .25s ease-out; }
.toast.error { background: #bd343d; }
.toast.success { background: #2c6b40; }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }
dialog { border: 0; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,33,64,.3); padding: 22px; max-width: 460px; background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0,33,64,.35); }

/* --- Prihlásenie ---------------------------------------------------------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background:
  radial-gradient(1000px 520px at 8% -10%, rgba(255,208,120,.35), transparent 60%),
  radial-gradient(900px 500px at 110% 110%, rgba(255,74,74,.12), transparent 55%), var(--bg); }
.login .box { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 60px rgba(0,33,64,.12); padding: 36px 32px; }
.login .brand { margin-bottom: 26px; }
.login h1 { font-size: 22px; }
.login p { color: var(--muted); margin-bottom: 22px; }
.login .btn { width: 100%; min-height: 46px; font-size: 14px; }
.login form { margin-top: 10px; }

/* --- Responzívne ---------------------------------------------------------- */
@media (max-width: 1100px) {
  .split, .split.wide-side { grid-template-columns: minmax(0, 1fr) 270px; gap: 13px; }
  .nav { padding: 0 15px; } .nav a { padding: 12px 10px; font-size: 12px; }
  .main { padding: 22px 18px; }
  .mast { padding: 16px 20px; }
  .menu-numbers { --n: 3 !important; }
}
@media (max-width: 760px) {
  .split, .split.wide-side { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .user > button > div:not(.avatar) { display: none; }
  .nav { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 8px; position: static; }
  .nav a { justify-content: center; }
  .mast { padding: 14px 15px; }
  .main { padding: 18px 13px; }
  h1 { font-size: 23px; }
  .stat { padding: 0 12px; display: block; }
  .stat strong { display: block; font-size: 22px; margin-top: 5px; }
  .stat .stat-icon { display: none; }
  .form-grid .c8, .form-grid .c6, .form-grid .c4, .form-grid .c3 { grid-column: span 12; }
  input, select { font-size: 16px; }
  .brand { font-size: 16px; }
  .task { flex-wrap: wrap; }
  .menu-numbers { --n: 2 !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11px; }
  .mast, .nav, .noprint, .toasts, .bottom, .toolbar { display: none !important; }
  .main { padding: 0; max-width: none; }
  .panel { border: 0; border-radius: 0; }
  .split { display: block; }
  .route-print { page-break-after: always; }
  .route-print:last-child { page-break-after: auto; }
  .print-head { display: block; }
  .tab th { position: static; }
  .badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
