/* Színvilágok: felhasználónként választható (Beállítások → Megjelenés); alapértelmezett a világos.
   A logó színei: sötétkék #13264F, türkiz #19ADAA – a türkiz kiemelés minden témában megmarad. */
:root, :root[data-theme="vilagos"] {
  --bg: #f5f5f4;
  --surface: #ffffff;
  --surface-2: #fafaf9;
  --border: #e7e5e4;
  --text: #1c1917;
  --muted: #78716c;
  --primary: #0b7d79;
  --primary-ink: #ffffff;
  --primary-soft: #dff3f2;
  --accent: #19adaa;
  --ai: #0b7d79;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #a16207;
  --warn-soft: #fef3c7;
  --uncertain: #fff3b0;
  --uncertain-border: #eab308;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .06), 0 4px 16px rgba(28, 25, 23, .05);
  color-scheme: light;
}
/* a sötét témák közös állapotszínei */
:root[data-theme="grafit"], :root[data-theme="meleg"], :root[data-theme="kekes"] {
  --primary-ink: #04201e;
  --primary-soft: #19adaa2e;
  --accent: #2ec4bd;
  --ok: #4ade80;
  --ok-soft: #14532d66;
  --warn: #facc15;
  --warn-soft: #713f1266;
  --uncertain: #5b4a0a;
  --uncertain-border: #ca8a04;
  --danger: #f87171;
  --danger-soft: #7f1d1d55;
  --shadow: none;
  color-scheme: dark;
}
:root[data-theme="grafit"] {
  --bg: #141414;
  --surface: #1e1e1f;
  --surface-2: #18181a;
  --border: #303032;
  --text: #ececec;
  --muted: #a1a1a1;
  --primary: #2ec4bd;
  --ai: #2ec4bd;
}
:root[data-theme="meleg"] {
  --bg: #171513;
  --surface: #221f1c;
  --surface-2: #1c1a17;
  --border: #36322d;
  --text: #eee8e0;
  --muted: #a89f94;
  --primary: #3cc7c0;
  --ai: #3cc7c0;
}
:root[data-theme="kekes"] {
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #0f172a;
  --border: #1f2a3d;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #2ec4bd;
  --ai: #2ec4bd;
}
/* logó: világos témán a sötét feliratú, sötét témán a világos feliratú változat */
/* csak rejtünk – a látható logó a saját (.header-logo / .auth-logo) megjelenítését tartja meg */
:root:not([data-theme="grafit"]):not([data-theme="meleg"]):not([data-theme="kekes"]) .logo-on-dark { display: none !important; }
:root[data-theme="grafit"] .logo-on-light, :root[data-theme="meleg"] .logo-on-light, :root[data-theme="kekes"] .logo-on-light { display: none !important; }

