/* ─────────────────────────────────────────────────────────────
   CS Schedule — shared dark dashboard styles
   ───────────────────────────────────────────────────────────── */

:root {
  --bg:        #0a0d12;
  --surface:   #12161d;
  --surface-2: #1a1f28;
  --surface-3: #232a35;
  --border:    #2a313d;
  --border-soft:#1f2530;
  --text:      #e7eaef;
  --text-mute: #8b94a3;
  --text-faint:#5b6473;

  --green:    oklch(0.74 0.14 152);
  --green-bg: oklch(0.36 0.08 152 / 0.18);
  --red:      oklch(0.72 0.16 25);
  --red-bg:   oklch(0.36 0.10 25 / 0.20);
  --amber:    oklch(0.82 0.14 80);
  --amber-bg: oklch(0.40 0.10 80 / 0.20);
  --blue:     oklch(0.74 0.13 240);
  --blue-bg:  oklch(0.38 0.10 240 / 0.22);
  --violet:   oklch(0.74 0.13 290);
  --violet-bg:oklch(0.38 0.10 290 / 0.22);

  --radius: 14px;
  --radius-sm: 10px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

.mc-root, .cb-root {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  padding: 28px 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }

/* ─────────────────────────────────────────────────────────────
   Variation A — Mission Control
   ───────────────────────────────────────────────────────────── */

.mc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  gap: 32px;
}
.mc-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
}
.mc-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px oklch(0.74 0.14 152 / 0.15);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px oklch(0.74 0.14 152 / 0.15); }
  50%      { box-shadow: 0 0 0 7px oklch(0.74 0.14 152 / 0.08); }
}
.mc-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.mc-header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.mc-stat {
  text-align: right;
}
.mc-stat-num {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
  color: var(--green);
}
.mc-stat-off .mc-stat-num { color: var(--red); }
.mc-stat-total .mc-stat-num { color: var(--text); }
.mc-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-top: 4px;
  font-weight: 600;
}
.mc-slack {
  display: flex; gap: 6px; padding-left: 24px; border-left: 1px solid var(--border);
}
.mc-slack-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-mute);
  border: 1px solid var(--border);
}

/* Hero row */
.mc-hero-row {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.mc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.mc-card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.mc-card-head h2 { font-size: 15px; }
.mc-card-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  font-weight: 600;
}
.mc-card-sub {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-mute);
}
.mc-card-off { border-left: 3px solid var(--red); }
.mc-card-lead { border-left: 3px solid var(--amber); }
.mc-card-weekend { border-left: 3px solid var(--blue); }

/* Away list */
.mc-away-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto;
}
.mc-away-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.mc-away-info { flex: 1; min-width: 0; }
.mc-away-name { font-weight: 600; font-size: 13px; }
.mc-away-meta { font-size: 11px; color: var(--text-mute); margin-top: 2px; }

/* Avatars */
.mc-avatar, .cb-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  background: var(--surface-3);
  color: var(--text);
  border: 1.5px solid transparent;
}
.mc-avatar-working, .mc-avatar-on, .cb-avatar-on {
  background: var(--green-bg); color: var(--green); border-color: oklch(0.74 0.14 152 / 0.35);
}
.mc-avatar-off, .cb-avatar-off {
  background: var(--red-bg); color: var(--red); border-color: oklch(0.72 0.16 25 / 0.35);
}
.mc-avatar-lead, .cb-avatar-lead {
  background: var(--amber-bg); color: var(--amber); border-color: oklch(0.82 0.14 80 / 0.4);
}
.mc-avatar-lead-muted { background: var(--surface-3); color: var(--text-mute); }
.mc-avatar-weekend, .cb-avatar-weekend {
  background: var(--blue-bg); color: var(--blue); border-color: oklch(0.74 0.13 240 / 0.35);
}
.cb-avatar-sm { width: 22px; height: 22px; font-size: 10px; }

/* Pills + tags */
.mc-pill {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
}
.mc-pill-off { background: var(--red-bg); color: var(--red); }

/* Lead card */
.mc-lead-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 18px;
  flex: 1;
}
.mc-lead-divider { background: var(--border); }
.mc-lead-col { display: flex; flex-direction: column; gap: 12px; }
.mc-lead-day {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
}
.mc-lead-pip {
  width: 6px; height: 6px; border-radius: 50%; background: var(--amber);
}
.mc-lead-day-today { color: var(--amber); }
.mc-lead-row {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.mc-lead-scope {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: 6px;
  font-weight: 600;
}
.mc-lead-name {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 14px;
}
.mc-lead-name-muted { color: var(--text-mute); font-weight: 500; }

/* Weekend table */
.mc-weekend-table {
  width: 100%;
  border-collapse: collapse;
}
.mc-weekend-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
.mc-weekend-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  font-weight: 500;
}
.mc-weekend-table td:nth-child(2),
.mc-weekend-table td:nth-child(3) {
  padding-left: 12px;
}
.mc-weekend-region {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  font-family: var(--font-mono);
}
.mc-weekend-table td .mc-avatar {
  margin-right: 8px;
  vertical-align: middle;
}

/* Filters */
.mc-filters {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--border);
  margin-bottom: 12px;
}
.mc-filters-label {
  font-size: 13px; font-weight: 700; color: var(--text); margin-right: 4px;
}
.mc-filter {
  display: flex; align-items: center; gap: 8px;
}
.mc-filter-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  font-weight: 600;
  font-family: var(--font-mono);
}
.mc-filter-pills {
  display: flex; gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}
.mc-filter-pill {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: var(--text-mute);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.mc-filter-pill:hover { color: var(--text); }
.mc-filter-pill.is-active {
  background: var(--surface-3);
  color: var(--text);
}
.mc-filters-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-mute);
  font-family: var(--font-mono);
}

