/* ==============================================================================
   RESILIENT BOT CORE • PRO TRADING TERMINAL
   DESIGN SYSTEM: APEX INSTITUTIONAL TRADING COCKPIT (LUXURIOUS & VIBRANT)
   Typography: Plus Jakarta Sans & JetBrains Mono (Tabular Figures)
   Atmosphere: Midnight Space Obsidian, Electric Cyan, Mint Emerald & Coral Rose
   ============================================================================== */

:root {
  /* Surface & Base Palette (Deep Midnight Obsidian) */
  --bg-base: #07090e;
  --bg-surface: #0c101a;
  --bg-surface-hover: #121826;
  --bg-surface-elevated: #161e30;
  --bg-card: rgba(13, 18, 29, 0.88);
  --bg-card-hover: rgba(18, 25, 40, 0.96);
  --bg-terminal: #05070c;

  /* Precision Engineered Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.22);
  --border-active: rgba(56, 189, 248, 0.45);

  /* High-Contrast Typography */
  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;

  /* Strict Semantic Financial Accents (Luminous & Clean) */
  --emerald: #10b981;
  --emerald-subtle: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.35);
  --emerald-glow: rgba(16, 185, 129, 0.25);

  --rose: #f43f5e;
  --rose-subtle: rgba(244, 63, 94, 0.12);
  --rose-border: rgba(244, 63, 94, 0.35);
  --rose-glow: rgba(244, 63, 94, 0.25);

  --amber: #f59e0b;
  --amber-subtle: rgba(245, 158, 11, 0.12);
  --amber-border: rgba(245, 158, 11, 0.35);
  --amber-glow: rgba(245, 158, 11, 0.25);

  /* Signature Cockpit Accent: Electric Cyan */
  --sky: #38bdf8;
  --sky-subtle: rgba(56, 189, 248, 0.12);
  --sky-border: rgba(56, 189, 248, 0.35);
  --sky-glow: rgba(56, 189, 248, 0.25);

  --cyan: var(--sky);
  --cyan-subtle: var(--sky-subtle);
  --cyan-border: var(--sky-border);
  --purple: #818cf8;
  --purple-subtle: rgba(129, 140, 248, 0.12);
  --purple-border: rgba(129, 140, 248, 0.30);

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

  /* Card Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 10px 30px -4px rgba(0, 0, 0, 0.75);

  /* Backward Compatibility Aliases */
  --green: var(--emerald);
  --red: var(--rose);
  --yellow: var(--amber);
  --accent-cyan: var(--sky);
  --accent-purple: var(--purple);
  --text-main: var(--text-primary);
  --bg-card-border: var(--border-subtle);
  --green-glow: var(--emerald-glow);
  --red-glow: var(--rose-glow);
  --yellow-glow: var(--amber-glow);
}

/* Global Reset & Base Styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: #07090e;
  background-image: 
    radial-gradient(ellipse 90% 50% at 50% -15%, rgba(14, 165, 233, 0.16) 0%, transparent 65%),
    radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.06) 0%, transparent 40%),
    linear-gradient(180deg, #090d18 0%, #05070c 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  padding: 12px 18px 24px 18px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.011em;
}

/* Jitter-Free Tabular Numerics Everywhere */
.mono,
.metric-value,
.param-val,
.chip-val,
.pos-pnl-val,
.range-targets-row,
.log-time,
.equity-val,
table td {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-feature-settings: "tnum" 1, "lnum" 1;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* Base Glassmorphic Container */
.glass-panel {
  background: linear-gradient(180deg, rgba(16, 23, 38, 0.85) 0%, rgba(10, 14, 24, 0.94) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 24px -4px rgba(0, 0, 0, 0.6);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: rgba(56, 189, 248, 0.25);
}

/* ==============================================================================
   TOP HEADER BAR
   ============================================================================== */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 20;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(18, 25, 42, 0.92) 0%, rgba(10, 15, 27, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.5);
}

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

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(16, 185, 129, 0.25) 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #38bdf8;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title-row h1 {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin: 0;
}

