:root {
  --bg1: #0a0e17;
  --bg2: #111827;
  --bg3: #1a2332;
  --bg4: #1e293b;
  --bg5: #243044;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-glow: rgba(249,115,22,0.15);
  --accent-dim: rgba(249,115,22,0.08);
  --text1: #f1f5f9;
  --text2: #94a3b8;
  --text3: #64748b;
  --green: #10b981;
  --orange: #f59e0b;
  --red: #ef4444;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --border: #2d3a4a;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.3);
  --sidebar-width: 250px;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Inter','Segoe UI',system-ui,sans-serif; background:var(--bg1); color:var(--text1); height:100vh; overflow:hidden; }
#app { display:none; width:100%; height:100vh; }

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════ */

#loginPage {
  position:fixed; top:0; left:0; width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  z-index:1000;
  background: #0b0d10;
  overflow:hidden;
}

/* Animated canvas background */
#loginCanvas {
  position:absolute; top:0; left:0; width:100%; height:100%;
  z-index:1;
  opacity:0.6;
}

/* Grid overlay */
.login-grid-bg {
  position:absolute; top:0; left:0; width:100%; height:100%;
  z-index:2;
  background-image:
    linear-gradient(rgba(249,115,22,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249,115,22,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: loginGridMove 8s linear infinite;
  pointer-events:none;
}

@keyframes loginGridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* Glow orbs */
#loginPage::before,
#loginPage::after {
  content:'';
  position:absolute;
  border-radius:50%;
  filter:blur(80px);
  pointer-events:none;
  z-index:1;
}
#loginPage::before {
  width:500px; height:500px;
  top:-150px; right:-100px;
  background:rgba(249,115,22,0.12);
  animation: loginOrbA 12s ease-in-out infinite alternate;
}
#loginPage::after {
  width:400px; height:400px;
  bottom:-100px; left:-100px;
  background:rgba(59,130,246,0.08);
  animation: loginOrbB 12s ease-in-out infinite alternate;
}

@keyframes loginOrbA {
  0% { transform: translate(0, 0) scale(1); opacity:0.6; }
  100% { transform: translate(-80px, 80px) scale(1.3); opacity:1; }
}
@keyframes loginOrbB {
  0% { transform: translate(0, 0) scale(1); opacity:0.4; }
  100% { transform: translate(80px, -60px) scale(1.2); opacity:0.8; }
}

/* Login Card */
.login-card {
  position:relative;
  z-index:10;
  width:420px;
  background:rgba(18,20,24,0.85);
  backdrop-filter:blur(24px) saturate(1.4);
  -webkit-backdrop-filter:blur(24px) saturate(1.4);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:20px;
  padding:0;
  box-shadow:
    0 24px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(249,115,22,0.06),
    inset 0 1px 0 rgba(255,255,255,0.04);
  overflow:hidden;
  animation: loginCardIn 0.6s ease-out;
}

@keyframes loginCardIn {
  from { opacity:0; transform:translateY(30px) scale(0.97); }
  to { opacity:1; transform:translateY(0) scale(1); }
}

/* Accent bar */
.login-accent-bar {
  height:3px;
  background:linear-gradient(90deg, #f97316, #fb923c, #f97316, transparent);
  background-size:200% 100%;
  animation: loginBarShimmer 3s linear infinite;
}

@keyframes loginBarShimmer {
  0% { background-position:200% 0; }
  100% { background-position:-200% 0; }
}

/* Brand section */
.login-brand {
  text-align:center;
  padding:36px 40px 20px;
}

.login-logo-wrap {
  position:relative;
  display:inline-block;
  margin-bottom:14px;
}

.login-logo {
  height:52px; width:auto;
  position:relative;
  z-index:2;
  filter:drop-shadow(0 0 20px rgba(249,115,22,0.3));
}

.login-logo-pulse {
  position:absolute;
  top:50%; left:50%;
  width:80px; height:80px;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:rgba(249,115,22,0.08);
  animation: loginPulse 2.5s ease-in-out infinite;
  z-index:1;
}

@keyframes loginPulse {
  0%, 100% { transform:translate(-50%,-50%) scale(0.8); opacity:0.4; }
  50% { transform:translate(-50%,-50%) scale(1.5); opacity:0; }
}

.login-title {
  margin:0;
  font-size:26px;
  font-weight:700;
  letter-spacing:-0.5px;
  background:linear-gradient(135deg, #f97316, #fb923c);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

.login-subtitle {
  margin:4px 0 0;
  font-size:12px;
  color:var(--text3);
  letter-spacing:1px;
  text-transform:uppercase;
}

/* Status indicator */
.login-status {
  display:flex; align-items:center; justify-content:center;
  gap:8px;
  margin-bottom:20px;
  padding:0 40px;
}

.login-status-dot {
  width:7px; height:7px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 8px rgba(34,197,94,0.5);
  animation: loginDotPulse 2s ease-in-out infinite;
}

@keyframes loginDotPulse {
  0%, 100% { opacity:1; box-shadow:0 0 8px rgba(34,197,94,0.5); }
  50% { opacity:0.5; box-shadow:0 0 4px rgba(34,197,94,0.2); }
}

.login-status-text {
  font-size:11px;
  color:rgba(255,255,255,0.4);
  letter-spacing:0.5px;
}

/* Login form */
.login-form {
  padding:0 40px 28px;
}

.login-field {
  margin-bottom:18px;
}

.login-label {
  display:block;
  font-size:11px;
  font-weight:600;
  color:rgba(255,255,255,0.5);
  margin-bottom:6px;
  letter-spacing:0.5px;
  text-transform:uppercase;
}

.login-input-wrap {
  position:relative;
  display:flex;
  align-items:center;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;
  transition:all 0.25s ease;
}

.login-input-wrap:focus-within {
  border-color:rgba(249,115,22,0.4);
  background:rgba(249,115,22,0.04);
  box-shadow:0 0 0 4px rgba(249,115,22,0.06);
}

.login-input-icon {
  flex-shrink:0;
  color:rgba(255,255,255,0.2);
  margin-left:14px;
  transition:color 0.25s;
}

.login-input-wrap:focus-within .login-input-icon {
  color:rgba(249,115,22,0.6);
}

.login-input-wrap input {
  flex:1;
  background:transparent;
  border:none;
  outline:none;
  color:#e4e4e7;
  font-size:13px;
  padding:12px 14px;
  font-family:inherit;
}

.login-input-wrap input::placeholder {
  color:rgba(255,255,255,0.15);
}

#loginBtn {
  width:100%;
  display:flex; align-items:center; justify-content:center;
  gap:8px;
  margin-top:24px;
  padding:13px 20px;
  background:linear-gradient(135deg, #f97316, #ea580c);
  color:white;
  border:none;
  border-radius:10px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.25s ease;
  position:relative;
  overflow:hidden;
}

#loginBtn::before {
  content:'';
  position:absolute;
  top:0; left:-50%;
  width:200%; height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform:skewX(-20deg) translateX(-100%);
  transition:transform 0.6s;
}

#loginBtn:hover::before {
  transform:skewX(-20deg) translateX(100%);
}

#loginBtn:hover {
  background:linear-gradient(135deg, #fb923c, #f97316);
  box-shadow:0 6px 24px rgba(249,115,22,0.35);
  transform:translateY(-1px);
}

#loginBtn:active {
  transform:translateY(0);
  box-shadow:0 2px 8px rgba(249,115,22,0.25);
}

.login-btn-text {
  position:relative;
  z-index:1;
}

.login-btn-arrow {
  position:relative;
  z-index:1;
  transition:transform 0.25s ease;
}

#loginBtn:hover .login-btn-arrow {
  transform:translateX(4px);
}

/* Error message */
.error-msg {
  margin-top:14px;
  padding:10px 14px;
  background:rgba(239,68,68,0.1);
  border:1px solid rgba(239,68,68,0.2);
  border-radius:8px;
  color:#ef4444;
  font-size:12px;
  text-align:center;
  display:none;
}

/* Footer */
.login-footer {
  display:flex; align-items:center; justify-content:center;
  gap:8px;
  padding:16px 40px 20px;
  border-top:1px solid rgba(255,255,255,0.04);
  font-size:10px;
  color:rgba(255,255,255,0.2);
  letter-spacing:0.5px;
}

.login-footer-dot {
  opacity:0.3;
}
.error-msg { color:var(--red); font-size:12px; margin-top:8px; display:none; }

/* ─── Form Groups (used across app pages) ─── */
.form-group { margin-bottom:20px; text-align:left; }
.form-group label { display:block; font-size:12px; font-weight:600; color:var(--text2); margin-bottom:8px; text-transform:uppercase; letter-spacing:0.5px; }
.form-group input, .form-group select { width:100%; padding:12px; background:var(--bg3); border:1px solid var(--border); border-radius:8px; color:var(--text1); font-size:14px; transition:border-color 0.2s; }
.form-group input:focus, .form-group select:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-glow); }

/* ─── SIDEBAR ─── */
#sidebar { width:var(--sidebar-width); min-width:var(--sidebar-width); background:var(--bg2); border-right:1px solid var(--border); display:flex; flex-direction:column; height:100vh; }
#sidebar-header { padding:14px 16px; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:10px; }
#sidebar-logo { height:32px; width:auto; flex-shrink:0; }
#sidebar-title { font-size:14px; font-weight:700; color:var(--accent); line-height:1.2; }
#sidebar-subtitle { font-size:9px; color:var(--text3); letter-spacing:1px; text-transform:uppercase; }

