/* הכסף של הבית: רכיבים למסכי הכסף. משתמשים רק במשתני הסגנון, כדי שכל ערכת נושא תעבוד */
:root { --c-inc: #0E9F9A; --c-exp: #F76B15; --pos: #0B8A5A; --neg: #D93D42; }
[data-theme="bold-dark"] { --c-inc: #2DD4BF; --c-exp: #FB923C; --pos: #4ADE80; --neg: #F87171; }
[data-theme="soft-air"] { --c-inc: #0E9F9A; --c-exp: #F76B15; }

.pos { color: var(--pos); }
.neg { color: var(--neg); }
.small { font-size: 14px; }
.nav a.desk { display: none; }

/* מסננים */
.fin-filters { display: grid; gap: 10px; }
.fin-chips { margin-top: 4px; }
.fin-chips .chip-btn em { font-size: 11px; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--c-yellow) 22%, transparent); color: var(--text); opacity: 1; }
.fin-chips .chip-btn.on em { background: rgb(255 255 255 / .25); color: inherit; }
.fin-scope { justify-self: start; }
.fin-scope button { font-size: 13.5px; }

/* הודעות */
.notice { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); font-size: 15px; line-height: 1.45; background: color-mix(in srgb, var(--c-blue) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c-blue) 22%, transparent); }
.notice.warn { background: color-mix(in srgb, var(--c-red) 9%, var(--surface)); border-color: color-mix(in srgb, var(--c-red) 25%, transparent); }
.notice.warn .i { color: var(--c-red); }
.notice.soft { background: var(--surface-2); border-color: var(--line); color: var(--muted); }
.notice .i { margin-top: 1px; color: var(--c-blue); }

/* כרטיס ראשי */
.fin-hero { margin-top: 14px; padding: 20px; border-radius: var(--radius-lg); background: var(--hero); color: var(--on-hero); box-shadow: var(--shadow); backdrop-filter: var(--glass); border: 1px solid var(--line); }
.fin-hero small { font-size: 14px; font-weight: 600; opacity: .75; }
.fin-hero__net { display: grid; margin-top: 8px; }
.fin-hero__net > span { font-size: 15px; font-weight: 700; opacity: .85; }
.fin-hero__net b { font-family: var(--font-head); font-weight: var(--num-weight); font-size: 44px; line-height: 1.05; letter-spacing: -.5px; }
[data-theme="clean-pro"] .fin-hero__net b.pos { color: #5EE0A8; }
[data-theme="clean-pro"] .fin-hero__net b.neg { color: #FF8A8E; }
[data-theme="bold-dark"] .fin-hero__net b { color: inherit; }
.fin-hero__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--on-hero) 18%, transparent); }
.fin-hero__row > * > span { display: block; font-size: 13px; font-weight: 600; opacity: .75; }
.fin-hero__row b { font-family: var(--font-head); font-weight: var(--num-weight); font-size: 20px; }

/* רשת הכרטיסים */
.fin-grid { display: grid; gap: 14px; margin-top: 14px; }
.fin-col { display: grid; gap: 14px; align-content: start; }
.fin-card { padding: 16px; }
.fin-card .section__head { margin-bottom: 10px; }
.fin-card .section__head small { font-size: 13px; }