.pro-tag {
  font-size: 0.60rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(14, 165, 233, 0.25) 100%);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  letter-spacing: 0.06em;
}

.strategy-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.strat-pill {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.strat-pill.highlight {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.strat-pill.engine-pill {
  color: #38bdf8;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
}

.strat-pill.net-rr-pill {
  color: #10b981;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Trading Mode Toggle Button */
.btn-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 0.70rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-mode.demo {
  background: var(--amber-subtle);
  color: var(--amber);
  border-color: var(--amber-border);
}

.btn-mode.demo:hover {
  background: rgba(245, 158, 11, 0.16);
}

.btn-mode.real {
  background: var(--rose-subtle);
  color: var(--rose);
  border-color: var(--rose-border);
}

.btn-mode.real:hover {
  background: rgba(244, 63, 94, 0.16);
}

.mode-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.btn-mode.demo .mode-dot {
  background: var(--amber);
}

.btn-mode.real .mode-dot {
  background: var(--rose);
}

/* Modal / Balance Pill (Clean & Subtle) */
.header-equity-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-medium);
  font-size: 0.70rem;
}

.header-equity-pill .equity-label {
  color: #cbd5e1;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.header-equity-pill .equity-val {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.78rem;
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}

.pulse-dot.green {
  background: var(--emerald);
}

/* Header Buttons */
.btn {
  font-family: inherit;
  font-size: 0.70rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-unlock {
  background: var(--amber-subtle);
  color: var(--amber);
  border-color: var(--amber-border);
}

.btn-unlock:hover {
  background: rgba(245, 158, 11, 0.18);
}

.btn-danger {
  background: var(--rose-subtle);
  color: #fca5a5;
  border-color: var(--rose-border);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.22);
  color: #fff;
}

/* ==============================================================================
   OVERVIEW METRICS GRID (CLEAN, MONOCHROMATIC TOP HUD)
   ============================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  position: relative;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 25, 42, 0.82) 0%, rgba(10, 15, 27, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.metric-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.65);
  transform: translateY(-1px);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.metric-label-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.metric-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.symbol-badge {
  font-size: 0.60rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-family: var(--font-mono);
}

.tick-indicator {
  font-size: 0.62rem;
  color: var(--text-dim);
}

.metric-value-container {
  margin-bottom: 4px;
}

.metric-value {
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.metric-sub-label {
  font-size: 0.66rem;
  font-weight: 500;
  color: #cbd5e1;
  letter-spacing: 0.01em;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.perf-pnl-title {
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 0.64rem;
  text-transform: uppercase;
}

.perf-context-pill {
  font-size: 0.58rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  letter-spacing: 0.03em;
}

.metric-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.64rem;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 5px;
}

.sub-badge {
  font-size: 0.58rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

/* AI Metric Card Elements (Restrained) */
.ai-sentiment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.confidence-meter-mini {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.meter-label {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
}

.meter-bar-bg {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.meter-bar-fill {
  height: 100%;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.meter-val {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Performance & Exposure Card */
.perf-mode-toggle {
  display: flex;
  gap: 2px;
  background: rgba(0, 0, 0, 0.3);
  padding: 1px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.perf-mode-pill {
  font-size: 0.60rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.perf-mode-pill.active.demo {
  background: var(--amber-subtle);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.perf-mode-pill.active.real {
  background: var(--emerald-subtle);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
}

.perf-timeframe-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 3px;
}

.perf-tf-btn {
  font-size: 0.58rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.perf-tf-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.perf-tf-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: var(--border-medium);
}

.perf-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 6px;
  width: 100%;
}

.perf-footer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.58rem;
}

.perf-footer-label {
  color: #94a3b8;
  font-weight: 600;
}

/* Disciplined Parameter Text Colors (Apex Cockpit System) */
.highlight-cyan { color: var(--sky); }
.highlight-purple { color: #c084fc; }
.text-red { color: var(--rose); }
.text-green { color: var(--emerald); }

/* ==============================================================================
   MARKET MICROSTRUCTURE & SNIPER RADAR STRIP (CLEAN, UNIFORM CHIPS)
   ============================================================================== */
.indicators-strip {
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 23, 38, 0.85) 0%, rgba(10, 14, 25, 0.94) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0, 0, 0, 0.4);
}

.strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.strip-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.strip-status-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.strip-legend {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.indicator-chips-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

@media (max-width: 1400px) {
  .indicator-chips-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .indicator-chips-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .indicator-chips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ind-chip {
  background: linear-gradient(180deg, rgba(19, 27, 44, 0.75) 0%, rgba(12, 17, 28, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  min-height: 105px;
}

.ind-chip:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 18px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.chip-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.chip-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chip-role {
  font-size: 0.60rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.22);
  letter-spacing: 0.03em;
}

.chip-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.chip-desc {
  font-size: 0.65rem;
  color: #94a3b8;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chip-footer-status {
  font-size: 0.64rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==============================================================================
   MAIN DASHBOARD GRID (ASYMMETRIC 2-COLUMN COMMAND WORKSPACE)
   ============================================================================== */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 1100px) {
  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }
}

.trading-column,
.news-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 23, 38, 0.85) 0%, rgba(10, 14, 25, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 24px -4px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.panel:hover {
  border-color: rgba(56, 189, 248, 0.25);
}

.panel-header {
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(22, 30, 48, 0.6) 0%, rgba(12, 17, 30, 0.6) 100%);
  gap: 8px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.panel-title svg {
  color: #38bdf8;
}

.panel-body {
  padding: 12px 14px;
}

/* ==============================================================================
   ACTIVE POSITION VISUAL TRACKER (SUBTLE LUXURY)
   ============================================================================== */
.empty-position-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  text-align: center;
}

.radar-scan-anim {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
  position: relative;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

.radar-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.4);
  border: 2px solid #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  animation: radarPulse 2s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes radarPulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  50% { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(0.6); opacity: 0; }
}

.empty-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.empty-desc {
  font-size: 0.68rem;
  color: #94a3b8;
  max-width: 460px;
  line-height: 1.5;
}

/* Active Position Card */
.active-pos-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pos-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pos-symbol-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.04em;
}

.side-pill.long {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.side-pill.short {
  background: rgba(244, 63, 94, 0.18);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.4);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.2);
}

.pos-asset-name {
  font-size: 0.94rem;
  font-weight: 800;
  color: #ffffff;
}

.pos-qty-tag {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
}

.pos-pnl-group {
  text-align: right;
}

.pos-pnl-val {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.pos-pnl-sub {
  font-size: 0.68rem;
  color: #94a3b8;
}

/* Visual Range Bar Track (Dynamic & Energetic) */
.pos-range-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  font-weight: 700;
}

.target-sl { color: var(--rose); }
.target-entry { color: #cbd5e1; }
.target-tp { color: var(--emerald); }

.range-bar-track {
  position: relative;
  height: 8px;
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.4) 0%, rgba(255, 255, 255, 0.06) 40%, rgba(255, 255, 255, 0.06) 60%, rgba(16, 185, 129, 0.4) 100%);
  border-radius: 4px;
  margin: 6px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.range-entry-marker {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  transform: translateX(-50%);
  border-radius: 1px;
}

.range-current-pin {
  position: absolute;
  top: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.85);
  transform: translateX(-50%);
  transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.range-targets-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  font-weight: 600;
}

.pos-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 8px;
  border-radius: 5px;
}

