/* ============================================================
   Master Cargo CRM — pages.css
   מדורים 21-25: Login · Misc (22a-22g: לוח מנהל, בריאות, פאנל פעילות) · Desktop ≥1024 · Reduced motion · Print
   פוצל מ-app.css (1007 שו') ב-06/09/2026 לפי docs/REFACTOR_PLAN.md §6.
   סדר הטעינה ב-base.html: tokens → layout → components-core → components-feature → pages
   (הסדר = סדר המדורים המקורי ב-app.css; אסור להחליף בין הקבצים — ה-cascade תלוי בו).
   כל הצבעים/הרדיוסים מגיעים מ-tokens.css. אין ערכים קשיחים כאן פרט לקטעים
   המסומנים "verbatim" שהועתקו מסגנון הבית של טל.
   ============================================================ */

/* ---------- 21. Login ---------- */
.login-wrap { min-height: calc(100dvh - var(--sp-5) * 2); display: flex; align-items: center; justify-content: center; padding: var(--sp-4) 0; }
.login-card { width: 100%; max-width: 420px; padding: 28px 24px 24px; }
.login-card .login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: var(--sp-5); text-align: center; }
.login-card .login-brand h1 { margin: 6px 0 0; font-size: 1.6rem; }
.login-card .login-brand .sub { color: var(--faint); font-size: var(--fs-sm); }
.login-card .btn-primary { margin-top: var(--sp-2); }
.login-foot { text-align: center; color: var(--faint); font-size: var(--fs-xs); margin-top: var(--sp-4); }

