/**
 * Notifi 2.0 — Capacity & Scheduling Simulator Design System
 *
 * Shared reusable classes for all simulator views (`company-and-bu.js`,
 * `territories.js`, `technicians.js`, `job-types.js`, `capacity-simulator.js`):
 *
 * Page shell & headers:
 *   .page-shell, .page-header, .page-header-left, .page-breadcrumb, .page-title,
 *   .page-subtitle, .page-actions, .page-body, .page-content
 *
 * Notifi SchedulingSurface & cards:
 *   .surface / .card / .panel          — white rounded-xl card (#dededb border)
 *   .surface-header / .card-header     — 43px header bar with 11px uppercase title
 *   .surface-title / .eyebrow          — 11px bold uppercase 0.08em #666668
 *   .surface-meta                      — right-side header metadata
 *   .surface-body / .card-body         — padded content region (16px 18px)
 *   .surface-footer / .card-footer     — subtle #f4f4f2 footer strip
 *
 * Layout utilities:
 *   .split-layout, .split-sidebar, .split-main, .grid-2, .grid-3, .stack, .row, .row-between
 *
 * Controls & buttons:
 *   .btn, .btn-primary, .btn-secondary, .btn-outline, .btn-ghost, .btn-danger,
 *   .btn-sm, .btn-xs, .btn-icon, .segmented, .seg-btn
 *   .input, .select, .textarea, .field, .field-label, .field-hint, .switch
 *
 * Badges, chips, banners & capacity visuals:
 *   .badge, .badge-dark, .badge-neutral, .badge-success, .badge-warning, .badge-danger,
 *   .badge-info, .badge-inherit, .badge-assigned
 *   .chip, .chip-remove, .skill-pill
 *   .callout, .callout-info, .callout-success, .callout-warning, .callout-danger
 *   .progress-track, .progress-fill (.is-green | .is-amber | .is-red)
 *   .drawer-backdrop, .drawer, .modal-backdrop, .modal
 *   window.showSimToast(message, tone) — 'default' | 'success' | 'warning' | 'error'
 */

:root {
  --font-sans: 'Geist Variable', 'Geist', 'Inter', -apple-system, BlinkMacSystemFont,
    'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Geist Mono Variable', 'Geist Mono', 'SF Mono', ui-monospace, SFMono-Regular,
    Menlo, Monaco, Consolas, monospace;

  /* Core Notifi 2.0 Light Tokens */
  --canvas: #f4f4f1;
  --surface: #ffffff;
  --surface-subtle: #f8f8f6;
  --surface-muted: #f1f1ee;
  --ink: #171719;
  --ink-secondary: #3d3d42;
  --muted: #666668;
  --muted-light: #8a8a8e;
  --border: #e4e4df;
  --surface-border: #dededb;
  --border-strong: #cfcfc8;
  --hover: #f8f8f6;
  --nav-hover: #f0f0ed;

  --primary: #171719;
  --primary-hover: #2b2b2f;
  --primary-fg: #ffffff;

  /* Semantic Status Signals (Notifi 2.0 Scheduling & Capacity palette) */
  --accent-blue: #398aff;
  --accent-blue-ink: #0f52ba;
  --accent-blue-bg: rgba(57, 138, 255, 0.14);
  --accent-blue-border: rgba(57, 138, 255, 0.34);

  --success: #176f4e;
  --success-solid: #16805a;
  --success-bg: rgba(22, 128, 90, 0.12);
  --success-surface: #edf6f2;
  --success-border: #b5dccb;

  --warning: #8a5311;
  --warning-solid: #d97706;
  --warning-bg: #fcf2de;
  --warning-border: #ebd09c;

  --danger: #9e2a25;
  --danger-solid: #c9342b;
  --danger-bg: #fbeae8;
  --danger-border: #e7b5b0;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;

  --shadow-xs: 0 1px 2px rgba(16, 16, 20, 0.04);
  --shadow-sm: 0 2px 6px rgba(16, 16, 20, 0.06);
  --shadow-md: 0 8px 24px rgba(16, 16, 20, 0.1);
  --shadow-lg: 0 18px 42px rgba(16, 16, 20, 0.16);

  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2352525b' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ─── App Shell & Left Navigation Rail (Notifi SidebarNav.tsx) ──────────── */

.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--canvas);
}

.sidebar {
  width: 256px;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  user-select: none;
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 11px;
  border-bottom: 1px solid var(--border);
}

.tenant-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 4px 7px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  transition: background-color 120ms ease, border-color 120ms ease;
  text-align: left;
  cursor: pointer;
}

.tenant-pill:hover {
  background: var(--hover);
  border-color: var(--border);
}