/* Roster */
.mc-roster {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding-right: 4px;
}
.mc-roster-group { }
.mc-roster-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.mc-roster-head h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  font-weight: 700;
  font-family: var(--font-mono);
}
.mc-roster-count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-mute);
}
.mc-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.mc-person {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  overflow: hidden;
}
.mc-status-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--text-faint);
}
.mc-person:hover { border-color: var(--border); }

/* On shift — strong green */
.mc-person-on-shift {
  background: linear-gradient(90deg, oklch(0.36 0.08 152 / 0.22) 0%, oklch(0.36 0.08 152 / 0.06) 60%, var(--surface) 100%);
  border-color: oklch(0.74 0.14 152 / 0.35);
}
.mc-person-on-shift .mc-status-bar { background: var(--green); }
.mc-person-on-shift:hover {
  border-color: oklch(0.74 0.14 152 / 0.6);
}

/* Off shift (working but shift = off) — neutral with faint indicator */
.mc-person-off-shift {
  background: var(--surface);
  border-color: var(--border-soft);
}
.mc-person-off-shift .mc-status-bar { background: var(--text-faint); }
.mc-person-off-shift .mc-person-name,
.mc-person-off-shift .mc-person-meta { opacity: 0.7; }

/* Off / time off — strong red */
.mc-person-off {
  background: linear-gradient(90deg, oklch(0.36 0.10 25 / 0.22) 0%, oklch(0.36 0.10 25 / 0.06) 60%, var(--surface) 100%);
  border-color: oklch(0.72 0.16 25 / 0.35);
}
.mc-person-off .mc-status-bar { background: var(--red); }
.mc-person-off .mc-person-name { color: var(--red); }
.mc-person-off:hover { border-color: oklch(0.72 0.16 25 / 0.6); }

.mc-tag-on { background: var(--green-bg); color: var(--green); }
.mc-tag-shift-off {
  background: var(--surface-3); color: var(--text-faint);
  font-weight: 600;
}
.mc-person-body { flex: 1; min-width: 0; }
.mc-person-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-person-meta {
  font-size: 10px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.mc-person-tags {
  display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end;
}
.mc-tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.mc-tag-off { background: var(--red-bg); color: var(--red); }
.mc-tag-lead { background: var(--amber-bg); color: var(--amber); }
.mc-tag-weekend { background: var(--blue-bg); color: var(--blue); }

/* ─────────────────────────────────────────────────────────────
   Variation B — Coverage Board
   ───────────────────────────────────────────────────────────── */

.cb-topbar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.cb-brand { display: flex; align-items: center; gap: 14px; }
.cb-brand-mark {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, oklch(0.45 0.16 280), oklch(0.55 0.18 240));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.cb-brand-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.cb-brand-sub {
  font-size: 11px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.cb-summary {
  display: flex; gap: 24px;
  padding: 0 24px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  height: 44px;
  align-items: center;
}
.cb-summary-cell {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--text-mute);
}
.cb-summary-cell strong { color: var(--text); font-family: var(--font-mono); font-size: 16px; }
.cb-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.cb-dot-on { background: var(--green); }
.cb-dot-off { background: var(--red); }
.cb-dot-lead { background: var(--amber); }

.cb-team-filter {
  margin-left: auto;
  display: flex; gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.cb-team-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border: 0;
  background: transparent;
  color: var(--text-mute);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.cb-team-btn:hover { color: var(--text); }
.cb-team-btn.is-active {
  background: var(--surface-3); color: var(--text);
}

.cb-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  min-height: 0;
}
.cb-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.cb-region-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.cb-region {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.cb-region-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.cb-region-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: var(--font-mono);
}
.cb-region-stat {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 13px;
}
.cb-region-stat strong { color: var(--green); font-size: 15px; }
.cb-region-stat span { color: var(--text-mute); }

.cb-lead-callout {
  background: linear-gradient(180deg, oklch(0.40 0.10 80 / 0.18), oklch(0.40 0.10 80 / 0.04));
  border: 1px solid oklch(0.82 0.14 80 / 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.cb-lead-callout-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.cb-lead-callout-name {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
  font-size: 14px;
}

.cb-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 6px;
  margin-top: 4px;
  display: flex; align-items: center; gap: 6px;
}
.cb-section-label-off { margin-top: 14px; }

.cb-people {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.cb-person {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface-2);
}
.cb-person-off { opacity: 0.75; }
.cb-person-info { flex: 1; min-width: 0; }
.cb-person-name { font-weight: 600; font-size: 13px; }
.cb-person-meta { font-size: 10px; color: var(--text-mute); font-family: var(--font-mono); margin-top: 1px; }
.cb-empty {
  padding: 8px;
  color: var(--text-faint);
  font-size: 12px;
  font-style: italic;
  text-align: center;
}
.cb-tag, .cb-mini-tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.cb-tag-off { background: var(--red-bg); color: var(--red); }
.cb-mini-tag { background: var(--surface-3); color: var(--text-faint); }

/* L2 + Invoicing row */
.cb-global-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cb-global-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.cb-global-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.cb-global-head h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: var(--font-mono);
}
.cb-global-stat {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-mute);
  font-family: var(--font-mono);
}
.cb-global-stat strong { color: var(--green); }
.cb-global-people {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.cb-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border-soft);
}
.cb-chip-on { color: var(--text); }
.cb-chip-off { color: var(--text-mute); }
.cb-chip-tz, .cb-chip-reason {
  font-size: 10px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  margin-left: 2px;
}
.cb-chip-reason { color: var(--red); }

