/* ===========================================================================
   base.css — מערכת העיצוב המשותפת לסוויטת ניהול הכספים (RTL, עברית)
   ערכת נושא בהירה ומקצועית. ירוק=חיובי/הכנסה, אדום=חריגה/הוצאה.
   ללא תלות חיצונית — font-stack מערכת שתומך עברית.
   =========================================================================== */

:root {
  /* רקעים ומשטחים — Fiscal Equilibrium */
  --bg:        #f9f9ff;
  --bg-2:      #e7eeff;
  --surface:   #ffffff;
  --surface-2: #f0f3ff;
  --line:      #dbe2ef;
  --line-2:    #eef2fb;

  /* טקסט */
  --text:   #111c2c;
  --muted:  #424750;
  --faint:  #737781;

  /* מותג ופעולה — כחול אמין */
  --brand:    #1a4f8b;
  --brand-2:  #00386c;
  --brand-50: #e7eeff;

  /* סמנטי פיננסי */
  --pos:    #006d3d;   /* הכנסה / חיובי — ירוק צמיחה */
  --pos-bg: #d7f3e1;
  --neg:    #ba1a1a;   /* הוצאה / חריגה */
  --neg-bg: #ffdad6;
  --warn:   #b8860b;
  --warn-bg:#fdf1dc;

  /* פלטת קטגוריות לגרפים */
  --c1:#1a4f8b; --c2:#006d3d; --c3:#b8860b; --c4:#6b4fa0; --c5:#ba1a1a;
  --c6:#0e74a8; --c7:#b83280; --c8:#0f766e; --c9:#c2700b; --c10:#3b4fa0;
  --c11:#5a8a1a; --c12:#c2364f; --c13:#0e8a9a; --c14:#7c3aa0; --c15:#5a6678;

  /* גאומטריה — soft, 8px cards */
  --radius:   12px;
  --radius-s: 8px;
  --maxw:     1280px;
  --shadow:    0 4px 14px -6px rgba(17,28,44,.12);
  --shadow-sm: 0 1px 3px rgba(17,28,44,.06);

  --font: 'Work Sans', 'Segoe UI', 'Helvetica Neue', 'Noto Sans Hebrew',
          'Arial Hebrew', Arial, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  direction: rtl;
}

