/* ============================================================
   SolarModel — "Swiss Solar" design system
   Swiss Modernism 2.0 (per ui-ux-pro-max): strict grid, hairlines,
   high contrast, single solar accent, no gradients, sharp geometry.
   ============================================================ */
:root {
  --font: "IBM Plex Sans Hebrew", "Heebo", system-ui, sans-serif;

  --paper: #FAFAF7;          /* רקע נייר חם */
  --surface: #FFFFFF;
  --ink: #0B1220;            /* נייבי-שחור */
  --ink-2: #2B3447;
  --muted: #59617A;
  --line: #E5E3DB;           /* קו-שיער חם */
  --line-strong: #0B1220;

  --navy: #0A1628;
  --accent: #FFB703;         /* צהוב סולארי — האקסנט היחיד */
  --accent-ink: #1A1300;
  --gold-deep: #8F6A00;      /* גוון זהב כהה לטקסט על רקע בהיר (עמודת PV) */
  --ok: #0E9F6E;  --ok-soft: #EAF6F0;
  --bad: #D64545; --bad-soft: #FBEDED;
  --warn: #9A6700; --warn-soft: #FBF3DC;

  --r: 4px; --r-lg: 6px;
  --tr: .16s cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
a:hover { background: var(--accent); color: var(--ink); border-bottom-color: transparent; }
nav a, .btn, .side-nav a, .side-logo, a.bare-link { border-bottom: 0; }
nav a:hover, .side-nav a:hover, .side-logo:hover { background: none; }
::selection { background: var(--accent); color: var(--ink); }

/* טיפוגרפיה — היררכיה עריכתית */
h1 { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -.5px; line-height: 1.2; }
h1 .sub { color: var(--muted); font-weight: 400; font-size: 15px; letter-spacing: 0; }
h2 {
  font-size: 14.5px; font-weight: 700; margin: 34px 0 14px;
  letter-spacing: .06em; color: var(--ink);
  display: flex; align-items: baseline; gap: 10px;
}
h2::before { content: "◼"; color: var(--accent); font-size: 9px; }
.micro {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--muted);
}
.num, td, .kpi .v, .metric-hero .v, .stat .v { font-variant-numeric: tabular-nums; }

