/* ═══════════════════════════════════════════════════════════════════════════
   ATLAS ENTERPRISE — ORG PLATFORM
   Design System: Refined dark luxury / ops intelligence console
   Fonts: Syne (headings) · IBM Plex Mono (data) · DM Sans (body)
   ═══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Brand colors ─────────────────────────────────── */
  --gold:         #D4A843;
  --gold-dim:     #b8956a;
  --gold-faint:   rgba(212,168,67,0.12);
  --gold-border:  rgba(212,168,67,0.22);

  /* ── Surface layers ──────────────────────────────── */
  --base:         #080e1a;
  --surface-1:    #0f172a;
  --surface-2:    #1a2540;
  --surface-3:    #1e2d4a;
  --panel:        #111827;
  --panel-border: rgba(255,255,255,0.06);
  --panel-hover:  rgba(255,255,255,0.035);

  /* ── Text ────────────────────────────────────────── */
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;
  --text-faint:     #334155;

  /* ── Status ──────────────────────────────────────── */
  --green:        #4ade80;
  --green-dim:    rgba(74,222,128,0.12);
  --amber:        #fbbf24;
  --amber-dim:    rgba(251,191,36,0.12);
  --red:          #f87171;
  --red-dim:      rgba(248,113,113,0.12);
  --blue:         #60a5fa;
  --blue-dim:     rgba(96,165,250,0.12);

  /* ── Layout ──────────────────────────────────────── */
  --sidebar-w:    240px;
  --topbar-h:     60px;
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    16px;
  --radius-xl:    20px;

  /* ── Shadows ─────────────────────────────────────── */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.5);
  --shadow-gold:  0 4px 24px rgba(212,168,67,0.15);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIGHT THEME OVERRIDE
   Activated by: html[data-theme="light"] or body[data-theme="light"]
   ═══════════════════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  /* ── Brand colors (gold darkened for light bg contrast) ── */
  --gold:         #8C6010;
  --gold-dim:     #7A5208;
  --gold-faint:   rgba(140,96,16,0.10);
  --gold-border:  rgba(140,96,16,0.20);

  /* ── Surface layers ── */
  --base:         #F5F3EE;
  --surface-1:    #EDEAE3;
  --surface-2:    #E4E0D8;
  --surface-3:    #DEDAD0;
  --panel:        #FFFFFF;
  --panel-border: rgba(0,0,0,0.07);
  --panel-hover:  rgba(0,0,0,0.03);

  /* ── Text ── */
  --text-primary:   #0f172a;
  --text-secondary: #374151;
  --text-muted:     #6B7280;
  --text-faint:     #9CA3AF;

  /* ── Status (accessible on light bg) ── */
  --green:        #15803d;
  --green-dim:    rgba(21,128,61,0.12);
  --amber:        #b45309;
  --amber-dim:    rgba(180,83,9,0.12);
  --red:          #b91c1c;
  --red-dim:      rgba(185,28,28,0.12);
  --blue:         #1d4ed8;
  --blue-dim:     rgba(29,78,216,0.12);

  /* ── Shadows ── */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.10);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.14);
  --shadow-gold:  0 4px 24px rgba(140,96,16,0.12);
}


html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: var(--base);
  transition: background 0.25s ease, color 0.25s ease;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.hidden { display: none !important; }

/* ════════════════════════════════════════════════════════════════════════════
   AUTH SCREEN
   ════════════════════════════════════════════════════════════════════════════ */

.auth-shell {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--base);
  z-index: 1000;
}

.auth-shell .auth-theme-toggle {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 3;
  width: 40px;
  height: 40px;
  background: var(--panel);
  border-color: var(--gold-border);
  box-shadow: var(--shadow-md);
}

.auth-bg {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}

.auth-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(212,168,67,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,168,67,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.auth-bg-glow {
  position: absolute;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(212,168,67,0.07) 0%, transparent 70%);
}

.auth-card {
  position: relative;
  width: 420px;
  background: var(--panel);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  animation: authCardIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-logo {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
}

.auth-logo-img {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold-border);
}

.auth-logo-text {
  display: flex; flex-direction: column; gap: 1px;
}

