/* ═══════════════════════════════════════════════════════
   Cathedral Design System — GoAIGuy
   One stylesheet for all pages. Import this, nothing else.
   ═══════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --bg-primary: #080d1a;
  --bg-secondary: #0f1729;
  --bg-card: #141d2f;
  --bg-card-hover: #1a2540;
  --bg-input: #1a2340;
  --accent: #10b981;
  --accent-hover: #34d399;
  --accent-dim: rgba(16, 185, 129, 0.15);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --purple: #a855f7;
  --gold: #d4af37;
  --border: #1e293b;
  --border-light: rgba(255, 255, 255, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --transition: 0.15s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base (iPhone-native feel) ── */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Allow text selection only on content, not UI */
p, span, .card, .msg, textarea, input, .feed-text, .suggestion-text { user-select: text; -webkit-user-select: text; }

/* iOS standalone mode: dark status bar area */
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top, 44px); }
  .top-bar { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Top Bar ── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}
.top-bar .logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-bar .logo svg { width: 22px; height: 22px; }
.top-bar .page-title {
  font-size: 14px;
  color: var(--text-secondary);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* ── Bottom Nav (iOS-native tab bar feel) ── */
.nav-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 41, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 200;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  min-width: 56px;
  min-height: 44px; /* iOS minimum tap target */
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: var(--accent); }
.nav-item:hover { color: var(--text-secondary); }
.nav-item svg { width: 22px; height: 22px; }

/* ── Page Container ── */
.page-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  transition: background var(--transition);
}
.card:hover { background: var(--bg-card-hover); }
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.card-title { font-size: 14px; font-weight: 600; }

/* ── Sections ── */
.section { margin-bottom: 20px; }
.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Stats ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  min-height: 44px; /* iOS tap target */
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(16, 185, 129, 0.3); }
.btn-secondary:hover { background: rgba(16, 185, 129, 0.25); }
.btn-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-light); }
.btn-ghost:hover { background: var(--bg-card); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green { background: var(--accent-dim); color: var(--accent); }
.badge-yellow { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-red { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-blue { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.badge-purple { background: rgba(168, 85, 247, 0.15); color: var(--purple); }
.badge-gold { background: rgba(212, 175, 55, 0.15); color: var(--gold); }

/* ── Inputs ── */
.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition);
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--text-muted); }

.select {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.tab.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

/* ── Tables ── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.table tr:hover td { background: var(--bg-card); }

/* ── States ── */
.loading {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 13px;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
}
.error-state {
  text-align: center;
  padding: 20px;
  color: var(--danger);
  font-size: 13px;
}

/* ── Charts ── */
.chart-wrap {
  position: relative;
  height: 200px;
}
.chart-wrap canvas { max-height: 200px; }

/* ── Progress Bar ── */
.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.3s ease;
}

/* ── Language Switcher ── */
.lang-switcher {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-sans);
}

/* ── Pulse Dot ── */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── Responsive ── */
@media (max-width: 768px) {
  .page-container { max-width: 100%; padding: 12px; }
  .table { font-size: 12px; }
  .table th, .table td { padding: 6px 8px; }
  .section-title { font-size: 14px; }
}

@media (max-width: 480px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .page-container { padding: 10px; }
  .top-bar { padding: 10px 12px; }
  .top-bar .logo { font-size: 16px; }
  .card { padding: 12px; }
  .btn { padding: 10px 14px; font-size: 13px; }
  .tabs { gap: 6px; }
  .tab { padding: 6px 12px; font-size: 12px; }
  h1, .h1 { font-size: 20px; }
  h2, .h2 { font-size: 16px; }
}

@media (max-width: 360px) {
  .stat-row { grid-template-columns: 1fr; }
  .stat-value { font-size: 20px; }
  body { font-size: 13px; }
}

/* ── RTL ── */
[dir="rtl"] .top-bar .page-title { left: auto; right: 50%; transform: translateX(50%); }
[dir="rtl"] .nav-bottom { direction: rtl; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── HARDENING: Skeleton Loaders ── */
.skeleton { background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.04) 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: skeleton-pulse 1.5s ease-in-out infinite; border-radius: var(--radius-sm); }
@keyframes skeleton-pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-block { height: 60px; margin-bottom: 8px; }
.skeleton-circle { width: 40px; height: 40px; border-radius: 50%; }

