:root {
  --ink: #eef2f9;
  --ink2: rgba(238, 242, 249, 0.66);
  --ink3: rgba(238, 242, 249, 0.52); /* פאס-1: היה .4=3.47:1 (נכשל AA) → .52=4.9:1 (נמדד). טקסט-משני קריא לזקנים */
  --glass: rgba(255, 255, 255, 0.07);
  --glass2: rgba(255, 255, 255, 0.045);
  --stroke: rgba(255, 255, 255, 0.14);
  --stroke2: rgba(255, 255, 255, 0.08);
  --green: #34d399;
  --amber: #fbbf24;
  --blue: #60a5fa;
  --red: #f87171;
  --violet: #a78bfa;
  --pink: #f472b6;
  --teal: #2dd4bf;
  --radius: 22px;
  --radius-sm: 14px;

  /* ============ G-wave שלב-א׳ (2026-07-03) — שכבת-טוקנים ============
     שמות-הטוקנים של מוקאפ-העיצוב (ATLAS Attendance-1.dc, שורות 782-801)
     כ-alias בלבד לטוקנים הקיימים. ערכי-הכהה הנוכחיים נשארים כמו-שהם
     (אפס-רגרסיה); rename מלא + יישור-DARK לערכי-המוקאפ = שלב-ב׳.
     diagram.js / attendance.js צורכים var(--ink/--glass/--stroke) — לא לשנות שמות! */
  --bg: #0b1020; /* רקע-בסיס (עד היום hardcoded ב-body) */
  --fg: var(--ink);
  --f2: var(--ink2);
  --f3: var(--ink3);
  --pp: var(--glass);
  --pp2: var(--glass2);
  --bd: var(--stroke);
  --bd2: var(--stroke2); /* ⚠ סמנטיקה הפוכה מהמוקאפ (שם bd2=חזק, כאן stroke2=חלש) — יישור בשלב-ב׳ */
  --ct: var(--teal);
  --cb: var(--blue);
  --ca: var(--amber);
  --cv: var(--violet);
  --cp: var(--pink);
  --cr: var(--red);
  --cg: var(--green);
  --cc: #4dd8ec; /* ציאן — אין מקבילה קיימת; ערך-המוקאפ */
  --ac: #7c8cff; /* אקסנט-המוקאפ (אינדיגו) — חדש */
  --ac2: rgba(124, 140, 255, 0.16);
  --acInk: #12142b;
  --track: rgba(255, 255, 255, 0.07); /* מסילת-progress (ערך-הכהה הקיים של .track) */

  /* G5: זוגות טקסט-על-טינט + רקע-טינט (כהה = הערכים הקיימים בקובץ, העברה 1:1;
     בהיר מוגדר ב-[data-theme="light"]) */
  --on-green: #86e9c4;
  --tint-green: rgba(52, 211, 153, 0.16);
  --on-blue: #9cc4fb;
  --tint-blue: rgba(96, 165, 250, 0.16);
  --on-amber: #fcd577;
  --tint-amber: rgba(251, 191, 36, 0.16);
  --on-red: #fcaaaa;
  --tint-red: rgba(248, 113, 113, 0.16);
  --on-violet: #c7b6fb;
  --tint-violet: rgba(167, 139, 250, 0.16);
  --on-pink: #f7a8d0;
  --tint-pink: rgba(244, 114, 182, 0.16);
  --on-indigo: #cfe0ff;
  --tint-indigo: rgba(123, 140, 255, 0.2);
  /* H8-מועצה: כתום נבדל לגלישה (המפה הציעה; ענבר היה מתנגש בתגי החלפה/רזרבה) — כהה=הערכים הישנים 1:1 */
  --on-orange: #fdba74;
  --tint-orange: rgba(251, 146, 60, 0.16);
  /* H8 (חוב-עיצוב #8): משטח-affordance אחיד — כהה=לבן-שקוף (הערך הרווח .04-.08 → .05), בהיר=דיו-שקוף */
  --wash: rgba(255, 255, 255, 0.05);
  --wash-strong: rgba(255, 255, 255, 0.08); /* מועצה: גלולות-מידע (ריק/ספירה) נשארות בבהירות המקורית */

  /* ============ פאזה-0 · השלמת מערכת-הטוקנים (BUILD-עיצוב 17.7) ============
     Additive בלבד — אף כלל עדיין לא צורך את אלה → אפס-שינוי-נראה. פאזה-1 מנתבת אליהם.
     מקור: DESIGN-REVIEW-2026-07-17 + מיפוי-טוקנים. משלים מרווחים/טיפוגרפיה/radius/עומק/motion.
     --ac/--ac2/--acInk כבר מוגדרים למעלה (זהים) — לא כפולים כאן. */
  --acGlow: rgba(124, 140, 255, 0.45);

  /* מרווחים · סקאלת-4pt (+ --sp-4h=20, ה-tier החסר שבלע 18/20/22) */
  --sp-0: 2px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-4h: 20px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;

  /* טיפוגרפיה (Heebo נטען בפאזה-2; עד אז fallback ל-Plex — אין שבירה) */
  --f-head: "Heebo", "IBM Plex Sans Hebrew", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Hebrew", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", monospace;
  --t-label: 11px;
  --t-label-ls: 0.06em;
  --t-body-s: 13px;
  --t-body: 14px;
  --t-title-amb: 13px;
  --t-title: 16px;
  --t-title-hero: 18px;
  --t-num: 34px;
  --t-num-hero: 42px; /* טוויק-עידן #1: מספרי-KPI גדולים */

  /* radius (הבסיס מגדיר --radius:22 / --radius-sm:14 בלבד) */
  --r-1: 8px;
  --r-2: 12px;
  --r-3: 16px;
  --r-pill: 999px;

  /* עומק · dark (הבסיס חסר טוקני-shadow → additive) */
  --lvl3-bg: rgba(255, 255, 255, 0.1);
  --lvl3-hl: rgba(255, 255, 255, 0.18);
  --shadow-1: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.22);
  --shadow-3:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 3px 8px rgba(0, 0, 0, 0.5), 0 24px 48px -18px rgba(0, 0, 0, 0.85);
  --shadow-hover:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 14px rgba(0, 0, 0, 0.45), 0 18px 36px -10px var(--acGlow),
    0 34px 62px -22px rgba(0, 0, 0, 0.9);

  /* זכוכית-מט (טוויק-עידן #1) + אווירה */
  --glass-blur: 18px;
  --glass-sat: 1.1;
  --aura: 0.6;
  --vignette: rgba(0, 0, 0, 0.42);

  /* motion */
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
  --dur-4: 450ms;
  --dur-slow: 1200ms;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-spring: cubic-bezier(0.3, 0.7, 0.1, 1);
}

/* ============================================================
   פאס-1 · תיקוני-שימושיות (קריאוּת + סלחנות) — בסיס בראש-הקובץ.
   מבוסס-עדות: docs/research/2026-07-07-{A,B,C} + מדידת-WCAG בפועל (scratchpad/contrast.mjs).
   additive בלבד — לא נוגע בבלוקי-הקומפוננטות של חלונות A/F.
   ============================================================ */

/* P0 · יעדי-מגע ≥44px (WCAG 2.5.5 · זקנים 44–48). קידומת :root מעלה ספציפיות (0,+1) → גובר על
   חוק-הקומפוננטה (ספציפיות-שווה) ללא תלות-בסדר. .chip ממוקד ל-#console (לא לגלוש לצ'יפי-scheduling של חלון-A).
   הערה: .rolepill .miniseg button (0,2,1) שווה-ספציפיות ל-:root .miniseg button ונשאר 32 מכוח סדר-המקור (מאוחר-יותר). */
:root .seg button,
:root .miniseg button,
:root .period button,
#console .chip,
.sbx-ask-alts .chip,
:root .stchip.off,
:root .btn,
:root button.theme-toggle,
:root .datechip,
:root #editSearch,
:root select {
  min-height: 44px;
}
:root .period button {
  min-width: 44px;
} /* היו 34×34 */

/* P0 · פונט-נתונים ≥16px בקונסולה (שם/סטטוס/מדד). קידומת :root גוברת על ערך-הקומפוננטה
   בלי לגעת בבלוקיו (אפס-התנגשות עם A/F). */
:root .req .info .l1 {
  font-size: 16px;
} /* שם-רופא (נתון עיקרי) — היה 14 */
:root .req .info .l2 {
  font-size: 14px;
} /* מטא-משני — היה 12.5 */
:root .kpi .lab {
  font-size: 16px;
} /* תווית-מדד (בוס קורא) — היה 12.5 */
:root .tag {
  font-size: 16px;
  padding: 6px 12px;
} /* גלולת-סטטוס = נתון — היה 12 */
:root .stchip {
  font-size: 16px;
} /* צ'יפ-סטטוס בטבלה = נתון — היה 12.5 */
:root .empty {
  font-size: 15px;
} /* מצב-ריק — היה 13.5 */
:root #editSearch.people-search {
  font-size: 16px;
} /* שורת-החיפוש לעריכת-סטטוס */

/* P0 · צורה/אייקון לצד-צבע-הסטטוס (≈8% עיוורי-צבע; Carbon/Fuselab). glyph = קידוד-שני.
   ממוקד ל-#console/#doctor (מסכי-הבוס) — מונע התנגשות עם glyph-ידני (⚠) בצ'יפי-tables ותגי-תפקיד ב-admin. */
:is(#console, #doctor) .t-success::before,
:is(#console, #doctor) .t-danger::before,
:is(#console, #doctor) .t-warning::before,
:is(#console, #doctor) .t-info::before {
  font-weight: 700;
  margin-inline-end: 4px;
  font-size: 0.95em;
}
:is(#console, #doctor) .t-success::before {
  content: "✓";
}
:is(#console, #doctor) .t-danger::before {
  content: "✕";
}
:is(#console, #doctor) .t-warning::before {
  content: "▲";
}
:is(#console, #doctor) .t-info::before {
  content: "ℹ";
}
.stchip.green .stchip-lab::before {
  content: "✓ ";
}
.stchip.red .stchip-lab::before {
  content: "✕ ";
}

/* P1 · כפתור-בטל בטוסט (undo במקום confirm בפעולה הפיכה). #toast הוא pointer-events:none → מחזירים auto. */
#toast .t .t-undo {
  pointer-events: auto;
  cursor: pointer;
  margin-inline-start: 12px;
  padding: 6px 14px;
  min-height: 44px; /* יעד-מגע מלא — כפתור-בטל בלחץ-זמן לבכיר */
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
}
[data-theme="light"] #toast .t .t-undo {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}
#toast .t .t-undo:active {
  transform: scale(0.95);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  /* G4: Plex Sans Hebrew ראשון; ה-stack הקודם נשאר כ-fallback עד שהפונט נטען */
  font-family:
    "IBM Plex Sans Hebrew",
    -apple-system,
    "SF Pro Display",
    "Segoe UI",
    "Heebo",
    Arial,
    sans-serif;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 55% at 78% 12%, rgba(45, 212, 191, 0.2), transparent 60%),
    radial-gradient(55% 50% at 12% 18%, rgba(167, 139, 250, 0.22), transparent 60%),
    radial-gradient(70% 60% at 50% 110%, rgba(96, 165, 250, 0.18), transparent 60%),
    linear-gradient(160deg, #0d1224 0%, #0b0f1f 50%, #0a0d1a 100%);
}
.bg::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask: linear-gradient(#000, transparent 70%);
  mask: linear-gradient(#000, transparent 70%);
}
.wrap {
  /* H6 (עידן 3.7): "לא 1400, לא 1600, לא 1800 — רוחב מלא". ה-cap ירד לגמרי; ריפוד-צד 20px
     נשאר. ה-breakout של הדיאגרמה (width:100vw ב-diagram.js) נמחק יחד עם זה — מיותר בלי cap. */
  max-width: none;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 20px 60px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: linear-gradient(150deg, var(--teal), var(--blue));
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.35);
}
.logo svg {
  width: 20px;
  height: 20px;
  stroke: #06121f;
  stroke-width: 2.2;
  fill: none;
}
.demo-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.18); /* 0.18≠0.16 — נשאר קשיח בכהה (near-miss); בהיר נדרס */
  color: var(--on-amber);
}
.date {
  font-size: 13.5px;
  color: var(--ink2);
}
/* G3: כפתור מתג כהה/בהיר בכותרת */
.theme-toggle {
  appearance: none;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--glass);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: 0.18s;
}
.theme-toggle:active {
  transform: scale(0.94);
}

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.seg {
  display: inline-flex;
  padding: 5px;
  gap: 4px;
  border-radius: 16px;
}
.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.22s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
}
.seg button.active {
  color: #06121f;
  background: linear-gradient(150deg, #eef2f9, #cdd6e6);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.seg button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.seg .dot {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--amber);
  color: #3a2a00;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.seg button.active .dot {
  background: #3a2a00;
  color: var(--amber);
}
.seg .soon {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink2);
}