.tenant-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--primary);
  color: var(--primary-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.tenant-meta {
  min-width: 0;
  flex: 1;
}

.tenant-name-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.tenant-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tenant-sim-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--muted);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.tenant-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-group-label {
  padding: 4px 10px 1px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: var(--muted-light);
}

.sidebar-group-label:first-child {
  padding-top: 1px;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 3.5px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(23, 23, 25, 0.78);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.nav-row:hover {
  background: var(--nav-hover);
  color: var(--ink);
}

.nav-row.is-active {
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 500;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.88;
}

.nav-row.is-active .nav-icon {
  opacity: 1;
}

.nav-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.22;
}

.nav-step-hint {
  font-size: 10px;
  color: var(--muted-light);
  line-height: 1.18;
  margin-top: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-row.is-active .nav-step-hint {
  color: rgba(255, 255, 255, 0.68);
}

.nav-badge {
  margin-left: auto;
  height: 17px;
  min-width: 20px;
  padding: 0 5.5px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink-secondary);
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-badge.is-zero {
  color: var(--muted-light);
  background: #f6f6f4;
}

.nav-row.is-active .nav-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 6px;
}

.sidebar-footer {
  padding: 4px 8px 5px;
  border-top: 1px solid var(--border);
  background: #fafaf8;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 55vh;
  overflow-y: auto;
}

.sidebar-footer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0 2px 1px;
}

.sidebar-footer-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sidebar-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.sidebar-refresh-btn:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}

.sidebar-refresh-btn svg {
  width: 11px;
  height: 11px;
}

.sidebar-sync-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--success);
}

.sidebar-sync-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success-solid);
}

.sidebar-preset-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5px;
}

.sidebar-saved-configs {
  display: flex;
  flex-direction: column;
  gap: 1.5px;
}

.sidebar-saved-list {
  display: flex;
  flex-direction: column;
  gap: 1.5px;
}

.sidebar-saved-row {
  display: flex;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
}

.sidebar-saved-row .sidebar-saved-load-btn {
  flex: 1;
  min-width: 0;
}

.sidebar-saved-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  min-height: 20px;
  padding: 0;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.sidebar-saved-icon-btn svg {
  width: 11px;
  height: 11px;
}

.sidebar-saved-icon-btn:hover {
  background: var(--hover);
  border-color: var(--border-strong);
  color: var(--ink);
}