#tenantSwitcher { padding:10px 12px; border-bottom:1px solid var(--border); }
#tenantSwitcher select { width:100%; padding:6px 10px; background:var(--bg3); border:1px solid var(--border); border-radius:6px; color:var(--text1); font-size:11px; cursor:pointer; }
#tenantSwitcher select:focus { outline:none; border-color:var(--accent); }
#tenantLabel { font-size:9px; color:var(--text3); text-transform:uppercase; letter-spacing:1px; margin-bottom:4px; display:flex; align-items:center; gap:4px; }

#nav { flex:1; overflow-y:auto; padding:4px 8px; position:relative; }
#nav::-webkit-scrollbar { width:6px; }
#nav::-webkit-scrollbar-track { background:transparent; }
#nav::-webkit-scrollbar-thumb { background:rgba(100,116,139,0.4); border-radius:3px; }
#nav::-webkit-scrollbar-thumb:hover { background:rgba(100,116,139,0.7); }
/* Scroll-more indicator: gradient fade at bottom edge */
#nav::after {
  content:'';
  position:sticky;
  bottom:0; left:0; right:0;
  display:block;
  height:32px;
  background:linear-gradient(transparent 20%, var(--bg2));
  pointer-events:none;
  z-index:2;
  opacity:0;
  transition:opacity 0.3s;
}
#nav.can-scroll::after { opacity:1; }

/* ─── NAV SECTION COLORS ─── */
.nav-section {
  font-size:9px;
  text-transform:uppercase;
  color:var(--text3);
  padding:7px 10px 2px;
  letter-spacing:1.5px;
  font-weight:700;
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
}
.nav-section::before {
  content:'';
  width:2px;
  height:10px;
  border-radius:1px;
  flex-shrink:0;
}
/* Section-specific colors */
.nav-section[data-section="home"]::before { background:var(--accent); }
.nav-section[data-section="monitoring"]::before { background:var(--blue); }
.nav-section[data-section="alerts"]::before { background:var(--red); }
.nav-section[data-section="threat"]::before { background:var(--purple); }
.nav-section[data-section="incidents"]::before { background:var(--orange); }
.nav-section[data-section="assets"]::before { background:var(--green); }
.nav-section[data-section="analytics"]::before { background:#06b6d4; }
.nav-section[data-section="knowledge"]::before { background:var(--text3); }
.nav-section[data-section="admin"]::before { background:#eab308; }
.nav-item { padding:4px 10px; margin:1px 0; border-radius:6px; cursor:pointer; font-size:11px; color:var(--text2); transition:all 0.15s; display:flex; align-items:center; gap:8px; }
.nav-item:hover { background:var(--accent-dim); color:var(--text1); }
.nav-item.active { background:var(--accent); color:white; }
.nav-item .nav-dot { width:5px; height:5px; border-radius:50%; background:var(--text3); flex-shrink:0; }
.nav-item.active .nav-dot { background:white; }
.nav-item .nav-icon { width:14px; text-align:center; flex-shrink:0; font-size:11px; opacity:0.7; }
.nav-item.active .nav-icon { opacity:1; }

#sidebar-footer { padding:12px 14px; border-top:1px solid var(--border); font-size:10px; color:var(--text3); display:flex; justify-content:space-between; align-items:center; }
#sidebar-footer .version { font-size:9px; }
#sidebar-footer .status-dot { width:6px; height:6px; border-radius:50%; background:var(--green); display:inline-block; margin-right:4px; }
@keyframes pulse { 0%, 100% { opacity:1; } 50% { opacity:0.3; } }

/* ─── CONTENT ─── */
#content { flex:1; display:flex; flex-direction:column; overflow:hidden; background:var(--bg1); }
#header { background:var(--bg2); border-bottom:1px solid var(--border); padding:12px 24px; display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
#header-left h1 { font-size:15px; font-weight:600; color:var(--text1); }
#header-left .breadcrumb { font-size:10px; color:var(--text3); margin-top:1px; }
#header-right { display:flex; align-items:center; gap:14px; }
#header-right .time { font-size:11px; color:var(--text3); font-variant-numeric:tabular-nums; }
.profile-btn { display:flex; align-items:center; gap:6px; cursor:pointer; padding:5px 10px; border-radius:6px; background:var(--bg3); border:1px solid var(--border); color:var(--text1); font-size:11px; position:relative; transition:border-color 0.2s; }
.profile-btn:hover { border-color:var(--accent); }
.profile-avatar { width:26px; height:26px; border-radius:50%; background:var(--accent); display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:white; flex-shrink:0; }
.dropdown { position:absolute; top:100%; right:0; margin-top:4px; background:var(--bg2); border:1px solid var(--border); border-radius:8px; min-width:170px; box-shadow:0 8px 24px rgba(0,0,0,0.4); z-index:100; display:none; }
.dropdown.show { display:block; }
.dropdown-item { padding:8px 14px; font-size:11px; color:var(--text2); cursor:pointer; display:flex; align-items:center; gap:8px; }
.dropdown-item:hover { background:var(--bg3); color:var(--text1); }
.dropdown-divider { border-top:1px solid var(--border); margin:4px 0; }
#page { flex:1; overflow-y:auto; padding:20px 24px; }
.page { display:none; }
.page.active { display:block; }
/* Hide all pages until JS init to prevent flash of wrong page */
body:not(.init) .page { display:none !important; }

/* ─── PAGE HEADERS ─── */
.page-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:10px; gap:12px; }
.page-header .breadcrumb { font-size:10px; color:var(--text3); margin-bottom:2px; }

/* ─── LOADING ─── */
.loading-placeholder { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:50px; gap:12px; color:var(--text3); font-size:12px; }
.loading-spinner { width:24px; height:24px; border:2px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:spin 0.8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ─── STAT CARDS ─── */
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin-bottom:20px; }
.stat-card { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius); padding:16px; transition:all 0.2s; position:relative; overflow:hidden; }
.stat-card::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; background:var(--accent); opacity:0; transition:opacity 0.2s; }
.stat-card:hover { border-color:var(--accent); transform:translateY(-1px); }
.stat-card:hover::before { opacity:1; }
.stat-card .label { font-size:10px; color:var(--text3); text-transform:uppercase; margin-bottom:8px; font-weight:600; letter-spacing:0.5px; }
.stat-card .value { font-size:28px; font-weight:700; margin-bottom:4px; }
.stat-card .sub { font-size:10px; color:var(--text2); margin-top:0px; }
.stat-card .stat-val { display:block; font-size:24px; font-weight:700; color:var(--accent); margin-bottom:2px; }
.stat-card .stat-lbl { display:block; font-size:9px; color:var(--text3); text-transform:uppercase; letter-spacing:0.4px; }
.card { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius); padding:16px; margin-bottom:14px; }
.card h3 { font-size:13px; margin-bottom:12px; color:var(--text1); }

/* ─── INVESTIGATIONS CARDS ─── */
.inv-card { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); padding:0; margin-bottom:10px; transition:all 0.2s; cursor:pointer; overflow:hidden; position:relative; }
.inv-card:hover { border-color:var(--accent); transform:translateY(-1px); box-shadow:0 4px 20px rgba(0,0,0,0.18); }
.inv-sev-strip { position:absolute; top:0; left:0; bottom:0; width:4px; }
.inv-header { padding:14px 18px 10px; }
.inv-title-row { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; flex-wrap:wrap; }
.inv-title { font-size:13px; color:var(--text1); font-weight:600; line-height:1.4; flex:1; min-width:0; }
.inv-title:hover { color:var(--accent); }
.inv-badge-row { display:flex; gap:5px; flex-wrap:wrap; align-items:center; }
.inv-meta-bar { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:8px; padding-top:8px; border-top:1px solid var(--border); }
.inv-meta-tag { display:inline-flex; align-items:center; gap:3px; font-size:9px; color:var(--text3); background:var(--bg3); padding:2px 8px; border-radius:4px; }
.inv-meta-tag strong { color:var(--text2); font-weight:600; }
.inv-meta-tag .dot { color:var(--text3); opacity:0.3; }
.inv-body { padding:0 18px 12px; }
.inv-detail-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:6px; margin-bottom:8px; }
.inv-detail-item { background:var(--bg3); border-radius:6px; padding:8px 10px; border-left:2px solid transparent; transition:border-color 0.15s; }
.inv-detail-item:hover { border-left-color:var(--accent-dim); }
.inv-detail-label { display:block; font-size:8px; color:var(--text3); text-transform:uppercase; letter-spacing:0.4px; margin-bottom:2px; font-weight:600; }
.inv-detail-value { font-size:11px; color:var(--text1); font-weight:500; }
.inv-detail-value.mono { font-family:'SF Mono','Cascadia Code',monospace; font-size:10px; color:var(--text2); }
.inv-mitre { margin:6px 0 0; display:flex; gap:3px; flex-wrap:wrap; }
.inv-desc { font-size:10px; color:var(--text3); line-height:1.5; margin-top:6px; background:var(--bg3); border-radius:6px; padding:8px 10px; max-height:36px; overflow:hidden; position:relative; }
.inv-desc::after { content:''; position:absolute; bottom:0; right:0; width:40px; height:18px; background:linear-gradient(to right,transparent,var(--bg3)); }
.inv-footer { display:flex; justify-content:space-between; align-items:center; padding:8px 18px; background:var(--bg3); border-top:1px solid var(--border); }
.inv-timestamp { font-size:9px; color:var(--text4); display:flex; align-items:center; gap:4px; }
.inv-actions { display:flex; gap:6px; align-items:center; }
.inv-click-hint { font-size:9px; color:var(--accent); opacity:0.6; transition:opacity 0.15s; display:flex; align-items:center; gap:4px; }
.inv-card:hover .inv-click-hint { opacity:1; }
.inv-click-hint .arrow { font-size:11px; transition:transform 0.15s; }
.inv-card:hover .inv-click-hint .arrow { transform:translateX(2px); }