/* Sidebar */
.cb-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.cb-side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.cb-side-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.cb-side-head h3 { font-size: 15px; }
.cb-side-sub { margin-left: auto; font-size: 11px; color: var(--text-mute); font-family: var(--font-mono); }
.cb-day-tabs {
  margin-left: auto;
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.cb-day-tabs button {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: var(--text-mute);
  border-radius: 6px;
  cursor: pointer;
}
.cb-day-tabs button.is-active {
  background: var(--surface-3);
  color: var(--text);
}
.cb-side-date {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 10px;
}
.cb-lead-list {
  display: flex; flex-direction: column; gap: 8px;
}
.cb-lead-item {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.cb-lead-scope {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 8px;
}
.cb-lead-name { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.cb-weekend {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cb-weekend-row {
  display: grid;
  grid-template-columns: 56px 1fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}
.cb-weekend-head-row {
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 8px;
  margin-bottom: 4px;
}
.cb-weekend-head-row span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-weight: 700;
  font-family: var(--font-mono);
}
.cb-weekend-region {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.cb-weekend-cell {
  display: flex; align-items: center; gap: 8px;
  font-weight: 500;
}

/* Scrollbars */
.mc-roster::-webkit-scrollbar,
.cb-main::-webkit-scrollbar,
.cb-sidebar::-webkit-scrollbar,
.mc-away-list::-webkit-scrollbar { width: 8px; }
.mc-roster::-webkit-scrollbar-thumb,
.cb-main::-webkit-scrollbar-thumb,
.cb-sidebar::-webkit-scrollbar-thumb,
.mc-away-list::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 999px;
}
.mc-roster::-webkit-scrollbar-track,
.cb-main::-webkit-scrollbar-track,
.cb-sidebar::-webkit-scrollbar-track,
.mc-away-list::-webkit-scrollbar-track {
  background: transparent;
}


/* ─────────────────────────────────────────────────────────────
   App shell — tab navigation
   ───────────────────────────────────────────────────────────── */

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.app-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 32px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}
.app-brand {
  display: flex; align-items: center; gap: 12px;
  margin-right: 24px;
  padding-bottom: 14px;
}
.app-brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, oklch(0.55 0.16 280), oklch(0.65 0.16 200));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: white;
}
.app-brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.app-tab {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mute);
  padding: 10px 18px 14px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  position: relative;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.app-tab:hover { color: var(--text); }
.app-tab.is-active {
  color: var(--text);
  border-bottom-color: oklch(0.74 0.13 240);
}
.app-tab-count {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-mute);
  font-weight: 600;
}
.app-tab.is-active .app-tab-count {
  background: oklch(0.38 0.10 240 / 0.3);
  color: oklch(0.85 0.10 240);
}
.app-tabs-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px;
}
.app-date-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.app-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.app-content > * { height: 100%; }

/* ─────────────────────────────────────────────────────────────
   Weekend Sign-up page
   ───────────────────────────────────────────────────────────── */

.ws-root {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ws-header {
  display: flex;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 24px;
}
.ws-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.ws-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ws-month-nav {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}
.ws-month-btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  border: 0;
  color: var(--text-mute);
  padding: 6px 12px;
  min-width: 36px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.ws-month-btn:hover { color: var(--text); background: var(--surface-2); }
.ws-month-today { font-size: 12px; padding: 6px 14px; }

.ws-stats {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.ws-stat {
  text-align: right;
}
.ws-stat-num {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
  color: var(--text);
}
.ws-stat-filled { color: var(--green); }
.ws-stat-total { color: var(--text-mute); font-size: 18px; }
.ws-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-top: 4px;
  font-weight: 600;
}
.ws-saved-pill {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.2s;
}
.ws-saved-pill.is-flashing {
  border-color: oklch(0.74 0.14 152 / 0.5);
  color: var(--green);
}
.ws-saved-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
}

.ws-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}
.ws-weekends {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding-right: 6px;
  padding-bottom: 24px;
}
.ws-weekends::-webkit-scrollbar { width: 8px; }
.ws-weekends::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; }

.ws-weekend-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.ws-weekend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.ws-weekend-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  font-weight: 700;
  font-family: var(--font-mono);
}
.ws-weekend-dates {
  display: flex;
  gap: 14px;
}
.ws-date-block {
  display: flex; align-items: baseline; gap: 6px;
}
.ws-date-dow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: oklch(0.74 0.13 240);
}
.ws-date-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.ws-table {
  padding: 8px 14px 14px;
}
.ws-table-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-soft);
}
.ws-table-row:last-child { border-bottom: 0; }
.ws-table-head {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  font-weight: 700;
  font-family: var(--font-mono);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.ws-team-cell {
  display: flex; flex-direction: column; gap: 2px;
}
.ws-team-name {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.ws-team-desc {
  font-size: 10px;
  color: var(--text-mute);
}

.ws-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.ws-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 30px 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.ws-select:hover { border-color: oklch(0.74 0.13 240 / 0.5); }
.ws-select:focus {
  outline: none;
  border-color: oklch(0.74 0.13 240);
  box-shadow: 0 0 0 3px oklch(0.74 0.13 240 / 0.18);
}
.ws-select-caret {
  position: absolute;
  right: 12px;
  pointer-events: none;
  color: var(--text-mute);
  font-size: 10px;
}
.ws-select-wrap.is-filled .ws-select {
  background: var(--green-bg);
  border-color: oklch(0.74 0.14 152 / 0.4);
  color: var(--text);
  font-weight: 600;
}
.ws-select-wrap.is-filled .ws-select-caret { color: var(--green); }
.ws-select-wrap.is-empty .ws-select { color: var(--text-faint); }

/* Sidebar */
.ws-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.ws-side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.ws-side-card h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}
.ws-empty {
  font-size: 12px;
  color: var(--text-faint);
  font-style: italic;
}
.ws-signup-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.ws-signup-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface-2);
}
.ws-signup-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}
.ws-signup-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-bg);
  padding: 2px 8px;
  border-radius: 999px;
}

.ws-help {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.6;
  padding-left: 18px;
  margin: 0;
}
.ws-help li { margin-bottom: 6px; }
.ws-help li::marker { color: var(--text-faint); font-family: var(--font-mono); }


/* ─────────────────────────────────────────────────────────────
   Data Source — badge + drawer
   ───────────────────────────────────────────────────────────── */

