/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/* ═══════════════════════════════════════════════════════════════
   Sentinel Nexus 360 — Liquid Glass 2.0 Design System
   Obsidian & Indigo — Ultra-Premium Dark Theme
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Design Tokens (Dark theme — default) ── */
:root,
[data-theme="dark"] {
  --bg-deepest: #03050b;
  --bg-deeper: #060a14;
  --bg-deep: #0a0f1e;
  --bg-surface: #0f1628;
  --bg-elevated: #151d32;
  --bg-card: rgba(255,255,255,0.02);

  --glass-1: rgba(255,255,255,0.02);
  --glass-2: rgba(255,255,255,0.04);
  --glass-3: rgba(255,255,255,0.06);
  --glass-4: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.05);
  --glass-border-hover: rgba(255,255,255,0.10);
  --glass-border-accent: rgba(99,102,241,0.25);
  --glass-blur: blur(16px);
  --glass-blur-light: blur(8px);
  --glass-blur-heavy: blur(24px);
  --glass-shimmer: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.02) 100%);

  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dark: #4f46e5;
  --accent-glow: rgba(99,102,241,0.25);
  --accent-glow-strong: rgba(99,102,241,0.4);
  --accent-bg: rgba(99,102,241,0.12);

  --cyan: #06b6d4;
  --cyan-glow: rgba(6,182,212,0.2);
  --emerald: #10b981;
  --emerald-glow: rgba(16,185,129,0.2);
  --amber: #f59e0b;
  --amber-glow: rgba(245,158,11,0.2);
  --rose: #ef4444;
  --rose-glow: rgba(239,68,68,0.2);

  --success: #10b981;
  --success-bg: rgba(16,185,129,0.1);
  --success-text: #6ee7b7;
  --warning: #f59e0b;
  --warning-bg: rgba(245,158,11,0.1);
  --warning-text: #fcd34d;
  --danger: #ef4444;
  --danger-bg: rgba(239,68,68,0.1);
  --danger-text: #fca5a5;
  --danger-soft: rgba(239,68,68,0.06);
  --info: #6366f1;
  --info-bg: rgba(99,102,241,0.1);
  --info-text: #a5b4fc;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-muted: #475569;
  --text-inverse: #0f172a;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 25px var(--accent-glow);

  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;

  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.35s cubic-bezier(0.16,1,0.3,1);

  --sidebar-width: 260px;
  --sidebar-bg: #0b0c0f;
  --admin-main-bg: radial-gradient(ellipse at 0% 0%, rgba(99,102,241,0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(6,182,212,0.015) 0%, transparent 50%),
    var(--bg-deeper);
  --border-default: rgba(255,255,255,0.05);
  --toggle-bg: rgba(255,255,255,0.08);
  --input-bg: rgba(0,0,0,0.25);
  --table-header-bg: rgba(255,255,255,0.02);
  --table-border: rgba(255,255,255,0.03);
  --table-hover: rgba(99,102,241,0.04);
  --metric-ring-bg: rgba(255,255,255,0.06);
  --modal-overlay: rgba(3,5,11,0.75);
  --toast-success-bg: rgba(16,185,129,0.12);
  --toast-success-border: rgba(16,185,129,0.25);
  --toast-error-bg: rgba(239,68,68,0.12);
  --toast-error-border: rgba(239,68,68,0.25);
  --toast-info-border: rgba(99,102,241,0.25);
  --badge-default-bg: rgba(99,102,241,0.1);
  --notif-panel-bg: #11141f;
  --notif-panel-border: #2a2d3a;
  --notif-panel-header-border: #2a2d3a;
  --notif-title-color: #f1f5f9;
  --notif-item-border: #1a1d2d;
  --notif-item-hover: #1e2140;
  --notif-item-title-color: #e2e8f0;
  --notif-item-desc-color: rgba(255,255,255,0.45);
  --notif-item-time-color: rgba(255,255,255,0.25);
  --notif-mark-btn-color: rgba(255,255,255,0.15);
  --notif-mark-btn-hover-bg: rgba(255,255,255,0.07);
  --notif-mark-btn-hover-color: rgba(255,255,255,0.45);
  --notif-empty-color: rgba(255,255,255,0.25);
  --notif-scrollbar-thumb: rgba(255,255,255,0.08);
  --login-card-bg: rgba(15,22,40,0.6);
  --login-card-border: rgba(255,255,255,0.08);
  --login-card-border-top: rgba(255,255,255,0.12);
  --login-brand-color: #fff;
  --login-tabs-bg: rgba(255,255,255,0.03);
  --login-input-bg: rgba(0,0,0,0.3);
  --login-input-focus-bg: rgba(0,0,0,0.4);
  --login-btn-border: rgba(255,255,255,0.08);
  --login-btn-border-top: rgba(255,255,255,0.15);
  --login-link-hover-color: #c7d2fe;
  --login-link-hover-bg: rgba(165,180,252,0.08);
  --login-card-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 1px rgba(255,255,255,0.04) inset, 0 0 60px rgba(99,102,241,0.03);
  --fiscologic-brand: #00e5ff;
  --fiscologic-brand-light: #40f0ff;
  --fiscologic-brand-glow: rgba(0,229,255,0.2);
  --login-logo-blend: screen;
  --login-logo-filter: brightness(1.15) drop-shadow(0 0 30px rgba(99,102,241,0.4));

  /* ══ Liquid Glass 2.0 Design Tokens (v3.7.1) ══ */

  /* 70% SOLIDO: Superficies base */
  --surface-primary: #020617;
  --surface-secondary: #0f172a;

  /* 20% GLASS: Acentos translucidos */
  --glass-bg: rgba(15, 23, 42, 0.7);

  /* 10% BRILLO: Detalles */
  --accent-primary: #38bdf8;
  --accent-success: #10b981;
  --accent-info: #3b82f6;

  /* RIESGO: Sistema de badges */
  --risk-low: #10b981;
  --risk-medium: #f59e0b;
  --risk-high: #f97316;
  --risk-critical: #ef4444;
}

/* ═══ Light Theme ═══ */
[data-theme="light"] {
  --bg-deepest: #f1f5f9;
  --bg-deeper: #f8fafc;
  --bg-deep: #ffffff;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-card: rgba(0,0,0,0.02);

  --glass-1: rgba(0,0,0,0.02);
  --glass-2: rgba(0,0,0,0.03);
  --glass-3: rgba(0,0,0,0.05);
  --glass-4: rgba(0,0,0,0.08);
  --glass-border: rgba(0,0,0,0.06);
  --glass-border-hover: rgba(0,0,0,0.12);
  --glass-border-accent: rgba(99,102,241,0.3);
  --glass-blur: blur(16px);
  --glass-blur-light: blur(8px);
  --glass-blur-heavy: blur(24px);
  --glass-shimmer: linear-gradient(90deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.04) 50%, rgba(0,0,0,0.01) 100%);

  --accent: #4f46e5;
  --accent-light: #6366f1;
  --accent-dark: #4338ca;
  --accent-glow: rgba(79,70,229,0.15);
  --accent-glow-strong: rgba(79,70,229,0.3);
  --accent-bg: rgba(79,70,229,0.1);

  --cyan: #0891b2;
  --cyan-glow: rgba(8,145,178,0.12);
  --emerald: #059669;
  --emerald-glow: rgba(5,150,105,0.12);
  --amber: #d97706;
  --amber-glow: rgba(217,119,6,0.12);
  --rose: #dc2626;
  --rose-glow: rgba(220,38,38,0.12);

  --success: #059669;
  --success-bg: rgba(5,150,105,0.08);
  --success-text: #059669;
  --warning: #d97706;
  --warning-bg: rgba(217,119,6,0.08);
  --warning-text: #b45309;
  --danger: #dc2626;
  --danger-bg: rgba(220,38,38,0.08);
  --danger-text: #b91c1c;
  --danger-soft: rgba(220,38,38,0.04);
  --info: #4f46e5;
  --info-bg: rgba(79,70,229,0.08);
  --info-text: #4f46e5;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #f1f5f9;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 25px var(--accent-glow);

  --sidebar-bg: #ffffff;
  --admin-main-bg: #f8fafc;
  --border-default: rgba(0,0,0,0.06);
  --toggle-bg: rgba(0,0,0,0.1);
  --input-bg: #ffffff;
  --table-header-bg: rgba(0,0,0,0.02);
  --table-border: rgba(0,0,0,0.04);
  --table-hover: rgba(99,102,241,0.03);
  --metric-ring-bg: rgba(0,0,0,0.06);
  --modal-overlay: rgba(0,0,0,0.4);
  --toast-success-bg: rgba(5,150,105,0.08);
  --toast-success-border: rgba(5,150,105,0.2);
  --toast-error-bg: rgba(220,38,38,0.08);
  --toast-error-border: rgba(220,38,38,0.2);
  --toast-info-border: rgba(79,70,229,0.2);
  --badge-default-bg: rgba(79,70,229,0.08);
  --notif-panel-bg: #ffffff;
  --notif-panel-border: #d4d4d8;
  --notif-panel-header-border: #d4d4d8;
  --notif-title-color: #0f172a;
  --notif-item-border: #e4e4e7;
  --notif-item-hover: #f4f4f9;
  --notif-item-title-color: #0f172a;
  --notif-item-desc-color: #64748b;
  --notif-item-time-color: #94a3b8;
  --notif-mark-btn-color: rgba(0,0,0,0.15);
  --notif-mark-btn-hover-bg: rgba(0,0,0,0.05);
  --notif-mark-btn-hover-color: rgba(0,0,0,0.45);
  --notif-empty-color: #94a3b8;
  --notif-scrollbar-thumb: rgba(0,0,0,0.08);
  --login-card-bg: rgba(255,255,255,0.85);
  --login-card-border: rgba(0,0,0,0.08);
  --login-card-border-top: rgba(255,255,255,0.6);
  --login-brand-color: var(--text-primary);
  --fiscologic-brand: #0099cc;
  --fiscologic-brand-light: #00b8d4;
  --fiscologic-brand-glow: rgba(0,153,204,0.12);
  --login-tabs-bg: rgba(0,0,0,0.03);
  --login-input-bg: #ffffff;
  --login-input-focus-bg: #ffffff;
  --login-btn-border: rgba(0,0,0,0.08);
  --login-btn-border-top: rgba(255,255,255,0.6);
  --login-link-hover-color: var(--accent);
  --login-link-hover-bg: var(--accent-glow);
  --login-card-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  --login-logo-blend: normal;
  --login-logo-filter: drop-shadow(0 2px 8px rgba(99,102,241,0.2));
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-sans);
  background: var(--bg-deeper);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }
svg { flex-shrink: 0; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--glass-4); }

/* ═══════════════════════════════════════════════════════════════
   Atoms — Core Building Blocks
   ═══════════════════════════════════════════════════════════════ */

/* ── Glass Surfaces ── */
.glass-panel {
  background: var(--glass-2);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.glass-panel:hover { border-color: var(--glass-border-hover); }

.glass-card {
  background: var(--glass-2);
  backdrop-filter: var(--glass-blur-light);
  -webkit-backdrop-filter: var(--glass-blur-light);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}
.glass-card:hover {
  background: var(--glass-3);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
[data-theme="light"] .glass-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
}
[data-theme="light"] .glass-card:hover {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
}

.glass-elevated {
  background: linear-gradient(135deg, var(--glass-3), var(--glass-2));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  line-height: 1.4;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-color: var(--glass-border-accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow-strong);
}
.btn-primary:active:not(:disabled) { transform: translateY(0) scale(0.98); }

.btn-secondary {
  background: var(--glass-3);
  color: var(--text-primary);
  border-color: var(--glass-border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--glass-4);
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--glass-2);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: rgba(239,68,68,0.2);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.3);
}

.btn-sm { font-size: 0.75rem; padding: 0.35rem 0.7rem; }
.btn-lg { font-size: 0.9375rem; padding: 0.625rem 1.25rem; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }

/* ── Inputs ── */
.input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  transition: all var(--transition-fast);
  outline: none;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 0 15px rgba(99,102,241,0.08);
  background: var(--input-bg);
}
.input::placeholder { color: var(--text-muted); }
.input-error { border-color: var(--danger); box-shadow: 0 0 0 3px var(--rose-glow); }

.select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  transition: all var(--transition-fast);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}
.select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  transition: all var(--transition-fast);
  outline: none;
  resize: vertical;
  min-height: 80px;
}
.textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* ── Labels ── */
.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success-text); }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); }
.badge-danger  { background: var(--danger-bg); color: var(--danger-text); }
.badge-info    { background: var(--info-bg); color: var(--info-text); }
.badge-neutral { background: var(--glass-3); color: var(--text-secondary); }

/* ── Tables ── */
.table-wrap {
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
table {
  width: 100%;
  border-collapse: collapse;
}
table thead th {
  background: var(--table-header-bg);
  padding: 0.65rem 0.85rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}
table tbody td {
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--table-border);
}
table tbody tr:last-child td { border-bottom: none; }
table tbody tr:hover td { background: var(--table-hover); }
table tbody tr { transition: background var(--transition-fast); }

/* ── Dividers ── */
hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 1rem 0;
}

/* ── Page Headers ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-subtitle {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 0.15rem;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--glass-1);
  border-radius: var(--radius-sm);
  padding: 3px;
  width: -moz-fit-content;
  width: fit-content;
  border: 1px solid var(--glass-border);
}
.tab {
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.tab:hover { color: var(--text-secondary); }
.tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ── Stat Cards ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  transition: all var(--transition-base);
}
.stat-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.stat-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.stat-card-label {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
}
.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.stat-card-icon svg { width: 18px; height: 18px; }

/* ── Metric (circular gauge container) ── */
.metric-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.metric-ring svg { transform: rotate(-90deg); }
.metric-ring-bg { fill: none; stroke: var(--metric-ring-bg); }
.metric-ring-fg { fill: none; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.metric-ring-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.metric-ring-label {
  font-size: 0.55rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Progress Bars ── */
.progress-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--glass-3);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}
.progress-bar-fill.accent { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.progress-bar-fill.success { background: linear-gradient(90deg, var(--emerald), var(--success-text)); }
.progress-bar-fill.warning { background: linear-gradient(90deg, var(--amber), var(--warning-text)); }
.progress-bar-fill.danger { background: linear-gradient(90deg, var(--rose), var(--danger-text)); }

/* ── Section cards ── */
.section-card {
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.section-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.section-card-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 1rem; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 1rem; gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 1rem; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 1rem; gap: 1rem; }

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

/* ── Flex utilities ── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* ── Text utilities ── */
.text-xs { font-size: 0.6875rem; }
.text-sm { font-size: 0.75rem; }
.text-base { font-size: 0.8125rem; }
.text-lg { font-size: 0.9375rem; }
.text-xl { font-size: 1.125rem; }
.text-2xl { font-size: 1.5rem; }
.text-muted { color: var(--text-tertiary); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent-light); }
.text-success { color: var(--success-text); }
.text-warning { color: var(--warning-text); }
.text-danger { color: var(--danger-text); }
.mono { font-family: var(--font-mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

/* ── Spacing ── */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

/* ── Grid cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
}

/* ── Modal/Overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--modal-overlay);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease-out;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  max-width: 440px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: modalPop 0.3s ease-out;
}
.modal-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem;
}
.modal-icon.warning { background: var(--warning-bg); color: var(--warning-text); }
.modal-icon.danger { background: var(--danger-bg); color: var(--danger-text); }
.modal-icon.success { background: var(--success-bg); color: var(--success-text); }
.modal-icon svg { width: 22px; height: 22px; }
.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.modal-text {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.6;
  margin-bottom: 0.3rem;
}

/* ── Toast / Alerts ── */
.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  animation: slideIn 0.35s ease-out;
}
.toast-success {
  background: var(--toast-success-bg);
  border: 1px solid var(--toast-success-border);
  color: var(--success-text);
}
.toast-error {
  background: var(--toast-error-bg);
  border: 1px solid var(--toast-error-border);
  color: var(--danger-text);
  animation: shake 0.45s ease-out;
}
.toast-info {
  background: var(--info-bg);
  border: 1px solid var(--toast-info-border);
  color: var(--info-text);
}

/* ── Skeleton ── */
.skeleton {
  background: var(--glass-shimmer);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Toggle ── */
.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: var(--glass-3);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-fast);
}
.toggle input:checked + .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-tertiary);
  transition: all var(--transition-fast);
}
.toggle input:checked ~ .toggle-thumb {
  left: 18px;
  background: #fff;
}

/* ── Tooltip ── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ═══════════════════════════════════════════════════════════════
   Keyframes
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(100%) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalPop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes shake {
  0%, 100% { transform: translateX(0); } 15% { transform: translateX(-6px); } 30% { transform: translateX(6px); }
  45% { transform: translateX(-4px); } 60% { transform: translateX(4px); } 75% { transform: translateX(-2px); }
}

/* ── Animation utilities ── */
.animate-fadeIn { animation: fadeIn 0.3s ease-out; }
.animate-fadeUp { animation: fadeUp 0.4s ease-out; }
.animate-slideIn { animation: slideIn 0.35s ease-out; }
.animate-modalPop { animation: modalPop 0.3s ease-out; }

/* Staggered children */
.stagger > * {
  animation: fadeSlideIn 0.25s ease-out both;
}
.stagger > *:nth-child(1) { animation-delay: 0.03s; }
.stagger > *:nth-child(2) { animation-delay: 0.06s; }
.stagger > *:nth-child(3) { animation-delay: 0.09s; }
.stagger > *:nth-child(4) { animation-delay: 0.12s; }
.stagger > *:nth-child(5) { animation-delay: 0.15s; }