/* דה-קלטרינג 21.8 (הכרעת-עידן 6א): אריח "איך זה עובד" (.hint) הוסר — כללי-ה-CSS שלו נמחקו. */

section[hidden] {
  display: none;
}

/* ---- control bar ---- */
.controlbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.ctl-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctl-lab {
  font-size: 12px;
  color: var(--ink3);
  font-weight: 600;
}
.miniseg {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke2);
}
.miniseg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.18s;
  min-height: 36px;
}
.miniseg button.on {
  color: #06121f;
  background: linear-gradient(150deg, #eef2f9, #cdd6e6);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}
.miniseg.metric button.on {
  background: linear-gradient(150deg, var(--green), var(--teal));
  color: #06241b;
}
.miniseg.metric button.on.abs {
  background: linear-gradient(150deg, var(--violet), var(--blue));
  color: #0b0820;
}
.period {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke2);
}
.period .lab {
  font-size: 13.5px;
  font-weight: 600;
  padding: 0 12px;
  min-width: 118px;
  text-align: center;
  white-space: nowrap;
}
.period button {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 17px;
  display: grid;
  place-items: center;
  transition: 0.16s;
}
.period button:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.12);
}
.rolepill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
  font-size: 12px;
  color: var(--ink2);
}
.rolepill .miniseg button {
  font-size: 12px;
  padding: 7px 11px;
  min-height: 32px;
}

/* ---- console grid ---- */
.console-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 14px;
  align-items: start;
}
.col {
  display: grid;
  gap: 14px;
  align-content: start;
}

.grid {
  display: grid;
  gap: 14px;
}
.kpis {
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
}
.kpi {
  padding: 16px 17px;
}
.kpi.click {
  cursor: pointer;
  transition: 0.2s;
}
.kpi.click:active {
  transform: scale(0.98);
}
.kpi .lab {
  font-size: 12.5px;
  color: var(--ink2);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.kpi .num {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.5px;
}
/* G4: מספרי-KPI גדולים → Plex Mono (מיפוי-עומק לכל המספרים = שלב-ב׳) */
.kpi .num,
.mkpi .num,
.cb-num {
  font-family: "IBM Plex Mono", "IBM Plex Sans Hebrew", monospace;
}
.two {
  grid-template-columns: 1fr 1fr;
}
.panel {
  padding: 20px;
}
.panel h3 {
  margin: 0 0 16px;
  font-size: 15.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.panel h3 .sub {
  font-size: 12.5px;
  color: var(--ink3);
  font-weight: 500;
}

.bar {
  margin-bottom: 13px;
}
.bar:last-child {
  margin-bottom: 0;
}
.bar.click {
  cursor: pointer;
  padding: 4px;
  margin: -4px -4px 9px;
  border-radius: 10px;
  transition: 0.16s;
}
.bar.click:hover {
  background: rgba(255, 255, 255, 0.04);
}
.bar .top {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  margin-bottom: 6px;
  gap: 8px;
}
.bar .top .v {
  color: var(--ink2);
  white-space: nowrap;
}
.track {
  height: 9px;
  border-radius: 7px;
  background: var(--track);
  overflow: hidden;
  display: flex;
  justify-content: flex-start;
}
.fill {
  height: 100%;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width 0.7s cubic-bezier(0.4, 1.3, 0.5, 1);
}
.fill.g {
  background: linear-gradient(90deg, var(--teal), var(--green));
}
.fill.v {
  background: linear-gradient(90deg, var(--violet), var(--blue));
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.chip {
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 11px;
  cursor: pointer;
  color: var(--ink2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke2);
  transition: 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chip:active {
  color: var(--ink);
}
.chip.on {
  color: #06121f;
  background: var(--ink);
  border-color: transparent;
  font-weight: 600;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink2);
  margin-bottom: 14px;
}
.crumb .back {
  cursor: pointer;
  color: var(--teal);
  font-weight: 600;
}
.crumb .sep {
  color: var(--ink3);
}

.fc {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 110px;
  padding-top: 6px;
}
.fc .col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.fc .stk {
  width: 100%;
  max-width: 34px;
  border-radius: 7px 7px 4px 4px;
  background: linear-gradient(180deg, var(--violet), rgba(96, 165, 250, 0.35));
  transition: height 0.7s;
}
.fc .stk.g {
  background: linear-gradient(180deg, var(--green), rgba(45, 212, 191, 0.35));
}
.fc .d {
  font-size: 11px;
  color: var(--ink3);
  text-align: center;
}
.fc .n {
  font-size: 11.5px;
  color: var(--ink2);
}

.arow {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--stroke2);
  flex-wrap: wrap;
}
.arow:last-child {
  border-bottom: 0;
}
.nm {
  font-weight: 600;
  min-width: 86px;
}
.meta {
  color: var(--ink2);
  font-size: 12.5px;
  flex: 1;
  min-width: 90px;
}
.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 10px;
  white-space: nowrap;
}
/* G5: זוגות on/tint — ערכי-הכהה זהים 1:1 לישן (הטוקנים ב-:root); בהיר נדרס בבלוק-הבהיר */
.t-info {
  background: var(--tint-blue);
  color: var(--on-blue);
}
.t-danger {
  background: var(--tint-red);
  color: var(--on-red);
}
.t-warning {
  background: var(--tint-amber);
  color: var(--on-amber);
}
.t-success {
  background: var(--tint-green);
  color: var(--on-green);
}
.t-violet {
  background: var(--tint-violet);
  color: var(--on-violet);
}
.t-pink {
  background: var(--tint-pink);
  color: var(--on-pink);
}

.req {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--stroke2);
  flex-wrap: wrap;
}
.req:last-child {
  border-bottom: 0;
}
.av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  background: linear-gradient(150deg, rgba(167, 139, 250, 0.5), rgba(96, 165, 250, 0.4));
  color: #fff;
  flex: none;
}
.req .info {
  flex: 1;
  min-width: 120px;
}
.req .info .l1 {
  font-size: 14px;
  font-weight: 600;
}
.req .info .l2 {
  font-size: 12.5px;
  color: var(--ink2);
  margin-top: 2px;
}
.datechip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 9px;
  background: var(--tint-blue);
  color: var(--on-blue);
  cursor: pointer;
  border: 1px solid rgba(96, 165, 250, 0.25);
  transition: 0.16s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.datechip:active {
  transform: scale(0.95);
}
.datechip svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}
.act {
  display: flex;
  gap: 8px;
}
.btn {
  appearance: none;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 15px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.18s;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
}
.btn:active {
  transform: scale(0.97);
}
.btn.ok {
  background: linear-gradient(150deg, var(--green), var(--teal));
  color: #06241b;
  border-color: transparent;
}
.btn.no {
  color: var(--on-red);
}
.btn.primary {
  background: linear-gradient(150deg, var(--teal), var(--blue));
  color: #06121f;
  border-color: transparent;
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 15px;
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
}
/* כפתור העלאת-שיבוץ-ידני — גוון ויולט עדין שמבדיל אותו מכפתורי-הייצוא הסמוכים */
#btnSchedImport {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(167, 139, 250, 0.14);
  color: #d9d0ff;
}
.empty {
  text-align: center;
  color: var(--ink3);
  font-size: 13.5px;
  padding: 26px 0;
}

/* ---- teaser card ---- */
.teaser {
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.teaser .soonbadge {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9px;
  background: rgba(251, 191, 36, 0.18); /* near-miss — קשיח בכהה; בהיר נדרס */
  color: var(--on-amber);
}
.teaser h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
  font-weight: 600;
}
.teaser p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.55;
  max-width: 92%;
}
.teaser-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ---- modal ---- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6, 9, 18, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: 0.22s;
}
.overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  width: 100%;
  max-width: 540px;
  max-height: calc(90vh / var(--bigzoom, 1)); /* מסך-גדול: ה-zoom מכפיל vh — מחלקים חזרה (restructure.css §12) */
  overflow-y: auto;
  padding: 22px;
  transform: translateY(16px) scale(0.98);
  transition: 0.22s;
}
.overlay.show .modal {
  transform: none;
}
.modal .mhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.modal .mtitle {
  font-size: 18px;
  font-weight: 700;
}
.modal .msub {
  font-size: 13px;
  color: var(--ink2);
  margin-top: 3px;
}
.modal .mx {
  cursor: pointer;
  color: var(--ink3);
  font-size: 24px;
  line-height: 1;
  padding: 0 4px;
  flex: none;
}
.cover-banner {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  line-height: 1.4;
}
.cover-banner svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
  fill: none;
  flex: none;
}
.cover-banner.green {
  background: rgba(52, 211, 153, 0.14); /* 0.14≠0.16 — קשיח בכהה (אזהרת-מועצה); בהיר נדרס */
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--on-green);
}
.cover-banner.green svg {
  stroke: var(--green);
}
.cover-banner.orange {
  background: rgba(251, 191, 36, 0.14); /* near-miss — קשיח בכהה; בהיר נדרס */
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--on-amber);
}
.cover-banner.orange svg {
  stroke: var(--amber);
}
.cover-banner.red {
  background: var(--tint-red);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--on-red);
}
.cover-banner.red svg {
  stroke: var(--red);
}
.mkpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.mkpi {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--glass2);
  border: 1px solid var(--stroke2);
}
.mkpi .lab {
  font-size: 12px;
  color: var(--ink2);
  margin-bottom: 6px;
}
.mkpi .num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.msec-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  margin: 0 0 10px;
}
.mlist {
  max-height: 168px;
  overflow-y: auto;
  margin-bottom: 18px;
}
.mfoot {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.mfoot .btn {
  flex: 1;
  justify-content: center;
}

#toast {
  position: fixed;
  inset-block-end: 26px;
  inset-inline: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 70;
  padding: 0 16px;
}
#toast .t {
  background: rgba(20, 26, 44, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--stroke);
  color: var(--ink);
  padding: 13px 22px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(14px);
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: center;
}
#toast .t.show {
  opacity: 1;
  transform: none;
}
#toast .t svg {
  width: 17px;
  height: 17px;
  stroke: var(--green);
  stroke-width: 2.6;
  fill: none;
  flex: none;
}
.pulse {
  animation: pulse 0.8s ease;
}
@keyframes pulse {
  0% {
    color: var(--amber);
  }
  50% {
    color: #fff;
    text-shadow: 0 0 22px var(--amber);
  }
  100% {
  }
}

/* ---- doctor mobile ---- */
.phone {
  max-width: 390px;
  margin: 0 auto;
  border-radius: 38px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--stroke);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}
