/* כספית – עיצוב */
@font-face { font-family: 'Heebo'; src: url('fonts/Heebo.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f3f4fa; --bg2: #eceef7; --card: #ffffff; --ink: #121528; --ink2: #4b5068; --muted: #858aa3; --line: #e5e7f1;
  --brand: #5b4cf0; --brand-d: #4636d6; --brand2: #22c4a6; --soft: #efedff; --soft-ink: #4636d6;
  --good: #11a077; --good-bg: #e3f7ef; --warn: #c97f00; --warn-bg: #fff4dc; --bad: #dc3d55; --bad-bg: #fde8eb; --info-bg: #ebf2ff;
  --shadow: 0 1px 2px rgba(20, 22, 50, .04), 0 6px 24px rgba(20, 22, 50, .06);
  --shadow-lg: 0 18px 50px rgba(20, 22, 50, .18);
  --r: 20px; --r-sm: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --hero: linear-gradient(135deg, #5b4cf0 0%, #7a4ff0 45%, #2bb8a8 120%);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0e1a; --bg2: #121527; --card: #161a2c; --ink: #eef0fa; --ink2: #b9bed6; --muted: #7f86a3; --line: #262b43;
  --brand: #8b80ff; --brand-d: #a39aff; --brand2: #2fd3b4; --soft: #252158; --soft-ink: #c5bfff;
  --good: #34c896; --good-bg: #113328; --warn: #f2aa2e; --warn-bg: #3a2c0e; --bad: #ff6b80; --bad-bg: #3d1820; --info-bg: #182446;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
  --hero: linear-gradient(135deg, #4a3cd8 0%, #6a3fd6 45%, #1d9c8e 120%);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; font-size: 15px; line-height: 1.45; }
body { min-height: 100vh; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.3px; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
h4 { font-size: 13px; font-weight: 700; color: var(--muted); margin: 22px 4px 8px; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.pos { color: var(--good) !important; }
.neg { color: var(--bad) !important; }
.mt { margin-top: 14px; }
.row { display: flex; align-items: center; }
.gap { gap: 10px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; justify-content: center; }
.w100 { width: 100%; }
.ic { flex: none; }
.boot { height: 100vh; display: grid; place-items: center; }
.boot-logo { width: 56px; height: 56px; border-radius: 16px; background: var(--hero); animation: pulse 1.2s infinite; }

/* ---------- מבנה ---------- */
#app { min-height: 100vh; }
.side { display: none; }
.col { max-width: 640px; margin: 0 auto; padding: 0 16px calc(96px + var(--safe-b)); }
.top { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + var(--safe-t)) 2px 12px; position: sticky; top: 0; z-index: 20; background: linear-gradient(var(--bg) 70%, transparent); }
.who { display: flex; align-items: center; gap: 10px; }
.who b { display: block; font-size: 17px; font-weight: 700; }
.who small { color: var(--muted); font-size: 12.5px; }
.logo { display: inline-block; width: 36px; height: 36px; }
.logo.sm { width: 38px; height: 38px; }
.logo.lg { width: 76px; height: 76px; margin: 0 auto 10px; display: block; }
.top-a { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink2); background: var(--card); box-shadow: var(--shadow); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.danger { color: var(--bad); }
.net { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--card); color: var(--muted); box-shadow: var(--shadow); }
.net.ai { color: var(--brand); }
.net.off { color: var(--warn); background: var(--warn-bg); }
main.enter { animation: fadeUp .35s ease both; }

/* ניווט תחתון */
.tabs { position: fixed; bottom: 0; inset-inline: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 8px 10px calc(8px + var(--safe-b)); background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 4px 0; transition: color .2s; }
.tab.on { color: var(--brand); }
.tab.on .ic { transform: translateY(-1px); }
.fab { justify-self: center; width: 60px; height: 60px; margin-top: -26px; border-radius: 20px; background: var(--hero); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(91, 76, 240, .45); transition: transform .15s; }
.fab:active { transform: scale(.92) rotate(90deg); }

/* ---------- כפתורים ושדות ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 14px; font-weight: 700; font-size: 15px; transition: transform .12s, background .2s; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(91, 76, 240, .3); }
.btn.soft { background: var(--soft); color: var(--soft-ink); }
.btn.ghost { background: var(--bg2); color: var(--ink2); }
.btn.danger { background: var(--bad-bg); color: var(--bad); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 11px; }
.big-btn { height: 54px; font-size: 17px; border-radius: 16px; }
.link { color: var(--brand); font-weight: 600; font-size: 14px; }
.link.danger { color: var(--bad); }
.link-w { color: #fff; font-weight: 700; opacity: .9; text-decoration: underline; text-underline-offset: 3px; margin-top: 4px; }
.input { width: 100%; height: 46px; padding: 0 14px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--card); outline: none; transition: border .2s, box-shadow .2s; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 18px 20px, 13px 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-left: 30px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 6px; }
.err { color: var(--bad); min-height: 20px; font-size: 14px; }
.switch-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; font-size: 14.5px; }
.switch-row input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .2s; cursor: pointer; }
.switch-row input::after { content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch-row input:checked { background: var(--brand); }
.switch-row input:checked::after { transform: translateX(-18px); }
input[type=range] { width: 100%; accent-color: var(--brand); }

.chips { display: flex; gap: 8px; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; margin: 0 -16px; padding-inline: 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--card); border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink2); white-space: nowrap; transition: all .15s; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.sel { appearance: none; padding-inline: 14px; outline: none; }
.chip.emo { width: 44px; padding: 0; font-size: 20px; }
.seg2 { display: inline-flex; background: var(--bg2); padding: 4px; border-radius: 14px; }
.seg2 button { flex: 1; height: 36px; padding: 0 18px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); transition: all .2s; }
.seg2 button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.tag { font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--bg2); color: var(--ink2); white-space: nowrap; }
.tag.up { background: var(--bad-bg); color: var(--bad); }
.tag.down { background: var(--good-bg); color: var(--good); }
.spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-top-color: transparent; border-radius: 50%; display: inline-block; animation: rot .7s linear infinite; }

/* ---------- כרטיסים ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; display: block; width: 100%; text-align: inherit; }
.card.hl { outline: 2px solid var(--brand); }
.sec { margin-bottom: 14px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.sec-h h2 { display: flex; align-items: center; gap: 6px; }
.grid2 { display: grid; gap: 0 14px; }
.page-h { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 14px; gap: 10px; flex-wrap: wrap; }
.mswitch { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border-radius: 99px; padding: 4px; box-shadow: var(--shadow); font-weight: 700; font-size: 14px; }
.mswitch button { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); }
.mswitch button:disabled { opacity: .3; }
.mswitch span { min-width: 96px; text-align: center; }

/* ---------- מסך בית ---------- */
.hero { position: relative; border-radius: 26px; padding: 18px 20px 16px; color: #fff; overflow: hidden; margin-bottom: 14px; box-shadow: 0 14px 34px rgba(76, 60, 220, .32); isolation: isolate; }
.hero-bg { position: absolute; inset: 0; background: var(--hero); z-index: -2; }
.hero-bg::before, .hero-bg::after { content: ''; position: absolute; border-radius: 50%; filter: blur(4px); }
.hero-bg::before { width: 240px; height: 240px; left: -70px; top: -110px; background: radial-gradient(circle, rgba(255,255,255,.28), transparent 65%); }
.hero-bg::after { width: 200px; height: 200px; right: -60px; bottom: -120px; background: radial-gradient(circle, rgba(60,255,210,.35), transparent 65%); }
.hero-top { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 14px; opacity: .95; }
.hb-btn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); color: #fff; }
.hb-btn:disabled { opacity: .25; }
.hero-main { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 14px; gap: 12px; }
.hero-main small { opacity: .85; font-size: 13.5px; display: block; }
.hero-main .op { opacity: .78; font-size: 12.5px; }
.big { font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; font-variant-numeric: tabular-nums; direction: ltr; text-align: right; }
.hero-ring .ring-t { fill: #fff; font-weight: 800; font-size: 16px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-stats > div { background: rgba(255,255,255,.14); border-radius: 14px; padding: 8px 10px; backdrop-filter: blur(6px); }
.hero-stats small { display: block; font-size: 12px; opacity: .85; }
.hero-stats b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-stats b.neg { color: #ffd0d6 !important; }
.hero-stats .safe { background: rgba(255,255,255,.95); color: #2a1f9e; }
.hero-stats .safe small { opacity: .7; }

.quick { margin-bottom: 18px; }
.qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.qa-b { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); font-size: 12.5px; font-weight: 700; color: var(--ink2); transition: transform .12s; }
.qa-b:active { transform: scale(.95); }
.qa-b .ic { width: 42px; height: 42px; padding: 10px; border-radius: 14px; background: var(--soft); color: var(--brand); }
.qa-b.scan .ic { background: var(--hero); color: #fff; }
.qa-b.inc .ic { background: var(--good-bg); color: var(--good); }
.smart { display: flex; align-items: center; gap: 6px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 5px 10px 5px 5px; border: 1.5px solid transparent; transition: border .2s; }
.smart:focus-within { border-color: var(--brand); }
.smart .sp { color: var(--brand); display: grid; place-items: center; }
.smart input { flex: 1; border: 0; outline: 0; background: transparent; height: 42px; min-width: 0; font-size: 14.5px; }
.sm-go { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; }

.ins-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 8px; }
.ins-row::-webkit-scrollbar { display: none; }
.ins-row .ins { flex: 0 0 82%; max-width: 330px; scroll-snap-align: start; }
.ins { display: flex; gap: 12px; align-items: flex-start; text-align: right; padding: 14px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); border-inline-start: 4px solid var(--brand); width: 100%; }
.ins.good { border-color: var(--good); }
.ins.warn { border-color: var(--warn); }
.ins.bad { border-color: var(--bad); }
.ins-i { font-size: 22px; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--info-bg); }
.ins.good .ins-i { background: var(--good-bg); }
.ins.warn .ins-i { background: var(--warn-bg); }
.ins.bad .ins-i { background: var(--bad-bg); }
.ins-b b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.ins-b small { color: var(--ink2); font-size: 13px; line-height: 1.45; display: block; }
.ins-list { display: grid; gap: 10px; }
.ins-list.ai { margin-bottom: 10px; }
.ins-list .ins { box-shadow: none; background: var(--bg2); }
.ai-tag { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: var(--hero); color: #fff; vertical-align: middle; }

/* דונאט */
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.donut { position: relative; }
.donut svg { width: 100%; height: 100%; overflow: visible; }
.donut .seg { transition: stroke-width .2s; cursor: pointer; animation: grow .8s ease both; }
.donut .seg:hover { stroke-width: 16; }
.donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-c small { color: var(--muted); font-size: 12px; }
.donut-c b { font-size: 21px; font-weight: 800; }
.legend { list-style: none; padding: 0; margin: 0; width: 100%; display: grid; gap: 2px; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto 40px; align-items: center; gap: 8px; padding: 6px 4px; font-size: 13.5px; border-radius: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend .ln { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink2); }
.legend b { font-variant-numeric: tabular-nums; }
.legend em { font-style: normal; color: var(--muted); font-size: 12px; text-align: left; }

/* תקציבים */
.bud { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 0; text-align: right; }
.bud-b { flex: 1; min-width: 0; }
.bud-t { display: flex; justify-content: space-between; gap: 6px; font-size: 14px; margin-bottom: 6px; }
.bud-t small { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-t { display: block; height: 8px; border-radius: 99px; background: var(--bg2); overflow: hidden; margin-top: 4px; }
.bar-f { display: block; height: 100%; border-radius: 99px; background: var(--good); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.bar-f.warn { background: var(--warn); }
.bar-f.bad { background: var(--bad); }

.goal-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 8px; }
.goal { flex: 0 0 150px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); text-align: center; }
.goal b { font-size: 14px; }
.goal small { color: var(--muted); font-size: 12px; }
.ring-t { font-size: 13px; font-weight: 800; fill: var(--ink); }
.ring-p { transition: stroke-dasharray 1s cubic-bezier(.2,.8,.2,1); }

/* תנועות */
.txl { display: flex; flex-direction: column; }
.card.txl { padding: 4px 12px; }
.tx { display: flex; align-items: center; gap: 12px; padding: 10px 2px; width: 100%; text-align: right; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.tx:active { opacity: .7; }
.cb { flex: none; display: grid; place-items: center; border-radius: 14px; font-size: 20px; background: hsl(var(--h) 85% 94%); }
:root[data-theme=dark] .cb { background: hsl(var(--h) 35% 20%); }
.tx-t { flex: 1; min-width: 0; }
.tx-t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-t small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-a { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; align-items: center; gap: 4px; direction: ltr; }
.tx-a i { color: var(--muted); display: inline-flex; }
.day { margin-bottom: 4px; }
.day-h { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 700; padding: 6px 6px; }
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 14px; padding: 0 14px; box-shadow: var(--shadow); margin-bottom: 10px; color: var(--muted); }
.searchbar input { flex: 1; border: 0; outline: 0; background: transparent; height: 46px; color: var(--ink); min-width: 0; }
.tx-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13.5px; color: var(--muted); margin: 6px 4px 12px; }
.tx-sum b { font-variant-numeric: tabular-nums; }
.tx-sum .link { margin-inline-start: auto; }

/* ריק */
.empty { text-align: center; padding: 28px 12px; }
.empty-art { width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 26px; display: grid; place-items: center; background: var(--soft); color: var(--brand); font-size: 40px; }
.empty p { color: var(--muted); max-width: 320px; margin: 6px auto 16px; }
.empty-mini { text-align: center; padding: 14px 6px; color: var(--muted); }
.empty-mini p { margin-bottom: 12px; font-size: 14px; }

/* תובנות */
.score { display: flex; align-items: center; gap: 16px; }
.score .ring-t { font-size: 24px; }
.fc-n { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 6px 0 4px; }
.fc-n b { font-size: 28px; font-weight: 800; }
.fc-n span { font-size: 13px; font-weight: 700; }
.chart { width: 100%; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 10px; font-family: inherit; }
.chart .bar { animation: barUp .7s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; transform-box: fill-box; }
.vlegend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink2); margin-bottom: 6px; }
.vlegend span { display: inline-flex; align-items: center; gap: 5px; }
.vlegend i { width: 10px; height: 10px; border-radius: 3px; }
.viz-tip { position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none; background: var(--ink); color: var(--bg); padding: 8px 11px; border-radius: 10px; font-size: 13px; line-height: 1.5; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .12s; max-width: 240px; }
.viz-tip.on { opacity: 1; }
.viz-tip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-inline-end: 5px; }
.hbars { display: grid; gap: 8px; }
.hb { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 8px; font-size: 13px; cursor: default; }
.hl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink2); }
.ht { height: 10px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.hf { height: 100%; border-radius: 99px; animation: grow .8s ease both; transform-origin: right; }
.hb b { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.cmp { display: grid; gap: 2px; }
.cmp-r { display: flex; align-items: center; gap: 10px; padding: 7px 0; width: 100%; text-align: right; }
.cn { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.cn small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.cmp-r b { font-variant-numeric: tabular-nums; }
.subs { display: grid; gap: 8px; }
.sub-r { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sub-r:last-child { border: 0; }
.sub-r span { flex: 1; font-weight: 600; }
.sub-r small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.maaser { display: flex; align-items: center; gap: 16px; }
.maaser p { margin: 3px 0; }
.maaser.big .ring-t { font-size: 20px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 8px 6px; text-align: right; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12.5px; }

/* ---------- חלונות ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(10, 12, 30, .45); opacity: 0; transition: opacity .25s; backdrop-filter: blur(2px); }
.sheet { scrollbar-width: none; position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--card); border-radius: 26px 26px 0 0; padding-bottom: var(--safe-b); transform: translateY(100%); transition: transform .32s cubic-bezier(.2,.9,.25,1); box-shadow: var(--shadow-lg); overscroll-behavior: contain; }
.sheet-wrap.in .sheet-bg { opacity: 1; }
.sheet-wrap.in .sheet { transform: none; }
.handle { width: 42px; height: 5px; border-radius: 99px; background: var(--line); margin: 10px auto 2px; }
.pad { padding: 16px 20px 22px; }
.sheet-wrap.full .sheet { height: 100%; max-height: 100%; border-radius: 0; max-width: none; background: var(--bg); }
.ed-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(12px + var(--safe-t)) 16px 10px; position: sticky; top: 0; z-index: 3; background: inherit; }
.ed-top h2 { font-size: 18px; }

.add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.add-b { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 18px; background: var(--bg2); text-align: right; font-size: 22px; }
.add-b b { font-size: 15px; }
.add-b small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.add-b .ic { color: var(--brand); }
.add-b.inc .ic { color: var(--good); }
.add-b.hero-b { grid-column: 1 / -1; background: var(--hero); color: #fff; padding: 18px; }
.add-b.hero-b .ic { color: #fff; }
.add-b.hero-b small { color: rgba(255,255,255,.85); }

/* עריכה */
.edit { display: flex; flex-direction: column; min-height: 100%; max-width: 620px; margin: 0 auto; }
.edit .ed-top { background: var(--bg); }
.amt { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 8px 16px 6px; padding: 10px; direction: ltr; }
.amt span { font-size: 30px; font-weight: 700; color: var(--bad); }
.amt input { width: 1.2ch; min-width: 1.2ch; max-width: 80%; font-size: 52px; font-weight: 800; border: 0; outline: 0; background: transparent; color: var(--bad); text-align: center; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.edit.income .amt span, .edit.income .amt input { color: var(--good); }
.amt input.shake, .shake { animation: shake .45s; }
.ed-body { flex: 1; padding: 6px 16px 20px; }
.ed-foot { position: sticky; bottom: 0; padding: 12px 16px calc(12px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); }
.ed-foot .btn { width: 100%; }
.scan-info { margin: 0 16px; padding: 10px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; background: var(--info-bg); }
.scan-info.good { background: var(--good-bg); color: var(--good); }
.scan-info.warn { background: var(--warn-bg); color: var(--warn); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.cat-c { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 14px; font-size: 11.5px; font-weight: 600; color: var(--ink2); border: 2px solid transparent; transition: all .15s; line-height: 1.2; text-align: center; }
.cat-c.on { border-color: var(--brand); background: var(--soft); color: var(--soft-ink); }
.cat-c.sug { border-color: color-mix(in srgb, var(--brand) 45%, transparent); border-style: dashed; }
.items { display: grid; gap: 6px; }
.item { display: grid; grid-template-columns: 1fr 52px 74px 30px; gap: 6px; align-items: center; }
.item input, .item select { height: 38px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); padding: 0 8px; min-width: 0; outline: none; font-size: 14px; }
.item .in-p { direction: ltr; text-align: center; }
.in-x { color: var(--muted); display: grid; place-items: center; }
.more-f { margin: 8px 0 14px; }
.more-f summary { color: var(--brand); font-weight: 600; cursor: pointer; padding: 6px 0; font-size: 14px; }
.rcpt { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 16px; padding: 10px; box-shadow: var(--shadow); }
.rcpt img { width: 64px; height: 84px; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.rcpt b, .rcpt small { display: block; }
.rcpt-big { max-width: 100%; border-radius: 12px; }
.ocr { white-space: pre-wrap; text-align: right; font-size: 12px; background: var(--bg2); padding: 10px; border-radius: 10px; max-height: 300px; overflow: auto; }

/* מצלמה */
.cam-wrap .sheet { background: #000 !important; }
.cam { position: relative; height: 100%; background: #000; overflow: hidden; }
.cam video { width: 100%; height: 100%; object-fit: cover; }
.cam-frame { position: absolute; inset: 12% 9% 22%; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(0,0,0,.42); }
.cam-frame i { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; }
.cam-frame i:nth-child(1) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 18px; }
.cam-frame i:nth-child(2) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 18px; }
.cam-frame i:nth-child(3) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 18px; }
.cam-frame i:nth-child(4) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 18px; }
.cam-tip { position: absolute; top: calc(24px + var(--safe-t)); inset-inline: 70px; text-align: center; color: #fff; font-size: 14px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.cam-bar { position: absolute; bottom: 0; inset-inline: 0; display: flex; align-items: center; justify-content: space-around; padding: 20px 20px calc(26px + var(--safe-b)); }
.cam-shot { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; }
.cam-shot span { width: 60px; height: 60px; border-radius: 50%; background: #fff; transition: transform .1s; }
.cam-shot:active span { transform: scale(.88); }
.cam-s { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; font-size: 22px; backdrop-filter: blur(8px); }
.cam-x { position: absolute; top: calc(14px + var(--safe-t)); right: 14px; background: rgba(0,0,0,.4); color: #fff; box-shadow: none; }
.flash .cam::after { content: ''; position: absolute; inset: 0; background: #fff; animation: flash .35s ease forwards; }
.proc { padding: 26px 22px 30px; text-align: center; }
.proc-img { position: relative; width: 140px; height: 180px; margin: 0 auto 16px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); }
.proc-img img { width: 100%; height: 100%; object-fit: cover; }
.scanline { position: absolute; inset-inline: 0; height: 40px; background: linear-gradient(transparent, color-mix(in srgb, var(--brand2) 70%, transparent), transparent); animation: scan 1.6s ease-in-out infinite alternate; }
.pbar { height: 6px; border-radius: 99px; background: var(--bg2); overflow: hidden; margin-top: 16px; }
.pbar div { height: 100%; width: 5%; background: var(--hero); transition: width .4s; border-radius: 99px; }

/* עוזר */
.agent { display: flex; flex-direction: column; height: calc(100vh - 150px - var(--safe-b) - var(--safe-t)); min-height: 380px; }
.ag-h { display: flex; align-items: center; gap: 12px; padding: 4px 2px 10px; }
.ag-h b { display: block; font-size: 17px; }
.ag-h small { color: var(--muted); font-size: 12.5px; }
.msgs { scrollbar-width: none; flex: 1; overflow-y: auto; padding: 4px 2px 10px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.ag-hello { margin: auto 0; text-align: center; padding: 20px; color: var(--ink2); }
.ag-hello h2 { font-size: 22px; margin-bottom: 6px; }
.msg { display: flex; flex-direction: column; max-width: 86%; animation: fadeUp .25s ease both; }
.msg.user { align-self: flex-start; align-items: flex-start; }
.msg.bot { align-self: flex-end; align-items: flex-end; }
.bub { padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.55; box-shadow: var(--shadow); }
.msg.user .bub { background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.msg.bot .bub { background: var(--card); border-bottom-left-radius: 6px; }
.msg .src { color: var(--muted); font-size: 11px; margin-top: 3px; }
.msg-img { max-width: 160px; border-radius: 12px; margin-bottom: 4px; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.act-done { font-size: 12.5px; font-weight: 600; background: var(--good-bg); color: var(--good); padding: 4px 9px; border-radius: 99px; }
.typing .bub { display: flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.sugg { margin-bottom: 8px !important; }
.sugg .chip { height: 32px; font-size: 13px; }
.composer { display: flex; align-items: center; gap: 6px; background: var(--card); border-radius: 18px; padding: 6px; box-shadow: var(--shadow); }
.composer input { flex: 1; border: 0; outline: 0; background: transparent; height: 42px; min-width: 0; padding: 0 6px; }
.composer .icon-btn { box-shadow: none; background: var(--bg2); width: 40px; height: 40px; }
.composer .send { width: 42px; height: 42px; border-radius: 13px; background: var(--brand); color: #fff; display: grid; place-items: center; }
body[data-view=agent] .col { padding-bottom: calc(84px + var(--safe-b)); }
.voice { padding-top: 26px; }
.pulse { width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 50%; background: var(--hero); color: #fff; display: grid; place-items: center; animation: ring 1.4s infinite; }

/* הגדרות */
.more, .pg { min-height: 100%; max-width: 620px; margin: 0 auto; padding-bottom: 30px; }
.pg-b { padding: 4px 16px 20px; }
.more { padding-inline: 16px; }
.more .ed-top { margin: 0 -16px; }
.acct-card { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); cursor: pointer; margin-top: 4px; }
.acct-card > div { flex: 1; }
.acct-card b { display: block; }
.acct-card small { color: var(--muted); font-size: 12.5px; }
.mgroup { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: right; border-bottom: 1px solid var(--line); color: var(--ink); }
.mrow:last-child { border-bottom: 0; }
.mrow .ic { color: var(--muted); }
.mi { width: 36px; height: 36px; border-radius: 11px; background: var(--bg2); display: grid; place-items: center; font-size: 18px; flex: none; }
.mtx { flex: 1; min-width: 0; }
.mtx b { display: block; font-weight: 600; }
.mtx small { color: var(--muted); font-size: 12.5px; }
.hero-mini { text-align: center; font-size: 40px; padding: 10px 6px 0; }
.hero-mini h3 { margin-top: 6px; }
.hero-mini p { font-size: 14px; }
.code-box { display: flex; align-items: center; gap: 8px; background: var(--bg2); border-radius: 14px; padding: 10px 14px; margin: 10px 0; }
.code-box b { flex: 1; font-size: 24px; letter-spacing: 4px; font-family: ui-monospace, monospace; }
.bud-list .bl-r { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bud-list .bl-r:last-child { border: 0; }
.bl-r b { font-weight: 600; font-size: 14px; display: block; }
.bl-r small { font-size: 12px; }
.bi { width: 96px; height: 40px; text-align: center; direction: ltr; }
.goal-c { display: flex; gap: 14px; align-items: center; }
.goal-c p { margin: 2px 0; }
.rec-r { display: flex; align-items: center; gap: 12px; text-align: right; }
.rec-r.off { opacity: .55; }
.rec-r small { display: block; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.rthumb { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); text-align: right; }
.rthumb img { width: 100%; height: 120px; object-fit: cover; display: block; }
.rthumb span { display: block; padding: 6px 8px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rthumb b { display: block; font-size: 13px; }
.emo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.steps { padding-inline-start: 20px; line-height: 1.9; }

/* נעילה */
.lock { position: fixed; inset: 0; z-index: 500; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; transition: opacity .3s; }
.lock.out { opacity: 0; }
.lock .dots { display: flex; gap: 14px; margin: 16px 0 26px; }
.lock .dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand); transition: background .15s; }
.lock .dots i.on { background: var(--brand); }
.pad-n { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; direction: ltr; }
.pad-n button { width: 72px; height: 72px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); font-size: 26px; font-weight: 600; }
.pad-n button:disabled { visibility: hidden; }
.pad-n button:active { background: var(--soft); }

/* היכרות */
.onb { padding: 30px 24px calc(20px + var(--safe-b)); text-align: center; }
.onb-e { font-size: 64px; margin-bottom: 10px; animation: pop .5s ease both; }
.onb-s h2 { font-size: 24px; margin-bottom: 8px; }
.onb-s p { color: var(--ink2); font-size: 15.5px; min-height: 66px; }
.onb-d { display: flex; justify-content: center; gap: 6px; margin: 18px 0; }
.onb-d i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: all .25s; }
.onb-d i.on { width: 24px; background: var(--brand); }
.onb .link { display: block; margin: 12px auto 0; }
.onb .field { text-align: right; }

/* הודעות */
#toasts { position: fixed; bottom: calc(96px + var(--safe-b)); inset-inline: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 520px; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow-lg); transform: translateY(20px); opacity: 0; transition: all .25s; }
.toast.in { transform: none; opacity: 1; }
.toast.good { background: #0f7a5c; color: #fff; }
.toast.warn { background: #8a5a00; color: #fff; }
.toast.bad { background: #b52a40; color: #fff; }
.toast button { color: #b9b2ff; font-weight: 800; white-space: nowrap; }
.toast.good button, .toast.warn button, .toast.bad button { color: #fff; text-decoration: underline; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 400; overflow: hidden; }
.confetti i { position: absolute; top: -20px; left: var(--x); width: 9px; height: 14px; border-radius: 2px; animation: fall var(--d) ease-in forwards; transform: rotate(var(--r)); }

/* ---------- אנימציות ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { transform: scale(.9); opacity: .7; } }
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes barUp { from { transform: scaleY(0); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes scan { from { top: -40px; } to { top: 100%; } }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 50%, transparent); } 100% { box-shadow: 0 0 0 26px transparent; } }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- מסכים רחבים ---------- */
@media (min-width: 700px) {
  .grid2 { grid-template-columns: 1fr 1fr; align-items: start; }
  .donut-wrap { flex-direction: row; align-items: center; }
  .donut-wrap .donut { flex: none; }
  .ins-row .ins { flex-basis: 300px; }
  .sheet-wrap:not(.full) { align-items: center; }
  .sheet-wrap:not(.full) .sheet { border-radius: 26px; transform: translateY(30px) scale(.97); opacity: 0; transition: all .25s; }
  .sheet-wrap.in:not(.full) .sheet { transform: none; opacity: 1; }
  .sheet-wrap.full:not(.cam-wrap) { align-items: stretch; justify-content: flex-start; }
  .sheet-wrap.full:not(.cam-wrap) .sheet { max-width: 620px; border-radius: 0 26px 26px 0; transform: translateX(-100%); }
  .sheet-wrap.full.in:not(.cam-wrap) .sheet { transform: none; }
}
@media (min-width: 1000px) {
  #app { display: grid; grid-template-columns: 250px 1fr; }
  .side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; padding: 22px 16px; background: var(--card); border-inline-end: 1px solid var(--line); }
  .brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; padding: 0 8px 18px; }
  .side-i { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 13px; font-weight: 600; color: var(--ink2); text-align: right; }
  .side-i:hover { background: var(--bg2); }
  .side-i.on { background: var(--soft); color: var(--soft-ink); }
  .side-add { margin-top: 14px; height: 48px; }
  .side-foot { margin-top: auto; }
  .tabs { display: none; }
  .col { max-width: 1120px; width: 100%; padding: 0 32px 40px; }
  .top .who .logo, .top [data-go=more] { display: none; }
  .top .net { display: none; }
  #toasts { bottom: 30px; }
  .hero { padding: 24px 28px; }
  .big { font-size: 48px; }
  .qa-b { flex-direction: row; justify-content: center; font-size: 14px; padding: 12px; }
  .agent { height: calc(100vh - 110px); max-width: 820px; margin: 0 auto; }
  main#main > .hero, main#main > .quick { max-width: none; }
}
@media (min-width: 1000px) {
  body[data-view=home] main { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0 18px; align-items: start; }
  body[data-view=home] main > .hero { grid-column: 1; grid-row: 1; }
  body[data-view=home] main > .quick { grid-column: 2; grid-row: 1; }
  body[data-view=home] main > .sec, body[data-view=home] main > .grid2, body[data-view=home] main > .card { grid-column: 1 / -1; }
}

.sheet::-webkit-scrollbar, .msgs::-webkit-scrollbar { display: none; }
.cat-more { grid-column: 1 / -1; justify-self: center; font-size: 13.5px; font-weight: 700; color: var(--brand); padding: 6px 14px; }