.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-mute);
  cursor: pointer;
  transition: all 0.15s;
}
.ds-badge:hover { color: var(--text); border-color: var(--surface-3); }
.ds-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
}
.ds-badge-gear {
  font-size: 10px;
  opacity: 0.6;
  margin-left: 2px;
}
.ds-badge.is-mock .ds-badge-dot { background: var(--text-faint); }
.ds-badge.is-live {
  color: var(--green);
  border-color: oklch(0.74 0.14 152 / 0.35);
  background: var(--green-bg);
}
.ds-badge.is-live .ds-badge-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px oklch(0.74 0.14 152 / 0.2);
  animation: pulse 2s ease-in-out infinite;
}
.ds-badge.is-loading {
  color: var(--amber);
  border-color: oklch(0.82 0.14 80 / 0.35);
}
.ds-badge.is-loading .ds-badge-dot { background: var(--amber); }
.ds-badge.is-error {
  color: var(--red);
  border-color: oklch(0.72 0.16 25 / 0.35);
  background: var(--red-bg);
}
.ds-badge.is-error .ds-badge-dot { background: var(--red); }

/* Drawer scrim + container */
.ds-scrim {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 50;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.ds-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 520px;
  max-width: 92vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 51;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 40px rgba(0,0,0,0.4);
  animation: slideIn 0.22s ease;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.ds-drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}
.ds-drawer-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}
.ds-drawer-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.ds-close {
  margin-left: auto;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.ds-close:hover { color: var(--text); background: var(--surface-2); }

.ds-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ds-section h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  font-weight: 700;
  font-family: var(--font-mono);
  margin: 0 0 12px;
}
.ds-help {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.5;
  margin: 0 0 12px;
}
.ds-help code, .ds-status code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text);
}

.ds-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ds-mode-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.ds-mode-card:hover { border-color: var(--surface-3); }
.ds-mode-card.is-active {
  border-color: oklch(0.74 0.13 240);
  background: oklch(0.38 0.10 240 / 0.18);
}
.ds-mode-card input {
  accent-color: oklch(0.74 0.13 240);
  margin-top: 2px;
}
.ds-mode-card-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}
.ds-mode-card-desc {
  font-size: 11px;
  color: var(--text-mute);
  line-height: 1.4;
}

.ds-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.ds-field span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mute);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ds-field span em {
  font-style: normal;
  font-weight: 500;
  opacity: 0.7;
  text-transform: none;
  letter-spacing: 0;
}
.ds-field input {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  transition: all 0.15s;
}
.ds-field input:focus {
  outline: none;
  border-color: oklch(0.74 0.13 240);
  box-shadow: 0 0 0 3px oklch(0.74 0.13 240 / 0.2);
}

.ds-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.ds-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid var(--border);
}
.ds-btn-ghost { background: var(--surface-2); color: var(--text); }
.ds-btn-ghost:hover { background: var(--surface-3); }
.ds-btn-primary {
  background: oklch(0.55 0.16 240);
  color: white;
  border-color: oklch(0.55 0.16 240);
}
.ds-btn-primary:hover { background: oklch(0.6 0.16 240); }
.ds-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ds-test {
  font-size: 12px;
  font-family: var(--font-mono);
}
.ds-test-ok { color: var(--green); }
.ds-test-error { color: var(--red); }
.ds-test-loading { color: var(--amber); }

.ds-code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0;
  white-space: pre;
  overflow-x: auto;
  color: var(--text);
  line-height: 1.5;
  max-height: 280px;
  overflow-y: auto;
}

.ds-status {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ds-status-row { font-size: 13px; }
.ds-status-row strong { color: var(--text); font-family: var(--font-mono); }
.ds-status-meta { color: var(--text-mute); font-size: 11px; }
.ds-status-error { color: var(--red); font-size: 12px; }
.ds-status-loading { color: var(--amber); font-size: 12px; }
.ds-status-refresh { align-self: flex-start; margin-top: 4px; }

.ds-drawer-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
}