/* ---------- 22. Misc page bits ---------- */
.detail-head { display: flex; flex-direction: column; gap: 8px; }
.detail-head .ref { font-size: var(--fs-xs); color: var(--faint); font-weight: 700; letter-spacing: .5px; }
.detail-head h1 { font-size: 1.45rem; margin: 0; }
.detail-head .contact-row { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px;
  border-radius: var(--r-pill); border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  color: var(--text); font-size: var(--fs-sm); font-weight: 600; max-width: 100%;
}
.contact-btn:hover { text-decoration: none; border-color: rgba(34,211,238,.55); background: rgba(34,211,238,.1); }
.contact-btn .ico { font-size: 1rem; }
.contact-btn-wa { border-color: rgba(74,222,128,.45); color: var(--good); }
.contact-btn-wa:hover { background: rgba(74,222,128,.12); border-color: var(--good-2); }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.meta-grid .k { font-size: var(--fs-xs); color: var(--faint); font-weight: 700; }
.meta-grid .v { font-size: var(--fs-sm); font-weight: 600; word-break: break-word; }
.next-action { display: flex; align-items: center; gap: 12px; }
.next-action .na-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(var(--accent-rgb), .14); border: 1px solid rgba(var(--accent-rgb), .45); font-size: 1.2rem; flex: 0 0 auto; }
.next-action .na-title { font-weight: 800; }
.next-action .na-when { font-size: var(--fs-xs); color: var(--muted); }
.next-action.is-overdue .na-ico { background: rgba(var(--bad-rgb), .14); border-color: rgba(var(--bad-rgb), .5); }
.mail-view { font-size: var(--fs-sm); }
.mail-view .mv-head { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding-bottom: var(--sp-3); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-3); }
.mail-view .mv-head .k { color: var(--faint); font-weight: 700; font-size: var(--fs-xs); }
.mail-view .mv-body { white-space: pre-wrap; word-break: break-word; line-height: 1.55; color: var(--text); max-height: 60vh; overflow: auto; padding: 12px; border-radius: var(--r-sm); background: rgba(8,13,28,.55); border: 1px solid var(--line); }
.mail-view .mv-body.is-ltr { direction: ltr; text-align: left; }
.attach-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-2); }
.attach { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-sm); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); font-size: var(--fs-xs); color: var(--text); max-width: 100%; }
.attach:hover { text-decoration: none; border-color: rgba(34,211,238,.5); }
.attach .sz { color: var(--faint); }
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); color: var(--text); transition: border-color var(--t-fast), background var(--t-fast); }
.notif:hover { text-decoration: none; border-color: rgba(232,135,59,.45); }
.notif.is-unread { border-color: rgba(34,211,238,.35); background: linear-gradient(180deg, rgba(34,211,238,.07), rgba(255,255,255,.02)); }
.notif .n-ico { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-size: 1.1rem; }
.notif.is-unread .n-ico { background: rgba(var(--accent-rgb), .14); border-color: rgba(var(--accent-rgb), .45); }
.notif .n-title { font-weight: 800; font-size: var(--fs-sm); }
.notif .n-body { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.notif .n-time { font-size: var(--fs-xs); color: var(--faint); margin-top: 4px; }
.notif .n-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); margin-top: 8px; flex: 0 0 auto; box-shadow: var(--glow-cyan); }
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.status-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.status-strip a { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: var(--touch); padding: 8px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); color: var(--text); font-size: var(--fs-sm); font-weight: 600; }
.status-strip a:hover { text-decoration: none; border-color: rgba(232,135,59,.45); }
.status-strip .n { font-weight: 900; font-size: 1.1rem; }
.quick-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-links a { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: var(--fs-sm); }
.quick-links a:hover { text-decoration: none; border-color: rgba(34,211,238,.5); background: rgba(34,211,238,.08); }
.quick-links .ico { font-size: 1.3rem; }
.exception-group .card { }
.exception-title { display: flex; align-items: center; gap: 8px; }
.exception-title .cnt { min-width: 26px; height: 26px; padding: 0 8px; border-radius: var(--r-pill); background: rgba(var(--bad-rgb), .16); border: 1px solid rgba(var(--bad-rgb), .5); color: var(--bad); font-size: .78rem; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; }
.exception-title.is-warn .cnt { background: rgba(var(--warn-rgb), .14); border-color: rgba(var(--warn-rgb), .45); color: var(--warn); }
.exc-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: var(--touch); border-radius: 12px; background: var(--glass); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: var(--fs-sm); }
.exc-row:hover { text-decoration: none; border-color: rgba(232,135,59,.4); }
.exc-row .exc-count { min-width: 28px; height: 28px; padding: 0 6px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: .8rem; background: rgba(var(--warn-rgb), .14); color: var(--warn); flex: 0 0 auto; }
.exc-row.is-bad .exc-count { background: rgba(var(--bad-rgb), .16); color: var(--bad); }
.exc-row .ico { color: var(--faint); }
.hb-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.hb { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.hb .hb-name { font-weight: 800; font-size: var(--fs-sm); }
.hb .hb-age { font-size: var(--fs-xs); color: var(--faint); }
.hb .hb-err { font-size: var(--fs-xs); color: var(--bad); margin-top: 2px; word-break: break-word; }
.hb.is-bad { border-color: rgba(var(--bad-rgb), .45); }
.offline-banner { display: none; position: fixed; inset-inline: 0; inset-block-start: calc(var(--nav-h) + var(--sa-t)); z-index: 55; padding: 6px 12px; text-align: center; font-size: var(--fs-xs); font-weight: 700; background: rgba(217,119,6,.92); color: #1a1200; }
body.is-offline .offline-banner { display: block; }
.install-btn { display: none; }
.install-btn.is-available { display: inline-flex; }
.pill-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); font-size: .72rem; font-weight: 800; background: rgba(255,255,255,.08); color: var(--muted); }
.btn-primary .pill-count, .primary-action .pill-count { background: rgba(0,0,0,.18); color: inherit; }

/* ---------- 22a. עוגן #leads (הסבב 05/09 — איחוד /leads?mine=1 לתוך '/'): לא נחסם מתחת לטופבר/לסרגל הדביק ---------- */
#leads, #action-stack { scroll-margin-top: calc(var(--nav-h) + var(--sa-t) + 74px); }

/* ---------- 22b. נקודת בריאות ליד (app.domain.health — RED/YELLOW/GREEN/GREY, נפרד מה-status).
   שם נבדל מ-.health-dot הקיים (בריאות ה-worker בטופבר, .is-bad/.is-warn) — שני מושגים שונים. ---------- */