/* Investigation status badges */
.inv-status { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:4px; font-size:9px; font-weight:600; text-transform:uppercase; letter-spacing:0.4px; }
.inv-status-new { background:rgba(239,68,68,0.12); color:var(--red); }
.inv-status-triage { background:rgba(168,85,247,0.12); color:#a855f7; }
.inv-status-investigating { background:rgba(59,130,246,0.12); color:#3b82f6; }
.inv-status-contained { background:rgba(249,115,22,0.12); color:var(--orange); }
.inv-status-recovery { background:rgba(6,182,212,0.12); color:#06b6d4; }
.inv-status-closed { background:rgba(34,197,94,0.12); color:var(--green); }
.inv-status-eradication { background:rgba(239,68,68,0.12); color:var(--red); }

/* Investigation stat cards */
.inv-stat-card { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius); padding:12px 14px; min-width:100px; flex:1; transition:all 0.15s; }
.inv-stat-card:hover { border-color:var(--accent-dim); }
.inv-stat-val { font-size:22px; font-weight:700; color:var(--text1); display:block; line-height:1.1; margin-bottom:2px; }
.inv-stat-label { font-size:9px; color:var(--text3); text-transform:uppercase; letter-spacing:0.4px; display:block; font-weight:600; }

/* ─── TABLES ─── */
table { width:100%; border-collapse:collapse; }
th { text-align:left; padding:8px 10px; font-size:10px; text-transform:uppercase; color:var(--text3); border-bottom:2px solid var(--border); font-weight:600; letter-spacing:0.5px; }
td { padding:8px 10px; font-size:11px; border-bottom:1px solid var(--border); }
tr:hover td { background:rgba(249,115,22,0.03); }

/* ─── BUTTONS ─── */
.btn { padding:7px 14px; border:none; border-radius:6px; cursor:pointer; font-size:11px; font-weight:600; transition:all 0.2s; display:inline-flex; align-items:center; gap:5px; }
.btn-primary { background:var(--accent); color:white; }
.btn-primary:hover { background:var(--accent-hover); box-shadow:0 4px 12px var(--accent-glow); }
.btn-outline { background:transparent; border:1px solid var(--border); color:var(--text2); }
.btn-outline:hover { border-color:var(--accent); color:var(--text1); }
.btn-sm { padding:4px 8px; font-size:10px; }
.btn-green { background:var(--green); color:white; }
.btn-green:hover { background:#059669; }
.btn-danger { background:var(--red); color:white; }
.btn-danger:hover { background:#dc2626; }

/* ─── BADGES ─── */
.badge { padding:2px 7px; border-radius:4px; font-size:9px; font-weight:600; white-space:nowrap; }
.badge-red { background:rgba(239,68,68,0.15); color:var(--red); }
.badge-orange { background:rgba(245,158,11,0.15); color:var(--orange); }
.badge-green { background:rgba(16,185,129,0.15); color:var(--green); }
.badge-blue { background:rgba(59,130,246,0.15); color:var(--blue); }
.badge-gray { background:rgba(100,116,139,0.15); color:var(--text3); }
.badge-purple { background:rgba(139,92,246,0.15); color:var(--purple); }
.badge-yellow { background:rgba(234,179,8,0.15); color:#eab308; }
.badge-cyan { background:rgba(6,182,212,0.15); color:#06b6d4; }

/* ─── FILTER TABS ─── */
.filter-tabs { display:flex; gap:2px; flex-wrap:wrap; }
.filter-tab { padding:4px 12px; font-size:10px; font-weight:500; border:1px solid var(--border); border-radius:6px; cursor:pointer; color:var(--text3); background:var(--bg2); transition:all 0.15s; }
.filter-tab:hover { border-color:var(--accent); color:var(--text1); }
.filter-tab.active { background:var(--accent); color:white; border-color:var(--accent); }
.filter-tab.active:hover { opacity:0.85; }

/* ─── LIST ITEMS ─── */
.alert-item { background:var(--bg2); border:1px solid var(--border); border-radius:6px; padding:10px 14px; margin-bottom:6px; cursor:pointer; transition:all 0.15s; }
.alert-item:hover { border-color:var(--accent); background:var(--bg3); }
.clickable { cursor:pointer; }
.fim-detail-row { display:none; }
/* ─── MITRE ─── */
.mitre-scroll { overflow-x:auto; }
.mitre-matrix { display:grid; grid-template-columns:repeat(12,1fr); gap:3px; min-width:1100px; padding:6px; }
.mitre-col { background:var(--bg3); border:1px solid var(--border); border-radius:6px; padding:6px; }
.mitre-col h4 { font-size:9px; font-weight:700; text-align:center; margin-bottom:6px; text-transform:uppercase; letter-spacing:0.5px; }
.mitre-tech { background:var(--bg4); border-radius:4px; padding:4px; margin:2px 0; font-size:8px; cursor:pointer; transition:all 0.15s; text-align:center; }
.mitre-tech:hover { background:var(--accent); color:white; transform:scale(1.02); }
.mitre-detail-panel { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius); padding:16px; margin-top:14px; }

/* ─── SEARCH ─── */
.search-input { width:100%; padding:8px 12px; background:var(--bg3); border:1px solid var(--border); border-radius:6px; color:var(--text1); font-size:12px; margin-bottom:12px; }
.search-input:focus { outline:none; border-color:var(--accent); }
.toolbar { display:flex; gap:8px; margin-bottom:12px; align-items:center; flex-wrap:wrap; }

/* ─── UTILITY ─── */
.gap-8 { gap:8px; }
.flex-between { display:flex; justify-content:space-between; align-items:center; }
.text-muted { color:var(--text3); }
.text-accent { color:var(--accent); }
.mt-12 { margin-top:12px; }
.mb-12 { margin-bottom:12px; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; }

/* ─── MODAL ─── */
.modal-overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:200; align-items:center; justify-content:center; backdrop-filter:blur(2px); }
.modal-overlay.show { display:flex; }
.modal { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); width:500px; max-height:85vh; overflow-y:auto; box-shadow:0 16px 48px rgba(0,0,0,0.5); }
.modal-header { padding:14px 18px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.modal-header h3 { font-size:14px; }
.modal-body { padding:16px 18px; }
.modal-footer { padding:12px 18px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:8px; }
.modal-close { background:none; border:none; color:var(--text3); font-size:18px; cursor:pointer; padding:4px 6px; border-radius:4px; }
.modal-close:hover { color:var(--text1); background:var(--bg3); }

/* ─── NETWORK MONITORING EVENT ROWS ─── */
.nm-event-row { border-bottom:1px solid var(--border); cursor:pointer; transition:background 0.15s; }
.nm-event-row:hover { background:rgba(249,115,22,0.05); }
.nm-event-row.expanded { background:rgba(249,115,22,0.08); }
.nm-event-summary { display:flex; align-items:flex-start; gap:8px; padding:6px 12px; }
.nm-expand-icon { font-size:14px; color:var(--text3); min-width:16px; text-align:center; font-family:monospace; font-weight:700; margin-left:4px; transition:transform 0.15s; flex-shrink:0; }
.nm-detail-panel { padding:10px 12px 12px 40px; background:var(--bg2); border-top:1px solid var(--border); font-size:11px; line-height:1.7; }
.nm-detail-grid { display:grid; grid-template-columns:auto 1fr; gap:2px 12px; }
.nm-detail-label { color:var(--text3); white-space:nowrap; font-weight:500; }
.nm-detail-value { color:var(--text1); word-break:break-all; }
.enrich-btn { padding:1px 6px; font-size:9px; background:var(--accent-dim); color:var(--accent); border:1px solid rgba(249,115,22,0.25); border-radius:3px; cursor:pointer; font-family:inherit; transition:all 0.15s; }
.enrich-btn:hover { background:var(--accent); color:#000; border-color:var(--accent); }

/* ─── TOAST ─── */
.toast { position:fixed; top:20px; right:20px; padding:10px 18px; border-radius:8px; font-size:12px; z-index:300; animation:slideIn 0.3s ease; }
.toast-success { background:#065f46; color:#d1fae5; border:1px solid #059669; }
.toast-error { background:#7f1d1d; color:#fecaca; border:1px solid #dc2626; }
.toast-info { background:#1e3a5f; color:#bfdbfe; border:1px solid #3b82f6; }
@keyframes slideIn { from { transform:translateX(100%); opacity:0; } to { transform:translateX(0); opacity:1; } }

/* ─── PLACEHOLDER ─── */
.placeholder-page { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:300px; text-align:center; }
.placeholder-page .icon { font-size:48px; color:var(--text3); margin-bottom:16px; opacity:0.3; }
.placeholder-page h3 { font-size:16px; color:var(--text2); margin-bottom:8px; }
.placeholder-page p { font-size:12px; color:var(--text3); max-width:400px; }

/* ─── TENANT INDICATOR ─── */
.tenant-indicator { display:inline-flex; align-items:center; gap:6px; padding:3px 10px; background:var(--accent-dim); border:1px solid rgba(249,115,22,0.2); border-radius:20px; font-size:9px; color:var(--accent); font-weight:600; }
.tenant-indicator .dot { width:5px; height:5px; border-radius:50%; background:var(--green); animation:dotPulse 2s ease-in-out infinite; }

/* ─── STATUS ROW ─── */
.status-row { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:10px; margin-bottom:16px; }
.status-item { background:var(--bg2); border:1px solid var(--border); border-radius:6px; padding:12px; text-align:center; }
.status-item .stat { font-size:22px; font-weight:700; display:block; }
.status-item .label { font-size:9px; color:var(--text3); text-transform:uppercase; margin-top:4px; letter-spacing:0.5px; }

/* ─── ALERT DETAIL ROW ─── */
.alert-detail-row { display:none; }
.alert-detail-row.open { display:table-row; }
.hunt-detail-row { display:none; }
.hunt-detail-row.open { display:table-row; }
.fim-detail-row { display:none; }
.fim-detail-row.open { display:block; }
.fim-filter-btn.active { background:var(--accent) !important; color:white !important; border-color:var(--accent) !important; }

/* ─── RESPONSIVE ─── */
@media (max-width:900px) { #sidebar { width:56px; min-width:56px; } #sidebar-title, #sidebar-subtitle, .nav-section, .nav-item span, #tenantSwitcher select option:first-child, #tenantLabel span { display:none; } .nav-item { justify-content:center; padding:8px; }  }

/* ─── INTEGRATIONS ─── */
.int-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:12px; padding:6px 0; }
.int-card { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; transition:border-color 0.2s,box-shadow 0.2s; }
.int-card:hover { border-color:var(--accent-dim); box-shadow:var(--shadow); }
.int-card-header { display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--border); }
.int-card-icon { width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
.int-card-title { font-weight:600; font-size:13px; }
.int-card-sub { font-size:10px; color:var(--text3); margin-top:1px; }
.int-card-body { padding:10px 16px 14px; }
.int-card-status { display:flex; align-items:center; gap:6px; font-size:11px; margin-bottom:8px; }
.int-status-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.int-status-dot.connected { background:var(--green); box-shadow:0 0 6px rgba(16,185,129,0.4); }
.int-status-dot.enabled { background:var(--blue); box-shadow:0 0 6px rgba(59,130,246,0.4); }
.int-status-dot.disabled { background:var(--text3); }
.int-status-dot.error { background:var(--red); box-shadow:0 0 6px rgba(239,68,68,0.4); }
.int-status-dot.pending { background:var(--orange); animation:pulse 1.5s infinite; }
.int-status-msg { color:var(--text2); }
.int-card-actions { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.int-card-actions .btn { font-size:10px; padding:5px 10px; }
.int-toggle-label { display:inline-flex; align-items:center; gap:4px; cursor:pointer; user-select:none; }
.int-toggle-text { font-size:9px; color:var(--text3); text-transform:uppercase; letter-spacing:0.5px; font-weight:600; }
.int-toggle-switch { position:relative; display:inline-block; width:28px; height:16px; background:var(--bg5); border-radius:8px; transition:0.2s; cursor:pointer; border:1px solid var(--border); flex-shrink:0; }
.int-toggle-switch.on { background:var(--accent); border-color:var(--accent); }
.int-toggle-knob { position:absolute; top:1px; left:1px; width:12px; height:12px; border-radius:50%; background:var(--text2); transition:0.2s; }
.int-toggle-switch.on .int-toggle-knob { left:13px; background:white; }
.int-card-actions .btn { font-size:10px; padding:5px 10px; }
.int-badge { font-size:9px; padding:2px 8px; border-radius:10px; font-weight:600; display:inline-flex;align-items:center;gap:4px; }
.int-badge.connected { background:rgba(16,185,129,0.15); color:var(--green); }
.int-badge.enabled { background:rgba(59,130,246,0.15); color:var(--blue); }
.int-badge.disabled { background:rgba(100,116,139,0.15); color:var(--text3); }
.int-badge.error { background:rgba(239,68,68,0.15); color:var(--red); }
.int-badge.pending { background:rgba(245,158,11,0.15); color:var(--orange); }

/* ─── INTEGRATION CONFIG MODAL ─── */
#intConfigModal .modal-bg { position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.6);z-index:2000;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:all 0.2s; }
#intConfigModal.show .modal-bg { opacity:1;visibility:visible; }
#intConfigModal .modal-content { background:var(--bg2); border:1px solid var(--border); border-radius:16px; width:520px; max-width:90vw; max-height:80vh; overflow-y:auto; padding:0; }
#intConfigModal .modal-header { display:flex; align-items:center; gap:10px; padding:16px 20px; border-bottom:1px solid var(--border); }
#intConfigModal .modal-header h3 { font-size:15px; }
#intConfigModal .modal-close { margin-left:auto; cursor:pointer; width:28px; height:28px; border-radius:6px; display:flex; align-items:center; justify-content:center; background:var(--bg3); color:var(--text2); border:none; font-size:16px; transition:all 0.15s; }
#intConfigModal .modal-close:hover { background:var(--bg4); color:var(--text1); }
#intConfigModal .modal-body { padding:20px; }
#intConfigModal .field { margin-bottom:14px; }
#intConfigModal .field label { display:block; font-size:11px; font-weight:600; color:var(--text2); margin-bottom:4px; text-transform:uppercase; letter-spacing:0.5px; }
#intConfigModal .field input { width:100%; padding:8px 10px; background:var(--bg3); border:1px solid var(--border); border-radius:6px; color:var(--text1); font-size:12px; }
#intConfigModal .field input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-glow); }
#intConfigModal .modal-footer { display:flex; gap:8px; justify-content:flex-end; padding:14px 20px; border-top:1px solid var(--border); }

/* ─── Resolved Incidents SOC Table ─── */
.resolved-table-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:var(--radius); background:var(--bg2); }
.resolved-table { width:100%; border-collapse:collapse; font-size:10px; min-width:1000px; }
.resolved-table thead { background:var(--bg3); }
.resolved-table thead th { padding:7px 10px; text-align:left; font-weight:600; font-size:8px; text-transform:uppercase; letter-spacing:0.8px; color:var(--text3); border-bottom:2px solid var(--border); white-space:nowrap; }
.resolved-table tbody tr { cursor:pointer; transition:background 0.1s; border-bottom:1px solid var(--border); }
.resolved-table tbody tr:hover { background:var(--bg3); }
.resolved-table tbody tr.row-critical { border-left:3px solid var(--red); }
.resolved-table tbody tr.row-high { border-left:3px solid var(--orange); }
.resolved-table tbody tr:last-child { border-bottom:none; }
.resolved-table tbody td { padding:7px 10px; vertical-align:top; }
/* Case ID */
.ri-case-id { font-family:'SF Mono','Cascadia Code',monospace; font-size:9px; color:var(--text3); }
/* Severity badge */
.ri-sev-badge { display:inline-block; padding:1px 7px; border-radius:3px; font-weight:600; font-size:8px; letter-spacing:0.5px; text-transform:uppercase; }
.ri-critical { background:rgba(239,68,68,0.15); color:var(--red); }
.ri-high { background:rgba(245,158,11,0.15); color:var(--orange); }
.ri-medium { background:rgba(59,130,246,0.15); color:var(--blue); }
.ri-low { background:rgba(16,185,129,0.15); color:var(--green); }
/* Title + desc */
.ri-title { display:block; font-weight:600; font-size:11px; color:var(--text1); line-height:1.3; }
.ri-desc { display:block; font-size:9px; color:var(--text3); margin-top:1px; line-height:1.3; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width:200px; }
/* Agent */
.ri-agent { display:block; font-size:10px; font-weight:500; color:var(--text1); }
.ri-ip { display:block; font-size:8px; color:var(--text3); font-family:'SF Mono','Cascadia Code',monospace; }
/* MITRE */
.ri-mitre { font-size:9px; color:var(--purple); font-family:'SF Mono','Cascadia Code',monospace; }
/* Alert count */
.ri-alert-count { display:inline-block; background:var(--bg3); padding:1px 7px; border-radius:8px; font-size:9px; font-weight:600; color:var(--text2); }
.ri-alert-many { background:rgba(245,158,11,0.12); color:var(--orange); }
/* Timeline */
.ri-dates { display:inline-block; font-size:9px; color:var(--text2); font-family:'SF Mono','Cascadia Code',monospace; white-space:nowrap; }
.ri-arrow { display:inline-block; margin:0 3px; color:var(--text3); font-size:8px; }
/* Resolution */
.ri-res-time { display:block; font-size:10px; font-weight:600; }
.ri-res-fast { color:var(--green); }
.ri-res-normal { color:var(--text1); }
.ri-res-slow { color:var(--orange); }
.ri-closure { display:block; font-size:8px; color:var(--text3); margin-top:1px; line-height:1.3; max-width:130px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Analyst */
.ri-analyst { font-size:10px; font-weight:500; color:var(--text1); }
/* SLA */
.ri-sla { font-size:9px; font-weight:600; padding:1px 6px; border-radius:3px; }
.sla-met { color:var(--green); background:rgba(16,185,129,0.12); }
.sla-breach { color:var(--red); background:rgba(239,68,68,0.12); }
/* Resolution time badge */
.res-fast { color:var(--green); }
.res-normal { color:var(--text1); }
.res-slow { color:var(--orange); }
.res-breach { color:var(--red); }
/* Expandable detail rows */
.ri-detail-row { background:var(--bg3); }
.ri-detail-inner { padding:16px 18px; font-size:12px; line-height:1.6; }
.ri-detail-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid var(--border); font-size:11px; color:var(--text3); }
.ri-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:10px; }
.ri-detail-card { background:var(--bg2); border:1px solid var(--border); border-radius:6px; padding:8px 10px; overflow:hidden; }
.ri-detail-wide { grid-column:1 / -1; }
.ri-detail-label { font-size:8px; color:var(--text3); text-transform:uppercase; letter-spacing:0.6px; margin-bottom:2px; }
.ri-detail-value { font-size:11px; color:var(--text1); word-break:break-word; }
.ri-detail-sla-bar { margin-top:6px; background:var(--bg2); border:1px solid var(--border); border-radius:6px; padding:8px 10px; }
.ri-chevron { display:inline-block; font-size:8px; color:var(--text3); transition:transform 0.2s; }
.col-expand { width:24px; text-align:center; }
/* Analyst */
.ri-analyst { font-size:10px; font-weight:500; color:var(--text1); }
/* SLA */
.ri-sla { display:inline-block; padding:1px 7px; border-radius:3px; font-size:8px; font-weight:600; background:var(--bg3); color:var(--text3); }
.ri-sla.sla-met { background:rgba(16,185,129,0.12); color:var(--green); }
.ri-sla.sla-breach { background:rgba(239,68,68,0.12); color:var(--red); }
/* Column widths */
.col-case { width:80px; }
.col-sev { width:58px; }
.col-title { min-width:160px; }
.col-agent { width:120px; }
.col-mitre { width:140px; }
.col-alerts { width:44px; text-align:center; }
.col-timeline { width:165px; }
.col-resolve { width:130px; }
.col-assignee { width:80px; }
.col-sla { width:52px; }
/* Responsive */
@media (max-width:1100px) {
  .col-mitre, .col-alerts, .col-sla { display:none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   DESIGN ENHANCEMENTS v2.1 — Polished Animations & Visual Refinements
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── GLOBAL SCROLLBAR STYLING ─── */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; transition:background 0.2s; }
::-webkit-scrollbar-thumb:hover { background:var(--text3); }
#page::-webkit-scrollbar-thumb { background:rgba(100,116,139,0.3); }
#page::-webkit-scrollbar-thumb:hover { background:rgba(100,116,139,0.5); }

/* ─── PAGE ENTRANCE ANIMATION ─── */
.page.active {
  animation: pageFadeIn 0.35s ease-out;
}
@keyframes pageFadeIn {
  from { opacity:0; transform:translateY(8px); }
  to { opacity:1; transform:translateY(0); }
}

/* Staggered card entrance inside active pages */
.page.active .stat-card,
.page.active .card,
.page.active .inv-card,
.page.active .int-card,
.page.active .alert-item,
.page.active .sop-section,
.page.active .ug-section,
.page.active .faq-item {
  animation: cardFadeUp 0.4s ease-out both;
}
.page.active .stat-card:nth-child(1),
.page.active .card:nth-child(1) { animation-delay:0.02s; }
.page.active .stat-card:nth-child(2),
.page.active .card:nth-child(2) { animation-delay:0.06s; }
.page.active .stat-card:nth-child(3),
.page.active .card:nth-child(3) { animation-delay:0.10s; }
.page.active .stat-card:nth-child(4),
.page.active .card:nth-child(4) { animation-delay:0.14s; }
.page.active .stat-card:nth-child(5),
.page.active .card:nth-child(5) { animation-delay:0.18s; }
.page.active .stat-card:nth-child(6),
.page.active .card:nth-child(6) { animation-delay:0.22s; }
.page.active .inv-card:nth-child(1) { animation-delay:0.03s; }
.page.active .inv-card:nth-child(2) { animation-delay:0.08s; }
.page.active .inv-card:nth-child(3) { animation-delay:0.13s; }
.page.active .inv-card:nth-child(4) { animation-delay:0.18s; }
.page.active .inv-card:nth-child(5) { animation-delay:0.23s; }
.page.active .alert-item:nth-child(1) { animation-delay:0.02s; }
.page.active .alert-item:nth-child(2) { animation-delay:0.06s; }
.page.active .alert-item:nth-child(3) { animation-delay:0.10s; }
.page.active .alert-item:nth-child(4) { animation-delay:0.14s; }
.page.active .alert-item:nth-child(5) { animation-delay:0.18s; }
.page.active .int-card:nth-child(1) { animation-delay:0.03s; }
.page.active .int-card:nth-child(2) { animation-delay:0.08s; }
.page.active .int-card:nth-child(3) { animation-delay:0.13s; }
.page.active .int-card:nth-child(4) { animation-delay:0.18s; }
.page.active .sop-section:nth-child(1) { animation-delay:0.02s; }
.page.active .sop-section:nth-child(2) { animation-delay:0.07s; }
.page.active .sop-section:nth-child(3) { animation-delay:0.12s; }
.page.active .sop-section:nth-child(4) { animation-delay:0.17s; }
.page.active .ug-section:nth-child(1) { animation-delay:0.02s; }
.page.active .ug-section:nth-child(2) { animation-delay:0.07s; }
.page.active .ug-section:nth-child(3) { animation-delay:0.12s; }
.page.active .faq-item:nth-child(1) { animation-delay:0.02s; }
.page.active .faq-item:nth-child(2) { animation-delay:0.06s; }
.page.active .faq-item:nth-child(3) { animation-delay:0.10s; }
.page.active .faq-item:nth-child(4) { animation-delay:0.14s; }

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

/* ─── SKELETON LOADING PLACEHOLDER ─── */
.skeleton {
  background:linear-gradient(90deg,
    var(--bg3) 25%,
    var(--bg4) 37%,
    var(--bg3) 63%
  );
  background-size:400% 100%;
  animation: skeletonShimmer 1.4s ease infinite;
  border-radius:6px;
}
.skeleton-text { height:12px; margin-bottom:8px; width:80%; }
.skeleton-text.short { width:40%; }
.skeleton-text.long { width:95%; }
.skeleton-card { height:80px; }
.skeleton-avatar { width:36px; height:36px; border-radius:50%; }
.skeleton-btn { width:70px; height:28px; border-radius:6px; }
.skeleton-badge { width:50px; height:16px; border-radius:10px; display:inline-block; }

@keyframes skeletonShimmer {
  0% { background-position:100% 50%; }
  100% { background-position:0 50%; }
}

/* ─── IMPROVED STAT CARDS ─── */
.stat-card {
  box-shadow:0 1px 3px rgba(0,0,0,0.12);
  transition:all 0.25s cubic-bezier(0.4,0,0.2,1);
}
.stat-card:hover {
  border-color:var(--accent);
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(0,0,0,0.25), 0 0 0 1px rgba(249,115,22,0.08);
}
.stat-card .value {
  transition:color 0.3s;
}
.stat-card:hover .value {
  color:var(--accent);
}

/* ─── IMPROVED CARD COMPONENT ─── */
.card {
  transition:all 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow:0 1px 3px rgba(0,0,0,0.1);
}
.card:hover {
  border-color:var(--accent-dim);
  box-shadow:0 4px 16px rgba(0,0,0,0.18);
}

/* ─── SIDEBAR ENHANCEMENTS ─── */
.nav-item {
  position:relative;
  overflow:hidden;
  transition:all 0.2s cubic-bezier(0.4,0,0.2,1);
}
.nav-item::after {
  content:'';
  position:absolute;
  left:0; top:0;
  width:3px; height:100%;
  background:var(--accent);
  transform:scaleY(0);
  transition:transform 0.2s cubic-bezier(0.4,0,0.2,1);
  border-radius:0 2px 2px 0;
}
.nav-item.active::after {
  transform:scaleY(1);
}
.nav-item.active {
  background:linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow:0 2px 12px rgba(249,115,22,0.3);
}
.nav-item:hover:not(.active) {
  background:var(--accent-dim);
  transform:translateX(2px);
}

/* ─── IMPROVED MODAL ─── */
.modal-overlay {
  opacity:0;
  transition:opacity 0.2s ease, backdrop-filter 0.2s ease;
}
.modal-overlay.show {
  opacity:1;
  backdrop-filter:blur(4px);
}
.modal-overlay.show .modal {
  animation:modalScaleIn 0.25s ease-out;
}
@keyframes modalScaleIn {
  from { opacity:0; transform:scale(0.95) translateY(10px); }
  to { opacity:1; transform:scale(1) translateY(0); }
}

/* ─── IMPROVED TABLE STYLING ─── */
tr {
  transition:background 0.15s;
}
tr:hover td {
  background:rgba(249,115,22,0.04);
}
tbody tr {
  animation:rowFadeIn 0.3s ease-out both;
}
tbody tr:nth-child(1) { animation-delay:0.01s; }
tbody tr:nth-child(2) { animation-delay:0.04s; }
tbody tr:nth-child(3) { animation-delay:0.07s; }
tbody tr:nth-child(4) { animation-delay:0.10s; }
tbody tr:nth-child(5) { animation-delay:0.13s; }
tbody tr:nth-child(6) { animation-delay:0.16s; }
tbody tr:nth-child(7) { animation-delay:0.19s; }
tbody tr:nth-child(8) { animation-delay:0.22s; }
tbody tr:nth-child(9) { animation-delay:0.25s; }
tbody tr:nth-child(10) { animation-delay:0.28s; }

@keyframes rowFadeIn {
  from { opacity:0; transform:translateX(-4px); }
  to { opacity:1; transform:translateX(0); }
}

/* ─── BUTTON ENHANCEMENTS ─── */
.btn {
  position:relative;
  overflow:hidden;
}
.btn::after {
  content:'';
  position:absolute;
  top:50%; left:50%;
  width:0; height:0;
  border-radius:50%;
  background:rgba(255,255,255,0.15);
  transform:translate(-50%,-50%);
  transition:width 0.5s, height 0.5s, opacity 0.5s;
  opacity:0;
}
.btn:active::after {
  width:200px; height:200px;
  opacity:1;
  transition:0s;
}
.btn-primary {
  background:linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow:0 2px 8px rgba(249,115,22,0.2);
  transition:all 0.25s cubic-bezier(0.4,0,0.2,1);
}
.btn-primary:hover {
  box-shadow:0 6px 20px rgba(249,115,22,0.35);
  transform:translateY(-1px);
}
.btn-primary:active {
  transform:translateY(0);
  box-shadow:0 2px 8px rgba(249,115,22,0.2);
}
.btn-outline {
  transition:all 0.25s cubic-bezier(0.4,0,0.2,1);
}
.btn-outline:hover {
  background:var(--accent-dim);
  border-color:var(--accent);
  transform:translateY(-1px);
}
.btn-danger {
  transition:all 0.25s cubic-bezier(0.4,0,0.2,1);
}
.btn-danger:hover {
  box-shadow:0 4px 16px rgba(239,68,68,0.3);
  transform:translateY(-1px);
}
.btn-green {
  transition:all 0.25s cubic-bezier(0.4,0,0.2,1);
}
.btn-green:hover {
  box-shadow:0 4px 16px rgba(16,185,129,0.3);
  transform:translateY(-1px);
}

/* ─── HEADER ACCENT BAR ─── */
#header {
  position:relative;
}
#header::after {
  content:'';
  position:absolute;
  bottom:0; left:0; right:0;
  height:1px;
  background:linear-gradient(90deg,
    transparent 0%,
    rgba(249,115,22,0.15) 20%,
    rgba(249,115,22,0.25) 50%,
    rgba(249,115,22,0.15) 80%,
    transparent 100%
  );
}

/* ─── TENANT INDICATOR ENHANCEMENT ─── */
.tenant-indicator {
  transition:all 0.2s;
}
.tenant-indicator .dot {
  animation:dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity:1; box-shadow:0 0 0 0 rgba(16,185,129,0); }
  50% { opacity:0.8; box-shadow:0 0 6px 2px rgba(16,185,129,0.2); }
}

/* ─── FILTER TAB ENHANCEMENT ─── */
.filter-tab {
  transition:all 0.2s cubic-bezier(0.4,0,0.2,1);
}
.filter-tab.active {
  background:linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow:0 2px 8px rgba(249,115,22,0.25);
}

/* ─── IMPROVED SEARCH INPUT ─── */
.search-input {
  transition:all 0.2s cubic-bezier(0.4,0,0.2,1);
}
.search-input:focus {
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-glow);
  background:var(--bg2);
}

/* ─── FORM GROUP ENHANCEMENTS ─── */
.form-group input, .form-group select, .form-group textarea {
  transition:all 0.2s cubic-bezier(0.4,0,0.2,1);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-glow);
  background:var(--bg2);
}

/* ─── PROFILE BTN ENHANCEMENT ─── */
.profile-btn {
  transition:all 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ─── IMPROVED DROPDOWN ─── */
.dropdown {
  animation:dropdownFade 0.15s ease-out;
  overflow:hidden;
}
@keyframes dropdownFade {
  from { opacity:0; transform:translateY(-4px); }
  to { opacity:1; transform:translateY(0); }
}
.dropdown-item {
  transition:all 0.12s;
}

/* ─── SIDEBAR HEADER ACCENT ─── */
#sidebar-header {
  position:relative;
}
#sidebar-header::after {
  content:'';
  position:absolute;
  bottom:-1px; left:10%; right:10%;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(249,115,22,0.2), transparent);
}

/* ─── SYS STATUS BAR ─── */
.sys-status-bar {
  transition:all 0.2s;
}
.sys-status-bar:hover {
  border-color:var(--accent-dim);
}

/* ─── TOAST ENHANCEMENT ─── */
.toast {
  box-shadow:0 8px 32px rgba(0,0,0,0.3);
  backdrop-filter:blur(8px);
  border-radius:10px;
  min-width:200px;
  max-width:400px;
}
.toast-success { background:rgba(6,95,70,0.95); }
.toast-error { background:rgba(127,29,29,0.95); }
.toast-info { background:rgba(30,58,95,0.95); }

/* ─── PROFILE DROPDOWN AVATAR HOVER ─── */
.profile-avatar {
  transition:all 0.2s;
  box-shadow:0 0 0 0 rgba(249,115,22,0);
}
.profile-btn:hover .profile-avatar {
  box-shadow:0 0 0 3px rgba(249,115,22,0.25);
}

/* ─── RESPONSIVE REFINEMENTS ─── */
@media (max-width:900px) {
  .nav-item.active::after { display:none; }
  .nav-item:hover:not(.active) { transform:none; }
}

/* ─── INTEGRATION STATUS DOT ANIMATION ─── */
.int-status-dot.connected {
  animation:statusConnected 2s ease-in-out infinite;
}
@keyframes statusConnected {
  0%, 100% { box-shadow:0 0 6px rgba(16,185,129,0.4); }
  50% { box-shadow:0 0 12px rgba(16,185,129,0.15); }
}

/* ─── RESOLVED TABLE ROW BORDER ACCENT ─── */
.resolved-table tbody tr {
  animation:rowSlideIn 0.3s ease-out both;
}
.resolved-table tbody tr:nth-child(1) { animation-delay:0.02s; }
.resolved-table tbody tr:nth-child(2) { animation-delay:0.06s; }
.resolved-table tbody tr:nth-child(3) { animation-delay:0.10s; }
.resolved-table tbody tr:nth-child(4) { animation-delay:0.14s; }
.resolved-table tbody tr:nth-child(5) { animation-delay:0.18s; }
.resolved-table tbody tr:nth-child(6) { animation-delay:0.22s; }
.resolved-table tbody tr:nth-child(7) { animation-delay:0.26s; }
.resolved-table tbody tr:nth-child(8) { animation-delay:0.30s; }
@keyframes rowSlideIn {
  from { opacity:0; transform:translateY(4px); }
  to { opacity:1; transform:translateY(0); }
}

/* ─── USER GUIDE / SOP SECTION ENHANCEMENTS ─── */
.ug-section, .sop-section {
  transition:all 0.2s cubic-bezier(0.4,0,0.2,1);
}
.ug-section:hover, .sop-section:hover {
  border-color:var(--accent-dim);
  box-shadow:0 2px 12px rgba(0,0,0,0.15);
}

/* ─── BREADCRUMB ENHANCEMENT ─── */
.breadcrumb {
  font-size:10px;
  color:var(--text3);
  display:flex;
  align-items:center;
  gap:6px;
}
.breadcrumb a {
  color:var(--accent);
  text-decoration:none;
  transition:color 0.15s;
}
.breadcrumb a:hover {
  color:var(--accent-hover);
  text-decoration:underline;
}

/* ─── STATUS INDICATOR BETTER VISUALS ─── */
#sidebar-footer .status-dot {
  animation:sidebarStatusPulse 2s ease-in-out infinite;
}
@keyframes sidebarStatusPulse {
  0%, 100% { opacity:1; box-shadow:0 0 0 0 rgba(16,185,129,0); }
  50% { opacity:0.7; box-shadow:0 0 6px 2px rgba(16,185,129,0.15); }
}