/* ─── Light theme override ─── */
[data-theme="light"] {
  --bg:        #f4f6f9;
  --surface:   #ffffff;
  --surface-2: #f1f4f8;
  --surface-3: #e4e9ef;
  --border:    #d6dde6;
  --border-soft:#e6ebf1;
  --text:      #1a1f29;
  --text-mute: #5f6772;
  --text-faint:#94a0ad;
  --green-bg: oklch(0.88 0.10 152 / 0.55);
  --red-bg:   oklch(0.88 0.10 25  / 0.55);
  --amber-bg: oklch(0.90 0.12 80  / 0.55);
  --blue-bg:  oklch(0.88 0.10 240 / 0.55);
  --violet-bg:oklch(0.88 0.10 290 / 0.55);
}
[data-theme="light"] body { background: #f4f6f9; color: #1a1f29; }
[data-theme="light"] .mc-person-on-shift {
  background: linear-gradient(90deg, oklch(0.85 0.12 152 / 0.45) 0%, oklch(0.95 0.06 152 / 0.2) 60%, var(--surface) 100%);
}
[data-theme="light"] .mc-person-off {
  background: linear-gradient(90deg, oklch(0.85 0.12 25 / 0.40) 0%, oklch(0.95 0.06 25 / 0.18) 60%, var(--surface) 100%);
}
[data-theme="light"] .mc-person-off .mc-person-name { color: oklch(0.50 0.18 25); }
[data-theme="light"] .ds-scrim { background: rgba(20, 25, 35, 0.45); }
[data-theme="light"] .ds-drawer { box-shadow: -20px 0 40px rgba(0,0,0,0.15); }
[data-theme="light"] .ws-select-wrap.is-filled .ws-select { color: oklch(0.40 0.15 152); }
[data-theme="light"] .mc-avatar-working,
[data-theme="light"] .mc-avatar-on { color: oklch(0.42 0.15 152); }
[data-theme="light"] .mc-avatar-off { color: oklch(0.45 0.18 25); }
[data-theme="light"] .mc-avatar-lead { color: oklch(0.48 0.16 80); }
[data-theme="light"] .mc-avatar-weekend { color: oklch(0.42 0.15 240); }
[data-theme="light"] .mc-stat-num { color: oklch(0.45 0.16 152); }
[data-theme="light"] .mc-stat-off .mc-stat-num { color: oklch(0.48 0.18 25); }
[data-theme="light"] .mc-stat-total .mc-stat-num { color: var(--text); }
[data-theme="light"] .ws-stat-filled { color: oklch(0.45 0.16 152); }
[data-theme="light"] .ws-saved-pill.is-flashing { color: oklch(0.42 0.16 152); }
[data-theme="light"] .ws-date-dow { color: oklch(0.45 0.15 240); }
[data-theme="light"] .cb-side-date { color: oklch(0.48 0.16 80); }
[data-theme="light"] .ds-badge.is-live { color: oklch(0.42 0.15 152); }
[data-theme="light"] .mc-tag-on { color: oklch(0.40 0.16 152); }
[data-theme="light"] .mc-tag-off { color: oklch(0.45 0.18 25); }
[data-theme="light"] .mc-tag-lead { color: oklch(0.45 0.16 80); }
[data-theme="light"] .mc-tag-weekend { color: oklch(0.42 0.15 240); }
[data-theme="light"] .mc-pill-off { color: oklch(0.45 0.18 25); }
[data-theme="light"] .ws-signup-count { color: oklch(0.42 0.15 240); }
[data-theme="light"] .ds-code { color: #1a1f29; }
[data-theme="light"] .app-brand-mark { color: white; }

/* ─── Theme toggle ─── */
.theme-toggle {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-mute);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.theme-toggle:hover { color: var(--text); background: var(--surface-2); transform: scale(1.05); }

/* ─── Away Today — 2-column ─── */
.mc-away-list.is-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  overflow-y: visible;
}
.mc-away-list.is-two-col li {
  padding: 7px 9px;
  gap: 9px;
}
.mc-away-list.is-two-col .mc-away-name { font-size: 12px; }
.mc-away-list.is-two-col .mc-away-meta { font-size: 10px; }
.mc-away-list.is-two-col .mc-avatar { width: 24px; height: 24px; font-size: 11px; }
.mc-away-list.is-two-col .mc-pill { font-size: 9px; padding: 2px 6px; }


/* ─── Admin Console ─── */
.adm-root {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.adm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  gap: 24px;
}
.adm-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.adm-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.adm-stat-row { display: flex; gap: 10px; }
.adm-stat {
  text-align: right;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 68px;
}
.adm-stat-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.adm-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 4px;
  font-family: var(--font-mono);
}
.adm-stat-red .adm-stat-num    { color: var(--red); }
.adm-stat-amber .adm-stat-num  { color: var(--amber); }
.adm-stat-muted .adm-stat-num  { color: var(--text-mute); }

.adm-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.adm-search {
  flex: 1;
  max-width: 380px;
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}
.adm-search::placeholder { color: var(--text-faint); }
.adm-search:focus {
  outline: none;
  border-color: oklch(0.74 0.13 240);
  box-shadow: 0 0 0 3px oklch(0.74 0.13 240 / 0.18);
}
.adm-team-filter {
  display: flex; gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.adm-team-filter button {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--text-mute);
  border-radius: 7px;
  cursor: pointer;
}
.adm-team-filter button:hover { color: var(--text); }
.adm-team-filter button.is-active { background: var(--surface-3); color: var(--text); }
.adm-toolbar-actions { margin-left: auto; display: flex; gap: 8px; }
.adm-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
}
.adm-btn-ghost { background: var(--surface); color: var(--text); }
.adm-btn-ghost:hover { background: var(--surface-2); border-color: var(--surface-3); }
.adm-btn-primary {
  background: oklch(0.55 0.16 240);
  color: white;
  border-color: oklch(0.55 0.16 240);
}
.adm-btn-primary:hover { background: oklch(0.6 0.16 240); }

.adm-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.adm-table thead {
  position: sticky; top: 0;
  background: var(--surface-2);
  z-index: 2;
}
.adm-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.adm-th-name { padding-left: 18px !important; min-width: 180px; }
.adm-th-actions { width: 40px; }
.adm-table tbody tr { border-bottom: 1px solid var(--border-soft); }
.adm-table tbody tr:hover { background: var(--surface-2); }
.adm-table td { padding: 6px 8px; vertical-align: middle; }
.adm-td-name { padding-left: 18px !important; }
.adm-td-actions { padding-right: 14px !important; text-align: right; }

.adm-input {
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  width: 100%;
  min-width: 100px;
}
select.adm-input { padding-right: 24px; }
.adm-input:hover { border-color: var(--border-soft); background: var(--bg); }
.adm-input:focus {
  outline: none;
  border-color: oklch(0.74 0.13 240);
  background: var(--bg);
  box-shadow: 0 0 0 2px oklch(0.74 0.13 240 / 0.15);
}
.adm-input-mono { font-family: var(--font-mono); font-size: 12px; }
.adm-input-name { font-weight: 600; }
.adm-input-sm { font-size: 11px; padding: 4px 8px; margin-top: 4px; }
select.adm-input { cursor: pointer; background: transparent; }
select.adm-status-off { color: var(--red); background: var(--red-bg); font-weight: 600; }
select.adm-status-working { color: var(--green); }

.adm-shift-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  width: fit-content;
}
.adm-shift-toggle button {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: var(--text-mute);
  border-radius: 4px;
  cursor: pointer;
}
.adm-shift-toggle button:hover { color: var(--text); }
.adm-shift-toggle button.is-active.is-on  { background: var(--green-bg); color: var(--green); }
.adm-shift-toggle button.is-active.is-off { background: var(--surface-3); color: var(--text-mute); }