.sidebar-saved-icon-btn.is-delete:hover {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.sidebar-preset-btn.is-save-config {
  background: #f5f8ff;
  border-color: #cbdcf9;
  color: #14366e;
  font-weight: 600;
}

.sidebar-preset-btn.is-save-config:hover {
  background: #ebf2ff;
  border-color: #a6c4f7;
}

.sidebar-preset-btn.is-save-config svg {
  color: #2563eb;
}

.sidebar-preset-pill.is-saved-meta {
  background: #eef2f7;
  color: #334155;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-preset-divider {
  height: 1px;
  background: #e7e7e2;
  margin: 1px 1px;
}

.sidebar-preset-btn {
  display: flex;
  align-items: center;
  gap: 4.5px;
  width: 100%;
  min-height: 20px;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
  text-align: left;
  white-space: nowrap;
}

.sidebar-preset-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-preset-btn:hover {
  background: var(--hover);
  border-color: var(--border-strong);
}

.sidebar-preset-btn svg {
  width: 12.5px;
  height: 12.5px;
  color: var(--muted);
  flex-shrink: 0;
}

.sidebar-preset-btn.is-brian {
  background: #f7f9fe;
  border-color: #d4e2fc;
  color: #183b75;
}

.sidebar-preset-btn.is-brian:hover {
  background: #eef4fe;
  border-color: #adc8f9;
}

.sidebar-preset-btn.is-brian svg {
  color: #2563eb;
}

.sidebar-preset-btn.is-active-preset {
  background: #eef4ff;
  border-color: #7eaaf6;
  color: #102a56;
  font-weight: 600;
  box-shadow: inset 2.5px 0 0 #2563eb;
}

.sidebar-preset-btn.is-active-preset svg {
  color: #2563eb;
}

.sidebar-preset-pill {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 4.5px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.sidebar-preset-btn.is-danger-soft {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
  font-weight: 600;
}

.sidebar-preset-btn.is-danger-soft:hover {
  background: #f8dedb;
  border-color: #dc9a93;
}

.sidebar-preset-btn.is-danger-soft svg {
  color: var(--danger-solid);
}

.sidebar-preset-btn.is-disabled,
.sidebar-preset-btn:disabled {
  background: var(--surface-subtle);
  border-color: var(--border);
  color: var(--muted-light);
  cursor: not-allowed;
  opacity: 0.65;
}

.sidebar-preset-btn.is-disabled:hover,
.sidebar-preset-btn:disabled:hover {
  background: var(--surface-subtle);
  border-color: var(--border);
}

.sidebar-preset-btn.is-disabled svg,
.sidebar-preset-btn:disabled svg {
  color: var(--muted-light);
}

.sidebar-preset-pill.is-danger {
  background: rgba(201, 52, 43, 0.14);
  color: var(--danger);
}

.sidebar-preset-pill.is-muted {
  background: var(--surface-muted);
  color: var(--muted-light);
}

.sidebar-preset-pill.is-adaptive {
  background: var(--success-bg);
  color: var(--success);
}

.sidebar-preset-pill.is-all-skills {
  background: #ede9fe;
  color: #5b21b6;
}

/* ─── Workspace Shell & Sticky Page Header (SettingsPageHeader.tsx) ─────── */

.workspace-shell {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  overflow: hidden;
}

.main-container {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding: 20px 26px 36px;
  outline: none;
}

.page-shell {
  margin: -20px -26px -36px;
  min-height: calc(100% + 56px);
  display: flex;
  flex-direction: column;
  background: var(--canvas);
}

.page-header {
  position: sticky;
  top: -20px;
  z-index: 15;
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}

.page-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.page-crumb-root {
  font-size: 12px;
  color: #737373;
  font-weight: 500;
}

.page-crumb-sep {
  color: #a8a8a8;
  font-size: 13px;
}

.page-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.page-subtitle,
.page-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #737373;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.page-body,
.page-content {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 20px 24px 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── Notifi SchedulingSurface & Card Primitives ────────────────────────── */

.surface,
.card,
.panel,
.sim-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  color: var(--ink);
  overflow: hidden;
}

.surface-header,
.card-header,
.panel-header {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface);
}

.surface-title,
.card-title,
.panel-title,
.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666668;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.surface-meta,
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.surface-body,
.card-body,
.panel-body {
  padding: 16px 18px;
}

.surface-footer,
.card-footer,
.panel-footer {
  border-top: 1px solid var(--surface-border);
  background: rgba(241, 241, 239, 0.55);
  padding: 11px 18px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Overview Two-Column Grid inside a Single Surface (SchedulingSettingsOverview) */
.surface-split-overview {
  display: grid;
  grid-template-columns: 500px minmax(0, 1fr);
}

.surface-split-overview > .surface-col-left {
  min-width: 0;
  border-right: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
}

.surface-split-overview > .surface-col-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1240px) {
  .surface-split-overview {
    grid-template-columns: 1fr;
  }
  .surface-split-overview > .surface-col-left {
    border-right: 0;
    border-bottom: 1px solid var(--surface-border);
  }
}

/* ─── Layout Utilities for All Views ────────────────────────────────────── */

.split-layout,
.two-col {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.split-layout-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 1040px) {
  .split-layout,
  .two-col,
  .split-layout-wide {
    grid-template-columns: 1fr;
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 920px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.divide-y > * + * {
  border-top: 1px solid var(--surface-border);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.text-xs {
  font-size: 11.5px;
}

.text-sm {
  font-size: 12.5px;
}

/* ─── WeeklyHoursVisualization (Exact Notifi SchedulingDesign.tsx) ──────── */

.whv-wrap {
  padding: 14px 18px 16px;
}

.whv-header-row {
  display: flex;
  align-items: flex-end;
}

.whv-axis-spacer {
  width: 40px;
  flex-shrink: 0;
}

.whv-days-head {
  flex: 1;
  display: flex;
  gap: 6px;
}

.whv-day-label-btn {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 2px 2px 5px;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius-xs);
}

.whv-day-label-btn:hover {
  background: var(--hover);
}

.whv-day-name {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
}

.whv-day-range {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: #737373;
  font-variant-numeric: tabular-nums;
}

.whv-chart-row {
  margin-top: 4px;
  display: flex;
}

.whv-axis {
  position: relative;
  width: 40px;
  height: 176px;
  flex-shrink: 0;
  font-size: 10px;
  color: #8a8a8a;
  font-variant-numeric: tabular-nums;
}

.whv-axis span {
  position: absolute;
  right: 8px;
}

.whv-axis .ax-0 {
  top: -5px;
}
.whv-axis .ax-1 {
  top: 33.333%;
  transform: translateY(-50%);
}
.whv-axis .ax-2 {
  top: 66.666%;
  transform: translateY(-50%);
}
.whv-axis .ax-3 {
  bottom: -5px;
}

.whv-columns {
  flex: 1;
  height: 176px;
  display: flex;
  gap: 6px;
}

.whv-col {
  position: relative;
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  background: repeating-linear-gradient(
      45deg,
      rgba(102, 102, 102, 0.1) 0 4px,
      transparent 4px 8px
    ),
    #f7f7f7;
  transition: box-shadow 120ms ease;
}

.whv-col:hover {
  box-shadow: inset 0 0 0 1px #c6c6c0;
}

.whv-col.is-selected {
  box-shadow: 0 0 0 2px var(--accent-blue);
}

.whv-band {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 5px;
  border-left: 2.5px solid var(--ink);
  background: rgba(20, 20, 22, 0.12);
  pointer-events: none;
}

.whv-meal-gap {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed #c89c52;
  border-bottom: 1px dashed #c89c52;
  border-left: 2.5px solid #d97706;
  background: repeating-linear-gradient(
    -45deg,
    rgba(217, 119, 6, 0.15) 0 3px,
    rgba(255, 251, 235, 0.92) 3px 6px
  );
  pointer-events: none;
}

.whv-legend-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 46px;
  padding: 8px 18px;
  border-top: 1px solid var(--surface-border);
  font-size: 11.5px;
  color: var(--muted);
}

.whv-swatch-open {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border-left: 2px solid var(--ink);
  background: rgba(20, 20, 22, 0.12);
}

.whv-swatch-meal {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border-left: 2px solid #d97706;
  border-top: 1px dashed #c89c52;
  border-bottom: 1px dashed #c89c52;
  background: rgba(217, 119, 6, 0.16);
}

.whv-swatch-closed {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: repeating-linear-gradient(45deg, #d6d6d6 0 2px, #ffffff 2px 4px);
  border: 1px solid #dededb;
}

/* Company Meal Break Strip inside When We Work Surface */
.meal-config-strip {
  border-top: 1px solid var(--surface-border);
  background: #fafaf8;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.meal-config-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}

.meal-config-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meal-config-strip input[type='time'] {
  width: 108px;
  min-width: 0;
  padding: 0 5px;
  font-size: 11.5px;
}

.job-buffer-strip {
  background: #f7f8fa;
}

.job-buffer-strip .job-buffer-input {
  width: 68px;
  min-width: 0;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.job-buffer-input-wrap {
  gap: 6px;
}

/* Blackout / Closure 12-Month Timeline (SchedulingSettingsOverview.tsx) */
.blackout-timeline-track {
  position: relative;
  display: flex;
  height: 26px;
  overflow: hidden;
  border-radius: 6px;
  background: #f3f3f1;
  border: 1px solid #e7e7e2;
}

.blackout-month-cell {
  flex: 1;
  border-right: 1px solid #ffffff;
}

.blackout-month-cell:last-child {
  border-right: 0;
}

.blackout-tick {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--ink);
}

.blackout-months-labels {
  margin-top: 4px;
  display: flex;
}

.blackout-months-labels span {
  flex: 1;
  text-align: center;
  font-size: 9.5px;
  font-weight: 600;
  color: #949494;
}

/* ─── Weekday Inline Schedule Editor Rows ───────────────────────────────── */

.hours-editor-list {
  display: flex;
  flex-direction: column;
}

.hours-editor-row {
  display: grid;
  grid-template-columns: 82px 74px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid var(--surface-border);
  transition: background-color 120ms ease;
}

.hours-editor-row:first-child {
  border-top: 0;
}

.hours-editor-row:hover {
  background: var(--hover);
}

.hours-editor-row.is-highlighted {
  background: rgba(57, 138, 255, 0.06);
}

.hours-day-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.hours-editor-row.is-closed .hours-day-title {
  color: var(--muted);
}

.hours-time-pair {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.hours-editor-row input[type='time'],
.window-row input[type='time'],
#add-window-form input[type='time'] {
  width: 108px;
  min-width: 0;
  padding: 0 5px;
  font-size: 11.5px;
}

.hours-closed-pill {
  font-size: 12px;
  color: var(--muted-light);
  font-style: italic;
}

.hours-duration-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 38px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .hours-editor-row {
    grid-template-columns: 1fr auto;
  }
}

/* ─── Buttons & Segmented Controls ──────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 33px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease,
    opacity 120ms ease;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-secondary,
.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover:not(:disabled),
.btn-outline:hover:not(:disabled) {
  background: var(--hover);
  border-color: #b8b8b0;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--nav-hover);
  color: var(--ink);
}

.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.btn-danger-solid {
  background: var(--danger-solid);
  color: #ffffff;
  border-color: var(--danger-solid);
}

.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.btn-xs {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 5px;
}

.btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
}

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  gap: 2px;
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.seg-btn:hover {
  color: var(--ink);
}

.seg-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* ─── Inputs, Selects, Checkboxes & Switches ────────────────────────────── */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.field-hint {
  font-size: 11.5px;
  color: var(--muted);
}

.input,
.select,
.textarea,
input[type='text'],
input[type='search'],
input[type='number'],
input[type='date'],
input[type='time'],
select,
textarea {
  height: 33px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #d5d5cf;
  background-color: var(--surface);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

select:not([multiple]):not([size]),
.select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-color: var(--surface);
  background-image: var(--select-chevron) !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 12px 12px !important;
  padding-right: 30px !important;
  text-overflow: ellipsis;
  cursor: pointer;
}

select:not([multiple]):not([size]):disabled,
.select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

textarea,
.textarea {
  height: auto;
  min-height: 68px;
  padding: 8px 10px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus,
input[type='text']:focus,
input[type='search']:focus,
input[type='number']:focus,
input[type='date']:focus,
input[type='time']:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(23, 23, 25, 0.08);
}

.input-sm,
input.input-sm {
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.select-sm,
select.select-sm,
select.input-sm {
  height: 28px;
  padding: 0 26px 0 8px !important;
  background-position: right 8px center !important;
  font-size: 12px;
}

select.ntf-tech-bu-move-select,
.ntf-tech-bu-move-select {
  padding-right: 20px !important;
  background-position: right 6px center !important;
  background-size: 10px 10px !important;
}

select.cs-clock-select,
.cs-clock-select {
  padding-right: 28px !important;
  background-position: right 9px center !important;
}

input[type='time'] {
  padding: 0 7px;
  font-variant-numeric: tabular-nums;
}

input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--ink);
  cursor: pointer;
}

/* Notifi Toggle Switch */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 34px;
  height: 19px;
  padding: 2px;
  border-radius: 999px;
  border: 0;
  background: #d4d4ce;
  cursor: pointer;
  transition: background-color 140ms ease;
  flex-shrink: 0;
}

.switch[aria-checked='true'],
.switch.is-on {
  background: var(--primary);
}

.switch-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: translateX(0);
  transition: transform 140ms ease;
  pointer-events: none;
}