/* ============================================================
   מעטפת אפליקציה
   ============================================================ */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--navy); color: #fff; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 0 0 14px;
}
.side-logo {
  display: flex; align-items: center; gap: 10px; color: #fff;
  font-weight: 700; font-size: 16px; letter-spacing: -.2px;
  padding: 18px 18px 16px; border-bottom: 1px solid rgba(255, 255, 255, .12);
  margin-bottom: 10px;
}
.side-logo .sun {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--accent); color: var(--navy); border-radius: 0;
  font-size: 15px; font-weight: 800;
}
.side-logo b { color: var(--accent); font-weight: 700; }
.side-nav { display: flex; flex-direction: column; padding: 0 10px; }
.side-nav .lbl {
  color: #5E6B85; font-size: 10px; font-weight: 600; letter-spacing: .18em;
  padding: 16px 10px 6px;
}
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  color: #AEB7C9; font-size: 14px; font-weight: 500; transition: var(--tr);
  border-inline-start: 3px solid transparent; border-radius: 0;
}
.side-nav a svg { width: 16px; height: 16px; flex: none; }
.side-nav a:hover { color: #fff; }
.side-nav a.active {
  color: #fff; border-inline-start-color: var(--accent);
  background: rgba(255, 255, 255, .05);
}
.side-user {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 14px 18px 4px; border-top: 1px solid rgba(255, 255, 255, .12);
}
.avatar {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 0;
  background: var(--accent); color: var(--navy); font-size: 14px; font-weight: 700; flex: none;
}
.side-user .nm { font-size: 13px; color: #E6EAF2; font-weight: 600; line-height: 1.25; }
.side-user a { color: #7B879D; font-size: 12px; }
.side-user a:hover { color: var(--accent); background: none; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: 56px; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 32px; background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
}
.topbar .crumb { color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .02em; }
.topbar .crumb b { color: var(--ink); font-weight: 700; }
.content { padding: 34px 32px 80px; width: 100%; max-width: 1220px; margin: 0 auto; }

nav.bare {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 64px; position: relative; z-index: 50;
  border-bottom: 1px solid var(--line-strong); background: var(--paper);
}
nav.bare .logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 17px; }
nav.bare .logo .sun { width: 30px; height: 30px; display: grid; place-items: center; background: var(--accent); color: var(--navy); font-weight: 800; }
nav.bare .links { display: flex; gap: 16px; align-items: center; }
nav.bare a.item { color: var(--ink-2); font-size: 14px; font-weight: 500; }
nav.bare a.item:hover { color: var(--ink); background: none; border-bottom: 2px solid var(--accent); }

/* ============================================================
   כרטיסים / KPI — קווי-שיער, ללא צל
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 24px; margin-bottom: 18px;
}
.card.tight { padding: 12px 16px; overflow-x: auto; }

.grid { display: grid; gap: 12px; }
.kpis { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }
.kpi {
  background: var(--surface); padding: 16px 18px; position: relative;
  border: 1px solid var(--line-strong); border-radius: 0; border-top-width: 3px;
  border-top-color: var(--navy);
}
.kpi.green { border-top-color: var(--ok); }
.kpi.red { border-top-color: var(--bad); }
.kpi.gold, .kpi.violet { border-top-color: var(--accent); }
.kpi .l { color: var(--ink-2); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.kpi .v {
  font-family: var(--font); font-size: 22px; font-weight: 600; margin-top: 5px;
  letter-spacing: -.4px;
}
.kpi .t { font-size: 12.5px; }
.kpi.green .v { color: var(--ok); }
.kpi.red .v { color: var(--bad); }
.kpi .t { color: var(--muted); font-size: 11.5px; margin-top: 3px; }

/* בלוק מדדים ראשי (תוצאות) — נייבי מלא */
.metric-hero {
  background: var(--navy); color: #fff; border-radius: 0;
  border-inline-start: 6px solid var(--accent);
  padding: 26px 30px; margin-bottom: 20px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 32px;
}
.metric-hero .m .l { color: #B4BFD6; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; }
.metric-hero .m .v {
  font-family: var(--font); font-size: 30px; font-weight: 600; letter-spacing: -.8px;
  margin-top: 4px;
}
.metric-hero .m .t { font-size: 12.5px; color: #8A97B3; }
.metric-hero .m .v.green { color: #57D9A3; }
.metric-hero .m .v.gold { color: var(--accent); }
.metric-hero .m .t { color: #707E9A; font-size: 11.5px; margin-top: 2px; }

/* ============================================================
   טבלאות — עריכתי, קווי-שיער
   ============================================================ */
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; }
th {
  color: var(--ink-2); font-weight: 700; font-size: 13px; letter-spacing: .03em;
  background: var(--surface); border-bottom: 2px solid var(--line-strong); white-space: nowrap;
}
td { font-size: 14.5px; }
tbody tr { transition: background .1s; }
tr:hover > td { background: #FFFBEB; }
tr:last-child > td { border-bottom: 0; }
td.best { color: var(--ok); font-weight: 700; position: relative; }
td.best::after { content: "▲"; font-size: 8px; margin-inline-start: 5px; color: var(--ok); }
#d-wrap thead th { position: sticky; top: 0; z-index: 3; }
.req { color: var(--bad); font-weight: 700; }

/* לוגו Apex — שתי משיכות אלכסוניות + נקודה, וורדמארק מרווח */
.apex-mark { flex: none; }
.brand { display: flex; flex-direction: column; line-height: 1.2; }
.brand .bn { letter-spacing: .4em; font-weight: 600; font-size: 16px; }
.brand .bs { letter-spacing: .165em; font-weight: 500; font-size: 8px; color: #8A97B3; }
.side-logo .bn { color: #fff; }
nav.bare .logo .bn { color: var(--ink-2); font-size: 17px; }
nav.bare .logo .bs { color: var(--muted); }

/* דף הבית — הירו זרימת אנרגיה במסך מלא */
.flow-hero {
  position: relative; background: #0A1628; overflow: hidden;
  margin: -34px -32px 28px; min-height: max(480px, calc(100vh - 102px));
}
.fh-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* סקרים עליון — מבטיח קריאות טקסט מעל השמש והסצנה */
.flow-hero::after {
  content: ""; position: absolute; top: 0; inset-inline: 0; height: 48%;
  background: linear-gradient(180deg, rgba(7, 13, 25, .82), rgba(7, 13, 25, .42) 55%, transparent);
  pointer-events: none; z-index: 1;
}
.fh-overlay {
  position: relative; z-index: 2; padding: 54px 60px 0; pointer-events: none;
}
.fh-overlay h1 {
  color: #fff; font-size: 44px; letter-spacing: -1.2px; margin: 8px 0 12px;
  text-shadow: 0 2px 26px rgba(4, 9, 18, .6);
}
.fh-overlay p {
  color: #A9B6CC; font-size: 16px; max-width: 600px; margin: 0 0 20px; line-height: 1.7;
  text-shadow: 0 1px 16px rgba(4, 9, 18, .55);
}
.fh-overlay .acts { display: flex; gap: 10px; pointer-events: auto; }
.btn.onnavy { background: transparent; color: #E6EAF2; border: 1px solid rgba(255,255,255,.35); }
.btn.onnavy:hover { border-color: var(--accent); color: var(--accent); }
.fh-scroll { position: absolute; bottom: 14px; inset-inline: 0; text-align: center; z-index: 2; }
.fh-scroll a { color: #8A97B3; font-size: 13px; border-bottom: 0; display: inline-block; animation: fhbob 2.2s ease-in-out infinite; }
.fh-scroll a:hover { color: var(--accent); background: none; }
@keyframes fhbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.fh-lbl { fill: #6E7A93; font-size: 14px; font-weight: 600; font-family: var(--font); }

/* --- כוריאוגרפיית כניסה (easing בסגנון אפל: ease-out-quint) --- */
.fh-overlay > * { animation: heroRise .75s cubic-bezier(.22, 1, .36, 1) both; }
.fh-overlay > :nth-child(1) { animation-delay: .05s; }
.fh-overlay > :nth-child(2) { animation-delay: .16s; }
.fh-overlay > :nth-child(3) { animation-delay: .28s; }
.fh-overlay > :nth-child(4) { animation-delay: .42s; }
.fh-overlay > :nth-child(5) { animation-delay: .54s; }
.fh-svg .er { animation: heroRise .85s cubic-bezier(.22, 1, .36, 1) both; animation-delay: var(--d, 0s); }
.fh-svg .ef { animation: heroFade 1s ease-out both; animation-delay: var(--d, 0s); }
.fh-svg .eb {
  animation: heroBloom 1.2s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center;
}
.fh-svg .ex {
  animation: heroScaleX 1.1s cubic-bezier(.22, 1, .36, 1) both .08s;
  transform-box: fill-box; transform-origin: center;
}
@keyframes heroRise { from { opacity: 0; transform: translateY(18px); } }
@keyframes heroFade { from { opacity: 0; } }
@keyframes heroBloom { from { opacity: 0; transform: scale(.65); } }
@keyframes heroScaleX { from { transform: scaleX(0); } }

/* --- חיים מתמשכים --- */
.fh-svg .eb.sun-breathe { animation: heroBloom 1.2s cubic-bezier(.22, 1, .36, 1) both var(--d, 0s),
               breathe 7s ease-in-out 2s infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
.sheenbar { animation: sheen 7.5s cubic-bezier(.4, 0, .2, 1) 2.6s infinite; transform: skewX(-18deg); }
@keyframes sheen { 0% { transform: translateX(0) skewX(-18deg); }
                   34%, 100% { transform: translateX(1560px) skewX(-18deg); } }
.plx { will-change: transform; }
/* מד הטעינה של ארון האגירה — מחזור טעינה→החזקה→פריקה חלק */
@keyframes chargecycle {
  0% { transform: scaleY(.14); }
  42% { transform: scaleY(.97); }
  58% { transform: scaleY(.97); }
  96%, 100% { transform: scaleY(.14); }
}
.charge-fill {
  animation: chargecycle 9s cubic-bezier(.45, 0, .25, 1) infinite;
  transform-box: fill-box; transform-origin: bottom;
}
@keyframes ledpulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.led { animation: ledpulse 2.8s ease-in-out infinite; }
/* עטרת השמש — קשתות מסתובבות לאט */
@keyframes halospin { to { transform: rotate(360deg); } }
.halo { transform-box: fill-box; transform-origin: center; }
.halo.h1 { animation: halospin 48s linear infinite; }
.halo.h2 { animation: halospin 80s linear infinite reverse; }
@keyframes twk { 0%, 100% { opacity: .12; } 50% { opacity: .95; } }
.star { animation: twk 3s ease-in-out infinite; }
.star.d1 { animation-delay: .8s; }
.star.d2 { animation-delay: 1.6s; }
.star.d3 { animation-delay: 2.3s; }
@keyframes dashflow { to { stroke-dashoffset: -48; } }
.flowline { stroke-dasharray: 3 9; animation: dashflow 1.5s linear infinite; }
@keyframes winON { 0%, 18% { opacity: .1; } 32%, 82% { opacity: .95; } 96%, 100% { opacity: .1; } }
.win { animation: winON 5.2s infinite; }
.win.w2 { animation-delay: 1.1s; }
.win.w3 { animation-delay: 2.4s; }
.win.w4 { animation-delay: 3.5s; }
@media (max-width: 860px) {
  .fh-overlay { padding: 30px 22px 0; }
  .fh-overlay h1 { font-size: 29px; }
}

/* דף הבית במסך מלא: בלי סיידבר וטופבר; תפריט צף שקוף מופיע בגלילה */
body.home-full .sidebar, body.home-full .topbar { display: none; }
body.home-full .shell { display: block; }
body.home-full .content { padding: 0; max-width: none; }
body.home-full .flow-hero { margin: 0; min-height: 100vh; min-height: 100dvh; }
body.home-full .home-body { padding: 28px 32px 80px; max-width: 1220px; margin: 0 auto; }
.fh-brand { display: flex; align-items: center; gap: 11px; }
/* דף נחיתה: אותו הירו, בלי מעטפת shell */
.flow-hero.land { margin: 0; min-height: 100vh; min-height: 100dvh; }
.fh-overlay h1 em { color: var(--accent); font-style: normal; }
.badge-navy {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  border: 1px solid rgba(255, 183, 3, .45); background: rgba(255, 183, 3, .08);
  color: #FFD56A; font-size: 12.5px; font-weight: 600; letter-spacing: .03em;
  padding: 5px 13px; margin: 14px 0 4px;
}
.badge-navy::before { content: ""; width: 7px; height: 7px; background: var(--ok); }
/* גלריית "מבט אל הדו"ח" — חלונות מוצר */
.shots {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 18px; margin-top: 26px; align-items: stretch;
}
@media (max-width: 480px) { .shots { grid-template-columns: 1fr; } }
.shot {
  background: var(--surface); border: 1px solid var(--line-strong);
  display: flex; flex-direction: column;
}
.shot .sbar {
  display: flex; align-items: center; gap: 6px; background: var(--navy);
  color: #B4BFD6; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; padding: 8px 12px;
}
.shot .sbar i { width: 8px; height: 8px; border-radius: 50%; background: #2E4262; flex: none; }
.shot .sbar i.g { background: var(--accent); }
.shot .sbar span { margin-inline-start: 6px; }
.shot .sbody {
  padding: 12px 14px 10px; flex: 1;
  display: flex; flex-direction: column; justify-content: center;
}
.shot .mock { display: flex; flex-direction: column; height: 100%; }
.shot .mock .spark { flex: 1; min-height: 70px; }
.shot svg { width: 100%; height: auto; display: block; }
.shot table { font-size: 12.5px; }
.shot th, .shot td { padding: 6px 9px; }
.legend { display: flex; gap: 16px; justify-content: center; padding: 8px 0 2px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.legend b { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; margin-inline-start: 5px; }
.shot .mock { border: 0; }
.home-nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 28px;
  background: rgba(10, 22, 40, .72);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transform: translateY(-110%);
  transition: transform .38s cubic-bezier(.22, 1, .36, 1);
}
.home-nav.show { transform: translateY(0); }
.hn-brand {
  display: flex; align-items: center; gap: 9px; border-bottom: 0;
  color: #fff; font-weight: 600; font-size: 14.5px;
}
.hn-brand b { letter-spacing: .34em; font-weight: 600; }
.hn-brand:hover { background: none; color: var(--accent); }
.hn-links { display: flex; align-items: center; gap: 20px; }
.hn-links a { color: #C9D3E6; font-size: 14px; border-bottom: 0; }
.hn-links a:hover { color: var(--accent); background: none; }
.hn-links .btn.gold:hover { color: var(--accent-ink); }
.hn-out { opacity: .75; }
@media (max-width: 860px) {
  .home-nav { padding: 9px 16px; }
  body.home-full .home-body { padding: 22px 16px 60px; }
}
.btn.arrow { width: 34px; padding: 7px 0; font-size: 17px; line-height: 1; font-weight: 700; }
.btn:disabled { opacity: .3; cursor: default; pointer-events: none; }
/* עמודות מספריות בדוח רווח-והפסד: כיוון LTR כדי שהמינוס יוצג משמאל לספרות */
table.pl td + td { direction: ltr; text-align: right; }
/* שורות סיכום בדוחות (גשר מהכנסה ל-EBITDA) */
tr.subtotal > td { background: #F6F4EC; font-weight: 700; border-top: 1px solid var(--line-strong); }
tr.subtotal:hover > td { background: #F6F4EC; }
tr.total > td { background: var(--warn-soft); font-weight: 700; border-top: 2px solid var(--line-strong); }
tr.total:hover > td { background: var(--warn-soft); }

/* ============================================================
   כפתורים — שטוחים, חדים
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--navy); color: #fff !important; border: 1px solid var(--navy);
  border-radius: var(--r); padding: 10px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; letter-spacing: .01em; transition: var(--tr);
}
.btn:hover { background: #16263F; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--surface); color: var(--ink) !important; border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--paper); border-color: var(--ink); }
.btn.danger { background: var(--surface); color: var(--bad) !important; border-color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.gold { background: var(--accent); color: var(--accent-ink) !important; border-color: var(--accent); font-weight: 700; }
.btn.gold:hover { background: #FFC42E; border-color: var(--ink); }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--muted) !important; border-color: transparent; }
.btn.ghost:hover { color: var(--ink) !important; border-color: var(--line-strong); }

/* תגיות סטטוס — מסגרת, ריבועי */
.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 2px;
  padding: 3px 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  border: 1px solid currentColor; background: var(--surface); white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.chip.done, .chip.pass { color: var(--ok); background: var(--ok-soft); }
.chip.running, .chip.pending { color: var(--warn); background: var(--warn-soft); }
.chip.running::before, .chip.pending::before { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.chip.failed, .chip.fail { color: var(--bad); background: var(--bad-soft); }
.chip.none { color: var(--muted); background: var(--paper); }

/* ============================================================
   טפסים
   ============================================================ */
form.stack label, .formgrid label {
  display: block; margin: 14px 0 5px; font-size: 13px; color: var(--ink-2);
  font-weight: 600; letter-spacing: .02em;
}
input[type=text], input[type=email], input[type=password], input[type=number],
select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--r); font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--ink); transition: var(--tr);
}
input[type=number] { font-family: var(--font); font-size: 13.5px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 2px 2px 0 var(--accent);
}
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 2px 22px; align-items: start; }
.formgrid .span2 { grid-column: span 2; }
@media (max-width: 560px) { .formgrid .span2 { grid-column: span 1; } }
.formgrid .muted-sm { display: block; margin-top: 4px; line-height: 1.45; }
.error {
  background: var(--bad-soft); color: #A33; border: 1px solid var(--bad);
  border-radius: var(--r); padding: 11px 15px; margin-bottom: 16px; font-size: 14px;
}
.note { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.muted-sm { color: var(--muted); font-size: 12.5px; }

/* טולטיפ "?" — הסבר מונחים פיננסיים (ריחוף/מקלדת/מגע) */
.tip {
  display: inline-grid; place-items: center; width: 16px; height: 16px;
  margin-inline-start: 4px; vertical-align: 1px; position: relative;
  border: 1px solid currentColor; border-radius: 50%; color: var(--muted);
  font-family: var(--font); font-size: 10px; font-weight: 700; line-height: 1;
  cursor: help; user-select: none;
}
.tip:hover, .tip:focus { color: var(--ink); outline: none; }
.tip .tipbox {
  /* ‎--tip-shift נקבע ב-JS כדי שהבועה לא תיחתך בקצה המסך; החץ מוסט הפוך ונשאר על האייקון */
  position: absolute; bottom: calc(100% + 9px); inset-inline-start: 50%;
  transform: translateX(calc(50% + var(--tip-shift, 0px))) translateY(3px);
  width: max-content; max-width: min(290px, 72vw);
  background: var(--navy); color: #E6EAF2; text-align: right;
  font-family: var(--font); font-size: 12.5px; font-weight: 400; line-height: 1.65;
  letter-spacing: 0; white-space: normal;
  padding: 10px 13px; border-radius: var(--r); border: 1px solid var(--navy);
  box-shadow: 4px 4px 0 rgba(10, 22, 40, .14);
  opacity: 0; visibility: hidden; pointer-events: none; transition: var(--tr); z-index: 70;
}
.tip .tipbox::after {
  content: ""; position: absolute; top: 100%; inset-inline-start: 50%;
  margin-inline-start: -5px; border: 5px solid transparent; border-top-color: var(--navy);
  transform: translateX(calc(-1 * var(--tip-shift, 0px)));
}
.tip:hover .tipbox, .tip:focus .tipbox {
  opacity: 1; visibility: visible;
  transform: translateX(calc(50% + var(--tip-shift, 0px))) translateY(0);
}
/* על רקע נייבי (metric-hero) — טולטיפ בהיר */
.metric-hero .tip { color: #8A97B3; }
.metric-hero .tip:hover, .metric-hero .tip:focus { color: var(--accent); }
.metric-hero .tip .tipbox {
  background: var(--surface); color: var(--ink); border-color: var(--line-strong);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .25);
}
.metric-hero .tip .tipbox::after { border-top-color: var(--surface); }
.kpi .tip { vertical-align: 0; }

/* בורר מקטעים (CAPEX פשוט/מפורט) */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; margin: 2px 0 16px; }
.seg label { display: contents; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  padding: 8px 20px; font-size: 13.5px; font-weight: 600; color: var(--muted);
  background: var(--surface); cursor: pointer; transition: var(--tr);
  border-inline-start: 1px solid var(--line);
}
.seg label:first-child span { border-inline-start: 0; }
.seg span:hover { color: var(--ink); background: var(--paper); }
.seg input:checked + span { background: var(--navy); color: #fff; }
.seg input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--accent); }

/* אומדן CAPEX חי (מצב פשוט) */
.cx-live {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 16px; background: var(--paper);
  border: 1px solid var(--line); border-inline-start: 4px solid var(--accent);
}
.cx-live b { font-family: var(--font); font-size: 20px; letter-spacing: -.4px; }

/* כותרת קבוצה במצב מפורט */
.cxd-head { margin: 18px 0 2px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.cxd-head:first-child { margin-top: 4px; }

/* סרגל שמירה דביק בתחתית טופס התרחיש */
.savebar {
  display: flex; gap: 14px; align-items: center;
  position: sticky; bottom: 0; z-index: 30;
  margin: 24px -24px -22px; padding: 14px 24px;
  background: var(--surface); border-top: 1px solid var(--line-strong);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* מקטע מתקפל (תעריפים בטופס התרחיש) */
details.fold {
  border: 1px solid var(--line); background: var(--surface);
  margin: 30px 0 6px; border-radius: var(--r);
}
details.fold > summary {
  cursor: pointer; padding: 13px 16px; font-size: 14px; font-weight: 700;
  letter-spacing: .02em; list-style: none; display: flex; align-items: center; gap: 9px;
  user-select: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "◂"; color: var(--accent); font-size: 11px; transition: var(--tr); }
details.fold[open] > summary::before { content: "▾"; }
details.fold > .fold-body { padding: 2px 16px 16px; border-top: 1px solid var(--line); }

/* ============================================================
   גרפים
   ============================================================ */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.charts .card { margin: 0; padding: 14px 20px 14px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.chart-head .micro { font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.charts canvas { cursor: crosshair; touch-action: pan-y !important; }

/* יעדי מגע: צ'קבוקסים גדולים וברורים */
input[type=checkbox] {
  width: 20px; height: 20px; accent-color: var(--navy); cursor: pointer;
}
@media (max-width: 920px) { .charts { grid-template-columns: 1fr; } }

/* ============================================================
   לנדינג — עריכתי, נייר + נייבי + צהוב
   ============================================================ */
.hero-wrap {
  position: relative; padding: 90px 40px 70px; background: var(--paper);
  border-bottom: 1px solid var(--line-strong); overflow: hidden;
}
.hero-wrap::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .5;
}
.hero-inner { position: relative; max-width: 1150px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
@media (max-width: 980px) { .hero-inner { grid-template-columns: 1fr; } }
.hero-copy h1 { font-size: 52px; line-height: 1.12; letter-spacing: -1.5px; font-weight: 700; }
.hero-copy h1 em { font-style: normal; box-shadow: inset 0 -0.42em 0 var(--accent); }
.hero-copy p { color: var(--ink-2); font-size: 16.5px; max-width: 520px; margin: 22px 0 30px; line-height: 1.8; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600;
  letter-spacing: .1em; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); padding: 6px 14px; margin-bottom: 26px;
}
.hero-badge::before { content: ""; width: 8px; height: 8px; background: var(--ok); }

/* spec-sheet (mock) */
.mock { background: var(--surface); border: 1px solid var(--line-strong); }
.mock .bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--navy); color: #fff; padding: 10px 16px;
  font-size: 11px; font-weight: 600; letter-spacing: .14em;
}
.mock .bar i { color: var(--accent); font-style: normal; font-family: var(--font); }
.mock .row { display: grid; grid-template-columns: 1fr 1fr 1fr; border-bottom: 1px solid var(--line); }
.mock .cell { padding: 14px 16px; border-inline-start: 1px solid var(--line); }
.mock .cell:first-child { border-inline-start: 0; }
.mock .cell .a { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .12em; }
.mock .cell .b { font-family: var(--font); font-size: 17px; font-weight: 600; margin-top: 3px; letter-spacing: -.5px; }
.mock .cell .b.g { color: var(--ok); } .mock .cell .b.go { color: var(--warn); }
.mock .spark { display: flex; align-items: flex-end; gap: 5px; height: 86px; padding: 14px 16px 0; }
.mock .spark i { flex: 1; background: var(--navy); }
.mock .spark i.g { background: var(--accent); }
.mock .foot {
  display: flex; justify-content: space-between; padding: 10px 16px;
  font-family: var(--font); font-size: 10.5px; color: var(--muted);
  border-top: 1px solid var(--line); margin-top: 14px;
}

.land-section { max-width: 1150px; margin: 0 auto; padding: 70px 40px 0; }
.land-section h2 { font-size: 26px; letter-spacing: -.6px; font-weight: 700; }
.land-section h2::before { content: ""; width: 28px; height: 10px; background: var(--accent); align-self: center; }
.land-sub { color: var(--muted); max-width: 600px; margin: 8px 0 32px; }
.features { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); background: var(--line); border: 1px solid var(--line-strong); }
.feature { background: var(--surface); padding: 26px 24px; border-radius: 0; border: 0; transition: var(--tr); }
.feature:hover { background: #FFFDF4; }
.feature .ix { font-family: var(--font); font-size: 12px; color: var(--muted); display: block; margin-bottom: 14px; }
.feature .ix::after { content: ""; display: block; width: 26px; height: 3px; background: var(--accent); margin-top: 8px; }
.feature b { display: block; margin-bottom: 7px; font-size: 15.5px; }
.stat-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px;
  max-width: 1150px; margin: 60px auto 0; padding: 0 40px;
}
.stat-band-inner { background: var(--navy); }
.stat { text-align: right; padding: 26px 24px; background: var(--navy); color: #fff; }
.stat .v { font-family: var(--font); font-size: 30px; font-weight: 600; letter-spacing: -1px; color: var(--accent); }
.stat .l { color: #8C99B3; font-size: 12px; margin-top: 5px; letter-spacing: .06em; }
.land-cta { text-align: center; padding: 80px 20px 90px; }
footer.dark, footer {
  color: var(--muted); text-align: center; padding: 26px 0 36px; font-size: 12px;
  letter-spacing: .04em; border-top: 1px solid var(--line); margin-top: 50px;
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Auth
   ============================================================ */
body.auth-page { background: var(--paper); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px 18px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box .brand { text-align: center; margin-bottom: 18px; font-size: 22px; font-weight: 700; }
.auth-box .brand .sun {
  display: inline-grid; place-items: center; width: 50px; height: 50px;
  background: var(--accent); color: var(--navy); font-size: 24px; font-weight: 800;
  margin-bottom: 12px;
}
.auth-box .card { border: 1px solid var(--line-strong); box-shadow: 6px 6px 0 var(--accent); }

/* ============================================================
   שונות
   ============================================================ */
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); }
.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 10px; color: var(--accent); }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-radius: 0; padding: 13px 17px; margin-bottom: 16px; font-size: 14px;
  border: 1px solid; border-inline-start-width: 5px;
}
.banner.pass { background: var(--ok-soft); border-color: var(--ok); }
.banner.fail { background: var(--bad-soft); border-color: var(--bad); color: #A33; }
.banner.info { background: var(--ok-soft); border-color: var(--ok); color: var(--ink); }
.banner .btn.small { margin-inline-start: auto; }

/* צ'יפ הרצות שנותרו — גלולה קטנה */
.runs-chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  letter-spacing: .02em; font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--warn-soft); border: 1px solid var(--accent);
}
.runs-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* כפתור יציאה — נראה כמו קישור בתפריט הצד */
.logout-form { display: inline; margin: 0; }
.logout-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 12px; color: #7B879D; transition: var(--tr);
}
.logout-btn:hover { color: var(--accent); }
.spin-wrap { display: flex; align-items: center; gap: 14px; padding: 6px 0; }
.spinner {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.steps { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  display: flex; align-items: center; gap: 10px; color: var(--muted);
  font-size: 13.5px; padding: 5px 0; counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero); font-family: var(--font);
  font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 1px 6px;
}
.steps li.on { color: var(--ink); font-weight: 600; }
.steps li.on::before { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.searchbox { position: relative; }
.searchbox input { padding-inline-start: 36px; width: 250px; }
.searchbox svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 0 12px; }
  .side-logo { border-bottom: 0; padding: 12px 8px; margin: 0; }
  .side-nav { flex-direction: row; padding: 0; }
  .side-nav .lbl, .side-nav a .t { display: none; }
  .side-nav a { padding: 12px 12px; border-inline-start: 0; border-bottom: 3px solid transparent; }
  .side-nav a.active { border-bottom-color: var(--accent); background: none; }
  .side-user { margin: 0 0 0 auto; border: 0; padding: 6px 0; }
  .side-user .nm, .side-user a, .side-user br { display: none; }
  .content, .topbar { padding-inline: 16px; }
  .topbar { height: auto; min-height: 50px; padding-block: 8px; flex-wrap: wrap; }
  .hero-copy h1 { font-size: 34px; }
  table { font-size: 12.5px; }
  #scen-table { min-width: 860px; }
  .searchbox input { width: 100%; }
}