.adm-row-del {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 12px;
}
.adm-row-del:hover {
  color: var(--red);
  background: var(--red-bg);
  border-color: oklch(0.72 0.16 25 / 0.3);
}
.adm-empty {
  padding: 60px 20px !important;
  text-align: center;
  color: var(--text-faint);
  font-style: italic;
}
.adm-footer {
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.adm-footer-note {
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}


/* Native <select> dropdown options — fix unreadable inheritance */
.ws-select option,
.adm-input option {
  background-color: var(--surface);
  color: var(--text);
  font-weight: 500;
}
.ws-select option:disabled,
.ws-select option[value=""] {
  color: var(--text-faint);
}
/* Light theme — explicit so OS doesn't pick its own */
[data-theme="light"] .ws-select option,
[data-theme="light"] .adm-input option {
  background-color: #ffffff;
  color: #1a1f29;
}
/* Make the closed select always readable regardless of state */
.ws-select { color: var(--text); }
.ws-select-wrap.is-empty .ws-select { color: var(--text-mute); }


/* ─── Login screen ─── */
.login-root {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at top left, oklch(0.38 0.10 240 / 0.18), transparent 50%),
    radial-gradient(ellipse at bottom right, oklch(0.38 0.10 290 / 0.16), transparent 50%),
    var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 32px 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
[data-theme="light"] .login-card {
  box-shadow: 0 24px 60px rgba(20,25,35,0.10), 0 2px 6px rgba(20,25,35,0.05);
}
.login-brand {
  display: flex; align-items: center; gap: 14px;
}
.login-brand-mark {
  width: 44px; height: 44px;
  border-radius: 10px;
  font-size: 14px;
}
.login-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: var(--text-mute);
  margin-bottom: 4px;
}
.login-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.login-desc {
  font-size: 13px;
  color: var(--text-mute);
  margin: 0;
  line-height: 1.5;
}
.login-field {
  display: flex; flex-direction: column; gap: 6px;
}
.login-field span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-family: var(--font-mono);
}
.login-field input {
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  transition: all 0.15s;
}
[data-theme="light"] .login-field input { background: var(--surface-2); }
.login-field input::placeholder { color: var(--text-faint); }
.login-field input:focus {
  outline: none;
  border-color: oklch(0.74 0.13 240);
  box-shadow: 0 0 0 3px oklch(0.74 0.13 240 / 0.2);
}
.login-error {
  font-size: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid oklch(0.72 0.16 25 / 0.35);
  font-weight: 600;
}
.login-btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid oklch(0.55 0.16 240);
  background: oklch(0.55 0.16 240);
  color: white;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 4px;
}
.login-btn:hover:not(:disabled) {
  background: oklch(0.62 0.16 240);
  border-color: oklch(0.62 0.16 240);
}
.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.login-hint {
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  text-align: center;
  line-height: 1.5;
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}
.login-hint code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text);
}

/* Sign-out button */
.adm-signout {
  font-size: 11px !important;
  padding: 6px 12px !important;
}


/* ─── Admin sub-section tabs ─── */
.adm-section-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  margin-top: 10px;
  width: fit-content;
}
.adm-section-tabs button {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border: 0;
  background: transparent;
  color: var(--text-mute);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.adm-section-tabs button:hover { color: var(--text); }
.adm-section-tabs button.is-active { background: var(--surface-3); color: var(--text); }

/* ─── Weekend Hours panel ─── */
.adm-wh-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 16px;
  line-height: 1.6;
}
.adm-wh-info strong { color: var(--text); }
.adm-wh-info code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text);
}
.adm-wh-groups {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-right: 4px;
  padding-bottom: 16px;
}
.adm-wh-group { }
.adm-wh-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.adm-wh-region {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin: 0;
}
.adm-wh-region-apac  { color: oklch(0.74 0.14 152); }
.adm-wh-region-emea  { color: oklch(0.74 0.13 240); }
.adm-wh-region-latam { color: oklch(0.74 0.13 290); }
.adm-wh-region-l2    { color: oklch(0.82 0.14 80); }
.adm-wh-count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-mute);
}
.adm-wh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 10px;
}
.adm-wh-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.adm-wh-card-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.adm-wh-name {
  font-size: 13px;
  font-weight: 700;
}
.adm-wh-meta {
  font-size: 10px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.adm-wh-fields {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.adm-wh-fields label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adm-wh-fields label span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-family: var(--font-mono);
}
.adm-wh-fields .adm-input {
  background: var(--bg);
  border-color: var(--border);
  padding: 7px 10px;
}
.adm-wh-fields input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
  cursor: pointer;
}
[data-theme="light"] .adm-wh-fields input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none;
}
.adm-wh-sep {
  padding-bottom: 8px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.adm-wh-mini {
  position: relative;
  margin-top: 2px;
}
.adm-wh-mini-track {
  position: relative;
  height: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  overflow: hidden;
}
.adm-wh-mini-bar {
  position: absolute;
  top: 0; bottom: 0;
  background: var(--blue-bg);
  border-left: 2px solid var(--blue);
}
.adm-wh-bar-apac  { background: oklch(0.40 0.10 152 / 0.5); border-color: var(--green); }
.adm-wh-bar-emea  { background: oklch(0.40 0.10 240 / 0.5); border-color: var(--blue); }
.adm-wh-bar-latam { background: oklch(0.40 0.10 290 / 0.5); border-color: var(--violet); }
.adm-wh-bar-l2    { background: oklch(0.40 0.10 80  / 0.5); border-color: var(--amber); }
[data-theme="light"] .adm-wh-bar-apac  { background: oklch(0.80 0.12 152 / 0.6); }
[data-theme="light"] .adm-wh-bar-emea  { background: oklch(0.80 0.12 240 / 0.55); }
[data-theme="light"] .adm-wh-bar-latam { background: oklch(0.80 0.12 290 / 0.55); }
[data-theme="light"] .adm-wh-bar-l2    { background: oklch(0.85 0.12 80  / 0.6); }

.adm-wh-mini-axis {
  position: relative;
  height: 14px;
  margin-top: 2px;
}
.adm-wh-mini-axis span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-faint);
}