.screen {
  border-radius: 26px;
  background: rgba(10, 14, 28, 0.55);
  padding: 20px 17px;
  border: 1px solid var(--stroke2);
}
.hello {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 3px;
}
.sub2 {
  font-size: 13px;
  color: var(--ink2);
  margin-bottom: 16px;
}
.status-card {
  padding: 15px 16px;
  border-radius: 16px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
}
.status-card .ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(52, 211, 153, 0.2);
  flex: none;
}
.status-card .ring svg {
  width: 18px;
  height: 18px;
  stroke: var(--green);
  stroke-width: 2.6;
  fill: none;
}
label.fl {
  display: block;
  font-size: 13px;
  color: var(--ink2);
  margin: 13px 0 6px;
}
select,
input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 12px 13px;
  outline: none;
}
select option {
  color: #000;
}
/* ---------- שכבת-תצוגה dd/mm/yyyy ל-<input type="date"> (js/config.js · Att.dateInputDDMM) ----------
   הווידג'ט הנייטיב מציג את התאריך לפי שפת-הדפדפן (mm/dd באנגלית). מסתירים את טקסטו ומציירים dd/mm/yyyy.
   בפוקוס: מחזירים את הווידג'ט הנייטיב לעריכה. הערך (input.value) נשאר ISO — תצוגה בלבד. */
.att-ddmm-wrap {
  position: relative;
  display: block;
}
input.att-ddmm {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--glass2);
  border: 1px solid var(--stroke2);
  font: inherit;
  font-size: 13px;
  color: transparent !important; /* מסתיר את ספרות-הווידג'ט; האייקון נשאר */
}
.att-ddmm-wrap.att-ddmm-focus input.att-ddmm {
  color: var(--ink) !important; /* עריכה → מראים את הווידג'ט הנייטיב */
}
.att-ddmm-ov {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  pointer-events: none; /* קליקים עוברים ל-input (בורר נייטיב) */
  direction: ltr; /* dd/mm/yyyy נקרא שמאל-לימין, רחוק מהאייקון הימני */
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.att-ddmm-wrap.att-ddmm-focus .att-ddmm-ov {
  display: none;
}
.att-ddmm-ph {
  color: var(--ink3);
}
/* מגע (19.8): במובייל הפוקוס נשאר על השדה גם אחרי בחירה בגלגל — חשיפת-הפוקוס הציגה
   MM/DD/YYYY למכשיר-באנגלית. במגע העריכה היא דרך הבורר הנייטיבי (לא הקלדה) → השכבה נשארת תמיד. */
@media (pointer: coarse) {
  .att-ddmm-wrap.att-ddmm-focus input.att-ddmm {
    color: transparent !important;
  }
  .att-ddmm-wrap.att-ddmm-focus .att-ddmm-ov {
    display: flex;
  }
}
input.att-ddmm::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.55;
  filter: invert(1); /* ברירת-מחדל=כהה → אייקון בהיר על זכוכית כהה */
}
[data-theme="light"] input.att-ddmm::-webkit-calendar-picker-indicator {
  filter: none; /* מצב בהיר → אייקון כהה */
}
.dates {
  display: flex;
  gap: 9px;
}
.dates > div {
  flex: 1;
}
.mine {
  margin-top: 18px;
}
.mine .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid var(--stroke2);
  font-size: 13px;
}
.mine .row:last-child {
  border-bottom: 0;
}

@media (max-width: 980px) {
  .console-grid {
    grid-template-columns: 1fr;
  }
  .two {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .wrap {
    padding: max(14px, env(safe-area-inset-top)) 13px 50px;
  }
  header {
    gap: 11px;
  }
  .brand {
    font-size: 15.5px;
    width: 100%;
  }
  /* גל-1 (11.8, פידבק-פיילוט ברק/נדב): flex-item לא מתכווץ מתחת ל-min-content
     (min-width:auto), ולכן 4-5 לשוניות גלשו מעבר לרוחב-המסך → כל הדף הפך
     נגלל-לרוחב והנראה "תקוע"/חתוך. גלישה-לשורה-שנייה מחזיקה את כל הלשוניות
     בתוך המסך בלי גלילה-אופקית ובלי להסתיר אף לשונית. */
  .seg {
    width: 100%;
    flex-wrap: wrap;
  }
  .seg button {
    flex: 1 1 auto;
    min-width: 0;
    padding: 11px 6px;
    font-size: 13px;
  }
  /* אותו שורש בסרגלי-הכלים: קבוצת-כפתורים ב-nowrap גלשה אל מחוץ למסך
     (ב-RTL הגלישה בכיוון-ההתחלה אינה נגללת ⇒ כפתורים בלתי-נגישים). */
  .ctl-group {
    flex-wrap: wrap;
  }
  .date {
    display: none;
  }
  .controlbar {
    gap: 10px;
  }
  .ctl-group {
    width: 100%;
    justify-content: space-between;
  }
  .rolepill {
    margin-inline-start: 0;
    width: 100%;
    justify-content: space-between;
  }
  .period .lab {
    min-width: 90px;
    font-size: 13px;
  }
  .kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .kpi {
    padding: 15px 16px;
  }
  .kpi .num {
    font-size: 27px;
  }
  .kpi .lab {
    font-size: 12px;
    margin-bottom: 7px;
  }
  .panel {
    padding: 17px 16px;
  }
  .phone {
    max-width: 100%;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }
  .screen {
    border-radius: 20px;
    padding: 18px 15px;
  }
  .act .btn {
    padding: 10px 13px;
  }
  .mkpis {
    grid-template-columns: 1fr 1fr;
  }
  /* גל-3 (11.8, דיווח דן ארד): שורת-תורנות בתצוגה-היומית היא flex ב-nowrap שכל
     ילדיה בעלי רצפה קשיחה — קוד 96 + שם 120 + ⚠ 16 + בורר 110 + "🔎 מנוע" 44 +
     4×gap 10 ≈ 426px, מול 290-336px פנויים ב-390/412px. flex-item לא מתכווץ מתחת
     ל-min-width ⇒ המסמך כולו נמתח ל-475px: הכותרת ATLAS נחתכת, וב-Chrome/אנדרואיד
     ה-shrink-to-fit חושף את הרצועה 412-475 שבה חונה מגירת-ההערות (#fb-drawer,
     position:fixed) — הפאנל-הלבן עם ה-✕ שדן צילם. אותו פתרון של גל-1 (.seg/.ctl-group):
     גלישה-לשורה-שנייה במקום nowrap. הבורר יורד לשורה משלו ברוחב-מלא (order:1) —
     גם מונע גלישה וגם הופך אותו לבר-הקשה במקום 110px דחוסים. */
  .sched-slot {
    flex-wrap: wrap;
  }
  .sched-code,
  .sched-name {
    min-inline-size: 0;
  }
  .sched-slot .cell-sel {
    order: 1;
    flex: 1 1 100%;
    min-width: 0;
  }
}
@media (max-width: 380px) {
  .kpis {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
         v3 — רכיבים חדשים (טבלאות + פרופיל + כרטיסים).
         מועתק-בסגנון מ-v2 (אותם tokens) · נוסף בסבב v3 בלבד.
         ============================================================ */
.card {
  padding: 16px 16px 18px;
  border-radius: var(--radius);
}
.card.glass {
  background: var(--glass);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
}
.card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.card h3 .sub {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink2);
  margin-inline-start: 6px;
}

/* ----- פס-סיכום-כיסוי (לשונית-טבלאות) ----- */
.cover-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid var(--stroke);
  background: var(--glass);
}
.cover-bar.green {
  border-color: rgba(52, 211, 153, 0.4);
}
.cover-bar.orange {
  border-color: rgba(251, 191, 36, 0.4);
}
.cover-bar.red {
  border-color: rgba(248, 113, 113, 0.45);
}
.cb-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cb-num {
  font-size: 22px;
  font-weight: 700;
}
.cb-lab {
  font-size: 12px;
  color: var(--ink2);
}
.cb-risk {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cb-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ----- טבלה ----- */
.tbl-scroll {
  margin-top: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}
table.tbl th,
table.tbl td {
  padding: 9px 11px;
  text-align: right;
  border-bottom: 1px solid var(--stroke2);
}
table.tbl th {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
  position: sticky;
  top: 0;
  background: rgba(13, 18, 36, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
table.tbl th.th-sort {
  cursor: pointer;
  user-select: none;
}
table.tbl th.th-sort:hover {
  color: var(--ink);
}
table.tbl tbody tr:hover {
  background: var(--glass2);
}
.c-name .lnk {
  cursor: pointer;
  font-weight: 600;
  border-bottom: 1px dashed var(--stroke);
}
.c-name .lnk:hover {
  color: var(--blue);
  border-color: var(--blue);
}
.c-dim {
  color: var(--ink2);
}
.c-disabled {
  opacity: 0.4;
}
.c-warn {
  color: var(--red);
  font-weight: 600;
  font-size: 12px;
}
.row-warn {
  background: rgba(248, 113, 113, 0.07);
}
.cell-sel {
  width: auto;
  min-width: 110px;
  padding: 6px 9px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: var(--glass2);
  border: 1px solid var(--stroke2);
  outline: none;
  direction: rtl;
}
.cell-sel:focus {
  border-color: var(--blue);
}
.status-sel {
  min-width: 140px;
}
/* חיפוש-אנשים בקונסולה (משימה 4/7) — input בולט מעל רשימת-העריכה. */
.people-search {
  margin: 4px 0 12px;
}
/* אריח-עריכה לחיץ → ניווט לטבלאות. הבורר עוצר-התפשטות אז הקליק על-השאר. */
.edit-tile {
  cursor: pointer;
}
/* הדגשת-שורת-הרופא אחרי ניווט מהקונסולה (משימה 7). */
@keyframes rowFlash {
  0% {
    background: rgba(96, 165, 250, 0.32);
  }
  100% {
    background: transparent;
  }
}
.row-flash {
  animation: rowFlash 1.6s ease-out;
}
.chip-demo {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 6px;
  margin-inline-start: 4px;
  color: var(--amber);
  background: rgba(251, 191, 36, 0.14);
}

/* ============ SCHEDULING MODULE ============ */
.sched-banner {
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px dashed var(--amber);
  color: var(--amber);
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
}
.sched-scroll {
  max-height: 62vh;
  overflow: auto;
}
table.sched-matrix th,
table.sched-matrix td {
  white-space: nowrap;
  text-align: center;
  font-size: 12.5px;
  padding: 4px 8px;
}
/* two-axis sticky layering: header above column, corner above both */
table.sched-matrix thead th {
  z-index: 3;
}
.sched-daycol {
  position: sticky;
  inset-inline-start: 0;
  background: rgba(20, 28, 48, 0.95);
  font-weight: 600;
  text-align: start !important;
  z-index: 2;
}
table.sched-matrix thead th.sched-daycol {
  z-index: 4;
}
.sched-cell {
  cursor: pointer;
  border-radius: 8px;
}
.sched-cell:hover {
  outline: 1px solid var(--blue);
}
.sched-open {
  color: var(--ink2);
  font-style: italic;
}
.sched-solver {
  color: var(--green);
}
.sched-warn {
  color: var(--red) !important;
}
.sched-none {
  color: rgba(255, 255, 255, 0.18);
}
.meta.sched-chip-note {
  margin: 6px 0 10px;
}
.sched-day {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.sched-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}
.sched-code {
  min-inline-size: 96px;
  font-weight: 600;
}
.sched-name {
  min-inline-size: 120px;
}
.sched-name.is-solver {
  color: var(--green);
}
.sched-name.is-manual {
  color: var(--ink);
}
.sched-name.is-open {
  color: var(--ink2);
  font-style: italic;
}
.sched-name.is-warn {
  color: var(--red);
}
/* "השיבוץ שלי" בלוח-התורנויות — אותה שפת-"אני" הסגולה של .doc-asgn-person.me.
   רקע+bold מעל צבע-המצב הקיים (ירוק=מנוע / אדום=חסר נשמרים). מסומן רק כשהמשובץ = המשתמש-המחובר. */
.sched-cell.sched-mine {
  font-weight: 700;
  background: rgba(167, 139, 250, 0.16);
  outline: 1px solid rgba(167, 139, 250, 0.5);
}
.sched-name.is-mine {
  font-weight: 700;
  background: rgba(167, 139, 250, 0.16);
  border-radius: 6px;
  padding: 1px 7px;
}
[data-theme="light"] .sched-cell.sched-mine,
[data-theme="light"] .sched-name.is-mine {
  background: rgba(123, 73, 218, 0.12);
  outline-color: rgba(123, 73, 218, 0.4);
}
/* T32: 🔁 החלפה/מסירה — אייקון קומפקטי (תצוגת-יום ותא-חודש). ללא-מסגרת כדי לא לנפח את התא הצפוף. */
.sched-swap {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0 2px;
  margin-inline-start: 4px;
  font-size: 12.5px;
  line-height: 1;
  vertical-align: middle;
}
.sched-why {
  margin-inline-start: auto;
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--ink);
  border-radius: 10px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12.5px;
}
.sched-why:hover {
  border-color: var(--blue);
}
/* funnel — reuses .overlay/.overlay.show + .modal + .mx (no display override) */
.funnel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.funnel-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-block-size: calc(72vh / var(--bigzoom, 1)); /* מסך-גדול: כמו .modal — zoom מכפיל vh */
  overflow: auto;
}
.funnel-stage {
  inline-size: min(420px, 86vw);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 8px 14px;
  text-align: center;
}
.funnel-stage.fn-final {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid var(--green);
}
.funnel-arrow {
  color: var(--ink2);
  font-size: 12px;
}
.fn-num {
  margin-inline-end: 6px;
}
.fn-count {
  font-size: 20px;
  font-weight: 700;
  margin-inline-end: 8px;
}
.fn-lab {
  font-size: 13px;
}
.fn-drop {
  font-size: 11.5px;
  color: var(--ink2);
  margin-top: 3px;
}
.fn-drop i {
  color: var(--amber);
  font-style: normal;
}
.fn-drop.fn-none {
  opacity: 0.5;
}
.funnel-result {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
}
.funnel-result .fn-check {
  color: var(--green);
  font-size: 20px;
}
.funnel-result.fn-empty {
  color: var(--red);
}
.funnel-result .btn {
  display: block;
  margin: 10px auto 0;
}
/* חלון ב׳ (מודל-זימן) — רשימת-המועמדים במודאל-המשפך + סימוני-יום בלוח החודשי */
.fn-cands {
  margin-top: 12px;
  border-top: 1px solid var(--stroke2);
  padding-top: 8px;
  text-align: right;
}
.fn-cands-head {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}
.fn-cand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--stroke2);
  font-size: 13px;
}
.fn-cand-pol {
  width: 18px;
  text-align: center;
}
.fn-cand-name {
  flex: 1;
  min-width: 90px;
}
.fn-cand-load {
  color: var(--ink2);
  font-size: 11.5px;
  white-space: nowrap;
}
.fn-cand .btn {
  padding: 2px 10px;
  font-size: 12px;
}
.fn-cand.fn-cand-out {
  opacity: 0.55;
}
.fn-cand-why {
  color: var(--ink2);
  font-size: 12px;
  flex: 1;
}
.sched-daysum {
  display: block;
  font-size: 10.5px;
  color: var(--ink2);
  white-space: nowrap;
  line-height: 1.3;
}
.sched-daysum .sched-missing {
  color: var(--red);
}
/* needs / rules placeholders */
.rule-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.rule-ph {
  border: 1px dashed rgba(251, 191, 36, 0.6);
  color: var(--amber);
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 12.5px;
}
.needs-list {
  margin: 6px 18px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
}
.sched-demo-note {
  color: var(--amber);
  font-size: 11.5px;
  margin: 4px 0 8px;
  opacity: 0.9;
}

