/* ══════════════════════════════════════════════
   SYNA Manager — מנהל עסקי — עיצוב גרסה 12.0
   ══════════════════════════════════════════════ */

:root {
  --bg-base:           #f3f3f6;
  --bg-main:           #ffffff;
  --bg-sidebar:        #fafafa;
  --bg-card:           #ffffff;
  --bg-card-inner:     #f7f7fa;
  --bg-hover:          #efeff3;

  --black:             #000000;
  --black-hover:       #1a1a1a;
  --black-soft:        #2a2a2a;

  --text-primary:      #0c0c0e;
  --text-secondary:    #66667a;
  --text-muted:        #a6a6bc;
  --text-placeholder:  #c8c8d8;

  --border:            #eaeaef;
  --border-mid:        #d5d5e0;
  --border-strong:     #b8b8cc;

  --income-color:      #1a7a4a;
  --income-bg:         #f0faf5;
  --income-border:     #b0dfc5;

  --expense-color:     #c03030;
  --expense-bg:        #fdf3f3;
  --expense-border:    #e8bcbc;

  --invest-color:      #0056b3;
  --gold-accent:       #b89a54;

  --soon-color:        #9a6500;
  --orange-color:      #c45c00;
  --orange-bg:         #fff3e0;
  --orange-border:     #ffc07a;

  --urgent-color:      #b94a00;
  --urgent-bg:         #fff0e6;
  --urgent-border:     #ffb380;

  --paid-green-color:  #1a7a4a;
  --paid-green-bg:     #e8f8ef;
  --paid-green-border: #8dd4af;

  --cancel-red-color:  #b91c1c;
  --cancel-red-bg:     #fef2f2;
  --cancel-red-border: #fca5a5;

  --preop-track:       #e4e4ec;

  --sidebar-width:     272px;
  --header-height:     80px;
  --view-max-width:    980px;

  --radius-xs: 4px; --radius-sm: 8px; --radius-md: 12px;
  --radius-lg: 16px; --radius-xl: 20px; --radius-2xl: 26px;

  --shadow-card:       0 1px 3px rgba(0,0,0,0.05), 0 0 0 1px var(--border);
  --shadow-card-lift:  0 4px 20px rgba(0,0,0,0.07), 0 0 0 1px var(--border);
  --shadow-modal:      0 16px 56px rgba(0,0,0,0.14), 0 0 0 1px var(--border-mid);
  --shadow-focus:      0 0 0 3px rgba(0,0,0,0.07);

  --font-body:  'Heebo', sans-serif;
  --font-num:   'Rubik', sans-serif;
  --font-mono:  'DM Mono', monospace;
  --transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ══ Dark Mode ══ (toggled via [data-theme="dark"] on <html>) */
[data-theme="dark"] {
  --bg-base:           #0e0e12;
  --bg-main:           #15151b;
  --bg-sidebar:        #121217;
  --bg-card:           #1b1b22;
  --bg-card-inner:     #22222b;
  --bg-hover:          #2a2a34;

  --black:             #f3f3f6;
  --black-hover:       #ffffff;
  --black-soft:        #d5d5e0;

  --text-primary:      #f0f0f5;
  --text-secondary:    #a6a6bc;
  --text-muted:        #75758a;
  --text-placeholder:  #55556a;

  --border:            #2a2a34;
  --border-mid:        #383844;
  --border-strong:     #4a4a5a;

  --income-bg:         #11251b;
  --income-border:     #1f5238;
  --expense-bg:        #2a1414;
  --expense-border:    #5a2424;

  --orange-bg:         #3a2a12;
  --orange-border:     #6b4a1a;
  --urgent-bg:         #3a2412;
  --urgent-border:     #6b3a1a;
  --paid-green-bg:     #11251b;
  --paid-green-border: #1f5238;
  --cancel-red-bg:     #2a1414;
  --cancel-red-border: #5a2424;
  --preop-track:       #2a2a34;

  --shadow-card:       0 1px 3px rgba(0,0,0,0.4), 0 0 0 1px var(--border);
  --shadow-card-lift:  0 4px 20px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  --shadow-modal:      0 16px 56px rgba(0,0,0,0.6), 0 0 0 1px var(--border-mid);
  --shadow-focus:      0 0 0 3px rgba(255,255,255,0.08);
}
[data-theme="dark"] .header-logo { filter: invert(1) brightness(1.1); }

/* ══ Theme Toggle Button ══ */
.theme-toggle-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-mid); background: var(--bg-card); color: var(--text-primary); cursor: pointer; transition: background var(--transition), color var(--transition), border-color var(--transition); flex-shrink: 0; }
.theme-toggle-btn:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.theme-toggle-icon-sun { display: none; }
[data-theme="dark"] .theme-toggle-icon-moon { display: none; }
[data-theme="dark"] .theme-toggle-icon-sun { display: block; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg-base); color: var(--text-primary); display: flex; min-height: 100vh; overflow-x: hidden; direction: rtl; }

/* ══ פריסה ══ */
.sidebar { position: fixed; top: 0; right: 0; width: var(--sidebar-width); height: 100vh; background: var(--bg-sidebar); border-left: 1px solid var(--border); display: flex; flex-direction: column; z-index: 100; overflow-y: auto; }
.main-content { margin-right: var(--sidebar-width); flex: 1; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-main); }