.pos-detail-item {
  display: flex;
  flex-direction: column;
}

.pos-detail-item span {
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pos-detail-item strong {
  font-size: 0.74rem;
  color: #ffffff;
}

/* ==============================================================================
   PRE-TRADE GATEKEEPER & RADAR PANEL
   ============================================================================== */
.gatekeeper-header-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gatekeeper-summary-card {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.gatekeeper-summary-card.verdict-ready {
  border-color: var(--emerald-border);
  background: var(--emerald-subtle);
}

.gatekeeper-summary-card.verdict-blocked {
  border-color: var(--amber-border);
  background: var(--amber-subtle);
}

.gatekeeper-summary-card.verdict-in-position {
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.03);
}

.summary-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.status-indicator-dot.dot-ready {
  background: var(--emerald);
}

.status-indicator-dot.dot-blocked {
  background: var(--amber);
}

.status-indicator-dot.dot-in-pos {
  background: var(--text-secondary);
}

.summary-verdict-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1px;
}

.summary-verdict-desc {
  font-size: 0.66rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.gatekeeper-block-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.block-reason-pill {
  font-size: 0.60rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--amber-subtle);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.gatekeeper-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

@media (max-width: 768px) {
  .gatekeeper-filters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.block-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.60rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--amber-subtle);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.filter-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}