.switch[aria-checked='true'] .switch-thumb,
.switch.is-on .switch-thumb {
  transform: translateX(15px);
}

/* ─── Badges, Chips & Territory Inheritance Pills ───────────────────────── */

.badge,
.pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-neutral {
  background: var(--surface-muted);
  color: var(--ink-secondary);
  border-color: var(--border);
}

.badge-dark {
  background: var(--primary);
  color: var(--primary-fg);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

.badge-info,
.badge-inherit {
  background: var(--accent-blue-bg);
  color: var(--accent-blue-ink);
  border-color: var(--accent-blue-border);
}

.badge-assigned {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  font-size: 12px;
  color: var(--ink);
}

.chip-sub {
  color: var(--muted);
  font-size: 11px;
}

.chip-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  border-radius: 3px;
}

.chip-remove:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

/* ─── Callout / Info Banners ────────────────────────────────────────────── */

.callout,
.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-secondary);
}

.callout svg,
.banner svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout-info {
  background: #f3f7ff;
  border-color: #cdddf9;
  color: #193b7a;
}

.callout-success {
  background: var(--success-surface);
  border-color: var(--success-border);
  color: var(--success);
}

.callout-warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning);
}

.callout-danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

/* ─── Capacity Progress Bars & Table Helpers ────────────────────────────── */

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #ecece7;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--success-solid);
  transition: width 180ms ease, background-color 180ms ease;
}