.lead-health { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.lead-health-good { background: var(--good); box-shadow: 0 0 6px rgba(var(--good-rgb), .55); }
.lead-health-warn { background: var(--warn); box-shadow: 0 0 6px rgba(var(--warn-rgb), .55); }
.lead-health-bad { background: var(--bad); box-shadow: 0 0 6px rgba(var(--bad-rgb), .6); }
.lead-health-neutral { background: var(--faint); box-shadow: none; }

/* ---------- 22c. לוח מנהל: פס התקדמות ---------- */
.progress-panel { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--sh-card); }
.progress-head { display: flex; align-items: center; gap: var(--sp-3) var(--sp-4); flex-wrap: wrap; }
.progress-number { font-size: 2.4rem; font-weight: 900; line-height: 1; flex: 0 0 auto; }
.progress-number.tone-good { color: var(--good); }
.progress-number.tone-warn { color: var(--warn); }
.progress-number.tone-bad { color: var(--bad); }
.progress-sentence { flex: 1 1 200px; color: var(--muted); font-size: var(--fs-sm); font-weight: 700; min-width: 0; }
.progress-kpis { display: flex; gap: 6px; flex-wrap: wrap; flex: 0 0 auto; margin-inline-start: auto; }
.kpi-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); min-width: 60px; color: var(--text); }
.kpi-chip:hover { text-decoration: none; border-color: rgba(232,135,59,.4); }
.kpi-chip .kc-v { font-size: 1.05rem; font-weight: 900; line-height: 1; }
.kpi-chip .kc-l { font-size: 9px; color: var(--faint); text-align: center; white-space: nowrap; }
.kpi-chip.tone-good .kc-v { color: var(--good); }
.kpi-chip.tone-warn .kc-v { color: var(--warn); }
.kpi-chip.tone-bad .kc-v { color: var(--bad); }
.kpi-chip.tone-cyan .kc-v { color: var(--cyan); }
.kpi-chip.tone-accent .kc-v { color: var(--accent-2); }
.progress-bar-track { position: relative; height: 22px; border-radius: var(--r-pill); overflow: hidden; background: rgba(255,255,255,.06); display: flex; }
.progress-seg { height: 100%; min-width: 0; transition: width var(--t-med) var(--ease); }
.progress-seg.is-green { background: linear-gradient(90deg, var(--good-2), var(--good)); }
.progress-seg.is-yellow { background: linear-gradient(90deg, var(--warn-2), var(--warn)); }
.progress-seg.is-red { background: linear-gradient(90deg, var(--bad-2), var(--bad)); }
.progress-target { position: absolute; inset-block: -4px; width: 2px; background: #fff; opacity: .9; box-shadow: 0 0 6px rgba(255,255,255,.65); }
.progress-target-label { position: absolute; inset-block-start: -20px; inset-inline-start: 50%; transform: translateX(-50%); font-size: 10px; color: var(--faint); white-space: nowrap; }
.progress-legend { display: flex; gap: var(--sp-4); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); }
.progress-legend .lg-item { display: inline-flex; align-items: center; gap: 6px; }
.progress-legend .lg-dot { width: 9px; height: 9px; border-radius: 50%; }

