/* Pénzügyi Irányítópult – „sötét vezérlőpult”: hűvös fekete alap, fényerő-lépcsős felületek (tasteskill true-black-flat
   alapon), de a felhasználó kérésére színes: az üzletágak élénk saját színe az adatokon, elektromos kék kiemelőszín a
   felső menün, az elsődleges gombon és a kiválasztott elemeken; zöld/piros eredményjelzés. A világos téma megmaradt. */

:root {
  --bg: 242 244 247;      /* #f2f4f7 – a főkönyv kékesszürke alapja */
  --card: 255 255 255;    /* lapok */
  --card2: 238 238 238;   /* #eeeeee – emelt felület, aktív menüpont */
  --line: 230 230 230;    /* #e6e6e6 – lapszél */
  --rule-c: 240 240 240;  /* #f0f0f0 – sorvonal */
  --control-c: 212 212 212; /* #d4d4d4 – vezérlők kerete */
  --ink: 10 10 10;        /* #0a0a0a */
  --muted: 107 107 107;   /* #6b6b6b – 4.5:1 fehéren és az alapon is */
  --primary: #1f6fe5; --primary-ink: #ffffff; --accent-rgb: 31 111 229;
  --data: #1f6fe5;        /* kiemelőszín */
  --positive: #26702a; --negative: #c4242a; --warning: #92400e;
  --pill-positive-bg: #dcfae5; --pill-positive-ink: #04250e;
  --pill-negative-bg: #ffedea; --pill-negative-ink: #831c1e;
  --pill-warning-bg: #fffbeb; --pill-warning-ink: #92400e; --pill-warning-line: #fde68a;
  --pill-neutral-bg: #eeeeee; --pill-neutral-ink: #3d3d3d;
  /* a skill grafikon-segédjének (charts.js) változói */
  --surface: #ffffff; --raised: #eeeeee; --rule: #f0f0f0; --grid: #e5e5e5; --axis-ink: #6b6b6b; --text: #0a0a0a;
  --chart-1: #1d5fbf; --chart-2: #8a8a8a; --chart-3: #141414; --chart-muted: #c8c8c8; --chart-mark: #0a0a0a; --chart-span: .06;
  --radius-card: 8px; --radius-control: 6px;
  --font: "Geist", Inter, system-ui, sans-serif; --mono: "Geist Mono", ui-monospace, monospace;
}
.dark {
  /* hűvös fekete (#0b0c0f), lapok egy fényerő-lépcsővel feljebb – nem navy, nem pala */
  --bg: 13 14 16; --card: 21 22 25; --card2: 31 33 37; --line: 39 41 46; --rule-c: 30 32 36; --control-c: 60 63 70;
  --ink: 236 237 240; --muted: 150 154 163;
  /* elsődleges gomb: fehér, sötét felirattal; kiemelőszín: egy visszafogott kék, csak ahol jelent valamit */
  --primary: #eceef2; --primary-ink: #0b0c0f; --accent-rgb: 138 166 230;
  --data: #7c9fe8;
  --positive: #5cb88a; --negative: #e5707a; --warning: #d9a35b;
  --pill-positive-bg: #172520; --pill-positive-ink: #7fc9a3; --pill-negative-bg: #2a1a1d; --pill-negative-ink: #ef9aa1;
  --pill-warning-bg: #2a2318; --pill-warning-ink: #e0b27a; --pill-warning-line: #4a3c27; --pill-neutral-bg: #23262e; --pill-neutral-ink: #d6d9e0;
  --surface: #14161b; --raised: #20232a; --rule: #1d1f25; --grid: #262931; --axis-ink: #989eab; --text: #f0f2f6;
  --chart-1: #7c9fe8; --chart-2: #6b6f78; --chart-3: #eceef2; --chart-muted: #3a3d44; --chart-mark: #d9a35b; --chart-span: .12;
}

body { font-family: var(--font); font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
::selection { background: rgb(var(--ink) / .14); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgb(var(--line)); border-radius: 3px; }
input, select { color-scheme: light; }
.dark input, .dark select { color-scheme: dark; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* jó / rossz irány, adat, link */
.text-pos { color: var(--positive); } .text-neg { color: var(--negative); } .text-data { color: var(--data); }
.link { color: rgb(var(--accent-rgb)); text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pill-pos { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill-neg { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill-warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); box-shadow: inset 0 0 0 1px var(--pill-warning-line); }
.pill-neutral { background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); }

/* Panelek, gombok – keret vagy tónuslépcső, árnyék nyugalmi elemen nincs */
.panel { background: rgb(var(--card)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-card); }
.dark .panel { border-color: rgb(var(--line) / .7); }
:root { --radius-card: 10px; }
.panel.float, .float { box-shadow: 0 8px 28px rgb(0 0 0 / .12); }
.btn { height: 36px; padding: 0 12px; border-radius: var(--radius-control); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px;
       border: 1px solid rgb(var(--control-c)); background: rgb(var(--card)); color: rgb(var(--ink)); transition: background .12s, border-color .12s; white-space: nowrap; }
.btn:hover { background: rgb(var(--card2)); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary); filter: brightness(1.1); }
.btn-ghost { border-color: transparent; background: transparent; }
.icon-btn { height: 32px; width: 32px; border-radius: var(--radius-control); color: rgb(var(--muted)); display: inline-grid; place-items: center; }
.icon-btn:hover { background: rgb(var(--card2)); color: rgb(var(--ink)); }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius-card); font-size: 14px;
          background: rgb(var(--card)); border: 1px solid rgb(var(--line)); color: rgb(var(--ink)); }
.notice i { color: rgb(var(--muted)); margin-top: 3px; }
.notice.warn { background: var(--pill-warning-bg); border-color: var(--pill-warning-line); color: var(--pill-warning-ink); }
.notice.warn i { color: var(--pill-warning-ink); }

.seg { display: inline-flex; padding: 2px; border-radius: var(--radius-control); background: rgb(var(--card2)); font-size: 13px; font-weight: 500; }
.seg button { padding: 3px 11px; border-radius: 5px; color: rgb(var(--muted)); border: 1px solid transparent; }
.seg button.on { background: rgb(var(--card)); color: rgb(var(--ink)); border-color: rgb(var(--line)); }
.seg-lg { display: flex; padding: 3px; }
.seg-lg button { flex: 1; height: 38px; padding: 0 8px; border-radius: 7px; }

/* választó csempék és címkék (pl. rendszeres kiadás: költséghely, kategória) */
.pick { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; min-height: 76px; text-align: left;
        border: 1px solid rgb(var(--line)); border-radius: var(--radius-card); background: rgb(var(--card)); color: rgb(var(--muted));
        transition: border-color .15s, background .15s, color .15s, box-shadow .15s; }
.pick:hover { border-color: rgb(var(--muted) / .5); color: rgb(var(--ink)); }
.pick.on { border-color: rgb(var(--ink)); color: rgb(var(--ink)); background: rgb(var(--card2)); box-shadow: 0 0 0 1px rgb(var(--ink)); }
.pick-ico { display: grid; place-items: center; height: 28px; width: 28px; border-radius: 8px; font-size: 12px; color: #fff; background: var(--c); }
.pick-l { font-size: 13px; font-weight: 500; line-height: 1.25; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
        border: 1px solid rgb(var(--line)); background: rgb(var(--card)); color: rgb(var(--muted)); transition: border-color .15s, background .15s, color .15s; }
.chip i { font-size: 11px; }
.chip:hover { color: rgb(var(--ink)); }
.chip.on { border-color: rgb(var(--ink)); background: rgb(var(--ink)); color: rgb(var(--bg)); }

/* Keret: kiemelt felső menü két sorban, oldalsáv nélkül */
.topnav { background: rgb(var(--bg)); border-bottom: 1px solid rgb(var(--line)); }
.topnav-row1 { max-width: 1440px; margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 16px; }
.topnav-row2 { max-width: 1440px; margin: 0 auto; min-height: 48px; display: flex; align-items: center; gap: 16px; padding: 0 16px; }
@media (min-width: 640px) { .topnav-row1, .topnav-row2 { padding: 0 24px; } }
@media (min-width: 1024px) { .topnav-row1, .topnav-row2 { padding: 0 32px; } }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { flex: none; color: rgb(var(--ink)); }
.areas { display: flex; align-items: stretch; gap: 4px; height: 100%; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.areas::-webkit-scrollbar { display: none; }
.area { position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 0 14px; margin: 12px 0; border-radius: 10px; font-size: 15px; font-weight: 500;
        color: rgb(var(--muted)); white-space: nowrap; transition: color .15s, background .15s; }
.area i { font-size: 15px; }
.area:hover { color: rgb(var(--ink)); background: rgb(var(--ink) / .05); }
.area.active { color: rgb(var(--ink)); background: rgb(var(--accent-rgb) / .16); }
.area.active i { color: rgb(var(--accent-rgb)); }
.area.active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -13px; height: 2px; border-radius: 2px; background: rgb(var(--accent-rgb)); box-shadow: 0 0 12px rgb(var(--accent-rgb) / .8); }
.area:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.icon-btn.is-on { color: var(--primary); background: rgb(var(--accent-rgb) / .14); }
.month-switch { display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 2px; border: 1px solid rgb(var(--control-c)); border-radius: var(--radius-control); background: rgb(var(--card)); }
.month-switch .icon-btn { height: 28px; width: 28px; }
#month-label.is-past { color: rgb(var(--accent-rgb)); }
.search-inp { height: 34px; min-height: 34px; padding: 0 64px 0 32px !important; font-size: 14px; }
.kbd { font-size: 11px; color: rgb(var(--muted)); border: 1px solid rgb(var(--line)); border-radius: 4px; padding: 1px 5px; line-height: 16px; }
#page { margin: 0 auto; }
.nav-label { padding: 20px 12px 6px; font-size: 12px; font-weight: 400; color: rgb(var(--muted)); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px; border-radius: var(--radius-control); font-size: 14px; font-weight: 400; color: rgb(var(--ink) / .78); }
.nav-item i { color: rgb(var(--muted)); font-size: 14px; }
.nav-item:hover { background: rgb(var(--ink) / .05); color: rgb(var(--ink)); }
.nav-item.active { background: rgb(var(--card2)); color: rgb(var(--ink)); font-weight: 500; }
.nav-item.active i { color: rgb(var(--ink)); }
.dark .nav-item.active { background: rgb(var(--card2)); }
.nav-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
            white-space: nowrap; color: rgb(var(--muted)); }
.nav-pill.active { color: rgb(var(--ink)); background: rgb(var(--accent-rgb) / .16); }

/* Táblázatok: szabály és igazítás – szürke mondatkezdő fejléc, sáv és zebra nélkül, számok jobbra */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 400; color: rgb(var(--muted)); font-size: 12px; height: 38px;
          padding: 0 12px; border-bottom: 1px solid rgb(var(--line)); white-space: nowrap; }
.tbl td { height: 44px; padding: 6px 12px; border-bottom: 1px solid rgb(var(--rule-c)); vertical-align: middle; }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: rgb(var(--ink) / .025); }
.tbl tr.sel td { background: rgb(var(--card2)); }
.tbl tfoot td { border-top: 1px solid rgb(var(--line)); border-bottom: 0; }
.tbl tr.total td { font-weight: 600; border-top: 1px solid rgb(var(--line)); }

.tbl tr.grp td { background: transparent; font-weight: 600; font-size: 14px; padding-top: 18px; height: 48px; border-bottom: 1px solid rgb(var(--line)); }
.cf-edit { cursor: pointer; }
.cf-edit:hover { background: rgb(var(--card2)) !important; box-shadow: inset 0 0 0 1px rgb(var(--control-c)); }
.pnl.cf tr.italic td:first-child { font-style: italic; }

/* Havi kimutatás */
.pnl { min-width: 1180px; }
.pnl td, .pnl th { padding-left: .55rem; padding-right: .55rem; }
.pnl .sticky-col { position: sticky; left: 0; z-index: 1; background: rgb(var(--card)); min-width: 250px; padding-left: 1.25rem; }
.pnl tr.grp td { background: rgb(var(--card)); font-weight: 600; font-size: 14px; padding-top: 18px; border-bottom: 1px solid rgb(var(--line)); }
.pnl tr.grp .sticky-col { background: rgb(var(--card)); }
.pnl tr.grp.click:hover td { background: rgb(var(--card)); text-decoration: underline; text-underline-offset: 3px; }
.pnl tr.strong td { background: rgb(var(--card2) / .5); }
.pnl tr.strong .sticky-col { background: rgb(var(--card)); }
.pnl .month-h { cursor: pointer; }
@media (max-width: 640px) { .pnl .sticky-col { min-width: 150px; } .tbl th:first-child, .tbl td:first-child { padding-left: 1rem; } }
.pnl .month-h:hover { color: rgb(var(--ink)); }
.pnl th.sel { color: var(--data); box-shadow: inset 0 -2px 0 var(--data); }
.pnl td.sel { background: rgb(var(--ink) / .03); }
.pnl .tot { border-left: 1px solid rgb(var(--line)); font-weight: 600; }
.pnl tbody tr:not(.grp):hover td:not(.sticky-col) { background: rgb(var(--card2) / .5); }

/* Űrlapmezők */
.inp { width: 100%; min-height: 36px; background: rgb(var(--card)); border: 1px solid rgb(var(--control-c)); border-radius: var(--radius-control); padding: 7px 10px; color: rgb(var(--ink)); font-size: 14px; }
.inp::placeholder { color: rgb(var(--muted)); }
.inp:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .2); }
fieldset[disabled] { display: none; }

.chev { transition: transform .2s ease; }
.is-open .chev { transform: rotate(180deg); }