.auth-logo-atlas {
  font-family: 'Syne', sans-serif;
  font-size: 20px; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 3px;
}

.auth-logo-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; font-weight: 500;
  color: var(--gold);
  letter-spacing: 3px;
}

.auth-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
  margin-bottom: 32px;
}

.auth-step { display: none; }
.auth-step.active { display: block; animation: stepIn 0.3s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

.auth-heading {
  font-family: 'Syne', sans-serif;
  font-size: 22px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-subhead {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 28px;
}

.auth-field { margin-bottom: 16px; }

.auth-label {
  display: block;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.8px; text-transform: uppercase;
  margin-bottom: 8px;
}

.auth-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.auth-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,168,67,0.1);
}

.auth-code-input {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 28px; font-weight: 600;
  letter-spacing: 12px;
  text-align: center;
  padding: 16px;
}

.auth-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: var(--base);
  border: none; border-radius: var(--radius-md);
  padding: 13px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  margin-top: 8px;
}

.auth-btn:hover { opacity: 0.92; }
.auth-btn:active { transform: scale(0.98); }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-error {
  font-size: 12px; color: var(--red);
  margin-top: 10px; min-height: 16px;
}

.auth-back {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 12px; cursor: pointer;
  margin-top: 16px; padding: 0;
  transition: color 0.2s;
}
.auth-back:hover { color: var(--text-secondary); }

.auth-denied-icon { font-size: 40px; margin-bottom: 16px; }

.auth-footer {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--text-faint);
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
}


/* ════════════════════════════════════════════════════════════════════════════
   APP SHELL
   ════════════════════════════════════════════════════════════════════════════ */

.app-shell {
  display: flex; height: 100vh; overflow: hidden;
  animation: appIn 0.4s ease;
}

@keyframes appIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--panel-border);
  display: flex; flex-direction: column;
  height: 100vh;
  position: relative;
  z-index: 10;
}

.sidebar::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold-border) 30%, var(--gold-border) 70%, transparent);
  pointer-events: none;
}

.sidebar-header {
  display: flex; align-items: center; gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--panel-border);
}

.sidebar-logo {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border);
  flex-shrink: 0;
}

.sidebar-brand { display: flex; flex-direction: column; gap: 1px; }

.sidebar-brand-atlas {
  font-family: 'Syne', sans-serif;
  font-size: 14px; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 2.5px;
}

.sidebar-brand-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 7px; font-weight: 500;
  color: var(--gold);
  letter-spacing: 2px;
}

.sidebar-org {
  padding: 14px 20px 10px;
  font-size: 11px; font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.5px;
  font-family: 'IBM Plex Mono', monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.nav-item:hover {
  color: var(--text-secondary);
  background: var(--panel-hover);
}

.nav-item.active {
  color: var(--gold);
  background: var(--gold-faint);
}

.nav-item.active .nav-icon { opacity: 1; }

.nav-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { opacity: 1; }

.nav-section-label {
  font-size: 10px; font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 1px; text-transform: uppercase;
  padding: 16px 12px 6px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--panel-border);
  display: flex; align-items: center; gap: 8px;
}

.sidebar-user {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}

.sidebar-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: var(--base);
  font-family: 'Syne', sans-serif;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-info { min-width: 0; }
.sidebar-user-name {
  font-size: 12px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 10px; color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
}

.sidebar-signout {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer; padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  flex-shrink: 0;
}
.sidebar-signout:hover { color: var(--red); background: var(--red-dim); }

/* ── Main content ──────────────────────────────────────────────────────── */
.app-main {
  flex: 1; display: flex; flex-direction: column;
  min-width: 0; height: 100vh; overflow: hidden;
}

.app-topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--panel-border);
  background: var(--panel);
  flex-shrink: 0;
}

.topbar-breadcrumb {
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.topbar-actions {
  display: flex; align-items: center; gap: 10px;
}

.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  background: var(--base);
}

/* Custom scrollbar */
.app-content::-webkit-scrollbar { width: 6px; }
.app-content::-webkit-scrollbar-track { background: transparent; }
.app-content::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
.app-content::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }


/* ════════════════════════════════════════════════════════════════════════════
   SHARED COMPONENTS
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: var(--base);
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--panel-border);
}
.btn-secondary:hover { background: var(--surface-3); color: var(--text-primary); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--panel-border);
}
.btn-ghost:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.12); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.2);
}
.btn-danger:hover { background: rgba(248,113,113,0.2); }

/* Account settings */
.dashboard-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.detail-list { display:grid; gap:0; margin:8px 0 18px; }
.detail-list > div { display:flex; justify-content:space-between; gap:24px; padding:13px 0; border-bottom:1px solid var(--border); }
.detail-list span { color:var(--text-muted); }
.detail-list strong { text-align:right; overflow-wrap:anywhere; }
.button-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.muted { color:var(--text-muted); }
.complimentary-banner { display:flex; align-items:center; gap:18px; margin:4px 0 22px; padding:20px 22px; border:1px solid rgba(217,169,55,.72); border-left:5px solid var(--gold); border-radius:16px; background:linear-gradient(135deg,rgba(217,169,55,.18),rgba(217,169,55,.07)); box-shadow:0 14px 34px rgba(0,0,0,.14); }
.complimentary-banner-icon { display:grid; flex:0 0 46px; width:46px; height:46px; place-items:center; border-radius:50%; background:var(--gold); color:#111521; font-size:22px; box-shadow:0 6px 18px rgba(217,169,55,.24); }
.complimentary-banner-copy { display:grid; min-width:0; gap:4px; color:var(--text-secondary); }
.complimentary-banner-label { color:var(--gold); font-size:12px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.complimentary-banner-countdown { color:var(--text-primary); font-size:clamp(22px,3vw,32px); line-height:1.15; }
[data-theme="light"] .complimentary-banner { background:linear-gradient(135deg,rgba(217,169,55,.22),rgba(255,255,255,.9)); box-shadow:0 12px 30px rgba(93,70,13,.12); }
@media (max-width:760px) { .dashboard-grid { grid-template-columns:1fr; } }

/* Settings must remain presentation-ready at every portal width. */
.settings-grid { align-items:stretch; }
.settings-grid > .panel { min-width:0; overflow:hidden; }
.settings-grid > .settings-wide { grid-column:1 / -1; }
.settings-grid .panel-header { align-items:flex-start; flex-wrap:wrap; gap:12px; }
.settings-grid .panel-header > div { min-width:0; }
.settings-grid .panel-header h2,
.settings-grid .panel-header .eyebrow,
.settings-grid p { overflow-wrap:anywhere; }
.settings-grid .btn { max-width:100%; white-space:normal; text-align:center; }
.settings-grid .form-grid { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; }
.settings-grid .form-grid label { min-width:0; }
.settings-grid .form-grid input,
.settings-grid .form-grid select,
.settings-grid .form-grid textarea { width:100%; min-width:0; }
.settings-appearance { display:flex; flex-direction:column; }
.settings-appearance .atlas-theme-toggle { align-self:flex-start; margin-top:auto; }

@media (max-width:760px) {
  :root { --sidebar-w:64px; }
  .sidebar-header { justify-content:center; padding:16px 10px; }
  .sidebar-brand,
  .sidebar-org,
  .sidebar-user-info { display:none; }
  .sidebar-nav { padding:8px; }
  .sidebar-nav .nav-item { justify-content:center; padding:11px; }
  .sidebar-nav .nav-item > span { display:none; }
  .sidebar-footer { justify-content:center; padding:12px 8px; }
  .sidebar-user { flex:0 0 auto; }
  .sidebar-signout { position:absolute; bottom:9px; right:4px; }
  .app-content { padding:16px; }
  .app-topbar { padding:0 16px; }
  .topbar-title { font-size:14px; }
  .settings-grid { gap:14px; }
  .settings-grid > .panel { grid-column:1 !important; padding:20px; }
  .settings-grid .detail-list > div { align-items:flex-start; flex-direction:column; gap:5px; }
  .settings-grid .detail-list strong { text-align:left; width:100%; }
  .settings-grid .button-row { align-items:stretch; flex-direction:column; }
  .settings-grid .button-row > .btn,
  .settings-grid .atlas-theme-toggle { align-self:stretch; width:100%; }
  .complimentary-banner { align-items:flex-start; padding:18px; }
  .complimentary-banner-icon { flex-basis:40px; width:40px; height:40px; }
}

@media (max-width:420px) {
  .settings-grid > .panel { padding:16px; }
  .settings-grid .panel-header { margin-bottom:12px; }
  .settings-grid .panel-header h2 { font-size:clamp(20px,7vw,28px); line-height:1.05; }
}

.btn svg { flex-shrink: 0; }

/* ── Cards ──────────────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.card-subtitle {
  font-size: 12px; color: var(--text-muted);
  margin-top: 3px;
}

/* ── Stat chips ─────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: border-color 0.2s;
}

.stat-card:hover { border-color: rgba(255,255,255,0.1); }

.stat-label {
  font-size: 10px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 10px;
}

.stat-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 28px; font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-value.gold  { color: var(--gold); }
.stat-value.green { color: var(--green); }
.stat-value.amber { color: var(--amber); }
.stat-value.red   { color: var(--red); }

.stat-delta {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Tables ─────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
}

table.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}

table.data-table thead th {
  background: var(--panel);
  padding: 12px 16px;
  text-align: left;
  font-size: 10px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 1px solid var(--panel-border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
table.data-table thead th:hover { color: var(--text-secondary); }
table.data-table thead th.sort-asc::after  { content: ' ↑'; color: var(--gold); }
table.data-table thead th.sort-desc::after { content: ' ↓'; color: var(--gold); }

table.data-table tbody tr {
  background: var(--surface-1);
  border-bottom: 1px solid var(--panel-border);
  transition: background 0.1s;
  cursor: pointer;
}
table.data-table tbody tr:last-child { border-bottom: none; }
table.data-table tbody tr:hover { background: var(--surface-2); }

table.data-table tbody td {
  padding: 13px 16px;
  color: var(--text-secondary);
  vertical-align: middle;
}

table.data-table tbody td.td-primary {
  color: var(--text-primary);
  font-weight: 500;
}

table.data-table tbody td.td-mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}

/* ── Status badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
}

.badge-green  { background: var(--green-dim);  color: var(--green); }
.badge-amber  { background: var(--amber-dim);  color: var(--amber); }
.badge-red    { background: var(--red-dim);    color: var(--red); }
.badge-blue   { background: var(--blue-dim);   color: var(--blue); }
.badge-gold   { background: var(--gold-faint); color: var(--gold); }
.badge-ghost  { background: rgba(255,255,255,0.05); color: var(--text-muted); }

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ── Progress bars ──────────────────────────────────────────────────── */
.progress-bar {
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1);
  background: var(--gold);
}
.progress-bar-fill.green { background: var(--green); }
.progress-bar-fill.amber { background: var(--amber); }
.progress-bar-fill.red   { background: var(--red); }

/* ── Loading skeleton ───────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Empty state ────────────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 32px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state-icon { font-size: 36px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state-body  { font-size: 13px; color: var(--text-muted); max-width: 320px; line-height: 1.6; }

/* ── Toast notifications ────────────────────────────────────────────── */
#atlas-org-toasts {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.org-toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px; color: var(--text-primary);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  max-width: 340px;
}