/* ============================================================
   v3 ליטוש (2026-06-25) — הערות-בוס: לוח-חודשי · תחנות-חוץ · ייצוא
   ============================================================ */

/* ----- סרגל-ייצוא (הערת-בוס #4) ----- */
.export-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
/* סרגל-ייצוא-הדיאגרמה — מיושר-לסוף (כמו שאר פקדי-הדיאגרמה) */
.diagram-export-bar {
  justify-content: flex-end;
}
/* עידן 10.8 (declutter): הסרגל מכווץ ל-details — כפתור "⬇ ייצוא" אחד, פתיחה חושפת את הכפתורים */
.diagram-export-wrap {
  margin-bottom: 16px;
  text-align: left; /* RTL: כמו flex-end של הסרגל המקורי */
}
.diagram-export-wrap > summary {
  list-style: none;
  display: inline-flex;
  cursor: pointer;
}
.diagram-export-wrap > summary::-webkit-details-marker {
  display: none;
}
.diagram-export-wrap[open] > summary {
  margin-bottom: 8px;
}
.diagram-export-wrap .export-bar {
  margin-bottom: 0;
}

/* ----- לוח-חודשי (הערת-בוס #1) ----- */
.cal-mini {
  cursor: pointer;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.cal-dow {
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink3);
  padding-bottom: 2px;
}
.cal-cell {
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke2);
}
.cal-blank {
  background: transparent;
  border: 0;
}
.cal-d {
  font-size: 10px;
  color: var(--ink3);
}
.cal-n {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.cal-green {
  background: var(--tint-green);
  border-color: rgba(52, 211, 153, 0.3);
}
.cal-green .cal-n {
  color: var(--on-green);
}
.cal-orange {
  background: rgba(251, 191, 36, 0.15); /* 0.15≠0.16 — קשיח בכהה (אזהרת-מועצה); בהיר נדרס */
  border-color: rgba(251, 191, 36, 0.3);
}
.cal-orange .cal-n {
  color: var(--on-amber);
}
.cal-red {
  background: var(--tint-red);
  border-color: rgba(248, 113, 113, 0.35);
}
.cal-red .cal-n {
  color: var(--on-red);
}
.cal-today {
  outline: 2px solid var(--blue);
  outline-offset: 0;
}
.modal.cal-modal {
  max-width: 680px;
}
.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cal-big .cal-grid {
  gap: 7px;
}
.cal-big .cal-cell {
  cursor: pointer;
  transition: 0.14s;
}
.cal-big .cal-cell:hover {
  outline: 1px solid var(--blue);
  transform: scale(1.05);
}
.cal-big .cal-n {
  font-size: 17px;
}
.cal-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink2);
}
.cal-legend i.cal-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-inline-end: 4px;
  vertical-align: middle;
}
.cal-dot.cal-green {
  background: var(--green);
}
.cal-dot.cal-orange {
  background: var(--amber);
}
.cal-dot.cal-red {
  background: var(--red);
}

/* ----- תחנות-חוץ (הערת-בוס #2+#3) ----- */
.stations-bar {
  gap: 16px;
}
.st-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}
.stchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: 11px;
  border: 1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink2);
  transition: 0.18s;
}
.stchip.off {
  cursor: pointer;
}
.stchip.off:hover {
  color: var(--ink);
  border-color: var(--stroke);
}
.stchip.red {
  background: rgba(248, 113, 113, 0.14); /* near-miss — קשיח בכהה; בהיר נדרס */
  border-color: rgba(248, 113, 113, 0.45);
  color: var(--on-red);
}
.stchip.green {
  background: rgba(52, 211, 153, 0.14); /* near-miss — קשיח בכהה; בהיר נדרס */
  border-color: rgba(52, 211, 153, 0.4);
  color: var(--on-green);
}
.stchip-lab {
  font-weight: 600;
}
.stchip-off {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.7;
}
.stchip-off:hover {
  opacity: 1;
}
.stchip-sel {
  width: auto;
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  background: var(--glass2);
  border: 1px solid var(--stroke2);
  border-radius: 8px;
  padding: 4px 7px;
  outline: none;
  max-width: 140px;
}
.stchip-sel:focus {
  border-color: var(--blue);
}

/* ----- דו"ח-הדפסה (הערת-בוס #4: PDF) ----- */
#printArea {
  display: none;
  color: #111;
  direction: rtl;
  font-family: -apple-system, "Segoe UI", "Heebo", Arial, sans-serif;
}
@media print {
  body {
    background: #fff !important;
  }
  body.printing > * {
    display: none !important;
  }
  body.printing > #printArea {
    display: block !important;
  }
}
#printArea h1 {
  font-size: 20px;
  margin: 0 0 6px;
}
#printArea .pr-sub {
  font-size: 13px;
  color: #444;
  margin-bottom: 14px;
}
#printArea .pr-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
#printArea .pr-tbl th,
#printArea .pr-tbl td {
  border: 1px solid #bbb;
  padding: 5px 8px;
  text-align: right;
}
#printArea .pr-tbl th {
  background: #eee;
  font-weight: 700;
}
#printArea .pr-foot {
  margin-top: 12px;
  font-size: 11px;
  color: #777;
}
/* "תוכנית מלאה" (13.8) — עמודת המספור-הרץ: צרה, ממורכזת, לא גוזלת רוחב מהניתוח */
#printArea .pr-tbl .pr-no {
  width: 34px;
  text-align: center;
  font-weight: 700;
  color: #555;
}

/* ----- לוח-החדרים — portrait (בקשת-עידן 7.7: הגרסה-לרוחב יצאה "על הצד" בשמירה-כ-PDF).
   portrait = לעולם לא מסתובב. מתחם-לעמוד + גריד רספונסיבי (~3 עמודות ברוחב-A4-לאורך). ----- */
