/* ============================================================================
   AstroKamya Command Center — v3 Premium Admin Design
   ============================================================================
   Inspired by: Shopify Admin, Linear, Vercel, Stripe Dashboard
   Design system: Dark luxury with depth, layered glass, gradient accents
   ============================================================================ */

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

:root {
  /* Ultra-Premium Deep Cosmic Backgrounds */
  --bg-0:             #05030A;
  --bg-1:             #090514;
  --bg-2:             #0E0820;
  --bg-3:             #160C33;
  --bg-card:          rgba(14, 8, 32, 0.55);
  --bg-card-solid:    #0E0820;
  --bg-card-hover:    rgba(20, 12, 45, 0.75);
  --bg-surface:       rgba(20, 12, 45, 0.45);
  --bg-elevated:      rgba(24, 14, 54, 0.85);
  
  /* Super Subtle Inner Glass Borders */
  --border:           rgba(255, 255, 255, 0.06);
  --border-subtle:    rgba(255, 255, 255, 0.03);
  --border-hover:     rgba(255, 255, 255, 0.12);
  --border-strong:    rgba(255, 255, 255, 0.2);
  --border-accent:    rgba(124, 58, 237, 0.25);

  /* Premium Typography */
  --text-primary:     #ffffff;
  --text-secondary:   #EBE5FA;
  --text-tertiary:    #AFA6CB;
  --text-muted:       #6B6188;

  /* Vibrant Cosmic Accents */
  --accent-primary:   #FFB800;
  --accent-indigo:    #7C3AED;
  --accent-violet:    #9B6DFF;
  --accent-cyan:      #06b6d4;
  --accent-emerald:   #10b981;
  --accent-amber:     #FFB800;
  --accent-rose:      #E8367C;
  --accent-pink:      #FF6B9D;

  /* High-Fidelity Gradients */
  --grad-primary:     linear-gradient(135deg, #FFB800 0%, #FFCB45 40%, #E5A600 100%);
  --grad-success:     linear-gradient(135deg, #059669, #10b981);
  --grad-warning:     linear-gradient(135deg, #FFB800, #FFCB45);
  --grad-danger:      linear-gradient(135deg, #E8367C, #FF6B9D);
  --grad-cosmic:      linear-gradient(135deg, #7C3AED 0%, #9B6DFF 50%, #5B21B6 100%);
  --grad-glass:       linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.0));

  /* Sizing */
  --sidebar-width:    280px;
  --topbar-height:    64px;
  --radius:           16px;
  --radius-md:        12px;
  --radius-sm:        8px;
  --radius-xs:        6px;

  /* Premium Apple/Linear-style Box Shadows */
  --shadow-card:      0 8px 32px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.06), inset 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-elevated:  0 16px 48px rgba(0,0,0,0.6), 0 0 30px rgba(124, 58, 237,0.1), inset 0 1px 2px rgba(255,255,255,0.12), inset 0 0 0 1px rgba(255,255,255,0.05);
  --shadow-glow:      0 0 50px rgba(124, 58, 237, 0.15);
  --shadow-accent:    0 8px 32px rgba(255, 184, 0,0.25), inset 0 1px 1px rgba(255,255,255,0.3);
}

html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-0);
  background-image: 
    radial-gradient(circle at 10% 40%, rgba(124, 58, 237, 0.06) 0%, transparent 60%),
    radial-gradient(circle at 90% 20%, rgba(255, 184, 0, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(6, 182, 212, 0.03) 0%, transparent 70%);
  color: var(--text-primary);
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Premium Branding Typography */
h1, h2, h3, .tab-title, .kpi-value, .lv-stat-val, .sidebar-brand {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  letter-spacing: -0.02em;
}
.hidden { display: none !important; }

/* ─── Scrollbar — Premium thin ─────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124, 58, 237,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124, 58, 237,0.4); }

/* ═══════════════════════════════════════════════════════════════
   LOGIN GATE — Cinematic
   ═══════════════════════════════════════════════════════════════ */
.login-gate {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-0);
  z-index: 9999;
  overflow: hidden;
}
.login-gate::before {
  content: ''; position: absolute; inset: 0;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(124, 58, 237,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(255, 184, 0,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(232, 54, 124,0.08) 0%, transparent 40%);
  animation: cosmicBreathe 10s ease-in-out infinite alternate;
}

@keyframes cosmicBreathe {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.login-card {
  width: 440px; max-width: 92vw;
  background: linear-gradient(145deg, rgba(17, 11, 46,0.85), rgba(26, 17, 69,0.65));
  backdrop-filter: blur(48px) saturate(1.5);
  border: 1px solid rgba(124, 58, 237,0.25);
  border-radius: 28px;
  padding: 48px;
  position: relative; z-index: 2;
  animation: loginSlide 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    inset 0 1px 1px rgba(255,255,255,0.08),
    0 30px 80px rgba(0,0,0,0.6),
    0 0 120px rgba(124, 58, 237,0.1);
}
.login-card::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 28px; pointer-events: none;
  box-shadow: inset 0 0 30px rgba(255, 184, 0,0.03);
}

@keyframes loginSlide {
  from { opacity: 0; transform: translateY(50px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo { text-align: center; margin-bottom: 36px; }
.login-logo-icon {
  width: 68px; height: 68px; border-radius: 20px;
  background: var(--grad-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 30px; margin-bottom: 18px;
  box-shadow: 0 8px 32px rgba(124, 58, 237,0.35);
}
.login-logo h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; }
.login-subtitle { color: var(--text-tertiary); font-size: 0.82rem; margin-top: 4px; letter-spacing: 0.05em; text-transform: uppercase; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 0.72rem; font-weight: 600;
  color: var(--text-tertiary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.08em;
}
.form-group input {
  width: 100%; padding: 13px 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.92rem; font-family: inherit;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}
.form-group input:focus {
  outline: none; border-color: var(--accent-indigo);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5), 0 0 0 3px rgba(124, 58, 237,0.15), 0 0 20px rgba(124, 58, 237,0.1);
  background: rgba(0, 0, 0, 0.5);
}

.form-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.checkbox-label { font-size: 0.8rem; color: var(--text-tertiary); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.checkbox-label input[type="checkbox"] { accent-color: var(--accent-indigo); }
.forgot-link { font-size: 0.8rem; color: var(--accent-primary); text-decoration: none; font-weight: 500; }
.forgot-link:hover { text-decoration: underline; }

.login-btn {
  width: 100%; padding: 14px;
  background: var(--grad-primary);
  border: none; border-radius: var(--radius-sm);
  color: #fff; font-size: 0.95rem; font-weight: 600; font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 24px rgba(124, 58, 237,0.3), 0 0 0 1px rgba(255,255,255,0.06) inset;
  position: relative; overflow: hidden;
}
.login-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent);
  transform: translateX(-100%); transition: transform 0.6s;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(124, 58, 237,0.4), 0 0 0 1px rgba(255,255,255,0.08) inset; }
.login-btn:hover::after { transform: translateX(100%); }

.login-footer { text-align: center; margin-top: 22px; display: flex; justify-content: space-between; align-items: center; }
.role-badge { font-size: 0.68rem; padding: 4px 12px; border-radius: 20px; font-weight: 600; letter-spacing: 0.03em; }
.role-super { background: rgba(124, 58, 237,0.12); color: var(--accent-primary); border: 1px solid rgba(124, 58, 237,0.15); }
.login-version { font-size: 0.68rem; color: var(--text-muted); }
.login-bg-particles { position: absolute; inset: 0; z-index: 1; }

/* ═══════════════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════════════ */
.app-shell {
  display: flex; min-height: 100vh;
  animation: shellFade 0.5s ease;
}
@keyframes shellFade { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR — Frosted layered panel
   ═══════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width); min-height: 100vh;
  background: rgba(14, 8, 32, 0.6);
  backdrop-filter: blur(32px) saturate(1.5);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 1px 0 20px rgba(0,0,0,0.5);
}

.sidebar-header {
  padding: 20px 20px 18px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(124, 58, 237,0.25);
}
.sidebar-brand { font-weight: 800; font-size: 1rem; display: block; letter-spacing: -0.02em; }
.sidebar-sub { font-size: 0.65rem; color: var(--text-muted); display: block; text-transform: uppercase; letter-spacing: 0.1em; }

.sidebar-nav { flex: 1; padding: 8px 10px; overflow-y: auto; }

.nav-section-label {
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--text-muted);
  padding: 18px 14px 6px; margin-top: 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  text-decoration: none; font-size: 0.84rem; font-weight: 500;
  transition: all 0.2s; position: relative; margin-bottom: 1px;
}
.nav-item:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.04); transform: translateX(2px); }
.nav-item.active {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: var(--shadow-accent);
  font-weight: 600;
  border-left: 3px solid #ffffff;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: #ffffff; box-shadow: 0 0 15px 2px #fff, 0 0 30px var(--accent-primary);
}