/* ─── INVESTIGATION CARD ENHANCEMENTS ─── */
.inv-card {
  box-shadow:0 1px 3px rgba(0,0,0,0.1);
  transition:all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ─── SMOOTH TRANSITION FOR ALL INTERACTIVE ELEMENTS ─── */
button, select, input, textarea, a {
  transition:all 0.15s ease;
}

/* ═══════════════════════════════════════════════════════════════════════
   DESIGN ENHANCEMENTS v2.2 — Additional Visual Polish & Components
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── GRADIENT DIVIDER ─── */
.divider {
  border:none;
  height:1px;
  background:linear-gradient(90deg, transparent, var(--border), var(--accent-dim), var(--border), transparent);
  margin:16px 0;
}
.divider-glow {
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(249,115,22,0.3), transparent);
  margin:12px 0;
  border:none;
}

/* ─── TEXT GRADIENT UTILITY ─── */
.text-gradient {
  background:linear-gradient(135deg, var(--accent), #fb923c);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.text-gradient-blue {
  background:linear-gradient(135deg, var(--blue), #60a5fa);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.text-gradient-green {
  background:linear-gradient(135deg, var(--green), #34d399);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.text-gradient-red {
  background:linear-gradient(135deg, var(--red), #f87171);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

/* ─── GLOW UTILITIES ─── */
.glow-accent { box-shadow:0 0 12px rgba(249,115,22,0.15); }
.glow-red { box-shadow:0 0 12px rgba(239,68,68,0.15); }
.glow-green { box-shadow:0 0 12px rgba(16,185,129,0.15); }
.glow-blue { box-shadow:0 0 12px rgba(59,130,246,0.15); }
.glow-border-accent { border-color:rgba(249,115,22,0.3) !important; }

/* ─── CARD HEADER STANDARD ─── */
.card-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 14px;
  background:linear-gradient(135deg, var(--bg3), var(--bg4));
  border-bottom:1px solid var(--border);
  position:relative;
  overflow:hidden;
}
.card-header::after {
  content:'';
  position:absolute;
  bottom:0; left:0; right:0;
  height:1px;
  background:linear-gradient(90deg, rgba(249,115,22,0.2), transparent 60%);
}
.card-header-title {
  font-size:12px;
  font-weight:600;
  color:var(--text1);
  display:flex;
  align-items:center;
  gap:8px;
}
.card-header-sub {
  font-size:10px;
  color:var(--text3);
}

/* ─── SEVERITY STRIP ANIMATION ─── */
.sev-strip {
  position:absolute;
  left:0; top:0; bottom:0;
  width:3px;
  border-radius:0 2px 2px 0;
}
.sev-strip-critical {
  background:var(--red);
  animation:sevStripPulse 2s ease-in-out infinite;
}
.sev-strip-high {
  background:var(--orange);
  animation:sevStripPulse 2.5s ease-in-out infinite;
}
.sev-strip-medium {
  background:var(--blue);
}
.sev-strip-low {
  background:var(--text3);
}
@keyframes sevStripPulse {
  0%, 100% { opacity:1; }
  50% { opacity:0.5; }
}

/* ─── EMPTY STATE ─── */
.empty-state {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:48px 24px;
  text-align:center;
}
.empty-state-icon {
  width:56px;
  height:56px;
  border-radius:16px;
  background:var(--bg3);
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  color:var(--text3);
  margin-bottom:16px;
  animation:emptyStateFloat 3s ease-in-out infinite;
}
@keyframes emptyStateFloat {
  0%, 100% { transform:translateY(0); }
  50% { transform:translateY(-4px); }
}
.empty-state-title {
  font-size:14px;
  font-weight:600;
  color:var(--text2);
  margin-bottom:6px;
}
.empty-state-desc {
  font-size:11px;
  color:var(--text3);
  max-width:320px;
  line-height:1.5;
}

/* ─── LIVE EVENT ROW ─── */
.live-event-row {
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:7px 12px;
  border-bottom:1px solid var(--border);
  transition:background 0.15s;
  cursor:pointer;
}
.live-event-row:hover {
  background:rgba(249,115,22,0.04);
}
.live-event-row:first-child {
  border-top:1px solid var(--border);
}
.live-sev-dot {
  width:8px; height:8px;
  border-radius:50%;
  flex-shrink:0;
  margin-top:4px;
}
.live-sev-dot.critical { background:var(--red); box-shadow:0 0 6px rgba(239,68,68,0.4); animation:sevDotPulse 1.5s ease-in-out infinite; }
.live-sev-dot.high { background:var(--orange); box-shadow:0 0 6px rgba(245,158,11,0.3); }
.live-sev-dot.medium { background:var(--blue); }
.live-sev-dot.low { background:var(--text3); }
@keyframes sevDotPulse {
  0%, 100% { box-shadow:0 0 6px rgba(239,68,68,0.4); }
  50% { box-shadow:0 0 12px rgba(239,68,68,0.15); }
}
.live-event-time {
  font-size:9px;
  color:var(--text3);
  font-family:'SF Mono','Cascadia Code',monospace;
  white-space:nowrap;
  min-width:60px;
  padding-top:2px;
}
.live-event-content {
  flex:1;
  min-width:0;
}
.live-event-desc {
  font-size:11px;
  color:var(--text1);
  line-height:1.3;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.live-event-meta {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:2px;
}
.live-event-tag {
  font-size:8px;
  color:var(--text3);
  background:var(--bg3);
  padding:1px 5px;
  border-radius:3px;
}
.live-event-agent {
  font-size:8px;
  color:var(--accent);
}

/* ─── QUICK STATS BAR ─── */
.quick-stats-bar {
  display:flex;
  gap:12px;
  margin-top:8px;
  padding:8px 14px;
  background:rgba(17,24,39,0.7);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border:1px solid var(--border);
  border-radius:8px;
  font-size:10px;
  color:var(--text3);
  flex-wrap:wrap;
  transition:border-color 0.2s;
}
.quick-stats-bar:hover {
  border-color:var(--accent-dim);
}
.quick-stats-bar strong {
  color:var(--text1);
  font-weight:600;
}

/* ─── FLOATING ACTION BUTTON (SCROLL TO TOP) ─── */
#scrollTopBtn {
  position:fixed;
  bottom:24px;
  right:24px;
  z-index:150;
  width:40px;
  height:40px;
  border-radius:12px;
  background:var(--bg3);
  border:1px solid var(--border);
  color:var(--text2);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  transition:all 0.25s cubic-bezier(0.4,0,0.2,1);
  opacity:0;
  transform:translateY(10px) scale(0.9);
  pointer-events:none;
  box-shadow:0 4px 12px rgba(0,0,0,0.2);
}
#scrollTopBtn.visible {
  opacity:1;
  transform:translateY(0) scale(1);
  pointer-events:all;
}
#scrollTopBtn:hover {
  background:var(--accent);
  border-color:var(--accent);
  color:white;
  box-shadow:0 6px 20px rgba(249,115,22,0.3);
  transform:translateY(-2px);
}

/* ─── SECTION HEADER WITH COUNTER ─── */
.section-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
  padding-bottom:6px;
  border-bottom:1px solid var(--border);
}
.section-header-left {
  display:flex;
  align-items:center;
  gap:8px;
}
.section-header h2 {
  font-size:14px;
  font-weight:600;
  color:var(--text1);
}
.section-header .count {
  font-size:10px;
  color:var(--text3);
  background:var(--bg3);
  padding:1px 8px;
  border-radius:10px;
  font-weight:600;
}

/* ─── FILTER TABS ENHANCED ─── */
.filter-tabs-enhanced {
  display:flex;
  gap:3px;
  padding:3px;
  background:var(--bg3);
  border-radius:8px;
  border:1px solid var(--border);
  flex-wrap:wrap;
}
.filter-tabs-enhanced .filter-tab {
  border:none;
  border-radius:5px;
  background:transparent;
  font-size:10px;
  padding:5px 12px;
}
.filter-tabs-enhanced .filter-tab.active {
  background:linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow:0 2px 8px rgba(249,115,22,0.25);
  color:white;
}

/* ─── HOVER REVEAL UTILITY ─── */
.hover-reveal {
  opacity:0;
  transition:opacity 0.2s;
}
*:hover > .hover-reveal,
tr:hover .hover-reveal,
.alert-item:hover .hover-reveal,
.inv-card:hover .hover-reveal {
  opacity:1;
}

/* ─── BADGE PULSE FOR CRITICAL ITEMS ─── */
.badge-pulse {
  animation:badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow:0 0 0 0 rgba(239,68,68,0.3); }
  50% { box-shadow:0 0 8px 2px rgba(239,68,68,0.1); }
}