@page dgLand {
  size: A4 portrait;
  margin: 10mm;
}
#printArea.pr-diagram {
  page: dgLand;
}
/* טבלת-נוכחות: שורת-קבוצה (בכירים/מתמחים) */
#printArea .pr-grp td {
  background: #eef2fb;
  font-weight: 800;
  color: #26407e;
  font-size: 11.5px;
}
/* רשימות-מסכמות (חסרים לפי סיבה / רזרבה / נוכחים / נספחים) — צפוף, שמות בלבד */
#printArea .pr-lists {
  margin-top: 10px;
}
#printArea .pr-list {
  margin: 0 0 7px;
}
#printArea .pr-list h3 {
  font-size: 12.5px;
  font-weight: 800;
  color: #1a2c5b;
  margin: 0 0 2px;
}
#printArea .pr-list-n {
  font-weight: 600;
  color: #667;
}
#printArea .pr-list p {
  margin: 0 0 2px;
  font-size: 10.5px;
  line-height: 1.55;
  color: #222;
}
/* לוח-החדרים (pr-diagram): סקציה-פר-מתחם + גריד כרטיסים קומפקטי */
#printArea.pr-diagram {
  font-size: 11px;
}
#printArea.pr-diagram .pr-sec {
  margin: 0 0 9px;
  break-after: page; /* בקשת-עידן 6.7: כל מתחם בעמוד נפרד */
}
#printArea.pr-diagram .pr-sec:last-of-type {
  break-after: auto; /* בלי עמוד-ריק בסוף (last-of-type: ה-.pr-foot הוא div, לא section) */
}
#printArea.pr-diagram .pr-subsec {
  break-inside: avoid; /* ברק 5.8: מתחם קטן לא נחתך באמצע בעמוד המשותף */
  margin: 0 0 9px;
}
#printArea.pr-diagram .pr-sec-h {
  font-size: 13px;
  font-weight: 800;
  color: #1a2c5b;
  border-bottom: 2px solid #26407e;
  padding-bottom: 2px;
  margin: 0 0 5px;
  break-after: avoid;
}
#printArea.pr-diagram .pr-sec-n {
  font-size: 10.5px;
  font-weight: 600;
  color: #667;
}
#printArea.pr-diagram .pr-grid {
  display: grid;
  /* auto-fill → כמה-שיותר-חדרים-פר-שורה בלי כרטיס-מתוח כשהמתחם דל; ~3 עמודות ב-A4 לאורך */
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 5px;
}
#printArea.pr-diagram .pr-card {
  break-inside: avoid;
  border: 1px solid #b9c2d8;
  border-radius: 6px;
  padding: 4px 6px 5px;
  background: #fbfcfe;
  /* בקשת-עידן 7.7: התגיות הצבעוניות חייבות להיות מודפסות גם בלי "גרפיקת-רקע" בדיאלוג-ההדפסה */
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
#printArea.pr-diagram .pr-card-h {
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-bottom: 1px dotted #ccd;
  padding-bottom: 2px;
  margin-bottom: 3px;
}
#printArea.pr-diagram .pr-card-no {
  font-weight: 800;
  font-size: 12px;
  color: #26407e;
  white-space: nowrap;
}
#printArea.pr-diagram .pr-card-dom {
  font-weight: 700;
  font-size: 11px;
  color: #333;
  overflow: hidden;
}
#printArea.pr-diagram .pr-card-docs {
  list-style: none;
  margin: 0;
  padding: 0;
}
#printArea.pr-diagram .pr-card-docs li {
  font-size: 14px; /* ברק 5.8: שמות רופאים גדולים וקריאים בהדפסה (היה 10.5px) */
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
#printArea.pr-diagram .pr-docnm.sr {
  font-weight: 700;
}
#printArea.pr-diagram .pr-role {
  font-size: 10px; /* ברק 5.8: הוגדל יחד עם שמות הרופאים (היה 8.5px) */
  font-weight: 700;
  padding: 0 4px;
  border-radius: 6px;
  border: 1px solid;
}
#printArea.pr-diagram .pr-role.sr {
  color: #1a7f43;
  background: #e7f5ec;
  border-color: #a8d8ba;
}
#printArea.pr-diagram .pr-role.rs {
  color: #3949ab;
  background: #eef0fb;
  border-color: #c3cbef;
}
#printArea.pr-diagram .pr-relief {
  font-size: 8.5px;
  font-weight: 700;
  color: #b7791f;
  background: #fdf1dc;
  border: 1px solid #f0d9a8;
  border-radius: 6px;
  padding: 0 4px;
}
#printArea.pr-diagram .pr-card-empty {
  color: #999;
  font-size: 10.5px;
}
#printArea.pr-diagram .pr-card-surg {
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px dotted #ccd;
}
#printArea.pr-diagram .pr-surgrow {
  font-size: 10px;
  font-weight: 700;
  color: #17233f;
  line-height: 1.45;
}
/* 13.8: לא-מוגבל ל-pr-diagram — גם טבלת "התוכנית המלאה" מציגה ×N */
#printArea .pr-surgx {
  font-weight: 800;
  color: #26407e;
}
#printArea.pr-diagram .pr-card-note {
  margin-top: 3px;
  font-size: 9.5px;
  color: #555;
  line-height: 1.4;
}
#printArea.pr-diagram .pr-sec-mgr {
  /* פידבק-שטח 1.9: מנהלי-מתחם לא בלטו (היה 11px רגיל) — הוגדל + רקע-מרקר (עידן) */
  display: inline-block;
  font-size: 16px;
  font-weight: 800;
  color: #1a2c5b;
  background: #fdf3dd;
  border: 1px solid #f0d9a8;
  border-radius: 5px;
  padding: 2px 10px;
  margin: 0 0 6px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ----- "PDF להדפסה גדולה" (בקשת-ברק 26.8) — וריאנט-תלייה לחדר-בקרה: A4 לרוחב,
   ‏27.8 (ברק): A4 **לאורך** — הפריסה נגזרת-גובה, ולרוחב נותר שטח-מת. ~9 רצועות
   לעמוד, יום מלא ≈ 5 עמודים, שמות-המרדימים הפריט הגדול ביותר. שחור-לבן (אפס
   הסתמכות-על-צבע — תגיות = טקסט במסגרת). named page — שאר-הייצואים לא נגעו. ----- */
@page dgPrintLg {
  size: A4 portrait;
  margin: 6mm;
}
#printArea.pr-diagram-lg {
  page: dgPrintLg;
  color: #000;
}
#printArea.pr-diagram-lg h1 {
  font-size: 17pt;
  margin: 0 0 1mm;
}
#printArea.pr-diagram-lg .pr-sub {
  font-size: 10.5pt;
  color: #000;
  margin-bottom: 2mm;
}
#printArea.pr-diagram-lg .prl-sec-h {
  font-size: 14pt;
  font-weight: 800;
  background: #000;
  color: #fff;
  border-radius: 1.5mm;
  padding: 1.2mm 3mm;
  margin: 0 0 2mm;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  break-after: avoid; /* כותרת-מתחם לא נשארת יתומה בתחתית-עמוד */
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6mm;
}
#printArea.pr-diagram-lg .prl-mgr {
  font-size: 10.5pt;
  font-weight: 700;
  color: #fff;
}
/* רצועת-חדר (תדפיס-הייחוס): פס מלוא-רוחב, מספר-החדר בולט בקצה הימני */
#printArea.pr-diagram-lg .prl-card {
  break-inside: avoid; /* חדר לעולם לא נחתך בין עמודים */
  min-height: 13mm; /* 27.8: הגובה נגזר-מתוכן; ~9 רצועות לעמוד-portrait, יום מלא ≈ 5 עמודים */
  display: flex;
  align-items: flex-start;
  gap: 3mm;
  border: 2.5px solid #000; /* בקשת-עידן 27.8: הדגשת ההפרדה בין חדרים */
  border-radius: 2.5mm;
  padding: 1mm 2.5mm;
  margin: 0 0 1.4mm;
}
#printArea.pr-diagram-lg .prl-side {
  flex: 0 0 36mm;
  border-left: 2px solid #000; /* RTL: מפריד את עמודת-החדר מהתוכן */
  padding-left: 2.5mm;
  align-self: stretch;
}
#printArea.pr-diagram-lg .prl-room {
  display: block;
  font-size: 17pt;
  font-weight: 800;
  line-height: 1.15;
}
#printArea.pr-diagram-lg .prl-dom {
  display: block;
  font-size: 11pt;
  font-weight: 700;
  line-height: 1.3;
}
#printArea.pr-diagram-lg .prl-chips {
  display: block;
  font-size: 7pt;
  font-weight: 600;
  margin-top: 0.4mm;
  white-space: nowrap;
}
#printArea.pr-diagram-lg .prl-main {
  flex: 1;
  min-width: 0;
}
/* שורת-המרדימים — אופקית, שמות גדולים (קריא מרחוק), תגיות-טקסט צמודות לשם */
#printArea.pr-diagram-lg .prl-docs {
  list-style: none;
  margin: 0 0 1mm;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6mm 4mm;
}
#printArea.pr-diagram-lg .prl-docs li {
  font-size: 15pt;
  line-height: 1.2;
  display: flex;
  align-items: baseline;
  gap: 1.5mm;
  flex-wrap: wrap; /* סבב-1 (Codex #4): שורה ארוכה (שם+תגיות+"גם:") נשברת בתוך ה-li, לא נחתכת בקצה-A4 */
}
#printArea.pr-diagram-lg .prl-nm.sr {
  font-weight: 800;
}
#printArea.pr-diagram-lg .prl-tag {
  font-size: 8.5pt;
  font-weight: 700;
  border: 1.5px solid #000;
  border-radius: 2mm;
  padding: 0 1.2mm;
  white-space: nowrap; /* סבב-1: תגית בודדת לא נשברת — השבירה בין פריטי-ה-li */
}
#printArea.pr-diagram-lg .prl-tag.prl-rel {
  border-width: 2.5px; /* "התגית הכי חשובה" (עידן) — מסגרת עבה, בלי צבע */
}
#printArea.pr-diagram-lg .prl-also {
  font-size: 9pt;
  font-weight: 700;
  white-space: nowrap;
}
#printArea.pr-diagram-lg .prl-empty {
  font-size: 11pt;
  color: #333;
}
#printArea.pr-diagram-lg .prl-surg {
  border-top: 1px solid #000;
  padding-top: 0.8mm;
}
#printArea.pr-diagram-lg .prl-surgrow {
  font-size: 9.5pt;
  font-weight: 700;
  line-height: 1.25;
}
#printArea.pr-diagram-lg .prl-surgno {
  font-weight: 800;
}
#printArea.pr-diagram-lg .prl-surgx {
  font-weight: 800;
  margin-right: 2mm; /* RTL: רווח בין שם-הניתוח ל-×N */
}
#printArea.pr-diagram-lg .prl-note {
  margin-top: 0.8mm;
  border-top: 1px dotted #000;
  padding-top: 0.7mm;
  font-size: 9pt;
}
#printArea.pr-diagram-lg .pr-foot {
  color: #000;
  font-size: 8.5pt;
  margin-top: 2mm;
  break-before: avoid; /* שורת-הסיכום לא גוררת עמוד משלה */
}

/* אתרי-חוץ (חוץ ח.נ · ט"נ · ליס · מרפאות) מתחילים בעמוד נפרד משלושת המתחמים
   הגדולים — בקשת-ברק 27.8. השבירה על הראשון בקבוצה בלבד, לא לפני כל מקטע-aux. */
#printArea.pr-diagram-lg .prl-sec[data-group="aux"] {
  break-before: auto;
}
#printArea.pr-diagram-lg [data-group="main"] + .prl-sec[data-group="aux"] {
  break-before: page;
}

/* ---- doctor tab: 2 tiles (assignment + request form) ---- */
.doc-tile {
  margin-top: 24px;
  padding: 15px 15px 17px;
  border-radius: 18px;
  background: var(--glass2);
  border: 1px solid var(--stroke2);
}
.doc-tile-h {
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 12px;
}
/* בורר-שבוע באריח-הרופא (G1) */
.doc-daystrip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 12px;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.doc-daystrip::-webkit-scrollbar {
  display: none;
}
.doc-day-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 44px;
  padding: 6px 8px;
  border-radius: 12px;
  background: var(--glass2);
  border: 1px solid var(--stroke2);
  color: var(--ink2);
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.doc-day-chip:hover {
  background: var(--glass);
  color: var(--ink);
}
.doc-day-chip.sel {
  background: rgba(96, 165, 250, 0.18);
  border-color: var(--blue);
  color: var(--ink);
}
.ddc-dow {
  font-weight: 700;
  font-size: 12px;
}
.ddc-date {
  font-size: 11px;
  color: var(--ink3);
}
.doc-day-chip.sel .ddc-date {
  color: var(--ink2);
}