/* ═══════════════════════════════════════════════════════════════
   Login Page — Obsidian Portal
   ═══════════════════════════════════════════════════════════════ */

.login-root {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deeper);
  overflow: hidden;
}

/* Noise texture overlay */
.login-root::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  opacity: 0.015;
  pointer-events: none;
  z-index: 1;
}

/* Ambient gradient orbs */
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.login-orb--left {
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 60%);
  animation: orbFloat 10s ease-in-out infinite;
}
.login-orb--right {
  bottom: -20%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(6,182,212,0.08) 0%, transparent 60%);
  animation: orbFloat 12s ease-in-out infinite reverse;
}
.login-orb--center {
  top: 50%;
  left: 50%;
  width: 40%;
  height: 40%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, transparent 50%);
  animation: orbPulse 6s ease-in-out infinite;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(3%, -3%) scale(1.1); }
}
@keyframes orbPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Content container */
.login-content {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 420px;
}

/* Card */
.login-card {
  background: var(--login-card-bg);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--login-card-border);
  border-top: 1px solid var(--login-card-border-top);
  border-radius: 20px;
  padding: 2.25rem 2rem 1.75rem;
  box-shadow: var(--login-card-shadow);
}

/* Logo area — Fiscologic animated card */
.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.fiscologic-card {
  width: 220px;
  height: 140px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto;
  background: var(--glass-1);
  box-shadow: 0 0 0 1px rgba(0,229,255,0.3), 0 12px 32px var(--fiscologic-brand-glow);
  opacity: 0;
  transform: scale(0.85);
}

.fiscologic-card.active {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.16,1,0.3,1);
}

.fiscologic-logo-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px var(--fiscologic-brand-glow));
}

.fiscologic-video {
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 12px;
}

.fiscologic-border {
  position: absolute;
  inset: 10px;
  border: 2px solid var(--fiscologic-brand);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transform: rotate(5deg);
}

.fiscologic-card.active .fiscologic-border {
  animation: fisco-border-in 0.6s ease 0.3s forwards;
}

.fiscologic-bottom-text {
  position: absolute;
  left: 50%;
  bottom: 11px;
  transform: translateX(-50%);
  font-size: 12px;
  text-transform: uppercase;
  padding: 2px 6px;
  color: var(--fiscologic-brand);
  background: var(--glass-1);
  font-weight: 700;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
}

.fiscologic-card.active .fiscologic-bottom-text {
  animation: fisco-text-in 0.5s ease 1.2s forwards;
}

.fiscologic-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.fiscologic-logo {
  height: 40px;
  width: 36px;
  position: relative;
  overflow: hidden;
}

.fiscologic-card.active .fiscologic-logo {
  animation: fisco-logo-expand 1s ease 0.1s forwards;
}

.fiscologic-logo1 {
  height: 38px;
  width: 36px;
  object-fit: contain;
  position: absolute;
  left: 0;
  top: 0;
}

.fiscologic-logo2 {
  height: 38px;
  width: 36px;
  object-fit: contain;
  position: absolute;
  left: 36px;
  top: 0;
  filter: brightness(1.3) drop-shadow(0 0 6px var(--fiscologic-brand-glow));
}

.fiscologic-trail {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  pointer-events: none;
}

.fiscologic-card.active .fiscologic-trail {
  animation: fisco-trail 1s ease 0.1s;
}

@keyframes fisco-border-in {
  from { opacity: 0; transform: rotate(5deg); }
  to   { opacity: 1; transform: rotate(0deg); }
}

@keyframes fisco-text-in {
  from { opacity: 0; letter-spacing: 6px; }
  to   { opacity: 1; letter-spacing: 3px; }
}

@keyframes fisco-logo-expand {
  0%   { width: 36px; border-right: 1px solid transparent; }
  10%  { border-right: 1px solid var(--fiscologic-brand); }
  80%  { border-right: 1px solid var(--fiscologic-brand); }
  100% { width: 80px; border-right: 1px solid transparent; }
}

@keyframes fisco-trail {
  0%   { background: linear-gradient(90deg, rgba(0,229,255,0) 90%, var(--fiscologic-brand) 100%); opacity: 0; }
  30%  { background: linear-gradient(90deg, rgba(0,229,255,0) 70%, var(--fiscologic-brand) 100%); opacity: 1; }
  70%  { background: linear-gradient(90deg, rgba(0,229,255,0) 70%, var(--fiscologic-brand) 100%); opacity: 1; }
  95%  { background: linear-gradient(90deg, rgba(0,229,255,0) 90%, var(--fiscologic-brand) 100%); opacity: 0; }
}

/* ═══ Status Dot — Indicator ═══ */
.status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  opacity: 0.3;
}
.status-dot--green {
  background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
  box-shadow: 0 0 8px rgba(76,175,80,0.4);
}
.status-dot--green::after {
  background: radial-gradient(circle, rgba(76,175,80,0.6) 0%, transparent 70%);
}
.status-dot--yellow {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  box-shadow: 0 0 8px rgba(245,158,11,0.4);
}
.status-dot--yellow::after {
  background: radial-gradient(circle, rgba(245,158,11,0.6) 0%, transparent 70%);
}
.status-dot--red {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  box-shadow: 0 0 8px rgba(239,68,68,0.4);
}
.status-dot--red::after {
  background: radial-gradient(circle, rgba(239,68,68,0.6) 0%, transparent 70%);
}

/* ═══ Mode Badge ═══ */
.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.mode-badge--normal {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.3);
}
.mode-badge--normal .mode-badge-dot {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}
.mode-badge--normal .mode-badge-label {
  color: #10b981;
}
.mode-badge--atencion {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.3);
}
.mode-badge--atencion .mode-badge-dot {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}
.mode-badge--atencion .mode-badge-label {
  color: #f59e0b;
}
.mode-badge--crisis {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.3);
}
.mode-badge--crisis .mode-badge-dot {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}
.mode-badge--crisis .mode-badge-label {
  color: #ef4444;
}
.mode-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mode-badge-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ═══ Financial Dashboard Card ═══ */
.fin-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.fin-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--accent-bg);
  flex-shrink: 0;
}

.fin-card-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent-light);
}

.fin-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-left: 0.65rem;
}

.fin-card-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: 0.65rem;
  margin-top: 0.1rem;
}

.fin-card-metrics {
  display: flex;
  gap: 0;
}

.fin-card-metric {
  flex: 1 1;
  padding: 0 1rem;
}

.fin-card-metric:first-child {
  padding-left: 0;
  border-right: 1px solid var(--glass-border);
}

.fin-card-metric:last-child {
  padding-right: 0;
}

.fin-card-metric-label {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.fin-card-metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.fin-card-metric-delta {
  font-size: 0.68rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

.fin-card-metric-delta--up {
  color: var(--success);
}

.fin-card-metric-delta--down {
  color: var(--danger);
}

.fin-card-chart {
  position: relative;
  height: 80px;
  width: 100%;
  margin-top: 1rem;
}

.fin-card-chart svg {
  width: 100%;
  height: 100%;
}

.fin-card-chart path.fin-chart-line {
  fill: none;
  stroke: var(--accent-light);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fin-card-chart path.fin-chart-area {
  fill: url(#fin-area-grad);
  opacity: 0.6;
}

.fin-card-chart-dot {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(0, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 12px var(--accent-glow-strong), 0 0 24px var(--accent-glow);
  z-index: 2;
}

.fin-card-chart-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--accent-glow);
  animation: fin-pulse 2s ease-in-out infinite;
}

.fin-card-footer {
  border-top: 1px solid var(--glass-border);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.fin-card-btn {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-glow);
  background: transparent;
  padding: 0.55rem 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-light);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.fin-card-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

@keyframes fin-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(2); opacity: 0; }
}

/* ═══ Premium Card (orb glow) ═══ */
.premium-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  padding: 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
}

.premium-card::before {
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  width: 240px;
  height: 240px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.premium-card > * {
  position: relative;
  z-index: 1;
}

/* ═══ Dashboard header video ═══ */
.dash-logo-video {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: contain;
  mix-blend-mode: var(--login-logo-blend);
  filter: var(--login-logo-filter);
  background: var(--glass-2);
  padding: 6px;
  box-shadow: 0 0 0 1px var(--glass-border), 0 4px 12px rgba(99, 102, 241, 0.15);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dash-logo-video:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 1px var(--glass-border), 0 6px 20px rgba(99, 102, 241, 0.25);
}

/* Pill tabs */
.login-tabs {
  display: flex;
  background: var(--login-tabs-bg);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  margin-bottom: 1.25rem;
}
.login-tab {
  flex: 1 1;
  padding: 0.5rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-slow);
  text-align: center;
}
.login-tab:hover { color: var(--text-secondary); }
.login-tab.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 2px 8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* Social button */
.login-social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: 1px solid var(--login-btn-border);
  border-top: 1px solid var(--login-btn-border-top);
  box-shadow: 0 4px 16px var(--accent-glow);
  transition: all var(--transition-slow);
  overflow: hidden;
  isolation: isolate;
}
.login-social-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
  pointer-events: none;
}
.login-social-btn:active::before { opacity: 1; }
.login-social-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 0;
}
.login-social-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow-strong);
}
.login-social-btn:hover::after { opacity: 1; }
.login-social-btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.login-social-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.login-social-btn > * { position: relative; z-index: 1; }