.filter-card:hover {
  border-color: var(--border-medium);
}

.filter-card.passed {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(10, 18, 25, 0.92) 100%);
  border: 1px solid rgba(16, 185, 129, 0.28);
  box-shadow: inset 0 1px 0 rgba(16, 185, 129, 0.12);
}

.filter-card.blocked {
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.08) 0%, rgba(22, 10, 16, 0.92) 100%);
  border: 1px solid rgba(244, 63, 94, 0.28);
  box-shadow: inset 0 1px 0 rgba(244, 63, 94, 0.12);
}

.filter-card.bypassed {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  opacity: 0.65;
}

.filter-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.filter-card-title {
  font-size: 0.66rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filter-status-tag {
  font-size: 0.60rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.filter-status-tag.pass {
  background: var(--emerald-subtle);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
}

.filter-status-tag.block {
  background: var(--rose-subtle);
  color: var(--rose);
  border: 1px solid var(--rose-border);
}

.filter-status-tag.bypass {
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  border: 1px solid var(--border-subtle);
}

.filter-card-value {
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono);
  margin-bottom: 2px;
}

.filter-card-sub {
  font-size: 0.65rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==============================================================================
   TABLES: HISTORY & FILLS
   ============================================================================== */
.tabs-group {
  display: flex;
  gap: 4px;
}

.tab-btn {
  font-size: 0.66rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: var(--border-medium);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.70rem;
}

table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.25);
}

table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
}

table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.empty-table-cell {
  text-align: center;
  padding: 22px 10px;
  color: #94a3b8;
  font-style: italic;
}

.pnl-win {
  color: var(--emerald);
  font-weight: 700;
}

.pnl-loss {
  color: var(--rose);
  font-weight: 700;
}

/* ==============================================================================
   AI MACRO REASONING & NEWS INTELLIGENCE FEED
   ============================================================================== */
.ai-header-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.analyzed-headline-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.headline-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.headline-label {
  font-size: 0.64rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.headline-tag {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

.headline-text {
  font-size: 0.74rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.35;
}

.ai-reasoning-quote {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.06) 0%, rgba(10, 14, 25, 0.45) 100%);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-left: 3px solid #38bdf8;
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.quote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.quote-tag {
  font-size: 0.64rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quote-status {
  font-size: 0.64rem;
  font-weight: 600;
  color: #cbd5e1;
}

.quote-body {
  font-size: 0.72rem;
  color: #e2e8f0;
  line-height: 1.45;
  font-style: italic;
}

/* News Feed Panel (Refined Monochromatic) */
.news-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-refresh:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* Source Distribution Stats Bar */
.news-source-stats-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.32);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}

.source-stat-pill {
  font-size: 0.64rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.source-stat-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

/* Feed Navigation & Filter Tabs */
.feed-tabs-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 8px;
  flex-wrap: wrap;
}