.progress-fill.is-green {
  background: var(--success-solid);
}

.progress-fill.is-amber {
  background: var(--warning-solid);
}

.progress-fill.is-red {
  background: var(--danger-solid);
}

.empty-state {
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-state-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.empty-state-desc {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 440px;
  margin: 0;
}

/* ─── Slide-Over Drawer & Modal Backdrop ────────────────────────────────── */

.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 15, 18, 0.36);
  backdrop-filter: blur(1px);
  display: flex;
  justify-content: flex-end;
}

.modal-backdrop {
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.drawer {
  width: min(480px, 100vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Business Units View Specific Cards (Clean Compact Design) ─────────── */

.bu-slim-add-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 8px 0 12px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
}

.bu-slim-add-input {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 0;
  background: transparent;
  padding: 0 4px;
  font-size: 13px;
  color: var(--ink);
  outline: none;
}

.bu-slim-add-input::placeholder {
  color: var(--muted-light);
}

.bu-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  overflow: visible;
  transition: border-color 120ms ease, opacity 120ms ease;
}

.bu-card.has-open-popover {
  z-index: 30;
  border-color: var(--border-strong);
}

.bu-card.is-archived {
  opacity: 0.72;
  background: #fafaf8;
}

.bu-clean-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 6px 16px;
  border-bottom: 1px solid #eeeeea;
}

.bu-clean-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}

.bu-title-input {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  margin-left: -6px;
  height: 27px;
  min-width: 64px;
  max-width: 420px;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.bu-title-input:hover {
  border-color: var(--border);
  background: var(--hover);
}

.bu-title-input:focus {
  border-color: var(--ink);
  background: var(--surface);
  outline: none;
}

.bu-status-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--success);
  white-space: nowrap;
}