.login-social-icon {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 4px;
  padding: 2px;
}
.login-social-icon svg { width: 18px; height: 18px; display: block; }

/* Divider */
.login-divider {
  position: relative;
  margin: 1.25rem 0;
  text-align: center;
}
.login-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--glass-border);
}
.login-divider span {
  position: relative;
  display: inline-block;
  font-size: 0.6875rem;
  color: var(--text-muted);
  padding: 0 0.75rem;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.login-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-bottom: 0.25rem;
}
.login-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--login-input-bg);
  border: 1px solid var(--glass-border);
  outline: none;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}
.login-input::placeholder { color: var(--text-muted); }
.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px rgba(99,102,241,0.05);
  background: var(--login-input-focus-bg);
}

/* Password field wrapper */
.password-field {
  position: relative;
}
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input {
  padding-right: 2.5rem;
}
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all 0.2s ease;
  z-index: 2;
  line-height: 0;
}
.password-toggle:hover {
  color: var(--text-secondary);
  background: var(--glass-2);
}
.password-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Password eye (deprecated - use .password-toggle instead) */
.login-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  border-radius: 4px;
  transition: all var(--transition-fast);
}
.login-eye:hover { color: var(--text-secondary); background: var(--glass-2); }
.login-eye svg { width: 16px; height: 16px; }

/* Password strength */
.login-strength {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.login-strength-bar {
  flex: 1 1;
  height: 3px;
  border-radius: 2px;
  background: var(--glass-3);
  overflow: hidden;
}
.login-strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: all var(--transition-base);
}
.login-strength-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Submit button */
.login-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: 1px solid var(--login-btn-border);
  border-top: 1px solid var(--login-btn-border-top);
  box-shadow: 0 2px 12px var(--accent-glow);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 0.25rem;
}
.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow-strong);
}
.login-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* Links */
.login-links {
  text-align: center;
  margin-top: 1rem;
}
.login-links p {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.login-links button {
  background: none;
  border: none;
  color: var(--accent-light);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.75rem;
  transition: all var(--transition-fast);
  padding: 2px 4px;
  border-radius: 4px;
}
.login-links button:hover {
  color: var(--login-link-hover-color);
  background: var(--login-link-hover-bg);
}

/* Dev badge */
.login-dev {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}
.login-dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.6rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--glass-1);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}
.login-dev-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald-glow);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Error message */
.login-error {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  line-height: 1.5;
  font-weight: 500;
  background: var(--danger-bg);
  border: 1px solid var(--danger-bg);
  color: var(--danger-text);
}

/* Modal / Not registered */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--modal-overlay);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease-out;
}
.login-modal {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.75rem 1.5rem;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  animation: modalPop 0.3s ease-out;
}
.login-modal-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem;
  background: var(--warning-bg);
  color: var(--warning-text);
}
.login-modal-icon svg { width: 22px; height: 22px; }
.login-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}
.login-modal-text {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.6;
  margin-bottom: 0.25rem;
}
.login-modal-btn {
  width: 100%;
  margin-top: 0.75rem;
}

/* Overlay (Google loading) */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: var(--bg-deeper);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  animation: fadeIn 0.25s ease-out;
}
.login-overlay-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(99,102,241,0.12);
  border-top-color: var(--accent-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.login-overlay-text {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ── Verification Success Animation ───────────────────────── */
.login-verified {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: var(--bg-deeper);
  -webkit-backdrop-filter: blur(24px);
          backdrop-filter: blur(24px);
  animation: fadeIn 0.35s ease-out;
}
.login-verified-check {
  width: 88px;
  height: 88px;
  position: relative;
}
.login-verified-check svg {
  width: 100%;
  height: 100%;
  display: block;
}
.login-verified-circle-bg {
  fill: none;
  stroke: rgba(99,102,241,0.1);
  stroke-width: 3;
}
.login-verified-circle {
  fill: none;
  stroke: var(--accent-light);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  animation: verifiedDrawCircle 0.55s cubic-bezier(0.4,0,0.2,1) forwards;
}
.login-verified-checkmark {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: verifiedDrawCheck 0.35s 0.45s cubic-bezier(0.4,0,0.2,1) forwards;
}
.login-verified-glow {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  opacity: 0;
  animation: verifiedGlowIn 0.6s 0.2s ease-out forwards, verifiedPulse 2s 0.8s ease-in-out infinite;
}
.login-verified-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  animation: fadeUp 0.4s 0.6s ease-out both;
}
.login-verified-sub {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  animation: fadeUp 0.4s 0.8s ease-out both;
}
.login-verified-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.login-verified-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-light);
  opacity: 0;
  animation: verifiedParticle 1.2s 0.5s ease-out forwards;
}
.login-verified-particle:nth-child(1) { top: 30%; left: 42%; animation-delay: 0.55s; }
.login-verified-particle:nth-child(2) { top: 25%; left: 58%; animation-delay: 0.65s; }
.login-verified-particle:nth-child(3) { top: 40%; left: 38%; animation-delay: 0.75s; }
.login-verified-particle:nth-child(4) { top: 35%; left: 62%; animation-delay: 0.85s; }
.login-verified-particle:nth-child(5) { top: 20%; left: 50%; animation-delay: 0.70s; }
.login-verified-particle:nth-child(6) { top: 48%; left: 44%; animation-delay: 0.80s; }

@keyframes verifiedDrawCircle {
  to { stroke-dashoffset: 0; }
}
@keyframes verifiedDrawCheck {
  to { stroke-dashoffset: 0; }
}
@keyframes verifiedGlowIn {
  to { opacity: 1; }
}
@keyframes verifiedPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 0.3; }
}
@keyframes verifiedParticle {
  0% { opacity: 0; transform: translate(0,0) scale(1); }
  20% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, 30px), var(--dy, -40px)) scale(0); }
}

/* Verification code */
.verify-code-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  font-family: var(--font-mono);
  max-width: 200px;
  margin: 0 auto;
}

/* Footer */
.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════════
   Admin Shell & Sidebar — Obsidian Navigation
   ═══════════════════════════════════════════════════════════════ */

.admin-shell {
  display: flex;
  height: 100vh;
  background: var(--bg-deeper);
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg, #0b0c0f);
  border-right: 1px solid var(--border-default, rgba(255,255,255,0.05));
  width: var(--sidebar-width);
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 20;
  position: relative;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.06) transparent;
}
.sidebar::-webkit-scrollbar { width: 2px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 1px; }
.sidebar.collapsed { width: 56px; }

/* ── Mobile overlay mode ── */
.sidebar-overlay {
  display: none;
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 49;
    animation: fadeIn 0.2s ease-out;
  }
  .admin-main {
    margin-left: 0 !important;
  }
  .sidebar.collapsed {
    width: var(--sidebar-width);
  }
  .sidebar.collapsed .sidebar-item-label,
  .sidebar.collapsed .sidebar-section-title,
  .sidebar.collapsed .sidebar-user-info,
  .sidebar.collapsed .sidebar-search {
    display: block !important;
  }
  .sidebar.collapsed .sidebar-logout span {
    display: inline !important;
  }
  .sidebar.collapsed .sidebar-logout {
    justify-content: flex-start !important;
  }
}

/* ── Brand Area Showcase ── */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0.75rem 1.25rem;
  position: relative;
  flex-shrink: 0;
}

/* Ambient glow behind the video */
.sidebar-brand::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.sidebar-brand:hover::before {
  opacity: 1;
}

/* Subtle divider between brand and navigation */
.sidebar-brand::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--glass-border) 15%,
    var(--glass-border) 85%,
    transparent 100%
  );
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