/* ---------- 22d. לוח מנהל: גרף SVG 'לידים פתוחים לפי איש מכירות' ---------- */
.chart-panel { padding: var(--sp-4); border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--sh-card); }
/* עמודות אנכיות (06/09): הגלילה האופקית שייכת לקונטיינר בלבד — הדף עצמו לעולם לא נגלל לצדדים. */
.chart-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.chart-svg { display: block; width: 100%; height: auto; margin-inline: auto; }
.chart-track { fill: rgba(255,255,255,.05); }
.chart-axis { stroke: rgba(255,255,255,.16); stroke-width: 1.5; }
.chart-col:hover .chart-track { fill: rgba(255,255,255,.09); }
.chart-col-label { font-size: 17px; font-weight: 700; fill: var(--text); }
.chart-col-total { font-size: 18px; font-weight: 800; fill: var(--muted); }
.chart-seg-count { font-size: 17px; font-weight: 800; fill: #0b1020; pointer-events: none; }
.chart-empty { padding: var(--sp-5) 0; text-align: center; color: var(--faint); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: var(--sp-4); font-size: var(--fs-xs); color: var(--muted); }
.chart-legend .lg-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .lg-swatch { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }

/* ---------- 22e. לוח מנהל: כותרות מיון בטבלה ---------- */
.th-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; font: inherit; }
.th-sort:hover { color: var(--text); text-decoration: none; }
.th-sort .arrow { font-size: 9px; opacity: .45; }
.th-sort.is-active { color: var(--cyan); }
.th-sort.is-active .arrow { opacity: 1; }
.cell-title-link { color: var(--text); font-weight: 800; }
.cell-title-link:hover { color: var(--accent-2); }

/* ---------- 22e2. חיפוש חופשי מעל טבלה (leads-table.js) ---------- */
.table-search { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); flex-wrap: wrap; }
.table-search .search-wrap { flex: 1 1 260px; }
.table-search .input { width: 100%; min-height: var(--touch); padding-inline-end: 52px; }
.table-search .ts-clear {
  position: absolute; inset-inline-end: 6px; inset-block-start: 50%; transform: translateY(-50%);
  min-width: var(--touch); min-height: var(--touch); border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--faint); font-size: 1rem; line-height: 1;
}
.table-search .ts-clear:hover { color: var(--text); background: rgba(255,255,255,.06); }
.table-search .ts-count { font-size: var(--fs-xs); color: var(--faint); white-space: nowrap; direction: rtl; unicode-bidi: isolate; }
.table-search .ts-num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.table-search.is-filtering .ts-count { color: var(--cyan); font-weight: 700; }
.table-search input[type="search"]::-webkit-search-cancel-button { display: none; }

/* ---------- 22f. לוח מנהל: פאנל פעילות (side panel + FAB במובייל) ---------- */
.mgr-layout { display: block; }
.mgr-main { min-width: 0; }
.mgr-side { display: none; }
.feed-panel { border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); overflow: hidden; }
.feed-panel > summary { list-style: none; cursor: pointer; padding: var(--sp-3) var(--sp-4); font-weight: 800; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.feed-panel > summary::-webkit-details-marker { display: none; }
.feed-panel > summary::after { content: '▾'; transition: transform var(--t-fast); color: var(--faint); }
.feed-panel:not([open]) > summary::after { transform: rotate(-90deg); }
.feed-panel .feed-body { padding: 0 var(--sp-3) var(--sp-3); max-height: 66vh; overflow-y: auto; }
.feed-list { display: flex; flex-direction: column; gap: 6px; }
.feed-list .notif { padding: 8px 10px; }
.fab-feed {
  position: fixed; inset-block-end: calc(var(--sp-4) + var(--sa-b)); inset-inline-end: var(--sp-4); z-index: 45;
  width: 52px; height: 52px; border-radius: 50%; border: 0; padding: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  background: var(--grad-accent); color: var(--on-accent); box-shadow: var(--sh-pop);
}
.fab-feed .fab-badge { position: absolute; inset-block-start: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--r-pill); background: var(--bad-2); color: #fff; font-size: .62rem; font-weight: 900; line-height: 18px; text-align: center; }
@media (min-width: 1200px) {
  .mgr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-5); align-items: start; }
  .mgr-side { display: block; position: sticky; inset-block-start: calc(var(--nav-h) + var(--sp-4)); }
  .fab-feed { display: none; }
}

/* ---------- 22g. התחברות: התקנה כאפליקציה ---------- */
.login-pwa { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px dashed var(--line); }
.login-pwa .install-btn { width: 100%; }
.login-pwa details { margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--muted); }
.login-pwa summary { cursor: pointer; color: var(--cyan); font-weight: 700; }
.login-pwa summary:hover { text-decoration: underline; }
.login-pwa .pwa-steps { margin: var(--sp-2) 0 0; padding-inline-start: 1.15em; }
.login-pwa .pwa-steps li { margin-bottom: 4px; }
.login-pwa h4 { margin: var(--sp-3) 0 4px; font-size: var(--fs-sm); }

