/* ═══════════════════════════════════════════════════════════════
   שפת העיצוב — סבב 3 (07/09/2026, בקשת יגל: בלי חום, פשוט ונוח)
   קנבס אפור קריר · כרטיסים לבנים · צבע אחד לפעולה · צבע סמנטי רק כשיש לו משמעות.
   שמות הטוקנים נשמרו כדי שכל המסכים יתעדכנו יחד; הערכים חדשים.
   ═══════════════════════════════════════════════════════════════ */
:root{
  /* ניטרלים — אפור קריר עם נגיעת כחול, לא בז' ולא אפור-מסך גנרי */
  --ground:#F2F4F7; --surface:#FFFFFF; --surface-2:#F7F9FB; --surface-3:#EBEFF3;
  /* --muted / --muted-2 הוכהו לעמידה ב-AA (4.5:1) לטקסט רגיל: --muted על --ground 4.60:1
     (היה 4.29), --muted-2 על --surface 4.53:1 (היה 2.63 — כותרות הטבלאות ב-11.5px) */
  --ink:#0E1621; --ink-2:#33414F; --muted:#62707F; --muted-2:#697887;
  --rule:#DFE5EC; --rule-soft:#EDF1F5;
  --hero:#0B1F27;              /* סרגל הצד — פטרול כהה מאוד */

  /* צבע ראשי: פטרול עמוק (כפתורים, ניווט פעיל, פוקוס). לא כחול ברירת-מחדל. */
  --accent:#0F4C5C; --accent-hover:#0B3B47; --accent-2:#E8F1F3; --accent-3:#BFD8DE; --accent-ink:#FFFFFF;
  --link:#12657A;
  /* הדגשה חמה — פעולה יחידה בולטת (FAB, סימון «עכשיו»). לא חום. */
  --hot:#DD6B3C; --hot-2:#FDF0EA; --hot-3:#F5CBB6;

  /* סמנטיקה */
  --success:#12805E; --success-2:#E6F4EF; --success-3:#B7DFCF;
  --danger:#C4372C;  --danger-2:#FCEEEC;  --danger-3:#F0C4BF;
  --warn:#B0740F;    --warn-2:#FBF3E4;    --warn-3:#EAD3A4;
  --info:#4A6B80;    --info-2:#EEF3F6;    --info-3:#CFDCE4;

  /* ── צבעי השלבים (סבב 6): חמישה שלבים פעילים + שני מצבי סגירה. ── */
  --st-new:#7A93A8; --st-discovery:#2F7C9B; --st-negotiation:#D2662F;
  --st-won:#12805E; --st-execution:#0E7050; --st-finished:#3C4A58; --st-lost:#C4372C;
  /* שמות ישנים (סבב 5) — כדי שמסך שטרם עודכן לא יאבד צבע */
  --st-lead:var(--st-new); --st-offer:var(--st-discovery);
  /* הסטטוסים המדויקים יורשים את צבע השלב שלהם */
  --st-future:var(--st-new); --st-contacted:var(--st-new);
  --st-qualifying:var(--st-discovery); --st-planning_spec:var(--st-discovery); --st-pre_selection:var(--st-discovery);
  --st-tender:var(--st-negotiation); --st-tenant_changes:var(--st-execution);
  /* תאימות לשמות ישנים */
  --sage:var(--success); --clay:var(--danger); --sky:var(--info); --brass:#0E1621;
  --tier-1:#94A1B0; --tier-2:#48586A; --tier-3:#0E1621; --tier-x:#D5DCE4;
  /* סולם ההשפעה 1–5 (סבב 8): אינדיגו מבהיר לכהה — נבדל מפטרול (מבנה) ומטרהקוטה (פעולה) */
  --inf-1:#C8C3E8; --inf-2:#A59DD6; --inf-3:#8377C0; --inf-4:#6254A8; --inf-5:#443A88;
  /* חוזק הקשר 1–5: טרהקוטה מבהיר לכהה (חום מנוגד לאינדיגו של ההשפעה) */
  --rel-1:#F3CDB9; --rel-2:#EBA98A; --rel-3:#E2865E; --rel-4:#C9633A; --rel-5:#9E4A28;

  --r:12px; --r-sm:8px;
  --shadow:0 1px 2px rgba(11,31,39,.05), 0 1px 3px rgba(11,31,39,.06);
  --shadow-lg:0 14px 34px -14px rgba(11,31,39,.3);
  --nav-w:216px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--ground); color:var(--ink);
  font:400 15px/1.55 Heebo,-apple-system,"Segoe UI",sans-serif;
  font-feature-settings:"tnum"; -webkit-font-smoothing:antialiased; min-height:100vh;
}
.num,.mono{font-family:"IBM Plex Mono",ui-monospace,monospace;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
/* אייקוני icon() נוצרים בלי width/height — בלי ברירת מחדל הם נמתחים לרוחב ההורה.
   כל כלל ממשי (עם מחלקה) גובר על הסלקטור הזה, ולכן זו רשת ביטחון בלבד. */
svg{width:18px;height:18px;flex-shrink:0}
input,select,textarea{font:inherit;color:inherit}
a{color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
.main a:not(.btn):not(.chip):not(.tab){color:var(--accent);text-decoration:none}
.main a:not(.btn):not(.chip):not(.tab):hover{text-decoration:underline}
[hidden]{display:none!important}
.boot{padding:60px;text-align:center;color:var(--muted)}
.muted{color:var(--muted)} .small{font-size:12.5px}
.brass{color:var(--ink);font-weight:600} .clay{color:var(--danger)} .sage{color:var(--success)}
.warn-txt{color:var(--warn)}
.right{margin-inline-start:auto}

/* ═══════════════ מעטפת ═══════════════ */
.app-root{min-height:100vh}
.shell{display:grid;grid-template-columns:var(--nav-w) 1fr;min-height:100vh}
.nav{
  background:var(--hero);color:#E7EBF2;padding:14px 12px;position:sticky;top:0;height:100vh;
  display:flex;flex-direction:column;gap:3px;overflow-y:auto;
}
.nav .brand{display:flex;align-items:center;gap:10px;padding:6px 8px 14px}
.nav .brand img{height:30px;width:auto}
.nav .brand b{display:block;font-weight:600;font-size:14px;line-height:1.2}
.nav .brand span{font-size:11px;color:rgba(255,255,255,.5)}
.nav a{
  display:flex;align-items:center;gap:10px;padding:9px 11px;border-radius:var(--r-sm);
  text-decoration:none;font-size:14.5px;color:rgba(255,255,255,.72);transition:background .12s,color .12s;
}
.nav a:hover{background:rgba(255,255,255,.06);color:#fff}
.nav a.active{background:var(--accent);color:#fff;font-weight:500}
.nav a.active svg{opacity:1}
.nav a svg{width:18px;height:18px;flex-shrink:0;opacity:.75}
/* תג אדום — מספר הפעולות הנדרשות להיום (באיחור + היום) */
.nav-badge{margin-inline-start:auto;min-width:22px;height:22px;padding:0 7px;border-radius:11px;background:var(--danger);color:#fff;font-size:12px;font-weight:700;display:inline-grid;place-items:center;font-variant-numeric:tabular-nums}
.bottom-nav a{position:relative}
.bottom-nav .nav-badge{position:absolute;top:4px;inset-inline-end:calc(50% - 22px);min-width:18px;height:18px;font-size:11px;padding:0 5px}
.nav .nav-sep{height:1px;background:rgba(255,255,255,.09);margin:9px 8px}
.nav .nav-foot{margin-top:auto;font-size:12.5px;padding:10px 10px 4px;display:flex;flex-direction:column;gap:5px;border-top:1px solid rgba(255,255,255,.09)}
.nav .nav-foot b{font-weight:500;color:#fff;font-size:13px}
.nav .nav-foot .who{color:rgba(255,255,255,.55)}
.nav .nav-foot button{color:rgba(255,255,255,.6);text-align:start;font-size:12.5px;padding:2px 0}
.nav .nav-foot button:hover{color:#fff}
.nav .env-pill{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:#FFD9A8}
.nav .env-pill::before{content:"";width:6px;height:6px;border-radius:50%;background:#F5A524}
.nav-toggle{display:none}
.nav-scrim{display:none}
@media(max-width:900px){
  .nav-scrim{display:block;position:fixed;inset:0;background:rgba(15,23,42,.35);z-index:59;opacity:0;pointer-events:none;transition:opacity .18s}
  .nav-scrim.on{opacity:1;pointer-events:auto}
  .tabs button,.tabs .tab{min-height:44px}
}
.main{min-width:0;padding:24px 28px 56px;max-width:1220px}
@media(max-width:900px){
  .shell{grid-template-columns:1fr}
  .nav{position:fixed;inset-inline-start:0;top:0;width:min(272px,84vw);z-index:60;transform:translateX(100%);transition:transform .2s;height:100vh;padding-bottom:74px}
  .nav.open{transform:none}
  .main{padding:14px 15px 84px}
}

/* ═══════════════ כותרת עמוד ═══════════════ */
.page-head{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.page-head h1{font-size:23px;font-weight:600;letter-spacing:-.01em;line-height:1.25}
.page-head .sub{color:var(--muted);font-size:13.5px;margin-top:3px}
.page-head .actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.crumbs{font-size:12.5px;color:var(--muted);margin-bottom:8px;display:flex;gap:6px;align-items:center}
.crumbs a{text-decoration:none}
.crumbs a:hover{text-decoration:underline}
.eyebrow{font-size:11.5px;letter-spacing:.1em;color:var(--muted);font-weight:500;text-transform:none}

/* ═══════════════ כרטיסים ורשת ═══════════════ */
.card{background:var(--surface);border:1px solid var(--rule);border-radius:var(--r);box-shadow:var(--shadow)}
.card-h{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 16px;border-bottom:1px solid var(--rule-soft)}
.card-h h2{font-size:14.5px;font-weight:600;display:flex;align-items:center;gap:7px;flex-shrink:0}
.card-h .hint{font-size:12px;color:var(--muted)}
.card-b{padding:16px}
.card-b.tight{padding:0}
.grid{display:grid;gap:14px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1100px){.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}}
.stack{display:flex;flex-direction:column;gap:14px}
.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.spread{justify-content:space-between}
.empty{padding:30px 16px;text-align:center;color:var(--muted);font-size:14px}

/* ═══════════════ מדדים (KPI) ═══════════════ */
.kpi{padding:14px 16px;display:flex;flex-direction:column;gap:3px;min-height:84px;text-decoration:none!important;color:inherit!important}
.kpi .k-lbl{font-size:12.5px;color:var(--muted)}
.kpi .k-val{font-size:27px;font-weight:600;line-height:1.15;letter-spacing:-.02em}
.kpi .k-sub{font-size:12.5px;color:var(--muted)}
.kpi.clickable,a.kpi{cursor:pointer;transition:border-color .12s,box-shadow .12s}
.kpi.clickable:hover,a.kpi:hover{border-color:var(--accent-3);box-shadow:0 0 0 3px var(--accent-2)}
.kpi.accent .k-val{color:var(--accent)}
.kpi.bad .k-val{color:var(--danger)}
.kpi.warn .k-val{color:var(--warn)}
.kpi.good .k-val{color:var(--success)}

/* ═══════════════ טבלאות ═══════════════ */
.tbl-wrap{overflow-x:auto}
table.tbl{width:100%;border-collapse:collapse;font-size:14px}
.tbl th{font-weight:500;font-size:12px;color:var(--muted);text-align:start;padding:9px 14px;border-bottom:1px solid var(--rule);white-space:nowrap;background:var(--surface-2)}
.tbl td{padding:11px 14px;border-bottom:1px solid var(--rule-soft);vertical-align:middle}
.tbl tr:last-child td{border-bottom:0}
.tbl tr.link{cursor:pointer}
.tbl tr.link:hover td{background:var(--surface-2)}
.tbl td.num,.tbl th.num{text-align:end}
.tbl .cell-main{font-weight:500}
.tbl .cell-sub{font-size:12.5px;color:var(--muted);margin-top:1px}
.tbl th.sortable{cursor:pointer;user-select:none}
.tbl th.sortable:hover{color:var(--ink)}
.tbl th .sort-ind{font-size:10px;margin-inline-start:4px}

/* ═══════════════ תגיות ═══════════════ */
.badge{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--ink-2);border:1px solid var(--rule);border-radius:6px;padding:2px 8px;background:var(--surface);white-space:nowrap;line-height:1.6}
.badge.dark{background:var(--ink);color:#fff;border-color:var(--ink)}
.badge.accent{color:var(--accent);border-color:var(--accent-3);background:var(--accent-2)}
.badge.sage,.badge.good{color:var(--success);border-color:var(--success-3);background:var(--success-2)}
.badge.clay,.badge.bad{color:var(--danger);border-color:var(--danger-3);background:var(--danger-2)}
.badge.brass,.badge.warn{color:var(--warn);border-color:var(--warn-3);background:var(--warn-2)}
.badge.sky,.badge.info{color:var(--info);border-color:var(--info-3);background:var(--info-2)}
.dot{width:7px;height:7px;border-radius:50%;background:var(--success);flex-shrink:0;display:inline-block}
.dot.off{background:var(--tier-x)} .dot.warn{background:var(--warn)} .dot.bad{background:var(--danger)}
/* צ'יפ סטטוס פרויקט — נקודה בצבע השלב + טקסט. אותו צבע חוזר בלוח הצנרת וברשימות. */
.badge.st{font-weight:500;padding-inline-start:7px}
.badge.st::before{content:"";width:7px;height:7px;border-radius:2px;background:var(--st,#93A2B1);flex-shrink:0}
.badge.st-future{--st:var(--st-future)} .badge.st-contacted{--st:var(--st-contacted)}
.badge.st-qualifying{--st:var(--st-qualifying)} .badge.st-planning_spec{--st:var(--st-planning_spec)}
.badge.st-pre_selection{--st:var(--st-pre_selection)} .badge.st-tender{--st:var(--st-tender)}
.badge.st-negotiation{--st:var(--st-negotiation)} .badge.st-won{--st:var(--st-won)}
.badge.st-execution{--st:var(--st-execution)} .badge.st-tenant_changes{--st:var(--st-tenant_changes)}
.badge.st-finished{--st:var(--st-finished)} .badge.st-lost{--st:var(--st-lost)}
.badge.st-lead{--st:var(--st-lead)} .badge.st-discovery{--st:var(--st-discovery)} .badge.st-offer{--st:var(--st-offer)} .badge.st-new{--st:var(--st-new)}
.badge.st-won,.badge.st-execution,.badge.st-tenant_changes{color:var(--success);border-color:var(--success-3);background:var(--success-2)}
.badge.st-lost{color:var(--danger);border-color:var(--danger-3);background:var(--danger-2)}
.badge.st-tender,.badge.st-negotiation{color:var(--warn);border-color:var(--warn-3);background:var(--warn-2)}

/* ═══════════════ צ'יפים, סרגלי סינון ═══════════════ */
.chip{border:1px solid var(--rule);border-radius:20px;padding:6px 13px;background:var(--surface);font-size:13.5px;transition:all .12s;white-space:nowrap}
.chip:hover{border-color:var(--accent-3);color:var(--accent)}
.chip.on{background:var(--accent);color:#fff;border-color:var(--accent)}
.chips{display:flex;flex-wrap:wrap;gap:7px}
.seg{display:inline-flex;border:1px solid var(--rule);border-radius:var(--r-sm);overflow:hidden;background:var(--surface)}
.seg button{padding:8px 14px;font-size:13.5px;border-inline-end:1px solid var(--rule);color:var(--ink-2)}
.seg button:last-child{border-inline-end:0}
.seg button.on{background:var(--accent);color:#fff}
.influence{display:inline-flex;gap:2px}
.influence i{width:9px;height:9px;border-radius:2px;background:var(--tier-x);display:inline-block}
.influence i.on{background:var(--accent)}

/* ═══════════════ כפתורים ═══════════════ */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:8px 14px;border-radius:var(--r-sm);border:1px solid var(--rule);background:var(--surface);font-size:14px;font-weight:500;transition:all .12s;white-space:nowrap;text-decoration:none;color:var(--ink)}
.btn:hover{border-color:var(--accent-3);color:var(--accent);background:var(--accent-2)}
.btn.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.btn.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:#fff}
.btn.danger{color:var(--danger);border-color:var(--danger-3)}
.btn.danger:hover{background:var(--danger);color:#fff;border-color:var(--danger)}
.btn.ghost{border-color:transparent;background:transparent;color:var(--ink-2)}
.btn.ghost:hover{background:var(--surface-3);color:var(--ink)}
.btn.sm{padding:5px 11px;font-size:13px}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn svg{width:16px;height:16px}
.icon-btn{display:grid;place-items:center;width:34px;height:34px;border-radius:var(--r-sm);border:1px solid var(--rule);background:var(--surface);color:var(--ink-2);transition:all .12s}
.icon-btn:hover{background:var(--accent-2);border-color:var(--accent-3);color:var(--accent)}
.icon-btn.plain{border-color:transparent;background:transparent}
.icon-btn.plain:hover{background:var(--surface-3)}
.icon-btn svg{width:17px;height:17px}

/* ═══════════════ תפריט פעולות (⋯) ═══════════════ */
.menu-wrap{position:relative;display:inline-flex}
.menu-pop{position:fixed;min-width:190px;background:var(--surface);border:1px solid var(--rule);border-radius:var(--r-sm);box-shadow:var(--shadow-lg);z-index:45;padding:5px;display:flex;flex-direction:column}
.menu-pop button,.menu-pop a{display:flex;align-items:center;gap:9px;padding:9px 11px;border-radius:6px;font-size:14px;text-align:start;text-decoration:none;color:var(--ink)}
.menu-pop button:hover,.menu-pop a:hover{background:var(--surface-3)}
.menu-pop button.danger{color:var(--danger)}
.menu-pop svg{width:16px;height:16px;opacity:.7}
.menu-sep{height:1px;background:var(--rule-soft);margin:4px 0}

/* ═══════════════ טפסים ═══════════════ */
.form{display:grid;gap:13px}
.form.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.form.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:640px){.form.cols-2,.form.cols-3{grid-template-columns:1fr}}
.field{display:flex;flex-direction:column;gap:5px;min-width:0}
.field.full{grid-column:1/-1}
.field label{font-size:12.5px;color:var(--ink-2);font-weight:500}
.field .help{font-size:11.5px;color:var(--muted)}
.input,.field input:not([type=checkbox]):not([type=radio]),.field select,.field textarea{
  width:100%;padding:9px 11px;border:1px solid var(--rule);border-radius:var(--r-sm);background:var(--surface);
  outline:0;transition:border-color .12s,box-shadow .12s;font-size:14.5px;
}
.field textarea{min-height:84px;resize:vertical;line-height:1.5}
.field input:focus,.field select:focus,.field textarea:focus,.input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-2)}
.field .check{display:flex;align-items:center;gap:8px;font-weight:400;font-size:14px}
.field .check input{width:16px;height:16px;accent-color:var(--accent)}
.field.error input,.field.error select{border-color:var(--danger)}
.err{color:var(--danger);font-size:13px}
.search{display:flex;align-items:center;gap:8px;padding:0 11px;border:1px solid var(--rule);border-radius:var(--r-sm);background:var(--surface);min-width:200px;flex:1;max-width:380px}
.search input{flex:1;border:0;background:none;outline:0;padding:9px 0;font-size:14.5px;min-width:0}
.search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-2)}
.search svg{width:16px;height:16px;color:var(--muted);flex-shrink:0}
.field .search input,.field .picker-wrap input{border:0;box-shadow:none;min-height:0}
.toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:13px}
.toolbar select{padding:8px 10px;border:1px solid var(--rule);border-radius:var(--r-sm);background:var(--surface);font-size:13.5px}

/* ═══════════════ תיאור-רשימה ═══════════════ */
.dl{display:grid;grid-template-columns:max-content 1fr;gap:8px 18px;font-size:14px}
.dl dt{color:var(--muted);font-size:12.5px;padding-top:2px}
.dl dd{min-width:0;overflow-wrap:anywhere}
.dl dd:empty::before,.dl dd.none::before{content:"—";color:var(--tier-x)}

/* ═══════════════ מודאל ═══════════════ */
.modal-bg{position:fixed;inset:0;background:rgba(15,23,42,.42);display:grid;place-items:center;z-index:100;padding:16px;backdrop-filter:blur(2px)}
.modal{background:var(--surface);border-radius:var(--r);width:min(660px,100%);max-height:92vh;display:flex;flex-direction:column;box-shadow:0 24px 60px -16px rgba(15,23,42,.35)}
.modal.wide{width:min(940px,100%)}
.modal-h{display:flex;align-items:center;justify-content:space-between;padding:15px 18px;border-bottom:1px solid var(--rule-soft)}
.modal-h h3{font-size:16px;font-weight:600}
.modal-b{padding:17px 18px;overflow-y:auto}
.modal-f{display:flex;justify-content:flex-end;gap:8px;padding:13px 18px;border-top:1px solid var(--rule-soft)}

/* ═══════════════ טוסטים ═══════════════ */
.toasts{position:fixed;bottom:20px;inset-inline-start:20px;display:flex;flex-direction:column;gap:8px;z-index:200}
.toast{background:var(--ink);color:#fff;padding:11px 15px;border-radius:var(--r-sm);font-size:14px;box-shadow:var(--shadow-lg);animation:rise .16s ease-out}
.toast.err{background:var(--danger)}
.toast.ok{background:var(--success)}
@keyframes rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ═══════════════ טאבים ═══════════════ */
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--rule);margin-bottom:16px;overflow-x:auto;overflow-y:hidden}
.tabs button,.tabs .tab{padding:9px 14px;font-size:14.5px;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap;text-decoration:none}
.tabs button:hover,.tabs .tab:hover{color:var(--ink)}
.tabs button.on,.tabs .tab.on{color:var(--accent);border-bottom-color:var(--accent);font-weight:600}
.tabs .cnt{font-size:11.5px;color:var(--muted);margin-inline-start:5px;background:var(--surface-3);border-radius:20px;padding:1px 7px}
.tabs button.on .cnt,.tabs .tab.on .cnt{background:var(--accent-2);color:var(--accent)}

/* ═══════════════ ציר זמן ═══════════════ */
.timeline{display:flex;flex-direction:column}
.tl-item{display:grid;grid-template-columns:28px 1fr;gap:10px;padding:11px 0;border-bottom:1px solid var(--rule-soft)}
.tl-item:last-child{border-bottom:0}
.tl-ico{width:26px;height:26px;border-radius:50%;background:var(--surface-3);display:grid;place-items:center;color:var(--ink-2)}
.tl-ico svg{width:14px;height:14px}
.tl-ico.email{background:var(--accent-2);color:var(--accent)}
.tl-ico.task{background:var(--warn-2);color:var(--warn)}
.tl-head{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;font-size:13.5px}
.tl-head b{font-weight:500}
.tl-head .when{color:var(--muted);font-size:12px;margin-inline-start:auto}
.tl-body{font-size:13.5px;color:var(--ink-2);margin-top:2px;white-space:pre-wrap;overflow-wrap:anywhere}

/* ═══════════════ בורר ישויות ═══════════════ */
.picker-wrap{position:relative}
.picker-wrap .search{max-width:none}
.picker-list{position:fixed;background:var(--surface);border:1px solid var(--rule);border-radius:var(--r-sm);box-shadow:var(--shadow-lg);z-index:40;max-height:280px;overflow-y:auto;padding:5px}
.picker-opt{display:block;width:100%;text-align:start;padding:8px 11px;border-radius:6px;line-height:1.3}
.picker-opt:hover,.picker-opt.cursor{background:var(--surface-3)}
.picker-opt.create{color:var(--accent);font-weight:500}
.picker-opt .opt-name{font-weight:500;font-size:14px}
.picker-opt .opt-sub{font-size:12px;color:var(--muted)}

/* ═══════════════ חיפוש גלובלי ═══════════════ */
.gsearch{position:relative;margin-bottom:10px}
.gsearch .search{max-width:none;min-width:0;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.14)}
.gsearch .search input{color:#fff}
.gsearch .search input::placeholder{color:rgba(255,255,255,.45)}
.gsearch .search svg{color:rgba(255,255,255,.5)}
.gsearch .picker-list{inset-inline:0;width:min(320px,80vw)}
.gs-group{font-size:11px;color:var(--muted);padding:6px 10px 3px;letter-spacing:.06em}

/* ═══════════════ התחברות ═══════════════ */
.login{min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--ground)}
.login-card{width:min(400px,100%);padding:32px 30px 26px}
.login-card img{height:40px;display:block;margin-bottom:20px}
.login-card h1{font-size:21px;font-weight:600;margin-bottom:4px}
.login-card p{color:var(--muted);font-size:13.5px;margin-bottom:20px}

/* ═══════════════ פוטר קרדיט ═══════════════ */
.foot{height:42px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:11.5px;color:var(--muted-2);letter-spacing:.03em}
.foot b{font-weight:500;color:var(--muted)}
.foot img{opacity:.55}

/* ═══════════════ מובייל ═══════════════ */
.bottom-nav{display:none}
@media(max-width:900px){
  body{padding-bottom:0}
  .bottom-nav{
    display:grid;grid-template-columns:repeat(5,1fr);position:fixed;bottom:0;inset-inline:0;height:58px;
    background:var(--surface);border-top:1px solid var(--rule);z-index:70;padding-bottom:env(safe-area-inset-bottom);
  }
  .bottom-nav a,.bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:10.5px;color:var(--muted);text-decoration:none;min-height:44px}
  .bottom-nav a svg,.bottom-nav button svg{width:21px;height:21px}
  .bottom-nav a.active{color:var(--accent);font-weight:600}
  .bottom-nav .fab{margin-top:-20px}
  .bottom-nav .fab span.circle{width:52px;height:52px;border-radius:50%;background:var(--hot);color:#fff;display:grid;place-items:center;box-shadow:0 8px 18px -6px rgba(221,107,60,.5)}
  .bottom-nav .fab span.circle svg{width:24px;height:24px}
  .foot{display:none}
  .modal-bg{align-items:end;padding:0}
  .modal,.modal.wide{width:100%;max-height:94vh;border-radius:var(--r) var(--r) 0 0;animation:sheet .2s ease-out}
  @keyframes sheet{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
  .modal-b{padding:14px 16px}
  .modal-f{padding:12px 16px calc(12px + env(safe-area-inset-bottom));position:sticky;bottom:0;background:var(--surface)}
  .modal-f .btn{flex:1;min-height:44px}
  .btn{min-height:44px}
  .icon-btn{width:44px;height:44px}
  .field input:not([type=checkbox]):not([type=radio]),.field select,.input{min-height:44px;font-size:16px}
  .field textarea{font-size:16px}
  .chip{min-height:38px;display:inline-flex;align-items:center}
  .page-head h1{font-size:21px}
  .kpi .k-val{font-size:24px}
  .dl{grid-template-columns:1fr}
  .dl dt{padding-top:6px}
  .toasts{inset-inline:14px;bottom:70px}
  .card-b{padding:14px} .card-h{padding:12px 14px}
}
/* טבלה → כרטיסים בנייד */
@media(max-width:640px){
  .tbl.cards{display:block}
  .tbl.cards thead{display:none}
  .tbl.cards tbody{display:flex;flex-direction:column;gap:9px;padding:9px}
  .tbl.cards tr{display:block;border:1px solid var(--rule);border-radius:var(--r-sm);background:var(--surface);padding:11px 12px}
  .tbl.cards td{display:flex;justify-content:space-between;gap:12px;padding:4px 0;border:0;text-align:start;font-size:13.5px}
  .tbl.cards td.num{text-align:end}
  .tbl.cards td::before{content:attr(data-label);color:var(--muted);font-size:12px;flex-shrink:0}
  .tbl.cards td.title{display:block;font-weight:600;font-size:15px;padding-bottom:7px;border-bottom:1px solid var(--rule-soft);margin-bottom:5px}
  .tbl.cards td.title::before{content:none}
  .tbl.cards td.title .cell-sub{font-weight:400}   /* התת-שורה לא יורשת את המשקל של הכותרת */
  .tbl.cards td.actions{justify-content:flex-end;padding-top:8px}
  .tbl.cards td.actions::before{content:none}
  .tbl.cards td:empty{display:none}
}

/* ═══════════════ מובייל — ליטוש סופי (סבב 3) ═══════════════
   יעדי מגע ≥44px לכל פקד, רצפת טקסט 13px, וקישורי תוכן עם שטח מגע אמיתי.
   הכלל האחרון משתמש ב-inline-block (ולא inline-flex) כדי שטקסט ארוך ימשיך לגלוש
   בתוך הקישור — inline-flex היה יוצר גלילה אופקית בכרטיסי טבלה צרים. */
@media(max-width:900px){
  /* ── פקדים ── */
  .search{min-height:44px}
  .search input{min-height:44px;padding:0}
  /* app.css מאפס min-height לקלט שבתוך .field — צריך סגוליות זהה כדי להחזיר 44px בנייד */
  .field .search input,.field .picker-wrap input{min-height:44px}
  .nav a{min-height:44px}
  .nav .nav-foot button{min-height:44px;display:flex;align-items:center}
  .chip{min-height:44px}
  /* .seg הוא overflow:hidden — בלי flex-shrink:0 הוא מתכווץ בשורת פעולות צרה והכפתור השני נחתך */
  .seg{flex-shrink:0;max-width:100%}
  .seg button{min-height:44px}
  .tabs button,.tabs .tab{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center}
  .menu-pop{max-width:calc(100vw - 24px)}
  .menu-pop button,.menu-pop a{min-height:44px}
  .picker-opt{min-height:44px;display:flex;flex-direction:column;justify-content:center}
  select,.toolbar select{min-height:44px}
  summary{min-height:44px;display:flex;align-items:center}
  .btn.sm{min-height:44px}
  /* כותרת ארוכה במודאל כיווצה את כפתור הסגירה מתחת ל-44px */
  .modal-h .icon-btn,.card-h .icon-btn{flex-shrink:0}
  /* תיבות סימון: הפקד עצמו 24px (מעל סף WCAG), והתווית העוטפת היא יעד המגע המלא */
  input[type=checkbox],input[type=radio]{width:24px;height:24px;flex-shrink:0}
  .field .check input[type=checkbox],.field .check input[type=radio]{width:24px;height:24px}
  label.check,.field .check,.check{min-height:44px;display:flex;align-items:center;gap:10px}

  /* ── קישורי תוכן ──
     :where() מאפס את הסגוליות של שרשרת ה-:not, כדי שכללי המסכים (קיצור עם ellipsis,
     min-width:0 בתאים צרים) ימשיכו לגבור — אחרת השם היה נחתך באמצע. */
  .main a:where(:not(.btn):not(.icon-btn):not(.chip):not(.tab):not(.kpi):not(.picker-opt)){
    display:inline-block;max-width:100%;min-width:44px;min-height:44px;padding-block:12px;
  }
  /* תאים שהבעלים מקצר בכוונה — אסור להם רוחב מינימלי, אחרת הטקסט נחתך */
  .main .tasks-tbl a,.main .proj-list td.title .cell-main a,.main .msg-links a{min-width:0}
  /* בתוך טקסט רץ הקישור נשאר חלק מהמשפט */
  .main .tl-body a,.main .msg-body a,.main .editor a,.main .prose a,.main .help a,.main .hint a{display:inline;min-width:0;min-height:0;padding-block:0}

  /* ── רצפת טקסט 13px ── */
  .small,.crumbs,.eyebrow,.card-h .hint,.kpi .k-lbl,.kpi .k-sub,.tbl th,.tbl .cell-sub,
  .tbl th .sort-ind,.badge,.field label,.field .help,.dl dt,.tabs .cnt,
  .tl-head .when,.picker-opt .opt-sub,.gs-group,.nav .brand span,.nav .nav-foot,
  .nav .nav-foot button,.nav .env-pill,.tbl.cards td::before,.bottom-nav a,.bottom-nav button{font-size:13px}
  .bottom-nav a,.bottom-nav button{gap:1px}
  .bottom-nav a svg,.bottom-nav button svg{width:20px;height:20px}
}

/* פופאפים צפים (ui.floatUnder) — רוחב מינימלי כשהמיקום fixed */
.picker-list{min-width:220px}
.menu-pop{min-width:190px}

/* ═══════════════ פרטי מלאכה (סבב 4) ═══════════════ */
/* אווטאר סוכן — ראשי תיבות בצבע יציב לפי השם (av-1..av-6) */
.avatar{width:26px;height:26px;border-radius:8px;display:inline-grid;place-items:center;font-size:11.5px;font-weight:600;color:#fff;flex-shrink:0;letter-spacing:.02em}
.avatar.av-1{background:#2A7E93} .avatar.av-2{background:#B5821A} .avatar.av-3{background:#12805E}
.avatar.av-4{background:#5C86A4} .avatar.av-5{background:#D2662F} .avatar.av-6{background:#6B5B95}
.avatar.sm{width:22px;height:22px;font-size:10.5px;border-radius:6px}
.with-av{display:inline-flex;align-items:center;gap:7px}

/* קו-מפתח בצבע השלב בקצה כרטיס/שורה */
.keyline{position:relative}
.keyline::before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:3px;border-radius:0 3px 3px 0;background:var(--st,var(--rule))}
[dir=rtl] .keyline::before{border-radius:3px 0 0 3px}
.st-future{--st:var(--st-future)} .st-contacted{--st:var(--st-contacted)} .st-qualifying{--st:var(--st-qualifying)}
.st-planning_spec{--st:var(--st-planning_spec)} .st-pre_selection{--st:var(--st-pre_selection)} .st-tender{--st:var(--st-tender)}
.st-negotiation{--st:var(--st-negotiation)} .st-won{--st:var(--st-won)} .st-execution{--st:var(--st-execution)}
.st-tenant_changes{--st:var(--st-tenant_changes)} .st-finished{--st:var(--st-finished)} .st-lost{--st:var(--st-lost)}
.st-lead{--st:var(--st-lead)} .st-discovery{--st:var(--st-discovery)} .st-offer{--st:var(--st-offer)} .st-new{--st:var(--st-new)}

/* מדד: מספר גדול עם קו תחתון קצר בצבע — במקום ארבעה ריבועים זהים */
.kpi{position:relative}
.kpi .k-val{font-size:30px;font-weight:600;letter-spacing:-.03em}
.kpi .k-lbl{font-size:12.5px;color:var(--muted);font-weight:500}
.kpi::after{content:"";position:absolute;bottom:0;inset-inline-start:16px;width:26px;height:3px;border-radius:3px;background:var(--accent-3)}
.kpi.accent::after{background:var(--accent)} .kpi.good::after{background:var(--success)}
.kpi.warn::after{background:var(--warn)} .kpi.bad::after{background:var(--danger)}

/* קישורים בגוף העמוד — פטרול, לא כחול ברירת-מחדל */
.main a:not(.btn):not(.chip):not(.tab):not(.kpi){color:var(--link)}
.btn.hot{background:var(--hot);border-color:var(--hot);color:#fff}
.btn.hot:hover{background:#C55B30;border-color:#C55B30;color:#fff}

/* ═══════════════════════════════════════════════════════════════
   סבב 4 — ביקורת עיצוב (הפער בין «נראה מיוצר» ל«נראה מעוצב»)
   ארבעה תיקונים רוחביים: כותרת ששולטת · טבלה בלי רצועה אפורה ·
   סקשן פתוח (כותרת + קו) במקום עוד כרטיס ממוסגר · רדיוס משתנה.
   ═══════════════════════════════════════════════════════════════ */
:root{ --r-lg:16px; --r-xs:6px; }

/* ── 1. טיפוגרפיה: h1 שולט, מטא נסוג ── */
.page-head{margin-bottom:20px;align-items:flex-start}
.page-head h1{font-size:26px;font-weight:600;letter-spacing:-.025em;line-height:1.2}
.page-head .sub{font-size:13px;color:var(--muted);margin-top:5px}
.page-head .actions{padding-top:2px}
@media(max-width:900px){.page-head h1{font-size:22px}.page-head{margin-bottom:14px}}

/* ── 2. טבלה: כותרת = קו, לא רצועה אפורה ──
   הרצועה יצרה טון שלישי (קנבס/כרטיס/כותרת) וגרמה לכל טבלה להיראות כמו גיליון. */
.tbl th{background:none;font-size:11.5px;letter-spacing:.04em;color:var(--muted-2);
  padding-top:11px;padding-bottom:7px;border-bottom:1px solid var(--rule)}
.tbl th.sortable:hover{color:var(--ink-2)}
.tbl tr.link:hover td{background:var(--surface-2)}

/* ── 3. סקשן פתוח: כותרת + קו מפריד עם סימן צבע, במקום כרטיס בתוך כרטיס ── */
.sect{display:block;min-width:0}
.sect-h{position:relative;display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:0 0 9px;border-bottom:1px solid var(--rule);margin-bottom:4px}
.sect-h::after{content:"";position:absolute;bottom:-1px;inset-inline-start:0;width:32px;height:2px;
  border-radius:2px;background:var(--accent)}
.sect-h h2{font-size:16px;font-weight:600;letter-spacing:-.01em;display:flex;align-items:center;gap:8px}
.sect-h .hint{font-size:12.5px;color:var(--muted)}
.sect-b{padding:4px 0 0}

/* ── 4. רדיוס משתנה: משטח דומיננטי 16 · כרטיס 12 · פקד 8 · צ'יפ מלא ── */
.card.hero-card{border-radius:var(--r-lg)}
.badge{border-radius:var(--r-xs)}

/* ── 5. כותרת כרטיס: קצת יותר נוכחות, פחות «תווית» ── */
.card-h h2{font-size:15px;letter-spacing:-.01em}

/* ── 6. תא ריק בתיאור-רשימה: מקף חיוור אחד, בלי משקל ── */
.dl dd .none-val{color:var(--tier-x)}

/* ═══ מובייל — רצפת 16px לפקדי קלט (סבב 5, בדיקת נייד) ═══
   iOS Safari מגדיל את כל העמוד (auto-zoom) כשמתמקדים בשדה שהטקסט בו קטן מ-16px,
   והזום הזה הוא שיוצר גלילה אופקית אמיתית במכשיר. לכן כל שדה טקסט/בורר הוא 16px בנייד.
   הסלקטור נסמך על .app-root כדי לגבור על .search input ועל בוררי המסכים בלי !important. */
@media(max-width:900px){
  .app-root input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  .app-root textarea,
  .app-root select{font-size:16px}
  /* כפתור אייקון בלבד בתוך .btn היה 40px רוחב — יעד המגע הוא ריבוע 44 בשני הצירים */
  .btn,.btn.sm{min-width:44px}
  /* ראשי-תיבות באווטאר — רצפת 13px כמו כל טקסט אחר */
  .avatar{font-size:13px;width:28px;height:28px}
  .avatar.sm{font-size:13px;width:26px;height:26px;border-radius:7px}
}

/* ═══ כרטיס טבלה בנייד: תפריט ⋯ בפינה, לא בשורה משלו (סבב 5) ═══
   שורת פעולות שכל תוכנה כפתור ⋯ אחד גזלה ~56px מכל כרטיס — יתום ויזואלי ועוד גלילה.
   רק כרטיס שבו תא הפעולות הוא ⋯ בלבד עובר לפינה; כרטיס עם פעולה ראשית (משימות: «בוצע»)
   או עם כפתור שמירה (רשימות ערכים) נשאר כפי שהוא. */
@media(max-width:640px){
  .tbl.cards tr:has(>td.actions>.menu-wrap:only-child){position:relative}
  .tbl.cards td.actions:has(>.menu-wrap:only-child){position:absolute;top:6px;inset-inline-end:6px;padding:0;width:auto}
  /* שומרים מקום לכפתור כדי שכותרת ארוכה לא תיגלוש מתחתיו */
  .tbl.cards tr:has(>td.actions>.menu-wrap:only-child) td.title{padding-inline-end:46px}
}

/* מסך רחב (לוח הצנרת): פורץ את מגבלת 1220px כדי שכל העמודות ייכנסו בלי חיתוך */
.main:has(.wide-screen){max-width:none}
