/* Bossboard pre Monju Prole – finančný prehľad. Tokeny na :root, tmavý režim vlastnými krokmi. */
:root {
  color-scheme: light;
  --bg: #f6f4f1; --surface: #ffffff; --surface-2: #faf8f6; --ink: #1d1a1c; --muted: #66606a; --line: #e7e2de;
  --side: #2a1a26; --side-2: #3a2534; --side-ink: #e9dbe4; --side-muted: #b49aab;
  --accent: #9b2f63; --accent-2: #7d2350; --accent-soft: #f7e6ee; --on-accent: #ffffff;
  --ok: #1f7a46; --ok-soft: #e3f3ea; --warn: #9a5b00; --warn-soft: #fdf0d9; --bad: #b42d1f; --bad-soft: #fbe5e2;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --ideal: #8b8794; --grid: #ece8e4;
  /* farby stredísk (štítky) */
  --k1: #2a78d6; --k2: #e2622c; --k3: #1a9e6e; --k4: #c98a00; --k5: #7f56c9; --k6: #c93f74; --k7: #13879a; --k8: #7d7887; --k9: #9a5c33; --k10: #c0392b;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 12px; --shadow: 0 1px 2px rgba(30, 20, 30, .06), 0 4px 14px rgba(30, 20, 30, .05);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #141114; --surface: #1d191c; --surface-2: #231e22; --ink: #f0ebee; --muted: #aaa1a8; --line: #342c32;
  --side: #120d11; --side-2: #241a21; --accent: #e07aa8; --accent-2: #eb94bb; --accent-soft: #3a1f2c; --on-accent: #1d1a1c;
  --ok: #5ec48a; --ok-soft: #173326; --warn: #e6b04f; --warn-soft: #3a2d12; --bad: #f08a7e; --bad-soft: #3d1d1a;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --ideal: #8f8a96; --grid: #2c252a;
  --k1: #4a93ec; --k2: #ee7d4a; --k3: #33b884; --k4: #e0a82a; --k5: #9d7be6; --k6: #e36c9a; --k7: #2cb0c4; --k8: #a29dab; --k9: #c4835a; --k10: #ea6a5a;
  --shadow: none; } }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141114; --surface: #1d191c; --surface-2: #231e22; --ink: #f0ebee; --muted: #aaa1a8; --line: #342c32;
  --side: #120d11; --side-2: #241a21; --accent: #e07aa8; --accent-2: #eb94bb; --accent-soft: #3a1f2c; --on-accent: #1d1a1c;
  --ok: #5ec48a; --ok-soft: #173326; --warn: #e6b04f; --warn-soft: #3a2d12; --bad: #f08a7e; --bad-soft: #3d1d1a;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --ideal: #8f8a96; --grid: #2c252a;
  --k1: #4a93ec; --k2: #ee7d4a; --k3: #33b884; --k4: #e0a82a; --k5: #9d7be6; --k6: #e36c9a; --k7: #2cb0c4; --k8: #a29dab; --k9: #c4835a; --k10: #ea6a5a;
  --shadow: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.pos { color: var(--ok); } .neg { color: var(--bad); } .warnc { color: var(--warn); }
.small { font-size: 13px; } .tiny { font-size: 12px; } .center { text-align: center; }
.mt { margin-top: 12px; } .mt6 { margin-top: 6px; } .mb { margin-bottom: 10px; } .mb6 { margin-bottom: 6px; } .pad { padding: 4px 10px; margin: 0; }
.between { justify-content: space-between; } .g6 { gap: 6px; } .g8 { gap: 8px; } .self-start { align-self: flex-start; }
.w30 { width: 30%; } .w34 { width: 34%; }
.m-only { display: none; }

