/* משפחת פייערשטיין – עיצוב. שקט, מעט אלמנטים, כל פרט מלוטש; תחושת אפליקציה: כרטיסים מעוגלים ואייקונים שמזמינים ללחוץ. */
@font-face { font-family: 'Heebo'; font-weight: 400; font-display: swap; src: url(fonts/heebo-hebrew-400-normal.woff2) format('woff2'); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-weight: 500; font-display: swap; src: url(fonts/heebo-hebrew-500-normal.woff2) format('woff2'); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-weight: 700 800; font-display: swap; src: url(fonts/heebo-hebrew-700-normal.woff2) format('woff2'); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-weight: 400; font-display: swap; src: url(fonts/heebo-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Heebo'; font-weight: 500; font-display: swap; src: url(fonts/heebo-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Heebo'; font-weight: 700 800; font-display: swap; src: url(fonts/heebo-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --bg: #F2F2F5; --card: #FFFFFF; --ink: #1D1D1F; --ink2: #515154; --ink3: #86868B; --line: #EFEFF4; --soft: #F7F7FA;
  --green: #0E7A56; --green2: #12794A; --greenSoft: #E3F7EC; --orange: #A8550A; --orangeSoft: #FFF1E0; --red: #B4530A;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 20px 48px rgba(0,0,0,.06);
  --r-card: 32px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Heebo', 'Arial Hebrew', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
a { color: var(--green); }
.num { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--ink2); }
[hidden] { display: none !important; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- מבנה ---------- */
.shell { padding: 28px 28px 80px; }
.wrap { max-width: 1320px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 28px; }
.dock { flex: 0 0 auto; position: sticky; top: 28px; background: var(--card); border-radius: 28px; padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 20px 48px rgba(0,0,0,.07); }
.dock a { position: relative; width: 52px; height: 52px; border-radius: 18px; color: #6E6E73; display: flex; align-items: center; justify-content: center; transition: background-color .15s, color .15s, transform .15s; }
.dock a:hover { background: var(--soft); color: var(--ink); }
.dock a.on { background: var(--green); color: #fff; }
.dock a .dot { position: absolute; top: 9px; right: 9px; width: 11px; height: 11px; border-radius: 50%; background: #F08A24; border: 2px solid #fff; }
.dock .sep { height: 1px; background: var(--line); margin: 4px 6px; }
main.screen { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; animation: rise .35s ease both; }

/* ---------- כותרת המסך ---------- */
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 6px 4px 0; }
.head .title { display: flex; align-items: center; gap: 16px; }
.head h1 { margin: 0; font-size: 46px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; }
.head .kicker { display: block; font-size: 15px; font-weight: 500; color: var(--ink2); }
.head .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.1); transition: transform .15s; }
.round:hover { transform: scale(1.06); } .round:active { transform: scale(.95); } .round:disabled { opacity: .35; cursor: default; transform: none; }
.seg { display: flex; background: #E4E4EA; border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { padding: 10px 22px; min-height: 40px; border-radius: 999px; border: 0; background: transparent; color: var(--ink2); font-size: 14px; font-weight: 500; cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.btn { min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--green); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; transition: transform .15s, background-color .15s; }
.btn:hover { transform: scale(1.03); } .btn:active { transform: scale(.97); }
.btn.ghost { background: #F0F0F5; color: var(--ink); }
.btn.dark { background: var(--ink); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.insight { margin: -10px 6px 0; font-size: 20px; line-height: 1.4; font-weight: 500; color: var(--ink2); }

/* ---------- כרטיסים ---------- */
.card { background: var(--card); border-radius: var(--r-card); padding: 32px; box-shadow: var(--shadow); min-width: 0; }
.card.list { padding: 32px 20px 20px; display: flex; flex-direction: column; gap: 4px; }
.card h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.card.list h2 { padding: 0 16px 10px; }
.card .h2row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; padding: 0 16px 10px; }
.card .h2row h2 { padding: 0; }
.card.dark { background: var(--ink); color: #fff; box-shadow: 0 24px 56px rgba(0,0,0,.2); }
.row { display: flex; flex-wrap: wrap; gap: 28px; }
.row > * { flex: 1 1 340px; }
.stack { display: flex; flex-direction: column; gap: 28px; }

.hero { padding: 48px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 48px; background-image: radial-gradient(circle at 0% 100%, rgba(14,122,86,.10), rgba(14,122,86,0) 46%); }
.hero .label { font-size: 17px; font-weight: 500; color: var(--ink2); }
.big { font-size: clamp(60px, 9.5vw, 124px); line-height: .95; font-weight: 800; letter-spacing: -.045em; direction: ltr; text-align: right; display: block; }
.big .cur { font-size: .4em; font-weight: 500; letter-spacing: 0; color: var(--ink3); margin-right: 8px; }
.mid { font-size: clamp(40px, 5vw, 58px); line-height: 1; font-weight: 800; letter-spacing: -.035em; direction: ltr; text-align: right; display: block; }
.mid .cur { font-size: .48em; font-weight: 500; color: #AEAEB2; margin-right: 6px; letter-spacing: 0; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.chip { padding: 9px 16px; border-radius: 999px; background: #F0F0F5; font-size: 15px; font-weight: 600; }
.chip.good { background: var(--greenSoft); color: var(--green2); } .chip.bad { background: var(--orangeSoft); color: var(--orange); }

/* שורה שלוחצים עליה */
.item { display: flex; align-items: center; gap: 16px; padding: 12px 16px; min-height: 56px; border-radius: 20px; text-decoration: none; color: var(--ink); background: transparent; border: 0; width: 100%; text-align: right; font-size: inherit; cursor: pointer; transition: background-color .15s; }
.item:hover { background: #F5F5F8; }
.item.sel { background: #F5F5F8; box-shadow: inset 0 0 0 2px var(--ink); }
.ico { width: 52px; height: 52px; border-radius: 17px; display: flex; align-items: center; justify-content: center; flex: none; font-size: 18px; font-weight: 800; }
.item .grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .name { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { font-size: 14px; color: var(--ink2); }
.item .amt { font-size: 18px; font-weight: 700; direction: ltr; flex: none; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; border-radius: 3px; transition: width .5s ease; }

/* ---------- גרף ---------- */
.chart { position: relative; flex: 1 1 300px; max-width: 440px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s ease forwards; }
.chart .hz { position: absolute; top: 0; bottom: 0; border: 0; padding: 0; margin: 0; background: transparent; cursor: crosshair; z-index: 2; }
.chart .guide { position: absolute; bottom: 0; width: 0; border-left: 2px dashed; opacity: .45; pointer-events: none; }
.chart .pt { position: absolute; width: 14px; height: 14px; margin: -9px 0 0 -9px; border-radius: 50%; background: #fff; border: 3.5px solid; pointer-events: none; z-index: 3; }
.chart .tip { position: absolute; transform: translate(-50%, calc(-100% - 18px)); background: var(--ink); color: #fff; border-radius: 14px; padding: 8px 14px; display: flex; flex-direction: column; align-items: center; white-space: nowrap; pointer-events: none; z-index: 4; box-shadow: 0 10px 24px rgba(0,0,0,.22); }
.chart .tip small { font-size: 13px; color: #D1D1D6; } .chart .tip b { font-size: 18px; font-weight: 800; direction: ltr; }
.months { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); padding: 8px 2px 0; }

/* ---------- התראות ---------- */
.alerts { display: flex; flex-direction: column; gap: 10px; }
.alert { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border: 0; width: 100%; text-align: right; cursor: pointer; font-size: inherit; }
.alert .ico { width: 40px; height: 40px; border-radius: 13px; }
.alert b { font-size: 16px; font-weight: 600; } .alert small { display: block; font-size: 13px; color: var(--ink2); }

/* ---------- טבלאות ---------- */
.tbl-wrap { overflow-x: auto; border-radius: 20px; cursor: grab; }
table.t { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
table.t th, table.t td { padding: 10px 12px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.t thead th { position: sticky; top: 0; background: var(--ink); color: #fff; font-weight: 700; }
table.t thead th:first-child { border-top-right-radius: 14px; } table.t thead th:last-child { border-top-left-radius: 14px; }
table.t td:first-child, table.t th:first-child { text-align: right; position: sticky; right: 0; background: #fff; font-weight: 600; z-index: 1; }
table.t thead th:first-child { background: var(--ink); z-index: 2; }
table.t td.n { direction: ltr; font-variant-numeric: tabular-nums; }
table.t td.click { cursor: pointer; } table.t td.click:hover { background: var(--greenSoft); }
table.t tr.total td { font-weight: 800; background: var(--soft); }
table.t tr.total td:first-child { background: var(--soft); }
table.t tr.group td { font-weight: 700; background: #FAFAFC; }
table.t td.zero { color: #C7C7CC; }

/* ---------- חלון צד (פירוט תנועות) ---------- */
.veil { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 40; animation: rise .2s ease both; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(560px, 100vw); background: var(--bg); z-index: 41; box-shadow: 0 0 60px rgba(0,0,0,.25); display: flex; flex-direction: column; animation: slide .25s ease both; }
@keyframes slide { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer header { padding: 24px 28px 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.drawer h3 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.drawer .body { padding: 0 20px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.txrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: #fff; }
.txrow .d { font-size: 13px; color: var(--ink3); width: 76px; flex: none; }
.txrow .g { flex: 1 1 auto; min-width: 0; } .txrow .g b { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txrow .g small { font-size: 13px; color: var(--ink2); }
.txrow .a { font-weight: 700; direction: ltr; flex: none; }
.txrow select { font-size: 13px; border-radius: 10px; border: 1px solid var(--line); padding: 4px 6px; background: var(--soft); }

/* ---------- סיווג ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { min-height: 46px; padding: 0 20px; border-radius: 999px; border: 0; background: #2C2C2E; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: transform .12s, background-color .12s; }
.pill:hover { transform: scale(1.04); background: #3A3A3C; } .pill.sug { background: #34C77B; color: #0B2A1A; }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.tab { min-height: 46px; padding: 0 24px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tab.on { background: var(--ink); color: #fff; }
.check { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #D1D1D6; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: #34C77B; }
.progress { height: 14px; border-radius: 7px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ink); border-radius: 7px; transition: width .3s; }

/* ---------- העלאה ---------- */
.drop { border: 2.5px dashed #C7C7CC; border-radius: 28px; padding: 56px 24px; text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s; background: #fff; }
.drop.over { border-color: var(--green); background: var(--greenSoft); }
.drop b { display: block; font-size: 24px; font-weight: 800; margin-top: 14px; } .drop span { color: var(--ink2); }
.stat { flex: 1 1 130px; border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.stat b { font-size: 38px; line-height: 1; font-weight: 800; letter-spacing: -.03em; } .stat span { font-size: 14px; color: var(--ink2); }

/* ---------- טפסים ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink2); }
.field input, .field select { min-height: 48px; border-radius: 14px; border: 1.5px solid #E4E4EA; padding: 0 14px; font-size: 16px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus { outline: none; border-color: var(--green); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }

/* ---------- כניסה וטעינה ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login main { width: 100%; max-width: 440px; background: #fff; border-radius: 36px; padding: 48px 44px 40px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 32px 72px rgba(0,0,0,.10); display: flex; flex-direction: column; gap: 28px; animation: rise .4s ease both; }
.login .logo { width: 76px; height: 76px; border-radius: 24px; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 28px rgba(14,122,86,.3); margin: 0 auto; }
.login h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.03em; text-align: center; }
.err { color: var(--red); font-size: 14px; min-height: 20px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--green); animation: spin .8s linear infinite; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 16px; font-size: 15px; font-weight: 500; z-index: 60; box-shadow: 0 16px 40px rgba(0,0,0,.25); animation: rise .25s ease both; }
.sync { font-size: 13px; color: var(--ink3); display: inline-flex; align-items: center; gap: 6px; }
.empty { padding: 40px 16px; text-align: center; color: var(--ink2); }

@media (max-width: 760px) {
  .shell { padding: 16px 14px 90px; }
  .dock { position: fixed; top: auto; bottom: 12px; left: 12px; right: 12px; flex-direction: row; justify-content: space-around; z-index: 30; border-radius: 24px; padding: 8px; }
  .dock .sep { display: none; }
  .head h1 { font-size: 34px; }
  .hero { padding: 28px; }
  .card { padding: 24px; }
  .drawer { width: 100vw; }
}
@media print { .dock, .head .tools, .alerts { display: none !important; } .card { box-shadow: none; } body { background: #fff; } }