.org-toast.success { border-left: 3px solid var(--green); }
.org-toast.error   { border-left: 3px solid var(--red); }
.org-toast.info    { border-left: 3px solid var(--gold); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes toastOut {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateX(20px); }
}

/* ── Modal ──────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(8,14,26,0.8);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  animation: modalOverlayIn 0.2s ease;
}

@keyframes modalOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--panel);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 480px; max-width: calc(100vw - 48px);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px; font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer; padding: 4px;
  border-radius: var(--radius-sm);
  font-size: 20px; line-height: 1;
  transition: color 0.15s;
  margin-left: 16px;
}
.modal-close:hover { color: var(--text-primary); }

.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--panel-border);
}

/* ── Form fields ────────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }

.field-label {
  display: block;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.8px; text-transform: uppercase;
  margin-bottom: 7px;
}

.field-input, .field-select, .field-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,168,67,0.08);
}

.field-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.field-textarea { resize: vertical; min-height: 80px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Date range picker ──────────────────────────────────────────────── */
.date-range {
  display: flex; align-items: center; gap: 10px;
}
.date-range-sep { color: var(--text-muted); font-size: 12px; }


/* ════════════════════════════════════════════════════════════════════════════
   OVERVIEW PAGE
   ════════════════════════════════════════════════════════════════════════════ */