/* Layout */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.brand b { display: block; font-size: 17px; letter-spacing: .2px; }
.brand small { color: var(--side-muted); font-size: 12px; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #c24a83, #7d2350); color: #fff; display: grid; place-items: center; font-weight: 800; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; color: var(--side-ink); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--side-2); }
.nav a[aria-current="page"] { background: var(--side-2); color: #fff; box-shadow: inset 3px 0 0 #e07aa8; }
.nav .badge { margin-left: auto; background: #e07aa8; color: #2a1a26; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 0 7px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--side-muted); padding: 0 8px; }
.side-foot .btn { color: var(--side-ink); border-color: var(--side-2); }
.main { min-width: 0; display: flex; flex-direction: column; }
.demo-band { background: var(--accent-soft); color: var(--ink); font-size: 13px; padding: 7px 24px; border-bottom: 1px solid var(--line); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px 6px; }
.top h1 { font-size: 22px; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-right { display: flex; align-items: center; gap: 10px; }
.today { color: var(--muted); font-size: 13px; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; position: relative; flex: none; }
.bdg { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; line-height: 1; }
.bell.pulse { animation: pulse .7s ease 3; }
@keyframes pulse { 50% { transform: scale(1.15); box-shadow: 0 0 0 6px var(--bad-soft); } }
.content { padding: 12px 24px 40px; outline: none; }
.bottom-nav, .fab { display: none; }

/* Building blocks */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card h2 { font-size: 15px; margin: 0 0 2px; text-wrap: balance; }
.card .sub { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.card-head > div { min-width: 0; }
.hero { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.hero .big { font-size: 38px; font-weight: 750; letter-spacing: -.5px; line-height: 1.1; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 2px; }
.stat .v2 { font-size: 17px; font-weight: 700; margin-top: 2px; }
.stat .d { font-size: 12px; color: var(--muted); }
.accs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 14px; }
.acc { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); min-width: 0; text-align: left; cursor: pointer; }
.acc:hover { border-color: var(--accent); }
.acc .n { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc .v { font-size: 18px; font-weight: 700; margin-top: 4px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 8px 14px; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.rec { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.big-btn { justify-content: center; padding: 14px; font-size: 15px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 1px 9px; font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.acc-c { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.dot.lg { width: 12px; height: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); align-self: flex-start; }
.seg button { border: 0; background: transparent; padding: 7px 16px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
.field input, .field select, .field textarea, select.inp, input.inp, textarea.inp { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); color: var(--ink); font-weight: 500; min-width: 0; }
.field select:disabled, .inp:disabled, .field input:disabled, .field textarea:disabled { opacity: .65; }
textarea.inp, .field textarea { resize: vertical; width: 100%; }
.mono { font: 12px/1.45 ui-monospace, Consolas, monospace !important; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; user-select: none; }
.switch input { accent-color: var(--accent); width: 16px; height: 16px; }
.todo { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.todo:first-of-type { border-top: 0; }
.todo .t { flex: 1; min-width: 0; }
.note { font-size: 13px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; }
.note.neg { color: var(--bad); }
.steps { margin: 6px 0 0; padding-left: 18px; line-height: 1.7; }

/* Štítky stredísk: farbu nesie bodka a podklad, text zostáva v ink */
.cc { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 1px 9px 1px 7px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ink); background: color-mix(in srgb, var(--c) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cc::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c); flex: none; }
.cc .sep { color: var(--muted); font-weight: 500; margin: 0 1px; }
.cc.sm { font-size: 11px; padding: 0 7px 0 5px; }
.cc-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }

/* Progress */
.bar { height: 8px; border-radius: 99px; background: var(--grid); overflow: hidden; position: relative; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--s1); }
.bar i.over { background: var(--bad); }
.bar .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; }
.hrow { display: grid; grid-template-columns: minmax(0, 150px) 1fr auto; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; padding: 6px 4px; border-radius: 8px; cursor: pointer; text-align: left; }
.hrow:hover { background: var(--surface-2); }
.hrow.static { cursor: default; } .hrow.static:hover { background: transparent; }
.hrow .hl { min-width: 0; overflow: hidden; }
.hrow .hb { height: 8px; background: var(--grid); border-radius: 99px; overflow: hidden; }
.hrow .hb i { display: block; height: 100%; border-radius: 99px; }
.prow { display: block; width: 100%; border: 0; background: transparent; padding: 8px 4px; border-radius: 8px; cursor: pointer; text-align: left; margin-bottom: 4px; }
.prow:hover { background: var(--surface-2); }
.bv { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.bv:first-of-type { border-top: 0; }
.brk { padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
.brk:last-child { border-bottom: 0; }
.brk-cats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); padding: 0 4px; }
.brk-cats b { color: var(--ink); font-weight: 600; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 6px; }

/* Tables */
.tbl-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
tr.transfer td { color: var(--muted); }
td.r, th.r { text-align: right; }
td .desc { font-weight: 600; }
td .meta { font-size: 12px; color: var(--muted); }
.rvdot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; background: var(--warn); margin-right: 6px; vertical-align: 1px; }
.plan-in { width: 92px; text-align: right; }

/* Pohyby: súhrn + filtre */
.sumbar { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.sumbar .sv { display: flex; flex-direction: column; min-width: 0; }
.sumbar .sv span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.sumbar .sv b { font-size: 16px; white-space: nowrap; }
.fbtn { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.filters .wide { min-width: 220px; }
.bfilters { margin-top: 0; }

/* Charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .ax { font-size: 11px; fill: var(--muted); }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend .ln { width: 16px; height: 0; border-top: 2px solid; }
.legend .ln.dash { border-top-style: dashed; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .15); min-width: 140px; }
.tip b { display: block; margin-bottom: 4px; font-size: 13px; }
.tip .r { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.tip .r span { display: inline-flex; gap: 6px; align-items: center; }
.tip .tsum { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }

/* Šuplík */
.drawer-bg { position: fixed; inset: 0; background: rgba(20, 10, 18, .35); z-index: 30; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(500px, 100%); background: var(--surface); z-index: 31; padding: 20px; overflow-y: auto; box-shadow: -10px 0 30px rgba(0, 0, 0, .15); display: flex; flex-direction: column; gap: 14px; }
.drawer h2 { margin: 0; font-size: 18px; min-width: 0; overflow-wrap: anywhere; }
.drawer .foot { margin-top: auto; padding-top: 4px; }
.amt-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.amt-head > b { font-size: 24px; }
.split-row { display: grid; grid-template-columns: 1fr 120px 54px; gap: 8px; align-items: center; font-size: 14px; }
.split-row input[type="range"] { accent-color: var(--accent); width: 100%; }
.voice { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pill.ex { font-weight: 500; font-size: 12px; text-align: left; }
.sug { border-radius: 10px; padding: 10px 12px; background: var(--ok-soft); color: var(--ink); font-size: 13px; border: 1px solid transparent; }
.sug.low { background: var(--warn-soft); }
.sug ul { margin: 6px 0 0; padding-left: 18px; }
.match { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; align-items: flex-start; }
.pdf-ic { width: 70px; height: 86px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--bad); flex: none; }
.pdf-ic .ic { width: 28px; height: 28px; }
.opt-row { display: flex; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); padding: 10px; border-radius: 10px; cursor: pointer; width: 100%; }
.opt-row:hover { border-color: var(--accent); }
.opt-row b, .pop .opt b { display: block; font-size: 14px; }
.opt-row small, .pop .opt small { color: var(--muted); font-size: 12px; }
.oi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; font-weight: 700; font-size: 12px; }
.oi.w { background: var(--warn-soft); color: var(--warn); } .oi.b { background: var(--bad-soft); color: var(--bad); }

/* Vyskakovacie menu */
.pop-bg { position: fixed; inset: 0; z-index: 40; background: transparent; }
.pop { position: fixed; z-index: 41; top: 64px; right: 24px; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .2); padding: 8px; display: flex; flex-direction: column; gap: 2px; max-height: 76vh; overflow: auto; }
.pop-h { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; padding: 6px 10px 4px; }
.pop .opt { display: flex; gap: 12px; align-items: center; text-align: left; border: 0; background: transparent; padding: 10px; border-radius: 10px; cursor: pointer; width: 100%; color: inherit; text-decoration: none; }
.pop .opt:hover { background: var(--surface-2); }
.pop .btn { margin: 6px 10px 0; justify-content: center; }

/* Telefón (náhľad účtenky) */
.cam { border-radius: 14px; background: repeating-linear-gradient(45deg, #2a1a26, #2a1a26 10px, #321f2d 10px, #321f2d 20px); height: 190px; display: grid; place-items: center; color: #e9dbe4; position: relative; overflow: hidden; }
.cam .rcpt { background: #fffdf7; color: #333; width: 140px; padding: 10px; font: 10px/1.35 ui-monospace, Consolas, monospace; transform: rotate(-4deg); box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.cam .scan { position: absolute; left: 0; right: 0; height: 3px; background: #e07aa8; box-shadow: 0 0 12px #e07aa8; animation: scan 1.1s ease-in-out infinite; }
@keyframes scan { 0% { top: 8%; } 50% { top: 88%; } 100% { top: 8%; } }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Kontrola */
.rv { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1.4fr); gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.rv:first-of-type { border-top: 0; }
.rv-main, .rv-sug { min-width: 0; }
.rv-pick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rv-pick .inp { flex: 1 1 120px; }
.empty { text-align: center; padding: 28px 16px; }

/* Projekty */
.proj-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.proj-card { text-align: left; cursor: pointer; display: flex; flex-direction: column; color: inherit; font: inherit; }
.proj-card:hover { border-color: var(--accent); }
.proj-card .pname { font-size: 15px; }
.proj-card .go { color: var(--accent); font-weight: 600; }

/* Nastavenia */
.cc-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cce { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cce-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cce-head .inp { flex: 1 1 140px; font-weight: 700; }
.cats { display: flex; flex-direction: column; gap: 6px; }
.cat-row { display: flex; gap: 8px; align-items: center; }
.cat-row .inp { flex: 1; min-width: 0; padding: 6px 9px; }
.sw-row { display: flex; gap: 5px; flex-wrap: wrap; width: 100%; }
.sw { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--surface); background: var(--c); cursor: pointer; box-shadow: 0 0 0 1px var(--line); padding: 0; }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.add-cc { margin-top: 14px; border: 1px dashed var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.imp-prev { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--side); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: min(560px, calc(100vw - 32px)); text-align: center; }

/* Doplnky: odkaz v tabuľke, náhľad dokladu */
.linkish { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; text-align: left; font: inherit; }
.linkish:hover b, .linkish:hover .cc { text-decoration: underline; }
.doc-prev { display: flex; gap: 14px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.rcpt-mini { background: #fffdf7; color: #333; padding: 8px 10px; font: 10px/1.4 ui-monospace, Consolas, monospace; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); transform: rotate(-2deg); flex: none; white-space: nowrap; }
.rc-photo { width: 140px; max-width: 45%; height: auto; border-radius: 10px; background: #000; display: block; flex: none; }

/* Role: čitateľ nevidí zápisové prvky (práva sa v ostrej verzii kontrolujú na serveri) */
body[data-role="reader"] .w-only { display: none !important; }
body:not([data-role="owner"]) .o-only { display: none !important; }
body[data-role="reader"] .demo-band::after { content: " · prihlásená účtovníčka: len čítanie a export"; font-weight: 600; }
.role-sel { font-size: 13px; padding: 6px 8px; max-width: 220px; }

/* Banky */
.bank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bank-tile { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.bank-tile:hover { border-color: var(--accent); }
.bank-tile span { font-size: 12px; color: var(--muted); }
.consent { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.consent h3 { margin: 4px 0 8px; font-size: 16px; }
.consent ul { margin: 0 0 8px; padding-left: 18px; line-height: 1.6; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rv-pick { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .d-only { display: none !important; }
  .m-only { display: initial; }
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { padding: 8px 16px 2px; gap: 8px; }
  .top h1 { font-size: 18px; }
  .top-right { gap: 6px; }
  .content { padding: 6px 16px 140px; }
  .demo-band { padding: 4px 16px; font-size: 11px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { gap: 2px 16px; }
  .hero .big { font-size: 30px; }
  .accs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
  .acc { padding: 8px 10px; }
  .acc .v { font-size: 16px; margin-top: 2px; }
  .acc .s:last-child { display: none; }
  .card { padding: 12px; }
  .tbl-wrap { margin: 0 -12px; padding: 0 12px; }
  .stack { gap: 12px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 20; padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px)); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; padding: 6px 0; border-radius: 8px; position: relative; }
  .bottom-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
  .bottom-nav .badge { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--bad); color: #fff; border-radius: 99px; font-size: 10px; font-weight: 700; padding: 0 5px; }
  .fab { display: grid; place-items: center; position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(68px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 18px; background: var(--accent); color: var(--on-accent); border: 0; box-shadow: 0 8px 22px rgba(125, 35, 80, .35); z-index: 21; cursor: pointer; }
  .fab .ic { width: 28px; height: 28px; stroke-width: 2.4; }
  .today { display: none; }
  .hide-m { display: none; }
  .role-sel { max-width: 132px; font-size: 12px; padding: 5px 6px; }
  .icon-btn { width: 34px; height: 34px; }
  /* Pohyby: na mobile len počet, príjmy, výdavky + ≡ */
  .pohyby-card { padding: 8px 10px; }
  .sumbar { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
  .sumbar .sv b { font-size: 14px; }
  .sumbar .sv span { font-size: 10px; }
  .fbtn { display: grid; width: 40px; height: 36px; }
  .filters { display: none; margin-top: 10px; }
  .filters.open { display: grid; grid-template-columns: 1fr 1fr; }
  .filters .inp, .filters .btn { width: 100%; min-width: 0; justify-content: center; }
  .filters .wide { grid-column: 1 / -1; min-width: 0; }
  .filters .switch { grid-column: 1 / -1; }
  .bfilters.open { grid-template-columns: 1fr; }
  .list-card { padding: 4px 12px; }
  .tx-tbl thead { display: none; }
  .tx-tbl td { padding: 7px 4px; }
  .tx-tbl td:first-child { padding-left: 0; }
  .tx-tbl td:last-child { padding-right: 0; }
  .tx-tbl td .meta { display: flex; flex-wrap: wrap; gap: 0 4px; align-items: center; }
  .tx-tbl .desc { font-size: 14px; line-height: 1.3; }
  .hrow { grid-template-columns: minmax(0, 120px) 1fr auto; }
  .rv { grid-template-columns: 1fr; gap: 8px; }
  .g3.g8 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g8 .stat .v { font-size: 17px; }
  .g8 .label { font-size: 10px; letter-spacing: .3px; }
  .role-sel { max-width: 96px; }
  .split-row { grid-template-columns: 1fr 100px 46px; }
  .drawer { padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .pop-bg { background: rgba(20, 10, 18, .35); }
  .pop { top: auto; left: 0; right: 0; bottom: 0; width: 100%; border-radius: 18px 18px 0 0; padding: 12px max(12px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); max-height: 80vh; }
  .cc-list { grid-template-columns: 1fr; }
  .toast { bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }
}

/* Podkategórie v Nastaveniach (stredisko › kategória › podkategória) */
.sub-row { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 6px 26px; }
.sub-row .chip { gap: 4px; }
.sub-row .linkish { font-size: 12px; padding: 0 2px; }
.sub-add { flex-wrap: wrap; }
.sub-add select.inp { flex: 1 1 100%; }
.sub-add input.inp { flex: 1 1 0; }
/* rozdelenie medzi projekty: bodka zostane pri názve aj pri dlhom názve projektu */
.split-row > .row { flex-wrap: nowrap; align-items: flex-start; }
.split-row > .row .dot { flex: none; margin-top: 5px; }

/* Vysvetlivky pod „i“ – text sa otvorí v okne, nezaberá miesto na obrazovke */
.ib { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; margin-left: 6px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--muted); font: italic 700 12px/1 Georgia, "Times New Roman", serif; cursor: pointer; vertical-align: middle; flex: none; position: relative; text-transform: none; letter-spacing: 0; }
.ib::before { content: ""; position: absolute; inset: -6px; }
.ib:hover, .ib:focus-visible { color: var(--accent); border-color: var(--accent); }
.ib:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#ibox .ibox-bg { position: fixed; inset: 0; background: rgba(20, 10, 18, .45); z-index: 60; }
#ibox .ibox { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 64px); overflow-y: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); display: grid; gap: 12px; }
#ibox h3 { margin: 0; font-size: 17px; }
#ibox .ibox-x { font-size: 14px; line-height: 1.55; }
#ibox .ibox-x p { margin: 0 0 8px; }
#ibox .ibox-x p:last-child { margin-bottom: 0; }
