  /* ── TOAST NOTIFICATIONS ─────────────────── */
  #toast-container {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none;
  }
  .toast {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 18px; border-radius: 12px; min-width: 280px; max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18); font-size: 13px; font-weight: 600;
    color: white; pointer-events: all;
    animation: toast-in .25s ease forwards;
  }
  .toast.removing { animation: toast-out .25s ease forwards; }
  .toast.success { background: #065F46; }
  .toast.error   { background: #991B1B; }
  .toast.warning { background: #92400E; }
  .toast.info    { background: var(--blue); }
  .toast-icon  { font-size: 16px; flex-shrink: 0; }
  .toast-close { margin-left: auto; background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer; font-size: 16px; padding: 0 0 0 8px; line-height: 1; }
  .toast-close:hover { color: white; }
  @keyframes toast-in  { from { opacity:0; transform: translateX(40px); } to { opacity:1; transform: translateX(0); } }
  @keyframes toast-out { from { opacity:1; transform: translateX(0); } to { opacity:0; transform: translateX(40px); } }

  /* ── MODAL — IMPROVED ──────────────────────── */
  .modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2500; /* was 500 — buried behind full-screen overlays (client window @600) that open it */
    display: flex; align-items: center; justify-content: center;
    animation: fade-in .15s ease;
  }
  .modal-backdrop.hidden { display: none; }
  @keyframes fade-in { from { opacity:0; } to { opacity:1; } }

  /* ── KPI CARDS ──────────────────────────── */
  .kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-bottom: 24px; }
  .kpi-card {
    background: white; border-radius: 14px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.07);
    border-left: 4px solid var(--blue);
  }
  .kpi-card.green { border-color: var(--green); }
  .kpi-card.orange { border-color: var(--orange); }
  .kpi-card.purple { border-color: var(--purple); }
  .kpi-card.teal { border-color: var(--teal); }
  .kpi-card.red { border-color: var(--red); }
  .kpi-card.yellow { border-color: var(--yellow); }
  .kpi-label { font-size: 11px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
  .kpi-value { font-size: 30px; font-weight: 800; color: var(--gray-800); line-height: 1; margin-bottom: 6px; }
  .kpi-delta { font-size: 12px; }
  .kpi-delta.up { color: var(--green); }
  .kpi-delta.down { color: var(--red); }

  /* ── CHARTS ──────────────────────────────── */
  .charts-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
  .chart-card { background: white; border-radius: 14px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
  .chart-title { font-size: 14px; font-weight: 700; color: var(--gray-700); margin-bottom: 16px; }
  .bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; }
  .bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .bar-wrap { display: flex; gap: 3px; align-items: flex-end; width: 100%; justify-content: center; height: 120px; }
  .bar {
    flex: 1; max-width: 18px; border-radius: 4px 4px 0 0;
    background: var(--blue); transition: opacity .2s;
  }
  .bar:hover { opacity: .7; }
  .bar.alt { background: var(--teal); }
  .bar-label { font-size: 10px; color: var(--gray-400); }

  .donut-wrap { position: relative; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
  .donut-center { position: absolute; text-align: center; }
  .donut-center .big { font-size: 22px; font-weight: 800; color: var(--gray-800); }
  .donut-center .small { font-size: 10px; color: var(--gray-400); }
  .legend { display: flex; flex-direction: column; gap: 6px; }
  .legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
  .legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

  /* ── TABLE ──────────────────────────────── */
  .table-card { background: white; border-radius: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.07); overflow: hidden; margin-bottom: 24px; }
  .table-header { padding: 16px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--gray-100); }
  .table-header h3 { font-size: 14px; font-weight: 700; flex: 1; }
  /* Full-size button — base for `btn btn-primary` etc. This class was never
     defined, so ~90 buttons across the app rendered half-styled until
     2026-07-07. Defined BEFORE .btn-sm on purpose: when combined
     (`btn btn-sm`), the small variant's padding/font/border win the cascade. */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 20px; border-radius: 10px; font-size: 13.5px; font-weight: 700;
    line-height: 1.2; cursor: pointer; transition: .15s;
    background: white; border: 1.5px solid var(--gray-200); color: var(--gray-700, #374151);
  }
  .btn-sm {
    padding: 6px 14px; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; transition: .15s;
  }
  .btn-primary { background: var(--blue); color: white; }
  .btn-primary:hover { background: var(--blue-dark); }
  .btn.btn-primary { border-color: transparent; }
  .btn-outline { background: white; color: var(--blue); border: 1.5px solid var(--blue); }
  .btn-outline:hover { background: var(--blue-light); }
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  thead th { background: var(--gray-50); padding: 10px 20px; text-align: left; font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px; }
  tbody td { padding: 12px 20px; border-top: 1px solid var(--gray-100); }
  tbody tr:hover { background: var(--gray-50); }
  .badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  }
  .badge-green { background: #D1FAE5; color: #065F46; }
  .badge-blue { background: #DBEAFE; color: #1E40AF; }
  .badge-orange { background: #FEF3C7; color: #92400E; }
  .badge-red { background: #FEE2E2; color: #991B1B; }
  .badge-purple { background: #EDE9FE; color: #5B21B6; }
  .badge-gray { background: var(--gray-100); color: var(--gray-600); }

  /* ── TABS ──────────────────────────────── */
  .tabs { display: flex; gap: 4px; background: var(--gray-100); padding: 4px; border-radius: 10px; margin-bottom: 20px; width: fit-content; }
  .tab { padding: 7px 16px; border-radius: 7px; font-size: 13px; font-weight: 500; cursor: pointer; transition: .15s; color: var(--gray-500); }
  .tab.active { background: white; color: var(--gray-800); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1); }

  /* ── SCHEDULE ──────────────────────────── */
  .schedule-grid { display: grid; grid-template-columns: 80px repeat(6, 1fr); border: 1px solid var(--gray-200); border-radius: 14px; overflow: hidden; background: white; }
  .sch-header { background: var(--gray-50); padding: 10px 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--gray-600); border-bottom: 1px solid var(--gray-200); border-right: 1px solid var(--gray-200); }
  .sch-time { padding: 8px; text-align: right; font-size: 11px; color: var(--gray-400); border-right: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-100); background: white; }
  .sch-cell { padding: 4px; border-right: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); min-height: 52px; }
  .sch-class {
    background: var(--blue-light); border-left: 3px solid var(--blue); border-radius: 4px;
    padding: 4px 6px; font-size: 11px; margin-bottom: 3px; cursor: pointer;
  }
  .sch-class:hover { background: #cfe0f9; }
  .sch-class .class-name { font-weight: 600; color: var(--blue); }
  .sch-class .class-info { color: var(--gray-500); font-size: 10px; }
  .sch-class.teal { background: #E0F7F7; border-color: var(--teal); }
  .sch-class.teal .class-name { color: var(--teal); }
  .sch-class.orange { background: #FFF0E8; border-color: var(--orange); }
  .sch-class.orange .class-name { color: var(--orange); }

  /* ── MEMBERSHIP ──────────────────────────── */
  .ms-report-card { background: white; border-radius: 14px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.07); margin-bottom: 16px; }
  .ms-report-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; cursor: pointer; }
  .ms-report-date { font-size: 14px; font-weight: 700; color: var(--gray-700); flex: 1; }
  .ms-report-location { font-size: 12px; color: var(--gray-400); }
  .ms-report-body { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .ms-stat { text-align: center; }
  .ms-stat-val { font-size: 22px; font-weight: 800; color: var(--blue); }
  .ms-stat-label { font-size: 11px; color: var(--gray-400); }

  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .form-group { display: flex; flex-direction: column; gap: 6px; }
  .form-group label { font-size: 12px; font-weight: 600; color: var(--gray-600); }
  .form-group input, .form-group select, .form-group textarea {
    padding: 9px 12px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-size: 13px; outline: none; transition: border-color .2s;
  }
  .form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--blue); }
  .form-group textarea { resize: vertical; min-height: 80px; }
  .form-full { grid-column: 1/-1; }

  /* ── ESCALATIONS ──────────────────────────── */
  .esc-card { background: white; border-radius: 14px; padding: 18px 20px; box-shadow: 0 1px 4px rgba(0,0,0,.07); margin-bottom: 12px; border-left: 4px solid var(--red); display: flex; align-items: flex-start; gap: 14px; }
  .esc-card.medium { border-color: var(--yellow); }
  .esc-card.low { border-color: var(--blue); }
  .esc-icon { font-size: 22px; margin-top: 2px; }
  .esc-body { flex: 1; }
  .esc-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
  .esc-meta { font-size: 12px; color: var(--gray-400); margin-bottom: 8px; }
  .esc-actions { display: flex; gap: 8px; }

  /* ── HR PIPELINE ──────────────────────────── */
  .pipeline-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .pipeline-col { background: var(--gray-100); border-radius: 12px; padding: 12px; }
  .pipeline-col-title { font-size: 12px; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
  .pipeline-count { background: var(--gray-300); color: var(--gray-700); font-size: 11px; padding: 1px 7px; border-radius: 10px; }
  .candidate-card { background: white; border-radius: 10px; padding: 12px; margin-bottom: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.07); cursor: pointer; transition: transform .15s; }
  .candidate-card:hover { transform: translateY(-2px); }
  .candidate-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
  .candidate-role { font-size: 11px; color: var(--gray-400); margin-bottom: 6px; }

  /* ── FINANCIALS ──────────────────────────── */
  .fin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
  .fin-card { background: white; border-radius: 14px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
  .fin-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--gray-700); }
  .fin-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px; }
  .fin-row:last-child { border-bottom: none; }
  .fin-total { font-weight: 700; font-size: 15px; color: var(--gray-800); }

  /* ── STUDENTS ──────────────────────────── */
  .students-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
  .student-card { background: white; border-radius: 14px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.07); display: flex; align-items: center; gap: 14px; cursor: pointer; transition: transform .15s; }
  .student-card:hover { transform: translateY(-2px); }
  .student-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: white; flex-shrink: 0; }
  .student-info { flex: 1; min-width: 0; }
  .student-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
  .student-level { font-size: 12px; color: var(--gray-400); margin-bottom: 4px; }

  /* ── REPORTS ──────────────────────────── */
  .report-row { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
  .report-btn { padding: 10px 18px; background: white; border: 1.5px solid var(--gray-200); border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: .15s; }
  .report-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }

  /* ── LINE CHART (SVG) ──────────────────── */
  .line-chart-wrap { overflow: visible; }

  /* ── MODAL ──────────────────────────────── */
  .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 2500; display: flex; align-items: center; justify-content: center; } /* 2500: must beat every page overlay (staff profile 600, panels up to 2000) — modals open FROM those */
  .modal-overlay.hidden { display: none; }
  .modal { background: white; border-radius: 16px; padding: 28px; width: 480px; max-width: 95vw; max-height: 85vh; overflow-y: auto; }
  .modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
  .modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

  /* ── MISC ──────────────────────────────── */
  .page-title { font-size: 22px; font-weight: 800; color: var(--gray-800); margin-bottom: 6px; }
  .page-sub { font-size: 13px; color: var(--gray-400); margin-bottom: 24px; }
  .section-title { font-size: 16px; font-weight: 700; color: var(--gray-700); margin-bottom: 14px; margin-top: 4px; }
  .empty-state { text-align: center; padding: 48px; color: var(--gray-400); font-size: 14px; }
  .empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
  .location-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--blue-light); color: var(--blue); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-right: 8px; margin-bottom: 8px; cursor: pointer; }
  .location-badge.active { background: var(--blue); color: white; }

  .search-bar { display: flex; align-items: center; gap: 8px; background: white; border: 1.5px solid var(--gray-200); border-radius: 10px; padding: 8px 14px; width: 280px; }
  .search-bar input { border: none; outline: none; font-size: 13px; flex: 1; }

  .alert-banner { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 12px; margin-bottom: 16px; font-size: 13px; }
  .alert-banner.warning { background: #FFF9C4; color: #92400E; border: 1px solid #FDE68A; }
  .alert-banner.success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
  .alert-banner.info { background: var(--blue-light); color: var(--blue); border: 1px solid #BFDBFE; }

  /* ── HEALTH SCORE ────────────────────────────────── */
  .health-scores-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
  .health-card {
    background: white; border-radius: 16px; padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07); display: flex; align-items: center; gap: 20px;
  }
  .health-ring {
    width: 80px; height: 80px; flex-shrink: 0; position: relative;
  }
  .health-ring svg { transform: rotate(-90deg); }
  .health-ring-label {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
  }
  .health-ring-score { font-size: 22px; font-weight: 900; line-height: 1; }
  .health-ring-of { font-size: 9px; color: var(--gray-400); font-weight: 600; }
  .health-info { flex: 1; min-width: 0; }
  .health-loc { font-size: 12px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 2px; }
  .health-status { font-size: 15px; font-weight: 800; color: var(--gray-800); margin-bottom: 6px; }
  .health-factors { display: flex; flex-direction: column; gap: 3px; }
  .health-factor { font-size: 11px; color: var(--gray-500); display: flex; align-items: center; gap: 5px; }
  .health-factor.bad { color: var(--red); font-weight: 600; }
  .health-factor.warn { color: var(--yellow); font-weight: 600; }
  .health-factor.good { color: var(--green); }

  /* ── URGENT FEED ──────────────────────────────────── */
  .urgent-feed { background: white; border-radius: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.07); margin-bottom: 20px; overflow: hidden; }
  .urgent-feed-header { padding: 14px 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--gray-100); }
  .urgent-feed-title { font-size: 14px; font-weight: 700; color: var(--gray-800); flex: 1; }
  .urgent-feed-count { background: var(--orange); color: white; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
  .urgent-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--gray-100); cursor: pointer; transition: background .12s; }
  .urgent-item:last-child { border-bottom: none; }
  .urgent-item:hover { background: var(--gray-50); }
  .urgent-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
  .urgent-dot.red { background: var(--red); }
  .urgent-dot.yellow { background: var(--yellow); }
  .urgent-dot.blue { background: var(--blue); }
  .urgent-dot.green { background: var(--green); }
  .urgent-body { flex: 1; min-width: 0; }
  .urgent-text { font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 2px; }
  .urgent-meta { font-size: 11px; color: var(--gray-400); }
  .urgent-chip { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; align-self: flex-start; margin-top: 2px; }
  .urgent-chip.red { background: #FEE2E2; color: #991B1B; }
  .urgent-chip.yellow { background: #FEF3C7; color: #92400E; }
  .urgent-chip.blue { background: #DBEAFE; color: #1E40AF; }
  .urgent-chip.green { background: #D1FAE5; color: #065F46; }

  /* ── REVENUE PROGRESS ─────────────────────────────── */
  .rev-progress-card { background: white; border-radius: 14px; padding: 20px 24px; box-shadow: 0 1px 4px rgba(0,0,0,.07); margin-bottom: 20px; }
  .rev-progress-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
  .rev-progress-title { font-size: 14px; font-weight: 700; color: var(--gray-700); }
  .rev-progress-pct { font-size: 22px; font-weight: 900; }
  .rev-bars { display: flex; flex-direction: column; gap: 10px; }
  .rev-bar-row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
  .rev-bar-label { width: 90px; font-weight: 600; color: var(--gray-600); flex-shrink: 0; }
  .rev-bar-track { flex: 1; height: 10px; background: var(--gray-200); border-radius: 5px; overflow: hidden; }
  .rev-bar-fill { height: 100%; border-radius: 5px; transition: width .5s ease; }
  .rev-bar-val { width: 80px; text-align: right; font-weight: 700; color: var(--gray-700); }

  /* ── SCHEDULER CONFLICT ───────────────────────────── */
  .shift-conflict { outline: 2px solid var(--red) !important; }
  .shift-ot-badge { position: absolute; top: -4px; right: -4px; background: var(--orange); color: white; font-size: 8px; font-weight: 800; padding: 1px 4px; border-radius: 4px; line-height: 1.4; }
  .sched-week-summary-item { background: white; border-radius: 10px; padding: 10px 14px; font-size: 12px; border: 1.5px solid var(--gray-200); display: flex; align-items: center; gap: 8px; }
  .sched-week-summary-item.ot { border-color: var(--orange); background: #FFF7ED; }
  .sched-week-summary-item.conflict { border-color: var(--red); background: #FEF2F2; }

  /* ── STAFF ASSISTANT ─────────────────────────────── */
  .sa-layout { display: grid; grid-template-columns: 1fr 240px; gap: 16px; height: calc(100vh - 220px); min-height: 500px; }
  @media (max-width: 900px) { .sa-layout { grid-template-columns: 1fr; } .sa-sidebar { display: none; } }
  @media (max-width: 768px) { .sa-layout { height: calc(100vh - 180px); } }
  .sa-chat-panel { display: flex; flex-direction: column; background: white; border-radius: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.07); overflow: hidden; }
  .sa-sidebar { display: flex; flex-direction: column; gap: 12px; }
  .sa-sidebar-section { background: white; border-radius: 14px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
  .sa-sidebar-title { font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; }

  .sa-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--gray-100); padding: 0 16px; flex-shrink: 0; }
  .sa-tab { padding: 12px 16px; font-size: 13px; font-weight: 500; color: var(--gray-500); background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; transition: .15s; white-space: nowrap; }
  .sa-tab.active { color: var(--blue); font-weight: 700; border-bottom-color: var(--blue); }
  .sa-tab:hover:not(.active) { color: var(--gray-700); }

  .sa-chat-window { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
  .sa-welcome { text-align: center; padding: 40px 20px; }
  .sa-welcome-icon { font-size: 48px; margin-bottom: 12px; }
  .sa-welcome-title { font-size: 18px; font-weight: 800; color: var(--gray-800); margin-bottom: 8px; }
  .sa-welcome-sub { font-size: 13px; color: var(--gray-500); max-width: 400px; margin: 0 auto 20px; line-height: 1.6; }
  .sa-quick-prompts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .sa-quick-prompt { padding: 8px 14px; background: var(--blue-light); color: var(--blue); border: none; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; transition: .15s; }
  .sa-quick-prompt:hover { background: var(--blue); color: white; }

  .sa-msg { display: flex; gap: 10px; animation: sa-msg-in .2s ease; }
  .sa-msg.user { flex-direction: row-reverse; }
  @keyframes sa-msg-in { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }
  .sa-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
  .sa-avatar.bot { background: linear-gradient(135deg, var(--blue), var(--teal)); color: white; font-size: 16px; }
  .sa-avatar.user { background: var(--gray-200); font-size: 13px; font-weight: 700; color: var(--gray-700); }
  .sa-bubble { max-width: 78%; padding: 12px 16px; border-radius: 16px; font-size: 13px; line-height: 1.6; }
  .sa-bubble.bot { background: var(--gray-50); color: var(--gray-800); border-radius: 4px 16px 16px 16px; }
  .sa-bubble.user { background: var(--blue); color: white; border-radius: 16px 4px 16px 16px; }
  .sa-bubble.typing { background: var(--gray-50); }
  .sa-typing-dots { display: flex; gap: 4px; padding: 4px 0; }
  .sa-typing-dots span { width: 7px; height: 7px; background: var(--gray-400); border-radius: 50%; animation: sa-dot .9s infinite; }
  .sa-typing-dots span:nth-child(2) { animation-delay: .2s; }
  .sa-typing-dots span:nth-child(3) { animation-delay: .4s; }
  @keyframes sa-dot { 0%,80%,100% { transform: scale(.7); opacity:.5; } 40% { transform: scale(1); opacity:1; } }
  .sa-bubble-meta { font-size: 10px; color: var(--gray-400); margin-top: 4px; }
  .sa-sources { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--gray-200); }
  .sa-source-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-light); color: var(--blue); padding: 3px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; margin: 2px; }

  .sa-input-row { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--gray-100); flex-shrink: 0; align-items: flex-end; }
  .sa-input { flex: 1; border: 1.5px solid var(--gray-200); border-radius: 12px; padding: 10px 14px; font-size: 13px; font-family: inherit; resize: none; outline: none; max-height: 120px; transition: border-color .2s; line-height: 1.5; }
  .sa-input:focus { border-color: var(--blue); }
  .sa-send-btn { width: 40px; height: 40px; border-radius: 10px; background: var(--blue); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .15s; }
  .sa-send-btn:hover { background: var(--blue-dark); }
  .sa-send-btn:disabled { background: var(--gray-300); cursor: not-allowed; }
  .sa-input-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 10px; flex-shrink: 0; }

  /* KB list */
  .kb-article-card { background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: .15s; }
  .kb-article-card:hover { border-color: var(--blue); background: var(--blue-light); }
  .kb-article-title { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
  .kb-article-meta { font-size: 11px; color: var(--gray-400); display: flex; gap: 10px; flex-wrap: wrap; }
  .kb-article-preview { font-size: 12px; color: var(--gray-600); margin-top: 6px; line-height: 1.5; }
  .kb-tag { display: inline-block; background: var(--gray-200); color: var(--gray-600); padding: 1px 6px; border-radius: 8px; font-size: 10px; font-weight: 600; margin: 1px; }

  /* SA chat extras */
  .sa-more-btn { margin-left: 8px; background: var(--blue-light); color: var(--blue); border: none; border-radius: 20px; padding: 3px 12px; font-size: 11.5px; font-weight: 700; cursor: pointer; transition: .15s; }
  .sa-more-btn:hover { background: var(--blue); color: white; }

  /* SA manual vault (admin-only) */
  .sa-upload-zone { border: 2px dashed var(--gray-300); border-radius: 14px; padding: 22px; text-align: center; cursor: pointer; transition: .15s; background: var(--gray-50); display: flex; flex-direction: column; gap: 4px; align-items: center; }
  .sa-upload-zone:hover, .sa-upload-zone.drag { border-color: var(--blue); background: var(--blue-light); }
  .sa-manual-card { display: flex; gap: 14px; align-items: center; background: white; border: 1.5px solid var(--gray-200); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; transition: .15s; }
  .sa-manual-card:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(0,87,184,.08); }
  .sa-cat-chip { display: inline-block; background: var(--blue-light); color: var(--blue); padding: 2px 9px; border-radius: 20px; font-size: 10.5px; font-weight: 700; }

  /* SA document editor — full-screen, doc-style */
  .sa-doc-overlay { position: fixed; inset: 0; z-index: 4000; background: var(--gray-100); display: flex; flex-direction: column; }
  .sa-doc-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: white; border-bottom: 1px solid var(--gray-200); box-shadow: 0 1px 4px rgba(0,0,0,.05); flex-shrink: 0; flex-wrap: wrap; }
  .sa-doc-title { font-size: 17px; font-weight: 800; border: none; outline: none; width: 100%; color: var(--gray-800); background: transparent; font-family: inherit; }
  .sa-doc-title:focus { border-bottom: 2px solid var(--blue); }
  .sa-doc-meta { font-size: 11.5px; color: var(--gray-400); margin-top: 2px; }
  .sa-doc-status { font-size: 12px; font-weight: 700; color: var(--green); white-space: nowrap; }
  .sa-doc-scroll { flex: 1; overflow-y: auto; padding: 28px 16px 60px; }
  .sa-doc-page { max-width: 860px; margin: 0 auto; background: white; border-radius: 6px; box-shadow: 0 2px 14px rgba(0,0,0,.1); padding: 56px 64px; }
  .sa-doc-textarea { width: 100%; border: none; outline: none; resize: none; font-family: inherit; font-size: 14.5px; line-height: 1.75; color: var(--gray-800); background: transparent; overflow: hidden; }
  @media (max-width: 700px) { .sa-doc-page { padding: 24px 18px; } .sa-doc-toolbar { gap: 8px; } }

  /* SA admin */
  .sa-admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
  .sa-stat-card { background: var(--gray-50); border-radius: 12px; padding: 16px; text-align: center; }
  .sa-stat-val { font-size: 28px; font-weight: 800; color: var(--blue); }
  .sa-stat-lbl { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

  /* ── BRAIN CHATBOT ────────────────────────────────── */
  .brain-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--gray-200); margin-bottom: 20px; }
  .brain-inbox-card { background: white; border-radius: 14px; padding: 16px 20px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.07); display: flex; gap: 14px; align-items: flex-start; cursor: pointer; transition: .15s; border-left: 4px solid transparent; }
  .brain-inbox-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
  .brain-inbox-card.unread { border-left-color: var(--blue); }
  .brain-inbox-card.unread .brain-inbox-name { color: var(--blue); }
  .brain-platform-badge { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
  .brain-platform-badge.fb { background: #1877F2; }
  .brain-platform-badge.ig { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
  .brain-platform-badge.web { background: var(--teal); }
  .brain-inbox-body { flex: 1; min-width: 0; }
  .brain-inbox-name { font-size: 14px; font-weight: 700; color: var(--gray-800); }
  .brain-inbox-preview { font-size: 12px; color: var(--gray-500); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brain-inbox-meta { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
  .brain-crm-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .brain-crm-col { background: var(--gray-100); border-radius: 12px; padding: 12px; }
  .brain-crm-col-title { font-size: 11px; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; display: flex; justify-content: space-between; }
  .brain-contact-card { background: white; border-radius: 10px; padding: 12px; margin-bottom: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
  .brain-contact-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
  .brain-contact-meta { font-size: 11px; color: var(--gray-400); }
  .brain-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
  .brain-stat-card { background: white; border-radius: 14px; padding: 20px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
  .brain-stat-val { font-size: 30px; font-weight: 800; color: var(--blue); }
  .brain-stat-lbl { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
  .brain-bot-section { background: white; border-radius: 14px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
  .brain-bot-section h3 { font-size: 14px; font-weight: 700; color: var(--gray-700); margin-bottom: 14px; }

  /* ── DARK MODE ────────────────────────────────────── */
  [data-theme="dark"] {
    --blue-light: #1e3a5f;
    --gray-50: #1a1f2e; --gray-100: #1e2433; --gray-200: #2a3044;
    --gray-300: #3a4155; --gray-400: #6b7280; --gray-500: #9ca3af;
    --gray-600: #d1d5db; --gray-700: #e5e7eb; --gray-800: #f3f4f6;
    --gray-900: #f9fafb;
  }
  [data-theme="dark"] body { background: #111827; color: #f3f4f6; }
  [data-theme="dark"] .topbar { background: #1a1f2e; border-color: #2a3044; }
  [data-theme="dark"] .kpi-card,
  [data-theme="dark"] .chart-card,
  [data-theme="dark"] .table-card,
  [data-theme="dark"] .modal,
  [data-theme="dark"] .sa-chat-panel,
  [data-theme="dark"] .sa-sidebar-section,
  [data-theme="dark"] .brain-inbox-card,
  [data-theme="dark"] .brain-stat-card,
  [data-theme="dark"] .brain-bot-section,
  [data-theme="dark"] .esc-card,
  [data-theme="dark"] .ms-report-card,
  [data-theme="dark"] .fin-card { background: #1a1f2e; }
  [data-theme="dark"] .sa-bubble.bot { background: #2a3044; color: #f3f4f6; }
  [data-theme="dark"] .sa-input { background: #2a3044; border-color: #3a4155; color: #f3f4f6; }
  [data-theme="dark"] .kb-article-card { background: #2a3044; border-color: #3a4155; }
  [data-theme="dark"] table thead th { background: #1e2433; }
  [data-theme="dark"] tbody tr:hover { background: #2a3044; }

  /* ── GLOBAL SEARCH (Cmd+K) ────────────────────────── */
  .cmd-k-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 800; display: flex; align-items: flex-start; justify-content: center; padding-top: 14vh; animation: fade-in .15s ease; }
  .cmd-k-overlay.hidden { display: none; }
  .cmd-k-box { background: white; border-radius: 16px; width: 580px; max-width: 95vw; box-shadow: 0 24px 64px rgba(0,0,0,.3); overflow: hidden; }
  .cmd-k-input-row { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--gray-100); }
  .cmd-k-icon { font-size: 18px; flex-shrink: 0; }
  .cmd-k-input { flex: 1; border: none; outline: none; font-size: 16px; font-family: inherit; color: var(--gray-800); background: transparent; }
  .cmd-k-hint { font-size: 11px; color: var(--gray-400); padding: 2px 6px; border: 1px solid var(--gray-200); border-radius: 5px; white-space: nowrap; }
  .cmd-k-results { max-height: 360px; overflow-y: auto; }
  .cmd-k-section { padding: 8px 20px 4px; font-size: 10px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .6px; }
  .cmd-k-result { display: flex; align-items: center; gap: 12px; padding: 10px 20px; cursor: pointer; transition: background .1s; }
  .cmd-k-result:hover, .cmd-k-result.selected { background: var(--blue-light); }
  .cmd-k-result-icon { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
  .cmd-k-result-label { font-size: 14px; font-weight: 600; color: var(--gray-800); }
  .cmd-k-result-sub { font-size: 11px; color: var(--gray-400); }
  .cmd-k-empty { text-align: center; padding: 32px; color: var(--gray-400); font-size: 13px; }
  [data-theme="dark"] .cmd-k-box { background: #1a1f2e; }
  [data-theme="dark"] .cmd-k-input { color: #f3f4f6; }
  [data-theme="dark"] .cmd-k-result:hover, [data-theme="dark"] .cmd-k-result.selected { background: #2a3044; }

  /* ── PERMISSION MANAGER ──────────────────────────── */
  .perm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .perm-table th { background: var(--gray-50); padding: 10px 14px; text-align: center; font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid var(--gray-200); }
  .perm-table th:first-child { text-align: left; }
  .perm-table td { padding: 10px 14px; border-bottom: 1px solid var(--gray-100); text-align: center; }
  .perm-table td:first-child { text-align: left; font-weight: 600; color: var(--gray-700); }

  /* ── HR ONBOARDING FORM WINDOWS (policies / emergency / availability) ──
     These classes had NO styles at all — the three forms rendered as unstyled
     in-flow blocks at the bottom of the page instead of pop-up windows (same
     bug family as the buried Add-Certification modal, fixed 2026-07-08).
     z-index sits ABOVE the onboarding tracker (10040) that opens them. */
  .hr-form-overlay { display:none; position:fixed; inset:0; background:rgba(15,23,42,.66); z-index:10060; align-items:flex-start; justify-content:center; overflow-y:auto; padding:30px 14px; }
  .hr-form-modal { background:white; border-radius:16px; max-width:760px; width:100%; margin:auto; display:flex; flex-direction:column; max-height:90vh; overflow:hidden; box-shadow:0 24px 64px rgba(0,0,0,.35); }
  .hr-form-header { background:linear-gradient(120deg,var(--blue,#0057B8),#003d82); color:white; padding:18px 22px; position:relative; flex-shrink:0; }
  .hr-form-header h2 { margin:0 0 4px; font-size:17px; font-weight:800; color:white; }
  .hr-form-header p { margin:0; font-size:12px; color:rgba(255,255,255,.85); }
  .hr-form-body { padding:18px 22px; overflow-y:auto; }
  .hr-form-footer { padding:12px 22px; border-top:1.5px solid var(--gray-200,#E5E7EB); display:flex; align-items:center; gap:12px; justify-content:space-between; background:var(--gray-50,#F9FAFB); flex-shrink:0; }
  .hr-progress-text { font-size:12px; font-weight:700; color:var(--gray-500,#6B7280); }
  .hr-policy-section { border:1.5px solid var(--gray-200,#E5E7EB); border-radius:12px; padding:14px 16px; margin-bottom:12px; }
  .hr-policy-section.initialed { border-color:#86EFAC; background:#F0FDF4; }
  .hr-policy-section h4 { margin:0 0 8px; font-size:13.5px; color:var(--blue,#0057B8); }
  .policy-text { font-size:12.5px; color:#374151; line-height:1.55; }
  .policy-text ul, .policy-text ol { padding-left:18px; margin:6px 0; }
  .initial-row { display:flex; align-items:center; gap:10px; margin-top:10px; flex-wrap:wrap; }
  .hr-initial-input { width:64px; padding:7px 8px; border:1.5px solid var(--gray-300,#D1D5DB); border-radius:8px; font-size:14px; font-weight:800; text-align:center; text-transform:uppercase; }
  .hr-sign-block { background:#EFF6FF; border:1.5px solid #BFDBFE; border-radius:12px; padding:16px; margin-top:16px; }
  .hr-sign-block h3 { margin:0 0 8px; font-size:15px; }
  .hr-sign-input { width:100%; padding:9px 12px; border:1.5px solid var(--gray-300,#D1D5DB); border-radius:8px; font-size:14px; box-sizing:border-box; }

  /* ── ORGANIZATIONAL CHART (Jobs page) — pure-CSS tree with connectors ── */
  .org-tree { overflow-x:auto; padding:18px 4px 6px; }
  .org-tree ul { display:flex; justify-content:center; list-style:none; margin:0; padding:26px 0 0; position:relative; }
  .org-tree > ul { padding-top:0; min-width:660px; width:max-content; margin:0 auto; }
  .org-tree li { display:flex; flex-direction:column; align-items:center; position:relative; padding:26px 9px 0; }
  .org-tree > ul > li { padding-top:0; }
  /* horizontal rail halves + the vertical stub down to each node */
  .org-tree li::before { content:''; position:absolute; top:0; right:50%; width:50%; height:26px; border-top:2px solid #CBD5E1; }
  .org-tree li::after  { content:''; position:absolute; top:0; left:50%; width:50%; height:26px; border-top:2px solid #CBD5E1; border-left:2px solid #CBD5E1; margin-left:-1px; }
  .org-tree li:first-child::before { border-top:none; }
  .org-tree li:last-child::after   { border-top:none; }
  .org-tree li:only-child::before  { display:none; }
  .org-tree > ul > li::before, .org-tree > ul > li::after { display:none; }
  /* vertical line dropping from a parent node to its children's rail */
  .org-tree ul ul::before { content:''; position:absolute; top:0; left:50%; height:26px; border-left:2px solid #CBD5E1; margin-left:-1px; }
  /* extra headroom under Ownership so the CFO card fits beside the line */
  .org-tree > ul > li > ul { padding-top:92px; }
  .org-tree > ul > li > ul::before { height:92px; }
  .org-node { background:#fff; border:1px solid var(--gray-200,#E5E7EB); border-radius:10px; box-shadow:0 1px 4px rgba(0,0,0,.06); padding:10px 16px; text-align:center; min-width:130px; }
  .org-node-title { font-weight:800; font-size:13px; color:var(--gray-900,#111827); white-space:nowrap; }
  .org-node-sub { font-size:10.5px; color:var(--gray-500,#6B7280); margin-top:2px; white-space:nowrap; }
  /* CFO — under Ownership, hanging off to the right of its reporting line */
  .org-root { position:relative; }
  .org-cfo { position:absolute; top:calc(100% + 18px); left:50%; display:flex; align-items:center; z-index:1; }
  .org-cfo-line { width:56px; height:0; border-top:2px solid #CBD5E1; flex-shrink:0; }