.overview-hero {
  background: linear-gradient(135deg, var(--panel) 0%, var(--surface-2) 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.overview-hero::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(ellipse, rgba(212,168,67,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-greeting {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.hero-org {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px; color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.hero-stats {
  display: flex; gap: 40px; flex-wrap: wrap;
}

.hero-stat-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 32px; font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}

.hero-stat-val.gold  { color: var(--gold); }
.hero-stat-val.green { color: var(--green); }
.hero-stat-val.red   { color: var(--red); }

.hero-stat-label {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
}

/* Facility health grid */
.facility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.facility-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.facility-card:hover { border-color: rgba(255,255,255,0.1); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.facility-card.critical { border-color: rgba(248,113,113,0.3); }
.facility-card.warning  { border-color: rgba(251,191,36,0.3); }
.facility-card.healthy  { border-color: rgba(74,222,128,0.15); }

.facility-card-status-bar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.facility-card.critical .facility-card-status-bar { background: var(--red); }
.facility-card.warning  .facility-card-status-bar { background: var(--amber); }
.facility-card.healthy  .facility-card-status-bar { background: var(--green); }

.facility-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px; margin-top: 4px;
}

.facility-card-name {
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.facility-card-location {
  font-size: 11px; color: var(--text-muted);
  margin-top: 3px;
}

.facility-card-metrics {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.facility-metric-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px; font-weight: 600;
  color: var(--text-primary);
  display: block; margin-bottom: 2px;
}
.facility-metric-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }

.facility-card-footer {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--panel-border);
  display: flex; align-items: center; justify-content: space-between;
}

.facility-revenue-loss {
  font-size: 11px; color: var(--text-muted);
}

.facility-revenue-loss span {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--red); font-size: 12px; font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════════════
   REPORTS PAGE
   ════════════════════════════════════════════════════════════════════════════ */

.report-controls {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px;
}

.report-controls-label {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.8px; text-transform: uppercase;
  white-space: nowrap;
}

.report-section {
  margin-bottom: 28px;
}

.report-section-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}

.report-section-title::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--panel-border);
}

.tech-perf-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--panel-border);
}

.tech-perf-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  color: var(--text-secondary);
  font-family: 'Syne', sans-serif;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.tech-perf-name { font-weight: 500; color: var(--text-primary); font-size: 13px; }
.tech-perf-meta { font-size: 11px; color: var(--text-muted); }

.tech-perf-stats {
  margin-left: auto;
  display: flex; align-items: center; gap: 24px;
}

.tech-perf-stat-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px; font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.tech-perf-stat-label {
  font-size: 9px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
}