h1,h2,h3,h4 { margin: 0; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
a { color: var(--brand); }

/* ---------- פריסה ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

.app-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.app-header .wrap { display: flex; align-items: center; gap: 14px; min-height: 62px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.08rem; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--brand), #4f86ff);
  display: grid; place-items: center; color: #fff; font-size: 18px;
}
.header-spacer { flex: 1; }

main { padding: 22px 0 80px; }
.section { margin-bottom: 26px; }
.section-title { font-size: 1.06rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.section-title .hint { font-size: .8rem; font-weight: 500; color: var(--faint); }

/* ---------- כרטיסים ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card.pad { padding: 18px; }

.grid { display: grid; gap: 14px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }

/* כרטיס KPI */
.kpi { padding: 16px 18px; }
.kpi .label { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.kpi .value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.kpi .sub { font-size: .78rem; color: var(--faint); margin-top: 4px; }
.kpi.pos .value { color: var(--pos); }
.kpi.neg .value { color: var(--neg); }
.kpi.brand .value { color: var(--brand); }

/* באנר בולט */
.hero-stat {
  background: linear-gradient(135deg, var(--brand-50), #fff);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.hero-stat .big { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; }
.hero-stat .big.pos { color: var(--pos); }
.hero-stat .big.neg { color: var(--neg); }
.hero-stat .cap { color: var(--muted); font-size: .92rem; }

/* ---------- טבלאות / שורות ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: grid; align-items: center; gap: 10px;
  padding: 9px 4px; border-bottom: 1px solid var(--line-2);
}
.row:last-child { border-bottom: none; }
.row .cat-name { font-weight: 600; }
.row .muted { color: var(--muted); }

.list-head {
  display: grid; gap: 10px; padding: 6px 4px; font-size: .78rem;
  color: var(--faint); font-weight: 600; border-bottom: 1px solid var(--line);
}

/* ---------- שדות קלט ---------- */
label.fld { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; color: var(--muted); }
input, select {
  font-family: inherit; font-size: .95rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 9px 11px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
input[type="number"] { text-align: start; }

/* שדה סכום עם ₪ */
.money { position: relative; }
.money > input { padding-inline-start: 26px; }
.money::before {
  content: "₪"; position: absolute; inset-inline-start: 10px; top: 50%;
  transform: translateY(-50%); color: var(--faint); font-size: .9rem; pointer-events: none;
}

/* ---------- כפתורים ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: var(--radius-s); padding: 9px 14px; transition: all .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--bg-2); color: var(--text); }
.btn.icon { padding: 8px; }
.btn.danger:hover { border-color: var(--neg); color: var(--neg); }
.btn.sm { padding: 6px 10px; font-size: .82rem; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- progress ---------- */
.bar { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .3s; }
.bar.pos > span { background: var(--pos); }
.bar.over > span { background: var(--neg); }
.bar.warn > span { background: var(--warn); }

/* ---------- תגיות מצב ---------- */
.tag { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; display: inline-block; }
.tag.pos { background: var(--pos-bg); color: var(--pos); }
.tag.neg { background: var(--neg-bg); color: var(--neg); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.muted { background: var(--bg-2); color: var(--muted); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 12px; flex-wrap: wrap; }
.tabs button {
  border: none; background: transparent; font-family: inherit; font-size: .88rem;
  font-weight: 600; color: var(--muted); padding: 8px 14px; border-radius: 9px; cursor: pointer;
}
.tabs button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- ניווט חודשים ---------- */
.period-nav { display: flex; align-items: center; gap: 6px; }
.period-nav .label { font-weight: 700; min-width: 130px; text-align: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed; inset-block-end: 22px; inset-inline-start: 22px; z-index: 60;
  background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: .88rem; font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: all .25s;
}
.toast.show { opacity: 1; transform: none; }

/* ---------- modal ---------- */
.modal-bg {
  position: fixed; inset: 0; z-index: 50; background: rgba(15,22,40,.45);
  display: none; align-items: center; justify-content: center; padding: 18px;
}
.modal-bg.show { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius); max-width: 460px; width: 100%;
  padding: 22px; box-shadow: var(--shadow);
}
.modal h3 { margin-bottom: 12px; }
.modal p { color: var(--muted); font-size: .9rem; margin: 0 0 16px; }

/* ---------- charts ---------- */
.chart-wrap { display: flex; flex-direction: column; gap: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .82rem; }
.legend .item { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.legend .dot { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.empty { color: var(--faint); font-size: .9rem; text-align: center; padding: 26px 0; }

/* ---------- כללי ---------- */
.flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.num { font-variant-numeric: tabular-nums; }
.pos-t { color: var(--pos); }
.neg-t { color: var(--neg); }
.right { text-align: end; }
.nowrap { white-space: nowrap; }

/* ---------- רספונסיבי ---------- */
@media (max-width: 760px) {
  body { font-size: 14px; }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .hero-stat .big { font-size: 1.7rem; }
  .kpi .value { font-size: 1.3rem; }
}

/* ===========================================================================
   ליטוש פרימיום — מיקרו-אינטראקציות והעמקה ויזואלית (CSS בלבד)
   =========================================================================== */
.card { transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.grid.kpis .card.kpi:hover, #ovInsights .card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* פס מבטא דק בקצה כל כרטיס KPI לפי הצבע הסמנטי */
.kpi { position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px; background: var(--brand); opacity: .9; }
.kpi.pos::after { background: var(--pos); }
.kpi.neg::after { background: var(--neg); }
.kpi.brand::after { background: var(--brand); }
.kpi .value { letter-spacing: -.03em; }

/* באנר עשיר יותר */
.hero-stat { background: linear-gradient(120deg, var(--brand-50) 0%, #ffffff 60%); position: relative; overflow: hidden; }
.hero-stat::before { content: ""; position: absolute; inset-block-start: -40%; inset-inline-end: -6%; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(37,99,235,.10), transparent 70%); pointer-events: none; }
.hero-stat .big { letter-spacing: -.035em; }

/* לשוניות ופעולות חלקות */
.tabs button { transition: background .15s, color .15s, transform .15s, box-shadow .15s; }
.tabs button.active { transform: translateY(-1px); }
.btn { transition: background .15s, color .15s, border-color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }

/* כותרת אפליקציה — קו מבטא עדין */
.app-header { box-shadow: 0 1px 0 var(--line), 0 6px 20px -18px rgba(20,30,55,.35); }
.brand .logo { box-shadow: 0 6px 16px -6px rgba(37,99,235,.55); }

/* פסי התקדמות חלקים יותר */
.bar > span { transition: width .45s cubic-bezier(.4,0,.2,1); }

/* ===========================================================================
   שער רישיון (license gate)
   =========================================================================== */
.lic-gate {
  position: fixed; inset: 0; z-index: 1000;
  background: linear-gradient(135deg, #0d1530, #182452);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.lic-card {
  background: var(--surface); border-radius: 18px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.6);
  width: 100%; max-width: 400px; padding: 30px 28px; text-align: center;
}
.lic-logo {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--brand), #4f86ff); color: #fff;
  display: grid; place-items: center; font-size: 26px; font-weight: 800;
  box-shadow: 0 10px 24px -8px rgba(37,99,235,.6);
}
.lic-card h2 { font-size: 1.3rem; margin-bottom: 6px; }
.lic-card p { color: var(--muted); font-size: .9rem; margin: 0 0 18px; }
.lic-card input {
  text-align: center; font-size: 1.05rem; letter-spacing: .12em; font-weight: 600;
  text-transform: uppercase; padding: 12px; margin-bottom: 12px;
}
.lic-card .btn.primary { width: 100%; padding: 12px; font-size: 1rem; }
.lic-err { color: var(--neg); font-size: .85rem; min-height: 20px; margin-top: 10px; font-weight: 600; }
.lic-ok { color: var(--pos); }
.lic-foot { margin-top: 18px; font-size: .78rem; color: var(--faint); line-height: 1.6; }
.lic-foot a { color: var(--brand); text-decoration: none; }

/* ===========================================================================
   כרטיסי KPI בסגנון "צ'יפ" — אייקון צבעוני בעיגול + רקע פסטלי (מראה מקצועי)
   =========================================================================== */
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }
.kpi-chip {
  display: flex; align-items: center; gap: 13px; padding: 16px 18px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.kpi-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-ic { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; }
.kpi-ic svg { width: 22px; height: 22px; }
.kpi-chip .label { font-size: .8rem; color: var(--muted); margin-bottom: 3px; display: flex; align-items: center; gap: 5px; }
.kpi-chip .value { font-size: 1.5rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.kpi-chip .sub { font-size: .72rem; color: var(--faint); margin-top: 2px; }
.kpi-chip.t-green  { background: #e8f7ee; border-color: #cdeedb; } .kpi-chip.t-green .kpi-ic  { background: #006d3d; } .kpi-chip.t-green .value  { color: #06532f; }
.kpi-chip.t-red    { background: #ffecea; border-color: #ffd6d0; } .kpi-chip.t-red .kpi-ic    { background: #ba1a1a; } .kpi-chip.t-red .value    { color: #8c1212; }
.kpi-chip.t-blue   { background: #e7eeff; border-color: #d2deff; } .kpi-chip.t-blue .kpi-ic   { background: #1a4f8b; } .kpi-chip.t-blue .value   { color: #143f73; }
.kpi-chip.t-violet { background: #efe9f9; border-color: #ded2f3; } .kpi-chip.t-violet .kpi-ic { background: #6b4fa0; } .kpi-chip.t-violet .value { color: #503a7d; }
.kpi-chip.t-orange { background: #fff1e2; border-color: #ffe1c2; } .kpi-chip.t-orange .kpi-ic { background: #c2700b; } .kpi-chip.t-orange .value { color: #8f5208; }
.kpi-chip.t-teal   { background: #e3f5f3; border-color: #c8ece8; } .kpi-chip.t-teal .kpi-ic   { background: #0f766e; } .kpi-chip.t-teal .value   { color: #0b574f; }

/* באנר ראשי — אייקון תואם */
.hero-stat .hero-ic { width: 54px; height: 54px; border-radius: 16px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), #3f74c4); box-shadow: 0 8px 20px -8px rgba(26,79,139,.6); }
.hero-stat .hero-ic svg { width: 26px; height: 26px; }

/* ===========================================================================
   מצב כהה (data-theme="dark")
   =========================================================================== */
[data-theme="dark"] {
  --bg: #0f1726; --bg-2: #1b2740; --surface: #182234; --surface-2: #1f2b42;
  --line: #2b3956; --line-2: #232f49;
  --text: #e9eef7; --muted: #aab6cc; --faint: #7886a0;
  --brand: #6ea8ff; --brand-2: #8fbcff; --brand-50: #1c2c47;
  --pos: #46c98a; --pos-bg: #15301f; --neg: #ff6f6a; --neg-bg: #341d1c;
  --warn: #e0a73a; --warn-bg: #2f2715;
  --shadow: 0 8px 22px -10px rgba(0,0,0,.6); --shadow-sm: 0 1px 3px rgba(0,0,0,.45);
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .app-header { background: rgba(24,34,52,.86); box-shadow: 0 1px 0 var(--line); }
[data-theme="dark"] .hero-stat { background: linear-gradient(120deg, #1c2c47 0%, #182234 62%); }
[data-theme="dark"] .hero-stat::before { background: radial-gradient(circle, rgba(110,168,255,.12), transparent 70%); }
[data-theme="dark"] input, [data-theme="dark"] select { background: #141d2e; }
[data-theme="dark"] .kpi-chip.t-green  { background:#13291d; border-color:#1e3a2a; } [data-theme="dark"] .kpi-chip.t-green .value  { color:#6fe0a3; }
[data-theme="dark"] .kpi-chip.t-red    { background:#2e1a1a; border-color:#48251f; } [data-theme="dark"] .kpi-chip.t-red .value    { color:#ff918b; }
[data-theme="dark"] .kpi-chip.t-blue   { background:#172742; border-color:#22385c; } [data-theme="dark"] .kpi-chip.t-blue .value   { color:#88b7ff; }
[data-theme="dark"] .kpi-chip.t-violet { background:#241f3a; border-color:#362e57; } [data-theme="dark"] .kpi-chip.t-violet .value { color:#bba8ef; }
[data-theme="dark"] .kpi-chip.t-orange { background:#2e2413; border-color:#473720; } [data-theme="dark"] .kpi-chip.t-orange .value { color:#e3ab5c; }
[data-theme="dark"] .kpi-chip.t-teal   { background:#13292a; border-color:#1e3e3f; } [data-theme="dark"] .kpi-chip.t-teal .value   { color:#60d1c9; }
[data-theme="dark"] .tag.pos { background:#15301f; } [data-theme="dark"] .tag.neg { background:#341d1c; } [data-theme="dark"] .tag.warn { background:#2f2715; }
[data-theme="dark"] .side-nav button.active { background:#15301f; }
[data-theme="dark"] .card svg text { fill: #aab6cc; }
[data-theme="dark"] .card svg line { stroke: #2b3956; }
[data-theme="dark"] .bar { background: #2b3956; }
[data-theme="dark"] .modal, [data-theme="dark"] .tour-pop { background: var(--surface); }

/* ===========================================================================
   מדריכים (accordion + מאמר)
   =========================================================================== */
.guide { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; overflow: hidden; background: var(--surface); transition: box-shadow .2s; }
.guide.open { box-shadow: var(--shadow); }
.guide-head { display: flex; align-items: center; gap: 13px; padding: 16px 18px; cursor: pointer; user-select: none; }
.guide-head:hover { background: var(--surface-2); }
.guide-ic { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 22px; background: var(--brand-50); }
.guide-head .gt { flex: 1; }
.guide-head .gt h4 { font-size: 1.02rem; margin-bottom: 2px; }
.guide-head .gt .gsum { font-size: .82rem; color: var(--muted); }
.guide-head .chev { color: var(--faint); transition: transform .25s; font-size: 1.1rem; }
.guide.open .guide-head .chev { transform: rotate(-180deg); }
.guide-body { display: none; padding: 4px 22px 22px; border-top: 1px solid var(--line-2); }
.guide.open .guide-body { display: block; animation: fade .25s ease; }
.guide-body h5 { font-size: .98rem; margin: 18px 0 7px; color: var(--brand-2); }
.guide-body p { margin: 0 0 11px; color: var(--text); line-height: 1.75; font-size: .94rem; }
.guide-body ul, .guide-body ol { margin: 0 0 12px; padding-inline-start: 22px; line-height: 1.8; font-size: .94rem; }
.guide-body li { margin-bottom: 4px; }
.guide-body strong { color: var(--text); font-weight: 700; }
.callout { border-radius: 11px; padding: 12px 15px; margin: 14px 0; font-size: .9rem; line-height: 1.6; border: 1px solid; }
.callout.tip { background: var(--pos-bg); border-color: color-mix(in srgb, var(--pos) 25%, transparent); }
.callout.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.callout.info { background: var(--brand-50); border-color: color-mix(in srgb, var(--brand) 22%, transparent); }
.callout .ct { font-weight: 800; display: block; margin-bottom: 3px; }
.guide-disc { font-size: .8rem; color: var(--faint); border-top: 1px dashed var(--line); margin-top: 16px; padding-top: 10px; }

/* ===========================================================================
   מעבר בין דאשבורדים (sidebar)
   =========================================================================== */
.side-switch { margin: 10px 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.side-switch:empty { display: none; }
.side-link { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; transition: background .15s, color .15s; }
.side-link:hover { background: var(--bg-2); color: var(--brand); }
.side-link .ic { width: 20px; text-align: center; font-size: 1rem; flex: none; }
@media (max-width: 880px) { .side-switch { flex-direction: row; border: none; margin: 0; padding: 0; } .side-link { white-space: nowrap; padding: 8px 10px; } }

/* ---------- הדפסה / PDF ---------- */
@media print {
  body { background: #fff; }
  .app-header, .btn, .tabs, .period-nav .btn, .no-print { display: none !important; }
  .tab-panel { display: block !important; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  main { padding: 0; }
}

/* ===========================================================================
   Tooltips — אייקון מידע ⓘ + בועת הסבר (hover + focus + tap)
   =========================================================================== */
.info {
  display: inline-grid; place-items: center; width: 16px; height: 16px;
  border-radius: 50%; border: 1px solid var(--faint); color: var(--faint);
  font-size: 11px; font-weight: 700; line-height: 1; cursor: help;
  background: var(--surface); vertical-align: middle; margin-inline-start: 5px;
  font-family: var(--font); user-select: none; flex: none; transition: all .15s;
}
.info:hover, .info:focus-visible { border-color: var(--brand); color: var(--brand); background: var(--brand-50); outline: none; }
.tip-bubble {
  position: fixed; z-index: 80; max-width: 280px; background: #1a2233; color: #fff;
  font-size: .82rem; line-height: 1.5; padding: 9px 12px; border-radius: 10px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .15s, transform .15s; font-weight: 500;
}
.tip-bubble.show { opacity: 1; transform: none; }
.tip-bubble::after {
  content: ""; position: absolute; width: 9px; height: 9px; background: #1a2233;
  transform: rotate(45deg); inset-inline-start: var(--arrow-x, 50%); margin-inline-start: -4px;
}
.tip-bubble.below::after { top: -4px; }
.tip-bubble.above::after { bottom: -4px; }
label.fld .info { margin-inline-start: 4px; }
.kpi .label .info, .section-title .info { opacity: .8; }

/* ===========================================================================
   סיור מודרך (guided tour) — spotlight + popover
   =========================================================================== */
.tour-mask { position: fixed; inset: 0; z-index: 90; pointer-events: auto; }
.tour-hole {
  position: fixed; z-index: 91; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(15,22,40,.62); transition: all .28s cubic-bezier(.4,0,.2,1);
}
.tour-pop {
  position: fixed; z-index: 92; width: min(330px, calc(100vw - 28px));
  background: var(--surface); border-radius: 14px; box-shadow: 0 20px 50px -12px rgba(15,22,40,.5);
  padding: 18px; transition: all .28s cubic-bezier(.4,0,.2,1);
}
.tour-pop .t-step { font-size: .72rem; color: var(--brand); font-weight: 700; letter-spacing: .04em; }
.tour-pop h4 { margin: 4px 0 8px; font-size: 1.05rem; }
.tour-pop p { margin: 0 0 14px; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.tour-pop .t-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-dots { display: flex; gap: 5px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); display: block; transition: background .2s, width .2s; }
.tour-dots i.on { background: var(--brand); width: 18px; border-radius: 4px; }
.tour-pop .t-actions { display: flex; gap: 8px; }
.tour-skip { position: fixed; z-index: 93; inset-block-start: 16px; inset-inline-end: 16px; }
.tour-pop::after {
  content: ""; position: absolute; width: 12px; height: 12px; background: var(--surface);
  transform: rotate(45deg); inset-inline-start: var(--parrow-x, 28px);
}
.tour-pop.point-up::after { top: -6px; }
.tour-pop.point-down::after { bottom: -6px; }

/* טבלת סיכום חודשי */
.mtable { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 440px; }
.mtable th { text-align: start; font-size: .76rem; color: var(--faint); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mtable td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.mtable tbody tr { cursor: pointer; transition: background .12s; }
.mtable tbody tr:hover { background: var(--surface-2); }
.mtable tr.cur { background: var(--brand-50); }
.mtable tr.cur td:first-child { font-weight: 800; color: var(--brand); }

/* ===========================================================================
   פריסת sidebar (סגנון Stitch — ניווט בצד ימין)
   =========================================================================== */
.layout { display: flex; flex-direction: row; min-height: 100vh; }
.sidebar {
  width: 244px; flex: none; background: var(--surface);
  border-inline-start: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { margin: 4px 6px 20px; font-size: 1.1rem; }
.sidebar .brand .sub { display: block; font-size: .72rem; font-weight: 500; color: var(--faint); margin-top: 2px; }
.tabs.side-nav { background: transparent; padding: 0; border-radius: 0; flex-wrap: nowrap; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  border: none; background: transparent; font-family: inherit; font-size: .92rem;
  font-weight: 600; color: var(--muted); padding: 11px 13px; border-radius: 10px;
  cursor: pointer; text-align: start; transition: background .15s, color .15s;
}
.side-nav button .ic { width: 20px; text-align: center; font-size: 1.05rem; flex: none; opacity: .9; }
.side-nav button:hover { background: var(--bg-2); color: var(--text); }
.side-nav button.active { background: var(--pos-bg); color: var(--pos); }
.side-foot { margin-top: auto; padding-top: 14px; }
.side-foot .btn.primary { width: 100%; }
.main-col { flex: 1; min-width: 0; }
.main-col .wrap { max-width: 1180px; }

@media (max-width: 880px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static; flex-direction: row; align-items: center;
    border-inline-start: none; border-bottom: 1px solid var(--line);
    padding: 10px 14px; gap: 10px; overflow-x: auto;
  }
  .sidebar .brand { margin: 0 8px 0 0; white-space: nowrap; }
  .sidebar .brand .sub { display: none; }
  .side-nav { flex-direction: row; gap: 2px; }
  .side-nav button { padding: 8px 11px; white-space: nowrap; }
  .side-nav button .ic { display: none; }
  .side-foot { margin: 0 0 0 auto; padding: 0; }
  .side-foot .btn.primary { width: auto; }
}

/* מתג פריט קבוע (recurring) */
.recur-btn { font-size: 1.05rem; line-height: 1; color: var(--faint); }
.recur-btn.on { background: var(--pos-bg); color: var(--pos); border-color: var(--pos); }

/* כפתור עזרה בכותרת */
.help-btn { font-weight: 700; }
.help-btn .q { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-size: 12px; margin-inline-end: 4px; }

@media (max-width: 760px) {
  .tour-pop { width: calc(100vw - 24px); }
}