/* Sidebar brand video */
.sidebar-logo-video {
  display: block;
  width: 150px;
  height: 100px;
  object-fit: contain;
  mix-blend-mode: var(--login-logo-blend);
  filter: var(--login-logo-filter);
  flex-shrink: 0;
  background: var(--glass-2);
  border-radius: 20px;
  padding: 14px;
  box-shadow:
    0 8px 32px rgba(99, 102, 241, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease;
}

.sidebar-logo-video:hover {
  transform: scale(1.05);
  box-shadow:
    0 12px 48px rgba(99, 102, 241, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Collapsed sidebar — flecha debajo del video */
@media (min-width: 769px) {
  .sidebar.collapsed .sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem 0.25rem;
  }
  .sidebar.collapsed .sidebar-brand-link {
    margin: 0;
  }
  .sidebar.collapsed .sidebar-logo-video {
    width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: 10px;
  }
  .sidebar.collapsed .sidebar-collapse {
    width: 20px;
    height: 20px;
    border-radius: 6px;
  }
  .sidebar.collapsed .sidebar-collapse svg {
    width: 12px;
    height: 12px;
    transform: rotate(180deg);
  }
}

/* Collapse button — en brand (expandido) y footer (colapsado) */
.sidebar-collapse {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.sidebar-brand .sidebar-collapse {
  background: transparent;
}
.sidebar-brand .sidebar-collapse:hover {
  background: var(--glass-2);
  color: var(--text-secondary);
  box-shadow: 0 0 0 1px var(--glass-border);
}
.sidebar-collapse svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Rotar flecha cuando el sidebar está colapsado */
.sidebar.collapsed .sidebar-collapse svg {
  transform: rotate(180deg);
}

/* Light mode brand adjustments */
[data-theme="light"] .sidebar-brand::before {
  opacity: 0.15;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}
[data-theme="light"] .sidebar-brand:hover::before {
  opacity: 0.25;
}
[data-theme="light"] .sidebar-brand::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.06) 15%,
    rgba(0, 0, 0, 0.06) 85%,
    transparent 100%
  );
}
[data-theme="light"] .sidebar-logo-video {
  box-shadow:
    0 4px 16px rgba(99, 102, 241, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .sidebar-logo-video:hover {
  box-shadow:
    0 8px 32px rgba(99, 102, 241, 0.15),
    0 4px 8px rgba(0, 0, 0, 0.06);
}
.sidebar.collapsed .sidebar-collapse svg { transform: rotate(180deg); }

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.15rem 0.65rem 0.35rem;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.sidebar-search:hover {
  border-color: var(--glass-border-hover);
  background: var(--glass-3);
}
.sidebar-search-icon {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.sidebar-search-input {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.7rem;
  outline: none;
  width: 100%;
}
.sidebar-search-input::placeholder { color: var(--text-muted); }
.sidebar-search-hint {
  font-size: 0.55rem;
  color: var(--text-muted);
  background: var(--glass-2);
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
  margin-left: auto;
}

.sidebar-search-placeholder {
  flex: 1 1;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1 1;
  padding: 0.25rem 0.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.sidebar-section { display: flex; flex-direction: column; gap: 1px; }

.sidebar-section-title {
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.65rem 0.65rem 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar.collapsed .sidebar-section-title { display: none; }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  transition: all 0.12s ease;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}
.sidebar-item:hover {
  background: var(--glass-2);
  color: var(--text-secondary);
}
.sidebar-item:hover .sidebar-item-icon {
  color: var(--text-secondary);
}
.sidebar-item:active {
  transform: scale(0.98);
}
.sidebar-item.active {
  color: var(--text-primary);
  background: var(--accent-glow);
}
.sidebar-item.active .sidebar-item-icon {
  color: var(--accent-light);
}
.sidebar-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.12s ease;
}
.sidebar-item-icon svg { width: 16px; height: 16px; }
.sidebar-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 450;
}
.sidebar.collapsed .sidebar-item-label { display: none; }

.sidebar-footer {
  padding: 0.5rem 0.6rem 0.65rem;
  border-top: 1px solid var(--glass-border);
  position: relative;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.35rem;
  border-radius: 6px;
  transition: background 0.12s ease;
  cursor: pointer;
}
.sidebar-user:hover {
  background: var(--glass-2);
}
.sidebar-user-avatar {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.5rem;
  font-weight: 600;
  flex-shrink: 0;
}
.sidebar-user-info { line-height: 1.25; min-width: 0; overflow: hidden; }
.sidebar-user-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-role {
  font-size: 0.55rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sidebar.collapsed .sidebar-user-info { display: none; }

/* Sidebar user dropdown */
.sidebar-user-dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0.6rem;
  right: 0.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.4rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 100;
  animation: fadeIn 0.15s ease-out;
}
.sidebar.collapsed .sidebar-user-dropdown {
  left: calc(100% + 6px);
  right: auto;
  min-width: 200px;
  bottom: 0;
}
.sidebar-user-dropdown-header {
  padding: 0.5rem 0.6rem;
}
.sidebar-user-dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 0.2rem 0;
}
.sidebar-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.12s;
}
.sidebar-user-dropdown-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.sidebar-user-dropdown-item svg {
  flex-shrink: 0;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--danger-text);
  opacity: 0.4;
  font-size: 0.6rem;
  cursor: pointer;
  transition: all 0.12s ease;
  width: 100%;
}
.sidebar-logout:hover {
  background: var(--danger-soft);
  opacity: 0.8;
}
.sidebar-logout svg { width: 11px; height: 11px; }
.sidebar.collapsed .sidebar-logout { justify-content: center; padding: 0.3rem; }
.sidebar.collapsed .sidebar-logout span { display: none; }

/* ── Mobile top bar ── */
.admin-mobile-bar {
  display: none;
}
@media (max-width: 768px) {
  .admin-mobile-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: var(--sidebar-bg, #0b0c0f);
    border-bottom: 1px solid var(--glass-border);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .admin-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s;
  }
  .admin-mobile-toggle:hover {
    background: var(--glass-2);
    color: var(--text-primary);
  }
  .admin-mobile-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
  }
}

.admin-main {
  flex: 1 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--admin-main-bg, var(--bg-deeper));
}
.admin-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4.5rem 2rem 1.5rem;
  min-height: 100vh;
  animation: fadeSlideIn 0.2s ease-out;
}

/* ═══════════════════════════════════════════════════════════════
   Chat Widget
   ═══════════════════════════════════════════════════════════════ */

.chat-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9998;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 24px var(--accent-glow-strong);
  transition: all var(--transition-base);
}
.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 36px var(--accent-glow-strong);
}
.chat-toggle svg { width: 22px; height: 22px; }

.chat-panel {
  position: fixed;
  bottom: 88px;
  right: 24px;
  z-index: 9997;
  width: 400px;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: fadeUp 0.2s ease-out;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-1);
}
.chat-header-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald-glow);
}

.chat-messages {
  flex: 1 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 250px;
  max-height: 420px;
}
.chat-msg {
  max-width: 90%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  line-height: 1.6;
  word-break: break-word;
}
.chat-msg-bot {
  align-self: flex-start;
  background: var(--glass-3);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  border-bottom-left-radius: 4px;
}
.chat-msg-user {
  align-self: flex-end;
  background: var(--accent-bg);
  border: 1px solid var(--glass-border-accent);
  color: var(--accent);
  border-bottom-right-radius: 4px;
}
.chat-msg-typing { opacity: 0.5; font-style: italic; }

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--glass-border);
  background: var(--glass-1);
}
.chat-input {
  flex: 1 1;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 0.8125rem;
  outline: none;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--text-muted); }
.chat-send {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}
.chat-send:disabled { opacity: 0.3; cursor: default; }
.chat-send svg { width: 14px; height: 14px; }

/* ═══════════════════════════════════════════════════════════════
   Dashboard — Tactical HUD Overrides
   ═══════════════════════════════════════════════════════════════ */

.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-gap: 1rem;
  gap: 1rem;
  margin-bottom: 1rem;
}
.dash-grid-full { grid-column: 1 / -1; }
.dash-widget {
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition-base);
}
.dash-widget:hover { border-color: var(--glass-border-hover); }
.dash-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.dash-widget-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.dash-widget-more {
  font-size: 0.6875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}
.dash-widget-more:hover { color: var(--accent-light); }

.dash-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.dash-stat:hover { background: var(--glass-2); }
.dash-stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-stat-icon svg { width: 20px; height: 20px; }
.dash-stat-value { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.dash-stat-label { font-size: 0.6875rem; color: var(--text-tertiary); }

.dash-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dash-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
}

.dash-access-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 0.75rem;
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
}
.dash-access-card:hover {
  background: var(--glass-3);
  border-color: var(--glass-border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.dash-access-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.dash-access-icon svg { width: 22px; height: 22px; }
.dash-access-label { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); }

@media (max-width: 768px) {
  .dash-grid { grid-template-columns: 1fr; }
  .admin-content { padding: 1rem; }
}

/* ═══════════════════════════════════════════════════════════════
   Animated Background Canvas
   ═══════════════════════════════════════════════════════════════ */

.animbg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   Page-specific shared styles (used by config, quality, sync, lens, etc)
   ═══════════════════════════════════════════════════════════════ */

/* Config page */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
  perspective: 800px;
}
.config-section {
  position: relative;
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  transform-style: preserve-3d;
  will-change: transform;
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    border-color var(--transition-base),
    box-shadow 0.4s ease;
}
.config-section[data-reveal="hidden"] {
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  filter: blur(4px);
  pointer-events: none;
}
.config-section[data-reveal="visible"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.config-section:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Glare overlay for 3D tilt */
.config-section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--glare-x, 50%) var(--glare-y, 50%),
    rgba(255,255,255,0.06) 0%,
    transparent 60%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}