/* ─── Weekend Schedule — coverage timeline ─── */
.ws-coverage {
  border-top: 1px solid var(--border);
  padding: 16px 20px 18px;
  background: var(--bg);
}
.ws-coverage-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}
.ws-coverage-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-mute);
}
.ws-coverage-sub {
  font-size: 10px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.ws-coverage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ws-tl { display: flex; flex-direction: column; gap: 4px; }
.ws-tl-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-mute);
  margin-bottom: 4px;
}
.ws-tl-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ws-tl-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 8px;
  height: 24px;
}
.ws-tl-row-label {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text);
  letter-spacing: 0.04em;
}
.ws-tl-track {
  position: relative;
  height: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  overflow: hidden;
}
.ws-tl-bar {
  position: absolute;
  top: 0; bottom: 0;
  border-left: 2px solid var(--text);
  display: flex;
  align-items: center;
  padding: 0 6px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
}
.ws-tl-bar-name {
  text-overflow: ellipsis;
  overflow: hidden;
}
.ws-tl-bar-apac  { background: oklch(0.40 0.10 152 / 0.55); border-color: var(--green); color: var(--green); }
.ws-tl-bar-emea  { background: oklch(0.40 0.10 240 / 0.55); border-color: var(--blue);  color: var(--blue); }
.ws-tl-bar-latam { background: oklch(0.40 0.10 290 / 0.55); border-color: var(--violet); color: var(--violet); }
.ws-tl-bar-l2    { background: oklch(0.40 0.10 80  / 0.55); border-color: var(--amber); color: var(--amber); }
[data-theme="light"] .ws-tl-bar-apac  { background: oklch(0.80 0.12 152 / 0.65); color: oklch(0.40 0.16 152); }
[data-theme="light"] .ws-tl-bar-emea  { background: oklch(0.80 0.12 240 / 0.60); color: oklch(0.40 0.15 240); }
[data-theme="light"] .ws-tl-bar-latam { background: oklch(0.80 0.12 290 / 0.60); color: oklch(0.42 0.15 290); }
[data-theme="light"] .ws-tl-bar-l2    { background: oklch(0.85 0.14 80  / 0.65); color: oklch(0.45 0.16 80); }

.ws-tl-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-faint);
  font-style: italic;
  font-family: var(--font-mono);
}

.ws-tl-axis {
  position: relative;
  height: 14px;
  margin-top: 6px;
  margin-left: 56px;
}
.ws-tl-axis span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-faint);
}


/* ─── Lead generator buttons ─── */
.mc-lead-scope-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.mc-lead-spin {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-mute);
  width: 24px; height: 24px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
  padding: 0;
}
.mc-lead-spin:hover {
  background: var(--amber-bg);
  border-color: oklch(0.82 0.14 80 / 0.4);
  transform: rotate(15deg) scale(1.05);
}
.mc-lead-generate {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  background: var(--amber-bg);
  border: 1px dashed oklch(0.82 0.14 80 / 0.5);
  color: var(--amber);
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: all 0.15s;
}
.mc-lead-generate:hover {
  background: oklch(0.40 0.10 80 / 0.32);
  border-style: solid;
}
.mc-lead-row.is-flashing {
  animation: leadFlash 0.6s ease;
}
@keyframes leadFlash {
  0%   { background: oklch(0.82 0.14 80 / 0.3); transform: scale(1); }
  50%  { background: oklch(0.82 0.14 80 / 0.5); transform: scale(1.03); }
  100% { background: var(--surface-2); transform: scale(1); }
}
.mc-lead-warn {
  margin-left: 6px;
  font-size: 12px;
  color: var(--amber);
  cursor: help;
}

/* ─── Monthly Schedule ─── */
.ms-root {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ms-header {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 16px;
}
.ms-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}
.ms-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }

.ms-month-nav {
  display: flex; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}
.ms-nav-btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  border: 0;
  color: var(--text-mute);
  padding: 6px 12px;
  min-width: 36px;
  border-radius: 7px;
  cursor: pointer;
}
.ms-nav-btn:hover { color: var(--text); background: var(--surface-2); }
.ms-nav-today { font-size: 12px; padding: 6px 14px; }

.ms-team-filter {
  display: flex; gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.ms-team-filter button {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border: 0;
  background: transparent;
  color: var(--text-mute);
  border-radius: 7px;
  cursor: pointer;
}
.ms-team-filter button:hover { color: var(--text); }
.ms-team-filter button.is-active { background: var(--surface-3); color: var(--text); }

.ms-status { margin-left: auto; }
.ms-status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.ms-status-pill .ms-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
}
.ms-status-mock { color: var(--text-mute); }
.ms-status-live { color: var(--green); border-color: oklch(0.74 0.14 152 / 0.35); background: var(--green-bg); }
.ms-status-live .ms-status-dot { background: var(--green); animation: pulse 2s ease-in-out infinite; }
.ms-status-loading { color: var(--amber); }
.ms-status-err { color: var(--red); }

.ms-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 11px;
  color: var(--text-mute);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.ms-leg-item { display: flex; align-items: center; gap: 6px; }
.ms-leg-sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--border); }
.ms-leg-meta { margin-left: auto; font-family: var(--font-mono); color: var(--text-faint); }