/* ══ מותג ══ */
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.brand-mark   { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-square { width: 13px; height: 13px; background: var(--black); display: block; border-radius: 2px; }
.brand-logo { width: 30px; height: 30px; object-fit: contain; display: block; }
.brand-text   { display: flex; flex-direction: column; gap: 3px; }
.brand-name   { font-family: var(--font-mono); font-size: 14px; font-weight: 400; letter-spacing: 0.14em; color: var(--black); line-height: 1; }
.brand-sub    { font-size: 10px; font-weight: 500; color: var(--text-muted); }

/* ══ ניווט ══ */
.sidebar-nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 9.5px; font-weight: 700; color: var(--text-muted); padding: 0 10px; margin-bottom: 4px; margin-top: 2px; display: block; letter-spacing: 0.1em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text-secondary); font-size: 12.5px; font-weight: 400; transition: all var(--transition); cursor: pointer; user-select: none; }
.nav-item:hover  { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--black); color: #ffffff; font-weight: 600; }
.nav-item.active .nav-icon { stroke: #ffffff; }
.nav-icon { width: 14px; height: 14px; flex-shrink: 0; stroke: currentColor; transition: stroke var(--transition); }
.nav-studio { margin-top: 2px; border: 1px solid var(--border-mid); color: var(--text-primary); font-weight: 500; }
.nav-studio:hover { background: var(--black); color: #ffffff; border-color: var(--black); }
.nav-studio:hover .nav-icon { stroke: #ffffff; }
.nav-badge { margin-right: auto; background: var(--black); color: #ffffff; font-size: 8px; font-weight: 700; padding: 2px 6px; border-radius: var(--radius-xs); white-space: nowrap; }
.nav-item.active .nav-badge { background: rgba(255,255,255,0.18); }

/* ══ תחתית סרגל ══ */
.sidebar-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--black); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #ffffff; flex-shrink: 0; }
.user-info { display: flex; flex-direction: column; gap: 2px; }
.user-name  { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.user-role  { font-size: 10px; color: var(--text-muted); }
.sidebar-logout-btn { margin-right: auto; border: 1px solid var(--border-mid); background: var(--bg-card-inner); color: var(--text-secondary); border-radius: 999px; padding: 5px 11px; font-family: var(--font-body); font-size: 11px; cursor: pointer; }
.sidebar-logout-btn:hover { border-color: var(--gold-accent); color: var(--text-primary); }
.sidebar-footer-actions { margin-right: auto; display: flex; gap: 6px; align-items: center; }
.sidebar-footer-actions .sidebar-logout-btn { margin-right: 0; }
#export-backup-btn:hover { border-color: var(--income-color); color: var(--income-color); }
.sidebar-logout-btn.hidden { display: none; }

/* ══ כותרת עליונה ══ */
.top-header { height: var(--header-height); display: flex; align-items: center; justify-content: space-between; padding: 0 36px; border-bottom: 1px solid var(--border); background: var(--bg-main); position: sticky; top: 0; z-index: 50; flex-shrink: 0; }
.header-logo { position: absolute; left: 50%; transform: translateX(-50%); height: 90px; object-fit: contain; pointer-events: none; }
.header-name-row { display: flex; align-items: baseline; gap: 8px; }
.header-name-row h1 { font-size: 20px; font-weight: 700; color: var(--text-primary); line-height: 1; letter-spacing: -0.02em; white-space: nowrap; }
.header-owner-name  { font-size: 20px; font-weight: 700; color: var(--text-primary); line-height: 1; letter-spacing: -0.02em; white-space: nowrap; }
.header-owner-title { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-top: 4px; }
.header-date-text   { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-time-block { padding: 6px 14px; background: var(--black); border-radius: var(--radius-sm); }
.time-display { font-family: var(--font-num); font-size: 17px; font-weight: 300; letter-spacing: 0.05em; color: #ffffff; }
.header-view-badge { font-size: 12px; font-weight: 500; color: var(--text-secondary); padding: 5px 14px; background: var(--bg-card-inner); border: 1px solid var(--border); border-radius: 20px; }

/* ══ תצוגות ══ */
.view { flex: 1; display: flex; flex-direction: column; background: var(--bg-base); animation: viewFadeIn 0.2s ease; }
.view.hidden { display: none; }
@keyframes viewFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.view-inner { flex: 1; padding: 32px 38px 48px; display: flex; flex-direction: column; gap: 22px; }
.view-dashboard-inner { max-width: var(--view-max-width); width: 100%; align-self: center; }
.view-calc-inner { align-items: center; }

/* ══ כותרת תצוגה ══ */
.view-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.view-title    { font-size: 23px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.03em; line-height: 1; }
.view-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 7px; }
.view-header-stat    { text-align: left; }
.view-header-actions { display: flex; align-items: center; gap: 20px; }
.btn-pdf-export { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--bg-card-inner); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; color: var(--text-primary); cursor: pointer; transition: background var(--transition), border-color var(--transition); white-space: nowrap; }
.btn-pdf-export:hover { background: var(--black); color: #fff; border-color: var(--black); }
.btn-pdf-export:disabled { opacity: 0.55; cursor: not-allowed; }
.dash-header-actions { display: flex; align-items: center; gap: 8px; }
.btn-dash-refresh { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: var(--bg-card-inner); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); color: var(--text-primary); cursor: pointer; transition: background var(--transition), border-color var(--transition); flex-shrink: 0; }
.btn-dash-refresh:hover { background: var(--black); color: #fff; border-color: var(--black); }
.btn-dash-refresh.spinning svg { animation: dash-spin 0.6s linear; }
@keyframes dash-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ══ בורר טווח גלובלי — לוח הבקרה ══ */
.dash-range-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 14px; margin-bottom: 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.dash-range-month-nav { display: flex; align-items: center; gap: 6px; background: var(--bg-card-inner); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); padding: 3px; }
.dash-range-arrow { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; background: transparent; color: var(--text-secondary); border-radius: 6px; cursor: pointer; transition: all var(--transition); }
.dash-range-arrow:hover { background: var(--bg-hover); color: var(--text-primary); }
.dash-range-month-input { background: transparent; border: none; color: var(--text-primary); font-family: var(--font-num); font-size: 13px; font-weight: 600; padding: 4px 6px; outline: none; cursor: pointer; color-scheme: light dark; direction: ltr; }
.dash-range-presets { display: flex; flex-wrap: wrap; gap: 4px; background: var(--bg-card-inner); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); padding: 3px; }
.dash-range-btn { padding: 7px 12px; background: transparent; border: none; border-radius: 6px; color: var(--text-secondary); font-family: var(--font-body); font-size: 12px; font-weight: 500; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.dash-range-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.dash-range-btn.active { background: var(--black); color: #ffffff; }
.dash-range-custom { display: flex; align-items: center; gap: 8px; }
.dash-range-custom.hidden { display: none; }
.dash-range-date { background: var(--bg-card-inner); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); color: var(--text-primary); font-family: var(--font-num); font-size: 12.5px; padding: 6px 9px; outline: none; cursor: pointer; color-scheme: light dark; direction: ltr; }
.dash-range-date:focus { border-color: var(--border-strong); }
.dash-range-dash { color: var(--text-muted); font-weight: 700; }
.dash-range-label { margin-right: auto; font-size: 12.5px; font-weight: 600; color: var(--text-primary); background: var(--bg-card-inner); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; white-space: nowrap; }
@media (max-width: 720px) { .dash-range-label { margin-right: 0; width: 100%; text-align: center; } }

/* ══ KPI ══ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px 18px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 7px; position: relative; overflow: hidden; transition: box-shadow var(--transition); }
.kpi-card:hover { box-shadow: var(--shadow-card-lift); border-color: var(--border-mid); }
.kpi-card::before { content: ''; position: absolute; top: 0; right: 0; left: 0; height: 3px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.kpi-balance::before  { background: #000000; }
.kpi-income::before   { background: var(--income-color); }
.kpi-expense::before  { background: var(--expense-color); }
.kpi-web::before      { background: #3b82f6; }
.kpi-spark { position: absolute; bottom: 0; left: 0; right: 0; width: 100%; height: 42px; opacity: 0.1; pointer-events: none; z-index: 0; }
.kpi-spark polyline { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.kpi-balance .kpi-spark { color: #000000; }
.kpi-income  .kpi-spark { color: var(--income-color); }
.kpi-expense .kpi-spark { color: var(--expense-color); }
.kpi-web     .kpi-spark { color: #3b82f6; }
[data-theme="dark"] .kpi-spark { opacity: 0.16; }
[data-theme="dark"] .kpi-balance .kpi-spark { color: #f0f0f5; }
.kpi-card .kpi-label, .kpi-card .kpi-value, .kpi-card .kpi-sub { position: relative; z-index: 1; }
.kpi-label { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.07em; text-transform: uppercase; }
.kpi-value { font-family: var(--font-num); font-size: 28px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; direction: ltr; unicode-bidi: embed; color: var(--text-primary); }
.kpi-value-income  { color: var(--income-color); }
.kpi-value-expense { color: var(--expense-color); }
.kpi-sub { font-size: 11px; color: var(--text-muted); }
/* תיבת "כל הזמנים" על כרטיס היתרה — ממוקמת בפינה השמאלית-עליונה (מעל גרף הניצוץ) */
.kpi-balance-toggle { position: absolute; top: 12px; left: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; color: var(--text-muted); cursor: pointer; user-select: none; }
.kpi-balance-toggle:hover { color: var(--text-secondary); }
.kpi-balance-toggle input { width: 13px; height: 13px; margin: 0; accent-color: var(--black); cursor: pointer; }

/* ══ Break-Even ══ */
.be-card { padding: 18px 22px 16px; margin-top: 0; }
.be-header { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; }
.be-title { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.be-month-label { margin-right: auto; font-size: 11px; color: var(--text-muted); font-family: var(--font-body); }
.be-body { display: flex; flex-direction: column; gap: 6px; }
.be-bar-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.be-bar-track { flex: 1; height: 7px; background: var(--bg-card-inner); border-radius: 99px; overflow: hidden; }
.be-bar-fill { height: 100%; background: var(--text-primary); border-radius: 99px; transition: width 0.5s ease; }
.be-bar-fill.be-bar-reached { background: #16a34a; }
.be-pct { font-family: var(--font-num); font-size: 13px; font-weight: 700; color: var(--text-primary); min-width: 36px; direction: ltr; }
.be-pct.be-pct-reached { color: #16a34a; }
.be-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.be-row-gap { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--border-light); }
.be-label { color: var(--text-muted); }
.be-value { font-family: var(--font-num); font-weight: 600; color: var(--text-primary); direction: ltr; }
.be-income { color: var(--text-primary); }
.be-gap-remaining { color: var(--expense-color); }
.be-gap-reached { color: #16a34a; }
[data-theme="dark"] .be-bar-fill { background: #f0f0f5; }
[data-theme="dark"] .be-bar-fill.be-bar-reached { background: #4ade80; }
[data-theme="dark"] .be-pct.be-pct-reached { color: #4ade80; }
[data-theme="dark"] .be-gap-reached { color: #4ade80; }

/* ══ גרף ══ */
.chart-card { padding: 24px 28px 20px; }
.chart-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.chart-card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.chart-card-sub   { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.chart-legend { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.chart-legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.chart-legend-income  { background: #000000; }
.chart-legend-expense { background: #888888; border: 1px solid #cccccc; }
.chart-legend-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.chart-container { position: relative; height: 200px; width: 100%; }

/* ══ Donut chart card (modular) ══ */
.donut-card { padding: 24px 28px 22px; margin-top: 16px; }
.donut-container { position: relative; height: 240px; width: 100%; margin-top: 8px; }
.donut-empty { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 100%; color: var(--text-muted); }
.donut-empty p { font-size: 12.5px; }

/* ══ מעקב ייבוא וספקים ══ */
.imports-summary-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: linear-gradient(135deg, #0c0c0e 0%, #2a2a34 100%); border-radius: var(--radius-lg); padding: 22px 26px; margin-bottom: 16px; box-shadow: var(--shadow-card); }
[data-theme="dark"] .imports-summary-card { background: linear-gradient(135deg, #1b1b22 0%, #2e2e3a 100%); border: 1px solid var(--border); }
.imports-summary-main { display: flex; flex-direction: column; gap: 6px; }
.imports-summary-label { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.6); letter-spacing: 0.05em; }
.imports-summary-value { font-family: var(--font-num); font-size: 32px; font-weight: 700; color: #fff; letter-spacing: -0.03em; direction: ltr; }
.imports-summary-side { display: flex; gap: 14px; }
.imports-summary-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; background: rgba(255,255,255,0.08); border-radius: var(--radius-md); padding: 12px 18px; min-width: 96px; }
.imports-summary-stat-val { font-family: var(--font-num); font-size: 18px; font-weight: 700; color: #fff; direction: ltr; }
.imports-summary-stat-lbl { font-size: 10px; color: rgba(255,255,255,0.55); }
.imports-groups { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.import-group { padding: 18px 20px; }
.import-group-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.import-group-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.import-group-profit { font-family: var(--font-num); font-size: 12px; font-weight: 700; color: var(--income-color); direction: ltr; }
.import-group-items { display: flex; flex-direction: column; gap: 8px; }
.import-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--bg-card-inner); border: 1px solid var(--border); border-radius: var(--radius-md); transition: background var(--transition); }
.import-row:hover { background: var(--bg-hover); }
.import-row-main { display: flex; flex-direction: column; gap: 5px; min-width: 150px; flex-shrink: 0; }
.import-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.import-status-badge { align-self: flex-start; font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.imp-st-production { background: var(--orange-bg); color: var(--orange-color); border: 1px solid var(--orange-border); }
.imp-st-transit { background: #e8f4fd; color: #0369a1; border: 1px solid #bfe0f5; }
.imp-st-arrived { background: var(--paid-green-bg); color: var(--paid-green-color); border: 1px solid var(--paid-green-border); }
.import-row-metrics { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.import-metric { display: flex; flex-direction: column; gap: 2px; }
.import-metric-lbl { font-size: 9.5px; color: var(--text-muted); font-weight: 600; }
.import-metric-val { font-family: var(--font-num); font-size: 13px; font-weight: 700; color: var(--text-primary); direction: ltr; }
.import-metric-val.pos { color: var(--income-color); }
.import-metric-val.neg { color: var(--expense-color); }
.import-metric-profit .import-metric-lbl { color: var(--income-color); }
.import-del { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: var(--radius-xs); display: flex; align-items: center; flex-shrink: 0; transition: color var(--transition); }
.import-del:hover { color: var(--expense-color); }
@media (max-width: 768px) {
  .imports-summary-card { flex-direction: column; align-items: stretch; }
  .import-row { flex-direction: column; align-items: stretch; }
  .import-row-metrics { gap: 12px; }
}

/* ══ כרטיסים ══ */
.card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-card); border: 1px solid var(--border); }
.summary-label { display: block; font-size: 10px; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; letter-spacing: 0.08em; text-transform: uppercase; }
.summary-value { font-family: var(--font-num); font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.03em; direction: ltr; unicode-bidi: embed; display: block; }
.cashflow-form-card { padding: 24px 28px; }
.form-section-label { font-size: 11px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 16px; }

/* ══ קטגוריה דינמית ══ */
.category-select-wrap { display: flex; align-items: center; gap: 6px; }
.category-select-wrap .form-select { flex: 1; }
.add-category-btn { flex-shrink: 0; width: 29px; height: 29px; background: var(--bg-card-inner); border: 1.5px solid var(--border-mid); border-radius: var(--radius-sm); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition); margin-bottom: 2px; }
.add-category-btn:hover { background: var(--black); border-color: var(--black); color: #ffffff; }

/* ══ עמודות עסקאות ══ */
.tx-split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tx-col-card { padding: 20px 22px; }
.tx-title-income  { color: var(--income-color); }
.tx-title-expense { color: var(--expense-color); }

/* ══ טפסים ══ */
.transaction-form { display: flex; flex-direction: column; gap: 16px; }
.form-row    { display: flex; gap: 12px; align-items: flex-end; }
.form-group  { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.form-group.flex-2 { flex: 2; }
.form-label  { font-size: 10.5px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.input-shekel-wrap { position: relative; display: flex; align-items: center; }
.shekel-prefix { position: absolute; right: 0; top: 0; bottom: 0; display: flex; align-items: center; padding-right: 1px; font-family: var(--font-num); font-size: 14px; font-weight: 500; color: var(--text-muted); pointer-events: none; z-index: 1; }
.input-with-prefix { padding-right: 20px !important; }

.form-input, .form-select { background: transparent; border: none; border-bottom: 1.5px solid var(--border-mid); border-radius: 0; padding: 8px 0; color: var(--text-primary); font-family: var(--font-body); font-size: 13.5px; outline: none; transition: border-color var(--transition); appearance: none; -webkit-appearance: none; text-align: right; direction: rtl; width: 100%; }
.form-input:focus, .form-select:focus { border-bottom-color: var(--black); }
.form-input::placeholder { color: var(--text-placeholder); }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a6a6bc' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 2px center; padding-left: 22px; cursor: pointer; }
.form-select option { background: var(--bg-main); color: var(--text-primary); direction: rtl; }
.modal-body .form-input, .modal-body .form-select { background: var(--bg-card-inner); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); padding: 10px 13px; }
.modal-body .form-input:focus, .modal-body .form-select:focus { border-color: var(--black); box-shadow: var(--shadow-focus); }
.modal-body .input-with-prefix { padding-right: 30px !important; }
.modal-body .shekel-prefix { padding-right: 12px; font-size: 13px; }
.modal-body .form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a6a6bc' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 10px center; padding-left: 30px; }

/* ══ Toggle ══ */
.toggle-group { display: flex; background: var(--bg-card-inner); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.toggle-btn { flex: 1; padding: 8px 12px; background: transparent; border: none; border-radius: 6px; color: var(--text-secondary); font-family: var(--font-body); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all var(--transition); }
.toggle-btn.active { background: var(--black); color: #ffffff; }

/* ══ כפתורים ══ */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--black); color: #ffffff; border: 1px solid var(--black); border-radius: var(--radius-sm); padding: 11px 20px; font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer; transition: background var(--transition); width: 100%; }
.btn-primary:hover  { background: var(--black-hover); }
.btn-primary.btn-sm { width: auto; padding: 8px 16px; font-size: 12px; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--text-secondary); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); padding: 10px 18px; font-family: var(--font-body); font-size: 13px; font-weight: 500; cursor: pointer; transition: all var(--transition); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-strong); }

/* ══ עסקאות ══ */
.transactions-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.list-title { font-size: 11px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.07em; text-transform: uppercase; }
.tx-count   { font-family: var(--font-num); font-size: 11px; font-weight: 500; color: var(--text-muted); }
.transactions-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.transactions-list::-webkit-scrollbar { width: 3px; }
.transactions-list::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.tx-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--bg-card-inner); border: 1px solid var(--border); border-radius: var(--radius-sm); animation: slideIn 0.2s ease; transition: border-color var(--transition); }
.tx-item:hover { border-color: var(--border-mid); background: var(--bg-hover); }
.tx-left  { display: flex; align-items: center; gap: 9px; }
.tx-right { display: flex; align-items: center; gap: 5px; }
.tx-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tx-dot.income  { background: var(--income-color); }
.tx-dot.expense { background: var(--expense-color); }
.tx-desc { font-size: 12px; font-weight: 600; color: var(--text-primary); display: block; }
.tx-meta { font-size: 10px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.tx-cat-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
[data-theme="dark"] .tx-cat-tag { filter: brightness(0.92) saturate(1.1); }
.tx-meta-date { font-size: 10px; color: var(--text-muted); }
.tx-amount { font-family: var(--font-num); font-size: 12.5px; font-weight: 600; direction: ltr; unicode-bidi: embed; }
.tx-amount.income  { color: var(--income-color); }
.tx-amount.expense { color: var(--expense-color); }
.tx-delete { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 3px 4px; border-radius: var(--radius-xs); opacity: 0; transition: all var(--transition); display: flex; align-items: center; }
.tx-item:hover .tx-delete { opacity: 1; }
.tx-delete:hover { color: var(--expense-color); background: var(--expense-bg); }

/* ══ מצב ריק ══ */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px; gap: 9px; }
.empty-state svg { stroke: var(--text-muted); opacity: 0.3; }
.empty-state p   { font-size: 13px; color: var(--text-muted); }

/* ══ טרום פעילות ══ */
.preop-top-row { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
.preop-stat-card { background: var(--black); border-color: transparent; box-shadow: 0 6px 28px rgba(0,0,0,0.22); padding: 26px 22px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.preop-stat-card::before { content: ''; position: absolute; top: -40px; left: -40px; width: 130px; height: 130px; background: rgba(255,255,255,0.03); border-radius: 50%; pointer-events: none; }
.preop-stat-eyebrow { font-size: 9px; font-weight: 700; color: rgba(255,255,255,0.42); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; }
.preop-stat-amount { font-family: var(--font-num); font-size: 30px; font-weight: 700; color: #ffffff; letter-spacing: -0.03em; line-height: 1; direction: ltr; unicode-bidi: embed; }
.preop-stat-sub { font-size: 11px; color: rgba(255,255,255,0.35); margin-bottom: 4px; }
.preop-divider  { width: 100%; height: 1px; background: rgba(255,255,255,0.08); margin: 10px 0 6px; }
.preop-stat-row   { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.preop-stat-label { font-size: 11px; color: rgba(255,255,255,0.4); }
.preop-stat-val   { font-family: var(--font-num); font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.8); direction: ltr; unicode-bidi: embed; }
.preop-gap          { color: #ffffff !important; }
.preop-gap.achieved { color: #4ade80 !important; }
.preop-roi-card { padding: 26px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-card-lift); }
.preop-roi-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.preop-roi-title    { font-size: 16px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.preop-roi-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.preop-roi-pct-wrap { background: var(--bg-card-inner); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 5px 13px; flex-shrink: 0; }
.preop-roi-pct { font-family: var(--font-num); font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.03em; }
.roi-bar-track { width: 100%; height: 8px; background: var(--preop-track); border-radius: 99px; position: relative; overflow: hidden; }
.roi-bar-fill { height: 100%; width: 0%; background: var(--black); border-radius: 99px; transition: width 0.75s cubic-bezier(0.4, 0, 0.2, 1); position: relative; }
.roi-bar-fill::after { content: ''; position: absolute; top: 0; right: -60px; width: 60px; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); animation: shimmer 2.6s infinite; }
@keyframes shimmer { 0% { right: 100%; } 100% { right: -60px; } }
.roi-bar-fill.achieved { background: var(--income-color); }
.roi-bar-milestone { position: absolute; top: -3px; right: 100%; width: 2px; height: 14px; background: var(--black); border-radius: 1px; transition: right 0.75s; display: none; }
.roi-bar-labels { display: flex; justify-content: space-between; font-family: var(--font-num); font-size: 10px; font-weight: 500; color: var(--text-muted); margin-top: -4px; }
.roi-status-text { font-size: 12px; color: var(--text-muted); padding: 10px 14px; background: var(--bg-card-inner); border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: center; line-height: 1.55; }
.roi-status-text.on-track { color: var(--income-color); border-color: var(--income-border); background: var(--income-bg); font-weight: 500; }
.roi-status-text.achieved  { color: var(--income-color); border-color: var(--income-border); background: var(--income-bg); font-weight: 600; }
.preop-category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.preop-cat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 16px 14px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 11px; transition: border-color var(--transition); min-height: 140px; }
.preop-cat-card:hover { border-color: var(--border-mid); box-shadow: var(--shadow-card-lift); }
.preop-cat-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.preop-cat-title { font-size: 12.5px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.preop-cat-total { font-family: var(--font-num); font-size: 13px; font-weight: 700; color: var(--invest-color); direction: ltr; unicode-bidi: embed; white-space: nowrap; flex-shrink: 0; }
.preop-cat-total.zero { color: var(--text-muted); }
.preop-cat-items { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.preop-cat-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; background: var(--bg-card-inner); border: 1px solid var(--border); border-radius: var(--radius-sm); animation: slideIn 0.18s ease; transition: background var(--transition); }
.preop-cat-item:hover { background: var(--bg-hover); }
.preop-cat-item-name   { font-size: 11.5px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.preop-cat-item-amount { font-family: var(--font-num); font-size: 11.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; direction: ltr; unicode-bidi: embed; flex-shrink: 0; }
.preop-cat-item-del { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 1px 3px; border-radius: var(--radius-xs); opacity: 0; transition: opacity var(--transition); display: flex; align-items: center; flex-shrink: 0; }
.preop-cat-item:hover .preop-cat-item-del { opacity: 1; }
.preop-cat-item-del:hover { color: var(--expense-color); }
.preop-cat-item-hidden { display: none; }
.preop-cat-toggle { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; margin-top: 3px; padding: 5px 8px; background: var(--bg-card-inner); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); font-family: var(--font-base); font-size: 11px; font-weight: 600; cursor: pointer; transition: background var(--transition), color var(--transition); }
.preop-cat-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.preop-cat-toggle svg { transition: transform var(--transition); }
.preop-cat-expanded .preop-cat-toggle svg { transform: rotate(180deg); }
.preop-cat-empty { font-size: 11px; color: var(--text-muted); text-align: center; padding: 10px 0; font-style: italic; }

/* ← פוטר סיכום — שחור מוחלט */
.preop-footer-summary { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 15px 20px; box-shadow: var(--shadow-card); display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.preop-footer-cat { display: flex; align-items: center; gap: 6px; padding: 3px 13px 3px 0; flex-shrink: 0; }
.preop-footer-cat:not(:last-child) { border-left: 1px solid var(--border); margin-left: 13px; }
.preop-footer-cat-name   { font-size: 11px; font-weight: 600; color: #000000; white-space: nowrap; }
.preop-footer-cat-amount { font-family: var(--font-num); font-size: 12.5px; font-weight: 700; color: #000000; white-space: nowrap; direction: ltr; unicode-bidi: embed; }
.preop-footer-empty { font-size: 12px; color: var(--text-muted); font-style: italic; }

/* ══ הוצאות שוטפות ══ */
.burn-rate-card { background: var(--black); border-radius: var(--radius-xl); padding: 26px 30px; box-shadow: 0 6px 28px rgba(0,0,0,0.22); display: flex; flex-direction: column; gap: 9px; position: relative; overflow: hidden; }
.burn-rate-card::before { content: ''; position: absolute; top: -60px; left: -60px; width: 180px; height: 180px; background: rgba(255,255,255,0.025); border-radius: 50%; pointer-events: none; }
.burn-rate-label  { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.42); letter-spacing: 0.12em; text-transform: uppercase; }
.burn-rate-amount { font-family: var(--font-num); font-size: 40px; font-weight: 700; color: #ffffff; letter-spacing: -0.04em; line-height: 1; direction: ltr; unicode-bidi: embed; }
.burn-rate-sub    { display: flex; align-items: center; gap: 10px; font-family: var(--font-num); font-size: 12.5px; color: rgba(255,255,255,0.5); }
.burn-rate-dot    { width: 3px; height: 3px; background: rgba(255,255,255,0.3); border-radius: 50%; flex-shrink: 0; }
.fixed-expenses-list { display: flex; flex-direction: column; gap: 3px; max-height: 65vh; overflow-y: auto; }
.fixed-expenses-list::-webkit-scrollbar { width: 3px; }
.fixed-expenses-list::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }
.fixed-item { display: grid; grid-template-columns: 15px 1fr auto; gap: 0 9px; padding: 5px 10px; background: var(--bg-card-inner); border: 1px solid var(--border); border-radius: var(--radius-md); transition: border-color var(--transition); animation: slideIn 0.2s ease; align-items: center; }
.fixed-item:hover { border-color: var(--border-mid); background: var(--bg-hover); }
.fixed-checkbox { width: 14px; height: 14px; border-radius: var(--radius-xs); border: 1.5px solid var(--border-strong); background: var(--bg-main); appearance: none; -webkit-appearance: none; cursor: pointer; transition: all var(--transition); position: relative; flex-shrink: 0; }
.fixed-checkbox:checked { background: var(--paid-green-color); border-color: var(--paid-green-color); }
.fixed-checkbox:checked::after { content: ''; position: absolute; top: 1px; right: 2px; width: 5px; height: 7px; border: 2px solid #ffffff; border-top: none; border-right: none; transform: rotate(-45deg); }
.fixed-item-body  { min-width: 0; }
.fixed-item-top   { display: flex; align-items: center; gap: 5px; margin-bottom: 1px; flex-wrap: wrap; }
.fixed-name             { font-size: 11.5px; font-weight: 700; color: var(--text-primary); }
.fixed-category-label   { font-size: 9.5px; font-weight: 600; color: var(--text-secondary); background: var(--bg-hover); border: 1px solid var(--border); padding: 1px 5px; border-radius: 12px; }
.fixed-days-left-badge  { font-size: 9.5px; font-weight: 700; padding: 1px 7px; border-radius: 20px; background: var(--orange-bg); color: var(--orange-color); border: 1px solid var(--orange-border); white-space: nowrap; }
.fixed-days-left-badge.urgent { background: var(--urgent-bg); color: var(--urgent-color); border-color: var(--urgent-border); animation: urgentPulse 2s ease-in-out infinite; }
@keyframes urgentPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.fixed-item-meta  { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 1px; }
.fixed-meta-item  { font-size: 9.5px; color: var(--text-muted); display: flex; align-items: center; gap: 3px; }
.fixed-meta-label { font-weight: 600; color: var(--text-secondary); }
.fixed-payment-track { margin-top: 2px; display: flex; flex-direction: column; gap: 2px; }
.fixed-payment-bar-wrap { display: flex; align-items: center; }
.fixed-payment-track-bg   { flex: 1; height: 3px; background: var(--border); border-radius: 99px; overflow: hidden; }
.fixed-payment-track-fill { height: 100%; background: var(--income-color); border-radius: 99px; transition: width 0.5s ease; }
.fixed-payment-labels { display: flex; justify-content: space-between; gap: 8px; }
.fixed-payment-paid { font-family: var(--font-num); font-size: 10px; font-weight: 600; color: var(--income-color); }
.fixed-payment-left { font-family: var(--font-num); font-size: 10px; font-weight: 500; color: var(--text-muted); }
.fixed-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.fixed-amount { font-family: var(--font-num); font-size: 13px; font-weight: 700; color: var(--text-primary); direction: ltr; unicode-bidi: embed; white-space: nowrap; }
.fixed-amount-wrap { display: flex; align-items: center; gap: 4px; }
.fixed-amount-edit { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 1px 2px; border-radius: var(--radius-xs); opacity: 0; display: flex; align-items: center; transition: opacity var(--transition), color var(--transition); }
.fixed-item:hover .fixed-amount-edit { opacity: 1; }
.fixed-amount-edit:hover { color: var(--invest-color); }
.fixed-amount-input { width: 78px; font-family: var(--font-num); font-size: 12.5px; font-weight: 700; text-align: left; direction: ltr; padding: 3px 6px; border: 1px solid var(--invest-color); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-primary); }
.fixed-amount-save, .fixed-amount-cancel { background: none; border: none; cursor: pointer; padding: 2px 3px; border-radius: var(--radius-xs); display: flex; align-items: center; transition: color var(--transition); }
.fixed-amount-save { color: var(--paid-green-color); }
.fixed-amount-cancel { color: var(--text-muted); }
.fixed-amount-cancel:hover { color: var(--expense-color); }
.fixed-paid-badge { font-size: 9.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.fixed-paid-badge.paid   { background: var(--paid-green-bg);  color: var(--paid-green-color);  border: 1px solid var(--paid-green-border); }
.fixed-paid-badge.unpaid { background: var(--expense-bg); color: var(--expense-color); border: 1px solid var(--expense-border); }
.fixed-delete { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 2px 3px; border-radius: var(--radius-xs); opacity: 0; transition: all var(--transition); display: flex; align-items: center; }
.fixed-item:hover .fixed-delete { opacity: 1; }
.fixed-delete:hover { color: var(--expense-color); background: var(--expense-bg); }

/* ══ מנויים ══ */
.card-subscriptions { overflow: hidden; }
.subs-table-wrapper { overflow-x: auto; }
.subs-table { width: 100%; border-collapse: collapse; }
.subs-table thead tr { border-bottom: 1px solid var(--border); }
.subs-table th { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.08em; text-align: right; padding: 9px 15px; white-space: nowrap; text-transform: uppercase; }
.subs-table td { padding: 13px 15px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-primary); text-align: right; transition: background var(--transition); }
.subs-table tbody tr { animation: slideIn 0.2s ease; }
.subs-table tbody tr:hover td { background: var(--bg-hover); }
.subs-table tbody tr:last-child td { border-bottom: none; }
.subs-table tbody tr.sub-cancelled td { opacity: 0.45; }
.subs-table tbody tr.sub-cancelled .sub-service-name { text-decoration: line-through; }
.sub-service-cell { display: flex; align-items: center; gap: 10px; }
.sub-icon { display: inline-flex; align-items: center; justify-content: center; width: 29px; height: 29px; border-radius: var(--radius-xs); background: var(--bg-card-inner); border: 1px solid var(--border); font-size: 13px; flex-shrink: 0; }
.sub-service-name { font-weight: 600; font-size: 13px; }
.sub-cost-cell { font-family: var(--font-num); font-size: 14px; font-weight: 600; direction: ltr; unicode-bidi: embed; }
.sub-date-cell { font-family: var(--font-num); font-size: 12px; color: var(--text-muted); }
.sub-date-cell.soon    { color: var(--soon-color); font-weight: 600; }
.sub-date-cell.overdue { color: var(--expense-color); font-weight: 600; }
.sub-status-badge { font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 20px; display: inline-block; }
.sub-status-badge.active    { background: var(--income-bg); color: var(--income-color); border: 1px solid var(--income-border); }
.sub-status-badge.cancelled { background: var(--cancel-red-bg); color: var(--cancel-red-color); border: 1px solid var(--cancel-red-border); }
.category-tag { font-size: 11px; font-weight: 500; color: var(--text-muted); background: var(--bg-card-inner); padding: 2px 8px; border-radius: var(--radius-xs); border: 1px solid var(--border); display: inline-block; }
.sub-delete { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 5px; border-radius: var(--radius-xs); opacity: 0; transition: all var(--transition); display: inline-flex; align-items: center; }
.subs-table tbody tr:hover .sub-delete { opacity: 1; }
.sub-delete:hover { color: var(--expense-color); background: var(--expense-bg); }
.sub-toggle-status { background: none; border: 1px solid var(--border-mid); color: var(--text-secondary); cursor: pointer; padding: 2px 7px; border-radius: var(--radius-xs); font-size: 10px; font-weight: 600; font-family: var(--font-body); opacity: 0; transition: all var(--transition); white-space: nowrap; }
.subs-table tbody tr:hover .sub-toggle-status { opacity: 1; }
.sub-toggle-status:hover { background: var(--bg-hover); }

/* ══════════════════════════════════════════════
   מלאי — KPI card + טבלה
   ══════════════════════════════════════════════ */
.inv-section-header { margin-bottom: -6px; }
.inv-section-title  { font-size: 17px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.inv-section-sub    { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* KPI מלאי סה"כ */
.inv-kpi-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 22px;
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; gap: 16px;
  border-right: 4px solid var(--black);
}

.inv-kpi-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--black); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.inv-kpi-icon svg { stroke: #ffffff; }

.inv-kpi-body { flex: 1; }

.inv-kpi-label { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; }

.inv-kpi-value {
  font-family: var(--font-num); font-size: 36px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.04em; line-height: 1;
  margin-top: 3px;
}

.inv-kpi-sub-wrap { text-align: left; }
.inv-kpi-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

.inv-card { padding: 0; overflow: hidden; }
.inv-table-wrapper { overflow-x: auto; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table thead tr { border-bottom: 2px solid var(--border); background: var(--bg-card-inner); }
.inv-table th { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.08em; text-align: right; padding: 10px 13px; white-space: nowrap; text-transform: uppercase; }
.inv-th-icon { width: 46px; }
.inv-th-del  { width: 38px; }
.inv-table td { padding: 11px 13px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; text-align: right; transition: background var(--transition); }
.inv-table tbody tr:hover td { background: var(--bg-hover); }
.inv-table tbody tr:last-child td { border-bottom: none; }
.inv-product-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--black); color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.inv-product-name { font-weight: 700; font-size: 13px; display: block; }
.inv-sku          { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.inv-qty-input { font-family: var(--font-num); font-size: 17px; font-weight: 700; width: 68px; padding: 3px 5px; background: transparent; border: none; border-bottom: 1.5px solid transparent; border-radius: 0; color: var(--text-primary); text-align: center; direction: ltr; outline: none; transition: border-color var(--transition), color var(--transition); }
.inv-qty-input:focus { border-bottom-color: var(--black); }
.inv-qty-input.ok   { color: var(--income-color); }
.inv-qty-input.low  { color: var(--orange-color); }
.inv-qty-input.out  { color: var(--expense-color); }
.inv-threshold-input { font-family: var(--font-num); font-size: 12.5px; font-weight: 600; width: 65px; padding: 5px 8px; background: var(--bg-main); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); color: var(--text-primary); text-align: center; direction: ltr; outline: none; transition: border-color var(--transition); }
.inv-threshold-input:focus { border-color: var(--black); }
.inv-status-badge { font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.inv-status-badge.in-stock    { background: var(--income-bg);  color: var(--income-color);  border: 1px solid var(--income-border); }
.inv-status-badge.low-stock   { background: var(--orange-bg);  color: var(--orange-color);  border: 1px solid var(--orange-border); }
.inv-status-badge.out-of-stock{ background: var(--expense-bg); color: var(--expense-color); border: 1px solid var(--expense-border); }
.inv-row-del, .pkg-row-del { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 5px; border-radius: var(--radius-xs); opacity: 0; transition: all var(--transition); display: inline-flex; align-items: center; }
.inv-table tbody tr:hover .inv-row-del, .pkg-table tbody tr:hover .pkg-row-del { opacity: 1; }
.inv-row-del:hover, .pkg-row-del:hover { color: var(--expense-color); background: var(--expense-bg); }

/* WooCommerce sync — תמונת מוצר, כמות read-only, badge */
.inv-product-img { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: cover; display: block; }
.inv-qty-ro { font-family: var(--font-num); font-size: 17px; font-weight: 700; display: inline-block; min-width: 40px; text-align: center; }
.inv-qty-ro.ok  { color: var(--income-color); }
.inv-qty-ro.low { color: var(--orange-color); }
.inv-qty-ro.out { color: var(--expense-color); }
.inv-woo-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; letter-spacing: 0.04em; margin-top: 6px; }
.inv-woo-badge::before { content: '●'; font-size: 7px; animation: woo-pulse 2s ease-in-out infinite; }
@keyframes woo-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.inv-add-form { border-top: 1px solid var(--border); padding: 16px 17px 13px; background: var(--bg-card-inner); }
.inv-add-form-title { font-size: 10.5px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 11px; }
.inv-add-form-row { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; }
.inv-add-field { display: flex; flex-direction: column; gap: 4px; }
.inv-add-field-lg { flex: 1; min-width: 130px; }
.inv-add-label { font-size: 9.5px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.04em; text-transform: uppercase; }
.inv-add-input { font-family: var(--font-body); font-size: 12.5px; padding: 7px 10px; background: var(--bg-main); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); color: var(--text-primary); direction: rtl; text-align: right; outline: none; transition: border-color var(--transition); width: 100%; }
.inv-add-input:focus { border-color: var(--black); box-shadow: var(--shadow-focus); }
.inv-add-input::placeholder { color: var(--text-placeholder); }
.inv-add-input-num { width: 72px; text-align: center; direction: ltr; }
.inv-add-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--black); color: #ffffff; border: none; border-radius: var(--radius-sm); padding: 7px 14px; font-family: var(--font-body); font-size: 12px; font-weight: 600; cursor: pointer; transition: background var(--transition); white-space: nowrap; flex-shrink: 0; }
.inv-add-btn:hover  { background: var(--black-hover); }

.pkg-table-wrapper { overflow-x: auto; }
.pkg-table { width: 100%; border-collapse: collapse; }
.pkg-table thead tr { border-bottom: 2px solid var(--border); background: var(--bg-card-inner); }
.pkg-table th { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.08em; text-align: right; padding: 10px 13px; white-space: nowrap; text-transform: uppercase; }
.pkg-th-check { width: 46px; text-align: center !important; }
.pkg-th-del   { width: 38px; }
.pkg-table td { padding: 10px 13px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; text-align: right; transition: background var(--transition); }
.pkg-table tbody tr:hover td { background: var(--bg-hover); }
.pkg-table tbody tr:last-child td { border-bottom: none; }
.pkg-table tbody tr.pkg-included td { background: var(--income-bg); }
.pkg-check-cell { text-align: center; }
.pkg-checkbox { width: 16px; height: 16px; border-radius: var(--radius-xs); border: 1.5px solid var(--border-strong); background: var(--bg-main); appearance: none; -webkit-appearance: none; cursor: pointer; transition: all var(--transition); position: relative; }
.pkg-checkbox:checked { background: var(--black); border-color: var(--black); }
.pkg-checkbox:checked::after { content: ''; position: absolute; top: 2px; right: 3px; width: 6px; height: 8px; border: 2px solid #ffffff; border-top: none; border-right: none; transform: rotate(-45deg); }
.pkg-item-name { font-weight: 600; font-size: 13px; }
.pkg-input { font-family: var(--font-num); font-size: 12.5px; font-weight: 500; width: 82px; padding: 5px 8px; background: var(--bg-main); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); color: var(--text-primary); text-align: center; direction: ltr; outline: none; transition: border-color var(--transition); }
.pkg-input:focus { border-color: var(--black); }
.pkg-cost-per-unit      { font-family: var(--font-num); font-size: 13.5px; font-weight: 700; color: var(--invest-color); direction: ltr; unicode-bidi: embed; }
.pkg-cost-per-unit.zero { color: var(--text-muted); font-weight: 400; }
.pkg-add-form { border-top: 1px solid var(--border); padding: 13px 17px; background: var(--bg-card-inner); }
.pkg-add-form-inner { display: flex; align-items: center; gap: 10px; }
.pkg-add-input { flex: 1; font-family: var(--font-body); font-size: 12.5px; padding: 8px 12px; background: var(--bg-main); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); color: var(--text-primary); direction: rtl; text-align: right; outline: none; transition: border-color var(--transition); }
.pkg-add-input:focus { border-color: var(--black); }
.pkg-add-input::placeholder { color: var(--text-placeholder); }
.pkg-total-bar { display: flex; align-items: center; gap: 16px; padding: 17px 20px; background: var(--black); border-top: 1px solid rgba(255,255,255,0.08); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.pkg-total-label  { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.55); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.pkg-total-amount { font-family: var(--font-num); font-size: 24px; font-weight: 700; color: #ffffff; direction: ltr; unicode-bidi: embed; letter-spacing: -0.03em; flex: 1; text-align: left; }
.pkg-total-sub    { font-size: 11px; color: rgba(255,255,255,0.4); white-space: nowrap; }

/* ══ תמחור ══ */
.pricing-table { width: 100%; border-collapse: collapse; }
.pricing-table thead tr { border-bottom: 2px solid var(--border); background: var(--bg-card-inner); }
.pricing-table th { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.08em; text-align: right; padding: 11px 15px; white-space: nowrap; text-transform: uppercase; }
.pricing-table td { padding: 13px 15px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-primary); text-align: right; transition: background var(--transition); vertical-align: middle; }
.pricing-table tbody tr:hover td { background: var(--bg-hover); }
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-product-name { font-weight: 700; }
.pricing-num { font-family: var(--font-num); font-size: 13.5px; font-weight: 600; direction: ltr; unicode-bidi: embed; }
.pricing-profit { font-family: var(--font-num); font-size: 14px; font-weight: 800; direction: ltr; unicode-bidi: embed; }
.pricing-profit.positive { color: var(--income-color); }
.pricing-profit.negative { color: var(--expense-color); }
.pricing-profit.zero     { color: var(--text-muted); }
.pricing-profit-cell.positive { background: var(--income-bg); }
.pricing-profit-cell.negative { background: var(--expense-bg); }
.pricing-del { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 5px; border-radius: var(--radius-xs); opacity: 0; transition: all var(--transition); display: inline-flex; align-items: center; }
.pricing-table tbody tr:hover .pricing-del { opacity: 1; }
.pricing-del:hover { color: var(--expense-color); background: var(--expense-bg); }

/* ══ משלוחים ══ */
.courier-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 22px 26px; box-shadow: var(--shadow-card); border: 1px solid var(--border); }
.courier-card-title { font-size: 12px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 16px; }
.courier-fields { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-end; }
.courier-field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 150px; }
.courier-label { font-size: 10.5px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.courier-input { font-family: var(--font-body); font-size: 13.5px; background: var(--bg-card-inner); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); padding: 9px 13px; color: var(--text-primary); direction: rtl; text-align: right; outline: none; transition: border-color var(--transition); width: 100%; }
.courier-input:focus { border-color: var(--black); box-shadow: var(--shadow-focus); }
.courier-input::placeholder { color: var(--text-placeholder); }
.shipment-metrics-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shipment-metric-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 7px; }
.shipment-metric-dark { background: var(--black); border-color: transparent; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.shipment-metric-label { font-size: 10.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; }
.shipment-metric-dark .shipment-metric-label { color: rgba(255,255,255,0.45); }
.shipment-metric-value { font-family: var(--font-num); font-size: 34px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.04em; line-height: 1; direction: ltr; unicode-bidi: embed; }
.shipment-metric-dark .shipment-metric-value { color: #ffffff; }
.shipment-metric-sub { font-size: 11px; color: var(--text-muted); }
.shipment-metric-dark .shipment-metric-sub { color: rgba(255,255,255,0.38); }
.shipment-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-btn { font-family: var(--font-body); font-size: 12px; font-weight: 500; padding: 6px 14px; border-radius: 20px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.filter-btn:hover { background: var(--bg-hover); border-color: var(--border-mid); color: var(--text-primary); }
.filter-btn.active { background: var(--black); border-color: var(--black); color: #ffffff; }
.shipments-table { width: 100%; border-collapse: collapse; }
.shipments-table thead tr { border-bottom: 2px solid var(--border); background: var(--bg-card-inner); }
.shipments-table th { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.08em; text-align: right; padding: 10px 13px; white-space: nowrap; text-transform: uppercase; }
.shipments-table td { padding: 13px 13px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-primary); text-align: right; transition: background var(--transition); vertical-align: middle; }
.shipments-table tbody tr { animation: slideIn 0.2s ease; }
.shipments-table tbody tr:hover td { background: var(--bg-hover); }
.shipments-table tbody tr:last-child td { border-bottom: none; }
.shipment-serial { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.shipment-customer { font-weight: 700; }
.shipment-date { font-family: var(--font-num); font-size: 12px; color: var(--text-muted); }
.shipment-status-badge { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; display: inline-block; white-space: nowrap; transition: filter 0.12s; }
.shipment-status-badge:hover { filter: brightness(0.93); }
.ss-sent      { background: #e8f4fd; color: #1a6fa8; border: 1px solid #a8d4f0; }
.ss-pending   { background: var(--orange-bg); color: var(--orange-color); border: 1px solid var(--orange-border); }
.ss-delivered { background: var(--paid-green-bg); color: var(--paid-green-color); border: 1px solid var(--paid-green-border); }
.ss-returned  { background: var(--expense-bg); color: var(--expense-color); border: 1px solid var(--expense-border); }
.ss-cancelled { background: var(--cancel-red-bg); color: var(--cancel-red-color); border: 1px solid var(--cancel-red-border); opacity: 0.75; }
.shipment-del { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 5px; border-radius: var(--radius-xs); opacity: 0; transition: all var(--transition); display: inline-flex; align-items: center; }
.shipments-table tbody tr:hover .shipment-del { opacity: 1; }
.shipment-del:hover { color: var(--expense-color); background: var(--expense-bg); }
.ship-inline-input { background: var(--bg-main); border: 1px solid var(--border-mid); border-radius: var(--radius-xs); color: var(--text-primary); font-size: 12px; padding: 3px 6px; width: 100%; min-width: 55px; outline: none; font-family: inherit; }
.ship-inline-input:focus { border-color: var(--income-color); }
.ship-inline-date { min-width: 128px; }
.ship-save-btn { background: var(--paid-green-bg); border: 1px solid var(--paid-green-border); color: var(--paid-green-color); cursor: pointer; padding: 3px 9px; border-radius: var(--radius-xs); font-size: 13px; font-weight: 700; transition: all var(--transition); }
.ship-save-btn:hover { background: var(--paid-green-color); color: #fff; }
.ship-cancel-btn { background: none; border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; padding: 3px 7px; border-radius: var(--radius-xs); font-size: 12px; transition: all var(--transition); }
.ship-cancel-btn:hover { border-color: var(--expense-color); color: var(--expense-color); }

/* ══════════════════════════════════════════════
   פתקים
   ══════════════════════════════════════════════ */

.notes-form-card { padding: 24px 26px; }

.notes-form-grid {
  display: grid; grid-template-columns: 1fr 200px;
  gap: 20px; align-items: start;
}

.notes-form-main { display: flex; flex-direction: column; }

.notes-form-side {
  display: flex; flex-direction: column; gap: 14px; height: 100%;
}
.note-color-picker { display: flex; gap: 8px; margin-top: 4px; }
.note-color-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-mid); cursor: pointer; padding: 0; transition: transform var(--transition), box-shadow var(--transition); }
.note-color-dot:hover { transform: scale(1.12); }
.note-color-dot.active { border-color: var(--text-primary); box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--text-primary); }

.notes-textarea {
  width: 100%; padding: 10px 0; font-family: var(--font-body); font-size: 13.5px;
  color: var(--text-primary); background: transparent;
  border: none; border-bottom: 1.5px solid var(--border-mid); border-radius: 0;
  resize: none; outline: none; direction: rtl; text-align: right; line-height: 1.6;
  transition: border-color var(--transition);
}
.notes-textarea:focus { border-bottom-color: var(--black); }
.notes-textarea::placeholder { color: var(--text-placeholder); }

/* גריד פתקים — עמודות מרובות */
.notes-grid {
  columns: 3 280px; column-gap: 18px;
}

.note-card {
  break-inside: avoid;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
  display: flex; flex-direction: column; gap: 10px;
  animation: slideIn 0.25s ease;
  position: relative;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.note-card:hover { box-shadow: var(--shadow-card-lift); border-color: var(--border-mid); }

.note-card-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
}

.note-card-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  line-height: 1.3; flex: 1;
}

.note-card-del {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 2px 4px; border-radius: var(--radius-xs);
  opacity: 0; transition: all var(--transition); display: flex; align-items: center;
  flex-shrink: 0;
}

.note-card:hover .note-card-del { opacity: 1; }
.note-card-del:hover { color: var(--expense-color); background: var(--expense-bg); }

.note-card-content {
  font-size: 13px; color: var(--text-secondary); line-height: 1.65;
  word-break: break-word; white-space: pre-wrap;
}

.note-card-footer {
  display: flex; align-items: center; gap: 6px;
  padding-top: 10px; border-top: 1px solid var(--border);
  margin-top: auto;
}

.note-reminder-icon { color: var(--text-muted); flex-shrink: 0; }

.note-reminder-text {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  font-family: var(--font-num);
}

.note-reminder-text.overdue { color: var(--expense-color); }
.note-reminder-text.soon    { color: var(--orange-color); }

.notes-empty-state {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 60px 20px; text-align: center;
}

.notes-empty-state svg { stroke: var(--text-muted); opacity: 0.25; }
.notes-empty-state p   { font-size: 13px; color: var(--text-muted); max-width: 280px; line-height: 1.6; }

/* ══════════════════════════════════════════════
   לוח שנה
   ══════════════════════════════════════════════ */

.cal-nav {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 22px;
  box-shadow: var(--shadow-card);
}

.cal-nav-btn {
  background: var(--bg-card-inner); border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm); color: var(--text-secondary);
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition); flex-shrink: 0;
}

.cal-nav-btn:hover { background: var(--black); border-color: var(--black); color: #ffffff; }
.cal-nav-btn:hover svg { stroke: #ffffff; }

.cal-month-label {
  font-size: 18px; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.02em; flex: 1; text-align: center;
}

.cal-grid-wrap {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card);
}

.cal-header-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-bottom: 2px solid var(--border);
  background: var(--bg-card-inner);
}

.cal-day-header {
  text-align: center; padding: 12px 4px;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.04em; text-transform: uppercase;
}

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
}

.cal-day {
  min-height: 90px; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border);
  padding: 8px 10px; cursor: pointer;
  transition: background var(--transition);
  display: flex; flex-direction: column; gap: 4px; position: relative;
}

.cal-day:nth-child(7n+1) { border-right: none; }
.cal-day:hover { background: var(--bg-hover); }

.cal-day.today .cal-day-num { background: var(--black); color: #ffffff; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.cal-day.other-month { background: var(--bg-base); }
.cal-day.other-month .cal-day-num { color: var(--text-muted); }

/* ── חגים יהודיים — עדין ולא מכביד ─────────────────────────────────── */
.cal-holiday {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 1px 0 2px;
  overflow: hidden;
}
.cal-holiday-dot {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C9A84C;
  opacity: 0.85;
}
.cal-holiday-name {
  font-size: 10px;
  color: #9A6E1A;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  letter-spacing: 0.01em;
}
.cal-day.has-holiday { background: linear-gradient(to bottom, rgba(201,168,76,0.04) 0%, transparent 40%); }

/* ── תאריך עברי ───────────────────────────────────────────────────────── */
.cal-heb-date {
  font-size: 9.5px;
  color: var(--text-primary);
  opacity: 0.75;
  text-align: right;
  margin: 0 0 2px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.cal-day-num {
  font-family: var(--font-num); font-size: 13px; font-weight: 600;
  color: var(--text-primary); line-height: 1; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}

.cal-event {
  font-size: 10.5px; font-weight: 600;
  background: var(--black); color: #ffffff;
  padding: 2px 7px; border-radius: var(--radius-xs);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.4;
}

/* ══════════════════════════════════════════════
   מחשבון
   ══════════════════════════════════════════════ */

.calc-wrapper {
  background: var(--black);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.06);
  width: 320px;
  flex-shrink: 0;
}

.calc-screen {
  padding: 24px 22px 16px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  min-height: 110px; justify-content: flex-end;
}

.calc-expression {
  font-family: var(--font-num); font-size: 13px; color: rgba(255,255,255,0.35);
  min-height: 18px; letter-spacing: 0.01em; direction: ltr; unicode-bidi: embed;
}

.calc-display {
  font-family: var(--font-num); font-size: 48px; font-weight: 300;
  color: #ffffff; letter-spacing: -0.04em; line-height: 1;
  direction: ltr; unicode-bidi: embed;
  word-break: break-all; text-align: right; max-width: 100%;
  transition: font-size 0.1s ease;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: rgba(255,255,255,0.05);
}

.calc-btn {
  font-family: var(--font-num); font-size: 20px; font-weight: 400;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  height: 70px;
  transition: background var(--transition), transform 0.08s ease;
  user-select: none; -webkit-user-select: none;
  direction: ltr;
}

.calc-btn:active { transform: scale(0.94); }

.calc-btn-num   { background: #1c1c1e; color: #ffffff; }
.calc-btn-fn    { background: #2a2a2c; color: #ffffff; font-size: 17px; }
.calc-btn-op    { background: #404040; color: #ffffff; }
.calc-btn-equals { background: #ffffff; color: var(--black); font-size: 22px; font-weight: 600; }

.calc-btn-num:hover    { background: #2a2a2c; }
.calc-btn-fn:hover     { background: #3a3a3c; }
.calc-btn-op:hover     { background: #555555; }
.calc-btn-equals:hover { background: #e8e8e8; }

/* 0 button spans 2 columns */
.calc-btn-zero {
  grid-column: span 2;
  justify-content: flex-end;
  padding-right: 26px;
  font-size: 20px;
}

.calc-btn-op.active { background: #ffffff; color: var(--black); }

/* ══ פלייסהולדר ══ */
.placeholder-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 80px 20px; text-align: center; }
.placeholder-icon { width: 74px; height: 74px; border-radius: var(--radius-lg); background: var(--bg-card-inner); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.placeholder-icon-studio { background: var(--black); border-color: var(--black); color: #ffffff; }
.placeholder-icon-studio svg { stroke: #ffffff; }
.placeholder-title { font-size: 24px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.placeholder-text  { font-size: 14px; color: var(--text-muted); max-width: 310px; line-height: 1.7; }
.placeholder-badge { font-size: 11px; font-weight: 700; padding: 6px 16px; background: var(--bg-card-inner); border: 1px solid var(--border); color: var(--text-secondary); border-radius: 20px; }
.placeholder-badge-studio { background: var(--black); border-color: var(--black); color: #ffffff; }

/* ══ חלונות קופצים ══ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.28); backdrop-filter: blur(6px); z-index: 200; display: flex; align-items: center; justify-content: center; animation: overlayIn 0.15s ease; direction: rtl; }
.modal-overlay.hidden { display: none; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--bg-main); border: 1px solid var(--border-mid); border-radius: var(--radius-xl); width: 500px; max-width: 94vw; box-shadow: var(--shadow-modal); animation: modalUp 0.2s cubic-bezier(0.34, 1.4, 0.64, 1); position: relative; z-index: 1; }
@keyframes modalUp { from { opacity: 0; transform: scale(0.97) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 18px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.modal-close { background: var(--bg-card-inner); border: 1px solid var(--border); border-radius: var(--radius-xs); color: var(--text-secondary); cursor: pointer; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.modal-close:hover { background: var(--bg-hover); border-color: var(--border-strong); color: var(--text-primary); }
.modal-body   { padding: 20px 24px; display: flex; flex-direction: column; gap: 15px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-start; padding: 13px 24px 20px; border-top: 1px solid var(--border); }
.modal-footer .btn-primary { width: auto; padding: 9px 20px; }

/* ══ חגיגה ══ */
#confetti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 210; }
.celebration-modal { width: 520px; max-width: 94vw; border: none; background: var(--black); border-radius: var(--radius-2xl); box-shadow: 0 28px 80px rgba(0,0,0,0.5); overflow: hidden; z-index: 220; animation: celebrationPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes celebrationPop { from { opacity: 0; transform: scale(0.88) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.celebration-glow { position: absolute; top: -80px; left: 50%; transform: translateX(-50%); width: 300px; height: 300px; background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%); pointer-events: none; animation: glowPulse 3s ease-in-out infinite; }
@keyframes glowPulse { 0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.12); } }
.celebration-body { padding: 42px 38px 36px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; position: relative; }
.celebration-icon { width: 68px; height: 68px; border-radius: 50%; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); display: flex; align-items: center; justify-content: center; color: #ffffff; animation: starSpin 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both; }
@keyframes starSpin { from { opacity: 0; transform: scale(0.5) rotate(-90deg); } to { opacity: 1; transform: scale(1) rotate(0deg); } }
.celebration-eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; color: rgba(255,255,255,0.38); text-transform: uppercase; }
.celebration-title { font-size: 28px; font-weight: 800; color: #ffffff; letter-spacing: -0.03em; line-height: 1.1; animation: fadeUp 0.4s ease 0.3s both; }
.celebration-text  { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.75; max-width: 360px; animation: fadeUp 0.4s ease 0.4s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.celebration-stat-row { display: flex; align-items: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09); border-radius: var(--radius-lg); padding: 16px 24px; width: 100%; animation: fadeUp 0.4s ease 0.5s both; }
.celebration-stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.celebration-stat-label { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.38); letter-spacing: 0.07em; }
.celebration-stat-val { font-family: var(--font-num); font-size: 19px; font-weight: 700; color: #ffffff; direction: ltr; unicode-bidi: embed; }
.celebration-profit   { color: #4ade80; }
.celebration-stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.08); flex-shrink: 0; }
.celebration-close-btn { background: #ffffff; color: var(--black); border-color: #ffffff; width: auto; padding: 11px 30px; font-size: 13.5px; font-weight: 700; border-radius: var(--radius-md); animation: fadeUp 0.4s ease 0.6s both; }
.celebration-close-btn:hover { background: #eeeeee; }

/* ══ Toast ══ */
.toast { position: fixed; bottom: 24px; left: 24px; background: var(--black); border-radius: var(--radius-md); padding: 12px 17px; box-shadow: 0 6px 24px rgba(0,0,0,0.18); font-family: var(--font-body); font-size: 12.5px; font-weight: 500; color: #ffffff; z-index: 999; display: flex; align-items: center; gap: 9px; animation: toastIn 0.25s cubic-bezier(0.34, 1.4, 0.64, 1); pointer-events: none; direction: rtl; max-width: 320px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ══ גלילה ══ */
* { scrollbar-width: thin; scrollbar-color: var(--border-mid) transparent; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator { opacity: 0.35; cursor: pointer; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ══════════════════════════════════════════════
   חוזים ומערכות + אזור פרטי
   ══════════════════════════════════════════════ */

.contracts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.contract-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 12px; transition: all var(--transition); }
.contract-card:hover { box-shadow: var(--shadow-card-lift); border-color: var(--border-mid); transform: translateY(-1px); }
.contract-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.contract-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.contract-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.contract-status { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--border); }
.contract-status.active { background: var(--income-bg); color: var(--income-color); border-color: var(--income-border); }
.contract-status.pending { background: var(--orange-bg); color: var(--orange-color); border-color: var(--orange-border); }
.contract-details { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.doc-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-inner);
  border: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-private-zone { padding: 8px 10px 12px; }
.sidebar-private-sep { height: 1px; background: var(--border); margin: 6px 6px 10px; }
.nav-private-link { font-weight: 600; }
.private-subnav { margin-top: 6px; display: none; flex-direction: column; gap: 2px; padding-right: 10px; }
.private-subnav.visible { display: flex; }
.private-sub-item { font-size: 12px; opacity: 0.9; }
.private-sub-item::before { content: '•'; margin-left: 8px; color: var(--text-muted); }
.private-lock-btn { margin-right: auto; width: 23px; height: 23px; border-radius: 50%; border: 1px solid var(--border-mid); background: var(--bg-card-inner); color: var(--text-secondary); font-size: 11px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.private-lock-btn:hover { background: var(--black); color: #ffffff; border-color: var(--black); }
.private-lock-btn.hidden { display: none; }

.private-pin-modal { width: 380px; }
.private-pin-error { font-size: 12px; color: var(--expense-color); margin-top: 4px; }
.private-pin-error.hidden { display: none; }
.private-toggle-btn, .private-status-btn { flex: 1; padding: 8px 12px; background: transparent; border: none; border-radius: 6px; color: var(--text-secondary); font-family: var(--font-body); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all var(--transition); }
.private-toggle-btn.active, .private-status-btn.active { background: var(--black); color: #ffffff; }

.doc-preview.is-clickable { cursor: zoom-in; }
.doc-preview img { max-width: 100%; max-height: 100%; border-radius: var(--radius-sm); object-fit: cover; }

.contract-lightbox { background: rgba(0, 0, 0, 0.84); z-index: 310; }
.contract-lightbox img { max-width: 78vw; max-height: 82vh; border-radius: var(--radius-md); box-shadow: 0 18px 60px rgba(0,0,0,0.5); object-fit: contain; background: #111; }
.lightbox-close { position: absolute; top: 24px; left: 24px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.32); color: #fff; font-size: 18px; cursor: pointer; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.35); color: #fff; font-size: 21px; cursor: pointer; }
.lightbox-prev { right: 22px; }
.lightbox-next { left: 22px; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.18); }

.private-security-card { padding: 20px 22px; }
.private-security-grid { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 10px; align-items: end; }
.private-security-save { width: auto; padding: 10px 20px; }
.private-pin-feedback { margin-top: 10px; font-size: 12px; font-weight: 600; }
.private-pin-feedback.ok { color: var(--income-color); }
.private-pin-feedback.err { color: var(--expense-color); }
.private-pin-feedback.hidden { display: none; }

.nav-item[draggable="true"] { cursor: grab; }
.nav-item.dragging { opacity: 0.55; }
.nav-item.drag-over { outline: 1px dashed var(--border-strong); outline-offset: -2px; }

.chat-shell { height: calc(100vh - 180px); min-height: 520px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); display: flex; flex-direction: column; overflow: hidden; }
.chat-header { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #ffffff 0%, #fcfcfd 100%); }
.chat-header .view-title { font-size: 21px; }
.chat-header .view-subtitle { margin-top: 5px; }
.chat-history { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; background: #fcfcfd; }
.chat-msg { max-width: 78%; padding: 11px 13px; border-radius: 14px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.chat-msg.ai { align-self: flex-start; background: #f3f3f6; color: var(--text-primary); border: 1px solid var(--border); }
.chat-msg.user { align-self: flex-end; background: var(--black); color: #ffffff; border: 1px solid var(--black); }
.chat-msg.typing { display: inline-flex; align-items: center; gap: 8px; }
.typing-dots { display: inline-flex; align-items: center; gap: 4px; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: #9d9da8; animation: dotPulse 1s infinite ease-in-out; }
.typing-dots span:nth-child(2) { animation-delay: 0.14s; }
.typing-dots span:nth-child(3) { animation-delay: 0.28s; }
@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.35; }
  40% { transform: scale(1); opacity: 1; }
}
.chat-input-area { position: sticky; bottom: 0; padding: 14px 16px; border-top: 1px solid var(--border); background: #ffffff; display: flex; gap: 10px; align-items: center; }
.chat-input { flex: 1; font-family: var(--font-body); font-size: 13.5px; border: 1px solid var(--border-mid); border-radius: 999px; padding: 11px 14px; outline: none; background: var(--bg-card-inner); color: var(--text-primary); }
.chat-input:focus { border-color: var(--black); background: #fff; box-shadow: var(--shadow-focus); }
.chat-send-btn { width: 40px; height: 40px; border: 1px solid var(--black); border-radius: 50%; background: var(--black); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition); flex-shrink: 0; }
.chat-send-btn:hover { background: var(--black-hover); }

.auth-overlay { position: fixed; inset: 0; z-index: 500; backdrop-filter: blur(14px); background: rgba(6,6,8,0.5); display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-overlay.hidden { display: none; }
.auth-card { width: 430px; max-width: 94vw; border-radius: var(--radius-2xl); background: rgba(255,255,255,0.94); border: 1px solid rgba(184,154,84,0.4); box-shadow: 0 20px 80px rgba(0,0,0,0.35); padding: 28px 26px 24px; text-align: center; }
.auth-logo { width: 64px; height: 64px; object-fit: contain; margin: 0 auto 10px; display: block; }
.auth-title { font-size: 30px; font-weight: 800; color: var(--text-primary); letter-spacing: 0.04em; }
.auth-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }
.auth-toggle-row { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #f0f0f3; border: 1px solid var(--border-mid); border-radius: 12px; padding: 4px; }
.auth-toggle-btn { border: none; background: transparent; border-radius: 9px; padding: 8px 10px; font-size: 12px; font-family: var(--font-body); color: var(--text-secondary); cursor: pointer; }
.auth-toggle-btn.active { background: var(--black); color: #fff; }
.auth-form { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.auth-input { border: 1px solid var(--border-mid); background: #fff; border-radius: 11px; padding: 12px 13px; font-family: var(--font-body); font-size: 13.5px; outline: none; text-align: right; direction: rtl; }
.auth-input:focus { border-color: var(--gold-accent); box-shadow: 0 0 0 3px rgba(184,154,84,0.16); }
.auth-submit-btn { margin-top: 2px; }
.auth-feedback { margin-top: 12px; font-size: 12px; font-weight: 600; }
.auth-feedback.hidden { display: none; }
.auth-feedback.ok { color: var(--income-color); }
.auth-feedback.err { color: var(--expense-color); }

.pin-shake { animation: pinShake 0.35s ease; }
@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* ══════════════════════════════════════════════════════════════════════════
   📱 RESPONSIVE DESIGN — מובייל וטאבלט
   ══════════════════════════════════════════════════════════════════════════ */

/* Hamburger button - ברירת מחדל מוסתר */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  width: 44px;
  height: 44px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
}
.mobile-menu-btn:active { transform: scale(0.95); }
.mobile-menu-btn svg { width: 22px; height: 22px; color: var(--text-primary); }

/* Backdrop - מסך כהה מאחורי התפריט */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
  animation: fadeIn 0.2s ease;
}
.sidebar-backdrop.active { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── טאבלט (≤1024px) ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-width: 240px; }
  .view-inner { padding: 24px 24px 36px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .preop-category-grid { grid-template-columns: repeat(2, 1fr); }
  .preop-top-row { grid-template-columns: 1fr; }
  .header-logo { height: 70px; }
}

/* ── מובייל (≤768px) ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* כפתור המבורגר מופיע */
  .mobile-menu-btn { display: flex; }

  /* Sidebar — Drawer מלא רוחב */
  .sidebar {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100vw !important;   /* רוחב מלא */
    max-width: 320px;          /* לא יותר מ-320px */
    box-shadow: -4px 0 24px rgba(0,0,0,0.18);
    z-index: 150;
  }
  .sidebar.active { transform: translateX(0); }

  /* Main content — רוחב מלא, ללא margin */
  .main-content {
    margin-right: 0 !important;
    width: 100%;
    overflow-x: hidden;
  }

  /* Header — שורה אחת נקייה */
  .top-header {
    padding: 0 12px;
    height: 56px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    overflow: hidden;
  }
  .header-logo { display: none; }
  /* Info block — שם + תאריך בשמאל */
  .header-info { max-width: calc(100% - 160px); overflow: hidden; }
  .header-name-row { flex-wrap: nowrap; overflow: hidden; }
  .header-name-row h1, .header-owner-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-owner-title, .header-date-text { font-size: 10px; margin-top: 1px; white-space: nowrap; }
  /* Right block — שעון בלבד, ללא כפתור logout */
  .header-right { position: static; transform: none; flex-shrink: 0; gap: 6px; }
  .header-time-block { padding: 4px 10px; }
  .header-time-block * { font-size: 12px !important; }
  /* כפתור logout - הסתר במובייל (נמצא בתפריט) */
  #logout-btn { display: none !important; }

  /* תצוגות — ללא overflow אופקי */
  .view-inner { padding: 16px 14px 24px; gap: 16px; overflow-x: hidden; }
  .view { overflow-x: hidden; }
  * { box-sizing: border-box; }
  .view-title { font-size: 22px; }
  .view-subtitle { font-size: 12px; }

  /* KPI - כרטיסים אחד מתחת לשני, לא חורגים מהמסך */
  .kpi-grid { grid-template-columns: 1fr; gap: 10px; }
  .kpi-card { width: 100%; box-sizing: border-box; overflow: hidden; }
  .kpi-value { font-size: 28px; }

  /* תזרים מזומנים - שתי עמודות לעמודה אחת */
  .tx-split-grid { grid-template-columns: 1fr; gap: 12px; }

  /* טופס הוספת עסקה - בעמודה */
  .tx-form-row { flex-direction: column; gap: 10px; }
  .tx-form-row > * { width: 100%; }

  /* טרום פעילות */
  .preop-category-grid { grid-template-columns: 1fr; gap: 10px; }

  /* חשבונית - גודל גדול יותר ללחיצה */
  .fixed-item {
    grid-template-columns: 18px 1fr;
    grid-template-rows: auto auto;
    padding: 14px;
    gap: 8px 10px;
  }
  .fixed-item-right {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  /* טבלאות גלילה אופקית */
  .subs-table-wrapper, .inv-table-wrapper, .pkg-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px;
    padding: 0 14px;
  }
  .subs-table, .inv-table, .pkg-table { min-width: 600px; }

  /* כרטיסי חוזים */
  .contracts-grid { grid-template-columns: 1fr; }

  /* פתקים */
  .notes-grid { grid-template-columns: 1fr; }

  /* יומן */
  .cal-day { min-height: 56px; padding: 4px; }
  .cal-day-num { font-size: 12px; }
  .cal-event { font-size: 9px; padding: 2px 4px; }

  /* מחשבון */
  .calc-keypad { gap: 6px; }
  .calc-key { padding: 14px 8px; font-size: 18px; min-height: 48px; }

  /* מודלים - מסך מלא במובייל */
  .modal-content {
    width: 92%;
    max-width: 92%;
    max-height: 88vh;
    margin: 0;
    padding: 18px;
  }
  .modal-content h3 { font-size: 16px; }

  /* כפתורים גדולים יותר ללחיצה */
  button, .btn, input[type="button"], input[type="submit"] {
    min-height: 40px;
  }
  input[type="text"], input[type="number"], input[type="date"], input[type="email"],
  input[type="password"], input[type="tel"], select, textarea {
    font-size: 16px !important; /* מונע zoom ב-iOS */
    min-height: 42px;
    padding: 10px 12px;
  }

  /* צ'אט AI */
  .chat-shell { height: calc(100vh - 80px); }
  .chat-history { padding: 12px; }
  .chat-msg { max-width: 86%; font-size: 14px; }
  .chat-input-area { padding: 10px; gap: 8px; }
  .chat-input { font-size: 16px !important; }
  .chat-send-btn { min-width: 42px; height: 42px; }

  /* סטודיו */
  .studio-workspace { grid-template-columns: 1fr; gap: 16px; }
  .studio-format-grid { grid-template-columns: repeat(2, 1fr); }
  .studio-style-grid { grid-template-columns: 1fr; }
  .studio-row { flex-direction: column; gap: 10px; }
  .studio-canvas-wrap { min-height: 240px; }

  /* טאב'ים של הסטודיו */
  .studio-tab { font-size: 12px; padding: 7px 14px; }

  /* תקציר ROI */
  .roi-summary-row { flex-direction: column; gap: 8px; align-items: flex-start; }

  /* פרסום */
  .placeholder-state { padding: 40px 20px; }
  .placeholder-title { font-size: 22px; }
  .placeholder-text { font-size: 13px; }
}

/* ── מובייל קטן (≤480px) ─────────────────────────────────────────────────── */
/* Global mobile overflow fix */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

@media (max-width: 480px) {
  .view-title { font-size: 19px; }
  .top-header { padding: 0 12px 0 60px; }
  .header-name-row h1, .header-owner-name { font-size: 14px; }
  .header-time-block { padding: 3px 8px; }
  .header-time-block * { font-size: 11px !important; }

  /* KPI cards - קטנים יותר */
  .kpi-card { padding: 16px; }
  .kpi-value { font-size: 22px; }
  .kpi-label { font-size: 10px; }

  /* יומן במובייל קטן */
  .cal-day { min-height: 42px; }
  .cal-day-num { font-size: 11px; }
}

/* ── תיקונים ספציפיים לתצוגות מסך גדולות עם תפריט פתוח ─────────────────── */
@media (min-width: 769px) {
  .mobile-menu-btn { display: none !important; }
  .sidebar-backdrop { display: none !important; }
  .sidebar { transform: none !important; }
}
/* ══ סטטוס חיבור טלגרם ══ */
.tg-settings-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
  direction: rtl;
}
.tg-settings-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.tg-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
}
.tg-status-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}
.tg-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 7px;
  margin-bottom: 0;
}

/* ══ FDS — סיכום תשלומים קרובים ══ */
.fixed-date-summary-card { background: var(--bg-card-inner); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; margin-top: 6px; }
.fds-header { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.fds-rows { display: flex; flex-direction: column; gap: 4px; }
.fds-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 0 10px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--bg-main); border: 1px solid var(--border); align-items: center; }
.fds-row.fds-urgent { border-color: var(--urgent-border); background: var(--urgent-bg); }
.fds-date-col { display: flex; flex-direction: column; gap: 1px; }
.fds-date-label { font-size: 11.5px; font-weight: 600; color: var(--text-primary); }
.fds-days-left { font-size: 9.5px; color: var(--text-muted); }
.fds-row.fds-urgent .fds-days-left { color: var(--urgent-color); font-weight: 600; }
.fds-names-col { display: flex; flex-wrap: wrap; gap: 5px; }
.fds-name { font-size: 11px; font-weight: 500; color: var(--text-secondary); background: var(--bg-card-inner); border: 1px solid var(--border); padding: 1px 6px; border-radius: 10px; }
.fds-amount { font-family: var(--font-num); font-size: 10px; color: var(--text-muted); direction: ltr; unicode-bidi: embed; margin-right: 3px; }
.fds-total-col { font-family: var(--font-num); font-size: 12.5px; font-weight: 700; color: var(--text-primary); direction: ltr; unicode-bidi: embed; white-space: nowrap; text-align: left; }

/* ══ מבט מהיר — Quick Overview (לוח בקרה) ══ */
.quick-overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.qo-card { padding: 16px 18px; }
.qo-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.qo-card-title { font-size: 12.5px; font-weight: 700; color: var(--text-primary); }
.qo-badge { font-size: 10px; font-weight: 700; background: var(--black); color: #fff; padding: 2px 8px; border-radius: 20px; flex-shrink: 0; }
.qo-list { display: flex; flex-direction: column; gap: 4px; }
.qo-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 8px 0; }
.qo-row { display: flex; align-items: center; gap: 7px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.qo-row:last-child { border-bottom: none; }
.qo-row-name { font-size: 12px; font-weight: 500; color: var(--text-primary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qo-row-meta { font-size: 10.5px; color: var(--text-secondary); white-space: nowrap; flex-shrink: 0; }
.qo-row-amount { font-family: var(--font-num); font-size: 12.5px; font-weight: 600; color: var(--text-primary); direction: ltr; unicode-bidi: embed; white-space: nowrap; flex-shrink: 0; }
.qo-urgent .qo-row-name { color: var(--urgent-color); }
.qo-urgent .qo-row-meta { color: var(--urgent-color); font-weight: 600; }
.qo-financial-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.qo-fin-label { font-size: 11px; color: var(--text-secondary); }
.qo-fin-value { font-family: var(--font-num); font-size: 12.5px; font-weight: 600; color: var(--text-primary); direction: ltr; unicode-bidi: embed; }
.qo-fin-paid { color: var(--income-color); }
.qo-fin-remaining { color: var(--expense-color); }
.qo-progress-wrap { margin-top: 7px; display: flex; align-items: center; gap: 8px; }
.qo-progress-bar { flex: 1; height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; }
.qo-progress-fill { height: 100%; background: var(--income-color); border-radius: 99px; transition: width 0.4s ease; }
.qo-progress-label { font-size: 10px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
@media (max-width: 1024px) { .quick-overview-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .quick-overview-grid { grid-template-columns: 1fr; } }

/* ══ עריכת תאריך חיוב — מנויים ══ */
.sub-edit-date { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0 3px; font-size: 11px; opacity: 0; transition: opacity var(--transition); vertical-align: middle; line-height: 1; }
.subs-table tbody tr:hover .sub-edit-date { opacity: 1; }
.sub-edit-date:hover { color: var(--text-primary); }
.sub-paid-th { width: 52px; text-align: center; }
.sub-paid-cell { text-align: center; }
.sub-paid-checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: var(--black); border-radius: 4px; }
.sub-date-input { border: 1px solid var(--border-mid); border-radius: var(--radius-xs); padding: 2px 6px; font-size: 11px; font-family: var(--font-body); background: var(--bg-card-inner); color: var(--text-primary); direction: ltr; }
.sub-date-save { background: var(--black); color: #fff; border: none; border-radius: var(--radius-xs); padding: 2px 8px; font-size: 11px; font-weight: 600; cursor: pointer; margin-right: 4px; }
.sub-date-save:hover { background: var(--black-hover); }

/* ══ עריכת מוצר — תמחור ══ */
.pricing-edit { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 3px 4px; border-radius: var(--radius-xs); opacity: 0; transition: all var(--transition); display: inline-flex; align-items: center; }
.pricing-table tbody tr:hover .pricing-edit { opacity: 1; }
.pricing-edit:hover { color: var(--text-primary); background: var(--bg-hover); }
/* ══ תשלומים לספקים (שוטף) ══ */
.sup-table th.sup-th-check { text-align: center; width: 56px; }
.sup-table td.sup-check-cell { text-align: center; }
.sup-name-cell { font-weight: 600; color: var(--text-primary); }
.sup-amount-cell { font-weight: 700; white-space: nowrap; }
.sup-method-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-hover); color: var(--text-secondary); border: 1px solid var(--border); }
.sup-row-paid { opacity: 0.62; }
.sup-row-paid .sup-amount-cell { text-decoration: line-through; text-decoration-thickness: 1px; }
.sup-checkbox { cursor: pointer; }