.config-section:hover::before {
  opacity: 1;
}

/* Foil edge shimmer for 3D tilt */
.config-section::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255,255,255,0.04) 50%,
    transparent 60%
  );
  background-size: 200% 200%;
  background-position: var(--shimmer-pos, 0% 0%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 1px;
}
.config-section:hover::after {
  opacity: 1;
}

/* Inner stagger — rows reveal after section enters viewport */
.config-section[data-reveal="visible"] .config-section-header {
  opacity: 0;
  transform: translateY(-4px);
  animation: configRowFadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0ms;
}
.config-section[data-reveal="visible"] .config-row,
.config-section[data-reveal="visible"] .config-field {
  opacity: 0;
  transform: translateY(8px);
  animation: configRowFadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.config-section[data-reveal="visible"] .config-row:nth-child(1),
.config-section[data-reveal="visible"] .config-field:nth-child(1) { animation-delay: 40ms; }
.config-section[data-reveal="visible"] .config-row:nth-child(2),
.config-section[data-reveal="visible"] .config-field:nth-child(2) { animation-delay: 80ms; }
.config-section[data-reveal="visible"] .config-row:nth-child(3),
.config-section[data-reveal="visible"] .config-field:nth-child(3) { animation-delay: 120ms; }
.config-section[data-reveal="visible"] .config-row:nth-child(4),
.config-section[data-reveal="visible"] .config-field:nth-child(4) { animation-delay: 160ms; }
.config-section[data-reveal="visible"] .config-row:nth-child(5),
.config-section[data-reveal="visible"] .config-field:nth-child(5) { animation-delay: 200ms; }
.config-section[data-reveal="visible"] .config-row:nth-child(6),
.config-section[data-reveal="visible"] .config-field:nth-child(6) { animation-delay: 240ms; }
.config-section[data-reveal="visible"] .config-row:nth-child(7),
.config-section[data-reveal="visible"] .config-field:nth-child(7) { animation-delay: 280ms; }
.config-section[data-reveal="visible"] .config-row:nth-child(8),
.config-section[data-reveal="visible"] .config-field:nth-child(8) { animation-delay: 320ms; }

/* Hidden state for inner elements */
.config-section[data-reveal="hidden"] .config-row,
.config-section[data-reveal="hidden"] .config-field,
.config-section[data-reveal="hidden"] .config-section-header {
  opacity: 0;
  transform: translateY(8px);
}

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

/* Config shared element styles */
.config-section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}
.config-section-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.config-section-icon svg { width: 16px; height: 16px; }
.config-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}
.config-section-desc {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  margin-top: 0.1rem;
}
.config-field {
  margin-bottom: 0.85rem;
}
.config-field:last-child { margin-bottom: 0; }
.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}
.config-row + .config-row { border-top: 1px solid var(--glass-border); }
.config-row-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  flex: 1 1;
}
.config-row-desc {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* ── Scroll Progress Bar ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--cyan, #06b6d4) 50%,
    var(--accent-light) 100%
  );
  box-shadow:
    0 0 8px var(--accent-glow),
    0 0 20px var(--accent-glow-strong);
  z-index: 9999;
  pointer-events: none;
  will-change: width;
  transition: width 0.05s linear;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .config-section,
  .config-section[data-reveal="hidden"],
  .config-section[data-reveal="visible"] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .config-section::before,
  .config-section::after { display: none !important; }
  .config-section[data-reveal="visible"] .config-row,
  .config-section[data-reveal="visible"] .config-field,
  .config-section[data-reveal="visible"] .config-section-header,
  .config-section[data-reveal="hidden"] .config-row,
  .config-section[data-reveal="hidden"] .config-field,
  .config-section[data-reveal="hidden"] .config-section-header {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .scroll-progress { display: none !important; }
}

/* Quality & Sync pages */
.q-stat-card, .sync-stat-card {
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  transition: all var(--transition-base);
}
.q-stat-card:hover, .sync-stat-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.q-stat-value, .sync-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.q-stat-label, .sync-stat-label {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}
.q-score {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.q-score-bar {
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: var(--glass-3);
  overflow: hidden;
}
.q-score-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* Sync page */
.sync-tab-content { display: none; }
.sync-tab-content.active { display: block; animation: fadeIn 0.3s ease-out; }

/* Lens page */
.lens-section {
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.lens-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem;
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.lens-dropzone:hover {
  border-color: var(--accent);
  background: rgba(99,102,241,0.03);
}
.lens-dropzone.dragging {
  border-color: var(--accent);
  background: rgba(99,102,241,0.06);
  box-shadow: 0 0 30px var(--accent-glow);
}

/* Operations */
.ops-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  grid-gap: 0.65rem;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.ops-card {
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  text-align: center;
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
}
.ops-value { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.ops-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}

/* Webhooks page */
.webhook-event {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.webhook-event.success { background: var(--success-bg); color: var(--success-text); border-color: rgba(16,185,129,0.15); }
.webhook-event.warning { background: var(--warning-bg); color: var(--warning-text); border-color: rgba(245,158,11,0.15); }
.webhook-event.error { background: var(--danger-bg); color: var(--danger-text); border-color: rgba(239,68,68,0.15); }
.webhook-event.info { background: var(--info-bg); color: var(--info-text); border-color: rgba(99,102,241,0.15); }

/* ========================================================================
   NOTIFICATION PANEL — SOLID, NO TRANSPARENCY, NO GLASS
   ======================================================================== */

/* Mobile backdrop — FIXED full-screen overlay */
.notif-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 99998;
}
@media (max-width: 640px) { .notif-mobile-backdrop { display: block; } }
@media (min-width: 641px) { .notif-mobile-backdrop { display: none; } }

/* Bell icon trigger */
.notif-trigger { position: relative; }
.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: #fff;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #11141f;
}

/* Panel — PURE SOLID, NO GRADIENTS, NO GLASS */
.notif-panel {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 400px;
  max-height: calc(100vh - 80px);
  background: #11141f;
  border: 1px solid #2a2d3a;
  border-radius: 14px;
  box-shadow: 0 0 0 1px #2a2d3a, 0 12px 48px rgba(0,0,0,0.6);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notifSlideIn 0.18s ease-out;
}

/* Arrow — SOLID */
.notif-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: #11141f;
  border-left: 1px solid #2a2d3a;
  border-top: 1px solid #2a2d3a;
  transform: rotate(45deg);
}