/* ── HARDENING: Network Status Bar ── */
.net-status { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; text-align: center; font-size: 12px; font-weight: 600; padding: 4px; transform: translateY(-100%); transition: transform 0.3s ease; }
.net-status.show { transform: translateY(0); }
.net-status.offline { background: var(--danger); color: #fff; }
.net-status.slow { background: var(--warning); color: #000; }
.net-status.reconnecting { background: var(--info); color: #fff; }

/* ── HARDENING: Data Freshness ── */
.freshness { font-size: 10px; color: var(--text-muted); font-style: italic; }
.freshness.stale { color: var(--warning); }

/* ── HARDENING: Error States ── */
.error-state { text-align: center; padding: 20px; color: var(--text-muted); }
.error-state .error-icon { font-size: 24px; margin-bottom: 8px; color: var(--danger); }
.error-state .error-msg { font-size: 13px; margin-bottom: 12px; }
.error-state .retry-btn { display: inline-block; padding: 8px 16px; background: rgba(16,185,129,0.15); color: var(--accent); border: 1px solid rgba(16,185,129,0.3); border-radius: var(--radius-md); font-size: 12px; font-weight: 600; cursor: pointer; min-height: 44px; min-width: 44px; }

/* ── HARDENING: Button States ── */
.btn-loading { position: relative; pointer-events: none; opacity: 0.7; }
.btn-loading::after { content: ''; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: inherit; border-radius: inherit; }

/* ── HARDENING: Mobile Safe Areas ── */
@supports (padding: env(safe-area-inset-bottom)) {
  .nav-bottom { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .chat-input-area, .fixed-input { padding-bottom: env(safe-area-inset-bottom); }
}

/* ── HARDENING: Touch Targets ── */
.touch-target { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* ── HARDENING: Copied Toast ── */
.toast-copied { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--accent); color: #000; padding: 8px 20px; border-radius: 20px; font-size: 13px; font-weight: 600; opacity: 0; transition: all 0.3s ease; z-index: 9000; pointer-events: none; }
.toast-copied.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── POLISH: Message Entrance Animations ── */
@keyframes msg-slide-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes msg-fade-in { from { opacity: 0; } to { opacity: 1; } }
.msg-enter-user { animation: msg-slide-up 0.2s ease-out; }
.msg-enter-system { animation: msg-fade-in 0.25s ease-out; }

/* ── POLISH: Button Press Feedback ── */
button:active, .tab:active, .qact:active, .nav-item:active, .quick-link:active, a.card:active { transform: scale(0.93); }
button, .tab, .qact, .nav-item, .quick-link { transition: transform 0.1s ease, color var(--transition, 0.2s), background var(--transition, 0.2s), opacity 0.2s; }

/* ── POLISH: Focus Rings (Accessibility) ── */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── POLISH: Card Entrance Stagger ── */
@keyframes card-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.section, .stat-box, .card, .directive-card, .escalation-card { animation: card-enter 0.3s ease-out backwards; }
.section:nth-child(1), .stat-box:nth-child(1) { animation-delay: 0ms; }
.section:nth-child(2), .stat-box:nth-child(2) { animation-delay: 50ms; }
.section:nth-child(3), .stat-box:nth-child(3) { animation-delay: 100ms; }
.section:nth-child(4), .stat-box:nth-child(4) { animation-delay: 150ms; }
.section:nth-child(5), .stat-box:nth-child(5) { animation-delay: 200ms; }

/* ── POLISH: Tab Panel Fade ── */
.tab-panel { opacity: 1; transition: opacity 0.15s ease; }
.tab-panel.fading { opacity: 0; }

/* ── POLISH: Typing Indicator Stagger ── */
.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

/* ── POLISH: Proposal Card Slide ── */
@keyframes proposal-slide { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.proposal-card { animation: proposal-slide 0.4s ease-out; }

/* ── POLISH: Nav Entrance Fade ── */
@keyframes nav-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.nav-bottom { animation: nav-fade-in 0.3s ease-out; }
.quick-links-bar { animation: nav-fade-in 0.25s ease-out; }

/* ── NATIVE: Reduced Motion (Accessibility) ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .skeleton { animation: none; background: var(--bg-card); }
  .net-status { transition: none; }
  .toast-copied { transition: none; }
}

/* ── NATIVE: Content Stability ── */
.stat-grid { min-height: 70px; }
.section { min-height: 48px; }
.health-banner { min-height: 90px; }

/* ── INTELLIGENCE: Nav Badge Counts ── */
.nav-item { position: relative; }
.nav-badge { position: absolute; top: 2px; right: 50%; transform: translateX(calc(50% + 10px)); min-width: 16px; height: 16px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 800; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1; }
.nav-badge.pulse { animation: badge-pulse 2s ease-in-out infinite; }
@keyframes badge-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.nav-dot { position: absolute; top: 4px; right: 50%; transform: translateX(calc(50% + 8px)); width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.nav-dot.active-build { background: #f59e0b; animation: badge-pulse 1s ease-in-out infinite; }

/* ── INTELLIGENCE: Touch Ripple ── */
.ripple-container { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.15); transform: scale(0); animation: ripple-expand 0.4s ease-out; pointer-events: none; }
@keyframes ripple-expand { to { transform: scale(2.5); opacity: 0; } }

/* ── INTELLIGENCE: iOS Viewport Fix ── */
:root { --vh: 1vh; }
@supports (-webkit-touch-callout: none) {
  .full-height { height: calc(var(--vh, 1vh) * 100); }
}

/* ── INTELLIGENCE: Contextual Greeting ── */
.session-greeting { background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(16,185,129,0.02)); border: 1px solid rgba(16,185,129,0.15); border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 12px; font-size: 13px; line-height: 1.5; color: var(--text-secondary, #94a3b8); animation: card-enter 0.3s ease-out; }
.session-greeting strong { color: var(--accent); }
.session-greeting .greeting-time { font-size: 11px; color: var(--text-muted, #64748b); margin-top: 4px; }

/* ── INTELLIGENCE: Smart Placeholder ── */
textarea::placeholder { transition: color 0.3s ease; }
textarea.has-context::placeholder { color: var(--accent); opacity: 0.6; }

/* ── CRAFT: Chat Search Highlight ── */
.msg.search-highlight { outline: 1px solid var(--accent); outline-offset: -1px; }

/* ── CRAFT: Message Grouping ── */
.msg.msg-grouped { border-top-left-radius: 4px; border-top-right-radius: 4px; }

/* ── POLISH: Loading Spinner ── */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border-light); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── POLISH: Empty State Enhanced ── */
.empty-state svg, .empty-state .empty-icon { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state .empty-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state .empty-desc { font-size: 13px; color: var(--text-muted); max-width: 280px; margin: 0 auto; }

/* ── POLISH: Data Freshness Enhanced ── */
.freshness-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.freshness-dot.fresh { background: var(--accent); }
.freshness-dot.stale { background: var(--warning); animation: pulse 2s infinite; }
.freshness-dot.dead { background: var(--danger); }

/* ── POLISH: Score Ring ── */
.score-ring { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; border: 3px solid; }
.score-ring.excellent { border-color: var(--accent); color: var(--accent); }
.score-ring.good { border-color: var(--info); color: var(--info); }
.score-ring.warning { border-color: var(--warning); color: var(--warning); }
.score-ring.critical { border-color: var(--danger); color: var(--danger); }

/* ── POLISH: Notification Dot ── */
.notif-dot { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--bg-primary); }

/* ── UTILITY: Layout Helpers ── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 6px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 20px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none; }
.w-full { width: 100%; }
.overflow-auto { overflow: auto; -webkit-overflow-scrolling: touch; }

/* ── UTILITY: Grid Systems ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 360px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── UTILITY: Status Indicators ── */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.online { background: var(--accent); }
.status-dot.offline { background: var(--danger); }
.status-dot.degraded { background: var(--warning); }
.status-dot.unknown { background: var(--text-muted); }

/* ── INVESTOR: Typography Hierarchy ── */
.page-header { font-size: 18px; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: -12px; margin-bottom: 16px; }
.section-header { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border-light); }

/* ── INVESTOR: Metric Display ── */
.metric { display: flex; flex-direction: column; gap: 2px; }
.metric-value { font-size: 28px; font-weight: 700; line-height: 1; }
.metric-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.metric-change { font-size: 11px; font-weight: 600; }
.metric-change.up { color: var(--accent); }
.metric-change.down { color: var(--danger); }

/* ── INVESTOR: Page Transitions ── */
@keyframes page-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-container { animation: page-enter 0.25s ease-out; }

/* ── INVESTOR: Divider ── */
.divider { height: 1px; background: var(--border-light); margin: 16px 0; }

/* ── ACCESSIBILITY: Skip Link ── */
.skip-link { position: absolute; top: -100px; left: 16px; background: var(--accent); color: #000; padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 600; z-index: 10000; transition: top 0.2s; }
.skip-link:focus { top: 8px; }

/* ── ACCESSIBILITY: Screen Reader Only ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ═══ CATHEDRAL COMPONENT STATES ═══ */

/* Loading */
.cathedral-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; color: var(--text-muted); }

/* Empty */
.cathedral-empty { text-align: center; padding: 24px 16px; font-size: 13px; color: var(--text-muted); background: var(--bg-card); border-radius: var(--radius-md); border: 1px dashed var(--border-light); }

/* Error */
.cathedral-error { text-align: center; padding: 24px 16px; font-size: 13px; color: var(--danger); background: rgba(239,68,68,0.05); border-radius: var(--radius-md); border: 1px solid rgba(239,68,68,0.15); }

/* Card structure */
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.card-body { font-size: 14px; line-height: 1.5; }
.card-footer { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border-light); font-size: 12px; color: var(--text-muted); }
.card-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--text-muted); }

/* Badge semantic variants */
.badge-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.badge-active { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-warning { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-error { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-info { background: rgba(59,130,246,0.15); color: #3b82f6; }
.badge-neutral { background: rgba(148,163,184,0.15); color: #94a3b8; }

/* Metric grid */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
@media (max-width: 480px) { .metric-grid { grid-template-columns: 1fr 1fr; } }