/* ---------- 23. Desktop ≥ 1024px ---------- */
@media (min-width: 1024px) {
  .hide-mobile { display: initial !important; }
  .hide-desktop { display: none !important; }
  .nav-toggle { display: none; }
  .backdrop { display: none; }
  .sidebar {
    width: var(--sb-w); transform: none; visibility: visible;
    box-shadow: none; border-inline-end: 1px solid rgba(255,255,255,.07);
  }
  body.drawer-open { overflow: auto; }
  .main { padding: calc(var(--nav-h) + var(--sp-5)) var(--sp-5) var(--sp-7); padding-inline-start: calc(var(--sb-w) + var(--sp-5)); }
  body.no-nav .main { padding-inline-start: var(--sp-5); }
  .topbar { padding-inline: var(--sp-4); }
  .topbar .brand-name { font-size: 1.1rem; }
  .btn { min-height: 42px; padding: 8px 16px; }
  .btn-sm { min-height: 34px; }
  .action-row .btn { flex: 0 1 auto; min-height: 40px; }
  .primary-action { width: auto; min-width: 280px; }
  .primary-action.btn-block { width: 100%; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi .v { font-size: 2rem; }
  .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .status-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quick-links { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .meta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-stack { display: table; }
  .table-stack thead { display: table-header-group; }
  .table-stack tbody { display: table-row-group; }
  .table-stack tr { display: table-row; padding: 0; margin: 0; border-radius: 0; background: none; border: 0; box-shadow: none; }
  .table-stack td { display: table-cell; width: auto; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); }
  .table-stack td::before { display: none; }
  .table-stack td.cell-title { font-weight: 600; font-size: var(--fs-sm); padding-bottom: 10px; }
  dialog.sheet { inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: min(520px, 92vw); max-height: 80vh; border-radius: 20px; border-bottom: 1px solid rgba(255,255,255,.12); animation: fade-in var(--t-med) var(--ease); }
  dialog.sheet .grabber { display: none; }
  .sticky-actions { position: static; margin: var(--sp-4) 0 0; padding: 0; background: none; }
  .filters { flex-direction: row; align-items: center; }
  .filters .search-wrap { flex: 0 0 280px; }
  .filters .scroll-x { flex: 1 1 auto; }
  .layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--sp-4); align-items: start; }
  .layout-2col > .col-side { position: sticky; top: calc(var(--nav-h) + var(--sp-4)); }
  .toast-root { align-items: flex-start; inset-inline-start: calc(var(--sb-w) + var(--sp-4)); inset-inline-end: auto; }
}
@media (min-width: 1400px) {
  .kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ---------- 24. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .orb { animation: none; }
  .orb::after { display: none; }
}

