/* ==========================================================================
   AI TRADER HEDGE • FIGMA-GRADE MULTI-THEME DESIGN SYSTEM & TERMINAL UI
   Style Version: 4.0.0 (Luxury Obsidian & Multi-Theme Fintech Edition)
   Themes: Obsidian Gold (VIP), Cyber Emerald (TradingView), Midnight Amethyst, Titanium Minimal
   ========================================================================== */

:root {
  /* ==========================================================================
     DEFAULT THEME: OBSIDIAN ONYX & CHAMPAGNE GOLD (VIP Institutional)
     Zero Navy Blue • Deep Charcoal Glassmorphism • Luxury Warm Gold & Cyber Mint
     ========================================================================== */
  --theme-name: "Obsidian Gold";
  --bg-base: #08090d;
  --bg-surface: rgba(18, 20, 26, 0.78);
  --bg-surface-elevated: rgba(26, 29, 38, 0.84);
  --bg-card: rgba(17, 19, 25, 0.70);
  --bg-card-hover: rgba(28, 32, 42, 0.90);
  --bg-input: rgba(12, 14, 18, 0.92);
  
  /* Specular Borders & Outlines */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-strong: rgba(255, 255, 255, 0.24);
  --border-glow: rgba(245, 158, 11, 0.45);
  --border-glow-emerald: rgba(16, 185, 129, 0.45);

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  /* Primary Theme Accent (Champagne Gold) */
  --accent-primary: #f59e0b;
  --accent-primary-hover: #fbbf24;
  --accent-primary-tint: rgba(245, 158, 11, 0.12);
  --accent-primary-glow: rgba(245, 158, 11, 0.35);

  /* Trading Win / Buy / Positive Accent */
  --accent-emerald: #10b981;
  --accent-emerald-dark: #059669;
  --accent-emerald-tint: rgba(16, 185, 129, 0.14);
  --accent-emerald-glow: rgba(16, 185, 129, 0.30);
  
  /* Trading Loss / Sell / Stop Accent */
  --accent-rose: #f43f5e;
  --accent-rose-tint: rgba(244, 63, 94, 0.14);
  --accent-rose-glow: rgba(244, 63, 94, 0.30);
  
  --accent-amber: #f59e0b;
  --accent-amber-tint: rgba(245, 158, 11, 0.14);
  --accent-amber-glow: rgba(245, 158, 11, 0.25);

  --accent-purple: #a855f7;
  --accent-purple-tint: rgba(168, 85, 247, 0.14);
  --accent-purple-glow: rgba(168, 85, 247, 0.25);

  /* Legacy alias for compatibility */
  --accent-blue: var(--accent-primary);
  --accent-blue-deep: #d97706;
  --accent-blue-tint: var(--accent-primary-tint);
  --accent-blue-glow: var(--accent-primary-glow);

  /* Background Ambient Radials */
  --body-bg-gradient: 
    radial-gradient(at 12% 8%, rgba(245, 158, 11, 0.08) 0px, transparent 42%),
    radial-gradient(at 88% 12%, rgba(16, 185, 129, 0.07) 0px, transparent 38%),
    radial-gradient(at 50% 88%, rgba(245, 158, 11, 0.04) 0px, transparent 48%),
    linear-gradient(180deg, #07080c 0%, #0c0d12 100%);

  /* Card Consolidated Styling */
  --card-consolidated-bg: linear-gradient(145deg, rgba(32, 26, 16, 0.90) 0%, rgba(18, 15, 11, 0.95) 100%);
  --card-consolidated-border: rgba(245, 158, 11, 0.40);
  --card-consolidated-glow: 0 16px 40px -10px rgba(245, 158, 11, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  --card-consolidated-stripe: linear-gradient(90deg, #f59e0b, #10b981);

  /* Tab Active Gradient */
  --tab-active-gradient: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(16, 185, 129, 0.18) 100%);
  --tab-active-border: rgba(245, 158, 11, 0.50);
  --tab-active-shadow: 0 4px 18px rgba(245, 158, 11, 0.25);

  /* Button Tokens */
  --button-primary-bg: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --button-primary-text: #050505;
  --button-primary-hover: linear-gradient(135deg, #fbbf24 0%, #b45309 100%);

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', Menlo, monospace;

  /* Geometry & Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Specular & Volumetric Shadows */
  --shadow-card: 
    0 20px 40px -15px rgba(0, 0, 0, 0.75),
    0 0 1px 1px var(--border-subtle),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-card-hover: 
    0 24px 50px -12px rgba(0, 0, 0, 0.85),
    0 0 0 1px var(--border-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --shadow-glow: 0 0 30px -5px var(--accent-primary-glow);
  --shadow-glow-emerald: 0 0 30px -5px var(--accent-emerald-glow);
}

/* ==========================================================================
   THEME 2: CYBER EMERALD (TradingView Pro / Linear App)
   ========================================================================== */
[data-theme="cyber-emerald"], body.theme-cyber-emerald {
  --theme-name: "Cyber Emerald";
  --bg-base: #06080a;
  --bg-surface: rgba(14, 20, 24, 0.80);
  --bg-surface-elevated: rgba(20, 30, 36, 0.86);
  --bg-card: rgba(13, 19, 23, 0.72);
  --bg-card-hover: rgba(22, 34, 40, 0.92);
  --bg-input: rgba(9, 14, 17, 0.94);
  --border-glow: rgba(0, 245, 155, 0.45);
  --accent-primary: #00f59b;
  --accent-primary-hover: #34d399;
  --accent-primary-tint: rgba(0, 245, 155, 0.14);
  --accent-primary-glow: rgba(0, 245, 155, 0.35);
  --accent-blue: #00f59b;
  --accent-blue-deep: #059669;
  --accent-blue-tint: rgba(0, 245, 155, 0.14);
  --accent-blue-glow: rgba(0, 245, 155, 0.35);
  --body-bg-gradient: 
    radial-gradient(at 12% 8%, rgba(0, 245, 155, 0.09) 0px, transparent 42%),
    radial-gradient(at 88% 12%, rgba(56, 189, 248, 0.07) 0px, transparent 38%),
    linear-gradient(180deg, #050709 0%, #0a0e13 100%);
  --card-consolidated-bg: linear-gradient(145deg, rgba(10, 32, 24, 0.90) 0%, rgba(6, 20, 16, 0.95) 100%);
  --card-consolidated-border: rgba(0, 245, 155, 0.40);
  --card-consolidated-glow: 0 16px 40px -10px rgba(0, 245, 155, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  --card-consolidated-stripe: linear-gradient(90deg, #00f59b, #38bdf8);
  --tab-active-gradient: linear-gradient(135deg, rgba(0, 245, 155, 0.28) 0%, rgba(56, 189, 248, 0.18) 100%);
  --tab-active-border: rgba(0, 245, 155, 0.50);
  --tab-active-shadow: 0 4px 18px rgba(0, 245, 155, 0.25);
  --button-primary-bg: linear-gradient(135deg, #00f59b 0%, #059669 100%);
  --button-primary-text: #051b11;
  --button-primary-hover: linear-gradient(135deg, #34d399 0%, #047857 100%);
}

/* ==========================================================================
   THEME 3: MIDNIGHT AMETHYST (Revolut Ultra / Web3)
   ========================================================================== */
[data-theme="midnight-amethyst"], body.theme-midnight-amethyst {
  --theme-name: "Midnight Amethyst";
  --bg-base: #0a0714;
  --bg-surface: rgba(22, 16, 36, 0.80);
  --bg-surface-elevated: rgba(32, 24, 52, 0.86);
  --bg-card: rgba(20, 15, 33, 0.72);
  --bg-card-hover: rgba(36, 27, 60, 0.92);
  --bg-input: rgba(14, 10, 23, 0.94);
  --border-glow: rgba(168, 85, 247, 0.45);
  --accent-primary: #a855f7;
  --accent-primary-hover: #c084fc;
  --accent-primary-tint: rgba(168, 85, 247, 0.15);
  --accent-primary-glow: rgba(168, 85, 247, 0.35);
  --accent-blue: #a855f7;
  --accent-blue-deep: #7c3aed;
  --accent-blue-tint: rgba(168, 85, 247, 0.15);
  --accent-blue-glow: rgba(168, 85, 247, 0.35);
  --body-bg-gradient: 
    radial-gradient(at 12% 8%, rgba(168, 85, 247, 0.11) 0px, transparent 42%),
    radial-gradient(at 88% 12%, rgba(244, 63, 94, 0.08) 0px, transparent 38%),
    linear-gradient(180deg, #090612 0%, #110d20 100%);
  --card-consolidated-bg: linear-gradient(145deg, rgba(38, 18, 56, 0.90) 0%, rgba(20, 10, 32, 0.95) 100%);
  --card-consolidated-border: rgba(168, 85, 247, 0.40);
  --card-consolidated-glow: 0 16px 40px -10px rgba(168, 85, 247, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  --card-consolidated-stripe: linear-gradient(90deg, #a855f7, #f43f5e);
  --tab-active-gradient: linear-gradient(135deg, rgba(168, 85, 247, 0.28) 0%, rgba(244, 63, 94, 0.18) 100%);
  --tab-active-border: rgba(168, 85, 247, 0.50);
  --tab-active-shadow: 0 4px 18px rgba(168, 85, 247, 0.25);
  --button-primary-bg: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  --button-primary-text: #ffffff;
  --button-primary-hover: linear-gradient(135deg, #c084fc 0%, #6d28d9 100%);
}

/* ==========================================================================
   THEME 4: TITANIUM MONOCHROME (Wall Street Minimal Quant)
   ========================================================================== */
[data-theme="titanium-monochrome"], body.theme-titanium-monochrome {
  --theme-name: "Titanium Monochrome";
  --bg-base: #0b0c0d;
  --bg-surface: rgba(22, 23, 26, 0.82);
  --bg-surface-elevated: rgba(30, 32, 36, 0.88);
  --bg-card: rgba(20, 21, 24, 0.75);
  --bg-card-hover: rgba(34, 36, 42, 0.94);
  --bg-input: rgba(14, 15, 17, 0.95);
  --border-glow: rgba(241, 245, 249, 0.40);
  --accent-primary: #f1f5f9;
  --accent-primary-hover: #ffffff;
  --accent-primary-tint: rgba(255, 255, 255, 0.12);
  --accent-primary-glow: rgba(255, 255, 255, 0.30);
  --accent-blue: #f1f5f9;
  --accent-blue-deep: #cbd5e1;
  --accent-blue-tint: rgba(255, 255, 255, 0.12);
  --accent-blue-glow: rgba(255, 255, 255, 0.30);
  --body-bg-gradient: 
    radial-gradient(at 12% 8%, rgba(255, 255, 255, 0.06) 0px, transparent 42%),
    radial-gradient(at 88% 12%, rgba(255, 255, 255, 0.04) 0px, transparent 38%),
    linear-gradient(180deg, #090a0b 0%, #101113 100%);
  --card-consolidated-bg: linear-gradient(145deg, rgba(30, 32, 36, 0.95) 0%, rgba(18, 19, 22, 0.98) 100%);
  --card-consolidated-border: rgba(255, 255, 255, 0.35);
  --card-consolidated-glow: 0 16px 40px -10px rgba(255, 255, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  --card-consolidated-stripe: linear-gradient(90deg, #ffffff, #94a3b8);
  --tab-active-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(16, 185, 129, 0.15) 100%);
  --tab-active-border: rgba(255, 255, 255, 0.45);
  --tab-active-shadow: 0 4px 18px rgba(255, 255, 255, 0.20);
  --button-primary-bg: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  --button-primary-text: #090a0b;
  --button-primary-hover: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
}

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

html {
  font-size: 16px;
  color-scheme: dark;
}

body {
  background-color: var(--bg-base);
  background-image: var(--body-bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.35s ease, color 0.35s ease;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* ---------------- Main Layout Shell ---------------- */
.console-shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 24px 32px;
}

/* ---------------- Top Header (Executive Terminal) ---------------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  padding: 20px 28px;
  background: var(--bg-surface);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
}

.topbar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-glow), var(--accent-emerald), transparent);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-medium);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-primary-glow);
  transition: transform 0.25s ease;
}

.brand-logo:hover {
  transform: scale(1.04);
}

.brand-title-wrap h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #ffffff 40%, #fde68a 75%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.subtle {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------------- Multi-Broker Executive Ribbon ---------------- */
.brokers-ribbon {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

.broker-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.broker-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.broker-card.card-consolidated {
  background: var(--card-consolidated-bg);
  border: 1px solid var(--card-consolidated-border);
  box-shadow: var(--card-consolidated-glow);
}

.broker-card.card-consolidated::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--card-consolidated-stripe);
}

.broker-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}

.broker-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-width: 0;
}

.broker-value {
  font-size: 1.65rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  letter-spacing: -0.02em;
  display: block;
}

.broker-card.card-consolidated .broker-value {
  font-size: 1.95rem;
  background: linear-gradient(135deg, #ffffff 20%, var(--accent-primary) 65%, var(--accent-emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.broker-meta {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 5px;
  display: block;
  font-weight: 500;
  line-height: 1.4;
}

.pl-desk-split {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 8px;
}

.pl-desk-split .value-positive,
.pl-desk-split .value-negative {
  font-weight: 700;
}

/* ---------------- Segmented Navigation Tabs ---------------- */
.tab-strip {
  display: flex;
  gap: 6px;
  background: var(--bg-surface);
  padding: 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  margin-bottom: 28px;
  overflow-x: auto;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.tab-count-badge {
  display: none;
  min-width: 1.35rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: #00e676;
  color: #000;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  align-items: center;
  justify-content: center;
}

.tab-count-badge.has-items {
  display: inline-flex;
}

.tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab.is-active {
  background: var(--tab-active-gradient);
  color: #ffffff;
  border: 1px solid var(--tab-active-border);
  box-shadow: var(--tab-active-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 700;
}

.tab-panel {
  display: none;
  animation: tabFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-panel.is-active {
  display: block;
}

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

/* ---------------- Glassmorphic Panels ---------------- */
.panel {
  background: var(--bg-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
  position: relative;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
}

.panel-head h2, .panel-head h3 {
  font-size: 1.32rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

/* ---------------- Filter Chips Row ---------------- */
.filter-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-chip:hover {
  background: var(--accent-primary-tint);
  border-color: var(--border-glow);
  color: #fff;
  transform: translateY(-1px);
}

.filter-chip.is-active {
  background: var(--tab-active-gradient);
  border-color: var(--tab-active-border);
  color: #fff;
  box-shadow: var(--tab-active-shadow);
  font-weight: 700;
}

/* ---------------- Institutional Tables (Desktop) ---------------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

th {
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-medium);
  white-space: nowrap;
}

td {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  vertical-align: middle;
  font-family: var(--font-sans);
}

td.font-mono {
  font-family: var(--font-mono);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: var(--accent-primary-tint);
}

.empty-row td {
  text-align: center;
  padding: 44px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------------- Badges, Pills & Indicators ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-live {
  background: var(--accent-emerald-tint);
  color: var(--accent-emerald);
  border: 1px solid rgba(0, 230, 118, 0.35);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.2);
}

.badge-bybit, .badge-warning {
  background: var(--accent-amber-tint);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.badge-paper {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-healthy {
  background: var(--accent-emerald-tint);
  color: var(--accent-emerald);
  border: 1px solid rgba(0, 230, 118, 0.35);
}

.badge-urgent, .badge-near_stop {
  background: var(--accent-rose-tint);
  color: #ff4d79;
  border: 1px solid rgba(255, 51, 102, 0.35);
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.2);
}

.news-radar-card {
  margin-top: 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.news-radar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.news-radar-title {
  font-size: 0.85rem;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.35;
  min-width: 0;
  flex: 1;
}

.news-radar-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  max-width: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.news-radar-meta {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  margin-bottom: 10px;
}

.news-radar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Direction Tags */
.bias-text {
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bias-buy {
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
  border: 1px solid rgba(0, 230, 118, 0.4);
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.25);
}

.bias-sell {
  background: rgba(255, 51, 102, 0.15);
  color: #ff3366;
  border: 1px solid rgba(255, 51, 102, 0.4);
  box-shadow: 0 0 14px rgba(255, 51, 102, 0.25);
}

.bias-wait {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Quality Grade Badges */
.grade-badge {
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.grade-aplus, .grade-a {
  background: var(--accent-primary-tint);
  color: var(--accent-primary);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 14px var(--accent-primary-glow);
}

.grade-bplus, .grade-b {
  background: var(--accent-amber-tint);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.grade-c {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
}

/* ---------------- Interactive Buttons ---------------- */
.button {
  background: var(--button-primary-bg, linear-gradient(135deg, #f59e0b 0%, #d97706 100%));
  color: var(--button-primary-text, #050505);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px var(--accent-primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  filter: brightness(1.08);
}

.button:active {
  transform: translateY(0px) scale(0.98);
}

.button-muted {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.button-muted:hover {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: var(--border-glow);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.mini-button {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mini-button:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  color: #fff;
  transform: translateY(-1px);
}

.btn-execute-ai {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-primary) 100%) !important;
  color: #000000 !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 4px 16px var(--accent-emerald-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  letter-spacing: 0.02em;
}

.btn-execute-ai:hover {
  box-shadow: 0 8px 24px var(--accent-emerald-glow) !important;
  transform: translateY(-2px);
}

/* ---------------- Guardian & Sniper Status Badges ---------------- */
.guardian-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.35);
  color: #00e676;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.guardian-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(0, 230, 118, 0.25);
}

#sniperBadge {
  background: var(--accent-primary-tint);
  border: 1px solid var(--border-glow);
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.guardian-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 12px #00e676;
  animation: pulseGlow 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); }
  70% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 0 8px rgba(0, 230, 118, 0); }
  100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

.broker-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 12px #00e676;
}

/* ---------------- Candlestick Chart View ---------------- */
.tv-chart-container {
  width: 100%;
  height: 520px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #060a14;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.8);
}

.chart-legend-bar {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.color-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  box-shadow: 0 0 8px currentColor;
}

.bg-entry { background: #38bdf8; color: #38bdf8; }
.bg-sl { background: #ff3366; color: #ff3366; }
.bg-tp { background: #00e676; color: #00e676; }

/* ---------------- Top Layer Modals (Figma Component Grade) ---------------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  transition: opacity 0.25s ease-out;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal.is-hidden {
  display: none;
}

.modal-card {
  background: linear-gradient(145deg, rgba(16, 24, 44, 0.98) 0%, rgba(10, 15, 28, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 640px;
  width: 100%;
  max-height: calc(100dvh - 32px);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.9),
    0 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.modal-head {
  flex-shrink: 0;
  margin-bottom: 14px;
}

.modal-scroll-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  overscroll-behavior: contain;
}

.modal-scroll-body::-webkit-scrollbar {
  width: 6px;
}

.modal-scroll-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.modal-actions {
  flex-shrink: 0;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------------- Forms & Controls ---------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #fff;
  outline: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: var(--border-glow);
  box-shadow: 0 0 15px var(--accent-primary-glow), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.full-span {
  grid-column: 1 / -1;
}

/* ---------------- Financial Text & States ---------------- */
.text-success { color: var(--accent-emerald) !important; }
.text-danger { color: var(--accent-rose) !important; }
.value-positive { color: var(--accent-emerald) !important; font-weight: 800; }
.value-negative { color: var(--accent-rose) !important; font-weight: 800; }

/* ---------------- Mobile Trading Cards ---------------- */
.mobile-cards-list {
  display: none;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.mobile-signal-card, .mobile-trade-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mobile-signal-card:active, .mobile-trade-card:active {
  transform: scale(0.98);
}

.m-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.m-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.m-card-title h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  white-space: nowrap;
}

.m-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.m-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  background: rgba(0, 0, 0, 0.35);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.m-grid-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.m-grid-item .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.m-grid-item .val {
  font-size: 0.98rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
  word-break: break-word;
  overflow-wrap: break-word;
}

.m-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.m-btn-full {
  width: 100%;
  padding: 14px;
  font-size: 0.98rem;
  border-radius: var(--radius-sm);
  justify-content: center;
  min-height: 48px; /* Touch-friendly tap target */
}

/* ---------------- Mobile Bottom Navigation Dock ---------------- */
.mobile-bottom-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(7, 11, 22, 0.92);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 900;
  padding: 8px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.7);
}

.dock-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  min-height: 44px;
  flex: 1;
  min-width: 0;
}

.dock-btn .dock-label {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  font-size: 0.70rem;
  letter-spacing: -0.2px;
}

.dock-btn.is-active {
  color: var(--accent-blue);
}

.dock-btn .dock-icon {
  font-size: 1.3rem;
}

.dock-btn .dock-badge {
  position: absolute;
  top: 2px;
  right: 6px;
  background: #00e676;
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  display: none;
}

.dock-btn .dock-badge.has-items {
  display: inline-block;
}

/* ---------------- FTMO Metrix Objectives Grid ---------------- */
.metrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.metrix-card {
  background: rgba(14, 22, 40, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}

.metrix-bar-wrap {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 8px 0;
}

.metrix-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------------- Dashboard Charts Grid ---------------- */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

/* ---------------- Responsive & Mobile Optimizations ---------------- */
@media (max-width: 1200px) {
  .brokers-ribbon {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .console-shell {
    padding: 14px;
    padding-bottom: 96px; /* Room for mobile dock */
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    gap: 16px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .brand-title-wrap h1 {
    font-size: 1.35rem;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .brokers-ribbon {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tab-strip {
    border-radius: var(--radius-md);
    padding: 6px 8px;
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .tab-strip::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 8px 16px;
    font-size: 0.82rem;
  }

  .table-wrap {
    display: none; /* Switch to modern card list on mobile */
  }

  .mobile-cards-list {
    display: flex;
  }

  .mobile-bottom-dock {
    display: flex;
    padding: 6px 4px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    gap: 2px;
  }

  .mobile-bottom-dock .dock-btn {
    flex: 1;
    padding: 4px 2px;
    min-width: 0;
  }

  .mobile-bottom-dock .dock-btn .dock-label {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    font-size: 0.68rem;
    letter-spacing: -0.2px;
  }

  .dashboard-charts-grid {
    grid-template-columns: 1fr !important;
  }

  .metrix-grid {
    grid-template-columns: 1fr;
  }

  /* Universal text wrapping & container bounds */
  * {
    min-width: 0;
  }

  h1, h2, h3, h4, p, span, strong, td, th {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .badge {
    white-space: normal;
    text-align: center;
    max-width: 100%;
    line-height: 1.25;
  }

  .news-radar-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-radar-badge {
    white-space: nowrap !important;
    max-width: none;
    align-self: flex-start;
  }

  .news-radar-title {
    white-space: normal;
  }

  /* Panel & Session header wrapping */
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .panel-head > div {
    width: 100%;
    min-width: 0;
  }

  .session-momentum-grid {
    grid-template-columns: 1fr !important;
  }

  .session-card {
    padding: 14px !important;
  }

  .m-card-header {
    gap: 8px 10px;
  }

  .m-card-title {
    gap: 6px 10px;
  }

  .m-card-title h3 {
    font-size: 1.15rem;
  }

  .m-card-badges {
    gap: 6px;
  }

  /* Modal Mobile Optimization (Always Visible Confirm Buttons) */
  .modal {
    padding: 10px;
    align-items: center;
  }

  .modal-card {
    padding: 18px 14px;
    max-height: calc(100dvh - 20px);
    max-height: calc(100vh - 20px);
    width: 100%;
    border-radius: var(--radius-md);
  }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
  }

  .modal-actions button {
    width: 100%;
    justify-content: center;
    padding: 13px 16px;
    font-size: 0.95rem;
  }

  .form-actions {
    flex-direction: column-reverse !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .form-actions button {
    width: 100% !important;
    justify-content: center !important;
    padding: 13px 16px !important;
  }

  .ai-confirm-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px !important;
    font-size: 0.85rem !important;
  }

  .modal-ai-reason {
    max-height: 100px !important;
    font-size: 0.8rem !important;
  }
}

/* ---------------- Tri-Session Global Sniper & Momentum UI ---------------- */
.session-momentum-panel {
  position: relative;
  overflow: hidden;
}

.session-momentum-panel::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--accent-primary-tint) 0%, transparent 70%);
  pointer-events: none;
}

.asset-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
}

.asset-chip:hover {
  border-color: var(--border-glow);
  background: var(--accent-primary-tint);
  color: var(--accent-primary);
}

.pulse-active {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 0 0 var(--accent-emerald-glow);
  animation: pulseSession 1.8s infinite;
}

@keyframes pulseSession {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 var(--accent-emerald-glow);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ---------------- Theme Selector & Web Analytics UI ---------------- */
.theme-selector-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.theme-selector-wrap:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 12px var(--accent-primary-tint);
}

.theme-selector-label {
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.theme-select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
  padding: 2px 2px;
}

.theme-select option {
  background: #101218;
  color: #f8fafc;
  padding: 8px;
}

.analytics-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.analytics-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* ---------------- Google SSO Auth Modal Overlay ---------------- */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(6, 9, 14, 0.92);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #0d111a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  text-align: center;
  animation: authSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-brand {
  padding: 32px 24px 20px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, rgba(13, 17, 26, 0) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-brand h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0 0 4px 0;
}

.auth-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin: 0;
}

.auth-body {
  padding: 32px 28px;
}

.auth-lock-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.auth-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px 0;
}

.auth-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 24px 0;
}

.google-btn-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  margin: 0 auto;
}

.auth-alert {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  text-align: left;
}

.auth-footer {
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* User Profile Badge in Header */
.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 12px 4px 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-glow);
}

.btn-logout {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}