.nav-icon { font-size: 1rem; width: 22px; text-align: center; opacity: 0.9; }
.nav-badge {
  margin-left: auto; font-size: 0.6rem; padding: 2px 7px; border-radius: 20px; font-weight: 700;
  letter-spacing: 0.02em;
}
.live-pulse { background: rgba(52,211,153,0.15); color: var(--accent-emerald); animation: pulse-badge 2s infinite; }
.warn-badge { background: rgba(251,113,133,0.12); color: var(--accent-rose); }
.insight-badge { background: rgba(124, 58, 237,0.12); color: var(--accent-violet); }
@keyframes pulse-badge { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.sidebar-footer { padding: 14px 16px; border-top: 1px solid var(--border); }
.admin-profile { display: flex; align-items: center; gap: 10px; }
.admin-avatar {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--grad-cosmic);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  box-shadow: 0 2px 8px rgba(124, 58, 237,0.2);
}
.admin-name { font-weight: 600; font-size: 0.85rem; display: block; }
.admin-role { font-size: 0.68rem; color: var(--accent-primary); display: block; }

/* ═══════════════════════════════════════════════════════════════
   TOPBAR — Premium floating header
   ═══════════════════════════════════════════════════════════════ */
.main-content {
  flex: 1; margin-left: var(--sidebar-width);
  display: flex; flex-direction: column; min-height: 100vh;
  background: var(--bg-0);
}

.topbar {
  height: var(--topbar-height);
  padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 6, 24, 0.45);
  backdrop-filter: blur(48px) saturate(1.4);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.3rem; cursor: pointer; }
.breadcrumb { font-size: 0.82rem; display: flex; gap: 8px; }
.bc-home { color: var(--text-muted); }
.bc-sep { color: var(--text-muted); opacity: 0.5; }
.bc-current { color: var(--text-primary); font-weight: 600; }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.live-indicator {
  display: flex; align-items: center; gap: 6px;
  background: rgba(52,211,153,0.06);
  border: 1px solid rgba(52,211,153,0.12);
  border-radius: 24px; padding: 5px 14px;
  font-size: 0.78rem;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-emerald);
  animation: live-glow 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  box-shadow: 0 0 8px rgba(16,185,129,0.5);
}
.live-dot-mini {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-emerald);
  animation: live-glow 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  display: inline-block;
}
@keyframes live-glow {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); transform: scale(1); }
  70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); transform: scale(1.1); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); transform: scale(1); }
}

.live-count { font-weight: 700; color: var(--accent-emerald); font-family: 'JetBrains Mono', monospace; }
.live-label { color: var(--text-muted); font-size: 0.72rem; }
.topbar-time { font-size: 0.78rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.topbar-btn {
  background: rgba(26, 17, 69,0.5); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 6px 10px; cursor: pointer;
  font-size: 1rem; position: relative; color: var(--text-primary);
  transition: all 0.2s; backdrop-filter: blur(8px);
}
.topbar-btn:hover { background: var(--bg-elevated); border-color: var(--border-hover); transform: translateY(-1px); }
.notif-dot { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-rose); box-shadow: 0 0 8px rgba(251,113,133,0.4); }

/* ═══════════════════════════════════════════════════════════════
   TAB PANELS
   ═══════════════════════════════════════════════════════════════ */
.tab-panels { flex: 1; padding: 24px 28px; overflow-y: auto; }
.tab-panel { display: none; animation: panelIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.tab-panel.active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════════════════════
   KPI CARDS — Premium glassmorphic with gradient accents
   ═══════════════════════════════════════════════════════════════ */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 14px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-primary); opacity: 0; transition: opacity 0.3s;
}
.kpi-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: var(--grad-glass); opacity: 0; transition: opacity 0.3s;
}
.kpi-card:hover { 
  border-color: var(--border-hover); 
  transform: translateY(-4px) scale(1.015); 
  box-shadow: var(--shadow-elevated), var(--shadow-glow); 
  background: var(--bg-card-hover);
}
.kpi-card:hover::before { opacity: 1; height: 3px; }
.kpi-card:hover::after { opacity: 1; }

.kpi-icon {
  font-size: 1.5rem; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: rgba(124, 58, 237,0.06);
  border: 1px solid rgba(124, 58, 237,0.06); flex-shrink: 0;
}
.kpi-value { font-size: 1.45rem; font-weight: 800; display: block; letter-spacing: -0.03em; line-height: 1.2; }
.kpi-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-top: 3px; font-weight: 500; }
.kpi-trend { position: absolute; top: 14px; right: 14px; font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; letter-spacing: 0.01em; }
.kpi-trend.up { background: rgba(52,211,153,0.08); color: var(--accent-emerald); }
.kpi-trend.down { background: rgba(251,113,133,0.08); color: var(--accent-rose); }
.warn-card { border-color: rgba(251,113,133,0.2); }
.warn-card::before { background: var(--grad-danger) !important; opacity: 1 !important; }

/* ═══════════════════════════════════════════════════════════════
   CHART CARDS — Deep glass panels
   ═══════════════════════════════════════════════════════════════ */
.charts-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }

.chart-card {
  background: var(--bg-card);
  backdrop-filter: blur(28px) saturate(1.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
}
.chart-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237,0.6), transparent);
  opacity: 0.5; transition: opacity 0.3s;
}
.chart-card:hover { 
  border-color: var(--border-hover); 
  box-shadow: var(--shadow-elevated), 0 0 40px rgba(124, 58, 237,0.1); 
  transform: translateY(-2px) scale(1.005);
}
.chart-card:hover::before { opacity: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-primary), transparent); }
.chart-card.wide { grid-column: span 2; }
.chart-card.full-width { grid-column: span 3; }

.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.chart-header h3 { font-size: 0.92rem; font-weight: 700; letter-spacing: -0.01em; }
.chart-period { font-size: 0.7rem; color: var(--text-muted); }
.chart-controls { display: flex; gap: 5px; }
.view-all { font-size: 0.75rem; color: var(--accent-primary); text-decoration: none; font-weight: 500; opacity: 0.8; }
.view-all:hover { opacity: 1; text-decoration: underline; }

