/* תרומות והתחייבויות — כחול-לילה ונחושת-זהב של פנקס גבאי, על נייר חם. תפריט למעלה (טבלאות רחבות), כרטיסים רק למה שעומד לבד */
:root {
  color-scheme: light;
  --bg: #f4f0e7; --surface: #fffdf8; --surface-2: #f7f2e8; --line: #e6ddcb; --line-2: #d5c8ad;
  --ink: #17233a; --ink-2: #47526a; --muted: #6f7787; --navy: #13233f; --navy-2: #1f3763; --on-navy: #e8ecf4;
  --gold: #b0822a; --gold-2: #d9b25a; --gold-soft: #f3e8cc; --gold-ink: #7a5714;
  --il: #2a6fc9; --il-soft: #e3edfa; --ab: #8a4fc2; --ab-soft: #f0e6fa;
  --pos: #17784a; --pos-soft: #e1f2e8; --neg: #b3352c; --neg-soft: #fbe6e3; --warn: #a86a00; --warn-soft: #fbefd6;
  --grid: #ebe4d6; --field: #ffffff;
  --shadow: 0 1px 2px rgba(23, 35, 58, .05), 0 6px 20px rgba(23, 35, 58, .05);
  --font: "Heebo", "Segoe UI", "Arial Hebrew", Arial, sans-serif;
  --serif: "Frank Ruhl Libre", "David", "Times New Roman", serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #0f1626; --surface: #172138; --surface-2: #1c2842; --line: #2a3756; --line-2: #3a4a6e;
  --ink: #e9edf5; --ink-2: #b8c1d4; --muted: #8d97ab; --navy: #0b1220; --navy-2: #1a2a4a; --on-navy: #e8ecf4;
  --gold: #d2a547; --gold-2: #e6c272; --gold-soft: #3a3020; --gold-ink: #e8c77d;
  --il: #6ea6ee; --il-soft: #1d2f4d; --ab: #b98ce8; --ab-soft: #2e2447;
  --pos: #5cc790; --pos-soft: #183528; --neg: #ef8277; --neg-soft: #3d1f1d; --warn: #e5b04a; --warn-soft: #3a2f17;
  --grid: #26324e; --field: #111a2d; --shadow: 0 1px 2px rgba(0, 0, 0, .3);
} }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1626; --surface: #172138; --surface-2: #1c2842; --line: #2a3756; --line-2: #3a4a6e;
  --ink: #e9edf5; --ink-2: #b8c1d4; --muted: #8d97ab; --navy: #0b1220; --navy-2: #1a2a4a; --on-navy: #e8ecf4;
  --gold: #d2a547; --gold-2: #e6c272; --gold-soft: #3a3020; --gold-ink: #e8c77d;
  --il: #6ea6ee; --il-soft: #1d2f4d; --ab: #b98ce8; --ab-soft: #2e2447;
  --pos: #5cc790; --pos-soft: #183528; --neg: #ef8277; --neg-soft: #3d1f1d; --warn: #e5b04a; --warn-soft: #3a2f17;
  --grid: #26324e; --field: #111a2d; --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.45; }
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
.ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 16px; height: 16px; }
.ic.okc { color: var(--pos); }
.muted { color: var(--muted); }
.sub { color: var(--muted); font-size: 12.5px; }
.strong { font-weight: 700; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.ltr { direction: ltr; unicode-bidi: isolate; text-align: right; }
.n { text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; direction: ltr; text-align: right; }
.sp { flex: 1; }
.mm { white-space: nowrap; } .mm-sep { color: var(--muted); margin: 0 6px; }

/* ---------- סרגל ---------- */
.top { background: var(--navy); color: var(--on-navy); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--navy); }
.top-in, .nav-in, .main { max-width: 1320px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top-in { display: flex; align-items: center; gap: 14px; padding-block: 10px 8px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { color: var(--gold-2); display: grid; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 21px; color: #f4e9cf; line-height: 1.1; }
.brand-sub { font-size: 11.5px; letter-spacing: .4px; color: #9fb0cf; }
.top-acts { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.nav { border-top: 1px solid rgba(255, 255, 255, .08); }
.nav-in { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav-in::-webkit-scrollbar { display: none; }
.nav-i { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border: 0; background: none; color: #b9c5dc; cursor: pointer; white-space: nowrap; border-bottom: 2.5px solid transparent; font-weight: 500; }
.nav-i:hover { color: #fff; }
.nav-i.on { color: #fff; border-bottom-color: var(--gold-2); }
.nb { background: var(--gold-2); color: var(--navy); border-radius: 10px; font-size: 11px; padding: 0 6px; line-height: 17px; }
.demo-bar, .store-bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; font-size: 13.5px; background: var(--gold-soft); color: var(--gold-ink); border-bottom: 1px solid var(--line); }
.store-bar { background: var(--neg-soft); color: var(--neg); }

/* ---------- כפתורים ושדות ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 13px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; color: inherit; background: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.gold { background: var(--gold); color: #17233a; background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.btn.gold:hover { filter: brightness(1.05); }
.btn.ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.ghost-l { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: var(--on-navy); }
.btn.ghost-l:hover { background: rgba(255, 255, 255, .13); }
.btn.danger { background: var(--surface); border-color: var(--neg-soft); color: var(--neg); }
.btn.danger-f { background: var(--neg); color: #fff; }
.btn.link { color: var(--il); padding: 4px 6px; min-height: 0; font-weight: 500; }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.lnk { border: 0; background: none; padding: 0; color: var(--ink); cursor: pointer; text-align: right; font-weight: 600; }
.lnk:hover { color: var(--il); text-decoration: underline; }
input, select, textarea { border: 1px solid var(--line-2); background: var(--field); border-radius: 9px; padding: 7px 10px; min-height: 38px; font-size: 14px; outline: none; width: 100%; min-width: 0; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 17px; height: 17px; min-height: 0; accent-color: var(--gold); }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- עמוד ---------- */
.main { padding-block: 18px 60px; display: flex; flex-direction: column; gap: 14px; }
.ph, .hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ph h1, .hello h1 { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--ink); }
.ph-sub { margin: 2px 0 0; color: var(--muted); }
.ph-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { margin-bottom: -8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card.pad, .pad { padding: 16px; }
.pad-x { padding: 14px 16px 6px; }
.ch { font-family: var(--serif); font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.ch-row { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px 4px; }
.ch-row .ch { margin: 0; }
.sh { font-family: var(--serif); font-size: 16px; margin: 16px 0 6px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cols > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.empty { padding: 22px; text-align: center; color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.hint.pad { padding: 8px 16px 12px; margin: 0; }

/* סיכומים */
.sumrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.sum { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; display: flex; flex-direction: column; gap: 2px; border-inline-start: 4px solid var(--gold); }
.sum.il { border-inline-start-color: var(--il); } .sum.abroad { border-inline-start-color: var(--ab); }
.sum.ok { border-inline-start-color: var(--pos); } .sum.warn { border-inline-start-color: var(--warn); }
.sum.wide { grid-column: 1 / -1; }
.sl { font-size: 12.5px; color: var(--muted); }
.sv { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sx { font-size: 12.5px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.kpi { text-align: right; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; box-shadow: var(--shadow); }
.kpi:hover { border-color: var(--gold); }
.kl { font-size: 12.5px; color: var(--muted); }
.kv { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kx { font-size: 12.5px; color: var(--muted); }
.kx.neg { color: var(--neg); }

/* סינון */
.fbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.fi { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 120px; }
.fi.grow { flex: 1; min-width: 180px; }
.fi select, .fi input { min-height: 34px; padding: 5px 9px; font-size: 13.5px; color: var(--ink); }
.fi-sum { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; margin-inline-start: auto; align-self: center; font-variant-numeric: tabular-nums; }

/* טבלאות */
.tw { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: right; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl th.n { text-align: left; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--grid); vertical-align: top; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr.click { cursor: pointer; }
.tbl tr.dim td { opacity: .55; }
.tbl tr.done td { background: color-mix(in srgb, var(--pos-soft) 45%, transparent); }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line-2); }
.tbl td.note { max-width: 260px; color: var(--ink-2); }
.tbl td.acts { white-space: nowrap; text-align: left; }
.tbl .ckc { width: 34px; text-align: center; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; border: 1px solid var(--line); }
.pill.il { background: var(--il-soft); color: var(--il); border-color: transparent; }
.pill.abroad { background: var(--ab-soft); color: var(--ab); border-color: transparent; }
.pill.ok, .pill.r-paid { background: var(--pos-soft); color: var(--pos); border-color: transparent; }
.pill.late, .pill.r-rejected { background: var(--neg-soft); color: var(--neg); border-color: transparent; }
.pill.open, .pill.r-new { background: var(--il-soft); color: var(--il); border-color: transparent; }
.pill.r-review, .pill.r-approved, .pill.r-partial { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.off { opacity: .7; }
.paid-chip { border: 1px solid transparent; background: var(--pos-soft); color: var(--pos); border-radius: 8px; padding: 2px 8px; font-size: 12.5px; cursor: pointer; margin: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 1px 8px; font-size: 12.5px; }
.line { padding: 4px 0; border-bottom: 1px dashed var(--grid); }

/* לשוניות */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; align-self: flex-start; max-width: 100%; }
.seg button { border: 0; background: none; padding: 7px 13px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--navy-2); color: #fff; }
.seg b { font-size: 11.5px; background: var(--gold-soft); color: var(--gold-ink); border-radius: 9px; padding: 0 6px; }

/* התחייבויות לפי מטבע */
.curcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.curcard { text-align: right; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 7px; box-shadow: var(--shadow); }
.curcard.on { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 35%, transparent); }
.cc-h { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.cc-h .sub { margin-inline-start: auto; }
.cc-sym { display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 50%; background: var(--navy-2); color: var(--gold-2); font-weight: 700; font-family: var(--serif); font-size: 15px; padding: 0 4px; }
.cc-v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cc-f { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.cc-late { font-size: 12.5px; color: var(--neg); font-weight: 600; }
.bar { height: 7px; background: var(--grid); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 4px; }

/* קופות */
.boxgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.boxcard { text-align: right; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; box-shadow: var(--shadow); }
.boxcard:hover { border-color: var(--gold); }
.boxcard.dim { opacity: .6; }
.bx-h { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bx-kind { font-size: 11.5px; letter-spacing: .3px; color: var(--gold-ink); background: var(--gold-soft); border-radius: 6px; padding: 1px 7px; }
.bx-n { font-weight: 700; font-size: 15.5px; }
.bx-v { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bx-v.neg { color: var(--neg); }
.boxmini { display: flex; flex-direction: column; padding: 4px 8px 10px; }
.bm { display: flex; justify-content: space-between; gap: 10px; padding: 8px; border: 0; border-bottom: 1px solid var(--grid); background: none; cursor: pointer; text-align: right; flex-wrap: wrap; }
.bm:hover { background: var(--surface-2); }
.bm b { font-variant-numeric: tabular-nums; }

/* מלגות */
.hmnav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; }
.hmnav select { width: auto; min-width: 150px; }
.hm-c { text-align: center; min-width: 150px; }
.hm-t { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.bulk { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--gold-soft); border-radius: var(--r) var(--r) 0 0; }
.ck { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.grid-y td.hc, .grid-y th.hc { text-align: center; white-space: nowrap; font-size: 12.5px; padding: 6px 5px; }
.grid-y td.hn { white-space: nowrap; position: sticky; right: 0; background: var(--surface); z-index: 1; }
.hc.paid { color: var(--pos); background: color-mix(in srgb, var(--pos-soft) 70%, transparent); }
.hc.miss { color: var(--neg); background: var(--neg-soft); font-weight: 700; }
.hc.due { color: var(--muted); }
.hc.off { background: repeating-linear-gradient(-45deg, transparent 0 5px, var(--grid) 5px 6px); }
.legend { display: inline-flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); margin-inline-start: auto; flex-wrap: wrap; }
.lg { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-inline-end: 3px; }
.lg.paid { background: var(--pos-soft); border: 1px solid var(--pos); } .lg.miss { background: var(--neg-soft); border: 1px solid var(--neg); } .lg.due { border: 1px solid var(--line-2); }
.lg.il { background: var(--il); } .lg.ab { background: var(--ab); }

/* תזכורות */
.duelist { display: flex; flex-direction: column; }
.due { display: grid; grid-template-columns: 70px 1fr; gap: 6px 12px; align-items: start; padding: 10px 14px; border-bottom: 1px solid var(--grid); }
.due-a { grid-column: 2; justify-content: flex-start !important; }
.kv, .sv, .bx-v, .cc-v { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: baseline; }
.kv .mm-sep, .sv .mm-sep, .bx-v .mm-sep { display: none; }
.due:last-child { border-bottom: 0; }
.due-d { display: flex; flex-direction: column; align-items: center; padding: 5px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.due.today .due-d { background: var(--gold-soft); border-color: var(--gold-2); color: var(--gold-ink); }
.due.late .due-d { background: var(--neg-soft); border-color: transparent; color: var(--neg); }
.due-t { min-width: 0; }
.due-a { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* גרף */
.chart svg { width: 100%; height: auto; max-height: 260px; display: block; }
.chart .gl { stroke: var(--grid); }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .b-il { fill: var(--il); } .chart .b-ab { fill: var(--ab); }
.chart .legend { margin-top: 4px; }
.barc { min-width: 160px; }
.hbar { display: inline-block; width: 110px; height: 8px; background: var(--grid); border-radius: 4px; overflow: hidden; vertical-align: middle; margin-inline-end: 6px; }
.hbar i { display: block; height: 100%; background: var(--gold); }

/* חלונות */
.ov { position: fixed; inset: 0; z-index: 60; background: rgba(9, 15, 28, .55); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 12px 12px; overflow-y: auto; }
.md { background: var(--surface); border-radius: 16px; width: min(520px, 100%); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); display: flex; flex-direction: column; max-height: 90vh; }
.md.wide { width: min(780px, 100%); }
.md-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; border-bottom: 1px solid var(--line); }
.md-h h3 { font-family: var(--serif); font-size: 20px; }
.md-b { padding: 14px 16px; overflow-y: auto; }
.md-f { display: flex; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.md-err { margin-top: 10px; background: var(--neg-soft); color: var(--neg); border-radius: 9px; padding: 8px 11px; font-weight: 600; }
.confirm-t { font-size: 15px; margin: 4px 0; }
.grid2, .grid3 { display: grid; gap: 10px 12px; }
.grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; }
.span2 { grid-column: span 2; } .span3 { grid-column: 1 / -1; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.amt { display: flex; gap: 6px; }
.amt input { flex: 1; font-size: 16px; font-weight: 600; }
.amt select { width: auto; flex: none; max-width: 150px; }
.cur-tag { display: grid; place-items: center; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; white-space: nowrap; }
.big-v { font-size: 19px; font-weight: 700; padding-top: 6px; }
.pick { display: flex; gap: 6px; }
.pick .pick-q { max-width: 170px; }
.newp { background: var(--gold-soft); border-radius: 12px; padding: 10px; }
.trf { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-bottom: 12px; }
.trf-side { display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-width: 0; }
.trf-side h4 { font-size: 13px; color: var(--muted); font-weight: 600; }
.trf-arrow { color: var(--gold); }
.trf-arrow .ic { width: 28px; height: 28px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; min-width: 0; }
.req-h { margin-bottom: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.decide { margin-top: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.curset { display: grid; grid-template-columns: 1fr 110px; gap: 6px 10px; align-items: center; }
.dl-pre { max-height: 40vh; overflow: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 12px; direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-all; }
.toast { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.toast.on { opacity: 1; transform: translateX(-50%); }
.toast.warn { background: var(--neg); }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) {
  .cols { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .due { grid-template-columns: 64px 1fr; }
  .due-a { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 520px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .trf { grid-template-columns: 1fr; }
  .trf-arrow { transform: rotate(-90deg); justify-self: center; }
  .top-acts .btn { padding: 6px 10px; }
  .brand-sub { display: none; }
  .ph h1, .hello h1 { font-size: 23px; }
  .pick { flex-direction: column; } .pick .pick-q { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------- מערכת בשרת: כניסה, סנכרון, הרשאות, מלגות ---------- */
.boot-msg { padding: 60px 16px; text-align: center; color: var(--muted); }
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 500px at 50% -10%, var(--navy-2), var(--navy) 60%); }
.login-card { width: min(380px, 100%); background: var(--surface); border-radius: 18px; padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.login-card h1 { font-family: var(--serif); font-size: 26px; text-align: center; }
.login-card > .sub { text-align: center; margin-top: -8px; }
.login-mark { color: var(--gold); display: grid; place-items: center; }
.login-mark svg { width: 54px; height: 54px; }
.btn.wide { width: 100%; min-height: 44px; font-size: 15.5px; }
.me { display: flex; align-items: center; gap: 6px; }
.sync-st { font-size: 12px; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.sync-st.ok { color: #9fd8b8; }
.sync-st.wait { color: var(--gold-2); background: rgba(217, 178, 90, .12); }
.sync-st.off { color: #fff; background: var(--neg); }
.icon-btn.on-navy { color: var(--on-navy); }
.icon-btn.on-navy:hover { background: rgba(255, 255, 255, .12); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; vertical-align: middle; }
.kpv { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 0 14px; align-items: baseline; }
.kpv .mm-sep { display: none; }
.alert { display: flex; align-items: center; gap: 8px; background: var(--gold-soft); color: var(--gold-ink); border: 1px solid var(--gold-2); border-radius: 12px; padding: 9px 14px; font-weight: 600; }
.sum.bad { border-inline-start-color: var(--neg); }
.sub.warn { color: var(--warn); font-weight: 600; }
.track { position: relative; display: block; height: 9px; min-width: 120px; background: var(--grid); border-radius: 5px; overflow: hidden; }
.track i { position: absolute; inset-block: 0; right: 0; border-radius: 5px; }
.track i.due { background: var(--line-2); }
.track i.paid { background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.split { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.split-r { display: grid; grid-template-columns: 1fr 140px auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.split-f { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.split-f .hint { margin: 0; }
.pill-btn { border: 0; cursor: pointer; display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.pill-btn.ok { background: var(--pos-soft); color: var(--pos); }
.pill-btn.late { background: var(--neg-soft); color: var(--neg); }
.pill-btn.open { background: var(--il-soft); color: var(--il); }
input.mini { width: 64px; min-height: 30px; padding: 3px 7px; }
button.chip { cursor: default; color: inherit; font: inherit; font-size: 12.5px; margin: 1px; }
button.chip.x { cursor: pointer; }
button.chip.x:hover { border-color: var(--neg); color: var(--neg); text-decoration: line-through; }
.bank-list { margin-top: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.bank-list summary { cursor: pointer; font-weight: 600; }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; padding: 6px 0; }
.pm-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 14px 0 6px; }
.pm { margin-bottom: 8px; }
.pm th.c, .pm td.c { text-align: center; width: 90px; }
.pm input[type="radio"] { width: 17px; height: 17px; min-height: 0; accent-color: var(--gold); }
.set-form .ch { margin-top: 6px; }
.set-form .fld { margin-bottom: 10px; }
.tbl tr.done td .sub { color: var(--muted); }
@media (max-width: 820px) { .me .btn { padding: 4px 8px; font-size: 12.5px; min-height: 32px; } }
@media (max-width: 520px) { .split-r { grid-template-columns: 1fr 100px auto; } .sync-st { display: none; } }