/* ─── STATUS DOT WITH ANIMATED RIPPLE ─── */
.status-dot-ripple {
  position:relative;
  width:8px; height:8px;
  border-radius:50%;
  display:inline-block;
}
.status-dot-ripple::after {
  content:'';
  position:absolute;
  top:-4px; left:-4px;
  width:16px; height:16px;
  border-radius:50%;
  border:1px solid currentColor;
  animation:statusRipple 2s ease-out infinite;
  opacity:0.5;
}
@keyframes statusRipple {
  0% { transform:scale(0.5); opacity:0.6; }
  100% { transform:scale(2); opacity:0; }
}

/* ─── LOADING SHIMMER FOR ANY ELEMENT ─── */
.shimmer {
  background:linear-gradient(90deg,
    var(--bg3) 0%,
    var(--bg4) 25%,
    var(--bg3) 50%,
    var(--bg4) 75%,
    var(--bg3) 100%
  );
  background-size:200% 100%;
  animation:shimmerMove 2s linear infinite;
}
@keyframes shimmerMove {
  0% { background-position:200% 0; }
  100% { background-position:-200% 0; }
}

/* ─── CONNECTION BADGE ─── */
.conn-badge {
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:2px 10px;
  border-radius:20px;
  font-size:9px;
  font-weight:600;
}
.conn-badge.online {
  background:rgba(16,185,129,0.12);
  color:var(--green);
  border:1px solid rgba(16,185,129,0.2);
}
.conn-badge.offline {
  background:rgba(239,68,68,0.12);
  color:var(--red);
  border:1px solid rgba(239,68,68,0.2);
}
.conn-badge .dot {
  width:5px; height:5px;
  border-radius:50%;
  display:inline-block;
}
.conn-badge.online .dot {
  background:var(--green);
  box-shadow:0 0 4px rgba(16,185,129,0.5);
  animation:connDotPulse 2s ease-in-out infinite;
}
@keyframes connDotPulse {
  0%, 100% { opacity:1; }
  50% { opacity:0.5; }
}