.report-print-btn {
  position: fixed;
  bottom: 32px; right: 32px;
  background: var(--gold);
  color: var(--base);
  border: none; border-radius: 50%;
  width: 52px; height: 52px;
  cursor: pointer;
  box-shadow: var(--shadow-gold), var(--shadow-md);
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.report-print-btn:hover { transform: scale(1.08); }

.report-print-header, .report-print-footer { display: none; }

@media print {
  @page { size: letter portrait; margin: 0.35in; }
  .sidebar, .app-topbar, .report-controls, .report-print-btn { display: none !important; }
  html, body, .app-shell, .app-main, .app-content {
    width: auto !important; height: auto !important; min-height: 0 !important; overflow: visible !important;
  }
  body { background: white; color: black; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .app-content { padding: 0 !important; }
  .report-print-header { display: block; position: relative; padding: 0 0 12px; margin-bottom: 14px; border-bottom: 2px solid #b88922; color: #0b1732; }
  .report-print-brand { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; letter-spacing: 5px; line-height: 1; }
  .report-print-gold { color: #b88922; }
  .report-print-kicker { margin-top: 4px; color: #8a6415; font-size: 8px; font-weight: 700; letter-spacing: 2px; }
  .report-print-header h1 { margin: 13px 0 3px; font-family: 'Syne', sans-serif; font-size: 20px; color: #0b1732; }
  .report-print-period { font-size: 10px; color: #44506a; }
  .report-print-generated { position: absolute; right: 0; top: 2px; font-size: 8px; color: #6b7280; }
  .stat-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 8px !important; margin-bottom: 14px !important; }
  .stat-card { padding: 12px !important; border-radius: 8px !important; break-inside: avoid; }
  .stat-label { margin-bottom: 6px !important; font-size: 8px !important; }
  .stat-value { font-size: 20px !important; }
  .stat-delta { font-size: 8px !important; }
  .report-section { margin-bottom: 14px !important; break-inside: avoid; }
  .report-section-title { margin-bottom: 7px !important; font-size: 10px !important; }
  .table-wrap { overflow: visible !important; border-radius: 8px !important; }
  table.data-table { width: 100% !important; table-layout: fixed; font-size: 8px !important; }
  table.data-table th, table.data-table td { padding: 6px 5px !important; white-space: normal !important; }
  table.data-table thead th { font-size: 6.5px !important; letter-spacing: 0.35px !important; }
  .report-section .card { break-inside: avoid; border-radius: 8px !important; }
  .report-section .card > div { padding: 7px 10px !important; gap: 8px !important; }
  .report-section .card > div > div:nth-child(3) { gap: 10px !important; }
  .report-section .card > div > div:nth-child(3) > div > div:first-child { font-size: 10px !important; }
  .report-section .card > div > div:nth-child(3) > div > div:last-child { font-size: 6px !important; }
  .report-methodology { margin-top: 8px !important; font-size: 7px !important; line-height: 1.35 !important; }
  .report-print-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px 10px;
    margin-top: 10px;
    padding-top: 7px;
    border-top: 1px solid #c9ad70;
    color: #5f687a;
    font-size: 6.5px;
    line-height: 1.3;
    text-align: center;
  }
  .report-print-footer strong { color: #0b1732; }
  .report-print-footer span:not(:last-child)::after { content: ' |'; color: #b88922; }
  .report-print-footer span:last-child { flex-basis: 100%; color: #7b6231; }
}

/* ════════════════════════════════════════════════════════════════════════════
   TEAM PAGE
   ════════════════════════════════════════════════════════════════════════════ */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.team-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.team-card:hover { border-color: rgba(255,255,255,0.1); transform: translateY(-1px); }

.team-card-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}

.team-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  color: var(--text-secondary);
  font-family: 'Syne', sans-serif;
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.team-status-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--panel);
}

.team-status-dot.active { background: var(--green); }
.team-status-dot.idle   { background: var(--amber); }
.team-status-dot.offline{ background: var(--text-faint); }

.team-card-name { font-weight: 600; color: var(--text-primary); font-size: 14px; }
.team-card-email { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.team-card-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  background: var(--surface-1);
  border-radius: var(--radius-md);
  padding: 12px;
}

.tc-stat-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
  display: block;
}
.tc-stat-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ════════════════════════════════════════════════════════════════════════════
   EQUIPMENT PAGE
   ════════════════════════════════════════════════════════════════════════════ */

.equipment-filter-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.15s;
}
.filter-chip:hover { color: var(--text-secondary); border-color: rgba(255,255,255,0.1); }
.filter-chip.active { background: var(--gold-faint); color: var(--gold); border-color: var(--gold-border); }

/* ════════════════════════════════════════════════════════════════════════════
   CONTRACTORS PAGE
   ════════════════════════════════════════════════════════════════════════════ */

.contractor-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s;
  display: flex; flex-direction: column; gap: 12px;
}

.contractor-card:hover { border-color: rgba(255,255,255,0.1); }
.contractor-card.org-approved { border-color: var(--gold-border); }

.contractor-card-header {
  display: flex; align-items: flex-start; gap: 12px;
}

.contractor-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}

.contractor-name { font-weight: 600; color: var(--text-primary); font-size: 14px; }
.contractor-company { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.contractor-specialties {
  display: flex; flex-wrap: wrap; gap: 6px;
}

.specialty-chip {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px; font-weight: 600;
  background: var(--surface-2);
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.contractor-footer {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
}

.contractor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ════════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════════════════════ */

.view-enter {
  animation: viewEnter 0.3s ease;
}

@keyframes viewEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.count-up { transition: all 0.4s ease; }

/* ── Responsive tweaks ──────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 761px) and (max-width: 900px) {
  :root { --sidebar-w: 200px; }
  .app-content { padding: 20px; }
  .hero-stats { gap: 24px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   THEME TOGGLE BUTTON
   ═══════════════════════════════════════════════════════════════════════════ */
.atlas-theme-toggle,
#themeToggle {
  background: var(--panel-hover);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.atlas-theme-toggle:hover,
#themeToggle:hover { transform: scale(1.1); background: var(--gold-faint); }
.atlas-theme-toggle:focus-visible,
#themeToggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Shared modal forms (facility expansion and future self-service controls). */
.modal .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.modal .form-grid label { min-width: 0; }
.modal .form-grid input,
.modal .form-grid select,
.modal .form-grid textarea { width: 100%; min-width: 0; }
@media (max-width: 640px) {
  .modal .form-grid { grid-template-columns: 1fr; }
}

/* 2026-08 presentation pass: layout, readability and input ergonomics only. */
:where(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.modal-overlay { padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.modal { scrollbar-gutter: stable; overscroll-behavior: contain; }
.modal label { display: grid; gap: 7px; color: var(--text-secondary); font-size: 13px; font-weight: 650; line-height: 1.35; }
.modal input, .modal select, .modal textarea { min-height: 46px; padding: 11px 13px; border: 1px solid var(--panel-border); border-radius: var(--radius-md); background: var(--surface-2); color: var(--text-primary); font: inherit; }
.modal textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.modal .form-grid { align-items: start; gap: 18px 16px; }
.modal-footer { position: sticky; bottom: -36px; z-index: 2; background: var(--panel); padding-bottom: 4px; }
.detail-list > div { gap: 18px; }
.detail-list > div > span:last-child { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
[data-theme="light"] .modal-overlay { background: rgba(22,25,36,.58); }
[data-theme="light"] .modal { box-shadow: 0 30px 90px rgba(35,28,12,.22); }
[data-theme="light"] .badge { border-color: rgba(20,24,36,.1); }
[data-theme="light"] .muted, [data-theme="light"] small { color: #626879; }
@media (max-width: 640px) {
  .modal { width: 100% !important; max-width: 100%; max-height: calc(100dvh - 24px); padding: 24px 18px; border-radius: 18px; }
  .modal-header { margin-bottom: 18px; }
  .modal-footer { bottom: -24px; margin-inline: -18px; padding: 16px 18px max(6px, env(safe-area-inset-bottom)); }
  .modal-footer .btn { flex: 1 1 130px; min-height: 46px; }
  .detail-list > div { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.training-layer{position:fixed;inset:0;z-index:9990;background:rgba(45,48,54,.76);backdrop-filter:grayscale(1) blur(1px);pointer-events:none}.training-target{position:relative!important;z-index:9992!important;pointer-events:auto!important;box-shadow:0 0 0 5px var(--gold),0 18px 70px rgba(0,0,0,.5)!important}.training-coach{position:fixed;z-index:9993;right:clamp(16px,5vw,64px);bottom:clamp(16px,5vw,56px);width:min(390px,calc(100vw - 32px));padding:24px;background:var(--panel);border:2px solid var(--gold);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);pointer-events:auto}.training-coach h2{margin:6px 0 8px}.training-coach p{margin:0 0 18px;color:var(--text-secondary);line-height:1.55}@media(max-width:640px){.training-coach{right:16px;bottom:16px}.training-target{scroll-margin:190px}}
.sidebar:has(.training-target),.app-main:has(.training-target),.modal-overlay:has(.training-target){z-index:9991}