/* ---------- 25. Print ---------- */
@media print {
  body { background: #fff !important; color: #000; }
  .topbar, .sidebar, .backdrop, .toast-root, .nav-toggle, .primary-action, .action-row, .sticky-actions, .btn, .install-btn, .offline-banner { display: none !important; }
  .main { padding: 0 !important; }
  .card, .kpi, .notif, .hb { background: #fff; border: 1px solid #bbb; box-shadow: none; color: #000; break-inside: avoid; }
  .card::before { display: none; }
  .chip { border-color: #999; color: #000; background: #f2f2f2; }
  .muted, .faint, .kpi .l, .tl-time { color: #444; }
  a { color: #000; }
  .tab-panel { display: block !important; }
  .tabs { display: none; }
}

/* ---------- 26. דשבורד אישי לאיש מכירות (/dashboard — הכרעת טל 06/09) ----------
   הדף מרכיב את הרכיבים הקיימים (.progress-panel §22c, .chart-* §22d, .kpi-grid, .mgr-layout §22f)
   ומוסיף רק שלושה: משפט הבריאות, רשימת "הבא בתור" ושורת ה-30 יום. הכלל: לא נוגעים ברכיב קיים —
   כל הסלקטורים כאן מתחילים ב-.sd-* / .nx-* כדי שדפים אחרים לא יושפעו.                            */
.sd-headline {
  font-size: var(--fs-md); font-weight: 800; color: var(--text); line-height: 1.5;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  background: var(--glass); border: 1px solid var(--line); border-inline-start: 3px solid var(--cyan);
}

/* שישה כרטיסים (ולא 4/5 כמו בלוח המנהל) ⇒ 2 / 3 / 6 עמודות — תמיד שורות מלאות, בלי כרטיס יתום */
.sd-kpis .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* "הבא בתור" — שורה = קישור לליד; במובייל נערמת לשלוש שורות, ≥720px לשלוש עמודות */
.nx-list { display: flex; flex-direction: column; gap: 8px; }
.nx-item {
  display: grid; grid-template-columns: 1fr; gap: 6px var(--sp-3); align-items: center;
  min-height: var(--touch); padding: 10px var(--sp-3);
  border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--line); color: var(--text);
}
.nx-item:hover { text-decoration: none; border-color: rgba(var(--accent-rgb), .45); background: var(--glass-strong); }
.nx-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; direction: rtl; unicode-bidi: isolate; }
.nx-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-ref { color: var(--faint); font-size: var(--fs-xs); flex: 0 0 auto; }
.nx-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nx-next { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--muted); min-width: 0; }
.nx-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-due { font-variant-numeric: tabular-nums; unicode-bidi: isolate; color: var(--muted); white-space: nowrap; }
.nx-due.is-overdue { color: var(--bad); font-weight: 800; }

/* שני הגרפים זה לצד זה רק כשיש לכל אחד מקום אמיתי; אחרת אחד מתחת לשני, וכל אחד גולל בעצמו
   (.chart-scroll). ⛔ minmax(0, 1fr) ולא 1fr: מסלול ``1fr`` הוא minmax(auto,1fr) ולכן נמתח
   ל-min-content של ה-SVG (604px) — הדף כולו גלש לרוחב בטלפון (ממצא סקירה 06/09/2026). */
.sd-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
.sd-charts > .chart-panel { min-width: 0; }
.sd-charts .chart-panel .section-head { margin-bottom: var(--sp-3); }
.sd-charts .chart-panel h3 { font-size: var(--fs-sm); }
/* העמודות כאן צרות (62/58 יחידות) מול 84 בלוח המנהל — טקסט קטן יותר כדי שהתווית לא תגלוש */
.sd-charts .chart-col-label, .sd-charts .chart-col-total, .sd-charts .chart-seg-count { font-size: 13px; }

/* שורת 30 יום */
.sd-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.sd-stat {
  display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3);
  border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--line);
}
.sd-stat .sd-v { font-size: 1.35rem; font-weight: 900; line-height: 1.1; color: var(--cyan); }
.sd-stat .sd-l { font-size: var(--fs-xs); font-weight: 700; color: var(--text); }
.sd-stat .sd-s { font-size: 10px; color: var(--faint); }

@media (min-width: 720px) {
  .sd-kpis .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nx-item { grid-template-columns: minmax(0, 1.6fr) auto minmax(0, 1.2fr); }
  .nx-next { justify-content: flex-end; }
  .sd-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* 900–1199: אין עדיין עמודת פיד (.mgr-layout נכנס ב-1200) ⇒ יש מקום לשני גרפים.
   1200–1699: הפיד לוקח 340px ⇒ ~285px לגרף (פחות מחצי גרף) — עדיף אחד מתחת לשני, ברוחב מלא.
   ‏1700+: גם עם הפיד נשארים ~640px לגרף ⇒ שוב שניים בשורה (ממצא סקירה 06/09/2026). */
@media (min-width: 900px) and (max-width: 1199px) {
  .sd-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .sd-kpis .kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 1700px) {
  .sd-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