/* Megjelenés-választó a Beállításokban */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.theme-opt { border: 2px solid var(--border); border-radius: 12px; padding: 8px; cursor: pointer; display: block; }
.theme-opt:has(input:checked) { border-color: var(--accent); }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt .sw { border-radius: 8px; padding: 10px; height: 74px; display: flex; flex-direction: column; gap: 6px; }
.theme-opt .sw i { display: block; height: 10px; border-radius: 4px; }
.theme-opt .name { display: flex; justify-content: space-between; margin-top: 6px; font-weight: 600; font-size: 13px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h2 { font-size: 18px; margin: 0 0 8px; }
h3 { font-size: 15px; margin: 0 0 10px; }
p { margin: 0 0 12px; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- fejléc */
.topbar {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; flex-direction: column; }
.header-logo { height: 30px; width: auto; display: block; margin-bottom: 3px; }
.auth-logo { width: min(360px, 100%); height: auto; display: block; }
.logo { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.logo b { color: var(--ai); }
.tagline { font-size: 11px; color: var(--muted); }
.tabs { display: flex; gap: 4px; flex: 1; }
.tabs button {
  white-space: nowrap;
  border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
}
.tabs button:hover { background: var(--surface-2); color: var(--text); }
.tabs button.active { background: var(--primary-soft); color: var(--primary); }
.period-pick { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }

main { max-width: 1280px; margin: 0 auto; padding: 20px 24px 80px; }
.tab { display: none; }
.tab.active { display: block; }

.banner { padding: 10px 24px; font-size: 13px; }
.banner.info { background: var(--primary-soft); border-bottom: 1px solid var(--border); }
.banner a { color: var(--primary); font-weight: 600; }
.usermenu { display: flex; align-items: center; gap: 8px; color: var(--muted); }

/* ---------- belépés */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-box { width: min(420px, 100%); }
/* témától független, mindig jól látható piros sáv */
.auth-notice { background: #b91c1c; color: #fff; font-weight: 600; text-align: center; padding: 10px 14px;
  border-radius: 10px; margin-bottom: 18px; line-height: 1.4; }
.auth-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 18px; text-align: center; }
.auth-brand .logo { font-size: 30px; }
.auth-form { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.auth-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.auth-form input { font-size: 15px; padding: 9px 11px; }
.auth-form .btn { justify-content: center; padding: 10px; }
.auth-form p { margin: 0; text-align: center; }
.auth-error { background: var(--danger-soft); color: var(--danger); padding: 8px 10px; border-radius: 7px; font-size: 13px; }
.auth-ok { background: var(--ok-soft); color: var(--ok); padding: 8px 10px; border-radius: 7px; font-size: 13px; }
.auth-form label.check { flex-direction: row; align-items: flex-start; font-weight: 400; color: var(--text); }
.auth-form label.check input { margin-top: 2px; }
.auth-form .small.muted:not(p) { font-weight: 400; }
.company-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.company-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.company-grid .wide { grid-column: span 2; }
@media (max-width: 860px) { .company-grid { grid-template-columns: 1fr; } .company-grid .wide { grid-column: auto; } }
.pill.muted-pill { background: var(--surface-2); color: var(--muted); }

.banner.warn { background: var(--warn-soft); color: var(--text); border-bottom: 1px solid var(--uncertain-border); }

/* ---------- elemek */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
  padding: 7px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 3px 9px; font-size: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
textarea { width: 100%; }
label.check { display: flex; align-items: center; gap: 6px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.spacer { flex: 1; }

/* ---------- feltöltés */
.dropzone {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 22px 24px;
  background: var(--surface); transition: border-color .15s;
}
.dropzone strong { display: block; font-size: 15px; }
.dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.drop-actions { display: flex; gap: 8px; }
.msgs { margin: 8px 0; }
.batch { margin-top: 12px; padding: 14px 18px; }
.batch-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.progress > div { height: 100%; width: 0; background: var(--ai); transition: width .3s; }
.batch-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.batch details { margin-top: 8px; font-size: 13px; }
.batch details li { color: var(--muted); }
.msg { padding: 6px 10px; border-radius: 6px; margin-bottom: 4px; font-size: 13px; background: var(--warn-soft); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 8px; flex-wrap: wrap; }
.filters { display: flex; gap: 12px; align-items: center; }
.filters input[type=search] { width: 260px; }
.stats { display: flex; gap: 16px; color: var(--muted); }
.stats b { color: var(--text); }

/* ---------- táblázatok */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card .table-wrap { border: 0; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.grid td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
#doc-table tbody tr { cursor: pointer; }
#doc-table tbody tr:hover { background: var(--surface-2); }
td.unc { background: var(--uncertain); box-shadow: inset 3px 0 var(--uncertain-border); }
.empty { padding: 40px; text-align: center; color: var(--muted); }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--primary-soft); color: var(--primary); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.status-dot.processing { background: var(--primary); animation: pulse 1s infinite alternate; }
.status-dot.ready { background: var(--ok); }
.status-dot.error { background: var(--danger); }
@keyframes pulse { from { opacity: .3 } to { opacity: 1 } }

/* ---------- szerkesztő */
.modal { position: fixed; inset: 0; background: rgba(2, 6, 23, .55); z-index: 50; display: flex; padding: 24px; }
.modal[hidden] { display: none; }
.modal-box {
  margin: auto; width: min(1280px, 100%); height: min(860px, 100%); display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); background: var(--surface); border-radius: 14px; overflow: hidden;
}
.preview { background: #525659; display: flex; align-items: center; justify-content: center; overflow: auto; }
.preview iframe { width: 100%; height: 100%; border: 0; }
.preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ed-form { padding: 18px 22px; overflow-y: auto; overflow-x: hidden; min-width: 0; display: flex; flex-direction: column; }
.ed-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ed-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ed-grid label.check { flex-direction: row; color: var(--text); font-size: 13px; align-self: end; padding-bottom: 6px; }
.ed-grid .wide { grid-column: 1 / -1; }
.ed-grid input, .ed-grid select { font-size: 14px; font-weight: 400; }
.ed-grid .unc input, .ed-grid .unc select { background: var(--uncertain); border-color: var(--uncertain-border); }
.ed-grid .unc::after { content: "ellenőrizd"; font-size: 10px; color: var(--warn); font-weight: 600; }
.ed-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 16px; flex-wrap: wrap; }
.alert { padding: 8px 12px; border-radius: 8px; margin-bottom: 10px; font-size: 13px; }
.alert.warn { background: var(--warn-soft); }
.alert.err { background: var(--danger-soft); }
.alert.ok-alert { background: var(--ok-soft); }

/* ---------- egyeztetés */
.intro .btn { margin-right: 10px; }
.mapping-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 10px; }
.mapping-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 12px; }
.stat.warn .v { color: var(--warn); }
.stat.bad .v { color: var(--danger); }
.stat.good .v { color: var(--ok); }
.sticky-actions {
  position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px;
}
.pair-select { max-width: 320px; }
.settle-list { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.settle-list .fee { color: var(--danger); }
tr.composer td { background: var(--primary-soft); }
.composer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.composer-grid h4 { margin: 0 0 6px; font-size: 13px; }
.composer-grid label { display: flex; gap: 8px; align-items: baseline; font-size: 13px; padding: 3px 0; }
.composer-grid label span.num { margin-left: auto; }
.composer-sum { margin-top: 10px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
@media (max-width: 860px) { .composer-grid { grid-template-columns: 1fr; } }
.ai-box { margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 8px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ai-box p { margin: 0; }
details.card summary { cursor: pointer; font-weight: 600; }

/* ---------- tételsorok a szerkesztőben */
.ed-items { margin-top: 16px; }
.ed-items-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ed-items h4 { margin: 0; font-size: 13px; }
.items-table td { padding: 4px 5px; }
.items-table input, .items-table select { width: 100%; padding: 4px 6px; font-size: 13px; }
.items-table td.n input { text-align: right; }
.items-table { min-width: 620px; }
.items-table td:nth-child(1) { min-width: 160px; }
.items-table td:nth-child(2) { width: 64px; }
.items-table td:nth-child(3) { width: 100px; }
.modal-box.dir-out .in-only, .modal-box:not(.dir-out) .out-only { display: none; }
body.no-trade .trade-only { display: none !important; }

/* ---------- kereskedés */
.subtabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.subtabs button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.subtabs button.active { background: var(--primary-soft); color: var(--primary); }
.sale { padding: 0; overflow: hidden; }
.sale-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.sale-head h3 { margin: 0 0 2px; }
.sale-nums { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.sale-nums div { text-align: right; }
.sale-nums .l { font-size: 11px; color: var(--muted); }
.sale-nums .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); }
.neg { color: var(--danger); }
.sale table.grid td { padding: 7px 18px; }
tr.alloc td { background: var(--surface-2); font-size: 12.5px; padding-top: 4px; padding-bottom: 4px; }
tr.alloc td:first-child { padding-left: 34px; }
tr.picker td { background: var(--primary-soft); }
.picker-box { display: flex; flex-direction: column; gap: 8px; }
.picker-box .sug { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; }
.picker-box .sug .grow { flex: 1; min-width: 0; }
.picker-box input.qty { width: 64px; text-align: right; }
.score { font-size: 11px; color: var(--muted); }
#stock-table input, #stock-table select { width: 100%; padding: 4px 6px; font-size: 13px; }

/* ---------- zárás / beállítások */
.file-list { columns: 2; margin: 0; padding-left: 18px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.tpl td input, .tpl td select { width: 100%; }
.tpl td:first-child { width: 40px; color: var(--muted); }
.tpl td:last-child { width: 120px; white-space: nowrap; }
.merge { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.merge select { max-width: 280px; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 8px; box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .topbar { padding: 10px 16px; gap: 10px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  main { padding: 16px; }
  .modal { padding: 0; }
  .modal-box { grid-template-columns: 1fr; grid-template-rows: 40vh 1fr; height: 100%; border-radius: 0; }
  .ed-grid { grid-template-columns: 1fr; }
  .filters input[type=search] { width: 100%; }
  .file-list { columns: 1; }
}

a { color: var(--ai); }
.auth-form a { font-weight: 600; }

/* mentett kivonatok */
.stmt-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stmt-month { display: flex; gap: 8px; align-items: center; }
#stmt-list-wrap { margin-top: 12px; }
#stmt-list tr.current { background: rgba(25, 173, 170, .10); }
#csv-name { margin-top: 8px; }

/* havi zárás – ellenőrzőlista */
.close-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.verdict { padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 15px; }
.verdict.err { background: var(--danger-soft); }
.verdict.warn { background: var(--warn-soft); }
.verdict.ok { background: var(--ok-soft); }
.check-item { border: 1px solid var(--border); border-left-width: 4px; border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.check-item.err { border-left-color: var(--danger); }
.check-item.warn { border-left-color: var(--warn); }
.check-item.info { border-left-color: var(--primary); }
.check-item.ok { border-left-color: var(--ok); }
.check-item summary { cursor: pointer; }
.check-item summary, .check-item .ci-row { display: flex; gap: 10px; align-items: baseline; }
.ci-icon { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; }
.err .ci-icon { background: var(--danger); }
.warn .ci-icon { background: var(--warn); }
.info .ci-icon { background: var(--primary); }
.ok .ci-icon { background: var(--ok); }
.ci-title { font-weight: 600; }
.check-item.ok .ci-title, .check-item.info .ci-title { font-weight: 500; }
.ci-hint { margin: 6px 0 6px 28px; color: var(--muted); }
.check-item .table-wrap { margin: 6px 0 4px 28px; }

/* könyvelői csomag: bejövő / kimenő */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.pkg-part { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.pkg-part h4 { margin: 0 0 10px; }
.pkg-part .summary-cards { grid-template-columns: repeat(2, 1fr); margin-bottom: 10px; }
.pkg-part.off .summary-cards { opacity: .55; }
#pkg-out .check { margin-bottom: 4px; }

.pkg-part { transition: opacity .15s, border-color .15s; border-width: 2px; }
.pkg-part:not(.off) { border-color: var(--accent, #19ADAA); }
.pkg-part.off { opacity: .6; }
.pkg-part.off .summary-cards { opacity: 1; }
.pkg-select { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pkg-select-head { width: 100%; font-weight: 600; }
.pkg-select p { width: 100%; margin: 0; }
.pkg-toggle { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; user-select: none; min-width: 200px; }
.pkg-toggle:has(input:checked) { border-color: var(--accent, #19ADAA); background: rgba(25, 173, 170, .10); }
.pkg-toggle input { width: 18px; height: 18px; }

/* ÁFA-bontás a szerkesztőben */
.ed-vat table { max-width: 460px; }
#ed-vat-check { margin-top: 4px; }

/* kiemelt kivonatsor (ugrás a Havi zárásból) */
@keyframes flash-row { from { background: rgba(25, 173, 170, .45); } to { background: transparent; } }
tr.flash > td { animation: flash-row 2.6s ease-out; }
.send-supp { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#send-status .alert > div + div { margin-top: 4px; }
#close-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { #close-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.vat-help b { color: var(--text); }
.vat-help { line-height: 1.5; }
#vat-review { margin-top: 18px; }
#vat-review h3 { margin-bottom: 8px; }

/* „nincs számla” indoklás */
.noinv-grid { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 4px 0; }
.noinv-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.noinv-grid label.grow { flex: 1; min-width: 220px; }
.noinv-err { color: var(--danger); align-self: center; }
tr.noinv-form > td { background: var(--surface-2); }

.noinv-cell { display: flex; gap: 6px; margin-top: 6px; align-items: center; flex-wrap: wrap; }
.noinv-note { flex: 1; min-width: 200px; width: 100%; font-size: 12px; padding: 4px 8px; margin-top: 6px; }
.noinv-cell .noinv-note { margin-top: 0; }

/* bankszámla a kivonatnál */
.acc-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.acc-row.acc-missing { background: var(--warn-soft); border-radius: 8px; padding: 8px 10px; }
.acc-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.acc-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }

/* kivonatok bankszámlánként */
#stmt-list tr.acc-head td { background: var(--surface-2); padding-top: 10px; padding-bottom: 10px; }
#stmt-list tr.acc-head .pill { margin-left: 8px; }
#stmt-list td.stmt-indent { padding-left: 24px; }

/* súgó */
.help { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.help-toc { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.help-toc b { margin-bottom: 6px; }
.help-toc a { color: var(--muted); text-decoration: none; padding: 3px 0; font-size: 14px; }
.help-toc a:hover { color: var(--primary); }
.help-body { max-width: 820px; line-height: 1.6; }
.help-body .card { scroll-margin-top: 90px; }
@media (max-width: 1240px) { .help-toc { top: 140px; } .help-body .card { scroll-margin-top: 140px; } }
.help-body ul, .help-body ol { padding-left: 22px; margin: 6px 0 10px; }
.help-body li { margin-bottom: 4px; }
.help-body p { margin: 0 0 10px; }
.help-faq dt { font-weight: 600; margin-top: 12px; }
.help-faq dd { margin: 2px 0 0; color: var(--muted); }
@media (max-width: 860px) {
  .help { grid-template-columns: 1fr; }
  .help-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
  .help-toc b { width: 100%; margin-bottom: 0; }
}