/* doctor assignment card (purpose-built, self-contained — NOT the dense board card) */
.doc-asgn-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--stroke2);
  border-radius: 14px;
  padding: 14px 15px;
  text-align: start;
}
.doc-asgn-card + .doc-asgn-card {
  margin-top: 12px;
}
.doc-asgn-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.doc-asgn-room {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.doc-asgn-no {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--on-indigo);
  background: var(--tint-indigo);
  border: 1px solid rgba(123, 140, 255, 0.32);
  flex: none;
}
.doc-asgn-rname {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.2;
}
.doc-asgn-dom {
  font-size: 12.5px;
  color: var(--ink2);
  margin-top: 2px;
}
.doc-asgn-cov {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex: none;
}
.doc-asgn-cov.ok {
  color: #7ef0c2;
  background: rgba(52, 211, 153, 0.18);
}
.doc-asgn-cov.low {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.18);
}
.doc-asgn-cov.empty {
  color: var(--ink2);
  background: rgba(255, 255, 255, 0.08);
}
.doc-asgn-sec {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--stroke2);
}
.doc-asgn-h {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink3);
  letter-spacing: 0.4px;
  margin-bottom: 9px;
}
.doc-asgn-team {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.doc-asgn-person {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke2);
}
.doc-asgn-person.me {
  border-color: rgba(167, 139, 250, 0.5);
  background: rgba(167, 139, 250, 0.1);
}
.doc-asgn-pn {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  min-width: 0;
}
.doc-asgn-you {
  font-size: 10px;
  font-weight: 700;
  color: var(--violet);
}
.doc-asgn-role {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 14px;
  flex: none;
}
.doc-asgn-role.sr {
  color: #7ef0c2; /* ≠on-green — פסטל ייחודי, קשיח בכהה (אזהרת-מועצה); בהיר נדרס */
  background: var(--tint-green);
}
.doc-asgn-role.rs {
  color: #bcd4ff; /* ≠on-blue — קשיח בכהה; בהיר נדרס */
  background: var(--tint-blue);
}
.doc-asgn-rel {
  font-size: 9px;
  font-weight: 700;
  color: #3a2b06;
  background: var(--amber);
  border-radius: 10px;
  padding: 1px 7px;
  flex: none;
}
.doc-asgn-surg {
  font-size: 13px;
  color: var(--ink);
  padding: 3px 0;
}
.doc-asgn-x {
  color: var(--ink2);
}
.doc-asgn-notes {
  font-size: 12.5px;
  color: var(--ink2);
  line-height: 1.55;
}
.doc-asgn-empty {
  text-align: center;
  color: var(--ink2);
  font-size: 13px;
  padding: 20px 0;
}

/* ============================================================
   G-wave שלב-א׳ (2026-07-03) — מצב בהיר ([data-theme="light"]).
   מקור-הפלטה: מוקאפ ATLAS Attendance-1.dc שורות 782-801 (מכוונן-AA).
   כהה = ברירת-המחדל ולא-שונה; כל הבהיר חי בבלוק הזה בלבד.
   מה שקשיח מחוץ ל-styles.css (בלוק-style מוזרק של diagram.js, inline ב-JS) —
   חוב מתועד: docs/DESIGN-DEBT-phase-a2.md
   ============================================================ */
[data-theme="light"] {
  /* בסיס */
  --bg: #ebeef4;
  --ink: #191d2b;
  --ink2: rgba(25, 29, 43, 0.74);
  --ink3: rgba(25, 29, 43, 0.56);
  --glass: #ffffff; /* פאנל אטום — זכוכית לבנה-שקופה בלתי-נראית על רקע בהיר */
  --glass2: #f2f5fa;
  --stroke: rgba(28, 33, 54, 0.1);
  --stroke2: rgba(28, 33, 54, 0.07);
  /* קטגוריות — ערכי-המוקאפ המוכהים */
  --teal: #0fa593;
  --blue: #2f74e0;
  --amber: #c9820e;
  --red: #de423d;
  --violet: #7b49da;
  --pink: #d5418c;
  --green: #047857; /* אין ירוק במוקאפ — emerald-700 (AA ≥4.5:1 על לבן); החלטה-עצלה מתועדת */
  --cc: #0f93c2;
  --ac: #4553d6; /* מועצה-2: ‎#5b6cf0 של המוקאפ = 3.73:1 על הטינט בטקסט-ניווט קטן — מוכהה ל-5.2:1 */
  --ac2: rgba(91, 108, 240, 0.12);
  --acInk: #ffffff;
  --track: rgba(28, 33, 54, 0.09);
  /* טקסט-על-טינט = צבע-הקטגוריה; טינטים בהירים בסגנון המוקאפ (--ct2/--cb2...) */
  --on-green: #047857;
  --tint-green: rgba(4, 120, 87, 0.12);
  --on-blue: #2563cd; /* H8-מועצה: #2f74e0=3.84:1 — הכהיה ~15% שחוב-עיצוב #10 כבר הציע */
  --tint-blue: rgba(47, 116, 224, 0.12);
  --on-amber: #8f5c07; /* מועצה-2: #c9820e היה 2.76:1 על הטינט — מוכהה ל-4.97:1 */
  --tint-amber: rgba(201, 130, 14, 0.13);
  --on-red: #c22823; /* H8-מועצה: #de423d היה 3.6:1 על הטינט (⚠ חסר/סיבת-חריגה) — מוכהה ל-≈5:1 */
  --tint-red: rgba(222, 66, 61, 0.12);
  --on-violet: #7b49da;
  --tint-violet: rgba(123, 73, 218, 0.12);
  --on-pink: #d5418c;
  --tint-pink: rgba(213, 65, 140, 0.12);
  --on-indigo: #4553d6; /* H8-מועצה: #5b6cf0=3.74:1 על באדג'ים 9-13px — יושר ל---ac המאושר (≈5.2:1) */
  --tint-indigo: rgba(91, 108, 240, 0.12);
  --on-orange: #9a3412; /* H8-מועצה: גלישה בבהיר — orange-800, AA בטוח על הטינט */
  --tint-orange: rgba(234, 88, 12, 0.12);
  --wash: rgba(28, 33, 54, 0.05); /* H8: לבן-על-לבן נעלם בבהיר — wash של דיו במקום לבן */
  --wash-strong: rgba(28, 33, 54, 0.09);

  /* פאזה-0 · טוקנים-חדשים בבהיר (geometry/type ב-:root, theme-independent, לא כאן).
     ⚠️ --ac נשאר #4553d6 (AA) — לא דורסים! (זה תיקון H1: הסנדבוקס דרס ל-#5b6cf0 שנכשל AA). */
  --acGlow: rgba(69, 83, 214, 0.3);
  --lvl3-bg: #ffffff;
  --lvl3-hl: rgba(255, 255, 255, 0.95);
  --shadow-1: 0 1px 3px rgba(40, 52, 96, 0.08);
  --shadow-2: 0 4px 14px rgba(40, 52, 96, 0.1);
  --shadow-3: 0 2px 6px rgba(40, 52, 96, 0.08), 0 16px 36px -14px rgba(40, 52, 96, 0.18);
  --shadow-hover: 0 6px 14px rgba(40, 52, 96, 0.1), 0 14px 30px -8px var(--acGlow);
  --aura: 0.4;
  --vignette: rgba(40, 52, 96, 0.06);
}

/* --- רקע-עמוד: בסיס בהיר + אאורות-קטגוריה עדינות (מקבילת ה-.bg הכהה) --- */
[data-theme="light"] .bg {
  background:
    radial-gradient(60% 55% at 78% 12%, rgba(15, 165, 147, 0.1), transparent 60%),
    radial-gradient(55% 50% at 12% 18%, rgba(123, 73, 218, 0.09), transparent 60%),
    radial-gradient(70% 60% at 50% 110%, rgba(47, 116, 224, 0.08), transparent 60%),
    linear-gradient(160deg, #eef1f7 0%, #ebeef4 50%, #e6eaf2 100%);
}
[data-theme="light"] .bg::after {
  background-image: radial-gradient(rgba(28, 33, 54, 0.06) 1px, transparent 1px);
}

/* --- זכוכית: פאנל לבן אטום + צל-המוקאפ (highlight פנימי בהיר) --- */
[data-theme="light"] .glass {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 2px 10px rgba(40, 52, 96, 0.08),
    0 30px 58px -24px rgba(40, 52, 96, 0.22);
}
[data-theme="light"] .logo svg {
  stroke: #fff; /* אייקון כהה נבלע בגרדיאנט המוכהה של הבהיר */
}

/* --- ניווט/סגמנטים: active בסגנון-המוקאפ (טינט-אקסנט במקום גרדיאנט-בהיר) --- */
[data-theme="light"] .seg button.active,
[data-theme="light"] .miniseg button.on {
  color: var(--ac);
  background: var(--ac2);
  box-shadow: inset 0 0 0 1px rgba(91, 108, 240, 0.35);
}
[data-theme="light"] .miniseg.metric button.on {
  background: var(--green);
  color: #fff;
  box-shadow: none;
}
[data-theme="light"] .miniseg.metric button.on.abs {
  background: var(--violet);
  color: #fff;
}
[data-theme="light"] .seg .soon {
  background: rgba(28, 33, 54, 0.08);
}

/* --- משטחי-wash (בכהה: לבן-שקוף → בבהיר: נייבי-שקוף) --- */
[data-theme="light"] .miniseg,
[data-theme="light"] .period,
[data-theme="light"] .period button,
[data-theme="light"] .chip:not(.on),
[data-theme="light"] .funnel-stage,
[data-theme="light"] .stchip {
  background: rgba(28, 33, 54, 0.05);
}
[data-theme="light"] .period button:active {
  background: rgba(28, 33, 54, 0.12);
}
[data-theme="light"] .chip.on {
  color: #fff; /* על רקע var(--ink) הכהה */
}
[data-theme="light"] .bar.click:hover,
[data-theme="light"] .sched-slot,
[data-theme="light"] .cal-cell:not(.cal-green):not(.cal-orange):not(.cal-red):not(.cal-blank) {
  background: rgba(28, 33, 54, 0.04);
}

/* --- כפתורים (‎:not — לא לדרוס וריאנטים בעלי specificity שווה שהוגדרו מוקדם-יותר) --- */
[data-theme="light"] .btn:not(.ok):not(.primary) {
  background: #fff;
}
[data-theme="light"] .btn.ok,
[data-theme="light"] .btn.primary {
  color: #fff; /* הגרדיאנטים (ירוק/טיל/כחול) מוכהים בבהיר — טקסט לבן */
}
/* מועצה-2: התחנה הטורקיזית #0fa593 הפילה לבן ל-3.08:1 — גרדיאנטים מוכהים ל-AA ≥5:1 */
[data-theme="light"] .btn.ok {
  background: linear-gradient(150deg, #047857, #0b7d70);
}
[data-theme="light"] .btn.primary {
  background: linear-gradient(150deg, #0b7d70, #2a68ca);
}
[data-theme="light"] #btnSchedImport {
  border-color: rgba(123, 73, 218, 0.45);
  background: var(--tint-violet);
  color: var(--violet);
}

/* --- תגים/באדג'ים (זוגות on/tint כבר בטוקנים; כאן רק רקעי near-miss וגבולות) --- */
[data-theme="light"] .demo-badge,
[data-theme="light"] .teaser .soonbadge,
[data-theme="light"] .chip-demo {
  background: var(--tint-amber);
}
[data-theme="light"] .datechip {
  border-color: rgba(47, 116, 224, 0.3);
}
[data-theme="light"] .av {
  background: linear-gradient(150deg, var(--violet), var(--blue));
}

/* --- באנרים/פסי-כיסוי --- */
[data-theme="light"] .cover-banner.green {
  background: var(--tint-green);
  border-color: rgba(4, 120, 87, 0.35);
}
[data-theme="light"] .cover-banner.orange {
  background: var(--tint-amber);
  border-color: rgba(201, 130, 14, 0.35);
}
[data-theme="light"] .cover-banner.red {
  border-color: rgba(222, 66, 61, 0.35);
}
[data-theme="light"] .cover-bar.green {
  border-color: rgba(4, 120, 87, 0.4);
}
[data-theme="light"] .cover-bar.orange {
  border-color: rgba(201, 130, 14, 0.4);
}
[data-theme="light"] .cover-bar.red {
  border-color: rgba(222, 66, 61, 0.45);
}

/* --- טוסט: נשאר כהה בכוונה (ניגודיות גבוהה בשני המצבים) — קיבוע ערכי-הכהה --- */
[data-theme="light"] #toast .t {
  color: #eef2f9;
  border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="light"] #toast .t svg {
  stroke: #34d399;
}