/* ─── GLASS CARD ─── */
.card-glass {
  background:rgba(17,24,39,0.6);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:var(--radius-lg);
  padding:16px;
  transition:all 0.25s cubic-bezier(0.4,0,0.2,1);
}
.card-glass:hover {
  border-color:var(--accent-dim);
  background:rgba(17,24,39,0.75);
}

/* ─── NUMBER STAT WITH LABEL ─── */
.num-stat {
  text-align:center;
  padding:8px;
}
.num-stat-value {
  font-size:24px;
  font-weight:700;
  color:var(--accent);
  display:block;
  line-height:1.1;
}
.num-stat-label {
  font-size:9px;
  color:var(--text3);
  text-transform:uppercase;
  letter-spacing:0.4px;
  margin-top:2px;
  display:block;
}

/* ─── TOOLTIP CUSTOM ─── */
[data-tooltip] {
  position:relative;
  cursor:help;
}
[data-tooltip]::after {
  content:attr(data-tooltip);
  position:absolute;
  bottom:calc(100% + 6px);
  left:50%;
  transform:translateX(-50%) scale(0.9);
  background:var(--bg4);
  border:1px solid var(--border);
  color:var(--text2);
  padding:4px 10px;
  border-radius:6px;
  font-size:10px;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  transition:all 0.15s ease;
}
[data-tooltip]:hover::after {
  opacity:1;
  transform:translateX(-50%) scale(1);
}