.bu-status-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--success-solid);
  flex-shrink: 0;
}

.bu-status-inline.is-archived {
  color: var(--warning);
}

.bu-status-inline.is-archived .bu-status-dot {
  background: var(--warning-solid);
}

.bu-quiet-summary {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bu-quiet-summary::before {
  content: '·';
  margin-right: 8px;
  color: var(--border-strong);
}

.bu-clean-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.bu-delete-quiet {
  color: var(--muted);
}

.bu-delete-quiet:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

.bu-clean-body {
  display: flex;
  flex-direction: column;
}

.bu-clean-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6.5px 16px;
  min-height: 38px;
}

.bu-clean-row + .bu-clean-row {
  border-top: 1px solid #f1f1ed;
}

.bu-clean-row-label {
  width: 120px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 26px;
}

.bu-clean-row-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.bu-compact-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--surface-border);
  background: var(--surface-subtle);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.bu-compact-pill.is-scoped {
  background: var(--surface);
  border-color: #d6d6d0;
  padding-right: 4px;
}

.bu-compact-pill.is-all-territories {
  background: #f5f7fb;
  border-color: #d6e2f5;
  color: #1e3a6d;
}

.bu-use-all-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  height: 26px;
  padding: 0 6px;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.bu-use-all-btn:hover {
  color: var(--ink);
  background: var(--hover);
}

.bu-compact-pill.is-quiet {
  background: #f7f7f5;
  border-color: #e6e6e1;
  color: var(--ink-secondary);
}

.bu-compact-pill-meta {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
}

.bu-compact-pill-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: #eaeae5;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 1px;
}

.bu-compact-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 1px;
  transition: background-color 100ms ease, color 100ms ease;
}

.bu-compact-pill-remove:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.bu-add-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.bu-add-pill-btn:hover,
.bu-add-pill-btn.is-open {
  border-style: solid;
  border-color: var(--ink);
  background: var(--hover);
  color: var(--ink);
}

.bu-mini-segmented {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 2px;
  border-radius: 6px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  gap: 1px;
}

.bu-mini-seg-btn {
  height: 20px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 100ms ease, color 100ms ease;
}

.bu-mini-seg-btn:hover {
  color: var(--ink);
}

.bu-mini-seg-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.bu-win-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.bu-win-pill input[type='checkbox'] {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--ink);
}

.bu-win-pill:hover {
  background: var(--hover);
  border-color: var(--border-strong);
  color: var(--ink);
}

.bu-win-pill.is-checked {
  background: #f3f7ff;
  border-color: #9dc0f8;
  color: #102a56;
}

.bu-popover-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.bu-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 264px;
  z-index: 55;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bu-popover.is-dropup {
  top: auto;
  bottom: calc(100% + 6px);
}

.bu-popover.is-align-right {
  left: auto;
  right: 0;
}

.bu-popover.is-window-pop {
  width: 288px;
}

.bu-pop-row-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 6.5px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color 100ms ease;
}

.bu-pop-row-btn:hover {
  background: var(--hover);
}

.bu-pop-row-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  flex-shrink: 0;
  white-space: nowrap;
}

.bu-pop-row-tag.is-added {
  color: var(--success);
}

.bu-pop-clear-row {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 5.5px 9px;
  border: 0;
  border-top: 1px solid #f1f1ed;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.bu-pop-clear-row:hover {
  background: var(--hover);
  color: var(--ink);
}

.bu-pop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--surface-border);
  background: #fafaf8;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.bu-pop-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 20px;
  height: 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bu-pop-close:hover {
  background: var(--hover);
  color: var(--ink);
}

.bu-pop-list {
  display: flex;
  flex-direction: column;
  padding: 4px;
  max-height: 220px;
  overflow-y: auto;
  gap: 2px;
}

.bu-pop-empty {
  padding: 12px 10px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.bu-pop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
}

.bu-pop-item:hover {
  background: var(--hover);
}

.bu-pop-item-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bu-pop-item-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bu-pop-item-sub {
  font-size: 11px;
  color: var(--muted);
}

.bu-pop-action-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.bu-pop-action {
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  transition: background-color 100ms ease, color 100ms ease, border-color 100ms ease;
}

.bu-pop-action.is-assign {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.bu-pop-action.is-assign:hover {
  background: var(--primary-hover);
}

.bu-pop-action.is-assigned {
  background: var(--success-surface);
  border-color: var(--success-border);
  color: var(--success);
}

.bu-pop-action.is-assigned:hover {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.bu-pop-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  white-space: nowrap;
}

.bu-pop-link {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.bu-pop-link:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  background: var(--hover);
}

.bu-pop-footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 8px;
  border-top: 1px solid var(--surface-border);
  background: #fafaf8;
}