/* --- pulse: הבזק כהה במקום לבן (לבן-על-לבן נעלם) --- */
@keyframes pulseLight {
  0% {
    color: var(--amber);
  }
  50% {
    color: #191d2b;
    text-shadow: 0 0 22px var(--amber);
  }
  100% {
  }
}
[data-theme="light"] .pulse {
  animation: pulseLight 0.8s ease;
}

/* --- מסך-רופא (phone) --- */
/* מועצה-2: מוגבל ל-min-width — כלל top-level (0-2-0) ניצח את הפשטת-המסגרת של המובייל
   ב-@media 640px (0-1-0) והחזיר הילת-צל על מסך-רופא צר */
@media (min-width: 641px) {
  [data-theme="light"] .phone {
    background: linear-gradient(160deg, #ffffff, #eef1f7);
    box-shadow: 0 30px 70px rgba(40, 52, 96, 0.28);
  }
}
/* במובייל המסגרת מופשטת (כמו בכהה) — צל-ה-.glass הבהיר (0,2,0) ניצח את ה-none של ה-640px */
@media (max-width: 640px) {
  [data-theme="light"] .phone {
    box-shadow: none;
  }
}
[data-theme="light"] .screen {
  background: var(--glass2);
}
[data-theme="light"] .status-card {
  background: var(--tint-green);
  border-color: rgba(4, 120, 87, 0.25);
}
[data-theme="light"] .status-card .ring {
  background: rgba(4, 120, 87, 0.15);
}
[data-theme="light"] select,
[data-theme="light"] input[type="text"] {
  background: #fff;
}
[data-theme="light"] .doc-tile {
  background: #fff; /* ה-screen הוא glass2 — האריח מתרומם בלבן */
}
[data-theme="light"] .doc-day-chip:hover {
  background: rgba(28, 33, 54, 0.06);
}
[data-theme="light"] .doc-day-chip.sel {
  background: var(--tint-blue);
}
[data-theme="light"] .doc-asgn-card {
  background: var(--glass2);
}
[data-theme="light"] .doc-asgn-person {
  background: #fff;
}
[data-theme="light"] .doc-asgn-person.me {
  border-color: rgba(123, 73, 218, 0.45);
  background: var(--tint-violet);
}
[data-theme="light"] .doc-asgn-no {
  border-color: rgba(91, 108, 240, 0.3);
}
[data-theme="light"] .doc-asgn-cov.ok {
  color: var(--green);
  background: var(--tint-green);
}
[data-theme="light"] .doc-asgn-cov.low {
  color: var(--red);
  background: var(--tint-red);
}
[data-theme="light"] .doc-asgn-cov.empty {
  background: rgba(28, 33, 54, 0.06);
}
[data-theme="light"] .doc-asgn-role.sr {
  color: var(--green);
}
[data-theme="light"] .doc-asgn-role.rs {
  color: var(--blue);
}

/* --- טבלאות --- */
[data-theme="light"] table.tbl th {
  background: rgba(255, 255, 255, 0.92);
}
[data-theme="light"] .row-warn {
  background: rgba(222, 66, 61, 0.07);
}

/* --- לוח-חודשי --- */
[data-theme="light"] .cal-green {
  border-color: rgba(4, 120, 87, 0.35);
}
[data-theme="light"] .cal-orange {
  background: var(--tint-amber);
  border-color: rgba(201, 130, 14, 0.35);
}
/* מועצה-2: הכלל למעלה תפס גם את נקודת-המקרא <i class="cal-dot cal-orange"> — השבה לצבע-מלא */
[data-theme="light"] .cal-dot.cal-orange {
  background: var(--amber);
}
[data-theme="light"] .cal-red {
  border-color: rgba(222, 66, 61, 0.4);
}

/* --- תחנות-חוץ --- */
[data-theme="light"] .stchip.red {
  background: var(--tint-red);
  border-color: rgba(222, 66, 61, 0.45);
}
[data-theme="light"] .stchip.green {
  background: var(--tint-green);
  border-color: rgba(4, 120, 87, 0.4);
}

/* --- שיבוץ (schedule) --- */
[data-theme="light"] .sched-daycol {
  background: rgba(242, 245, 250, 0.95);
}
[data-theme="light"] .sched-none {
  color: rgba(28, 33, 54, 0.28);
}
[data-theme="light"] .funnel-stage.fn-final {
  background: var(--tint-green);
}
[data-theme="light"] .rule-ph {
  border-color: rgba(201, 130, 14, 0.6);
}

/* --- גרף-פרופיל (.fc — profile.js) --- */
[data-theme="light"] .fc .stk {
  background: linear-gradient(180deg, var(--violet), rgba(47, 116, 224, 0.35));
}
[data-theme="light"] .fc .stk.g {
  background: linear-gradient(180deg, var(--green), rgba(15, 165, 147, 0.35));
}

/* --- טקסט-קטן צבעוני על-לבן: גוונים-מוכהים ל-AA 4.5:1 (נגזרות של פלטת-המוקאפ;
       צבעי-המוקאפ הראשיים מכווננים ל-≥3:1 — מספיק ל-UI/טקסט-גדול בלבד) --- */
[data-theme="light"] .sched-banner,
[data-theme="light"] .sched-demo-note,
[data-theme="light"] .rule-ph,
[data-theme="light"] .fn-drop i {
  color: #8f5c07;
}
[data-theme="light"] .c-warn,
[data-theme="light"] .btn.no,
[data-theme="light"] .sched-name.is-warn,
[data-theme="light"] .funnel-result.fn-empty {
  color: #c22823;
}
[data-theme="light"] .sched-warn {
  color: #c22823 !important;
}
[data-theme="light"] .crumb .back {
  color: #0b7d70;
}

/* ==== drill-down סיבות-היעדרות (בוס 6.7) ==== */
.reason-bar {
  cursor: pointer;
  border-radius: 10px;
}
.reason-bar:hover {
  background: var(--wash, rgba(127, 127, 127, 0.08));
}
.reason-bar:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.reason-caret {
  opacity: 0.55;
  font-weight: 400;
  font-size: 11px;
}
.reason-names {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 2px 4px;
}
.reason-chip {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--wash, rgba(127, 127, 127, 0.1));
  border: 1px solid var(--stroke, rgba(127, 127, 127, 0.25));
}
.reason-chip i {
  opacity: 0.65;
  font-style: normal;
  font-size: 11px;
}

/* ============ חבילת-UI 16-17.7 (T44/T46/T42): פס-תחתון + מקטעים-מתקפלים + קבוצות-חסרים ============ */
.util-footer {
  margin-top: 28px;
  padding: 12px 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.util-btns {
  display: flex;
  gap: 10px;
  align-items: center;
}

details.roster-section > summary,
details.admin-collapse > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
details.roster-section > summary::-webkit-details-marker,
details.admin-collapse > summary::-webkit-details-marker {
  display: none;
}
details.roster-section > summary::before,
details.admin-collapse > summary::before {
  content: "▸";
  font-size: 12px;
  color: var(--ink2);
  transition: transform 0.15s;
}
details[open].roster-section > summary::before,
details[open].admin-collapse > summary::before {
  transform: rotate(90deg);
}
details.roster-section > summary h3,
details.admin-collapse > summary h3 {
  margin: 0;
}
.roster-section {
  margin-top: 24px;
}
details.admin-collapse > #adminActions,
details.admin-collapse > .tbl-scroll {
  margin-top: 12px;
}

.abs-group-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink2);
  margin: 10px 2px 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--stroke2);
}
.abs-group-head .sub {
  font-weight: 500;
  opacity: 0.75;
}

/* תיקון-עידן 16.7 לילה: סרגל-הייצוא חי בתוך ה-controlbar — שורה אחת */
.controlbar .export-bar {
  margin-bottom: 0;
  flex: 1;
  justify-content: flex-end;
}

/* שורת מיון-וסינון תור-הבקשות (19.8) — בוררים נייטיביים, בלי מודאל */
.qctrls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.qctrls select {
  width: auto;
  font-size: 12px;
  padding: 4px 8px;
}
.qctrls:empty {
  display: none;
}
.qctrls .qrev {
  font-size: 12px;
  padding: 4px 8px;
}
.qctrls .qrev[aria-pressed="true"] {
  border-color: var(--pink);
  color: var(--pink);
}

/* ===== סידור-שישי (js/friday-view.js, 3.9) — מוקאפ מאושר ע"י עידן 3.9 12:32 ===== */
.fri-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; }
.fri-link { flex: 1 1 320px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--stroke2); color: var(--ink); font: inherit; font-size: 13px; direction: ltr; text-align: left; min-height: 42px; }
.fri-link::placeholder { color: var(--ink3); direction: rtl; text-align: right; }
.fri-actions { display: flex; gap: 8px; align-items: center; margin-inline-start: auto; }
.fri-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--stroke); }
.fri-state.draft { color: var(--amber); background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.35); }
.fri-state.pub { color: var(--green); background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.35); }
.fri-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 4px; }
.fri-kpi { padding: 10px 12px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--stroke2); }
.fri-kpi b { display: block; font-size: 22px; font-weight: 700; line-height: 1.1; font-family: "IBM Plex Mono", monospace; }
.fri-kpi span { font-size: 12px; color: var(--ink3); }
.fri-kpi.bad b { color: var(--red); }
.fri-kpi.ok b { color: var(--green); }
.fri-blocked { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.35); font-size: 13px; }
.fri-blocked b { color: var(--red); }
.fri-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink3); margin: 8px 0 2px; }
.fri-legend i { font-style: normal; }
.fri-group td.sched-daycol { color: var(--ink2); font-size: 11.5px; letter-spacing: 0.02em; font-weight: 700; }
.fri-group td { border-top: 1px solid var(--stroke); }
.fri-note { display: inline-block; margin-inline-start: 6px; font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; color: var(--amber); background: rgba(251, 191, 36, 0.12); border-radius: 6px; padding: 1px 6px; }
.fri-note-tgl { border: 0; cursor: pointer; padding: 3px 8px; }
.fri-note-tgl[aria-pressed="false"] { color: var(--ink3); background: transparent; outline: 1px dashed var(--stroke); outline-offset: -1px; }
.fri-note-tgl:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.fri-events td { font-size: 12px; font-weight: 600; color: var(--ink2); background: rgba(167, 139, 250, 0.08); }
.fri-block { color: var(--red); font-weight: 700; background: rgba(248, 113, 113, 0.12); border-radius: 6px; padding: 1px 7px; }
.fri-cell-mine { font-weight: 700; background: rgba(167, 139, 250, 0.16); outline: 1px solid rgba(167, 139, 250, 0.5); }
.fri-dialog .row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--stroke2); }
.fri-dialog .row > span { flex: 1; min-width: 0; font-weight: 600; }
.fri-dialog .where { display: block; font-size: 11.5px; color: var(--ink3); font-weight: 400; margin-top: 2px; }
.fri-dialog select { flex: 0 0 210px; max-width: 210px; padding: 7px 10px; border-radius: 9px; background: var(--glass2); border: 1px solid var(--stroke2); color: var(--ink); font: inherit; font-size: 12.5px; }
@media (max-width: 640px) { .fri-actions { margin-inline-start: 0; width: 100%; } .fri-actions .btn { flex: 1; justify-content: center; } }
/* קבוצת-הבעלות (js/scheduling.js mountOwnership): הכפתורים נסתרים ע"י התכונה hidden בלבד,
   אבל .btn{display:flex} של גיליון-המחבר גובר על [hidden]{display:none} של ה-UA ⇒ "פרסם"
   ו"אפס קטגוריה" נשארו גלויים גם כשהלוגיקה הסתירה אותם. שער מקומי לקבוצה, לא רדיזיין:
   #schedOwnGroup [hidden] = 1,1,0 > .btn = 0,1,0. תקף גם ל-chip (.meta) ולכל כפתור עתידי. */