/* ─── PAGE LOADING PROGRESS BAR ─── */
.page-loader {
  position:absolute;
  top:0; left:0;
  height:2px;
  width:0;
  z-index:50;
  background:linear-gradient(90deg, var(--accent), #fb923c, var(--accent));
  background-size:200% 100%;
  border-radius:0 1px 1px 0;
  opacity:0;
  transition:opacity 0.2s, width 0.3s;
  pointer-events:none;
}
.page-loader.active {
  opacity:1;
  animation:pageLoaderAnim 1.5s ease-in-out infinite;
}
.page-loader.done {
  opacity:0;
  width:100% !important;
  transition:opacity 0.3s 0.1s;
}
@keyframes pageLoaderAnim {
  0% { width:0; left:0; }
  30% { width:30%; left:0; }
  70% { width:60%; left:20%; }
  100% { width:100%; left:0; }
}

/* ─── PAGE HEADER WITH GRADIENT ACCENT ─── */
.page-header {
  padding-bottom:12px;
  margin-bottom:14px;
  border-bottom:1px solid var(--border);
  position:relative;
}
.page-header::after {
  content:'';
  position:absolute;
  bottom:-1px; left:0;
  width:60px; height:2px;
  background:linear-gradient(90deg, var(--accent), transparent);
  border-radius:1px;
}
.page-header h2 {
  font-size:16px;
  font-weight:700;
  color:var(--text1);
  margin-bottom:2px;
}
.page-header .sub {
  font-size:11px;
  color:var(--text3);
}

/* ─── RESPONSIVE SIDEBAR COLLAPSE ─── */
@media (max-width:900px) {
  #sidebar {
    transition:width 0.3s cubic-bezier(0.4,0,0.2,1), min-width 0.3s cubic-bezier(0.4,0,0.2,1);
  }
  #sidebar-header {
    transition:all 0.3s;
    justify-content:center;
    padding:14px 8px;
  }
  #sidebar-logo {
    transition:all 0.3s;
  }
  #tenantSwitcher {
    transition:all 0.3s;
    padding:10px 6px;
  }
  #sidebar-footer {
    transition:all 0.3s;
  }
  .nav-item {
    transition:all 0.3s;
  }
}