.feed-tabs-bar .tabs-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.feed-tabs-bar .tab-btn {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.feed-tabs-bar .tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.feed-tabs-bar .tab-btn.active {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-weight: 700;
}

.feed-search-wrap input {
  font-family: inherit;
  font-size: 0.70rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 4px 10px;
  color: #ffffff;
  outline: none;
  width: 140px;
  transition: all 0.18s ease;
}

.feed-search-wrap input:focus {
  border-color: rgba(56, 189, 248, 0.5);
  width: 165px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.18);
}

/* News Stream Container */
.news-stream-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 440px;
  overflow-y: auto;
  padding: 10px 14px;
}

/* News Article Card (Institutional Pro Wire) */
.news-article-card {
  background: linear-gradient(180deg, rgba(20, 28, 46, 0.78) 0%, rgba(12, 17, 28, 0.94) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.news-article-card:hover {
  background: linear-gradient(180deg, rgba(26, 37, 60, 0.88) 0%, rgba(15, 22, 36, 0.98) 100%);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 18px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.news-article-card.is-ai-evaluated {
  border-left: 3px solid #38bdf8;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.09) 0%, rgba(13, 19, 32, 0.96) 100%);
  border-color: rgba(56, 189, 248, 0.35);
}

.news-article-card.is-halt {
  border-left: 3px solid #f43f5e;
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.12) 0%, rgba(22, 11, 20, 0.96) 100%);
  border-color: rgba(244, 63, 94, 0.4);
}

.news-article-card.is-macro {
  border-left: 3px solid #f59e0b;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.08) 0%, rgba(19, 18, 28, 0.96) 100%);
}

.news-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.news-badges-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Distinct Source Badges with Brand Cues */
.source-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.source-coindesk {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.source-decrypt {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.source-cointelegraph {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.source-binance {
  background: rgba(234, 179, 8, 0.14);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.source-whale {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Impact & High-Priority Tags */
.badge-ai-eval {
  font-size: 0.60rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
  letter-spacing: 0.02em;
}

.impact-badge {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.impact-badge.whale-impact {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.impact-badge.macro-impact {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.impact-badge.halt-impact {
  background: rgba(244, 63, 94, 0.18);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.45);
}

.article-time,
.news-time {
  font-size: 0.66rem;
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}

/* News Title Link - Razor Clean Financial Headline */
.article-title-link,
.news-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.45;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.article-title-link:hover,
.news-title:hover {
  color: #38bdf8;
}

.news-external-icon {
  font-size: 0.72rem;
  color: #94a3b8;
  flex-shrink: 0;
  opacity: 0.85;
  transition: all 0.15s ease;
}

.article-title-link:hover .news-external-icon {
  color: #38bdf8;
  transform: translate(1px, -1px);
  opacity: 1;
}

/* Tags Row */
.news-tags-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1px;
}

.keyword-tag,
.news-tag {
  font-size: 0.62rem;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.12s ease;
}

.keyword-tag:hover,
.news-tag:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.keyword-tag.tag-halt {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.3);
}

.news-loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 16px;
  color: #94a3b8;
  font-size: 0.76rem;
  font-style: italic;
}

/* ==============================================================================
   FULL-WIDTH PRO LIVE BOT CONSOLE TERMINAL
   ============================================================================== */
.terminal-full-container {
  width: 100%;
  margin-top: 4px;
}

.pro-terminal {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  background: rgba(8, 11, 16, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  gap: 6px;
  flex-wrap: wrap;
}

.terminal-pro-badge {
  font-size: 0.56rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.terminal-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.56rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--emerald-subtle);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
}

.terminal-pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--emerald);
}

.badge-blocked-pill {
  font-size: 0.56rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--amber-subtle);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.terminal-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}

.terminal-search {
  font-family: inherit;
  font-size: 0.64rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2px 7px;
  color: #fff;
  outline: none;
  width: 160px;
}

.terminal-search:focus {
  border-color: var(--border-strong);
}

.terminal-btn {
  font-family: inherit;
  font-size: 0.60rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
}

.terminal-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn-clear-logs:hover {
  background: rgba(244, 63, 94, 0.12);
  color: var(--rose);
}

.terminal-tabs-bar {
  display: flex;
  gap: 3px;
  padding: 5px 12px;
  background: rgba(6, 8, 12, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  overflow-x: auto;
}

.t-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.t-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.t-tab-btn.active {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border-color: var(--border-medium);
}

.t-tab-badge {
  font-size: 0.52rem;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.terminal-logs {
  height: 380px;
  overflow-y: auto;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #04060a;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.4;
  padding: 1px 3px;
  border-radius: 2px;
}

.log-entry:hover {
  background: rgba(255, 255, 255, 0.02);
}

.log-time {
  color: var(--text-dim);
  font-size: 0.62rem;
  flex-shrink: 0;
}

.log-tag {
  font-size: 0.60rem;
  font-weight: 700;
  flex-shrink: 0;
}

.log-tag.INFO { color: var(--text-secondary); }
.log-tag.SUCCESS { color: var(--emerald); }
.log-tag.WARN { color: var(--amber); }
.log-tag.ERROR { color: var(--rose); }

.log-msg {
  word-break: break-all;
  color: #cbd5e1;
}

.terminal-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 12px;
  background: rgba(8, 11, 16, 0.95);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.60rem;
  color: var(--text-dim);
}

.terminal-footer-left,
.terminal-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-status-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-dot-green {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--emerald);
}

.terminal-hint {
  color: var(--text-dim);
}

/* ==============================================================================
   MODAL CONFIRMATION DIALOG (MINIMALIST ELEGANCE)
   ============================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 8, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.modal-title-row h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-alert-box {
  padding: 9px 11px;
  border-radius: 6px;
  font-size: 0.74rem;
  line-height: 1.4;
}

.modal-alert-box.alert-to-real {
  background: var(--rose-subtle);
  border: 1px solid var(--rose-border);
  color: #fca5a5;
}

.modal-alert-box.alert-to-demo {
  background: var(--amber-subtle);
  border: 1px solid var(--amber-border);
  color: #fde68a;
}

.modal-info-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 10px;
}

.modal-info-item {
  display: flex;
  justify-content: space-between;
}

.modal-info-item strong {
  color: var(--text-primary);
}

.modal-check-label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-check-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  accent-color: var(--rose);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.btn-confirm-mode {
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-confirm-mode:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-confirm-mode.btn-to-real {
  background: var(--rose);
  color: #ffffff;
}

.btn-confirm-mode.btn-to-demo {
  background: var(--amber);
  color: #07090e;
}

.btn-confirm-mode.btn-panic {
  background: var(--rose);
  color: #ffffff;
}

.btn-confirm-mode.btn-panic:hover:not(:disabled) {
  background: #dc2626;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.btn-confirm-mode.btn-unlock {
  background: var(--green);
  color: #ffffff;
}

.btn-confirm-mode.btn-unlock:hover:not(:disabled) {
  background: #059669;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.modal-input-field {
  width: 100%;
  padding: 8px 11px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.modal-input-field:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.modal-input-field::placeholder {
  color: var(--text-muted);
  font-size: 0.74rem;
}

/* ==============================================================================
   BADGES & UTILITIES (REFINED & MINIMALIST)
   ============================================================================== */
.badge {
  font-size: 0.60rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.badge-bullish {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.badge-bearish {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.35);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.2);
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.badge-cyan {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.badge-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-dim {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Price Flash Animations (Crisp & Subtle) */
.flash-green {
  animation: flashGreen 0.4s ease;
}
.flash-red {
  animation: flashRed 0.4s ease;
}

@keyframes flashGreen {
  0% { color: var(--emerald); }
  100% { color: #ffffff; }
}

@keyframes flashRed {
  0% { color: var(--rose); }
  100% { color: #ffffff; }
}

/* Minimalist Dark Scrollbars */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.09);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}