.chip {
  padding: 4px 12px; font-size: 0.68rem; font-weight: 600;
  border: 1px solid var(--border); border-radius: 20px;
  background: transparent; color: var(--text-tertiary);
  cursor: pointer; transition: all 0.2s; font-family: inherit;
  letter-spacing: 0.01em;
}
.chip:hover { border-color: var(--accent-indigo); color: var(--text-primary); }
.chip.active { background: var(--accent-indigo); border-color: var(--accent-indigo); color: #fff; box-shadow: 0 2px 8px rgba(124, 58, 237,0.25); }

.chart-body { position: relative; height: 260px; }

/* ═══════════════════════════════════════════════════════════════
   FUNNEL
   ═══════════════════════════════════════════════════════════════ */
.funnel-container { display: flex; flex-direction: column; gap: 8px; }
.funnel-step { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.funnel-label { width: 85px; font-size: 0.75rem; color: var(--text-tertiary); text-align: right; flex-shrink: 0; font-weight: 500; }
.funnel-bar-wrap { flex: 1; height: 26px; background: rgba(124, 58, 237,0.04); border-radius: 6px; overflow: hidden; border: 1px solid var(--border-subtle); }
.funnel-bar {
  height: 100%; border-radius: 5px;
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; align-items: center; padding-left: 10px;
  font-size: 0.68rem; font-weight: 700; color: rgba(255,255,255,0.9);
}
.funnel-pct { width: 46px; font-size: 0.8rem; font-weight: 700; color: var(--text-primary); text-align: right; flex-shrink: 0; }
.funnel-drop { font-size: 0.65rem; color: var(--accent-rose); margin-left: 2px; opacity: 0.8; }

/* ═══════════════════════════════════════════════════════════════
   EVENT FEED — Living stream
   ═══════════════════════════════════════════════════════════════ */
.event-feed { max-height: 340px; overflow-y: auto; }
.event-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-xs);
  transition: background 0.15s; border-bottom: 1px solid var(--border-subtle);
  animation: feedSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes feedSlide { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }

.event-item:hover { background: rgba(124, 58, 237,0.04); }
.event-time { font-size: 0.68rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; width: 56px; flex-shrink: 0; }
.event-badge { font-size: 0.65rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; flex-shrink: 0; letter-spacing: 0.01em; }
.event-badge.payment { background: rgba(52,211,153,0.08); color: var(--accent-emerald); }
.event-badge.match { background: rgba(124, 58, 237,0.08); color: var(--accent-violet); }
.event-badge.signup { background: rgba(34,211,238,0.08); color: var(--accent-cyan); }
.event-badge.chat { background: rgba(244,114,182,0.08); color: var(--accent-pink); }
.event-badge.system { background: rgba(251,191,36,0.08); color: var(--accent-amber); }
.event-desc { font-size: 0.78rem; flex: 1; color: var(--text-secondary); }
.event-city { font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; }
.realtime-feed { max-height: 520px; }

/* ═══════════════════════════════════════════════════════════════
   INSIGHTS — Premium card layout
   ═══════════════════════════════════════════════════════════════ */
.insights-preview { display: flex; flex-direction: column; gap: 10px; }
.insight-card {
  padding: 16px; border-radius: var(--radius-md);
  border-left: 3px solid; background: rgba(26, 17, 69,0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); cursor: pointer;
  border: 1px solid var(--border); border-left-width: 3px;
}
.insight-card:hover { background: var(--bg-card-hover); transform: translateX(4px); box-shadow: var(--shadow-card); }
.insight-card.critical { border-left-color: var(--accent-rose); }
.insight-card.warning { border-left-color: var(--accent-amber); }
.insight-card.info { border-left-color: var(--accent-cyan); }
.insight-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 5px; }
.insight-desc { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.5; }
.insight-meta { display: flex; justify-content: space-between; margin-top: 10px; align-items: center; }
.insight-category { font-size: 0.62rem; padding: 3px 8px; border-radius: 4px; background: rgba(124, 58, 237,0.06); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.insight-impact { font-size: 0.72rem; font-weight: 600; }
.insight-card.critical .insight-impact { color: var(--accent-rose); }
.insight-card.warning .insight-impact { color: var(--accent-amber); }
.insight-card.info .insight-impact { color: var(--accent-emerald); }

.insights-header { margin-bottom: 24px; }
.insights-header h2 { font-size: 1.6rem; margin-bottom: 6px; font-weight: 800; letter-spacing: -0.02em; }
.insights-header p { color: var(--text-tertiary); font-size: 0.88rem; }
.insights-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.insights-grid .insight-card { padding: 22px; }

/* ═══════════════════════════════════════════════════════════════
   RETENTION GRID
   ═══════════════════════════════════════════════════════════════ */
.retention-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.retention-cell { text-align: center; padding: 14px 6px; border-radius: var(--radius-sm); }
.retention-header { font-size: 0.62rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* ═══════════════════════════════════════════════════════════════
   LIVE VIEW — Stats Bar
   ═══════════════════════════════════════════════════════════════ */
.lv-stats-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.lv-stat {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 12px; text-align: center; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
}
.lv-stat:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: var(--shadow-elevated); }
.lv-stat-val { font-size: 1.4rem; font-weight: 800; display: block; letter-spacing: -0.02em; }
.lv-stat-lbl { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; display: block; font-weight: 600; }
.lv-stat.glow-green {
  border-color: rgba(52,211,153,0.2);
  background: radial-gradient(ellipse at center, rgba(52,211,153,0.06) 0%, transparent 70%), var(--bg-card);
  box-shadow: var(--shadow-card), 0 0 30px rgba(52,211,153,0.05);
}
.lv-stat.glow-green .lv-stat-val {
  background: linear-gradient(135deg, #34d399, #22d3ee);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-size: 1.8rem;
}

/* ═══════════════════════════════════════════════════════════════
   LIVE VIEW — Map + Visitors Grid
   ═══════════════════════════════════════════════════════════════ */
.lv-main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.lv-bottom-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.lv-map-container { position: relative; }
.lv-map-container canvas { width: 100%; height: auto; display: block; border-radius: 8px; }
.lv-map-legend { display: flex; gap: 18px; margin-top: 14px; justify-content: center; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.68rem; color: var(--text-muted); font-weight: 500; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; box-shadow: 0 0 6px currentColor; }

/* ═══════════════════════════════════════════════════════════════
   LIVE VISITOR LIST — Shopify-style
   ═══════════════════════════════════════════════════════════════ */
.lv-visitors-card { overflow: hidden; }
.lv-visitor-list { max-height: 520px; overflow-y: auto; }
.visitor-count-badge {
  font-size: 0.68rem; padding: 3px 12px; border-radius: 20px;
  background: rgba(52,211,153,0.08); color: var(--accent-emerald);
  font-weight: 600; border: 1px solid rgba(52,211,153,0.1);
}

.visitor-row {
  display: grid; grid-template-columns: 8px 1fr 110px 70px;
  align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--border-subtle);
  transition: all 0.2s; animation: feedSlide 0.35s ease;
}
.visitor-row:hover { background: rgba(124, 58, 237,0.04); }

.visitor-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-emerald); box-shadow: 0 0 6px rgba(52,211,153,0.4); }
.visitor-info { display: flex; flex-direction: column; }
.visitor-location { font-size: 0.8rem; font-weight: 500; }
.visitor-location .flag { margin-right: 4px; }
.visitor-meta { font-size: 0.64rem; color: var(--text-muted); display: flex; gap: 8px; margin-top: 2px; }
.visitor-page {
  font-size: 0.68rem; padding: 3px 8px; border-radius: 4px;
  background: rgba(124, 58, 237,0.06); color: var(--text-tertiary);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'JetBrains Mono', monospace; border: 1px solid var(--border-subtle);
}
.visitor-time { font-size: 0.68rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; text-align: right; }

/* ═══════════════════════════════════════════════════════════════
   TOP CITIES LEADERBOARD
   ═══════════════════════════════════════════════════════════════ */