/* ─── ALERT DETAIL CARD ─── */
.alert-detail-card {
  background:var(--bg3);
  border:1px solid var(--border);
  border-radius:8px;
  padding:12px 14px;
  margin:8px 0;
  transition:all 0.2s;
}
.alert-detail-card:hover {
  border-color:var(--accent-dim);
}
.alert-detail-label {
  font-size:8px;
  color:var(--text3);
  text-transform:uppercase;
  letter-spacing:0.5px;
  font-weight:600;
  margin-bottom:2px;
}
.alert-detail-value {
  font-size:11px;
  color:var(--text1);
  word-break:break-word;
}

/* ─── SLIDE TOGGLE STANDARD ─── */
.toggle-switch {
  position:relative;
  display:inline-block;
  width:32px;
  height:18px;
  background:var(--bg4);
  border-radius:9px;
  border:1px solid var(--border);
  cursor:pointer;
  transition:all 0.25s cubic-bezier(0.4,0,0.2,1);
  flex-shrink:0;
}
.toggle-switch.on {
  background:var(--accent);
  border-color:var(--accent);
  box-shadow:0 0 8px rgba(249,115,22,0.2);
}
.toggle-knob {
  position:absolute;
  top:1px; left:1px;
  width:14px; height:14px;
  border-radius:50%;
  background:var(--text2);
  transition:all 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow:0 1px 3px rgba(0,0,0,0.3);
}
.toggle-switch.on .toggle-knob {
  left:15px;
  background:white;
  box-shadow:0 1px 4px rgba(249,115,22,0.3);
}

/* ─── INFO ROW (label + value pair) ─── */
.info-row {
  display:flex;
  gap:8px;
  padding:6px 0;
  border-bottom:1px solid rgba(45,58,74,0.5);
  font-size:11px;
}
.info-row:last-child {
  border-bottom:none;
}
.info-label {
  color:var(--text3);
  min-width:100px;
  flex-shrink:0;
  font-weight:500;
}
.info-value {
  color:var(--text1);
  word-break:break-word;
}

/* ─── METRIC GRID ─── */
.metric-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:8px;
}
.metric-item {
  background:var(--bg3);
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px 12px;
  text-align:center;
  transition:all 0.2s;
}
.metric-item:hover {
  border-color:var(--accent-dim);
  transform:translateY(-1px);
}
.metric-value {
  font-size:20px;
  font-weight:700;
  color:var(--text1);
  display:block;
  line-height:1.2;
}
.metric-label {
  font-size:8px;
  color:var(--text3);
  text-transform:uppercase;
  letter-spacing:0.4px;
  margin-top:3px;
  display:block;
}

/* ─── PROGRESS BAR ─── */
.progress-bar {
  height:4px;
  background:var(--bg4);
  border-radius:2px;
  overflow:hidden;
  margin:6px 0;
}
.progress-fill {
  height:100%;
  border-radius:2px;
  background:linear-gradient(90deg, var(--accent), #fb923c);
  transition:width 0.6s cubic-bezier(0.4,0,0.2,1);
  position:relative;
}
.progress-fill::after {
  content:'';
  position:absolute;
  top:0; right:0; bottom:0;
  width:20px;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.15));
}
.progress-fill.green { background:linear-gradient(90deg, var(--green), #34d399); }
.progress-fill.red { background:linear-gradient(90deg, var(--red), #f87171); }
.progress-fill.blue { background:linear-gradient(90deg, var(--blue), #60a5fa); }

/* ─── ANIMATED PAGE PARTICLES ─── */
#pageParticles {
  position:absolute;
  top:0; left:0;
  width:100%;
  height:100%;
  z-index:0;
  pointer-events:none;
  opacity:0.35;
}
#page {
  position:relative;
}
#page > .page,
#page > .quick-stats-bar,
#page > .stat-grid,
#page > div:not(#pageParticles) {
  position:relative;
  z-index:1;
}

/* ─── RESPONSIVE SIDEBAR COLLAPSE ─── */
@media (max-width:900px) {
  #sidebar {
    transition:width 0.3s cubic-bezier(0.4,0,0.2,1), min-width 0.3s cubic-bezier(0.4,0,0.2,1);
  }
  #sidebar-header {
    transition:all 0.3s;
    justify-content:center;
    padding:14px 8px;
  }
  #sidebar-logo {
    transition:all 0.3s;
  }
  #tenantSwitcher {
    transition:all 0.3s;
    padding:10px 6px;
  }
  #sidebar-footer {
    transition:all 0.3s;
  }
  .nav-item {
    transition:all 0.3s;
  }
}

/* ─── CRITICAL ALERT BADGE ─── */
.critical-badge {
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:2px 8px 2px 6px;
  background:rgba(239,68,68,0.12);
  border:1px solid rgba(239,68,68,0.25);
  border-radius:20px;
  font-size:10px;
  font-weight:700;
  color:var(--red);
  cursor:pointer;
  transition:all 0.2s;
  animation:criticalBadgeFadeIn 0.5s ease-out;
}
.critical-badge:hover {
  background:rgba(239,68,68,0.2);
  border-color:var(--red);
  box-shadow:0 0 12px rgba(239,68,68,0.15);
}
.critical-badge-dot {
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--red);
  box-shadow:0 0 6px rgba(239,68,68,0.6);
  animation:criticalDotPulse 1.5s ease-in-out infinite;
}
@keyframes criticalDotPulse {
  0%, 100% { box-shadow:0 0 6px rgba(239,68,68,0.6); }
  50% { box-shadow:0 0 2px rgba(239,68,68,0.15); }
}
@keyframes criticalBadgeFadeIn {
  from { opacity:0; transform:scale(0.8); }
  to { opacity:1; transform:scale(1); }
}

/* ─── SIDEBAR PARTICLE CANVAS ─── */
#sidebarParticles {
  position:absolute !important;
  top:0; left:0;
  width:100%;
  height:100%;
  z-index:0;
  pointer-events:none;
  opacity:0.15;
}
#sidebar {
  position:relative;
}