.ms-grid-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ms-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
}
.ms-grid-corner {
  position: sticky; top: 0; left: 0;
  z-index: 5;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 10px 14px;
}
.ms-corner-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-mute);
}
.ms-corner-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.ms-day-header {
  position: sticky; top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(var(--days), 1fr);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.ms-day-h {
  text-align: center;
  padding: 6px 0;
  border-right: 1px solid var(--border-soft);
}
.ms-day-h.is-weekend { background: var(--bg); }
.ms-day-h.is-today {
  background: oklch(0.38 0.10 240 / 0.25);
  color: var(--blue);
  font-weight: 700;
}
.ms-day-h-dow {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.ms-day-h-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

.ms-group-head {
  grid-column: 1 / 2;
  background: var(--surface-2);
  padding: 8px 14px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-mute);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky; left: 0;
  z-index: 2;
}
.ms-group-spacer {
  grid-column: 2 / 3;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border-soft);
}
.ms-group-count {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-mute);
}

.ms-person {
  position: sticky; left: 0;
  z-index: 1;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--border-soft);
  border-right: 1px solid var(--border);
}
.ms-person-avatar { width: 24px; height: 24px; font-size: 11px; }
.ms-person-info { min-width: 0; flex: 1; }
.ms-person-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-person-meta { font-size: 10px; color: var(--text-mute); font-family: var(--font-mono); margin-top: 1px; }

.ms-row {
  display: grid;
  grid-template-columns: repeat(var(--days), 1fr);
  border-bottom: 1px solid var(--border-soft);
}
.ms-cell {
  position: relative;
  height: 36px;
  border-right: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
}
.ms-cell.is-today {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
  z-index: 1;
}
.ms-cell-working { background: oklch(0.40 0.08 152 / 0.18); }
[data-theme="light"] .ms-cell-working { background: oklch(0.88 0.10 152 / 0.5); }
.ms-cell-off {
  background: oklch(0.40 0.10 25 / 0.40);
  color: var(--red);
}
[data-theme="light"] .ms-cell-off { background: oklch(0.80 0.12 25 / 0.5); color: oklch(0.45 0.18 25); }
.ms-cell-weekend { background: var(--surface-3); }
.ms-cell-tag { letter-spacing: 0.04em; }
.ms-cell:hover { filter: brightness(1.15); }
[data-theme="light"] .ms-cell:hover { filter: brightness(0.95); }


/* ─── Admin · Daily Call Leaders panel ─── */
.adm-leaders-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.adm-leaders-date {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adm-leaders-date span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-family: var(--font-mono);
}
.adm-leaders-date input[type="date"] {
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
}
[data-theme="dark"] .adm-leaders-date input[type="date"]::-webkit-calendar-picker-indicator,
:root:not([data-theme="light"]) .adm-leaders-date input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
}
.adm-leaders-nav {
  display: flex;
  gap: 6px;
}

.adm-leaders-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.adm-leader-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: box-shadow 0.2s;
}
.adm-leader-card.is-flashing {
  box-shadow: 0 0 0 2px oklch(0.82 0.14 80 / 0.5);
  animation: leadFlash 0.6s ease;
}
.adm-leader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.adm-leader-scope {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.adm-leader-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
}
.adm-leader-clear {
  width: 24px; height: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 11px;
}
.adm-leader-clear:hover {
  color: var(--red);
  background: var(--red-bg);
  border-color: oklch(0.72 0.16 25 / 0.3);
}

.adm-leader-current {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--amber-bg);
  border: 1px solid oklch(0.82 0.14 80 / 0.35);
  border-radius: var(--radius-sm);
  min-height: 56px;
}
.adm-leader-avatar { width: 32px !important; height: 32px !important; font-size: 14px !important; }
.adm-leader-name {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
}
.adm-leader-warn {
  font-size: 11px;
  font-weight: 500;
  color: var(--amber);
  margin-top: 2px;
}
.adm-leader-empty {
  color: var(--text-faint);
  font-style: italic;
  font-size: 13px;
}

.adm-leader-actions {
  display: flex;
  gap: 8px;
}
.adm-leader-pick {
  flex-shrink: 0;
}
.adm-leader-actions .adm-input {
  flex: 1;
  background: var(--surface-2);
  border-color: var(--border);
  padding: 7px 10px;
}

.adm-leader-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}
.adm-leader-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.adm-leader-stats strong {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--text);
}
.adm-leader-stats span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-family: var(--font-mono);
}

.adm-leader-details {
  font-size: 12px;
}
.adm-leader-details summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  padding: 4px 0;
}
.adm-leader-details summary:hover { color: var(--text); }
.adm-leader-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 8px;
}
.adm-leader-chip {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
}

/* History strip */
.adm-leader-history {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.adm-leader-history h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  font-weight: 700;
  font-family: var(--font-mono);
  margin: 0 0 12px;
}
.adm-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.adm-history-day {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adm-history-day.is-active {
  border-color: oklch(0.74 0.13 240);
  box-shadow: 0 0 0 2px oklch(0.74 0.13 240 / 0.2);
}
.adm-history-date {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.adm-history-date:hover { color: oklch(0.74 0.13 240); }
.adm-history-cell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.adm-history-scope {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}
.adm-history-name {
  font-weight: 600;
  color: var(--text);
}
.adm-history-name.is-empty {
  color: var(--text-faint);
  font-style: italic;
  font-weight: 400;
}


.mc-lead-unassigned {
  color: var(--text-faint) !important;
  font-style: italic;
  font-weight: 500;
}


/* ─── Backend sync status badge ─── */
.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-mute);
}
.sync-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
}
.sync-badge-off { color: var(--text-faint); }
.sync-badge-off .sync-dot { background: var(--text-faint); }
.sync-badge-loading { color: var(--amber); border-color: oklch(0.82 0.14 80 / 0.35); }
.sync-badge-loading .sync-dot { background: var(--amber); animation: pulse 1.5s ease-in-out infinite; }
.sync-badge-live { color: var(--green); border-color: oklch(0.74 0.14 152 / 0.35); background: var(--green-bg); }
.sync-badge-live .sync-dot { background: var(--green); animation: pulse 2s ease-in-out infinite; }
.sync-badge-err { color: var(--red); border-color: oklch(0.72 0.16 25 / 0.35); background: var(--red-bg); }
.sync-badge-err .sync-dot { background: var(--red); }