.top-cities-list { display: flex; flex-direction: column; gap: 4px; }
.city-row {
  display: grid; grid-template-columns: 26px 1fr 60px 50px;
  align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: var(--radius-xs); transition: all 0.2s;
}
.city-row:hover { background: rgba(124, 58, 237,0.04); }
.city-rank {
  width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700;
  background: rgba(124, 58, 237,0.04); color: var(--text-muted);
}
.city-rank.gold { background: rgba(251,191,36,0.1); color: var(--accent-amber); }
.city-rank.silver { background: rgba(148,163,184,0.1); color: #94a3b8; }
.city-rank.bronze { background: rgba(217,119,6,0.1); color: #d97706; }
.city-name { font-size: 0.8rem; font-weight: 500; }
.city-name .city-state { font-size: 0.62rem; color: var(--text-muted); margin-left: 4px; }
.city-users { font-size: 0.78rem; font-weight: 700; text-align: right; font-family: 'JetBrains Mono', monospace; }
.city-bar-cell { position: relative; }
.city-bar-bg { height: 5px; background: rgba(124, 58, 237,0.06); border-radius: 3px; overflow: hidden; }
.city-bar-fill { height: 100%; border-radius: 3px; transition: width 1s cubic-bezier(0.16, 1, 0.3, 1); }

/* ═══════════════════════════════════════════════════════════════
   ACTIVITY HEATMAP
   ═══════════════════════════════════════════════════════════════ */
.activity-heatmap { overflow-x: auto; }
.activity-heatmap table { width: 100%; border-collapse: separate; border-spacing: 3px; }
.activity-heatmap th { font-size: 0.55rem; color: var(--text-muted); font-weight: 600; padding: 4px 2px; text-align: center; letter-spacing: 0.02em; }
.activity-heatmap td { padding: 5px 2px; border-radius: 3px; font-size: 0.58rem; text-align: center; font-weight: 600; min-width: 26px; }

/* ═══════════════════════════════════════════════════════════════
   GEO ANALYTICS — Premium tables
   ═══════════════════════════════════════════════════════════════ */
.geo-table-wrap { overflow-x: auto; }
.geo-table { width: 100%; border-collapse: collapse; }
.geo-table th {
  text-align: left; padding: 10px 12px; font-size: 0.65rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.geo-table td { padding: 11px 12px; font-size: 0.8rem; border-bottom: 1px solid var(--border-subtle); transition: background 0.15s; }
.geo-table tr:hover td { background: rgba(124, 58, 237,0.03); }
.geo-table .num { text-align: right; font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.geo-table .trend-up { color: var(--accent-emerald); font-size: 0.72rem; }
.geo-table .trend-down { color: var(--accent-rose); font-size: 0.72rem; }

.city-bars { display: flex; flex-direction: column; gap: 8px; }
.city-dist-row { display: flex; align-items: center; gap: 12px; }
.city-dist-label { width: 100px; font-size: 0.78rem; text-align: right; flex-shrink: 0; font-weight: 500; }
.city-dist-bar-wrap { flex: 1; height: 20px; background: rgba(124, 58, 237,0.04); border-radius: 4px; overflow: hidden; border: 1px solid var(--border-subtle); }
.city-dist-bar { height: 100%; border-radius: 3px; transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1); display: flex; align-items: center; padding-left: 8px; font-size: 0.64rem; font-weight: 700; color: rgba(255,255,255,0.85); }
.city-dist-val { width: 65px; text-align: right; font-size: 0.75rem; font-weight: 700; flex-shrink: 0; font-family: 'JetBrains Mono', monospace; }

/* ═══════════════════════════════════════════════════════════════
   SEARCH MODAL — Spotlight-style
   ═══════════════════════════════════════════════════════════════ */
.search-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.search-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(8px); }
.search-modal-content {
  position: relative; z-index: 2; width: 620px; max-width: 92vw;
  background: rgba(17, 11, 46, 0.7); backdrop-filter: blur(48px) saturate(1.5);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset, var(--shadow-elevated), 0 0 80px rgba(124, 58, 237, 0.08);
  animation: loginSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.search-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.search-icon { font-size: 1.1rem; opacity: 0.6; }
.search-input-wrap input {
  flex: 1; background: none; border: none; color: var(--text-primary);
  font-size: 0.95rem; font-family: inherit; outline: none;
}
.search-input-wrap kbd {
  font-size: 0.6rem; padding: 2px 6px; border: 1px solid var(--border);
  border-radius: 4px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace;
}
.search-results { padding: 8px 12px; min-height: 50px; max-height: 340px; overflow-y: auto; }
.search-hint { text-align: center; padding: 20px; color: var(--text-muted); font-size: 0.82rem; }
.search-result-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s;
}
.search-result-item:hover { background: rgba(124, 58, 237,0.06); }
.search-result-avatar { width: 34px; height: 34px; border-radius: 9px; background: var(--grad-cosmic); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.search-result-info { flex: 1; }
.search-result-name { font-size: 0.85rem; font-weight: 600; }
.search-result-detail { font-size: 0.68rem; color: var(--text-muted); }
.search-result-badge { font-size: 0.64rem; padding: 3px 8px; border-radius: 4px; font-weight: 600; }
.search-shortcuts { display: flex; gap: 16px; padding: 10px 20px; border-top: 1px solid var(--border); justify-content: center; }
.search-shortcuts span { font-size: 0.68rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.search-shortcuts kbd { font-size: 0.55rem; padding: 1px 5px; border: 1px solid var(--border); border-radius: 3px; font-family: 'JetBrains Mono', monospace; }

/* ═══════════════════════════════════════════════════════════════
   SAFETY QUEUE
   ═══════════════════════════════════════════════════════════════ */
.safety-queue { display: flex; flex-direction: column; gap: 6px; max-height: 500px; overflow-y: auto; }
.safety-item {
  display: grid; grid-template-columns: 38px 1fr 100px 90px 90px 100px;
  align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-md);
  background: rgba(26, 17, 69,0.4);
  border: 1px solid var(--border); transition: all 0.25s;
}
.safety-item:hover { border-color: var(--border-hover); background: var(--bg-card-hover); transform: translateX(2px); }

.safety-avatar { width: 34px; height: 34px; border-radius: 9px; background: var(--grad-cosmic); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: #fff; }
.safety-user { display: flex; flex-direction: column; }
.safety-name { font-size: 0.82rem; font-weight: 600; }
.safety-email { font-size: 0.68rem; color: var(--text-muted); }
.safety-type { font-size: 0.68rem; padding: 3px 10px; border-radius: 20px; font-weight: 700; text-align: center; letter-spacing: 0.02em; }
.safety-type.fake { background: rgba(251,113,133,0.08); color: var(--accent-rose); }
.safety-type.spam { background: rgba(251,191,36,0.08); color: var(--accent-amber); }
.safety-type.harassment { background: rgba(239,68,68,0.08); color: #ef4444; }
.safety-severity { font-size: 0.72rem; font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: 0.03em; }
.safety-severity.critical { color: var(--accent-rose); }
.safety-severity.high { color: var(--accent-amber); }
.safety-severity.medium { color: var(--accent-cyan); }
.safety-confidence { font-size: 0.8rem; font-weight: 700; text-align: center; font-family: 'JetBrains Mono', monospace; }
.safety-actions { display: flex; gap: 6px; justify-content: flex-end; }
.safety-btn {
  padding: 6px 12px; border-radius: 6px; font-size: 0.68rem; font-weight: 700;
  cursor: pointer; border: 1px solid transparent; font-family: inherit; transition: all 0.2s;
  letter-spacing: 0.01em;
}
.safety-btn.ban { background: rgba(251,113,133,0.08); color: var(--accent-rose); border-color: rgba(251,113,133,0.12); }
.safety-btn.ban:hover { background: rgba(251,113,133,0.18); transform: translateY(-1px); }
.safety-btn.clear { background: rgba(52,211,153,0.08); color: var(--accent-emerald); border-color: rgba(52,211,153,0.12); }
.safety-btn.clear:hover { background: rgba(52,211,153,0.18); transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════════
   SEGMENTS
   ═══════════════════════════════════════════════════════════════ */
.segments-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.segment-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: rgba(26, 17, 69,0.4); border-radius: var(--radius-md); border: 1px solid var(--border); transition: all 0.25s; }
.segment-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.segment-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.segment-name { font-weight: 700; font-size: 0.88rem; display: block; }
.segment-count { font-size: 0.72rem; color: var(--accent-primary); display: block; margin-top: 2px; font-weight: 600; }
.segment-desc { font-size: 0.68rem; color: var(--text-muted); display: block; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════
   COHORT HEATMAP
   ═══════════════════════════════════════════════════════════════ */
.cohort-heatmap { overflow-x: auto; }
.cohort-heatmap table { width: 100%; border-collapse: separate; border-spacing: 3px; }
.cohort-heatmap th { font-size: 0.62rem; color: var(--text-muted); font-weight: 600; padding: 6px 4px; text-align: center; }
.cohort-heatmap td { text-align: center; padding: 8px 4px; border-radius: 4px; font-size: 0.72rem; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   MARKETING ENGINE — Shared Components
   ═══════════════════════════════════════════════════════════════ */

/* Tab Header Row */
.tab-header-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px; gap: 16px;
}
.tab-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.tab-subtitle { color: var(--text-tertiary); font-size: 0.85rem; }

/* Action Buttons */
.action-btn {
  padding: 10px 20px; border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent; display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; letter-spacing: 0.01em;
}
.action-btn.primary {
  background: var(--grad-primary); color: #fff; border: none;
  box-shadow: 0 4px 20px rgba(255, 184, 0,0.3), inset 0 2px 0 rgba(255,255,255,0.4), inset 0 -2px 0 rgba(0,0,0,0.15);
  position: relative; overflow: hidden;
}
.action-btn.primary::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-20deg); transition: none;
}
.action-btn.primary:hover { 
  transform: translateY(-2px) scale(1.02); 
  box-shadow: var(--shadow-accent), inset 0 2px 0 rgba(255,255,255,0.5), inset 0 -2px 0 rgba(0,0,0,0.15); 
}
.action-btn.primary:hover::after {
  left: 200%; transition: left 0.6s ease-in-out;
}
.action-btn.success {
  background: rgba(52,211,153,0.1); color: var(--accent-emerald); border-color: rgba(52,211,153,0.2);
}
.action-btn.success:hover { background: rgba(52,211,153,0.18); transform: translateY(-1px); }
.action-btn.outline {
  background: transparent; color: var(--text-secondary); border-color: var(--border);
}
.action-btn.outline:hover { border-color: var(--border-hover); color: var(--text-primary); background: rgba(124, 58, 237,0.04); }
.action-btn.full-w { width: 100%; justify-content: center; }

/* Mini Form Elements */
.form-group-mini { margin-bottom: 12px; }
.form-group-mini label {
  display: block; font-size: 0.68rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px;
}
.mini-input, .mini-select {
  width: 100%; padding: 10px 12px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--border);
  border-radius: var(--radius-xs); color: var(--text-primary); font-size: 0.85rem; font-family: inherit;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}
.mini-input:focus, .mini-select:focus {
  outline: none; border-color: var(--accent-indigo);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 0 0 3px rgba(124, 58, 237,0.15), 0 0 20px rgba(124, 58, 237,0.1);
}
.mini-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%2364748b' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.mini-select option { background: var(--bg-1); color: var(--text-primary); }

/* ═══════════════════════════════════════════════════════════════
   CONTENT STUDIO — Calendar + Queue
   ═══════════════════════════════════════════════════════════════ */
.content-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-day {
  background: rgba(26, 17, 69,0.4); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 8px; min-height: 100px; transition: all 0.25s;
}
.cal-day:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.cal-day-header { font-size: 0.68rem; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; text-align: center; text-transform: uppercase; letter-spacing: 0.05em; }
.cal-day-name { font-size: 0.58rem; color: var(--text-muted); text-align: center; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.cal-item {
  font-size: 0.62rem; padding: 3px 6px; border-radius: 4px; margin-bottom: 3px;
  font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.cal-item:hover { transform: scale(1.03); }
.cal-item.carousel { background: rgba(124, 58, 237,0.12); color: #a78bfa; }
.cal-item.reel { background: rgba(52,211,153,0.12); color: var(--accent-emerald); }
.cal-item.blog { background: rgba(124, 58, 237,0.12); color: var(--accent-primary); }
.cal-item.story { background: rgba(251,191,36,0.12); color: var(--accent-amber); }
.cal-item.thread { background: rgba(232, 54, 124,0.12); color: var(--accent-pink); }

.ai-generator-panel { display: flex; flex-direction: column; gap: 2px; }
.ai-preview-box {
  margin-top: 12px; padding: 16px; border: 1px dashed var(--border);
  border-radius: var(--radius-sm); min-height: 80px;
}
.ai-preview-placeholder { color: var(--text-muted); font-size: 0.78rem; text-align: center; }

.content-queue { display: flex; flex-direction: column; gap: 6px; }
.queue-item {
  display: grid; grid-template-columns: 56px 80px 1fr 100px 120px;
  align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(26, 17, 69,0.4); border: 1px solid var(--border); transition: all 0.25s;
}
.queue-item:hover { border-color: var(--border-hover); background: var(--bg-card-hover); transform: translateX(3px); }
.queue-time { font-size: 0.75rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.queue-type { font-size: 0.65rem; padding: 3px 8px; border-radius: 4px; font-weight: 700; text-align: center; }
.queue-title { font-size: 0.82rem; font-weight: 500; }
.queue-status { font-size: 0.68rem; font-weight: 600; }
.queue-status.approved { color: var(--accent-emerald); }
.queue-status.pending { color: var(--accent-amber); }
.queue-status.generating { color: var(--accent-cyan); }
.queue-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* ═══════════════════════════════════════════════════════════════
   CAMPAIGN MANAGER — Tables + Allocation
   ═══════════════════════════════════════════════════════════════ */
.campaign-table-wrap { overflow-x: auto; }
.campaign-table { width: 100%; border-collapse: collapse; }
.campaign-table th {
  text-align: left; padding: 10px 12px; font-size: 0.65rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border); font-weight: 700;
}
.campaign-table td {
  padding: 12px 12px; font-size: 0.82rem; border-bottom: 1px solid var(--border-subtle); transition: background 0.15s;
}
.campaign-table tr:hover td { background: rgba(124, 58, 237,0.03); }
.campaign-table .num { text-align: right; font-family: 'JetBrains Mono', monospace; font-weight: 600; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.status-dot.active { background: var(--accent-emerald); box-shadow: 0 0 6px rgba(52,211,153,0.4); }
.status-dot.paused { background: var(--accent-amber); box-shadow: 0 0 6px rgba(251,191,36,0.3); }
.status-dot.stopped { background: var(--accent-rose); box-shadow: 0 0 6px rgba(251,113,133,0.3); }

.budget-allocation { display: flex; flex-direction: column; gap: 10px; }
.budget-row {
  display: grid; grid-template-columns: 90px 1fr 50px; align-items: center; gap: 10px;
}
.budget-label { font-size: 0.78rem; font-weight: 500; }
.budget-bar-wrap { height: 18px; background: rgba(124, 58, 237,0.04); border-radius: 4px; overflow: hidden; border: 1px solid var(--border-subtle); }
.budget-bar {
  height: 100%; border-radius: 3px; transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; align-items: center; justify-content: flex-end; padding-right: 6px;
  font-size: 0.58rem; font-weight: 700; color: rgba(255,255,255,0.9);
}
.budget-pct { font-size: 0.72rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; text-align: right; }

.top-creatives { display: flex; flex-direction: column; gap: 10px; }
.creative-card {
  padding: 14px; border-radius: var(--radius-sm); background: rgba(26, 17, 69,0.4);
  border: 1px solid var(--border); transition: all 0.25s; cursor: pointer;
}
.creative-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.creative-rank { font-size: 1.1rem; margin-right: 8px; }
.creative-name { font-weight: 600; font-size: 0.85rem; }
.creative-stats { display: flex; gap: 14px; margin-top: 8px; }
.creative-stat { font-size: 0.72rem; color: var(--text-muted); }
.creative-stat strong { color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }

/* ═══════════════════════════════════════════════════════════════
   SEO COMMAND — Tables + Articles
   ═══════════════════════════════════════════════════════════════ */
.seo-table-wrap { overflow-x: auto; }
.seo-table { width: 100%; border-collapse: collapse; }
.seo-table th {
  text-align: left; padding: 10px 12px; font-size: 0.65rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border); font-weight: 700;
}
.seo-table td { padding: 11px 12px; font-size: 0.82rem; border-bottom: 1px solid var(--border-subtle); transition: background 0.15s; }
.seo-table tr:hover td { background: rgba(124, 58, 237,0.03); }
.seo-table .num { text-align: right; font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; padding: 2px 8px; border-radius: 6px; font-size: 0.75rem;
  font-weight: 700; font-family: 'JetBrains Mono', monospace;
}
.rank-badge.top3 { background: rgba(52,211,153,0.1); color: var(--accent-emerald); }
.rank-badge.top10 { background: rgba(124, 58, 237,0.1); color: var(--accent-primary); }
.rank-badge.below { background: rgba(251,191,36,0.08); color: var(--accent-amber); }
.rank-change { font-size: 0.72rem; font-weight: 600; }
.rank-change.up { color: var(--accent-emerald); }
.rank-change.down { color: var(--accent-rose); }

.articles-queue { display: flex; flex-direction: column; gap: 8px; }
.article-item {
  display: grid; grid-template-columns: 24px 1fr 120px 100px;
  align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(26, 17, 69,0.4); border: 1px solid var(--border); transition: all 0.25s;
}
.article-item:hover { border-color: var(--border-hover); transform: translateX(3px); }
.article-icon { font-size: 1rem; }
.article-title { font-weight: 600; font-size: 0.85rem; }
.article-status { font-size: 0.72rem; font-weight: 600; }
.article-status.published { color: var(--accent-emerald); }
.article-status.queued { color: var(--accent-amber); }
.article-status.generating { color: var(--accent-cyan); animation: pulse-badge 2s infinite; }

/* ═══════════════════════════════════════════════════════════════
   SOCIAL PUBLISHER — Queue + Platform Breakdown
   ═══════════════════════════════════════════════════════════════ */
.social-queue { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow-y: auto; }
.social-item {
  display: grid; grid-template-columns: 28px 60px 80px 1fr 80px 80px;
  align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: rgba(26, 17, 69,0.3); border: 1px solid var(--border); transition: all 0.2s;
}
.social-item:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.social-platform { font-size: 1.1rem; text-align: center; }
.social-time { font-size: 0.72rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.social-type { font-size: 0.62rem; padding: 2px 8px; border-radius: 4px; font-weight: 700; text-align: center; }
.social-caption { font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social-status { font-size: 0.68rem; font-weight: 600; text-align: center; }
.social-status.scheduled { color: var(--accent-cyan); }
.social-status.posted { color: var(--accent-emerald); }

.platform-breakdown { display: flex; flex-direction: column; gap: 12px; }
.platform-card {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: var(--radius-sm); background: rgba(26, 17, 69,0.4); border: 1px solid var(--border);
  transition: all 0.25s;
}
.platform-card:hover { border-color: var(--border-hover); transform: translateX(3px); }
.platform-icon { font-size: 1.4rem; width: 36px; text-align: center; }
.platform-info { flex: 1; }
.platform-name { font-weight: 600; font-size: 0.85rem; display: block; }
.platform-followers { font-size: 0.72rem; color: var(--text-muted); display: block; }
.platform-engagement { font-size: 0.78rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

.top-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.top-post-card {
  padding: 16px; border-radius: var(--radius-sm); background: rgba(26, 17, 69,0.4);
  border: 1px solid var(--border); transition: all 0.25s; cursor: pointer;
}
.top-post-card:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.top-post-type { font-size: 0.62rem; padding: 2px 8px; border-radius: 4px; font-weight: 700; margin-bottom: 8px; display: inline-block; }
.top-post-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 10px; line-height: 1.4; }
.top-post-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.top-post-stat { font-size: 0.72rem; color: var(--text-muted); }
.top-post-stat strong { color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }

/* ═══════════════════════════════════════════════════════════════
   FUNNEL LAB — A/B Tests + Funnel
   ═══════════════════════════════════════════════════════════════ */
.ab-tests { display: flex; flex-direction: column; gap: 12px; }
.ab-test-card {
  padding: 18px; border-radius: var(--radius-md); background: rgba(26, 17, 69,0.4);
  border: 1px solid var(--border); transition: all 0.25s;
}
.ab-test-card:hover { border-color: var(--border-hover); }
.ab-test-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ab-test-name { font-weight: 700; font-size: 0.92rem; }
.ab-test-status { font-size: 0.68rem; padding: 3px 10px; border-radius: 20px; font-weight: 700; }
.ab-test-status.running { background: rgba(52,211,153,0.08); color: var(--accent-emerald); }
.ab-test-status.winner { background: rgba(124, 58, 237,0.08); color: var(--accent-primary); }
.ab-variants { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ab-variant {
  padding: 12px; border-radius: var(--radius-xs); border: 1px solid var(--border);
  background: rgba(10, 6, 24,0.4);
}
.ab-variant-label { font-size: 0.68rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.ab-variant-value { font-size: 1.1rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.ab-variant-bar { height: 4px; border-radius: 2px; margin-top: 8px; background: rgba(124, 58, 237,0.06); overflow: hidden; }
.ab-variant-fill { height: 100%; border-radius: 2px; transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
.ab-variant.winning { border-color: rgba(52,211,153,0.3); }
.ab-variant.winning .ab-variant-value { color: var(--accent-emerald); }
.ab-confidence { font-size: 0.72rem; color: var(--text-muted); margin-top: 10px; text-align: right; }

.full-funnel { display: flex; flex-direction: column; gap: 8px; }

.completed-experiments { display: flex; flex-direction: column; gap: 8px; }
.exp-item {
  padding: 12px; border-radius: var(--radius-sm); background: rgba(26, 17, 69,0.4);
  border: 1px solid var(--border); transition: all 0.2s;
}
.exp-item:hover { border-color: var(--border-hover); }
.exp-name { font-weight: 600; font-size: 0.82rem; margin-bottom: 4px; }
.exp-result { font-size: 0.72rem; color: var(--accent-emerald); font-weight: 600; }
.exp-date { font-size: 0.65rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   WAR ROOM — Anomalies, Attribution, Weekly Brief
   ═══════════════════════════════════════════════════════════════ */
.anomaly-alerts { display: flex; flex-direction: column; gap: 8px; }
.anomaly-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  transition: all 0.25s; cursor: pointer;
}
.anomaly-card:hover { transform: translateX(3px); }
.anomaly-card.critical { background: rgba(239,68,68,0.04); border-left: 3px solid var(--accent-rose); }
.anomaly-card.warning { background: rgba(251,191,36,0.04); border-left: 3px solid var(--accent-amber); }
.anomaly-card.info { background: rgba(124, 58, 237,0.04); border-left: 3px solid var(--accent-primary); }
.anomaly-icon { font-size: 1.2rem; flex-shrink: 0; }
.anomaly-content { flex: 1; }
.anomaly-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 2px; }
.anomaly-desc { font-size: 0.75rem; color: var(--text-secondary); }
.anomaly-action {
  padding: 6px 14px; border-radius: 6px; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; background: rgba(124, 58, 237,0.08); color: var(--accent-primary);
  border: 1px solid rgba(124, 58, 237,0.12); transition: all 0.2s; font-family: inherit;
}
.anomaly-action:hover { background: rgba(124, 58, 237,0.15); transform: translateY(-1px); }

.attribution-table { overflow-x: auto; }
.attr-table { width: 100%; border-collapse: collapse; }
.attr-table th {
  text-align: left; padding: 10px 12px; font-size: 0.65rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border); font-weight: 700;
}
.attr-table td { padding: 11px 12px; font-size: 0.82rem; border-bottom: 1px solid var(--border-subtle); }
.attr-table tr:hover td { background: rgba(124, 58, 237,0.03); }
.attr-table .num { text-align: right; font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.attr-bar-cell { width: 80px; }
.attr-bar-bg { height: 6px; background: rgba(124, 58, 237,0.06); border-radius: 3px; overflow: hidden; }
.attr-bar-fill { height: 100%; border-radius: 3px; }

.weekly-brief { padding: 4px 0; }
.brief-section { margin-bottom: 16px; }
.brief-label { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.brief-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 4px; }
.brief-text { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.55; }
.brief-highlight { font-size: 0.82rem; line-height: 1.6; }
.brief-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.65rem; font-weight: 700; margin-right: 6px; }
.brief-tag.win { background: rgba(52,211,153,0.08); color: var(--accent-emerald); }
.brief-tag.concern { background: rgba(251,191,36,0.08); color: var(--accent-amber); }
.brief-tag.action { background: rgba(124, 58, 237,0.08); color: var(--accent-primary); }

/* ═══════════════════════════════════════════════════════════════
   COMMUNITY HUB — Channels + Influencers
   ═══════════════════════════════════════════════════════════════ */
.channel-performance { overflow-x: auto; }
.channel-table { width: 100%; border-collapse: collapse; }
.channel-table th {
  text-align: left; padding: 10px 12px; font-size: 0.65rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border); font-weight: 700;
}
.channel-table td { padding: 11px 12px; font-size: 0.82rem; border-bottom: 1px solid var(--border-subtle); }
.channel-table tr:hover td { background: rgba(124, 58, 237,0.03); }
.channel-table .num { text-align: right; font-family: 'JetBrains Mono', monospace; font-weight: 600; }

.influencer-list { display: flex; flex-direction: column; gap: 8px; }
.influencer-card {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: var(--radius-sm); background: rgba(26, 17, 69,0.4);
  border: 1px solid var(--border); transition: all 0.25s;
}
.influencer-card:hover { border-color: var(--border-hover); transform: translateX(3px); }
.influencer-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--grad-cosmic);
  display: flex; align-items: center; justify-content: center; font-size: 0.72rem;
  font-weight: 700; color: #fff; flex-shrink: 0;
}
.influencer-info { flex: 1; }
.influencer-name { font-weight: 600; font-size: 0.85rem; display: block; }
.influencer-handle { font-size: 0.72rem; color: var(--accent-primary); display: block; }
.influencer-followers { font-size: 0.78rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

.community-feed { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow-y: auto; }
.comm-item {
  display: grid; grid-template-columns: 28px 1fr 80px;
  align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-xs); border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}
.comm-item:hover { background: rgba(124, 58, 237,0.04); }
.comm-icon { font-size: 1rem; text-align: center; }
.comm-text { font-size: 0.78rem; color: var(--text-secondary); }
.comm-text strong { color: var(--text-primary); }
.comm-time { font-size: 0.68rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; text-align: right; }

/* ═══════════════════════════════════════════════════════════════
   AI STRATEGY — Chat + Quick Actions
   ═══════════════════════════════════════════════════════════════ */
.ai-chat-card { background: var(--bg-card); }
.ai-chat-container { display: flex; flex-direction: column; height: 480px; }
.ai-chat-messages { flex: 1; overflow-y: auto; padding: 8px 0; display: flex; flex-direction: column; gap: 12px; }

.ai-msg {
  max-width: 85%; padding: 14px 18px; border-radius: 14px; font-size: 0.85rem; line-height: 1.6;
  animation: msgSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes msgSlide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.ai-msg.bot {
  align-self: flex-start; background: rgba(124, 58, 237,0.06);
  border: 1px solid rgba(124, 58, 237,0.1); border-bottom-left-radius: 4px;
}
.ai-msg.user {
  align-self: flex-end; background: var(--grad-primary);
  color: #fff; border-bottom-right-radius: 4px;
}
.ai-msg .msg-label { font-size: 0.68rem; font-weight: 700; margin-bottom: 6px; display: block; }
.ai-msg.bot .msg-label { color: var(--accent-primary); }
.ai-msg.user .msg-label { color: rgba(255,255,255,0.7); }

.ai-msg ol, .ai-msg ul { padding-left: 20px; margin: 8px 0; }
.ai-msg li { margin-bottom: 6px; }

.ai-chat-input-wrap {
  display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border);
  margin-top: 8px;
}
.ai-chat-input {
  flex: 1; padding: 12px 16px; background: rgba(10, 6, 24,0.6);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 0.88rem; font-family: inherit;
  transition: all 0.25s;
}
.ai-chat-input:focus {
  outline: none; border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(124, 58, 237,0.1);
}

.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-action-btn {
  display: flex; align-items: center; gap: 10px; padding: 16px;
  border-radius: var(--radius-sm); background: rgba(26, 17, 69,0.4);
  border: 1px solid var(--border); cursor: pointer; transition: all 0.25s;
  font-family: inherit; font-size: 0.85rem; font-weight: 500; color: var(--text-primary);
  text-align: left;
}
.quick-action-btn:hover {
  border-color: var(--accent-indigo); background: rgba(124, 58, 237,0.06);
  transform: translateY(-2px); box-shadow: var(--shadow-card);
}
.qa-icon { font-size: 1.3rem; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .charts-row, .lv-bottom-grid { grid-template-columns: 1fr; }
  .lv-main-grid { grid-template-columns: 1fr; }
  .chart-card.wide, .chart-card.full-width { grid-column: span 1; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .lv-stats-bar { grid-template-columns: repeat(3, 1fr); }
  .content-calendar { grid-template-columns: repeat(4, 1fr); }
  .top-posts { grid-template-columns: repeat(2, 1fr); }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .ab-variants { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .kpi-row { grid-template-columns: 1fr; }
  .lv-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .segments-grid { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: 1fr; }
  .safety-item { grid-template-columns: 1fr; gap: 6px; }
  .visitor-row { grid-template-columns: 8px 1fr 70px; }
  .visitor-page { display: none; }
  .tab-panels { padding: 16px; }
  .tab-header-row { flex-direction: column; }
  .content-calendar { grid-template-columns: repeat(2, 1fr); }
  .queue-item { grid-template-columns: 56px 1fr; }
  .queue-type, .queue-status, .queue-actions { display: none; }
  .social-item { grid-template-columns: 28px 1fr 80px; }
  .social-time, .social-type, .social-platform + .social-time + .social-type ~ * { display: none; }
  .top-posts { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
  .campaign-table { font-size: 0.72rem; }
  .ai-chat-container { height: 360px; }
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS — Slide-in from right
   ═══════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed; top: 80px; right: 24px; z-index: 99999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none; max-width: 420px;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 20px;
  background: rgba(17, 11, 46, 0.92);
  backdrop-filter: blur(32px) saturate(1.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated), 0 0 40px rgba(0,0,0,0.3);
  animation: toastSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: all;
  position: relative; overflow: hidden;
  min-width: 320px;
}
.toast::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
}
.toast.info::before { background: var(--accent-cyan); }
.toast.success::before { background: var(--accent-emerald); }
.toast.warning::before { background: var(--accent-amber); }
.toast.critical::before { background: var(--accent-rose); }
.toast.removing { animation: toastSlideOut 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.toast-icon {
  font-size: 1.2rem; width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.toast.info .toast-icon { background: rgba(6,182,212,0.1); }
.toast.success .toast-icon { background: rgba(16,185,129,0.1); }
.toast.warning .toast-icon { background: rgba(255,184,0,0.1); }
.toast.critical .toast-icon { background: rgba(232,54,124,0.1); }

.toast-body { flex: 1; }
.toast-title { font-size: 0.82rem; font-weight: 700; margin-bottom: 2px; }
.toast-message { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.4; }
.toast-close {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 1rem; padding: 0; opacity: 0.5; transition: opacity 0.2s;
}
.toast-close:hover { opacity: 1; }

.toast-progress {
  position: absolute; bottom: 0; left: 0; height: 2px;
  border-radius: 0 0 0 var(--radius-md);
  animation: toastProgress 5s linear forwards;
}
.toast.info .toast-progress { background: var(--accent-cyan); }
.toast.success .toast-progress { background: var(--accent-emerald); }
.toast.warning .toast-progress { background: var(--accent-amber); }
.toast.critical .toast-progress { background: var(--accent-rose); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); max-height: 120px; margin-bottom: 10px; }
  to { opacity: 0; transform: translateX(120px) scale(0.9); max-height: 0; margin-bottom: 0; padding: 0; }
}
@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

/* ═══════════════════════════════════════════════════════════════
   COMMAND PALETTE — Spotlight / Raycast style
   ═══════════════════════════════════════════════════════════════ */
.command-palette {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 18vh;
}
.cp-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.65);
  backdrop-filter: blur(12px);
}
.cp-dialog {
  position: relative; z-index: 2; width: 640px; max-width: 92vw;
  background: rgba(17, 11, 46, 0.85);
  backdrop-filter: blur(48px) saturate(1.5);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset, var(--shadow-elevated), 0 0 100px rgba(124, 58, 237, 0.1);
  animation: loginSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.cp-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.cp-icon {
  font-size: 1rem; width: 28px; height: 28px; border-radius: 6px;
  background: rgba(124,58,237,0.1); display: flex; align-items: center;
  justify-content: center; color: var(--accent-primary); font-weight: 700;
}
.cp-input-wrap input {
  flex: 1; background: none; border: none; color: var(--text-primary);
  font-size: 1rem; font-family: inherit; outline: none;
}
.cp-input-wrap kbd {
  font-size: 0.6rem; padding: 2px 6px; border: 1px solid var(--border);
  border-radius: 4px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace;
}
.cp-results {
  padding: 8px; max-height: 360px; overflow-y: auto;
}
.cp-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.15s;
}
.cp-result-item:hover, .cp-result-item.active {
  background: rgba(124, 58, 237, 0.1);
}
.cp-result-item.active {
  border: 1px solid rgba(124, 58, 237, 0.3);
}
.cp-result-icon {
  font-size: 1rem; width: 32px; height: 32px; border-radius: 8px;
  background: rgba(124,58,237,0.06); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.cp-result-info { flex: 1; }
.cp-result-name { font-size: 0.85rem; font-weight: 600; }
.cp-result-desc { font-size: 0.68rem; color: var(--text-muted); }
.cp-result-shortcut {
  font-size: 0.6rem; padding: 2px 6px; border: 1px solid var(--border);
  border-radius: 4px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace;
}
.cp-footer {
  display: flex; gap: 16px; padding: 10px 22px; border-top: 1px solid var(--border);
  justify-content: center;
}
.cp-footer span { font-size: 0.68rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.cp-footer kbd { font-size: 0.55rem; padding: 1px 5px; border: 1px solid var(--border); border-radius: 3px; font-family: 'JetBrains Mono', monospace; }

/* ═══════════════════════════════════════════════════════════════
   KEYBOARD SHORTCUTS OVERLAY
   ═══════════════════════════════════════════════════════════════ */
.shortcuts-modal {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
}
.shortcuts-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
}
.shortcuts-dialog {
  position: relative; z-index: 2; width: 520px; max-width: 92vw;
  background: rgba(17, 11, 46, 0.9); backdrop-filter: blur(48px) saturate(1.5);
  border: 1px solid rgba(124, 58, 237, 0.25); border-radius: 20px;
  padding: 32px; box-shadow: var(--shadow-elevated);
  animation: loginSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.shortcuts-dialog h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 24px; text-align: center; }
.shortcuts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shortcut-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(26, 17, 69, 0.4); border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
}
.shortcut-item kbd {
  font-size: 0.65rem; padding: 3px 8px; border: 1px solid var(--border);
  border-radius: 5px; background: rgba(10,6,24,0.6); font-family: 'JetBrains Mono', monospace;
  color: var(--accent-primary); font-weight: 600; min-width: 24px; text-align: center;
}
.shortcut-item span { color: var(--text-secondary); margin-left: auto; font-size: 0.75rem; }
.shortcuts-close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--text-muted); font-size: 1.3rem; cursor: pointer; transition: opacity 0.2s;
}
.shortcuts-close:hover { opacity: 0.7; }

/* ═══════════════════════════════════════════════════════════════
   FULLSCREEN CHART MODAL
   ═══════════════════════════════════════════════════════════════ */
.fullscreen-chart {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
}
.fs-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(12px);
}
.fs-dialog {
  position: relative; z-index: 2; width: 90vw; max-width: 1200px; height: 80vh;
  background: rgba(17, 11, 46, 0.95); backdrop-filter: blur(48px);
  border: 1px solid rgba(124, 58, 237, 0.25); border-radius: 24px;
  overflow: hidden; box-shadow: var(--shadow-elevated);
  animation: loginSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; flex-direction: column;
}
.fs-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 28px; border-bottom: 1px solid var(--border);
}
.fs-header h3 { font-size: 1.2rem; font-weight: 800; }
.fs-close {
  background: rgba(124,58,237,0.1); border: 1px solid var(--border);
  border-radius: 8px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary); font-size: 1.2rem; cursor: pointer;
  transition: all 0.2s;
}
.fs-close:hover { background: rgba(124,58,237,0.2); }
.fs-body { flex: 1; padding: 24px; position: relative; }
.fs-body canvas { width: 100% !important; height: 100% !important; }

/* ═══════════════════════════════════════════════════════════════
   SYSTEM HEALTH INDICATOR
   ═══════════════════════════════════════════════════════════════ */
.system-health {
  display: flex; align-items: center; gap: 6px;
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.12);
  border-radius: 24px; padding: 5px 14px; cursor: pointer;
  transition: all 0.3s;
}
.system-health:hover { background: rgba(16,185,129,0.1); }
.health-dot {
  width: 7px; height: 7px; border-radius: 50%;
  animation: live-glow 2s infinite;
}
.health-dot.healthy { background: var(--accent-emerald); box-shadow: 0 0 8px rgba(16,185,129,0.5); }
.health-dot.degraded { background: var(--accent-amber); box-shadow: 0 0 8px rgba(255,184,0,0.5); }
.health-dot.down { background: var(--accent-rose); box-shadow: 0 0 8px rgba(232,54,124,0.5); animation: none; }
.health-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════
   CHART ACTION BUTTONS — Export & Expand
   ═══════════════════════════════════════════════════════════════ */
.chart-actions {
  display: flex; align-items: center; gap: 8px;
}
.chart-export-btn, .chart-expand-btn {
  background: rgba(26,17,69,0.5); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 8px; cursor: pointer;
  font-size: 0.8rem; color: var(--text-muted); transition: all 0.2s;
}
.chart-export-btn:hover, .chart-expand-btn:hover {
  background: var(--bg-elevated); border-color: var(--border-hover);
  color: var(--text-primary); transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   CHART.JS CUSTOM STYLES — Tooltip + Container
   ═══════════════════════════════════════════════════════════════ */
.chart-body canvas {
  max-height: 280px !important;
}
.chart-body {
  position: relative;
  height: 260px;
}

/* Sound toggle active state */
.topbar-btn.sound-off { opacity: 0.4; }

/* ═══════════════════════════════════════════════════════════════
   BOUTIQUE ORDERS TABLE
   ═══════════════════════════════════════════════════════════════ */
.admin-orders-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left; padding: 10px 12px; font-size: 0.65rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border); font-weight: 700;
}
.admin-table td {
  padding: 12px 12px; font-size: 0.82rem; border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}