/* Felhasználók, címkék */
.avatar { display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 999px; color: #fff; font-weight: 600; box-shadow: 0 0 0 2px rgb(var(--card)); line-height: 1; }
.lchip { display: inline-flex; align-items: center; padding: .15rem .5rem; border-radius: .35rem; font-size: 11px; font-weight: 600; color: #fff; white-space: nowrap; }
.lchip.sm { padding: 0; height: .4rem; width: 2.25rem; border-radius: 999px; }
.lchip.off { opacity: .35; }
.lchip.off:hover { opacity: .7; }

/* Kanban */
.kboard { display: flex; gap: .75rem; align-items: flex-start; overflow-x: auto; padding-bottom: 1rem; min-height: 60vh; scroll-snap-type: x proximity; }
.kcol { flex: 0 0 18rem; max-width: 85vw; background: rgb(var(--card2) / .7); border-radius: .75rem; display: flex; flex-direction: column; max-height: calc(100vh - 15rem); scroll-snap-align: start; }
.kcol-head { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem .5rem; cursor: grab; }
.kcards { flex: 1; overflow-y: auto; padding: 0 .5rem .25rem; min-height: 2.5rem; display: flex; flex-direction: column; gap: .45rem; }
.kcard { background: rgb(var(--card)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-card); padding: .6rem .75rem; cursor: pointer; transition: border-color .15s; }
.kcard:hover { border-color: rgb(var(--control-c)); }
.kcard.done { opacity: .7; }
.kghost { opacity: .35; }
.kdrag { transform: rotate(2deg); }
.kadd { width: 100%; background: transparent; border-radius: .5rem; padding: .45rem .6rem; font-size: .8rem; color: rgb(var(--ink)); }
.kadd::placeholder { color: rgb(var(--muted)); }
.kadd:focus { outline: none; background: rgb(var(--card)); box-shadow: 0 0 0 1px rgb(var(--ink)); }

/* Naptár */
.cal-day { min-height: 6.5rem; background: rgb(var(--card2) / .45); border-radius: .5rem; padding: .35rem; display: flex; flex-direction: column; gap: .2rem; }
.cal-day.out { opacity: .45; }
.cal-day.today { box-shadow: inset 0 0 0 1px var(--data); }
.cal-add { opacity: 0; }
.cal-day:hover .cal-add { opacity: 1; }
.cal-card { text-align: left; font-size: 11px; line-height: 1.25; padding: .2rem .35rem; border-radius: .3rem; background: rgb(var(--card)); border-left: 3px solid; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-card:hover { background: rgb(var(--line)); }
@media (max-width: 640px) { .cal-day { min-height: 4rem; } .cal-card { font-size: 0; height: .35rem; padding: 0; } }

/* Idővonal (Gantt) */
.gt { font-size: 12px; }
.gt-head { display: flex; height: 1.75rem; border-bottom: 1px solid rgb(var(--line)); }
.gt-title { width: 260px; flex-shrink: 0; display: flex; align-items: center; gap: .5rem; padding: 0 .75rem 0 1.25rem; border-right: 1px solid rgb(var(--line)); }
.gt-group { display: flex; height: 1.9rem; }
.gt-label { width: 260px; flex-shrink: 0; display: flex; align-items: center; gap: .5rem; padding: 0 .75rem 0 1.25rem; font-size: 11px; border-right: 1px solid rgb(var(--line)); }
.gt-group > div:last-child { background: rgb(var(--card2) / .5); }
.gt-row { display: flex; height: 1.9rem; cursor: pointer; }
.gt-row:hover .gt-title, .gt-row:hover > div:last-child { background: rgb(var(--card2) / .6); }
.gt-bar { position: absolute; top: .45rem; height: 1rem; border-radius: .3rem; }
.gt-ms { position: absolute; top: .5rem; width: .85rem; height: .85rem; transform: rotate(45deg); border-radius: 2px; }
.gt-now { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--data); }

/* Claude válasz */
.md h4 { font-weight: 600; margin: .9rem 0 .35rem; }
.md p { margin: .35rem 0; }
.md ul, .md ol { margin: .35rem 0 .35rem 1.25rem; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md li { margin: .15rem 0; }
.md code { font-size: .85em; background: rgb(var(--card2)); padding: 0 .25rem; border-radius: .25rem; }

/* Költségvetés */
.bud-inp { width: 7.5rem; text-align: right; background: transparent; border: 1px solid transparent; border-radius: .35rem; padding: .2rem .4rem; color: rgb(var(--ink)); }
.bud-inp:hover { border-color: rgb(var(--line)); }
.bud-inp:focus { outline: none; border-color: rgb(var(--ink)); background: rgb(var(--bg)); }
.bud-inp::placeholder { color: rgb(var(--muted) / .6); }
.bud-sel { border-radius: .35rem; padding: .15rem .3rem; font-size: 11px; font-weight: 500; border: 0; }
.bud tr.bud-empty td { color: rgb(var(--muted)); }
.bud tr.bud-group td { background: rgb(var(--card2) / .35); font-size: 12px; padding-left: 2rem; }
.bud tr.bud-node td { background: rgb(var(--card2) / .3); }
.bud tr.bud-node:hover td { background: rgb(var(--card2) / .6); }

/* klub rendezvény: jegy-megállapodás gombok és lenyitható részek */
.deal-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: .5rem .65rem; border: 1px solid rgb(var(--line)); border-radius: .6rem; text-align: left; }
.deal-btn span { color: rgb(var(--muted)); font-size: 11px; }
.deal-btn:hover { background: rgb(var(--card2)); }
.deal-btn.on { border-color: rgb(var(--ink)); outline: 1px solid rgb(var(--ink)); outline-offset: -2px; }
details.fold { background: rgb(var(--bg) / .5); border: 1px solid rgb(var(--line)); border-radius: .75rem; }
details.fold > summary { list-style: none; cursor: pointer; padding: .85rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .chev { transition: transform .15s; color: rgb(var(--muted)); }
details.fold[open] > summary .chev { transform: rotate(180deg); }
details.fold > .fold-body { padding: 0 1rem 1rem; }
.fold-title { font-size: 12px; font-weight: 500; color: rgb(var(--muted)); }

/* stand ív / vételezési ív – telefonra: nagy érintési felületek, tárcsázó-szerű számbillentyűzet */
.sh-seg { display: flex; gap: 4px; padding: 4px; border-radius: .75rem; background: rgb(var(--card2)); overflow-x: auto; }
.sh-seg button { flex: 1 0 auto; min-height: 44px; padding: 0 14px; border-radius: .55rem; font-size: 14px; font-weight: 600; color: rgb(var(--muted)); white-space: nowrap; }
.sh-seg button { border: 1px solid transparent; }
.sh-seg button.on { background: rgb(var(--card)); color: rgb(var(--ink)); border-color: rgb(var(--line)); }
.sh-seg-2 button { flex: 1 1 0; }
.sh-inp { min-height: 46px; font-size: 16px; }
.sh-list { background: rgb(var(--card)); border: 1px solid rgb(var(--line)); border-radius: .9rem; overflow: hidden; }
.sh-row { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 14px; border-bottom: 1px solid rgb(var(--line)); font-size: 15px; }
.sh-row:last-child { border-bottom: 0; }
.sh-row:active { background: rgb(var(--card2)); }
.sh-val { min-width: 74px; text-align: right; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sh-val.empty { color: rgb(var(--muted)); font-weight: 400; }
.sh-mini { font-size: 12px; padding: 6px 9px; border-radius: .5rem; border: 1px dashed rgb(var(--line)); color: rgb(var(--muted)); white-space: nowrap; }
.sh-big { width: 100%; min-height: 56px; border-radius: .9rem; background: var(--primary); color: var(--primary-ink); font-size: 16px; font-weight: 600; }
.sh-link { color: rgb(var(--ink)); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.np-sheet { width: 100%; max-width: 420px; background: rgb(var(--card)); border: 1px solid rgb(var(--line)); border-radius: 1.2rem 1.2rem 0 0; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgb(0 0 0 / .35); }
@media (min-width: 640px) { .np-sheet { border-radius: 1.2rem; } }
.np-display { margin: 12px 0; padding: 10px 16px; border-radius: .8rem; background: rgb(var(--card2)); text-align: right; font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; min-height: 64px; }
.np-key { min-height: 62px; border-radius: .9rem; background: rgb(var(--card2)); font-size: 26px; font-weight: 600; }
.np-key:active, .np-act:active { transform: scale(.97); filter: brightness(1.15); }
.np-act { min-height: 52px; border-radius: .9rem; border: 1px solid rgb(var(--line)); font-size: 15px; font-weight: 600; }
.np-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

/* jelvény csak teendőnél: a darabszám a sor mellett, a lejárt piros */
.nav-badge { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 500; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav-badge.bad { background: var(--negative); color: #fff; }
.nav-badge.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); box-shadow: inset 0 0 0 1px var(--pill-warning-line); }
.nav-badge.mute { background: rgb(var(--ink) / .07); color: rgb(var(--muted)); }
.nav-pill .nav-badge { margin-left: 2px; }
/* oldalfülek a felső menü 2. sorában; az aktív kiemelőszínű aláhúzás */
.subnav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; min-width: 0; align-self: stretch; }
.subnav::-webkit-scrollbar { display: none; }
.subtab { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 14px; font-weight: 400; color: rgb(var(--muted)); box-shadow: inset 0 -2px 0 transparent; }
.subtab:hover { color: rgb(var(--ink)); }
.subtab.active { color: rgb(var(--ink)); font-weight: 500; box-shadow: inset 0 -2px 0 rgb(var(--accent-rgb)); }
.subtab:focus-visible, .nav-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* ---------- Line Up: idővonal, booking, napi lista */
.lu-year { width: auto; padding-top: .4rem; padding-bottom: .4rem; }
.lu-days { display: flex; flex-wrap: wrap; gap: .375rem; }
.lu-days button { min-height: 2.5rem; padding: 0 .9rem; border-radius: .6rem; border: 1px solid rgb(var(--line)); background: rgb(var(--card)); font-size: .8125rem; font-weight: 600; }
.lu-days button span { font-weight: 400; color: rgb(var(--muted)); margin-left: .25rem; }
.lu-days button.on { background: rgb(var(--ink)); border-color: rgb(var(--ink)); color: rgb(var(--card)); }
.lu-days button.on span { color: rgb(var(--card) / .75); }
.lu-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .75rem 1.25rem; border-bottom: 1px solid rgb(var(--line)); }
.lu-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .75rem; color: rgb(var(--muted)); }
.lu-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.lu-sw { display: inline-block; width: 18px; height: 12px; border-radius: 3px; }
.lu-cosw { background: repeating-linear-gradient(135deg, rgb(var(--muted) / .45) 0 3px, transparent 3px 6px); }
.lu-warnsw { background: rgb(var(--card)); box-shadow: 0 0 0 2px #c2410c; }
.lu-scroll { overflow-x: auto; }
.lu-grid { min-width: 1040px; }
.lu-row { display: flex; border-bottom: 1px solid rgb(var(--line) / .7); }
.lu-row:last-child { border-bottom: 0; }
.lu-head { background: rgb(var(--card2) / .5); }
.lu-stage { width: 150px; flex: none; padding: 0 1rem 0 1.25rem; display: flex; flex-direction: column; justify-content: center; min-height: 4.5rem; }
.lu-head .lu-stage { min-height: 2.1rem; }
.lu-stage b { font-size: .8125rem; font-weight: 600; }
.lu-stage small { font-size: .6875rem; color: rgb(var(--muted)); }
.lu-axis { flex: 1; position: relative; margin-right: 1.5rem; height: 2.1rem; }
.lu-axis span { position: absolute; top: .6rem; transform: translateX(-50%); font-size: .6875rem; font-weight: 500; color: rgb(var(--muted)); white-space: nowrap; }
.lu-axis span:first-child { transform: none; }
.lu-axis span.mid { color: rgb(var(--ink)); font-weight: 700; }
.lu-track { flex: 1; position: relative; height: 4.5rem; margin-right: 1.5rem; background-image: linear-gradient(to right, rgb(var(--line) / .8) 1px, transparent 1px); }
.lu-track.edit { cursor: cell; }
.lu-midnight { position: absolute; top: 0; bottom: 0; width: 2px; background: rgb(var(--muted) / .35); pointer-events: none; }
.lu-co { position: absolute; top: .75rem; bottom: .75rem; border-radius: 0 4px 4px 0; pointer-events: none;
    background: repeating-linear-gradient(135deg, rgb(var(--muted) / .45) 0 3px, transparent 3px 6px); }
.lu-act { position: absolute; top: .5rem; bottom: .5rem; box-sizing: border-box; padding: .3rem .5rem; border-radius: 7px; text-align: left; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center; gap: 1px; cursor: pointer; touch-action: none; user-select: none; z-index: 1; }
.lu-act b, .lu-act span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lu-act b { font-size: .75rem; font-weight: 700; }
.lu-act span { font-size: .6875rem; opacity: .85; }
.lu-grip { position: absolute; top: 0; right: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.lu-act:hover .lu-grip { background: rgb(0 0 0 / .12); }
.lu-ok { background: #f2b632; border: 1px solid #d99a0b; color: #2b1d00; }
.lu-opt { background: rgb(237 161 0 / .16); border: 1.5px dashed #c98500; color: rgb(var(--ink)); }
.lu-neg { background: rgb(var(--card)); border: 1.5px dashed rgb(var(--muted) / .8); color: rgb(var(--ink)); }
.lu-act.lu-warn { box-shadow: 0 0 0 2px #c2410c; }
.lu-act.lu-sel { box-shadow: 0 0 0 2px rgb(var(--ink)); z-index: 2; }
.lu-pill { padding: .3rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.lu-alert { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .9rem; border-radius: 10px; font-size: .8125rem;
    background: rgb(251 146 60 / .1); border: 1px solid rgb(251 146 60 / .55); color: #9a3412; }
.dark .lu-alert { color: rgb(253 186 116); }
.lu-alert > i { margin-top: .2rem; }
.lu-checkrow { width: 100%; min-height: 2.75rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .75rem;
    border-radius: 10px; border: 1px solid rgb(var(--line)); text-align: left; }
.lu-checkrow:hover, .lu-checkrow.on { background: rgb(var(--card2)); }
.lu-checkrow span { display: flex; flex-direction: column; min-width: 0; }
.lu-checkrow b { font-size: .8125rem; font-weight: 600; }
.lu-checkrow small { font-size: .75rem; color: rgb(var(--muted)); }
.lu-checkrow em { font-style: normal; font-size: .75rem; font-weight: 600; color: #c2410c; white-space: nowrap; }
.lu-stpick { display: flex; gap: .375rem; }
.lu-stpick button { flex: 1; min-height: 2.5rem; border-radius: .6rem; font-size: .75rem; opacity: .6; }
.lu-stpick button.on { opacity: 1; font-weight: 700; outline: 2px solid rgb(var(--ink)); outline-offset: 1px; }
.lu-li { width: 100%; display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid rgb(var(--line) / .7); text-align: left; }
.lu-li:last-child { border-bottom: 0; }
.lu-li:hover { background: rgb(var(--card2) / .6); }
.lu-li > b { width: 3rem; flex: none; font-size: .875rem; }
.lu-li > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lu-li strong { font-size: .875rem; font-weight: 600; }
.lu-li small { font-size: .75rem; color: rgb(var(--muted)); }
.lu-board { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 768px) { .lu-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .lu-board { grid-template-columns: 1.6fr 1fr 1fr 1.1fr; } }
.lu-count { padding: .1rem .55rem; border-radius: 999px; background: rgb(var(--card2)); font-size: .75rem; font-weight: 600; color: rgb(var(--muted)); }
.lu-card { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .6rem; border-radius: 8px;
    border: 1px solid rgb(var(--line)); background: rgb(var(--card2) / .4); text-align: left; }
.lu-card b { display: block; font-size: .75rem; font-weight: 600; }
.lu-card small { font-size: .6875rem; color: rgb(var(--muted)); }
.lu-card-acts { display: flex; gap: .25rem; flex: none; }
.lu-card-acts .icon-btn { height: 1.75rem; width: 1.75rem; }
.lu-c-ok { background: rgb(242 182 50 / .16); border-color: rgb(217 154 11 / .45); }
.lu-c-opt, .lu-c-neg { border-style: dashed; }
.lu-gon { outline: 2px solid #c98500; }
.lu-chip { padding: .3rem .55rem; border-radius: 7px; border: 1px solid rgb(var(--line)); background: rgb(var(--card2) / .5); font-size: .75rem; white-space: nowrap; }
button.lu-chip:hover { border-color: #c98500; background: rgb(237 161 0 / .12); }

/* ---------- Fellépői szerződések */
.badge { display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: 999px; font-size: .6875rem; font-weight: 600; white-space: nowrap; }
.ct-steps { list-style: none; margin: 0; padding: .85rem 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; background: rgb(var(--card)); border: 1px solid rgb(var(--line)); border-radius: 12px; }
.ct-steps li { display: flex; align-items: center; gap: .6rem; }
.ct-steps i { width: 1.75rem; height: 1.75rem; flex: none; border-radius: 999px; display: grid; place-items: center; font-style: normal; font-size: .75rem; font-weight: 700; border: 1px dashed rgb(var(--muted) / .7); color: rgb(var(--muted)); }
.ct-steps li.done i { background: rgb(var(--ink)); border: 1px solid rgb(var(--ink)); color: rgb(var(--card)); }
.ct-steps li.now i { background: #f2b632; border: 1px solid #d99a0b; color: #2b1d00; }
.ct-steps span { display: flex; flex-direction: column; }
.ct-steps b { font-size: .8125rem; font-weight: 600; }
.ct-steps small { font-size: .6875rem; color: rgb(var(--muted)); }
.ct-gh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem 1.1rem; border-bottom: 1px solid rgb(var(--line) / .7); }
.ct-gh h2 { font-size: .875rem; font-weight: 600; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ct-kv { padding: .65rem 1.1rem; border-bottom: 1px solid rgb(var(--line) / .5); display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ct-kv span { font-size: .75rem; color: rgb(var(--muted)); }
.ct-kv b { font-size: .8125rem; font-weight: 500; overflow-wrap: anywhere; }
.ct-flow { display: flex; gap: .65rem; align-items: flex-start; padding: .55rem .7rem; border-radius: 10px; border: 1px solid rgb(var(--line) / .7); background: rgb(var(--card2) / .4); }
.ct-flow > i { margin-top: .2rem; font-size: .7rem; color: rgb(var(--muted) / .6); }
.ct-flow.ok > i { color: #059669; }
.ct-flow span { display: flex; flex-direction: column; min-width: 0; }
.ct-flow b { font-size: .8125rem; }
.ct-flow small { font-size: .75rem; color: rgb(var(--muted)); }
.ct-ob { display: grid; grid-template-columns: 3.5rem 1fr auto; gap: .6rem; font-size: .75rem; padding: .35rem 0; border-bottom: 1px solid rgb(var(--line) / .5); }
.ct-ob:last-child { border-bottom: 0; }
.ct-ob em { font-style: normal; color: rgb(var(--muted)); }
.ct-sig { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .7rem; border-radius: 10px; border: 1px solid rgb(var(--line)); cursor: pointer; }
.ct-sig.on { border: 2px solid rgb(var(--ink)); }
.ct-sig span { display: flex; flex-direction: column; gap: .15rem; }
.ct-sig small { color: rgb(var(--muted)); line-height: 1.4; }

/* ---------- Teljesítésigazolások */
.tg-tbl td.tg-cell { padding: .4rem .35rem; min-width: 8.5rem; }
.tg-none { display: block; text-align: center; color: rgb(var(--muted) / .7); }
.tg-c { width: 100%; min-height: 3.4rem; padding: .4rem .6rem; border-radius: 9px; text-align: left; display: flex; flex-direction: column; gap: 1px; font-size: .75rem; }
.tg-c b { font-weight: 600; } .tg-c span { color: rgb(var(--muted)); } .tg-c small { font-size: .6875rem; }
.tg-open { border: 1.5px solid rgb(var(--ink)); background: rgb(var(--card)); }
.tg-unsure { border: 1px solid #d97706; background: rgb(245 158 11 / .1); } .tg-unsure small { color: #b45309; }
.dark .tg-unsure small { color: #fbbf24; }
.tg-sent { border: 1px solid #60a5fa; background: rgb(96 165 250 / .18); }
.tg-signed { border: 1px solid rgb(var(--ink)); background: rgb(var(--ink)); color: rgb(var(--card)); } .tg-signed span { color: rgb(var(--card) / .75); }
.tg-c:hover { filter: brightness(.97); }
.tg-sw-open { border: 1.5px solid rgb(var(--ink)); } .tg-sw-unsure { background: rgb(245 158 11 / .25); border: 1px solid #d97706; } .tg-sw-sent { background: #93c5fd; } .tg-sw-signed { background: rgb(var(--ink)); }
.tg-row { width: 100%; display: grid; grid-template-columns: 1.5rem 5.5rem minmax(0, 1fr) 7.5rem 7rem; gap: .75rem; align-items: center; padding: .65rem 1.25rem; border-bottom: 1px solid rgb(var(--line) / .6); text-align: left; font-size: .8125rem; }
.tg-row:hover { background: rgb(var(--card2) / .5); }
.tg-row.off { opacity: .5; }
.tg-row > span:nth-child(3) { display: flex; flex-direction: column; }
.tg-row strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-row small { font-size: .75rem; color: rgb(var(--muted)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-box { width: 1.25rem; height: 1.25rem; border-radius: 6px; border: 1px solid rgb(var(--muted)); display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.tg-row:not(.off) .tg-box { background: rgb(var(--ink)); border-color: rgb(var(--ink)); color: rgb(var(--card)); }
/* TIG-készítő: a készítés gomb a ragadó felső sávban, görgetés közben is látszik */
.tg-bar { position: sticky; top: 60px; z-index: 20; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem;
  margin: 0 -.25rem; padding: .75rem .25rem; background: rgb(var(--bg) / .96); backdrop-filter: blur(6px); border-bottom: 1px solid rgb(var(--line)); }
@media (max-width: 639px) { .tg-bar { position: static; } }
.tg-grp { width: 100%; display: flex; align-items: center; gap: .75rem; padding: .55rem 1.25rem; background: rgb(var(--card2) / .55); border-bottom: 1px solid rgb(var(--line) / .6); text-align: left; font-size: .8125rem; }
.tg-grp:hover { background: rgb(var(--card2) / .9); }
.tg-box.on, .tg-grp .tg-box.on { background: rgb(var(--ink)); border-color: rgb(var(--ink)); color: rgb(var(--card)); }
.rt-item .tg-box { flex: none; }
.tg-grp .tg-box.some { border-color: rgb(var(--ink)); }

/* Levelezés */
.ml-filter{height:2.25rem;padding:0 .8rem;border-radius:999px;border:1px solid rgb(var(--line));background:rgb(var(--card));font-size:13px;font-weight:500;color:rgb(var(--ink))}
.ml-filter span{opacity:.6;margin-left:.2rem}
.ml-filter.on{background:rgb(var(--ink));color:rgb(var(--card));border-color:rgb(var(--ink))}
.ml-row{display:flex;flex-direction:column;gap:.3rem;width:100%;text-align:left;padding:.75rem 1rem .75rem 1.1rem;border-bottom:1px solid rgb(var(--line));position:relative}
.ml-row:hover{background:rgb(var(--card2))}
.ml-row.sel{background:rgb(var(--card2))}
.ml-row.sel::before{content:'';position:absolute;left:0;top:.5rem;bottom:.5rem;width:3px;border-radius:2px;background:rgb(var(--ink))}
.ml-chip{font-size:11px;font-weight:500;padding:.1rem .45rem;border-radius:.4rem;color:var(--c);background:color-mix(in srgb,var(--c) 12%,transparent);white-space:nowrap;max-width:16rem;overflow:hidden;text-overflow:ellipsis}
.dark .ml-chip{color:color-mix(in srgb,var(--c) 45%,white)}
.ml-links{background:rgb(var(--card2) / .5);border:1px solid rgb(var(--line))}
.ml-link{font-size:13px;padding:.35rem .65rem;border-radius:.5rem;background:rgb(var(--card));border:1px solid rgb(var(--control-c))}
.ml-link:hover{border-color:rgb(var(--ink))}
.ml-file{display:inline-flex;align-items:center;gap:.4rem;font-size:12px;padding:.3rem .55rem;border-radius:.5rem;border:1px solid rgb(var(--line))}
.ml-file button{opacity:.6}.ml-file button:hover{opacity:1}

/* ---------- Áttekintés (achromatic ledger: mutatók mint a grafikon fülei, párosított lapok közös alsó éllel) */
.unit { font-size: 13px; font-weight: 400; color: rgb(var(--muted)); margin-left: 4px; letter-spacing: 0; }
.ov-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid rgb(var(--line)); }
.ov-tab { text-align: left; padding: 18px 20px 16px; border-right: 1px solid rgb(var(--line)); box-shadow: inset 0 -2px 0 transparent; }
.ov-tab:last-child { border-right: 0; }
button.ov-tab:hover { background: rgb(var(--ink) / .02); }
.ov-tab.on { box-shadow: inset 0 -2px 0 var(--primary); background: rgb(var(--accent-rgb) / .06); }
.ov-lead { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.01em; }
.ov-sib { font-size: 22px; line-height: 36px; font-weight: 400; }
.ov-fezen { background: rgb(var(--bg) / .45); }
.tbl td.td-sub { padding-left: 36px; }
.tbl tr.grp-sub td { height: 36px; padding-top: 14px; font-size: 12px; color: rgb(var(--muted)); border-bottom: 1px solid rgb(var(--line)); }
.tbl tr.is-past td:nth-child(2) > span:first-child { color: rgb(var(--muted)); }
.ov-cmp td { height: 36px; } .ov-cmp th { height: 34px; }
.ov-pair { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 1100px) { .ov-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ov-card { display: flex; flex-direction: column; }
.ov-card > .panel-body { flex: 1; }
.ov-row { width: 100%; display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 12px 20px; font-size: 14px; border-top: 1px solid rgb(var(--rule-c)); }
.ov-row:first-child { border-top: 0; }
.ov-row:hover { background: rgb(var(--ink) / .025); }
.ov-mark { flex: none; width: 6px; height: 6px; margin-top: 7px; border-radius: 999px; background: rgb(var(--control-c)); }
.ov-row.items-center .ov-mark { margin-top: 0; }
.ov-mark.is-neg { background: var(--negative); } .ov-mark.is-warn { background: #c27c0e; }
.ov-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 19px; }
.empty-box { margin: 4px 0; padding: 12px 14px; border: 1px dashed rgb(var(--control-c)); border-radius: var(--radius-card); }
@media (max-width: 760px) {
  .ov-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-tab { border-right: 0; border-bottom: 1px solid rgb(var(--line)); box-shadow: none; padding: 14px 16px; }
  .ov-tab:nth-child(odd) { border-right: 1px solid rgb(var(--line)); }
  .ov-tab.on { background: rgb(var(--card2)); }
  .ov-lead { font-size: 24px; } .ov-sib { font-size: 18px; }
}

.demo-bar { background: var(--pill-warning-bg); color: var(--pill-warning-ink); border-bottom: 1px solid var(--pill-warning-line); }

/* telefon és kis tablet: a területek saját, görgethető sorban; az oldalfülek és a hónap külön sorban */
@media (max-width: 767px) {
  .topnav-row1 { flex-wrap: wrap; height: auto; padding-top: 10px; row-gap: 0; }
  .topnav-row1 .areas { order: 3; width: 100%; height: 48px; }
  .area { margin: 6px 0; padding: 0 12px; font-size: 14px; }
  .area.active::after { bottom: -7px; }
  .topnav-row2 { flex-wrap: wrap; padding-top: 8px; row-gap: 0; }
  .topnav-row2 > .ml-auto { order: 1; width: 100%; margin-left: 0; }
  .topnav-row2 .month-switch { width: 100%; justify-content: space-between; }
  .topnav-row2 .subnav { order: 2; width: 100%; height: 44px; }
}

/* ---------- Oldalsó fa-menü (visszajelzés 1.): keretes főmenüpontok, alapból is elkülönülő, behúzott almenük */
.side { width: 264px; flex: none; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden;
        background: rgb(var(--bg)); border-right: 1px solid rgb(var(--line)); }
.tree { flex: 1; overflow-y: auto; padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.tree-label { padding: 14px 6px 2px; font-size: 12px; color: rgb(var(--muted)); }
.tree-main { display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 8px 0 12px; border-radius: 10px; font-size: 14.5px; font-weight: 500;
             color: rgb(var(--ink) / .86); border: 1px solid rgb(var(--line)); background: rgb(var(--card) / .55); transition: border-color .15s, background .15s; }
.tree-main > i { width: 18px; text-align: center; font-size: 15px; color: rgb(var(--muted)); }
.tree-main:hover { border-color: rgb(var(--control-c)); background: rgb(var(--card)); color: rgb(var(--ink)); }
.tree-main.active { border-color: rgb(var(--accent-rgb) / .55); background: rgb(var(--accent-rgb) / .12); color: rgb(var(--ink)); }
.tree-main.active > i { color: rgb(var(--accent-rgb)); }
.tree-chev { height: 26px; width: 26px; display: grid; place-items: center; border-radius: 6px; color: rgb(var(--muted)); font-size: 11px; }
.tree-chev:hover { background: rgb(var(--ink) / .06); color: rgb(var(--ink)); }
.tree-chev i { transition: transform .15s; } .tree-chev:not(.open) i { transform: rotate(-90deg); }
/* almenük: behúzás, finom háttér és bal oldali vezetővonal – nem csak kijelöléskor */
/* sima lenyitás: a burok sor-magassága 0fr → 1fr között animál, a tartalom közben beúszik */
.tree-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s cubic-bezier(.2, .8, .2, 1); }
.tree-group.open .tree-wrap { grid-template-rows: 1fr; }
.tree-in { overflow: hidden; min-height: 0; }
.tree-subs { margin: 4px 0 2px 14px; padding: 4px 4px 4px 0; border-left: 2px solid rgb(var(--line)); background: rgb(var(--card) / .35);
             border-radius: 0 8px 8px 0; display: flex; flex-direction: column; gap: 1px;
             opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .28s cubic-bezier(.2, .8, .2, 1), border-color .2s; }
.tree-group.open .tree-subs { opacity: 1; transform: none; }
.tree-chev i { transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.tree-sub { transition: color .15s, background .15s; }
.tree-sub::before { transition: background .2s, box-shadow .2s; }
.no-anim, .no-anim * { transition: none !important; }
.tree-group.is-cur .tree-subs { border-left-color: rgb(var(--accent-rgb) / .45); }
.tree-sub { position: relative; display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px 0 16px; border-radius: 0 7px 7px 0;
            font-size: 13.5px; color: rgb(var(--muted)); }
.tree-sub::before { content: ''; position: absolute; left: -2px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: transparent; }
.tree-sub:hover { color: rgb(var(--ink)); background: rgb(var(--ink) / .04); }
.tree-sub.active { color: rgb(var(--ink)); font-weight: 500; background: rgb(var(--accent-rgb) / .1); }
.tree-sub.active::before { background: rgb(var(--accent-rgb)); box-shadow: 0 0 10px rgb(var(--accent-rgb) / .8); }
.tree-dot { width: 7px; height: 7px; border-radius: 999px; flex: none; }
.tree-main:focus-visible, .tree-sub:focus-visible { outline: 2px solid rgb(var(--accent-rgb)); outline-offset: -2px; }
/* vékony felső sáv */
.topbar { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: rgb(var(--bg)); border-bottom: 1px solid rgb(var(--line)); }
@media (min-width: 1024px) { .topbar { padding: 0 32px; } }
/* telefon / tablet: a menü lenyíló oldalpanel */
.side-scrim { display: none; }
@media (max-width: 1023px) {
  .side { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s ease; visibility: hidden; }
  body.side-open .side { transform: none; visibility: visible; box-shadow: 0 0 40px rgb(0 0 0 / .5); }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgb(0 0 0 / .5); }
  .topbar .month-switch { height: 32px; }
}
@media (max-width: 480px) { .topbar #header-new { display: none; } .topbar .btn-primary { padding: 0 10px; } }

/* ---------- Kuka a feladattáblán (visszajelzés 2.): mindig látszik, húzás közben kiemelkedik */
.kbin { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 10px;
        border: 1px dashed rgb(var(--control-c)); background: rgb(var(--card)); color: rgb(var(--muted)); font-size: 20px; transition: all .18s ease; overflow: hidden; }
.kbin .kbin-text { display: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.kbin-drop { position: absolute; inset: 0; }
.kbin-drop .kcard, .kbin-drop .kghost { opacity: 0; height: 100%; }
body.card-dragging .kbin { width: 260px; height: 76px; border: 2px dashed var(--negative); color: var(--negative); background: rgb(var(--card)); box-shadow: 0 10px 30px rgb(0 0 0 / .35); }
body.card-dragging .kbin .kbin-text { display: inline; }
body.card-dragging .kbin:has(.kghost) { background: var(--negative); color: #fff; border-style: solid; transform: scale(1.05); }
.toast-act { margin-left: 14px; font-weight: 600; color: rgb(var(--accent-rgb)); text-decoration: underline; text-underline-offset: 3px; }
#toast { display: flex; align-items: center; }
#toast.hidden { display: none; }

/* ---------- Rendszertérkép (visszajelzés 3.) */
.sys-wrap { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1200px) { .sys-wrap { grid-template-columns: minmax(0, 1fr) 320px; } }
.sys-canvas { padding: 8px; }
.sys-scroll { overflow-x: auto; }
.sys-side { position: sticky; top: 76px; }
.sys-head { font-size: 12px; fill: rgb(var(--muted)); }
.sys-node { cursor: pointer; }
.sys-node rect:first-child { fill: rgb(var(--card2)); stroke: rgb(var(--line)); stroke-width: 1; transition: stroke .15s, fill .15s; }
.sys-node text { font-size: 13px; fill: rgb(var(--ink)); }
.sys-node:hover rect:first-child, .sys-node:focus rect:first-child { stroke: rgb(var(--accent-rgb) / .7); outline: none; }
.sys-node.on rect:first-child { fill: rgb(var(--accent-rgb) / .2); stroke: rgb(var(--accent-rgb)); stroke-width: 1.5; }
.sys-node.dim { opacity: .3; }
.sys-edge { fill: none; stroke: rgb(var(--muted) / .45); stroke-width: 1.4; transition: opacity .15s; }
.sys-edge.dim { opacity: .12; }
.sys-edge.hot { stroke: rgb(var(--accent-rgb)); stroke-width: 2; }
.sys-arrowhead { fill: rgb(var(--muted) / .6); }

/* ---------- FEZEN Rental: kétpaneles rendezvénynézet (visszajelzés 4.1) */
.rt-board { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
@media (min-width: 1100px) { .rt-board { grid-template-columns: 380px minmax(0, 1fr); min-height: 640px; } }
.rt-list { border-bottom: 1px solid rgb(var(--line)); display: flex; flex-direction: column; min-width: 0; }
@media (min-width: 1100px) { .rt-list { border-bottom: 0; border-right: 1px solid rgb(var(--line)); } }
.rt-scroll { overflow-y: auto; max-height: 560px; }
@media (min-width: 1100px) { .rt-scroll { max-height: none; flex: 1; } }
.rt-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; border-bottom: 1px solid rgb(var(--rule-c)); position: relative; }
.rt-item:hover { background: rgb(var(--ink) / .03); }
.rt-item.on { background: rgb(var(--accent-rgb) / .12); }
.rt-item.on::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: rgb(var(--accent-rgb)); }
.rt-date { width: 78px; flex: none; white-space: nowrap; font-size: 13px; line-height: 18px; color: rgb(var(--muted)); }
.rt-detail { min-width: 0; }
.rt-money { background: rgb(var(--line)); border-radius: 10px; overflow: hidden; }
.rt-money > div { background: rgb(var(--card2) / .6); padding: 14px 16px; }
.rt-tig { padding: 16px; border-radius: 10px; border: 1px solid rgb(var(--accent-rgb) / .35); background: rgb(var(--accent-rgb) / .06); }

/* ---------- Beosztás (visszajelzés 4.2): heti nézet, átvezénylés jelölve */
.sh-week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); overflow-x: auto; }
.sh-day { padding: 12px; border-right: 1px solid rgb(var(--rule-c)); min-height: 180px; }
.sh-day:last-child { border-right: 0; }
.sh-day.is-today { background: rgb(var(--accent-rgb) / .06); }
.sh-card { width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; background: rgb(var(--card2) / .7); border: 1px solid rgb(var(--line)); }
.sh-card:hover { border-color: rgb(var(--control-c)); }
.sh-card.is-in { border-color: rgb(var(--accent-rgb) / .5); }
.sh-card.is-out { opacity: .75; border-style: dashed; }
.sh-tag { display: inline-block; margin-top: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.sh-tag.in { background: rgb(var(--accent-rgb) / .16); color: rgb(var(--accent-rgb)); }
.sh-tag.out { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }

.sh-tag.set { background: rgb(var(--ink) / .08); color: rgb(var(--muted)); margin-left: 4px; }

/* ---------- Mozgás: minden változás sima legyen (oldalváltás, felugró elemek, állapotok) */
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes dlgIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
#page.page-enter { animation: pageIn .26s cubic-bezier(.2, .8, .2, 1); }
#dialog.flex, #modal.flex, #evwin.flex { animation: fadeIn .18s ease; }
#dialog.flex #dialog-content, #modal.flex > div, #evwin.flex #evwin-content { animation: dlgIn .24s cubic-bezier(.2, .8, .2, 1); }
#dialog.closing, #modal.closing { animation: fadeIn .15s ease reverse forwards; }
#dialog.closing #dialog-content, #modal.closing > div { animation: dlgIn .15s ease reverse forwards; }
#popover:not(.hidden) { animation: popIn .18s cubic-bezier(.2, .8, .2, 1); transform-origin: top; }
#popover.closing { animation: popIn .12s ease reverse forwards; }
#toast:not(.hidden) { animation: toastIn .24s cubic-bezier(.2, .8, .2, 1); }
#drawer { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
#drawer-overlay:not(.hidden), body.side-open .side-scrim { animation: fadeIn .2s ease; }
#gsearch-res:not(.hidden) { animation: popIn .16s ease; }
/* állapotváltások: lágy szín- és háttérátmenet mindenhol, ahol kattintható */
.subtab, .seg button, .icon-btn, .rt-item, .ov-tab, .sh-card, .kcard, .area, .nav-pill, .link, .tbl tr.click td, .ov-row, .month-switch button { transition: color .15s, background-color .15s, border-color .15s, box-shadow .2s, opacity .15s; }
.kcard:hover { transform: translateY(-1px); }
.kcard { transition: transform .15s, border-color .15s, box-shadow .15s; }
.rt-detail > div { animation: pageIn .22s cubic-bezier(.2, .8, .2, 1); }
.panel { transition: border-color .2s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ================= Finomítás: természetes, professzionális sötét felület (nincs fénylés, kevés szín, semleges kijelölés) */
.btn-primary:hover { filter: none; background: #ffffff; }
:root:not(.dark) .btn-primary:hover { background: #000; }
.btn { border-radius: 7px; font-weight: 500; }
.panel { border-radius: 9px; }
.dark .panel { border-color: rgb(var(--line)); background: rgb(var(--card)); }
/* oldalsó menü: keret csak finoman, az aktív elem semleges kiemelést kap */
.tree { gap: 2px; padding-top: 6px; }
.tree-main { height: 38px; border-radius: 8px; border-color: transparent; background: transparent; font-size: 14px; color: rgb(var(--ink) / .82); }
.tree-main:hover { background: rgb(var(--ink) / .045); border-color: transparent; }
.tree-main.active { background: rgb(var(--card2)); border-color: rgb(var(--line)); color: rgb(var(--ink)); }
.tree-main.active > i { color: rgb(var(--ink)); }
.tree-main > i { color: rgb(var(--muted)); font-size: 14px; }
.tree-group + .tree-group { margin-top: 2px; }
.tree-subs { background: transparent; border-left: 1px solid rgb(var(--line)); margin: 2px 0 6px 20px; padding: 2px 0; }
.tree-group.is-cur .tree-subs { border-left-color: rgb(var(--line)); }
.tree-sub { min-height: 32px; font-size: 13.5px; padding-left: 14px; border-radius: 0 6px 6px 0; }
.tree-sub.active { background: rgb(var(--ink) / .05); color: rgb(var(--ink)); }
.tree-sub.active::before { left: -1px; background: rgb(var(--ink)); box-shadow: none; }
.tree-dot { display: none; }
.tree-label { padding: 18px 12px 4px; }
.side { background: rgb(var(--bg)); }
/* kijelölések: semleges, nem kék tónus */
.ov-tab.on { box-shadow: inset 0 -2px 0 rgb(var(--ink)); background: transparent; }
.rt-item.on { background: rgb(var(--card2)); }
.rt-item.on::before { background: rgb(var(--ink)); }
.rt-tig { border-color: rgb(var(--line)); background: rgb(var(--card2) / .5); }
.sh-day.is-today { background: rgb(var(--ink) / .03); }
.sh-card.is-in { border-color: rgb(var(--control-c)); }
.sh-tag.in { background: rgb(var(--ink) / .08); color: rgb(var(--ink) / .85); }
.sys-node.on rect:first-child { fill: rgb(var(--card)); stroke: rgb(var(--ink) / .8); stroke-width: 1.2; }
.sys-node:hover rect:first-child, .sys-node:focus rect:first-child { stroke: rgb(var(--control-c)); }
.sys-edge.hot { stroke: rgb(var(--ink) / .75); stroke-width: 1.6; }
.subtab.active { box-shadow: inset 0 -2px 0 rgb(var(--ink)); }
#month-label.is-past { color: rgb(var(--ink)); text-decoration: underline; text-decoration-color: rgb(var(--muted) / .6); text-underline-offset: 3px; }
.link { color: rgb(var(--ink)); text-decoration: underline; text-decoration-color: rgb(var(--muted) / .5); text-underline-offset: 3px; }
.link:hover { text-decoration-color: rgb(var(--ink)); }
.toast-act { color: rgb(var(--bg)); }
.inp:focus { border-color: rgb(var(--ink) / .5); box-shadow: 0 0 0 3px rgb(var(--ink) / .08); }
:focus-visible { outline: 2px solid rgb(var(--ink) / .7); outline-offset: 2px; }
.tree-main:focus-visible, .tree-sub:focus-visible, .subtab:focus-visible { outline-color: rgb(var(--ink) / .7); }
.nav-badge.bad { background: var(--negative); }
.nav-badge.warn { box-shadow: none; }
.kbin { border-style: solid; }
.month-switch, .search-inp { background: rgb(var(--card)); }
.demo-bar { font-size: 13px; }

/* időszak-szűrő */
.per-range { --hl: rgb(var(--accent-rgb)); display: flex; align-items: center; justify-content: center; gap: 4px; height: 36px; padding: 0 10px; border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--hl) 13%, transparent); border: 1px solid color-mix(in srgb, var(--hl) 45%, transparent); }
.per-range > i { color: var(--hl); font-size: 13px; margin-right: 4px; }
.per-range input { flex: 0 1 auto; width: 7.6em; min-width: 0; text-align: center; background: transparent; border: 0; padding: 0; font-size: 13.5px; font-weight: 600; color: rgb(var(--ink)); font-variant-numeric: tabular-nums; }
.per-range input:focus { outline: none; }
.per-range:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl) 25%, transparent); }
.per-range input { cursor: pointer; }
.per-range input::-webkit-calendar-picker-indicator { display: none; }
.per-dash { color: var(--hl); font-weight: 600; padding: 0 2px; }
.per-preset { height: 28px; max-width: 46%; padding: 0 6px; font-size: 12.5px; color: rgb(var(--muted)); background: transparent; border: 1px solid rgb(var(--line)); border-radius: var(--radius-control); }
.per-preset:hover { color: rgb(var(--ink)); }
.rt-count { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: rgb(var(--card2)); color: rgb(var(--muted)); }
.per-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.per-bar .inp { width: auto; }
.per-bar input[type=date] { width: 9.5rem; }
@media (max-width: 480px) { .per-bar select { width: 100%; } .per-bar input[type=date] { flex: 1; width: auto; min-width: 0; } }

/* ================= Üveg téma (html.dark.glass): fotó a háttérben, áttetsző, elmosott felületek, lebegő menü és felső sáv.
   Gépigény: a háttér egyetlen rögzített réteg (görgetéskor nem rajzolódik újra); az elmosás csak a nagy felületeken van,
   egymásba ágyazva soha. Kímélő módban (html.glass-lite) nincs elmosás, a felületek majdnem tömörek – ez szinte ingyenes. */
/* háttérkép: „Snowy mountains at dusk” – Nitish Meena, CC0, Wikimedia Commons (assets/bg/glass.jpg) */
#glass-bg { display: none; }
html.glass { --ga: .46; --ga-dense: .66; --gb: 18px; --g-line: 255 255 255; --radius-card: 16px; }
html.glass.glass-lite { --ga: .82; --ga-dense: .88; }
html.glass body { background: #0a0c11; }
html.glass #glass-bg { display: block; position: fixed; inset: 0; z-index: -1; pointer-events: none; transform: translateZ(0);
  background: linear-gradient(180deg, rgb(6 8 14 / .5) 0%, rgb(6 8 14 / .42) 40%, rgb(6 8 14 / .7) 100%), url(bg/glass.jpg) center 35% / cover no-repeat, #0a0c11; }

/* közös üvegfelület */
html.glass .panel, html.glass .side, html.glass .topbar, html.glass #popover, html.glass #dialog-content, html.glass #cardmodal-body,
html.glass #whmodal-body, html.glass #modal > div, html.glass #drawer, html.glass .kcol, html.glass .sh-list {
  background: rgb(16 18 24 / var(--ga)); border: 1px solid rgb(var(--g-line) / .1);
  box-shadow: inset 0 1px 0 rgb(var(--g-line) / .07), 0 10px 30px rgb(0 0 0 / .18);
  -webkit-backdrop-filter: blur(var(--gb)) saturate(150%); backdrop-filter: blur(var(--gb)) saturate(150%); }
html.glass .panel { border-radius: 16px; }
/* sűrű táblázat mögé tömörebb üveg: a számok olvashatósága előbbre való */
html.glass .panel:has(.tbl), html.glass .panel:has(table) { background: rgb(14 16 21 / var(--ga-dense)); }
/* ablakok, lenyílók: alig áttetszők, erősebb elmosással */
html.glass #popover, html.glass #dialog-content, html.glass #cardmodal-body, html.glass #whmodal-body, html.glass #modal > div, html.glass #drawer {
  background: rgb(18 20 27 / .84); --gb: 28px; }
/* üveg az üvegben nem kell: ablakon belül a panelek nem mosnak el (ez lenne a legdrágább) */
html.glass :is(#dialog, #cardmodal, #whmodal, #modal, #drawer, #evwin, #editor, #popover) .panel,
html.glass .panel .panel { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(var(--g-line) / .035); box-shadow: none; }
html.glass.glass-lite :is(.panel, .side, .topbar, #popover, #dialog-content, #cardmodal-body, #whmodal-body, #modal > div, #drawer, .kcol, .sh-list) {
  -webkit-backdrop-filter: none; backdrop-filter: none; }

/* lebegő oldalmenü és felső sáv */
@media (min-width: 1024px) {
  html.glass .side { margin: 12px 0 12px 12px; top: 12px; height: calc(100vh - 24px); border-radius: 20px; }
  html.glass .topbar { margin: 12px 12px 0 12px; top: 12px; border-radius: 18px; }
}
@media (max-width: 1023px) {
  html.glass .side { background: rgb(16 18 24 / .9); border-radius: 0 20px 20px 0; }
  html.glass .topbar { margin: 8px 8px 0; top: 8px; border-radius: 16px; }
}
html.glass .topbar { border-bottom: 1px solid rgb(var(--g-line) / .1); }
html.glass .tree-main.active { background: rgb(var(--g-line) / .12); border-color: rgb(var(--g-line) / .14); }
html.glass .tree-main:hover, html.glass .tree-sub:hover { background: rgb(var(--g-line) / .07); }
html.glass .tree-sub.active { background: rgb(var(--g-line) / .09); }
html.glass .tree-subs { border-left-color: rgb(var(--g-line) / .14); }

/* vezérlők: áttetsző, kerek */
html.glass .btn { background: rgb(var(--g-line) / .07); border-color: rgb(var(--g-line) / .14); border-radius: 999px; }
html.glass .btn:hover { background: rgb(var(--g-line) / .13); }
html.glass .btn-primary { background: #f1f3f7; border-color: #f1f3f7; color: #0b0c0f; }
html.glass .btn-primary:hover { background: #ffffff; }
html.glass .icon-btn { border-radius: 999px; }
html.glass .icon-btn:hover { background: rgb(var(--g-line) / .1); }
html.glass .inp, html.glass .month-switch, html.glass .search-inp { background: rgb(0 0 0 / .22); border-color: rgb(var(--g-line) / .14); }
html.glass .month-switch { border-radius: 999px; }
html.glass .search-inp { border-radius: 999px; }
html.glass select.inp option { background: #16181e; }
html.glass .seg, html.glass .sh-seg { background: rgb(0 0 0 / .22); border-radius: 999px; }
html.glass .seg button { border-radius: 999px; }
html.glass .seg button.on, html.glass .sh-seg button.on { background: rgb(var(--g-line) / .14); border-color: rgb(var(--g-line) / .16); }
html.glass .chip { background: rgb(var(--g-line) / .06); border-color: rgb(var(--g-line) / .14); }
html.glass .pick { background: rgb(var(--g-line) / .04); border-color: rgb(var(--g-line) / .12); }
html.glass .pick.on { background: rgb(var(--g-line) / .1); }
html.glass .notice { background: rgb(16 18 24 / var(--ga-dense)); border-color: rgb(var(--g-line) / .1); border-radius: 14px; }

/* táblázatok az üvegen */
html.glass .tbl td { border-bottom-color: rgb(var(--g-line) / .07); }
html.glass .tbl tr.click:hover td { background: rgb(var(--g-line) / .05); }
html.glass .tbl tr.sel td, html.glass .bg-card2 { background-color: rgb(var(--g-line) / .07); }
html.glass .pnl .sticky-col, html.glass .pnl tr.grp td, html.glass .pnl tr.grp .sticky-col, html.glass .pnl tr.strong .sticky-col { background: rgb(20 22 28); }
html.glass .kcard, html.glass .cal-card { background: rgb(var(--g-line) / .06); border-color: rgb(var(--g-line) / .1); }
html.glass .cal-day { background: rgb(var(--g-line) / .04); }

/* a közvetlenül a fotón álló szöveg (oldalcím, alcím): világosabb szürke és lágy árnyék, hogy az égen is olvasható legyen */
html.glass { --muted: 176 182 194; }
html.glass #page > :not(.panel):not(section) { text-shadow: 0 1px 2px rgb(0 0 0 / .55), 0 0 18px rgb(0 0 0 / .45); }
html.glass #page > :not(.panel):not(section) :is(.btn, .panel, .seg, .chip, .inp) { text-shadow: none; }
/* háttér-rétegek, amelyek a fotót eltakarnák */
html.glass #page { position: relative; }
html.glass #auth { background: transparent; }
html.glass #evwin-content, html.glass #editor { background: rgb(12 14 19 / .9); }
html.glass #toast { background: rgb(241 243 247 / .95); color: #0b0c0f; }
html.glass .demo-bar { margin: 12px 12px 0; border-radius: 14px; }
@media (prefers-reduced-transparency: reduce) { html.glass { --ga: .9; --ga-dense: .92; } }

/* témaválasztó */
.theme-opt { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 14px; border: 1px solid rgb(var(--line)); text-align: left; font-size: 13px; font-weight: 500; color: rgb(var(--muted)); }
.theme-opt:hover { color: rgb(var(--ink)); }
.theme-opt.on { color: rgb(var(--ink)); border-color: rgb(var(--ink)); box-shadow: 0 0 0 1px rgb(var(--ink)); }
.theme-sw { height: 64px; border-radius: 9px; border: 1px solid rgb(var(--line)); }

/* ---------- ClickUp-szerű idővonal (tv) és naptár (cv) ---------- */
.tv { font-size: 12px; }
.tv-scroll { overflow: auto; max-height: 72vh; position: relative; }
.tv-head { display: flex; position: sticky; top: 0; z-index: 4; background: rgb(var(--card)); border-bottom: 1px solid rgb(var(--line)); height: 44px; }
.tv-left { flex-shrink: 0; display: flex; align-items: center; gap: .4rem; padding: 0 .6rem 0 .75rem; border-right: 1px solid rgb(var(--line)); background: rgb(var(--card)); min-width: 0; }
.tv-sticky { position: sticky; left: 0; z-index: 3; }
.tv-head .tv-left { font-size: 11px; color: rgb(var(--muted)); z-index: 5; }
.tv-top, .tv-bot { position: relative; height: 22px; }
.tv-top span, .tv-bot span { position: absolute; top: 0; white-space: nowrap; padding: 4px 0 0 4px; font-size: 11px; color: rgb(var(--muted)); border-left: 1px solid rgb(var(--line)); height: 100%; }
.tv-top span { font-weight: 600; color: rgb(var(--ink)); }
.tv-bot span.strong { color: rgb(var(--ink)); }
.tv-row { display: flex; height: 32px; border-bottom: 1px solid rgb(var(--rule-c)); position: relative; }
.tv-row:hover > .tv-left, .tv-row:hover > div:last-child { background: rgb(var(--card2) / .55); }
.tv-grp { height: 30px; }
.tv-grp > .tv-left, .tv-grp > div:last-child { background: rgb(var(--card2) / .7); }
.tv-overlay { position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: 1; }
.tv-row > div:last-child { position: relative; z-index: 2; }
.tv-shade { position: absolute; top: 0; bottom: 0; background: rgb(var(--ink) / .035); }
.tv-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgb(var(--line) / .7); }
.tv-fest { position: absolute; top: 0; bottom: 0; background: rgb(237 161 0 / .10); border-left: 1px solid rgb(237 161 0 / .5); border-right: 1px solid rgb(237 161 0 / .5); }
.tv-line { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--data); }
.tv-line.t0 { border-left-color: #eda100; }
.tv-line.t0 b { position: absolute; top: 2px; left: -8px; width: 14px; height: 14px; border-radius: 3px; background: #eda100; color: #fff; font-size: 9px; display: grid; place-items: center; }
.tv-bar { position: absolute; top: 6px; height: 20px; border-radius: 5px; background: color-mix(in srgb, var(--c) 28%, rgb(var(--card))); border: 1px solid var(--c); cursor: grab; overflow: hidden; display: flex; align-items: center; touch-action: none; user-select: none; }
.tv-bar.done { opacity: .45; }
.tv-bar.over { box-shadow: 0 0 0 2px var(--negative); }
.tv-bar.dragging { cursor: grabbing; box-shadow: 0 4px 14px rgb(0 0 0 / .25); z-index: 5; }
.tv-prog { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c); opacity: .55; pointer-events: none; }
.tv-txt { position: relative; padding: 0 8px; font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; color: rgb(var(--ink)); }
.tv-h { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 2; }
.tv-h.l { left: 0; } .tv-h.r { right: 0; }
.tv-bar:hover .tv-h { background: rgb(var(--ink) / .15); }
.tv-ms { position: absolute; top: 8px; width: 15px; height: 15px; transform: rotate(45deg); border-radius: 3px; cursor: grab; touch-action: none; }
.tv-out { position: absolute; top: 8px; left: 6px; font-size: 11px; color: rgb(var(--muted)); white-space: nowrap; }

.cv-dow { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 11px; color: rgb(var(--muted)); padding: 0 2px 4px; }
.cv-month { border: 1px solid rgb(var(--line)); border-radius: 8px; overflow: hidden; }
.cv-week { position: relative; border-top: 1px solid rgb(var(--line)); }
.cv-week:first-child { border-top: 0; }
.cv-cell { position: absolute; top: 0; bottom: 0; width: calc(100% / 7); border-left: 1px solid rgb(var(--line)); padding: 2px 4px; }
.cv-cell:first-child { border-left: 0; }
.cv-cell.out { background: rgb(var(--card2) / .5); }
.cv-cell.out .cv-num { opacity: .45; }
.cv-cell.today .cv-num { background: var(--data); color: #fff; }
.cv-num { font-size: 11px; font-weight: 600; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px; }
.cv-num:hover { background: rgb(var(--card2)); }
.cv-more { position: absolute; bottom: 2px; left: 6px; font-size: 10px; color: rgb(var(--muted)); }
.cv-chip { position: absolute; height: 20px; border-radius: 4px; font-size: 11px; line-height: 20px; padding: 0 6px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--c) 22%, rgb(var(--card))); border-left: 3px solid var(--c); z-index: 1; }
.cv-chip:hover { background: color-mix(in srgb, var(--c) 35%, rgb(var(--card))); }
.cv-chip.done { opacity: .45; text-decoration: line-through; }
.cv-chip.cutl { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: dashed; }
.cv-chip.cutr { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cv-wk { border: 1px solid rgb(var(--line)); border-radius: 8px; overflow: hidden; }
.cv-wkhead, .cv-allday { display: grid; grid-template-columns: 52px 1fr; border-bottom: 1px solid rgb(var(--line)); }
.cv-wkhead { grid-template-columns: 52px repeat(var(--days), 1fr); font-size: 12px; }
.cv-wkhead button { padding: 6px; text-align: left; border-left: 1px solid rgb(var(--line)); color: rgb(var(--muted)); }
.cv-wkhead button b { color: rgb(var(--ink)); font-size: 14px; margin-left: 2px; }
.cv-wkhead button.today b { color: var(--data); }
.cv-allday > div:last-child { border-left: 1px solid rgb(var(--line)); }
.cv-allday > div:first-child { padding-left: 6px; }
.cv-hours { display: grid; grid-template-columns: 52px 1fr; max-height: 62vh; overflow-y: auto; }
.cv-hlabels div { font-size: 10px; color: rgb(var(--muted)); text-align: right; padding-right: 6px; transform: translateY(-6px); }
.cv-cols { display: grid; grid-template-columns: repeat(var(--days), 1fr); background-image: linear-gradient(to bottom, rgb(var(--line) / .7) 1px, transparent 1px); background-size: 100% 44px; }
.cv-daycol { position: relative; border-left: 1px solid rgb(var(--line)); }
.cv-daycol.today { background: rgb(var(--accent-rgb) / .05); }
.cv-ev { position: absolute; border-radius: 5px; font-size: 11px; line-height: 1.25; padding: 2px 5px; text-align: left; overflow: hidden;
  background: color-mix(in srgb, var(--c) 25%, rgb(var(--card))); border-left: 3px solid var(--c); z-index: 1; }
.cv-ev b { font-weight: 600; margin-right: 2px; }
.cv-ev.done { opacity: .45; }
.cv-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--negative); z-index: 2; }
@media (max-width: 640px) { .cv-chip { font-size: 0; height: 6px; } .cv-week { min-height: 70px !important; } }

/* ClickUp-szerű lista */
.cl-grp { display: flex; align-items: center; gap: .5rem; padding: .55rem 1rem; background: rgb(var(--card2) / .55); border-top: 1px solid rgb(var(--line)); font-size: 12px; }
.cl-row { display: grid; grid-template-columns: minmax(220px, 1fr) 120px 150px 150px 90px 110px 90px; align-items: center; min-height: 36px; border-top: 1px solid rgb(var(--rule-c)); font-size: 12.5px; }
.cl-row:hover { background: rgb(var(--card2) / .5); }
.cl-row > div { padding: 0 .5rem; min-width: 0; }
.cl-head { font-size: 11px; color: rgb(var(--muted)); min-height: 30px; border-top: 0; }
.cl-head:hover { background: none; }
.cl-add { opacity: 0; }
.cl-row:hover .cl-add { opacity: 1; }
@media (max-width: 900px) { .cl-row { grid-template-columns: minmax(180px, 1fr) 110px 120px; } .cl-row > .cl-opt { display: none; } }

/* ================= Stúdió téma (html.neo, sötét: + .dark) – látványterv.
   Tömör, semleges felületek fotó és üveg nélkül; a lapokat tónuslépcső választja el (sötétben keret nélkül),
   lágy sarkok, pirula alakú vezérlők. A címek és a fő számok betűje az Archivo (széles, tömör – a FEZEN-embléma rokona),
   minden más Geist. Egy kiemelőszín (kék) csak adaton és a kijelölésen; az üzletágak színe csak az adataikon. */
.brand-logo { display: none; }
.ov-bento { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 1180px) { .ov-bento { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); } }

html.neo { --radius-card: 20px; --radius-control: 999px; --display: "Archivo", "Geist", system-ui, sans-serif; }
html.neo.dark {
  --bg: 9 9 10; --card: 21 21 23; --card2: 33 33 36; --line: 40 40 44; --rule-c: 31 31 34; --control-c: 66 66 72;
  --ink: 245 245 246; --muted: 170 170 178;
  --primary: #f5f5f6; --primary-ink: #09090a; --accent-rgb: 96 144 255; --data: #6090ff;
  --positive: #4cc38a; --negative: #f0717c; --warning: #e0aa5e;
  --surface: #151517; --raised: #212124; --rule: #1f1f22; --grid: #28282c; --axis-ink: #aaaab2; --text: #f5f5f6;
  --chart-1: #6090ff; --chart-2: #74747c; --chart-3: #f5f5f6; --chart-muted: #3c3c42;
}
html.neo:not(.dark) {
  --bg: 243 243 240; --card: 255 255 255; --card2: 240 240 237; --line: 229 229 225; --rule-c: 240 240 237; --control-c: 208 208 203;
  --ink: 17 17 17; --muted: 98 98 102;
  --primary: #111111; --primary-ink: #ffffff; --accent-rgb: 37 99 235; --data: #2563eb;
  --surface: #ffffff; --raised: #f0f0ed; --rule: #f0f0ed; --grid: #e6e6e2; --axis-ink: #626266; --text: #111111;
  --chart-1: #2563eb; --chart-2: #8a8a8a; --chart-3: #111111;
}
html.neo body { background: rgb(var(--bg)); }

/* lapok: sötétben tónuslépcső keret nélkül, világosban hajszálkeret; beágyazva egy lépcsővel feljebb, kisebb sarokkal */
html.neo .panel { border-radius: 20px; }
html.neo.dark .panel { border-color: transparent; background: rgb(var(--card)); }
html.neo .panel .panel, html.neo :is(#drawer, #dialog-content, #cardmodal-body, #whmodal-body, #modal > div, #evwin, #editor) .panel { border-radius: 14px; background: rgb(var(--card2) / .6); border-color: transparent; }
html.neo #dialog-content, html.neo #modal > div, html.neo #cardmodal-body, html.neo #whmodal-body { border-radius: 24px; }
html.neo .panel.float, html.neo .float { box-shadow: 0 18px 48px rgb(0 0 0 / .28); border: 1px solid rgb(var(--line)); }
html.neo .notice { border-radius: 14px; }
html.neo.dark .notice:not(.warn) { border-color: transparent; }

/* vezérlők: pirula gombok, a mezők 12 px-es sarokkal (a több soros mezőn a pirula torzulna) */
html.neo .btn { border-radius: 999px; height: 38px; padding: 0 16px; }
html.neo.dark .btn:not(.btn-primary):not(.btn-ghost) { background: rgb(var(--card2)); border-color: transparent; }
html.neo.dark .btn:not(.btn-primary):not(.btn-ghost):hover { background: rgb(var(--control-c)); }
html.neo .btn-primary:hover { background: var(--primary); opacity: .88; }
html.neo .inp, html.neo select.inp, html.neo textarea { border-radius: 12px; }
html.neo .search-inp, html.neo .month-switch { border-radius: 999px; }
html.neo.dark .search-inp, html.neo.dark .month-switch { background: rgb(var(--card)); border-color: transparent; }
html.neo .seg { border-radius: 999px; padding: 3px; }
html.neo .seg button { border-radius: 999px; }
html.neo .chip { border-radius: 999px; }
html.neo .icon-btn { border-radius: 999px; }
html.neo .per-range, html.neo .per-preset { border-radius: 12px; }

/* keret: a menü és a felső sáv az alapon ül, vonal nélkül; a kijelölt menüpont egy tónussal világosabb */
html.neo .side { background: rgb(var(--bg)); border-right-color: transparent; }
html.neo .topbar { background: rgb(var(--bg)); border-bottom-color: transparent; height: 68px; }
html.neo .brand-mark { display: none; }
html.neo .brand-logo { display: block; height: 20px; width: auto; flex: none; }
html.neo.dark .brand-logo { filter: invert(1); }
html.neo .brand { gap: 12px; align-items: center; }
html.neo .brand-text > span:first-child { font-size: 12px; font-weight: 500; color: rgb(var(--muted)); }
html.neo .brand-text > span:last-child { display: none; }
html.neo .tree { gap: 2px; padding: 8px 12px 12px; }
html.neo .tree-main { height: 40px; border-radius: 12px; }
html.neo .tree-main.active { background: rgb(var(--card)); border-color: transparent; }
html.neo:not(.dark) .tree-main.active { background: rgb(var(--card)); box-shadow: 0 0 0 1px rgb(var(--line)); }
html.neo .tree-subs { border-left-color: rgb(var(--line)); margin-left: 22px; }
html.neo .tree-sub { border-radius: 10px; margin-left: 6px; padding-left: 12px; }
html.neo .tree-sub.active { background: rgb(var(--ink) / .06); }
html.neo .tree-sub.active::before { left: -7px; background: rgb(var(--accent-rgb)); }

/* betű: oldalcím és fő számok Archivo-val */
html.neo #page h1 { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 30px; line-height: 36px; letter-spacing: -0.02em; }
html.neo .ov-lead, html.neo .ov-sib, html.neo .kpi-val { font-family: var(--display); font-stretch: 108%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
html.neo .ov-lead { font-size: 40px; line-height: 44px; font-weight: 700; }
html.neo .ov-sib { font-size: 24px; line-height: 44px; font-weight: 500; }
html.neo .kpi-val { font-size: 28px; line-height: 34px; font-weight: 600; }
html.neo .unit { font-family: var(--font); letter-spacing: 0; }
html.neo .panel > header h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

/* Áttekintés: a mutatósáv a lap tetején, a kijelölt mutató alatt kiemelőszínű vonal */
html.neo .ov-tabs { border-bottom-color: rgb(var(--rule-c)); }
html.neo .ov-tab { padding: 22px 24px 18px; border-right-color: rgb(var(--rule-c)); }
html.neo .ov-tab:first-child { border-top-left-radius: 20px; } html.neo .ov-tab:last-child { border-top-right-radius: 20px; }
html.neo .ov-tab.on { box-shadow: inset 0 -3px 0 rgb(var(--accent-rgb)); background: transparent; }
html.neo .ov-fezen { background: rgb(var(--card2) / .45); }
html.neo #ov-chart { height: 280px !important; }
html.neo .ov-row { padding: 14px 22px; }
html.neo .ov-mark { width: 8px; height: 8px; margin-top: 6px; }

/* táblázat: levegősebb sorok, a lap sarkát követő szélek */
html.neo .tbl td { height: 48px; }
html.neo .tbl th:first-child, html.neo .tbl td:first-child { padding-left: 22px; }
html.neo .tbl th:last-child, html.neo .tbl td:last-child { padding-right: 22px; }
html.neo .panel > .panel-body:last-child, html.neo .panel > .overflow-x-auto:last-child { border-radius: 0 0 20px 20px; overflow: hidden; }
html.neo .tbl tr:last-child td { border-bottom-color: transparent; }
html.neo .subtab.active { box-shadow: inset 0 -2px 0 rgb(var(--accent-rgb)); }
html.neo .pill, html.neo .rt-count { border-radius: 999px; }
html.neo .theme-opt { border-radius: 16px; } html.neo .theme-sw { border-radius: 10px; }
@media (max-width: 640px) {
  html.neo #page h1 { font-size: 24px; line-height: 30px; }
  html.neo .ov-lead { font-size: 28px; line-height: 34px; } html.neo .ov-sib { font-size: 20px; line-height: 34px; }
  html.neo .ov-tab { padding: 14px 16px; border-radius: 0 !important; }
}

/* ---------- Költségvetés-kalkulátor (js/views/calculator.js) – bevétel kék, kiadás narancs, negatív piros; mindig felirattal */
:root { --kk-in: #1f6fe5; --kk-out: #c2570c; --kk-in-soft: rgb(31 111 229 / .14); --kk-out-soft: rgb(194 87 12 / .14); }
.dark { --kk-in: #7c9fe8; --kk-out: #f0954a; --kk-in-soft: rgb(124 159 232 / .18); --kk-out-soft: rgb(240 149 74 / .18); }
.kk { font-variant-numeric: tabular-nums; }
.kk .num, .kk-table, .kk-kpi-v { font-variant-numeric: tabular-nums; }
.kk-in-t { color: var(--kk-in); } .kk-out-t { color: var(--kk-out); } .kk-neg { color: var(--negative); } .kk-pos { color: var(--kk-in); }
.kk-title { width: 100%; font-size: 26px; line-height: 34px; font-weight: 600; letter-spacing: -0.02em; background: transparent; border: 1px solid transparent; border-radius: var(--radius-control); padding: 2px 8px; margin-left: -9px; color: rgb(var(--ink)); }
.kk-title:hover { border-color: rgb(var(--line)); } .kk-title:focus { outline: none; border-color: var(--primary); background: rgb(var(--card)); }
.kk-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgb(var(--muted)); margin-top: 2px; }
.kk-dot { width: 8px; height: 8px; border-radius: 99px; flex: none; } .kk-dot-ok { background: var(--positive); } .kk-dot-dirty { background: #d97706; } .kk-dot-new { background: rgb(var(--muted)); }
.kk-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgb(var(--card2)); font-size: 12px; font-weight: 600; margin-left: 2px; }
.kk-menu { position: relative; } .kk-menu summary { list-style: none; cursor: pointer; } .kk-menu summary::-webkit-details-marker { display: none; }
.kk-menu-list { position: absolute; right: 0; top: 42px; z-index: 30; min-width: 270px; padding: 6px; background: rgb(var(--card)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-card); box-shadow: 0 12px 32px rgb(0 0 0 / .18); }
.kk-menu-list button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-control); font-size: 14px; text-align: left; }
.kk-menu-list button:hover { background: rgb(var(--card2)); } .kk-menu-list i { width: 16px; color: rgb(var(--muted)); }
.kk-danger, .kk-danger i { color: var(--negative) !important; }
.kk-sample { align-items: center; }
.kk-field { display: flex; flex-direction: column; gap: 4px; } .kk-field > span, .kk-lab { font-size: 12px; font-weight: 500; color: rgb(var(--muted)); }
.kk-period { display: grid; grid-template-columns: minmax(200px, 1.4fr) 1fr 1fr; gap: 12px; max-width: 720px; }
.kk-switches { display: flex; flex-wrap: wrap; gap: 16px 24px; margin-top: 16px; } .kk-switches .kk-lab { margin-bottom: 4px; }
.kk-hint { display: flex; gap: 8px; margin-top: 14px; font-size: 13px; color: rgb(var(--muted)); max-width: 820px; } .kk-hint i { margin-top: 3px; }
.kk-note { font-size: 12px; color: rgb(var(--muted)); margin-top: 10px; }
/* összesítő */
.kk-sum { display: flex; flex-direction: column; gap: 10px; }
.kk-sum-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: var(--radius-card); background: var(--kk-in-soft); font-size: 14px; }
.kk-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kk-kpi { position: relative; background: rgb(var(--card)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-card); padding: 14px 16px; min-width: 0; }
.kk-kpi-l { font-size: 12px; font-weight: 500; color: rgb(var(--muted)); } .kk-kpi-v { font-size: 22px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kk-kpi-s { font-size: 12px; color: rgb(var(--muted)); margin-top: 4px; }
.kk-mark { position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; } .kk-mark-in { background: var(--kk-in); } .kk-mark-out { background: var(--kk-out); }
.kk-sum-line { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: rgb(var(--muted)); } .kk-sum-line b { color: rgb(var(--ink)); }
/* tételek */
.kk-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.kk-tab { text-align: left; padding: 9px 12px; border-radius: var(--radius-card); border: 1px solid rgb(var(--line)); background: rgb(var(--card)); min-width: 0; border-top-width: 3px; }
.kk-tab-in { border-top-color: var(--kk-in-soft); } .kk-tab-out { border-top-color: var(--kk-out-soft); }
.kk-tab.on.kk-tab-in { border-top-color: var(--kk-in); background: rgb(var(--card2)); } .kk-tab.on.kk-tab-out { border-top-color: var(--kk-out); background: rgb(var(--card2)); }
.kk-tab-t { display: block; font-size: 14px; font-weight: 600; } .kk-tab-s { display: block; font-size: 12px; color: rgb(var(--muted)); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kk-grid { display: flex; flex-direction: column; gap: 0; overflow-x: auto; }
.kk-gh, .kk-row { display: grid; gap: 6px; align-items: center; min-width: 940px; }
.kk-grid-fixed .kk-gh, .kk-grid-fixed .kk-row { grid-template-columns: minmax(128px, 1.5fr) minmax(104px, 1fr) 100px 150px 158px 84px 84px minmax(116px, 1fr) 60px; }
.kk-grid-var .kk-gh, .kk-grid-var .kk-row { grid-template-columns: 128px minmax(150px, 1.6fr) minmax(110px, 1fr) 100px 150px minmax(120px, 1fr) minmax(100px, 1fr) 60px; }
.kk-fd { display: grid; grid-template-columns: 1fr 44px; gap: 4px; } .kk-fd .kk-l { grid-column: 1 / -1; }
.kk-fd input { padding-left: 4px !important; padding-right: 2px !important; text-align: center; }
.kk-row input[maxlength='7'] { font-size: 13px; }
.kk-gh { font-size: 12px; font-weight: 500; color: rgb(var(--muted)); padding: 0 0 6px; border-bottom: 1px solid rgb(var(--line)); }
.kk-gh .r, .kk .inp.r { text-align: right; }
.kk-row { padding: 6px 0; border-bottom: 1px solid rgb(var(--line) / .7); }
.kk-row .inp { min-height: 32px; padding: 5px 8px; font-size: 13.5px; }
.kk-vat { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; } .kk-vat .kk-l { grid-column: 1 / -1; }
.kk-res { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-size: 13.5px; line-height: 1.25; } .kk-res small { font-size: 11.5px; color: rgb(var(--muted)); }
.kk-grid-var .kk-res { align-items: flex-end; } .kk-res span { white-space: nowrap; }
.kk-acts { display: flex; justify-content: flex-end; } .kk-acts .icon-btn { height: 30px; width: 30px; }
.kk-l { display: none; }
.kk-out-of { opacity: .55; }
.kk-empty { display: flex; gap: 12px; align-items: center; padding: 22px 16px; border: 1px dashed rgb(var(--line)); border-radius: var(--radius-card); font-size: 14px; color: rgb(var(--muted)); }
.kk-empty i { font-size: 18px; }
.kk-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; } .kk-foot-sum { margin-left: auto; font-size: 14px; }
/* kimutatás – táblázat */
.kk-tablewrap { overflow: auto; max-height: 72vh; border: 1px solid rgb(var(--line)); border-radius: var(--radius-card); }
.kk-table { border-collapse: separate; border-spacing: 0; font-size: 13px; width: max-content; min-width: 100%; }
.kk-table th, .kk-table td { padding: 6px 10px; white-space: nowrap; border-bottom: 1px solid rgb(var(--line) / .6); }
.kk-table td { text-align: right; }
.kk-table thead th { position: sticky; top: 0; z-index: 2; background: rgb(var(--card2)); font-weight: 600; font-size: 12px; text-align: right; }
.kk-table tbody th { position: sticky; left: 0; z-index: 1; background: rgb(var(--card)); text-align: left; font-weight: 400; min-width: 210px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.kk-table thead .kk-corner { left: 0; z-index: 3; text-align: left; }
.kk-table th small { display: inline; margin-left: 6px; font-size: 11px; color: rgb(var(--muted)); font-weight: 400; }
.kk-mh { font-weight: 600; text-decoration: underline; text-decoration-color: rgb(var(--muted) / .45); text-underline-offset: 3px; } .kk-mh:hover { color: var(--kk-in); }
.kk-mh small { display: block !important; margin: 0 !important; }
.kk-days td, .kk-days thead th { padding: 6px 8px; min-width: 64px; }
.kk-dn { display: block; } .kk-wd { display: block; font-size: 10.5px; color: rgb(var(--muted)); font-weight: 500; }
.kk-table .kk-we { background: rgb(var(--card2) / .7); } .kk-table thead th.kk-we { color: rgb(var(--muted)); }
.kk-zero { color: rgb(var(--muted) / .55); }
.kk-tot { font-weight: 600; background: rgb(var(--card2) / .5); }
.kk-sec th { font-weight: 700 !important; font-size: 13px; padding-top: 12px !important; background: rgb(var(--card)) !important; }
.kk-sec-in th { color: var(--kk-in); } .kk-sec-out th { color: var(--kk-out); }
.kk-grp th { font-size: 12px; color: rgb(var(--muted)); font-weight: 500 !important; }
.kk-it th { padding-left: 20px !important; }
.kk-none th { padding-left: 20px !important; color: rgb(var(--muted)); font-style: italic; }
.kk-subtot th, .kk-subtot td { font-weight: 600; border-top: 1px solid rgb(var(--line)); }
.kk-result th, .kk-result td { font-weight: 700; border-top: 2px solid rgb(var(--ink) / .6); background: rgb(var(--card2) / .6); }
.kk-result th { background: rgb(var(--card2)) !important; }
.kk-cum th, .kk-cum td { color: rgb(var(--muted)); font-weight: 500; }
.kk-cum td.kk-neg { color: var(--negative); }
/* grafikon */
.kk-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; margin-bottom: 8px; align-items: center; }
.kk-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.kk-sw-in { background: var(--kk-in); } .kk-sw-out { background: var(--kk-out); } .kk-sw-line { height: 3px; vertical-align: 3px; background: rgb(var(--ink)); border-radius: 2px; }
.kk-chartwrap { position: relative; overflow-x: auto; }
.kk-chart { display: block; max-width: none; }
.nv-mixdot { background: conic-gradient(#7c5cff 0 25%, #f59e0b 0 50%, #10b981 0 75%, #ef4444 0); }
.nv-we { fill: currentColor; opacity: .045; }
.nv-tick-sub { font-weight: 600; opacity: .75; }
.p1-days { display: flex; align-items: flex-end; gap: 2px; height: 48px; margin-top: 6px; }
.p1-days > div { flex: 1; border-radius: 2px; background: rgb(var(--line)); }
.p1-days > div.on { background: var(--warning); }
.nv-ccseg { stroke: rgb(var(--card)); stroke-width: .6; }
.nv-hatch-l { fill: rgb(255 255 255 / .55); }
.dark .nv-hatch-l { fill: rgb(0 0 0 / .45); }
.nv-tick-cum { font-style: italic; }
.nv-legend2 { margin-top: -4px; opacity: .85; }
.nv-sw-solid { background: rgb(var(--ink)); }
.nv-sw-hatch { background: repeating-linear-gradient(45deg, rgb(var(--ink)) 0 2px, transparent 2px 4px); border: 1px solid rgb(var(--ink)); }
.nv-tipcc { border-collapse: collapse; margin: 4px 0 6px; font-size: 12px; }
.nv-tipcc th { font-weight: 600; opacity: .7; text-align: right; padding: 0 0 2px 10px; }
.nv-tipcc td { padding: 1px 0; white-space: nowrap; }
.nv-tipcc .nv-tipsum td { border-top: 1px solid currentColor; font-weight: 700; padding-top: 2px; }
.nv-tipcc td + td { text-align: right; padding-left: 10px; font-variant-numeric: tabular-nums; }
.kk-gridl { stroke: rgb(var(--line)); stroke-width: 1; } .kk-axis0 { stroke: rgb(var(--muted) / .7); stroke-width: 1; }
.kk-tick { font-size: 11px; fill: rgb(var(--muted)); font-family: var(--font); } .kk-tick-we { fill: rgb(var(--muted) / .55); }
.kk-bar-in { fill: var(--kk-in); } .kk-bar-out { fill: var(--kk-out); }
.kk-hit { fill: transparent; cursor: pointer; } .kk-colg:hover .kk-hit { fill: rgb(var(--ink) / .05); }
.kk-line { fill: none; stroke: rgb(var(--ink)); stroke-width: 2; stroke-linejoin: round; pointer-events: none; }
.kk-pt { fill: rgb(var(--card)); stroke: rgb(var(--ink)); stroke-width: 1.5; pointer-events: none; } .kk-pt-neg { stroke: var(--negative); }
.kk-tip { position: absolute; z-index: 5; pointer-events: none; display: flex; flex-direction: column; gap: 3px; min-width: 210px; padding: 9px 11px; font-size: 12.5px;
          background: rgb(var(--card)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-card); box-shadow: 0 8px 24px rgb(0 0 0 / .18); }
.kk-tip span { display: flex; align-items: center; } .kk-tip em { font-style: normal; font-weight: 600; margin-left: auto; padding-left: 14px; }
/* főkönyv */
.kk-ledger { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid rgb(var(--line)); border-radius: var(--radius-card); overflow: hidden; }
.kk-lg-side { padding: 14px 16px; display: flex; flex-direction: column; } .kk-lg-side + .kk-lg-side { border-left: 2px solid rgb(var(--ink) / .7); }
.kk-lg-h { font-size: 15px; font-weight: 700; padding-bottom: 8px; border-bottom: 2px solid rgb(var(--ink) / .7); margin-bottom: 4px; } .kk-lg-h small { font-weight: 500; color: rgb(var(--muted)); font-size: 12px; }
.kk-lg-h-in { color: var(--kk-in); } .kk-lg-h-out { color: var(--kk-out); }
.kk-lg-grp { margin-top: 10px; } .kk-lg-gt { font-size: 12px; font-weight: 600; color: rgb(var(--muted)); margin-bottom: 4px; }
.kk-lg-row { display: grid; grid-template-columns: 1fr 56px 120px; gap: 2px 10px; align-items: baseline; font-size: 13.5px; padding: 4px 0; }
.kk-lg-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .kk-lg-p { text-align: right; color: rgb(var(--muted)); font-size: 12px; } .kk-lg-v { text-align: right; }
.kk-lg-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgb(var(--card2)); overflow: hidden; } .kk-lg-bar i { display: block; height: 100%; border-radius: 4px; }
.kk-fill-in { background: var(--kk-in); } .kk-fill-out { background: var(--kk-out); }
.kk-lg-none { color: rgb(var(--muted)); font-style: italic; }
.kk-lg-sub { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; border-top: 1px solid rgb(var(--line)); padding-top: 5px; margin-top: 4px; }
.kk-lg-plug { display: flex; justify-content: space-between; margin-top: 14px; padding: 7px 10px; border-radius: var(--radius-control); background: rgb(var(--card2)); font-size: 13.5px; font-weight: 600; font-style: italic; }
.kk-lg-total { display: flex; justify-content: space-between; margin-top: auto; padding-top: 12px; font-weight: 700; font-size: 15px; }
.kk-lg-total span:last-child { border-bottom: 4px double rgb(var(--ink)); padding-bottom: 2px; }
.kk-eq { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-card); background: rgb(var(--card2) / .6); }
.kk-eq > div { display: flex; flex-direction: column; } .kk-eq span { font-size: 12px; color: rgb(var(--muted)); } .kk-eq b { font-size: 18px; font-weight: 600; }
.kk-eq .kk-op { font-size: 20px; color: rgb(var(--muted)); padding-bottom: 2px; } .kk-eq-m { margin-left: auto; }
.kk-vatbox { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; }
.kk-vatbox > div { display: flex; flex-direction: column; padding: 10px 14px; border: 1px solid rgb(var(--line)); border-radius: var(--radius-card); }
.kk-vatbox span { font-size: 12px; color: rgb(var(--muted)); } .kk-vatbox b { font-size: 16px; font-weight: 600; } .kk-vatbox b small { font-size: 12px; font-weight: 500; color: rgb(var(--muted)); }
.kk-vatbox .kk-note { grid-column: 1 / -1; margin-top: 0; }
/* mentett számolások panel */
.kk-sheet { position: fixed; inset: 0; z-index: 54; }
.kk-sheet-bg { position: absolute; inset: 0; background: rgb(0 0 0 / .45); opacity: 0; transition: opacity .2s; }
.kk-sheet-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(460px, 100%); background: rgb(var(--card)); border-left: 1px solid rgb(var(--line)); display: flex; flex-direction: column;
                  transform: translateX(100%); transition: transform .2s ease; box-shadow: -12px 0 32px rgb(0 0 0 / .2); }
.kk-sheet.on .kk-sheet-bg { opacity: 1; } .kk-sheet.on .kk-sheet-panel { transform: none; }
.kk-sheet-panel header { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; } .kk-sheet-panel h3 { font-size: 16px; font-weight: 600; }
.kk-sheet-q { position: relative; padding: 0 16px 10px; } .kk-sheet-q i { position: absolute; left: 28px; top: 11px; font-size: 12px; color: rgb(var(--muted)); } .kk-sheet-q .inp { padding-left: 2rem; }
.kk-cards { flex: 1; overflow-y: auto; padding: 0 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.kk-card { border: 1px solid rgb(var(--line)); border-radius: var(--radius-card); }
.kk-card.cur { border-color: var(--kk-in); box-shadow: 0 0 0 1px var(--kk-in); }
.kk-card-main { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; text-align: left; padding: 10px 12px 6px; font-size: 14px; }
.kk-card-main b { font-weight: 600; }
.kk-badge { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--kk-in-soft); color: var(--kk-in); }
.kk-card-meta { font-size: 12px; color: rgb(var(--muted)); } .kk-card-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: rgb(var(--muted)); }
.kk-card-acts { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 6px 6px; } .kk-card-acts button { font-size: 12.5px; padding: 4px 8px; border-radius: var(--radius-control); color: rgb(var(--ink)); }
.kk-card-acts button:hover { background: rgb(var(--card2)); }
.kk-sheet-panel footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid rgb(var(--line)); font-size: 12.5px; color: rgb(var(--muted)); }
@media (max-width: 1100px) { .kk-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
  .kk-gh { display: none; }
  .kk-grid { overflow: visible; gap: 10px; }
  .kk-row, .kk-grid-fixed .kk-row, .kk-grid-var .kk-row { min-width: 0; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px; border: 1px solid rgb(var(--line)); border-radius: var(--radius-card); }
  .kk-row > div:first-child, .kk-grid-var .kk-row > div:nth-child(2) { grid-column: 1 / -1; }
  .kk-grid-var .kk-row > div:first-child { grid-column: auto; }
  .kk-l { display: block; font-size: 11.5px; font-weight: 500; color: rgb(var(--muted)); margin-bottom: 3px; }
  .kk-res { align-items: flex-start; text-align: left; } .kk-acts { align-self: end; }
}
@media (min-width: 641px) and (max-width: 1200px) {
  .kk-row, .kk-grid-fixed .kk-row, .kk-grid-var .kk-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kk-row > div:first-child, .kk-grid-var .kk-row > div:nth-child(2) { grid-column: span 2; }
  .kk-grid-var .kk-row > div:first-child { grid-column: auto; }
}
@media (max-width: 900px) {
  .kk-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kk-ledger { grid-template-columns: 1fr; } .kk-lg-side + .kk-lg-side { border-left: 0; border-top: 2px solid rgb(var(--ink) / .7); }
  .kk-vatbox { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kk-kpi:nth-child(5) { grid-column: 1 / -1; }
  .kk-kpi-v { font-size: 18px; line-height: 26px; }
  .kk-period { grid-template-columns: 1fr 1fr; } .kk-period .kk-field:first-child { grid-column: 1 / -1; }
  .kk-title { font-size: 22px; line-height: 30px; }
  .kk-foot-sum { margin-left: 0; width: 100%; }
  .kk-eq-m { margin-left: 0; }
  .kk-switches .seg { flex-wrap: wrap; }
  .kk-vat, .kk-fd { grid-column: 1 / -1; }
  .kk-sample { flex-wrap: wrap; } .kk-sample > div:first-of-type { flex-basis: calc(100% - 30px); }
}
/* nyomtatás: csak a kalkulátor nyomtatási nézete */
#kk-print { display: none; }
@media print {
  body.kk-printing > *:not(#kk-print) { display: none !important; }
  body.kk-printing #kk-print { display: block; }
  body.kk-printing { background: #fff; }
  .kk-printdoc { color: #000; font-size: 11px; }
  .kk-printdoc h1 { font-size: 20px; font-weight: 700; } .kk-printdoc h2 { font-size: 14px; font-weight: 700; margin: 16px 0 6px; break-after: avoid; }
  .kk-printdoc .kk-tablewrap { max-height: none; overflow: visible; border: 0; }
  .kk-printdoc .kk-table { font-size: 9px; width: 100%; } .kk-printdoc .kk-table th, .kk-printdoc .kk-table td { padding: 3px 4px; position: static !important; }
  .kk-printdoc .kk-mh { text-decoration: none; }
  .kk-printdoc .kk-kpis { grid-template-columns: repeat(5, 1fr); } .kk-printdoc .kk-kpi-v { font-size: 14px; }
  .kk-printdoc .kk-sum-head button { display: none; }
  .kk-printdoc .kk-ledger, .kk-printdoc .kk-vatbox, .kk-printdoc .kk-eq { break-inside: avoid; }
  @page { size: A4 landscape; margin: 10mm; }
}
/* kalkulátor: címkék, partner, szűrés, nézetek */
.kk-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 0 0 2px; }
.kk-meta i { color: rgb(var(--muted)); font-size: 11px; }
.kk-meta-p { display: flex; align-items: center; gap: 6px; } .kk-meta-p .inp { width: 220px; min-height: 28px; padding: 3px 8px; font-size: 12.5px; }
.kk-meta-t { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; flex: 1; min-width: 200px; }
.kk-tag-in { width: 190px !important; min-height: 28px !important; padding: 3px 8px !important; font-size: 12.5px !important; }
.kk-chip { display: inline-flex; align-items: center; height: 24px; border-radius: 99px; background: rgb(var(--card2)); border: 1px solid rgb(var(--line)); font-size: 12px; font-weight: 500; }
.kk-chip-t { padding: 0 4px 0 9px; } .kk-chip-t:hover { color: var(--kk-in); }
.kk-chip-x { padding: 0 8px 0 4px; color: rgb(var(--muted)); font-size: 14px; line-height: 1; } .kk-chip-x:hover { color: var(--negative); }
.kk-views, .kk-ftags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .kk-views { margin-bottom: 12px; }
.kk-views .kk-lab, .kk-ftags .kk-lab { margin-right: 4px; min-width: 104px; }
.kk-view { display: inline-flex; align-items: center; height: 30px; border-radius: 99px; border: 1px solid rgb(var(--line)); background: rgb(var(--card)); font-size: 13px; font-weight: 500; }
.kk-view > button:first-child { padding: 0 4px 0 12px; height: 100%; }
.kk-view.on { border-color: var(--kk-in); background: var(--kk-in-soft); }
.kk-frow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; margin-top: 12px; }
.kk-factions { display: flex; gap: 8px; margin-left: auto; }
.kk-fnote { display: flex; gap: 8px; margin-top: 12px; padding: 8px 12px; border-radius: var(--radius-card); background: var(--kk-in-soft); font-size: 13px; } .kk-fnote i { margin-top: 3px; color: var(--kk-in); }
.kk-ph { font-size: 14px; font-weight: 600; margin: 4px 0 8px; } .kk-ph:not(:first-child) { margin-top: 18px; }
.kk-ptable tbody th { min-width: 240px; font-weight: 500; }
.kk-ptable thead th:first-child { text-align: left; left: 0; z-index: 3; }
.kk-pact { text-align: right; }
@media (max-width: 640px) { .kk-meta-p, .kk-meta-p .inp, .kk-tag-in { width: 100% !important; } .kk-views .kk-lab, .kk-ftags .kk-lab { min-width: 0; width: 100%; } .kk-factions { margin-left: 0; } }
@media print { .kk-meta { display: none; } }

/* kalkulátor: jól elválasztott, félkövér tételsorok, kereső */
.kk-isearch { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.kk-isearch > i { position: absolute; left: 12px; top: 12px; font-size: 13px; color: rgb(var(--muted)); }
.kk-isearch .inp { flex: 1 1 320px; padding-left: 2.1rem; min-height: 38px; }
.kk-isearch-n { font-size: 13px; font-weight: 600; color: var(--kk-in); }
.kk-grid { gap: 8px; }
.kk-gh { padding: 0 11px 6px 14px; border-bottom: 0; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; font-weight: 600; }
.kk-row { padding: 9px 10px 8px 11px; border: 1px solid rgb(var(--line)); border-left: 4px solid rgb(var(--line)); border-radius: var(--radius-card); background: rgb(var(--card)); row-gap: 8px;
          transition: border-color .12s, box-shadow .12s; }
.kk-row:nth-of-type(odd) { background: rgb(var(--card2) / .55); }
.kk-row-in { border-left-color: var(--kk-in); } .kk-row-out { border-left-color: var(--kk-out); }
.kk-row:hover { box-shadow: 0 2px 10px rgb(0 0 0 / .08); border-top-color: rgb(var(--muted) / .45); border-right-color: rgb(var(--muted) / .45); border-bottom-color: rgb(var(--muted) / .45); }
.kk-row:focus-within { box-shadow: 0 0 0 2px rgb(var(--accent-rgb) / .25); }
.kk-row input[id$="-name"] { font-weight: 600; font-size: 14px; }
.kk-row input[id$="-amount"] { font-weight: 600; font-size: 14px; }
.kk-row input[id$="-date"] { font-weight: 600; }
.kk-res b { font-size: 14.5px; font-weight: 700; }
.kk-meta { border-top: 1px dashed rgb(var(--line)); padding-top: 7px; }
.kk-table tbody tr.kk-it:hover td { background: var(--kk-in-soft) !important; }
.kk-table tbody tr.kk-it:hover th { background: linear-gradient(var(--kk-in-soft), var(--kk-in-soft)), rgb(var(--card)) !important; }
.kk-table tbody tr.kk-it th { font-weight: 500; }
.kk-table tbody tr.kk-it:nth-child(even) td:not(.kk-we):not(.kk-tot) { background: rgb(var(--card2) / .35); }
.kk-table tbody tr.kk-it:nth-child(even) th { background: rgb(var(--card2)); }
.kk-ptable tbody tr:hover td { background: var(--kk-in-soft); }
.kk-ptable tbody tr:hover th { background: linear-gradient(var(--kk-in-soft), var(--kk-in-soft)), rgb(var(--card)); }
@media (max-width: 1200px) { .kk-row { padding: 12px 12px 10px 13px; } }

/* kalkulátor: az éppen szerkesztett sor jól látható kiemelése, és felvillanás, ha a sor máshová került */
.kk-row.kk-row-active { border-width: 2px; border-left-width: 8px; padding: 8px 9px 7px 7px; box-shadow: 0 6px 20px rgb(0 0 0 / .14); position: relative; z-index: 1; }
.kk-row-in.kk-row-active { background: rgb(31 111 229 / .13) !important; border-color: var(--kk-in); }
.kk-row-out.kk-row-active { background: rgb(194 87 12 / .13) !important; border-color: var(--kk-out); }
.dark .kk-row-in.kk-row-active { background: rgb(124 159 232 / .20) !important; }
.dark .kk-row-out.kk-row-active { background: rgb(240 149 74 / .20) !important; }
.kk-row-active::before { content: 'Szerkesztés alatt'; position: absolute; top: -10px; right: 12px; padding: 1px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
                         color: #fff; background: var(--kk-out); }
.kk-row-in.kk-row-active::before { background: var(--kk-in); }
.dark .kk-row-active::before { color: #0b0c0f; }
.kk-row-active .inp { background: rgb(var(--card)); }
@keyframes kk-flash { 0%, 100% { box-shadow: 0 6px 20px rgb(0 0 0 / .14); } 25%, 65% { box-shadow: 0 0 0 5px rgb(var(--accent-rgb) / .45), 0 6px 20px rgb(0 0 0 / .14); } }
.kk-row.kk-flash { animation: kk-flash 1.3s ease-in-out 1; }
@media (max-width: 1200px) { .kk-row.kk-row-active { padding: 11px 11px 9px 9px; } }
@media (prefers-reduced-motion: reduce) { .kk-row.kk-flash { animation: none; } }
@media print { .kk-row-active::before { display: none; } }

/* ---------- NAV-számlák: kiemelt szűrősáv, összesítők, kijelölési sáv, napkitörés
   világos témában törtfehér/szürke panel sötét betűkkel, sötétben sötétkék – mindkettőben sárga kiemeléssel */
:root { --nv-bg: #f4f2ed; --nv-bd: #ddd8cc; --nv-fg: #1c1f26; --nv-mut: #6b6f78; --nv-in: #ffffff; --nv-inbd: #cfc9bc; --nv-seg: #e9e5dc; --nv-seghov: #ddd7ca; --nv-on: #f2b632; --nv-onfg: #111827;
        --nv-sh: 0 8px 24px rgb(40 35 20 / .10); --nv-barsh: 0 22px 55px rgb(30 30 30 / .28); }
.dark { --nv-bg: #1b2742; --nv-bd: #33456b; --nv-fg: #f8fafc; --nv-mut: #94a3b8; --nv-in: #24324f; --nv-inbd: #3d5180; --nv-seg: #24324f; --nv-seghov: #33456b; --nv-on: #f2b632; --nv-onfg: #111827;
        --nv-sh: 0 10px 30px rgb(0 0 0 / .45); --nv-barsh: 0 24px 60px rgb(0 0 0 / .55); }
.nv-band { background: var(--nv-bg); color: var(--nv-fg); border: 1px solid var(--nv-bd); border-top: 5px solid #f2b632; border-radius: 18px; padding: 16px 18px 18px; box-shadow: var(--nv-sh); }
.nv-band-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.nv-lbl { display: block; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--nv-mut); margin-bottom: 5px; }
.nv-period { font-size: 26px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.nv-band-grid { display: grid; gap: 12px; margin-top: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.nv-band-grid > * { min-width: 0; } .nv-band-grid .nv-q { grid-column: 1 / -1; }
@media (min-width: 640px) { .nv-band-grid .nv-src { grid-column: span 2; } }
@media (max-width: 639px) { .nv-band .nv-seg { flex-wrap: wrap; max-width: 100%; } .nv-band .nv-seg-full { height: auto; } .nv-band .nv-seg-full button { flex: 1 1 40%; min-height: 38px; } .nv-band .nv-seg:not(.nv-seg-full) button { flex: 1 1 auto; padding: 8px 10px; } }
.nv-band input, .nv-band select, .nv-bar input, .nv-bar select {
    width: 100%; height: 46px; padding: 0 12px; border-radius: 11px; background: var(--nv-in); color: var(--nv-fg); border: 1.5px solid var(--nv-inbd);
    font: inherit; font-size: 15px; font-weight: 700; outline: none; }
.dark .nv-band input, .dark .nv-band select, .dark .nv-bar input, .dark .nv-bar select { color-scheme: dark; }
.nv-band input[type=date] { font-size: 17px; font-variant-numeric: tabular-nums; }
.nv-band input:focus, .nv-band select:focus, .nv-bar input:focus, .nv-bar select:focus { border-color: #f2b632; box-shadow: 0 0 0 3px rgb(242 182 50 / .3); }
.nv-band input::placeholder, .nv-bar input::placeholder { color: var(--nv-mut); font-weight: 500; }
.nv-seg { display: inline-flex; background: var(--nv-seg); border-radius: 12px; padding: 4px; gap: 3px; border: 1.5px solid var(--nv-inbd); }
.nv-seg button { padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--nv-fg); opacity: .8; white-space: nowrap; }
.nv-seg button:hover:not(.on) { background: var(--nv-seghov); opacity: 1; }
.nv-seg button.on { background: var(--nv-on); color: var(--nv-onfg); opacity: 1; box-shadow: 0 1px 2px rgb(0 0 0 / .15); }
.nv-seg-full { display: flex; height: 46px; width: 100%; } .nv-seg-full button { flex: 1; padding: 0 4px; font-size: 13px; }
.nv-tile { border-radius: 16px; padding: 16px 18px; background: rgb(var(--card)); border: 1px solid rgb(var(--line)); border-top: 5px solid rgb(var(--line)); }
.nv-tile-in { border-top-color: var(--kk-in); } .nv-tile-out { border-top-color: var(--kk-out); } .nv-tile-res { border-top-color: #1c1f26; } .dark .nv-tile-res { border-top-color: #e2e8f0; } .nv-tile-vat { border-top-color: #94a3b8; }
.nv-tile-l { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgb(var(--muted)); }
.nv-tile-v { font-size: 28px; font-weight: 800; letter-spacing: -.01em; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.nv-tile-s { font-size: 12.5px; color: rgb(var(--muted)); margin-top: 2px; }
.nv-ccchip { padding: 9px 14px; border-radius: 14px; border: 1.5px solid rgb(var(--line)); background: rgb(var(--card)); text-align: left; }
.nv-ccchip:hover { background: rgb(var(--card2)); } .nv-ccchip.on { border-color: #f2b632; box-shadow: 0 0 0 2px #f2b632 inset; }
.nv-bar { position: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(1120px, calc(100vw - 24px));
    background: var(--nv-bg); color: var(--nv-fg); border-radius: 20px; padding: 14px 18px 16px; border: 1.5px solid var(--nv-bd); border-top: 5px solid #f2b632; box-shadow: var(--nv-barsh); }
.nv-bar-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; cursor: move; user-select: none; padding-bottom: 10px; border-bottom: 1px solid var(--nv-bd); touch-action: none; }
.nv-link { color: #b07a00; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; } .dark .nv-link { color: #f2b632; }
.nv-ccbtn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 12px; background: var(--nv-in); border: 2px solid var(--nv-inbd); font-weight: 700; font-size: 14px; color: var(--nv-fg); }
.nv-ccbtn:hover { border-color: var(--nv-mut); } .nv-ccbtn.on { border-color: #f2b632; background: rgb(242 182 50 / .16); box-shadow: 0 0 0 3px rgb(242 182 50 / .3); }
.nv-bar-grid { display: grid; gap: 10px; margin-top: 12px; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .nv-bar-grid { grid-template-columns: 1.2fr 1.2fr 1fr 1fr auto; } }
.nv-apply { height: 46px; padding: 0 18px; border-radius: 12px; background: #f2b632; color: #111827; font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.nv-apply:hover { background: #ffc94d; }
.nv-legend { margin: 6px 0 0 20px; display: flex; flex-direction: column; gap: 3px; } .nv-legend li { display: flex; justify-content: space-between; gap: 12px; }
.nv-seg-p { stroke: rgb(var(--card)); stroke-width: 1.5; transition: opacity .15s; } .nv-seg-p:hover { opacity: .8; } .nv-click { cursor: pointer; }
.nv-sb-l { font-size: 13px; fill: rgb(var(--muted)); font-weight: 600; } .nv-sb-v { font-size: 24px; font-weight: 800; fill: rgb(var(--ink)); } .nv-sb-neg { fill: var(--negative); }
.nv-regbadge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; color: #8a5a00; background: #fdf0cf; border: 1px solid #f2b632; }
.dark .nv-regbadge { color: #f8d27a; background: rgba(242,182,50,.12); }
.nv-festbadge { color: #6b3fa0; background: #efe6fb; border-color: #b892e6; }
.dark .nv-festbadge { color: #d5bdf5; background: rgba(184,146,230,.14); }
/* integrációk: egysoros, összecsukható sor állapotjelzővel */
.int-panel > summary { list-style: none; }
.int-panel > summary::-webkit-details-marker { display: none; }
.int-sum { display: flex; align-items: center; gap: 10px; padding: 14px 20px; cursor: pointer; min-width: 0; }
.int-sum .int-st { font-size: 12px; min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.int-dot { width: 11px; height: 11px; border-radius: 999px; flex: none; }
.int-dot-ok { box-shadow: 0 0 0 4px rgba(22,163,74,.18); }
.int-chev { flex: none; transition: transform .15s; }
.int-panel[open] .int-chev { transform: rotate(180deg); }
.int-panel:not([open]) .int-sum:hover { background: rgb(var(--card2)); border-radius: inherit; }