.bu-pop-create-btn {
  width: 100%;
  justify-content: flex-start;
  font-size: 11.5px;
  height: 27px;
  padding: 0 9px;
}

.bu-pop-win-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.bu-pop-win-times {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bu-pop-win-times input[type='time'] {
  flex: 1;
  min-width: 0;
  padding: 0 6px;
  font-size: 12px;
}

/* Arrival Window Editor Row */
.window-row {
  display: grid;
  grid-template-columns: minmax(105px, 1fr) auto auto 28px;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-top: 1px solid var(--surface-border);
}

.window-row:first-child {
  border-top: 0;
}

.win-default-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.win-default-toggle:hover {
  background: var(--hover);
  color: var(--ink);
}

.win-default-toggle.is-default {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

/* ─── Toast Notifications ───────────────────────────────────────────────── */

.toast-container {
  position: fixed;
  left: calc(256px + (100vw - 256px) / 2);
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.toast {
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: simToastIn 160ms ease-out;
}

.toast.is-success {
  background: #145a40;
}

.toast.is-warning {
  background: #7c4a0e;
}

.toast.is-error {
  background: #962722;
}

@keyframes simToastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Extended Hours, Meal Badges & Customer Booking Form Primitives ────── */

.badge-extended {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
}

.badge-meal {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}

.weekday-pill-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.weekday-pill {
  height: 26px;
  min-width: 34px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.weekday-pill:hover {
  background: var(--hover);
  color: var(--ink);
}

.weekday-pill.is-active {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

.booking-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 8px;
}

.booking-service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.booking-service-card:hover {
  background: var(--hover);
  border-color: var(--border-strong);
}

.booking-service-card.is-selected {
  border-color: var(--ink);
  background: #f5f7fb;
  box-shadow: 0 0 0 1px var(--ink);
}

.booking-date-strip {
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.booking-date-pill {
  min-width: 68px;
  padding: 7px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.booking-date-pill:hover:not(:disabled) {
  background: var(--hover);
  border-color: var(--border-strong);
}

.booking-date-pill.is-selected {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

.booking-slot-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.booking-slot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.booking-slot-card:hover:not(:disabled) {
  background: var(--hover);
  border-color: var(--border-strong);
}

.booking-slot-card.is-selected {
  border-color: var(--ink);
  background: #f5f7fb;
  box-shadow: 0 0 0 1px var(--ink);
}

.booking-slot-card:disabled,
.booking-slot-card.is-unavailable {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f9f9f7;
}

/* ─── Priority Tier Window Floors & Rules Card (Company Settings) ───────── */

.tier-pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5.5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.tier-pill-badge.is-p1 {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.tier-pill-badge.is-p2 {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.tier-pill-badge.is-p3 {
  background: #f4f4f2;
  color: #4b5563;
  border-color: #dcdcd6;
}

.tier-rules-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--surface-border);
  flex-wrap: wrap;
}

.tier-rules-header.is-collapsed {
  border-bottom: 0;
}

.tier-rules-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tier-rules-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tier-rules-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tier-rules-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-right: 10px;
  border-right: 1px solid var(--surface-border);
}

.tier-switch-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.tier-switch-label.is-active {
  color: var(--ink);
}

.tier-rules-paused-banner {
  padding: 7px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--surface-border);
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.tier-rules-collapsed-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: #fafaf8;
  border-top: 1px solid var(--surface-border);
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.tier-rules-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.tier-rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.tier-rules-table th {
  padding: 8px 12px;
  background: #fafaf8;
  border-bottom: 1px solid var(--surface-border);
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}

.tier-rules-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--surface-border);
  vertical-align: middle;
}

.tier-rules-table tbody tr:last-child td {
  border-bottom: 0;
}

.tier-rules-table tbody tr:hover {
  background: var(--hover);
}

.tier-rules-surface.is-rules-off .tier-rules-table tbody {
  opacity: 0.78;
}

.tier-win-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 150px;
}

.tier-win-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 12.5px;
}

.tier-win-range {
  font-size: 11px;
  color: var(--muted);
}

.tier-pct-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tier-pct-input {
  width: 62px;
  min-width: 0;
  height: 28px;
  padding: 0 6px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
}

.tier-pct-unit {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.tier-release-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tier-release-time {
  width: 104px;
  min-width: 0;
  height: 28px;
  padding: 0 6px;
  font-size: 11.5px;
}

.tier-release-select {
  width: auto;
  min-width: 148px;
  height: 28px;
  padding: 0 26px 0 8px !important;
  background-position: right 8px center !important;
  font-size: 11.5px;
}

.tier-rules-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid var(--surface-border);
  background: #fafaf8;
  flex-wrap: wrap;
}

.tier-lead-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tier-lead-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.tier-lead-items {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tier-lead-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  font-size: 11.5px;
}

.tier-lead-input {
  width: 48px;
  min-width: 0;
  height: 24px;
  padding: 0 5px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.tier-sim-clock-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted);
}

/* ─── Save Shared Config Modal (Workspace Data) ─────────────────────────── */

.save-config-modal {
  width: min(460px, 100%);
}

.save-config-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--surface-border);
}