.admin-table tr:hover td { background: rgba(124, 58, 237,0.03); }
.admin-table .order-id-cell {
  font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 0.78rem;
  color: var(--accent-primary);
}
.admin-table .order-total { font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.order-status-pill {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.order-status-pill.confirmed { background: rgba(99,102,241,0.1); color: #818cf8; }
.order-status-pill.processing { background: rgba(245,158,11,0.1); color: #fbbf24; }
.order-status-pill.shipped { background: rgba(6,182,212,0.1); color: #22d3ee; }
.order-status-pill.in_transit { background: rgba(139,92,246,0.1); color: #a78bfa; }
.order-status-pill.out_for_delivery { background: rgba(16,185,129,0.1); color: #34d399; }
.order-status-pill.delivered { background: rgba(16,185,129,0.1); color: #34d399; }
.order-status-pill.cancelled { background: rgba(239,68,68,0.1); color: #f87171; }
.order-status-pill.return_requested { background: rgba(245,158,11,0.1); color: #fbbf24; }
.order-status-pill.returned { background: rgba(139,92,246,0.1); color: #a78bfa; }
.order-status-pill.refunded { background: rgba(99,102,241,0.1); color: #818cf8; }
.order-actions { display: flex; gap: 4px; }
.order-action-btn {
  padding: 5px 10px; border-radius: 6px; font-size: 0.68rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; font-family: inherit; transition: all 0.2s;
}
.order-action-btn.ship { background: rgba(6,182,212,0.08); color: #22d3ee; border-color: rgba(6,182,212,0.15); }
.order-action-btn.ship:hover { background: rgba(6,182,212,0.18); transform: translateY(-1px); }
.order-action-btn.view { background: rgba(124,58,237,0.08); color: var(--accent-primary); border-color: rgba(124,58,237,0.12); }
.order-action-btn.view:hover { background: rgba(124,58,237,0.18); transform: translateY(-1px); }
.order-action-btn.cancel { background: rgba(239,68,68,0.08); color: #f87171; border-color: rgba(239,68,68,0.12); }
.order-action-btn.cancel:hover { background: rgba(239,68,68,0.18); transform: translateY(-1px); }
.empty-row td { color: var(--text-muted); font-style: italic; }

/* ═══════════════════════════════════════════════════════════════
   PREMIUM TABLE INTERACTION — Cinematic Scale & Hover
   ═══════════════════════════════════════════════════════════════ */
tbody tr {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
tbody tr:hover {
  background: rgba(124, 58, 237, 0.08) !important;
  transform: scale(1.01) translateY(-1px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(124, 58, 237, 0.1);
  z-index: 10;
}
tbody tr:hover td {
  background: transparent !important;
  border-bottom-color: transparent !important;
}

/* ═══════════════════════════════════════════════════════════════
   2FA — TOTP Login Step + Settings
   ═══════════════════════════════════════════════════════════════ */
.totp-step {
  text-align: center;
  animation: loginSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.totp-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: shieldPulse 2s ease-in-out infinite;
}
@keyframes shieldPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.4)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 16px rgba(124, 58, 237, 0.8)); }
}
.totp-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.totp-desc {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}
.totp-input-row {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.totp-input {
  width: 220px;
  text-align: center;
  font-size: 2rem;
  letter-spacing: 10px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}
.totp-input:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5), 0 0 0 3px rgba(124, 58, 237, 0.2), 0 0 30px rgba(124, 58, 237, 0.15);
  background: rgba(0, 0, 0, 0.5);
}
.totp-input::placeholder {
  color: rgba(255, 255, 255, 0.1);
  letter-spacing: 10px;
}
.totp-back-btn {
  display: block;
  margin: 16px auto 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  transition: all 0.2s;
  font-family: inherit;
}
.totp-back-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

/* Sidebar 2FA Button */
.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-2fa-btn {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-primary);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-2fa-btn:hover {
  background: rgba(124, 58, 237, 0.18);
  border-color: var(--accent-indigo);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

/* Modal overlay for 2FA settings */
#twofa-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
}
#twofa-modal .modal-content {
  animation: loginSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