/* גרפים */
.fin-chart { width: 100%; height: auto; display: block; overflow: visible; }
.fin-chart .grid { stroke: var(--line); stroke-width: 1; }
.fin-chart .grid.zero { stroke: color-mix(in srgb, var(--text) 35%, transparent); }
.fin-chart .ax { font-size: 12px; fill: var(--muted); font-family: 'Heebo', sans-serif; }
.fin-chart .ax.m { font-weight: 700; fill: var(--text); font-size: 13px; }
.fin-chart .hit { fill: transparent; }
.fin-chart .b-inc { fill: var(--c-inc); }
.fin-chart .b-exp { fill: var(--c-exp); }
.fin-chart .bar-g { cursor: pointer; outline: none; }
.fin-chart .bar-g.part path { opacity: .45; }
.fin-chart .bar-g:hover .hit, .fin-chart .bar-g:focus .hit, .fin-chart .pt:hover .hit { fill: color-mix(in srgb, var(--text) 5%, transparent); }
.fin-chart .ln-a { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 4; }
.fin-chart .ln-b { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.fin-chart .dt-a { fill: var(--surface); stroke: var(--muted); stroke-width: 2; }
.fin-chart .dt-b { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 13.5px; font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw.inc { background: var(--c-inc); } .sw.exp { background: var(--c-exp); }
.sw.ln-a { height: 3px; background: var(--muted); } .sw.ln-b { height: 3px; background: var(--accent); }
.fin-tip { position: fixed; z-index: 90; display: none; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #1C1B22; color: #fff; font-size: 13.5px; pointer-events: none; box-shadow: 0 10px 24px rgb(0 0 0 / .25); }
.fin-tip b { font-size: 14px; }

/* פיצול קבועות/משתנות */
.split { margin-bottom: 14px; }
.split__bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.split__bar i { display: block; }
.split__lbl { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.split__lbl span { display: inline-flex; align-items: center; gap: 6px; }

/* קטגוריות */
.cat-rows { display: grid; }
.cat-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.cat-row:last-child { border-bottom: 0; }
.cat-row:hover { background: var(--surface-2); }
.cat-row__name { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.cat-row__name small { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 1px 7px; border-radius: 999px; background: var(--surface-2); }
.cat-row__val { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-head); font-weight: 800; }
.cat-row__val small { font-family: 'Heebo'; font-size: 12.5px; color: var(--muted); font-weight: 600; min-width: 30px; text-align: left; }
.cat-row__bar { grid-column: 1 / -1; position: relative; height: 6px; border-radius: 999px; background: var(--surface-2); }
.cat-row__bar i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 999px; background: var(--c); }
.cat-row__bar .budget { position: absolute; top: -4px; width: 2px; height: 14px; background: var(--text); border-radius: 2px; }
.cat-row__diff { grid-column: 1 / -1; font-size: 12.5px; font-weight: 700; }
.cat-row__diff.up { color: var(--neg); } .cat-row__diff.down { color: var(--pos); }

/* רשימות קטנות */
.mini-list { display: grid; }
.mini-list > * { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.mini-list > *:last-child { border-bottom: 0; }
.mini-list > * > span { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.mini-list > * > span:has(small) { display: grid; gap: 1px; }
.mini-list small { font-size: 13px; color: var(--muted); font-weight: 500; }
.mini-list b { font-family: var(--font-head); font-weight: 800; white-space: nowrap; }
.mini-list .i { width: 18px; height: 18px; color: var(--muted); vertical-align: -3px; margin-inline-end: 4px; }
.mini-list .seg-view { flex: none; }
.mini-list .seg-view button { height: 32px; padding: 0 12px; }

/* תנועות */
.tx-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.tx-filters select { min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14.5px; min-width: 0; }
.tx-filters select option { color: #111; }
.tx-sum { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 14.5px; color: var(--muted); font-weight: 600; }
.tx-sum b { color: var(--text); font-family: var(--font-head); }
.tx-sum .btn { margin-inline-start: auto; }
.tx-list { margin-top: 6px; }
.day-head { margin: 16px 4px 6px; font-size: 13.5px; font-weight: 800; color: var(--muted); }
.tx { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: right; cursor: pointer; backdrop-filter: var(--glass); }
.tx:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tx.skip { opacity: .6; }
.tx__ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.tx__main { flex: 1; min-width: 0; }
.tx__main b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx__main small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx__main em { font-style: normal; font-weight: 700; color: color-mix(in srgb, var(--c) 75%, var(--text)); margin-inline-end: 6px; }
.tx__main em.unc { color: var(--c-red); }
.tx__main strong { color: var(--c-blue); }
.tx__amt { flex: none; font-family: var(--font-head); font-weight: 800; font-size: 16.5px; }
.tx__amt.in { color: var(--pos); }

/* חלונית תחתונה */
.sheet-back { position: fixed; inset: 0; z-index: 70; background: rgb(0 0 0 / .35); }
.sheet { position: fixed; z-index: 71; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--bg); box-shadow: 0 -10px 40px rgb(0 0 0 / .2); display: grid; gap: 12px; }
.sheet__head { display: flex; justify-content: space-between; gap: 12px; }
.sheet__head b { display: block; font-size: 19px; font-family: var(--font-head); }
.sheet__head small { display: block; color: var(--muted); font-size: 14px; }
.sheet .switch { font-size: 15px; gap: 12px; }
.sheet__lbl { font-size: 13px; font-weight: 800; color: var(--muted); margin-top: 4px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick button { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 700; font-size: 14.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pick button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pick button.on { color: #fff; background: var(--c); border-color: transparent; }
.pick button.on::before { background: rgb(255 255 255 / .8); }
.sheet-scope { justify-self: start; }
.sheet .btn-row { margin-top: 4px; }

/* תכנון */
.ins { display: grid; gap: 10px; }
.ins__item { display: grid; gap: 6px; justify-items: start; padding: 14px; border-radius: var(--radius); background: var(--surface-2); }
.ins__item b { font-size: 16.5px; }
.ins__item p { color: var(--muted); font-size: 15px; }
.forecast-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 8px; }
.forecast-sum div { padding: 12px; border-radius: var(--radius); background: var(--surface-2); }
.forecast-sum > div > span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.forecast-sum b { font-family: var(--font-head); font-weight: 800; font-size: 17px; white-space: nowrap; }
.fin-chart .ax.lbl { font-weight: 800; fill: var(--text); direction: ltr; }
.fin-chart .ax.lbl.b { fill: var(--accent); }
.sim { display: grid; margin-top: 8px; }
.sim__row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.sim__name { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.sim__name small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.sim__vals { font-family: var(--font-head); font-weight: 800; white-space: nowrap; }
.sim__row input[type=range] { grid-column: 1 / -1; width: 100%; height: 32px; accent-color: var(--accent); }
.sim__pct { grid-column: 1 / -1; font-size: 13px; color: var(--muted); font-weight: 600; }
.sim__row.on .sim__pct { color: var(--pos); font-weight: 800; }
.sim-extra { display: grid; gap: 12px; margin-top: 14px; }
.plan-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--pos) 12%, var(--surface)); font-weight: 700; }
.plan-total b { font-family: var(--font-head); font-size: 22px; color: var(--pos); }
.plan-total > span:last-child { color: var(--muted); }

/* העלאה */
.drop { display: grid; justify-items: center; gap: 8px; margin-top: 8px; padding: 30px 20px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); text-align: center; cursor: pointer; }
.drop.over { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.drop .i { width: 34px; height: 34px; color: var(--accent); }
.drop b { font-size: 18px; }
.drop span { color: var(--muted); font-size: 14.5px; max-width: 52ch; }
.drop + .card, .fin-card + .fin-card { margin-top: 14px; }
.howto { margin: 0; padding-inline-start: 18px; display: grid; gap: 8px; font-size: 15px; }
.more-list { grid-template-columns: minmax(0, 1fr) !important; }

@media (min-width: 960px) {
  .nav a.desk { display: flex; }
  .fin-filters { grid-template-columns: 1fr auto; align-items: center; }
  .fin-chips { margin: 0; padding-inline: 0; flex-wrap: wrap; }
  .fin-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .fin-wide { grid-column: 1 / -1; }
  .fin-hero { display: grid; grid-template-columns: 1fr 1.3fr; align-items: end; gap: 20px; }
  .fin-hero > small, .fin-hero > .hero-top { grid-column: 1 / -1; }
  .fin-hero__net b { font-size: 54px; }
  .fin-hero__row { margin: 0; padding: 0 20px 0 0; border-top: 0; border-inline-start: 1px solid color-mix(in srgb, var(--on-hero) 18%, transparent); }
  .fin-hero__row b { font-size: 26px; }
  .sheet { left: 50%; right: auto; bottom: 50%; width: 560px; transform: translate(-50%, 50%); border-radius: 24px; max-height: 80vh; }
  .sim { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .sim-extra { grid-template-columns: 1fr 1fr; }
  .tx-list { max-width: 820px; }
}

/* ---------- גרסה 2: אייקונים, פילוחים ויעדים ---------- */
.cat-ico { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.cat-ico .i { width: 18px; height: 18px; }
.cat-ico.sm { width: 28px; height: 28px; border-radius: 9px; }
.cat-ico.sm .i { width: 16px; height: 16px; }
.cat-ico.xs { width: 22px; height: 22px; border-radius: 7px; margin-inline-end: 6px; vertical-align: middle; }
.cat-ico.xs .i { width: 13px; height: 13px; }
.cat-ico.lg { width: 60px; height: 60px; border-radius: 18px; }
.cat-ico.lg .i { width: 30px; height: 30px; }
.tx__ico .i { width: 20px; height: 20px; }
.mini-list .cat-ico .i { color: inherit; margin: 0; width: 16px; height: 16px; }

/* שינוי מול הממוצע */
.dl { display: block; font-size: 12.5px; font-weight: 700; opacity: .85; }
.dl.good { color: #5EE0A8; } .dl.bad { color: #FF9EA1; }
[data-theme="soft-air"] .dl.good, .mk .dl.good { color: var(--pos); }
[data-theme="soft-air"] .dl.bad, .mk .dl.bad { color: var(--neg); }
[data-theme="bold-dark"] .fin-hero .dl { color: inherit; }

/* ארבעה מספרים קטנים */
.stats-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.stat { display: grid; gap: 2px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: var(--glass); }
.stat .i { width: 20px; height: 20px; color: var(--accent); margin-bottom: 4px; }
.stat b { font-family: var(--font-head); font-weight: var(--num-weight); font-size: 24px; line-height: 1.1; }
.stat > span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat.bad b { color: var(--neg); } .stat.good b { color: var(--pos); }
.quick-acts { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px 0; padding: 2px 16px 4px; scrollbar-width: none; }
.quick-acts::-webkit-scrollbar { display: none; }
.quick-acts .i { width: 18px; height: 18px; color: var(--accent); }

/* יעדים */
.budget-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.budget-empty > div { display: flex; gap: 10px; align-items: flex-start; flex: 1 1 280px; font-size: 15px; }
.budget-empty .i { color: var(--accent); flex: none; margin-top: 2px; }
.budgets { display: grid; gap: 4px; }
.bud { display: grid; gap: 6px; padding: 10px 4px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.bud:last-child { border-bottom: 0; }
.bud:hover { background: var(--surface-2); }
.bud__top { display: flex; align-items: center; gap: 8px; }
.bud__top b { flex: 1; min-width: 0; }
.bud__top em { font-style: normal; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.bud__bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bud__bar i { display: block; height: 100%; border-radius: 999px; background: var(--pos); }
.bud.near .bud__bar i { background: var(--c-yellow); }
.bud.over .bud__bar i { background: var(--neg); }
.bud small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.bud.over small { color: var(--neg); }

/* דף קטגוריה / עסק */
.cat-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 8px; padding: 18px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--c) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 22%, var(--line)); }
.mks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; flex: 1 1 260px; }
.mk > span { display: block; font-size: 13px; color: var(--muted); font-weight: 700; }
.mk b { font-family: var(--font-head); font-weight: var(--num-weight); font-size: 24px; line-height: 1.15; }
.mk small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cat-hero + .card { margin-top: 14px; }
.fin-chart .avg-line { stroke: var(--text); stroke-width: 1.2; stroke-dasharray: 4 4; opacity: .55; }
.fin-chart .ax.val { font-weight: 800; fill: var(--text); font-size: 12px; direction: ltr; }
a.tx { text-decoration: none; color: inherit; }

/* לשוניות */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 12px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); font-weight: 800; font-size: 14.5px; cursor: pointer; color: var(--muted); }
.tabs button .i { width: 18px; height: 18px; }
.tabs button.on { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.tabs + .chips { margin-top: 4px; }
.tabs ~ .card, .tabs ~ section, .chips ~ .card { margin-top: 12px; }

/* טבלת חודש מול חודש */
.pivot-wrap { overflow-x: auto; margin: 8px -16px 0; padding: 0 16px; }
.pivot { border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 100%; }
.pivot th, .pivot td { padding: 9px 10px; white-space: nowrap; text-align: left; border-bottom: 1px solid var(--line); }
.pivot thead th { font-size: 13px; color: var(--muted); font-weight: 800; text-align: left; background: var(--surface); }
.pivot tbody th { text-align: right; font-weight: 700; position: sticky; right: 0; background: var(--surface); z-index: 1; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.pivot tbody th a { color: inherit; }
.pivot td { font-family: var(--font-head); font-weight: 700; background: color-mix(in srgb, var(--c-exp) calc(var(--h, 0) * 28%), transparent); }
.pivot tr.incrow td { background: color-mix(in srgb, var(--c-inc) calc(var(--h, 0) * 28%), transparent); }
.pivot td.part { opacity: .6; }
.pivot td.avg, .pivot th.avg { background: var(--surface-2); font-weight: 800; }
.pivot tr.tot td, .pivot tr.tot th { font-weight: 900; font-size: 15px; background: var(--surface-2); }
.pivot tr.sep th { background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 800; padding-top: 18px; position: static; }

/* לפי חשבון */
.acc { display: grid; gap: 14px; }
.acc__row { display: grid; gap: 6px; }
.acc__name { display: flex; align-items: center; gap: 8px; }
.acc__name .i { color: var(--muted); width: 20px; height: 20px; }
.acc__name b { flex: 1; min-width: 0; }
.acc__name em { font-style: normal; font-family: var(--font-head); font-weight: 800; }
.acc__name small { color: var(--muted); font-weight: 700; min-width: 36px; text-align: left; }
.acc small.muted { font-size: 13px; }

/* ימים בשבוע */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 12px; align-items: end; }
.day { display: grid; justify-items: center; gap: 3px; text-align: center; }
.day__bar { position: relative; width: 100%; max-width: 46px; height: 150px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.day__bar i { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 10px 10px 0 0; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.day.top .day__bar i { background: var(--accent); }
.day b { font-family: var(--font-head); font-size: 12px; font-weight: 800; }
.day small { font-size: 12px; color: var(--muted); font-weight: 600; }

/* העלאה: מפת כיסוי */
.drop-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.cov-wrap { overflow-x: auto; margin: 6px -16px 0; padding: 0 16px; }
.cov { border-collapse: separate; border-spacing: 4px; font-size: 13px; }
.cov th { font-weight: 800; color: var(--muted); white-space: nowrap; padding: 2px 6px; }
.cov tbody th { text-align: right; color: var(--text); }
.cov td { min-width: 56px; height: 40px; text-align: center; border-radius: 10px; font-weight: 800; font-size: 12.5px; }
.cov td.ok { background: color-mix(in srgb, var(--pos) 16%, transparent); color: var(--pos); }
.cov td.part { background: color-mix(in srgb, var(--c-yellow) 20%, transparent); color: color-mix(in srgb, var(--c-yellow) 70%, var(--text)); }
.cov td.miss { background: color-mix(in srgb, var(--neg) 12%, transparent); color: var(--neg); }
.cov td.none { background: var(--surface-2); color: var(--muted); font-weight: 600; }
.cov-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.cov-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-inline-end: 4px; }
.prev-tx { margin-top: 8px; }
.prev-tx summary { cursor: pointer; font-weight: 700; color: var(--accent); font-size: 14px; padding: 6px 0; }
.prev-tx table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.prev-tx td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.prev-tx td:last-child { text-align: left; font-weight: 700; white-space: nowrap; }
.file-del { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.file-del:hover { color: var(--neg); background: var(--surface-2); }
.file-del .i { width: 18px; height: 18px; }

@media (min-width: 960px) {
  .stats-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quick-acts { margin: 12px 0 0; padding: 2px 0; flex-wrap: wrap; }
  .tabs { margin: 12px 0 0; padding: 2px 0; flex-wrap: wrap; }
  .mks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pivot-wrap, .cov-wrap { margin: 8px 0 0; padding: 0; }
  .budgets { grid-template-columns: 1fr 1fr; column-gap: 24px; }
}

/* ---------- גרסה 3: מה בולט, בחירה מרובה, דוח חודשי ---------- */
.hl__list { display: grid; gap: 8px; }
.hl__item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid transparent; }
.hl__item:hover { border-color: var(--line); }
.hl__item b { display: block; font-size: 15.5px; }
.hl__item small { display: block; color: var(--muted); font-size: 14px; }
.hl__item.down { background: color-mix(in srgb, var(--pos) 8%, var(--surface-2)); }
.hl__item.odd, .hl__item.price { background: color-mix(in srgb, var(--c-orange) 8%, var(--surface-2)); }
.fc { display: grid; gap: 8px; margin-bottom: 14px; padding: 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); }
.fc > div > span { display: block; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.fc b { font-family: var(--font-head); font-weight: var(--num-weight); font-size: 28px; }
.fc small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.fc__bar { position: relative; height: 10px; border-radius: 999px; background: var(--surface-2); }
.fc__bar i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 999px; background: var(--accent); }
.fc__bar em { position: absolute; top: -4px; width: 2px; height: 18px; background: var(--text); border-radius: 2px; }

.day-head { display: flex; justify-content: space-between; gap: 10px; }
.day-head span:last-child { font-weight: 700; }
.tx-tools { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }
.tx-tools select { min-height: 40px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 700; font-size: 14px; }
.tx-tools .btn.on { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.tx-sum .btn { margin-inline-start: 0; }
.tx__chk { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--line); color: transparent; }
.tx__chk .i { width: 16px; height: 16px; }
.tx.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.tx.sel .tx__chk { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bulkbar { position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); max-width: 620px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 14px 40px rgb(0 0 0 / .18); }
.bulkbar b { flex: 1; min-width: 90px; }
.bulkbar .btn[disabled] { opacity: .45; pointer-events: none; }

/* דוח חודשי */
.report { display: grid; gap: 18px; margin-top: 8px; }
.rep-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rep-tools select { min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 700; }
.rep-head h2 { font-size: 26px; }
.rep-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rep-kpis .mk { padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.rep-grid { display: grid; gap: 18px; }
.report h3 { font-size: 17px; margin: 6px 0 8px; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.rep-table th { text-align: right; font-size: 13px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.rep-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.rep-table td:not(:first-child), .rep-table th:not(:first-child) { text-align: left; white-space: nowrap; }
.rep-table tr.tot td { font-weight: 900; background: var(--surface-2); }
.rep-hl { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }

@media (min-width: 960px) {
  .rep-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rep-grid { grid-template-columns: 1.3fr 1fr; }
  .bulkbar { bottom: 24px; right: 280px; }
}

@media print {
  .nav, .fab, .top .icon-btn, .top .avatar, .no-print, .toast, .bulkbar { display: none !important; }
  html, body { background: #fff !important; }
  .app { margin: 0 !important; max-width: none !important; padding: 0 !important; }
  .top { position: static; background: none; }
  .rep-kpis { grid-template-columns: repeat(4, 1fr); }
  .rep-grid { grid-template-columns: 1.3fr 1fr; }
  .rep-table, .rep-kpis .mk { border: 1px solid #ddd; }
  section { break-inside: avoid; }
}

/* ---------- גרסה 4: מצב לילה, עוגה, לוח חיובים, זרימה, חיפוש ---------- */
[data-theme="clean-night"] {
  --bg: #0E1220; --bg-fx: none; --surface: #161B2B; --surface-2: #1E2437; --text: #E8ECF6; --muted: #98A0B8; --line: #283048;
  --accent: #8B97FF; --on-accent: #0E1220; --hero: #1E2550; --on-hero: #FFFFFF; --radius: 14px; --radius-lg: 20px;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 26px rgb(0 0 0 / .28); --glass: none;
  --nav-bg: #131828; --nav-text: #7C849C; --nav-active: #E8ECF6; --nav-active-bg: transparent;
  --font-head: 'Heebo', system-ui, sans-serif; --head-weight: 800; --num-weight: 800;
  --c-inc: #2DD4BF; --c-exp: #FB923C; --pos: #4ADE80; --neg: #F87171; color-scheme: dark;
}
[data-theme="clean-night"] .nav a.on { color: var(--accent); }
[data-theme="clean-night"] .fin-hero__net b.pos { color: #5EE0A8; }
[data-theme="clean-night"] .fin-hero__net b.neg { color: #FF8A8E; }
[data-theme="clean-night"] .f select option, [data-theme="clean-night"] .tx-filters select option { color: #111; }
[data-theme="clean-night"] .toast { background: #E8ECF6; color: #0E1220; }
[data-theme="clean-night"] .toast button { color: #3B4CCA; }

/* צבעים לעוגה ולזרימה (פלטה שנבדקה לעיוורון צבעים) */
:root { --d1: #2a78d6; --d2: #eb6834; --d3: #1baf7a; --d4: #eda100; --d5: #e87ba4; --d6: #6250d6; --d-other: #A3A29C; }
[data-theme="clean-night"], [data-theme="bold-dark"] { --d1: #3987e5; --d2: #d95926; --d3: #199e70; --d4: #c98500; --d5: #d55181; --d6: #9085e9; --d-other: #6b6a65; }

/* מעבר רך בין מסכים */
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.app.enter { animation: enter .22s ease-out; }

/* כרטיס ראשי: חיצים ומספרים לחיצים */
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-top small { font-size: 14px; font-weight: 600; opacity: .75; }
.mnav { display: inline-flex; gap: 6px; }
.mnav button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--on-hero) 25%, transparent); background: transparent; color: var(--on-hero); cursor: pointer; }
.mnav button[disabled] { opacity: .3; cursor: default; }
.mnav button .i { width: 18px; height: 18px; }
.mnav .next .i { transform: rotate(180deg); }
.fin-hero__row > a { color: inherit; border-radius: 10px; padding: 2px 4px; margin: -2px -4px; }
.fin-hero__row > a:hover { background: color-mix(in srgb, var(--on-hero) 8%, transparent); }

/* עוגה */
.donut { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: center; }
.donut svg { width: 170px; height: 170px; }
.dn-seg { fill: none; stroke-width: 26; cursor: pointer; transition: stroke-width .15s; }
.dn-seg:hover { stroke-width: 32; }
.dn-l { font-size: 12px; fill: var(--muted); font-weight: 700; }
.dn-v { font-size: 19px; fill: var(--text); font-weight: 900; font-family: var(--font-head); direction: ltr; }
.dn-legend { display: grid; gap: 4px; min-width: 0; }
.dn-legend a { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; font-size: 14.5px; min-width: 0; }
.dn-legend a:hover { background: var(--surface-2); }
.dn-legend i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.dn-legend span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.dn-legend b { font-family: var(--font-head); }

/* לוח חיובים */
.up-sum { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.up-sum b { font-family: var(--font-head); font-size: 16px; }
.up-list { display: grid; }
.up-item { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.up-item:last-child { border-bottom: 0; }
.up-date { display: grid; justify-items: center; width: 42px; flex: none; padding: 4px 0; border-radius: 10px; background: var(--surface-2); line-height: 1.1; }
.up-date b { font-size: 17px; font-family: var(--font-head); }
.up-date small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.up-name { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.up-name > span { display: grid; min-width: 0; }
.up-name b { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-name small { font-size: 12.5px; color: var(--muted); }
.up-amt { font-family: var(--font-head); font-weight: 800; white-space: nowrap; }
.up-item.in .up-amt { color: var(--pos); }

/* הצעדים הבאים */
.steps .bud__bar { margin-bottom: 10px; }
.steps__list { display: grid; gap: 6px; }
.step { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px; text-align: right; cursor: pointer; color: var(--text); }
.step .i { color: var(--accent); width: 20px; height: 20px; flex: none; }
.step:hover { border-color: var(--accent); }
.step.done { border-style: dashed; color: var(--muted); cursor: default; font-weight: 600; }
.step.done .i { color: var(--pos); }

/* יעדי חיסכון */
.goals { display: grid; gap: 10px; }
.goal { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.goal__ring { --p: 0; display: grid; place-items: center; width: 58px; height: 58px; flex: none; border-radius: 50%; background: radial-gradient(closest-side, var(--surface-2) 72%, transparent 73%), conic-gradient(var(--pos) calc(var(--p) * 1%), var(--line) 0); }
.goal__ring b { font-size: 13px; font-weight: 900; }
.goal__main { display: grid; min-width: 0; }
.goal__main small { font-size: 13px; color: var(--muted); font-weight: 600; }
.goal__main small.pos, .goal__main small.neg { font-weight: 700; }
.goal__main small.pos { color: var(--pos); } .goal__main small.neg { color: var(--neg); }

/* זרימת הכסף */
.sankey .sk-band { fill: color-mix(in srgb, var(--c) 30%, transparent); stroke: none; transition: fill .15s; }
.sankey .sk-band:hover { fill: color-mix(in srgb, var(--c) 55%, transparent); }
.sankey .sk-center { fill: var(--text); opacity: .8; }
.sankey .sk-node { cursor: pointer; }
.sankey .sk-lbl { font-size: 12.5px; font-weight: 700; fill: var(--text); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }

/* השוואת חודשים */
.vs-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vs-pick select { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 800; font-size: 15px; }
.vs-pick span { font-weight: 700; color: var(--muted); }
.vs-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.vs-kpi { padding: 12px; border-radius: 12px; background: var(--surface-2); }
.vs-kpi > span { display: block; font-size: 13px; color: var(--muted); font-weight: 700; }
.vs-kpi b { font-family: var(--font-head); font-size: 19px; }
.vs-kpi small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.vs-list { display: grid; }
.vs-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.vs-row:hover { background: var(--surface-2); }
.vs-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vs-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-vals { font-family: var(--font-head); white-space: nowrap; }
.vs-vals small { color: var(--muted); font-weight: 600; }
.vs-bar { position: relative; height: 6px; grid-column: 1; }
.vs-bar i { position: absolute; top: 0; height: 6px; border-radius: 999px; inset-inline-start: 50%; }
.vs-bar i.up { background: var(--neg); }
.vs-bar i.down { background: var(--pos); inset-inline-start: auto; inset-inline-end: 50%; }
.vs-bar::after { content: ""; position: absolute; top: -3px; bottom: -3px; inset-inline-start: 50%; width: 1px; background: var(--line); }
.vs-d { font-family: var(--font-head); font-weight: 800; font-size: 14px; text-align: left; }

/* חיפוש בכל המערכת */
.pal { position: fixed; inset: 0; z-index: 100; }
.pal__back { position: absolute; inset: 0; background: rgb(0 0 0 / .4); }
.pal__box { position: relative; margin: 8vh auto 0; width: min(620px, calc(100% - 24px)); max-height: 78vh; display: flex; flex-direction: column; border-radius: 20px; background: var(--bg); box-shadow: 0 24px 60px rgb(0 0 0 / .35); overflow: hidden; }
.pal__in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pal__in .i { color: var(--muted); }
.pal__in input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 17px; }
.pal__in kbd { font: 700 12px 'Heebo'; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.pal__list { overflow-y: auto; padding: 6px; }
.pal__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.pal__item .i { color: var(--accent); flex: none; }
.pal__item span { display: grid; min-width: 0; }
.pal__item b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal__item small { color: var(--muted); font-size: 13px; }
.pal__item.on, .pal__item:hover { background: var(--surface-2); }
.pal__empty { padding: 20px; text-align: center; }
.top .icon-btn[data-gsearch] { box-shadow: none; border: 1px solid var(--line); }

@media (max-width: 420px) {
  .donut { grid-template-columns: 1fr; justify-items: center; }
  .dn-legend { width: 100%; }
  .vs-kpis { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .app.enter { animation: none; } }

/* ---------- גרסה 5: מראה מודרני ונוחות ---------- */
/* בסיס: מספרים ברוחב קבוע, מעברים רכים, תחושת לחיצה */
body { font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: auto; }
[data-theme="clean-pro"] { --bg: #F3F5F9; --line: #E6E9F0; --shadow: 0 1px 2px rgb(16 24 40 / .04), 0 8px 28px rgb(16 24 40 / .06); --radius: 16px; --radius-lg: 22px; --hero: #0F172A; }
[data-theme="clean-night"] { --radius: 16px; --radius-lg: 22px; }
.card, .stat, .kpi, .item, .tx, .chip-btn, .btn, .step, .goal, .hl__item, .qk-tile, .alert-pill { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease; }
a.card:hover, .stat:hover, .item:hover, .hl__item:hover, .goal:hover, .alert-pill:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgb(16 24 40 / .05), 0 14px 34px rgb(16 24 40 / .10); }
.btn:active, .chip-btn:active, .tx:active, .qk-tile:active, .step:active { transform: scale(.98); }
.btn--primary:hover { filter: brightness(1.06); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 10px; }

/* פס עליון שקוף עם טשטוש */
.top { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); margin-inline: -16px; padding-inline: 16px; border-bottom: 1px solid transparent; }
.top__title h1 { font-size: 24px; letter-spacing: -.3px; }
.section__head h2 { font-size: 18px; letter-spacing: -.2px; }
.fin-card { padding: 18px; }

/* כרטיס ראשי עם הילה עדינה בצבע ההדגשה */
.fin-hero { position: relative; overflow: hidden; padding: 22px; background: radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--accent) 28%, transparent) 0%, transparent 55%), var(--hero); border: 0; box-shadow: 0 18px 40px color-mix(in srgb, var(--hero) 30%, transparent); }
[data-theme="soft-air"] .fin-hero, [data-theme="bold-dark"] .fin-hero { background: var(--hero); }
.fin-hero__net b { letter-spacing: -1px; }
.hero-say { margin-top: 10px; font-size: 15.5px; line-height: 1.6; color: color-mix(in srgb, var(--on-hero) 80%, transparent); max-width: 60ch; }
.hero-say b { color: var(--on-hero); font-weight: 800; }

/* התראות קומפקטיות */
.alerts { display: grid; gap: 8px; margin-top: 12px; }
.alert-pill { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); }
.alert-pill > .i { flex: none; width: 36px; height: 36px; padding: 8px; border-radius: 12px; color: var(--c-blue); background: color-mix(in srgb, var(--c-blue) 12%, transparent); }
.alert-pill.warn > .i { color: var(--c-red); background: color-mix(in srgb, var(--c-red) 12%, transparent); }
.alert-pill span { display: grid; flex: 1; min-width: 0; }
.alert-pill b { font-size: 15px; }
.alert-pill small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-pill em { flex: none; font-style: normal; font-weight: 800; font-size: 13.5px; padding: 7px 12px; border-radius: 999px; color: var(--on-accent); background: var(--accent); }
.tx-sum + .alert-pill, .tx-filters + .alert-pill { margin-top: 12px; }

/* ניווט צד במחשב: מותג וכפתורים מודרניים */
.nav-brand { display: none; }
@media (min-width: 960px) {
  .nav { gap: 2px; padding: 14px 12px !important; box-shadow: var(--shadow); }
  .nav-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
  .nav-brand__mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--on-accent); background: var(--accent); box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
  .nav-brand span:last-child { display: grid; min-width: 0; }
  .nav-brand b { font-family: var(--font-head); font-size: 16px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-brand small { font-size: 12.5px; color: var(--muted); }
  .nav a { font-weight: 700 !important; }
  .nav a:hover { background: var(--surface-2); color: var(--text); }
  [data-theme="clean-pro"] .nav a.on, [data-theme="clean-night"] .nav a.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, transparent); }
  .alerts { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}

/* הצעות בחלונית הסיווג */
.pick--sug button { min-height: 48px; font-size: 15px; border-color: color-mix(in srgb, var(--c) 35%, var(--line)); background: color-mix(in srgb, var(--c) 7%, var(--surface)); }
.pick--sug button::before { display: none; }
.pick--sug .i { width: 18px; height: 18px; color: var(--c); }
.pick--sug button.on .i { color: #fff; }

/* סיווג מהיר */
.qk { max-width: 620px; margin: 4px auto 0; display: grid; gap: 14px; }
.qk-prog { display: flex; align-items: center; gap: 12px; }
.qk-prog .bud__bar { flex: 1; }
.qk-prog small { color: var(--muted); font-weight: 700; white-space: nowrap; }
.qk-card { position: relative; padding: 24px 20px 18px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; display: grid; gap: 6px; justify-items: center; }
.qk-kind { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--c-red); background: color-mix(in srgb, var(--c-red) 10%, transparent); }
.qk-kind.in { color: var(--pos); background: color-mix(in srgb, var(--pos) 12%, transparent); }
.qk-card h2 { font-size: 24px; overflow-wrap: anywhere; }
.qk-amt { font-family: var(--font-head); font-weight: 900; font-size: 40px; letter-spacing: -1px; }
.qk-note { font-size: 14px; color: var(--muted); background: var(--surface-2); padding: 6px 12px; border-radius: 10px; }
.qk-all { width: 100%; margin-top: 8px; text-align: right; font-size: 14.5px; gap: 12px; }
.qk-lbl { font-weight: 800; }
.qk-sug { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qk-tile { position: relative; display: grid; justify-items: start; gap: 4px; min-height: 92px; padding: 14px; border-radius: 18px; border: 1.5px solid color-mix(in srgb, var(--c) 30%, var(--line)); background: color-mix(in srgb, var(--c) 6%, var(--surface)); text-align: right; cursor: pointer; color: var(--text); }
.qk-tile:hover { border-color: var(--c); box-shadow: 0 10px 24px color-mix(in srgb, var(--c) 18%, transparent); }
.qk-tile b { font-size: 15.5px; }
.qk-tile small { font-size: 12.5px; color: var(--muted); }
.qk-tile kbd { position: absolute; top: 10px; left: 10px; font: 800 12px 'Heebo'; padding: 2px 7px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.qk-more { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 4px 14px 14px; }
.qk-more summary { cursor: pointer; padding: 10px 0; font-weight: 800; color: var(--accent); }
.qk-more .search { margin: 4px 0 10px; }
.qk-more .pick { margin-bottom: 10px; }
.qk-nav { display: flex; justify-content: space-between; gap: 10px; }
.qk-nav [data-qskip] .i { transform: rotate(180deg); }
.qk-nav .btn[disabled] { opacity: .4; pointer-events: none; }
.qk-done { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 40px 16px; }
.qk-done__ic { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; color: #fff; background: var(--pos); box-shadow: 0 16px 36px color-mix(in srgb, var(--pos) 35%, transparent); animation: pop .4s cubic-bezier(.2, 1.4, .4, 1); }
.qk-done__ic .i { width: 42px; height: 42px; }
.qk-done h2 { font-size: 26px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) { .qk-sug { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* כפתור פעולות צף */
.dial { position: fixed; z-index: 50; left: 18px; bottom: calc(92px + env(safe-area-inset-bottom)); display: grid; justify-items: start; gap: 10px; }
.dial[hidden] { display: none; }
.dial__btn { display: grid; place-items: center; width: 60px; height: 60px; border: 0; border-radius: 20px; color: var(--on-accent); background: var(--accent); box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 45%, transparent); cursor: pointer; transition: transform .2s, border-radius .2s; order: 2; }
.dial__btn .i { width: 28px; height: 28px; transition: transform .2s; }
.dial.open .dial__btn .i { transform: rotate(45deg); }
.dial__menu { display: grid; gap: 6px; order: 1; opacity: 0; transform: translateY(10px) scale(.96); transform-origin: bottom left; pointer-events: none; transition: .18s ease; }
.dial.open .dial__menu { opacity: 1; transform: none; pointer-events: auto; }
.dial__item { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px 0 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 26px rgb(16 24 40 / .14); font-weight: 800; color: var(--text); white-space: nowrap; }
.dial__item .i { color: var(--accent); width: 20px; height: 20px; }
.dial__item small { margin-inline-start: auto; min-width: 24px; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 800; text-align: center; color: #fff; background: var(--c-red); }
@media (min-width: 960px) { .dial { bottom: 28px; left: 32px; } }

/* גרירת קבצים לכל המסך */
.drop-all { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 22%, rgb(10 14 30 / .55)); backdrop-filter: blur(4px); }
.drop-all div { display: grid; justify-items: center; gap: 8px; padding: 40px 50px; border-radius: 28px; border: 3px dashed #fff; color: #fff; text-align: center; }
.drop-all .i { width: 52px; height: 52px; }
.drop-all b { font-size: 26px; }

.fin-grid { align-items: start; }

@media (hover: none) { .qk-tile kbd, .qk-lbl small { display: none; } }

/* ---------- גרסה 6: חלונית פירוט וכפילויות ---------- */
[data-drill] { cursor: pointer; }
.pivot td.click:hover, .rep-table tr.click:hover td { background: color-mix(in srgb, var(--accent) 14%, transparent) !important; outline: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.acc__row[data-drill] { padding: 8px; margin: -8px; border-radius: 12px; }
.acc__row[data-drill]:hover { background: var(--surface-2); }
.cat-row::after { content: "פירוט ‹"; grid-column: 1 / -1; justify-self: end; font-size: 12px; font-weight: 800; color: var(--accent); opacity: 0; transition: opacity .15s; margin-top: -2px; }
.cat-row:hover::after { opacity: 1; }
@media (hover: none) { .cat-row::after { display: none; } }

.drill { position: relative; z-index: 110; }
body.dr-open { overflow: hidden; }
.dr-back { position: fixed; inset: 0; background: rgb(10 14 30 / .42); animation: fadeIn .18s ease; }
.dr { position: fixed; left: 0; right: 0; bottom: 0; max-height: 90vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 24px 24px 0 0; box-shadow: 0 -16px 50px rgb(0 0 0 / .25); animation: slideUp .25s cubic-bezier(.2, .9, .3, 1); }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideIn { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dr__head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 10px; }
.dr__head > div { flex: 1; min-width: 0; display: grid; }
.dr__head b { font-family: var(--font-head); font-size: 20px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr__head small { color: var(--muted); font-size: 13.5px; }
.dr__sum { display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.dr__sum > div { flex: 1 0 auto; min-width: 96px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.dr__sum > div:first-child { background: var(--hero); color: var(--on-hero); border-color: transparent; }
.dr__sum > div > span { display: block; font-size: 12.5px; font-weight: 700; opacity: .75; }
.dr__sum b { font-family: var(--font-head); font-size: 20px; font-weight: 900; white-space: nowrap; }
.dr__note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 16px 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; background: var(--surface-2); }
.dr__note .i { width: 18px; height: 18px; flex: none; color: var(--c-blue); margin-top: 1px; }
.dr__note.warn { background: color-mix(in srgb, var(--c-red) 9%, var(--surface)); }
.dr__note.warn .i { color: var(--c-red); }
.dr__seg { margin: 12px 16px 6px; align-self: flex-start; }
.dr__seg button { font-size: 13.5px; }
.dr__body { overflow-y: auto; padding: 4px 16px 10px; flex: 1; }
.dr__foot { display: flex; gap: 8px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.dr__foot .btn { flex: 1; }

.dg { border-bottom: 1px solid var(--line); }
.dg summary { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 11px 2px; cursor: pointer; list-style: none; }
.dg summary::-webkit-details-marker { display: none; }
.dg__name { display: grid; min-width: 0; }
.dg__name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg__name small { font-size: 13px; color: var(--muted); }
.dg__name em, .dr-row em { font-style: normal; font-weight: 800; color: var(--c-red); }
.dg__v { font-family: var(--font-head); font-weight: 800; }
.dg__bar { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: var(--surface-2); position: relative; }
.dg__bar i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 999px; background: var(--accent); opacity: .7; }
.dg[open] summary { background: var(--surface-2); border-radius: 10px; padding-inline: 8px; }
.dg.dup summary .dg__name b { color: var(--c-red); }
.dr-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); }
.dr-row:hover { background: var(--surface-2); }
.dr-row span { display: grid; min-width: 0; }
.dr-row span b { font-size: 14px; }
.dr-row small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-row em { font-size: 12.5px; }
.dr-row > b { font-family: var(--font-head); font-weight: 800; white-space: nowrap; }
.dr-row.dup { background: color-mix(in srgb, var(--c-red) 7%, transparent); }
.dg-flat .dr-row { border-bottom: 1px solid var(--line); border-radius: 0; }

@media (min-width: 960px) {
  .dr { top: 12px; bottom: 12px; left: 12px; right: auto; width: 520px; max-height: none; border-radius: 24px; animation: slideIn .25s cubic-bezier(.2, .9, .3, 1); }
}
@media (prefers-reduced-motion: reduce) { .dr, .dr-back { animation: none; } }

.dr__sum b { line-height: 1.3; display: block; }

/* ---------- גרסה 7: מינוס, הלוואות, עסק, פיצול ותגיות ---------- */
.bal .bal-line { fill: none; stroke: var(--text); stroke-width: 2; }
.bal .bal-neg { fill: color-mix(in srgb, var(--neg) 22%, transparent); }
.bal .bal-pos { fill: color-mix(in srgb, var(--pos) 18%, transparent); }
.od-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.od-kpis > div { padding: 12px; border-radius: 14px; background: var(--surface-2); }
.od-kpis > div > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.od-kpis b { font-family: var(--font-head); font-size: 20px; font-weight: 800; }
.od-kpis small { display: block; font-size: 12px; color: var(--muted); }
.od-plan { margin-top: 16px; padding: 16px; border-radius: 18px; border: 1.5px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); display: grid; gap: 10px; }
.od-plan h3 { font-size: 17px; }
.od-range { display: grid; gap: 4px; font-weight: 700; }
.od-range input { width: 100%; height: 32px; accent-color: var(--accent); }
.od-res { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.od-res > div { padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.od-res > div > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.od-res b { font-family: var(--font-head); font-size: 20px; }
.od-res small { display: block; font-size: 12px; color: var(--muted); }
.od-warn { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c-orange) 10%, var(--surface)); font-size: 14px; }
.od-warn .i { color: var(--c-orange); width: 18px; height: 18px; flex: none; margin-top: 2px; }
@media (min-width: 960px) { .od-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ln-sum { display: flex; gap: 16px; margin-bottom: 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.ln-sum b { font-family: var(--font-head); color: var(--text); font-size: 16px; }
.mini-list em.neg { font-style: normal; font-weight: 800; }

.biz-set { display: grid; gap: 10px; margin-top: 12px; }
.biz-sug { display: flex !important; align-items: center; gap: 12px; cursor: pointer; }
.biz-sug input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.biz-sug span { display: grid; flex: 1; min-width: 0; }

/* פיצול ותגיות בחלונית */
.sx { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 0 12px; }
.sx summary { display: flex; align-items: center; gap: 8px; min-height: 46px; cursor: pointer; font-weight: 800; list-style: none; }
.sx summary::-webkit-details-marker { display: none; }
.sx summary .i { width: 18px; height: 18px; color: var(--accent); }
.sx[open] { padding-bottom: 12px; }
.sx__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tagchip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px dashed var(--line); background: transparent; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--text); }
.tagchip.on { border-style: solid; border-color: transparent; color: var(--on-accent); background: var(--accent); }
.sx__row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.sx__row > input, .sx__row select, .sx__row .money-in { flex: 1; min-width: 0; }
.sx__row input, .sx__row select { width: 100%; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 15px; }
.sx__row .money-in { position: relative; }
.sx__row .money-in b { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.sx .btn { flex: none; }

/* מה אם */
.whatif { margin-top: 16px; padding: 14px; border-radius: 16px; background: var(--surface-2); }
.whatif .sheet__lbl { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--text); font-size: 15px; }
.whatif .sheet__lbl .i { width: 18px; height: 18px; color: var(--accent); }
.whatif__row { display: grid; gap: 10px; }
@media (min-width: 640px) { .whatif__row { grid-template-columns: 2fr 1fr 1fr; } }

.dial { justify-items: end; }
.dial__menu { justify-items: end; }

/* ---------- ענן: מסך כניסה ונקודת שמירה ---------- */
.login-card { width: min(440px, 100%); text-align: right !important; gap: 14px !important; }
.login-card h1, .login-card > p:first-of-type { text-align: center; }
.login-mark { justify-self: center; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; color: var(--on-accent); background: var(--accent); box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 35%, transparent); }
.login-mark .i { width: 32px; height: 32px; }
.login-card small { font-size: 13px; }
.login-card .muted.small .i { width: 15px; height: 15px; vertical-align: -3px; }
.login-err { padding: 10px 12px; border-radius: 12px; font-weight: 700; color: var(--neg); background: color-mix(in srgb, var(--neg) 10%, transparent); }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--pos); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pos) 18%, transparent); }
.sync-dot[data-sync="saving"] { background: var(--c-yellow); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-yellow) 22%, transparent); animation: pulse 1s infinite; }
.sync-dot[data-sync="error"] { background: var(--neg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--neg) 20%, transparent); }
@keyframes pulse { 50% { opacity: .4; } }