#schedOwnGroup [hidden] { display: none; }
/* לשישי אין בעלות-חודש: הכלל #schedule.fri-active #schedOwnGroup שלמטה הפסיד ל-display:inline-flex
   שנקבע inline ב-mountOwnership, וה-chip ("טיוטה בבעלות-ATLAS") נשאר מצויר בלשונית-שישי.
   !important הוא הדרך היחידה לגבור על inline בלי לגעת ב-JS. */
#schedule.fri-active #schedOwnGroup { display: none !important; }
/* לשונית-שישי פעילה: כפתורי-התורנויות בסרגל (הרצה · ייבוא · סנכרון · קישורים · ייצוא · בעלות) לא שייכים לה */
#schedule.fri-active .controlbar .btn,
#schedule.fri-active #schedOwnGroup,
#schedule.fri-active #sheetSyncStatus { display: none; }
/* לשונית-שישי: גם באנר-המנוע, פאנל-"חוקי-המנוע" ובורר-מצב (חודשי/יומי) אינם שייכים — שישי הוא חודשי ומחוץ למנוע */
#schedule.fri-active #schedBanner,
#schedule.fri-active #schedNeeds,
#schedule.fri-active #schedDayGroup,
#schedule.fri-active .ctl-group:has(#schedModeSeg) { display: none; }
/* דיאלוג-ההתאמה במובייל: שם מעל, בורר ברוחב מלא */
@media (max-width: 640px) {
  .fri-dialog .row { flex-direction: column; align-items: stretch; gap: 6px; }
  .fri-dialog select { flex: 1 1 auto; width: 100%; max-width: none; }
}

/* ============ סרגל-הצד של המשבץ (8.9, js/sched-sidebar.js) ============
   #schedSide נוצר ב-JS רק כש-canSchedule() ואחרי #schedBody, ולכן ה-has-side הופך את
   #schedule לגריד דו-טורי: כל הילדים ברוחב-מלא, ורק הלוח והסרגל חולקים שורה. אין DOM
   חדש ב-index.html ואין שינוי בפריסה כשהמחלקה אינה קיימת. השורות ממחזרות את שפת ה-.fn-cand. */
/* :not([hidden]) חובה — ה-display כאן חזק מ-section[hidden]{display:none} (מזהה מול תגית),
   ובלעדיו מעבר-לשונית בזמן שהסרגל פתוח היה משאיר את לוח-המשבץ גלוי מעל הלשונית החדשה. */
#schedule.has-side:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
#schedule.has-side > * { grid-column: 1 / -1; }
#schedule.has-side > #schedBody { grid-column: 1 / 2; }
#schedule.has-side > #schedSide { grid-column: 2 / 3; }
.sched-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; padding: 12px; text-align: right; }
.side-head { display: flex; align-items: flex-start; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--stroke2); }
.side-title { flex: 1; font-weight: 700; font-size: 13px; line-height: 1.4; }
.side-head-act { display: flex; gap: 6px; }
.side-head-act .btn { padding: 2px 8px; font-size: 12px; }
.side-sec { margin-top: 10px; margin-bottom: 2px; font-weight: 600; font-size: 12.5px; }
.side-sec .sub { color: var(--ink3); font-weight: 400; font-size: 11px; }
.side-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--stroke2); font-size: 13px; }
.side-pol { width: 18px; text-align: center; }
.side-name { flex: 1; min-width: 70px; }
.side-load { color: var(--ink2); font-size: 11px; white-space: nowrap; }
.side-why { flex: 1; color: var(--ink2); font-size: 11.5px; }
.side-row .btn { padding: 2px 9px; font-size: 12px; }
/* צבעי-ההעדפה שעידן ביקש: רוצה=ירוק · ניטרלי=אפור (ברירת-המחדל, בלי טינט) · חסום=אדום */
.side-want .side-name { color: var(--on-green); }
.side-avoid .side-name { color: var(--ink3); }
.side-cap .side-name { color: var(--on-orange); }
/* חסומים: בתחתית, מעומעמים ובלי כפתור-שיבוץ — הסרת-חסימה נשארת מסלול מפורש במשפך */
.side-blocked { opacity: 0.6; }
.side-blocked .side-name { color: var(--on-red); }
/* מסך-צר: הסרגל יורד מתחת ללוח במקום לרסק את העמודות (הפיצ'ר מיועד לדסקטופ) */
@media (max-width: 1024px) {
  #schedule.has-side:not([hidden]) { display: block; }
  .sched-side { position: static; max-height: 420px; margin-top: 12px; }
}

/* ============ לוח-ניסוי (js/sandbox-board.js) — 1b 24.9 ============
   סרגל מקווקו כמו .sched-banner (שפה אחת: "זה לא הלוח הרשמי"), צבעים מטוקנים בלבד
   ([data-theme="light"] מחליף את הטוקנים עצמם, לכן אין כאן דריסות-בהיר נפרדות). */
.sbx-bar {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px dashed var(--on-amber);
  border-radius: 12px;
  font-size: 13.5px;
}
.sbx-bar[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.sbx-head, .sbx-tools, .sbx-new, .sbx-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sbx-head strong { color: var(--on-amber); font-weight: 700; }
.sbx-head [data-sbxexit] { margin-inline-start: auto; }
.sbx-sub { color: var(--ink3); font-size: 12.5px; }
.sbx-list { display: grid; gap: 6px; }
.sbx-item .sbx-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.sbx-item .btn, .sbx-head .btn, .sbx-new .btn { min-height: 36px; padding: 6px 12px; white-space: nowrap; }
.sbx-input {
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 7px 10px;
  min-width: 0;
  flex: 1 1 160px;
  max-width: 260px;
}
.sbx-input:focus-visible, .sbx-bar .btn:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }

/* שבבי-רופאים: default · hover · focus · active · armed(aria-pressed) · dragging · busy(סרגל) */
.sbx-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 132px; overflow-y: auto; }
.sbx-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 5px 10px;
  min-height: 32px;
  cursor: grab;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.sbx-chip:hover { background: rgba(127, 127, 127, 0.16); border-color: var(--ac); }
.sbx-chip:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.sbx-chip:active { cursor: grabbing; transform: scale(0.97); }
.sbx-chip[aria-pressed="true"] { border-color: var(--ac); box-shadow: inset 0 0 0 1px var(--ac); background: rgba(127, 127, 127, 0.18); }
.sbx-count { font-weight: 700; font-size: 11px; color: var(--ink3); min-width: 1.4em; text-align: center; }
.sbx-zero { color: var(--amber); background: rgba(251, 191, 36, 0.12); border-radius: 6px; padding: 1px 6px; }

/* מצב-פעיל: #sbxCol לצד הלוח — אותו גריד כמו .has-side (ובמזהה-כפול, כדי לגבור על
   "#schedule.has-side > *" כששני הסרגלים פתוחים). #schedSide עובר לתוך העמודה ב-JS. */
#schedule.sbx-side:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
#schedule.sbx-side > * { grid-column: 1 / -1; }
#schedule.sbx-side > #schedBody { grid-column: 1 / 2; }
#schedule.sbx-side > #sbxCol { grid-column: 2 / 3; align-self: stretch; }
/* --hdr-h = גובה ה-header הדביק (נמדד ב-sandbox-board.js; 126px עד המדידה) + top:8 שלו + 12 רווח */
#schedule.sbx-side .sbx-stick { position: sticky; top: calc(var(--hdr-h, 126px) + 20px); max-height: calc(100vh - var(--hdr-h, 126px) - 32px); overflow-y: auto; display: grid; gap: 10px; }
#sbxCol .sbx-bar { margin-bottom: 0; }
#sbxCol .sched-side { position: static; max-height: none; }
#schedule.sbx-side .sbx-chips { max-height: 45vh; }
/* מסך-צר: העמודה יורדת מתחת ללוח ונצמדת לתחתית-המסך, כדי שהשמות יישארו בהישג-יד בזמן גלילה */
@media (max-width: 1024px) {
  #schedule.sbx-side:not([hidden]) { display: block; }
  #schedule.sbx-side > #sbxCol { position: sticky; bottom: 0; z-index: 20; margin-top: 12px; }
  #schedule.sbx-side .sbx-stick { position: static; max-height: 45vh; }
  #schedule.sbx-side .sbx-chips { max-height: 22vh; }
}

/* שם בחור/נגרר: מסגרת = מותר · מעומעם = חסום (חוק-קשיח). לפני .sbx-over כדי שהגרירה תגבר */
td.sched-cell.sbx-ok { box-shadow: inset 0 0 0 2px var(--on-green); }
td.sched-cell.sbx-no { opacity: 0.4; }

/* תא-יעד בזמן גרירה — אותו דפוס כמו תאי diagram (restructure.css) */
td.sched-cell.sbx-over { box-shadow: inset 0 0 0 2px var(--ac); }
body.sbx-on td.sched-cell[data-slot] { cursor: copy; }

/* שורת-מצב: ok · warn · err · info — ריקה = נעלמת */
.sbx-status { font-size: 13px; font-weight: 600; border-radius: 10px; padding: 7px 10px; }
.sbx-status:empty { display: none; }
.sbx-status[data-kind="ok"] { background: var(--tint-green); color: var(--on-green); }
.sbx-status[data-kind="warn"] { background: var(--tint-amber); color: var(--on-amber); }
.sbx-status[data-kind="err"] { background: var(--tint-red); color: var(--on-red); }
/* חלון-עקיפה (26.9) — על בסיס .overlay>.modal הקיים */
.sbx-ask .modal { max-width: 440px; }
.sbx-ask-h { font-size: 12px; font-weight: 700; color: var(--ink2); margin: 12px 0 4px; }
.sbx-ask-list { margin: 0; padding-inline-start: 18px; font-size: 13px; line-height: 1.6; }
.sbx-ask-alts { display: flex; flex-wrap: wrap; gap: 6px; }
.sbx-ask-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
/* אירועי-שישי (5.1): כותרת-קבוצה ברשימת-השבבים + חלון-האירוע */
.sbx-evh { flex-basis: 100%; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink2); margin-top: 4px; }
.sbx-evh > span { flex: 1; min-width: 0; }
.sbx-evh .btn { min-height: 28px; padding: 2px 8px; font-size: 12px; }
.sbx-fev-f { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink2); margin-top: 10px; }
.sbx-ask .modal .sbx-input { max-width: none; width: 100%; }
.sbx-fev-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px 10px; max-height: 36vh; overflow-y: auto; margin: 8px 0; font-size: 13px; }
.sbx-status[data-kind="info"] { background: rgba(127, 127, 127, 0.1); color: var(--ink); }

/* בלוח-ניסוי: כל מה שכותב ללוח הרשמי / לגיליון / לבקשות-אמת נעלם (וגם נחסם בקליק ב-JS) */
body.sbx-on #btnSchedImport,
body.sbx-on #schedImpFile,
body.sbx-on #btnSyncSheets,
body.sbx-on #btnSheetSources,
body.sbx-on #sheetSyncStatus,
body.sbx-on #schedOwnGroup,
body.sbx-on .sched-swap:not(.sched-edit),
body.sbx-on .swap-badge,
body.sbx-on [data-frisave],
body.sbx-on [data-fripublish],
body.sbx-on [data-friunpublish],
body.sbx-on [data-rejectassign] {
  display: none !important;
}
@media (max-width: 480px) {
  .sbx-head [data-sbxexit] { margin-inline-start: 0; }
  .sbx-input { max-width: none; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sbx-chip { transition: none; }
  .sbx-chip:active { transform: none; }
}