/* Header — SOLID */
.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #1e2130;
  background: #11141f;
  flex-shrink: 0;
}
.notif-panel-title { font-size: 15px; font-weight: 600; color: #e2e8f0; }
.notif-panel-header-actions { display: flex; gap: 8px; align-items: center; }
.notif-clear-btn { font-size: 12px; color: #6366f1; cursor: pointer; background: none; border: none; }
.notif-clear-btn:hover { color: #818cf8; text-decoration: underline; }
.notif-close-btn {
  font-size: 18px; color: #64748b; cursor: pointer; background: none; border: none;
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
}
.notif-close-btn:hover { color: #e2e8f0; background: #1e2130; }

/* List — SOLID background, OPAQUE scrollbar */
.notif-panel-list {
  flex: 1 1;
  overflow-y: auto;
  background: #11141f;
  scrollbar-width: thin;
  scrollbar-color: #2a2d3a #11141f;
}
.notif-panel-list::-webkit-scrollbar { width: 4px; }
.notif-panel-list::-webkit-scrollbar-track { background: #11141f; }
.notif-panel-list::-webkit-scrollbar-thumb { background: #2a2d3a; border-radius: 2px; }

/* Item — SOLID */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: #11141f;
  border-bottom: 1px solid #181b28;
  transition: background 0.15s ease;
  cursor: pointer;
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #1a1d2e; }

/* Unread indicator bar */
.notif-item:not(.notif-read)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: #6366f1;
  border-radius: 0 2px 2px 0;
}

/* Read state */
.notif-read { opacity: 0.7; }
.notif-read::before { display: none; }

/* Dot color indicator */
.notif-item-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 4px; flex-shrink: 0;
}

/* Body text */
.notif-item-body { flex: 1 1; min-width: 0; }
.notif-item-title { font-size: 13px; font-weight: 600; color: #e2e8f0; margin-bottom: 2px; }
.notif-item-desc { font-size: 12px; color: #94a3b8; line-height: 1.4; margin-bottom: 4px; }
.notif-item-time { font-size: 11px; color: #64748b; }

/* Actions */
.notif-item-actions { display: flex; gap: 4px; align-items: flex-start; opacity: 0; transition: opacity 0.15s; }
.notif-item:hover .notif-item-actions { opacity: 1; }
.notif-mark-btn {
  background: #1e2130; border: none; color: #94a3b8; width: 24px; height: 24px;
  border-radius: 4px; font-size: 12px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
}
.notif-mark-btn:hover { background: #2a2d3a; color: #e2e8f0; }
.notif-mark-btn:first-child { color: #10b981; }

/* Empty state */
.notif-empty { padding: 40px 16px; text-align: center; color: #64748b; font-size: 13px; }

/* Animation */
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile — fullscreen solid */
@media (max-width: 640px) {
  .notif-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 100%;
    max-height: none;
    border-radius: 0;
    border: none;
  }
  .notif-panel::before { display: none; }
  .notif-panel-header { padding: 16px 20px; }
}

/* ═══════════════════════ Command Palette ═══════════════════════ */

.palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  animation: fadeIn 0.15s ease;
}

.palette {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 520px;
  max-height: 70vh;
  background: var(--bg-elevated, #15181f);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px var(--accent-glow),
    0 16px 48px rgba(0,0,0,0.5),
    0 32px 80px rgba(0,0,0,0.35);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: paletteIn 0.18s cubic-bezier(0.16,1,0.3,1);
}

@keyframes paletteIn {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.palette-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.palette-search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.palette-input {
  flex: 1 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  font-weight: 450;
}
.palette-input::placeholder { color: var(--text-muted); }

.palette-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-3) transparent;
}
.palette-body::-webkit-scrollbar { width: 3px; }
.palette-body::-webkit-scrollbar-track { background: transparent; }
.palette-body::-webkit-scrollbar-thumb { background: var(--glass-3); border-radius: 2px; }

.palette-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.1s ease;
  cursor: pointer;
}
.palette-item:hover {
  background: var(--glass-2);
  color: var(--text-primary);
}
.palette-item:active {
  background: var(--glass-3);
}

.palette-item-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.palette-item-icon svg {
  width: 16px;
  height: 16px;
}

.palette-item-label {
  flex: 1 1;
}

.palette-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.palette-empty strong {
  color: var(--text-secondary);
}

.palette-hint {}
.palette-hint-title {
  padding: 0.5rem 0.65rem 0.35rem;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.palette-footer {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
  font-size: 0.6rem;
  color: var(--text-muted);
}

.palette-footer-key {
  font-size: 0.55rem;
  padding: 1px 5px;
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: 3px;
  margin-right: 4px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Light mode palette */
[data-theme="light"] .palette {
  background: var(--bg-elevated, #ffffff);
  border-color: var(--glass-border, rgba(0,0,0,0.1));
  box-shadow:
    0 0 0 1px rgba(99,102,241,0.2),
    0 8px 32px rgba(0,0,0,0.12),
    0 24px 60px rgba(0,0,0,0.08);
}

/* Mobile: full-screen palette */
@media (max-width: 640px) {
  .palette {
    width: calc(100% - 2rem);
    top: 3rem;
    left: 1rem;
    right: 1rem;
    transform: none;
    max-height: calc(100vh - 6rem);
    animation: paletteMobileIn 0.2s cubic-bezier(0.16,1,0.3,1);
  }
  @keyframes paletteMobileIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

/* ═══════════════════════ Tenant Tree ═══════════════════════ */

.tree-node-wrapper {
  position: relative;
}

.tree-node-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem 0.6rem 0;
  border-radius: 0;
  transition: background 0.12s ease;
  position: relative;
  min-height: 48px;
}
.tree-node-row:hover {
  background: var(--glass-1);
}

.tree-connectors {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  pointer-events: none;
}
.tree-connector-line {
  width: 12px;
  border-right: 1.5px solid var(--glass-border);
  margin-right: 4px;
}
.tree-connector-corner {
  width: 12px;
  height: 50%;
  border-bottom: 1.5px solid var(--glass-border);
  border-left: 1.5px solid var(--glass-border);
  border-radius: 0 0 0 6px;
  align-self: flex-start;
  margin-right: 4px;
}
.tree-connector-last {
  border-left: none;
  border-bottom: none;
}

.tree-toggle {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 4px;
  color: var(--text-muted);
  transition: all 0.12s ease;
  margin-left: 2px;
}
.tree-toggle:hover {
  background: var(--glass-2);
  color: var(--text-secondary);
}
.tree-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform 0.15s ease;
}
.tree-toggle-hidden {
  visibility: hidden;
  pointer-events: none;
}

.tree-level-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tree-level-icon svg {
  width: 16px;
  height: 16px;
}

.tree-node-content {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tree-node-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tree-node-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.tree-node-level-badge {
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.tree-node-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tree-node-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.6rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.tree-node-meta-item svg {
  width: 10px;
  height: 10px;
}

.tree-node-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.tree-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transition: all 0.15s ease;
}
.tree-status-dot.active {
  background: var(--success);
  box-shadow: 0 0 6px rgba(16,185,129,0.4);
}
.tree-status-dot.inactive {
  background: var(--text-muted);
  opacity: 0.35;
}

.tree-children {
  position: relative;
}

/* Light mode overrides */
[data-theme="light"] .tree-node-row:hover {
  background: rgba(0,0,0,0.02);
}
[data-theme="light"] .tree-connector-line,
[data-theme="light"] .tree-connector-corner {
  border-color: rgba(0,0,0,0.1);
}

/* ── Connect SAT Modal ── */
.connect-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 32px;
  width: 440px;
  max-width: 92vw;
  box-shadow: var(--shadow-lg);
  animation: connectModalIn 0.2s ease;
}
@keyframes connectModalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.connect-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}
.connect-modal-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--accent-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.connect-modal-icon svg {
  width: 20px;
  height: 20px;
}
.connect-modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.connect-modal-desc {
  margin: 2px 0 0 0;
  font-size: .8rem;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.connect-modal-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 12px;
}
.connect-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.connect-modal-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}
.connect-modal-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  height: 44px;
}
.connect-modal-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.connect-modal-input-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.6;
}
.connect-modal-input {
  flex: 1 1;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  height: 100% !important;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.connect-modal-input::placeholder {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  opacity: 0.6;
}
.connect-modal-input:disabled {
  opacity: 0.5;
}

.connect-modal-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--danger-bg);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
  color: var(--danger-text);
  font-size: .8rem;
  line-height: 1.4;
}
.connect-modal-error svg {
  flex-shrink: 0;
  margin-top: 2px;
  width: 14px;
  height: 14px;
}

.connect-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.connect-modal-actions .btn {
  flex: 1 1;
  height: 44px;
  font-size: .85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Light mode adjustments */
[data-theme="light"] .connect-modal-input-wrapper {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
[data-theme="light"] .connect-modal-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 1px 2px rgba(0,0,0,0.04);
}
[data-theme="light"] .connect-modal-error {
  border-color: rgba(220,38,38,0.2);
}

/* ═══════════════════════════════════════════════════════════════
   Dashboard — Premium Refactor Components
   ═══════════════════════════════════════════════════════════════ */

/* ── Dashboard Hero ── */
.dash-hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.dash-hero-greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.dash-greeting-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.dash-greeting-sub {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 0.15rem;
}
.dash-hero-time {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  padding: 0.35rem 0.85rem;
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ── Quick Stats — Horizontal Strip ── */
.dash-quick-strip {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.dash-strip-card {
  flex: 1 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  min-width: 0;
  transition: background var(--transition-fast);
}
.dash-strip-card:hover {
  background: var(--glass-2);
}
.dash-strip-figure {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-feature-settings: tabular-nums lining-nums slashed-zero;
  font-variant-numeric: tabular-nums lining-nums slashed-zero;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}
.dash-strip-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.dash-strip-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-strip-sub {
  font-size: 0.6rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-strip-divider {
  width: 1px;
  background: var(--glass-border);
  flex-shrink: 0;
  align-self: stretch;
}
.dash-strip-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.dash-strip-score--low {
  background: rgba(16,185,129,0.12);
  color: #34d399;
}
.dash-strip-score--mid {
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
}
.dash-strip-score--high {
  background: rgba(239,68,68,0.12);
  color: #f87171;
}

@media (max-width: 768px) {
  .dash-quick-strip {
    flex-direction: column;
  }
  .dash-strip-divider {
    width: auto;
    height: 1px;
  }
  .dash-strip-card {
    padding: 0.85rem 1rem;
  }
}

/* ── Mission Control Core Layout ── */
.mc-root { position: relative; }
.mc-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mc-layout--atencion .mc-top {
  display: grid;
  grid-template-columns: 55% 42%;
  grid-gap: 1rem;
  gap: 1rem;
}
.mc-layout--crisis .mc-top {
  display: grid;
  grid-template-columns: 65% 33%;
  grid-gap: 1rem;
  gap: 1rem;
}
@media (max-width: 900px) {
  .mc-layout--atencion .mc-top,
  .mc-layout--crisis .mc-top {
    grid-template-columns: 1fr;
  }
}

/* ── Semaphore Bar ── */
.dash-semaphore {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.1rem;
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}
.dash-semaphore-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.dash-semaphore-item:hover {
  background: var(--glass-3);
}
.dash-semaphore-count {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  min-width: 1.2em;
  text-align: center;
}
.dash-semaphore-stale {
  color: var(--warning-text);
  font-size: 0.65rem;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ── Summary Cards (asymmetric, organic) ── */
.mc-summary-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr;
  grid-gap: 0.65rem;
  gap: 0.65rem;
}
@media (max-width: 768px) { .mc-summary-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .mc-summary-grid { grid-template-columns: 1fr; } }

.mc-summary-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  transition: all var(--transition-base);
  overflow: hidden;
}
.mc-summary-card:hover {
  background: var(--glass-2);
}
/* subtle ambient glow per card variant */
.mc-summary-card--accent::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -30%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.mc-summary-card--warning::before {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.mc-summary-card-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
  position: relative;
  z-index: 1;
}
.mc-summary-card-value {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-feature-settings: tabular-nums lining-nums slashed-zero;
  font-variant-numeric: tabular-nums lining-nums slashed-zero;
  letter-spacing: -0.03em;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}
.mc-summary-card-sublabel {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  position: relative;
  z-index: 1;
}

/* ── Alert Cards ── */
.mc-alert-cards {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
}
.mc-alert-cards-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #f59e0b;
  margin-bottom: 0.75rem;
}
.mc-alert-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
}
.mc-alert-card {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.mc-alert-card:hover { background: var(--glass-2); }
.mc-alert-card--high {
  background: rgba(249,115,22,0.05);
  border: 1px solid rgba(249,115,22,0.12);
  border-left: 3px solid #f97316;
}
.mc-alert-card--high:hover { background: rgba(249,115,22,0.09); }
.mc-alert-card--critical {
  background: rgba(239,68,68,0.05);
  border: 1px solid rgba(239,68,68,0.12);
  border-left: 3px solid #ef4444;
}
.mc-alert-card--critical:hover { background: rgba(239,68,68,0.09); }
.mc-alert-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}
.mc-alert-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
}
.mc-alert-card-severity {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mc-alert-card-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.mc-alerts-empty {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem 0;
}

/* ── War Room ── */
.mc-warroom {
  border: 1px solid rgba(239,68,68,0.2);
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
}
.mc-warroom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.mc-warroom-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mc-warroom-count {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  font-weight: 700;
}
.mc-warroom-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 320px;
  overflow-y: auto;
}
.mc-warroom-item {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(239,68,68,0.04);
  border: 1px solid rgba(239,68,68,0.15);
  border-left: 4px solid #ef4444;
  cursor: pointer;
  transition: background 0.15s ease;
}
.mc-warroom-item:hover { background: rgba(239,68,68,0.08); }
.mc-warroom-item-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.mc-warroom-item-info { flex: 1 1; }
.mc-warroom-item-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.mc-warroom-item-sla {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.mc-warroom-item-sla--ok { background: rgba(245,158,11,0.1); color: #f59e0b; }
.mc-warroom-item-sla--expired {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
  animation: badgePulse 1.5s ease-in-out infinite;
}
.mc-warroom-item-time {
  font-size: 0.58rem;
  color: var(--text-muted);
}

/* ── Activity Feed ── */
.mc-activity {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
}
.mc-activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.mc-activity-title { font-size: 0.75rem; font-weight: 600; color: var(--text-primary); }
.mc-activity-count { font-size: 0.6rem; color: var(--text-muted); }
.mc-activity-list { display: flex; flex-direction: column; gap: 0.5rem; }
.mc-activity-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  background: var(--glass-1);
  border: 1px solid var(--glass-2);
  cursor: pointer;
  transition: background 0.15s ease;
}
.mc-activity-item:hover { background: var(--accent-bg); }
.mc-activity-item-entry {
  animation: fadeSlideIn 0.25s ease-out both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.mc-activity-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mc-activity-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  flex: 1 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mc-activity-time {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.mc-activity-empty {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem 0;
}

/* ── KPIs Mini-col (crisis mode) ── */
.mc-kpis { display: flex; flex-direction: column; gap: 0.65rem; }
.mc-kpi-card {
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  background: var(--bg-elevated);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.mc-kpi-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.mc-kpi-value {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-mono);
  font-feature-settings: tabular-nums lining-nums;
  font-variant-numeric: tabular-nums lining-nums;
}

/* ── Dashboard Split Layout ── */
.dash-split {
  display: grid;
  grid-template-columns: 7fr 5fr;
  grid-gap: 1.25rem;
  gap: 1.25rem;
}
@media (max-width: 900px) { .dash-split { grid-template-columns: 1fr; } }

/* ── Dashboard Footer ── */
.dash-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

/* ── Counter Animation ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.count-up {
  animation: countUp 0.4s ease-out both;
}

/* ── Keyframe for badge pulse ── */
@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── SVG Draw line animation ── */
@keyframes drawLine {
  from { stroke-dashoffset: 400; }
  to { stroke-dashoffset: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   Shared Page Components — Toolbar, Detail Header, Spinner, Empty
   ═══════════════════════════════════════════════════════════════ */

/* ── Page Toolbar (search/filter controls) ── */
.page-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

/* ── Detail Header (back link + title + meta) ── */
.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.detail-header-content { flex: 1 1; }
.detail-header-back {
  font-size: 0.75rem;
  color: var(--accent-light);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity var(--transition-fast);
}
.detail-header-back:hover { opacity: 0.8; }
.detail-header-back svg { width: 14px; height: 14px; }

/* ── Loading State ── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  gap: 1rem;
}
.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--glass-3);
  border-top-color: var(--accent-light);
  animation: spin 0.8s linear infinite;
}
.spinner-sm { width: 18px; height: 18px; border-width: 2px; }
.spinner-lg { width: 36px; height: 36px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Text utilities (extended) ── */
.text-primary { color: var(--text-primary); }
.italic { font-style: italic; }

/* ── Alert detail page ── */
.glass-card.priority-card,
.glass-card.status-card,
.glass-card.info-card {
  padding: 1rem 1.5rem;
  text-align: center;
}
.alert-69b {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  margin-top: 0.5rem;
}
.obs-item {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}
.obs-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  gap: 0.75rem;
  color: var(--text-muted);
}
.empty-state-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.4;
}
.empty-state-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.empty-state-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 320px;
}

/* ═══════════════════════════════════════════════════════════════
   Dashboard Home — Stat & Quick Cards (Real Data)
   ═══════════════════════════════════════════════════════════════ */
.dash-stat-card {
  background: #111827;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: all var(--transition-base);
}
.dash-stat-card:hover {
  border-color: var(--glass-border-accent);
}
/* (duplicate removed — original definitions at lines 2759-2767) */

.dash-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
}

.quick-card {
  background: #111827;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition-base);
  cursor: pointer;
}
.quick-card:hover {
  border-color: var(--glass-border-accent);
  transform: translateY(-1px);
}
.quick-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.quick-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}
.quick-card-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}
.quick-card-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════
   Tab Navigation (Vault + general use)
   ═══════════════════════════════════════════════════════════════ */
.tab-nav {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0;
  overflow-x: auto;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tab-btn:hover {
  color: var(--text-secondary);
  border-bottom-color: var(--glass-border-hover);
}
.tab-active {
  color: var(--accent-light);
  border-bottom-color: var(--accent-light);
}
.tab-active:hover {
  color: var(--accent-light);
  border-bottom-color: var(--accent-light);
}

/* ═══════════════════════════════════════════════════════════════
   Timeline (Custody Chain)
   ═══════════════════════════════════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--glass-border);
}
.timeline-item {
  position: relative;
  padding: 0.5rem 0 1rem 1rem;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -0.55rem;
  top: 0.65rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-deep);
  z-index: 1;
}

/* ═══ Lock Button (Uiverse.io/mobinkakei adapted) ═══ */
.btn-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff5b5b;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.3s ease;
  flex-shrink: 0;
}
.btn-lock svg {
  fill: none;
  transform: translate3d(0, 0, 0);
  width: 16px;
  height: 16px;
}
.btn-lock svg .bling {
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 3;
  stroke-dashoffset: 15;
  transition: all 0.3s ease;
}
.btn-lock svg .lock {
  stroke: #fff;
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 36;
  transition: all 0.4s ease;
}
.btn-lock svg .lockb {
  fill: #fff;
  fill-rule: evenodd;
  clip-rule: evenodd;
  transform: rotate(8deg);
  transform-origin: 14px 20px;
  transition: all 0.2s ease;
}
.btn-lock.locked {
  background: #20cca5;
}
.btn-lock.locked svg .bling {
  animation: bling6132 0.3s linear forwards;
  animation-delay: 0.2s;
}
.btn-lock.locked svg .lock {
  stroke-dasharray: 48;
  animation: locked-anim 0.3s linear forwards;
}
.btn-lock.locked svg .lockb {
  transform: rotate(0);
  transform-origin: 14px 22px;
}
@keyframes bling6132 {
  50% { stroke-dasharray: 3; stroke-dashoffset: 12; }
  100% { stroke-dasharray: 3; stroke-dashoffset: 9; }
}
@keyframes locked-anim {
  50% { transform: translateY(1px); }
}