.save-config-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.save-config-modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.save-config-summary-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.save-config-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  cursor: pointer;
}

.save-config-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  background: #fafaf8;
  border-top: 1px solid var(--surface-border);
  flex-wrap: wrap;
}

/* ─── Docs & Agent Guide View (#docs) ───────────────────────────────────── */

.docs-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.docs-page-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.docs-readiness-card {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.docs-readiness-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.docs-readiness-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.docs-readiness-hint {
  font-size: 12px;
  color: var(--ink-secondary);
}

.docs-readiness-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.docs-ready-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.docs-ready-pill:hover {
  background: var(--hover);
  border-color: var(--border-strong);
}

.docs-ready-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--muted-light);
  flex-shrink: 0;
}

.docs-ready-pill.is-ready {
  background: var(--success-surface);
  border-color: var(--success-border);
  color: var(--success);
}

.docs-ready-pill.is-ready .docs-ready-dot {
  background: var(--success-solid);
}

.docs-ready-pill.is-missing {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning);
}

.docs-ready-pill.is-missing .docs-ready-dot {
  background: var(--warning-solid);
}

.docs-ready-pill.is-optional {
  background: var(--surface-subtle);
  color: var(--ink-secondary);
}

.docs-ready-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
}

.docs-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

@media (max-width: 1120px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.docs-toc {
  position: sticky;
  top: 52px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 1120px) {
  .docs-toc {
    position: static;
  }
}

.docs-toc-header {
  padding: 2px 8px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.docs-toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-toc-btn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-secondary);
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.docs-toc-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.docs-toc-btn.is-active {
  background: #f1f5ff;
  color: #14366e;
}

.docs-toc-num {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--surface-muted);
  color: var(--ink-secondary);
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.docs-toc-btn.is-active .docs-toc-num {
  background: #2563eb;
  color: #ffffff;
}

.docs-toc-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.docs-toc-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-toc-sub {
  font-size: 10.5px;
  color: var(--muted-light);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-toc-footer {
  border-top: 1px solid var(--border);
  padding: 6px 8px 2px;
}

.docs-raw-link {
  font-size: 11.5px;
  color: var(--accent-blue-ink);
  text-decoration: none;
  font-weight: 500;
}

.docs-raw-link:hover {
  text-decoration: underline;
}

.docs-main-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.docs-card {
  min-width: 0;
  scroll-margin-top: 68px;
}

.docs-sec-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex-wrap: wrap;
}

.docs-sec-step {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--muted);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.docs-sec-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.docs-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.docs-lead {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.docs-card code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 1px 4.5px;
  border-radius: 4px;
  background: #f3f3ef;
  border: 1px solid #e3e3dc;
  color: #1f2937;
}

.docs-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 900px) {
  .docs-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.docs-rule-box {
  padding: 11px 13px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-border);
  background: #fafaf8;
  min-width: 0;
}

.docs-rule-box p {
  margin: 5px 0 0;
  font-size: 12.3px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.docs-rule-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.docs-formula-box {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid #d4e2fc;
  background: #f7faff;
  min-width: 0;
}

.docs-formula-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 600;
  color: #14366e;
  margin-bottom: 6px;
}

.docs-tier-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.docs-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.3px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.docs-subhead {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.docs-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.2px;
}

.docs-table th {
  padding: 8px 11px;
  background: #fafaf8;
  border-bottom: 1px solid var(--surface-border);
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}

.docs-table td {
  padding: 8px 11px;
  border-bottom: 1px solid var(--surface-border);
  vertical-align: top;
  line-height: 1.45;
  color: var(--ink-secondary);
}

.docs-table tbody tr:last-child td {
  border-bottom: 0;
}

.docs-inline-route {
  border: 1px solid #cbdcf9;
  background: #f3f7ff;
  color: #1d4ed8;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.docs-inline-route:hover {
  background: #e6efff;
}

.docs-code-wrap {
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #17171b;
  min-width: 0;
}

.docs-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  background: #f6f6f3;
  border-bottom: 1px solid var(--surface-border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  flex-wrap: wrap;
}

.docs-code-pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: #f4f4f6;
  background: #17171b;
}

.docs-code-pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.docs-code-scroll {
  max-height: 320px;
  overflow-y: auto;
}

.docs-raw-pre {
  margin: 0;
  padding: 16px 18px;
  max-height: calc(100vh - 230px);
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink);
  background: #fbfbf9;
  white-space: pre-wrap;
  word-break: break-word;
}


