/* ========================================================
   MYZKABOT DARK CYBER-FINTECH STYLESHEET
   Design Tokens: Linear / TradingView Caliber Dark Terminal
   ======================================================== */

:root {
  --bg-primary: #06080d;
  --bg-secondary: #0a0e17;
  --bg-tertiary: #111726;
  --bg-card: rgba(14, 19, 31, 0.75);
  --bg-card-hover: rgba(20, 27, 44, 0.85);
  --bg-glass: rgba(10, 14, 23, 0.85);
  
  --border-subtle: #1e2638;
  --border-active: #2e3a54;
  --border-focus: #00f2fe;
  --border-glow: rgba(0, 242, 254, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-green: #00f59b;
  --accent-green-bg: rgba(0, 245, 155, 0.12);
  --accent-green-border: rgba(0, 245, 155, 0.35);

  --accent-red: #ff3366;
  --accent-red-bg: rgba(255, 51, 102, 0.12);
  --accent-red-border: rgba(255, 51, 102, 0.35);

  --accent-amber: #f59e0b;
  --accent-amber-bg: rgba(245, 158, 11, 0.12);

  --accent-cyan: #00f2fe;
  --accent-cyan-bg: rgba(0, 242, 254, 0.12);
  --accent-blue: #3b82f6;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.cyber-terminal {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(0, 242, 254, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(0, 245, 155, 0.03) 0%, transparent 40%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.font-highlight { color: var(--accent-cyan); }
.font-green { color: var(--accent-green); }
.font-red { color: var(--accent-red); }

/* ========================================================
   1. LIVE CRYPTO TICKER MARQUEE BAR
   ======================================================== */
.ticker-marquee-bar {
  background: #04060a;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 60;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 28px;
  white-space: nowrap;
  animation: tickerLoop 35s linear infinite;
  will-change: transform;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes tickerLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  transition: background 0.15s ease;
}

.ticker-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.ticker-sym {
  font-weight: 700;
  color: var(--text-secondary);
}

.ticker-price {
  font-weight: 600;
  color: var(--text-primary);
}

.ticker-chg {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}

.ticker-chg.up {
  color: var(--accent-green);
  background: var(--accent-green-bg);
}

.ticker-chg.down {
  color: var(--accent-red);
  background: var(--accent-red-bg);
}

/* ========================================================
   2. TOP NAVIGATION BAR
   ======================================================== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.logo-orb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-cyan) 0%, rgba(0, 242, 254, 0.1) 70%);
  border: 1px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.35);
}

.pulsing-core {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulseCore 2s infinite ease-in-out;
}

@keyframes pulseCore {
  0%, 100% { opacity: 0.6; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 14px var(--accent-cyan); }
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.brand-text h1 span {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text .tagline {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-status-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill, .mode-pill, .broker-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-amber);
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-amber);
}

.status-pill.online .status-dot {
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.status-pill.locked .status-dot {
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.status-pill.paused .status-dot {
  background-color: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
}

.clickable-pill {
  cursor: pointer;
  transition: all 0.2s ease;
}

.clickable-pill:hover {
  border-color: var(--border-focus);
  background-color: rgba(0, 242, 254, 0.08);
}

.pill-label {
  color: var(--text-muted);
  font-size: 10px;
}

.pill-val {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* Nav Settings Button */
.btn-settings-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #1b2438 0%, #111728 100%);
  border: 1px solid var(--border-active);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-settings-nav:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.25);
  transform: translateY(-1px);
}

.integration-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
}

.dot-ind {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #475569;
  transition: all 0.3s ease;
}

.dot-ind.active {
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

/* Panic Buttons */
.btn-panic-nav {
  padding: 7px 14px;
  background-color: var(--accent-red-bg);
  border: 1px solid var(--accent-red-border);
  color: var(--accent-red);
  font-weight: 700;
  font-size: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.04em;
}

.btn-panic-nav:hover {
  background-color: var(--accent-red);
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 51, 102, 0.4);
}

/* ========================================================
   3. DASHBOARD CONTAINER & KPI METRICS
   ======================================================== */
.dashboard-container {
  padding: 18px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1720px;
  margin: 0 auto;
  width: 100%;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Glass-Glow Cards */
.glass-glow {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-glow:hover {
  border-color: var(--border-active);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
}

.kpi-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.kpi-card.highlight-card {
  border-color: rgba(0, 242, 254, 0.25);
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.06) 0%, rgba(14, 19, 31, 0.8) 100%);
}

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

.kpi-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.kpi-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-weight: 600;
}

.badge-lockout {
  color: var(--accent-cyan);
  background-color: var(--accent-cyan-bg);
  border-color: rgba(0, 242, 254, 0.3);
}

.badge-lockout.locked {
  color: var(--accent-green);
  background-color: var(--accent-green-bg);
  border-color: var(--accent-green-border);
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
}

.val-sep {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 20px;
}

.kpi-value.pnl-positive { color: var(--accent-green); }
.kpi-value.pnl-negative { color: var(--accent-red); }
.kpi-value.pnl-neutral { color: var(--text-secondary); }

.kpi-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.kpi-mini-bar {
  height: 4px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.kpi-bar-fill {
  height: 100%;
  background: var(--accent-cyan);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.kpi-bar-fill.fill-green { background: var(--accent-green); }
.kpi-bar-fill.fill-amber { background: var(--accent-amber); }

/* Progress Track for Daily Target */
.progress-track {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan) 0%, var(--accent-green) 100%);
  border-radius: var(--radius-full);
  transition: width 0.5s ease-in-out;
  box-shadow: 0 0 8px rgba(0, 245, 155, 0.5);
}

.progress-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  font-size: 11px;
}

.auto-reset-hint {
  font-size: 10px;
  color: var(--text-muted);
}

/* ========================================================
   4. WORKSPACE LAYOUT (CHART + RADAR + CONFIG)
   ======================================================== */
.workspace-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  min-height: 540px;
}

.workspace-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.workspace-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.terminal-card {
  padding: 16px 20px;
}

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

.header-with-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.count-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-tertiary);
  color: var(--accent-cyan);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

.pulse-indicator-live {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--accent-red-bg);
  color: var(--accent-red);
  border: 1px solid var(--accent-red-border);
  letter-spacing: 0.05em;
  animation: pulseLive 1.8s infinite;
}

@keyframes pulseLive {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; box-shadow: 0 0 10px rgba(255, 51, 102, 0.4); }
}

/* Chart Header Controls */
.chart-header-row {
  flex-wrap: wrap;
  gap: 12px;
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.coin-selector-pills {
  display: flex;
  gap: 4px;
  background: var(--bg-tertiary);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.btn-coin {
  padding: 4px 10px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-mono);
}

.btn-coin:hover {
  color: #fff;
}

.btn-coin.active {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.timeframe-buttons {
  display: flex;
  gap: 4px;
  background: var(--bg-tertiary);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.btn-tf {
  padding: 4px 9px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-mono);
}

.btn-tf:hover { color: #fff; }

.btn-tf.active {
  background: var(--border-active);
  color: #fff;
}

.chart-indicators-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-family: var(--font-mono);
}

.current-price-badge {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-green);
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
}

.legend-item.ema20 { color: #f59e0b; }
.legend-item.ema50 { color: #3b82f6; }
.legend-item.rsi { color: #a855f7; }

.chart-viewport {
  width: 100%;
  height: 420px;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* ========================================================
   5. AI OPPORTUNITY SCANNER RADAR
   ======================================================== */
.btn-action-glow {
  padding: 6px 14px;
  background: linear-gradient(90deg, #00f2fe 0%, #00f59b 100%);
  color: #000;
  font-weight: 800;
  font-size: 11px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.04em;
}

.btn-action-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
}

.scanner-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.scanner-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.radar-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(0, 242, 254, 0.15);
  border-top-color: var(--accent-cyan);
  animation: spin 1.2s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.signal-ticket {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.signal-ticket:hover {
  border-color: var(--border-active);
  transform: translateX(2px);
}

.signal-ticket.signal-buy {
  border-left: 4px solid var(--accent-green);
  background: linear-gradient(90deg, rgba(0, 245, 155, 0.05) 0%, var(--bg-tertiary) 100%);
}

.signal-ticket.signal-sell {
  border-left: 4px solid var(--accent-red);
  background: linear-gradient(90deg, rgba(255, 51, 102, 0.05) 0%, var(--bg-tertiary) 100%);
}

.signal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.signal-symbol {
  font-weight: 800;
  font-size: 13px;
  font-family: var(--font-mono);
  color: #fff;
}

.signal-score {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.signal-decision {
  font-size: 12px;
  font-weight: 700;
}

.signal-ticket.signal-buy .signal-decision { color: var(--accent-green); }
.signal-ticket.signal-sell .signal-decision { color: var(--accent-red); }

.signal-levels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px;
  border-radius: 4px;
}

.level-box {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-family: var(--font-mono);
}

.level-lbl {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
}

.signal-rationale {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
}

.ticket-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-exec-ticket {
  flex: 1;
  padding: 6px 10px;
  background: var(--accent-green);
  color: #000;
  font-weight: 800;
  font-size: 11px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-exec-ticket:hover {
  box-shadow: 0 0 10px rgba(0, 245, 155, 0.5);
}

.btn-reject-ticket {
  padding: 6px 10px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}

.btn-reject-ticket:hover {
  color: var(--accent-red);
  border-color: var(--accent-red);
}

/* ========================================================
   6. INTEGRATION QUICK WIDGET & PANIC BOX
   ======================================================== */
.integration-widget {
  padding: 16px;
}

.btn-link-action {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-link-action:hover {
  text-decoration: underline;
}

.integration-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.int-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.int-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.int-icon { font-size: 18px; }

.int-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.int-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.int-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  font-family: var(--font-mono);
}

.badge-connected {
  color: var(--accent-green);
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
}

.badge-missing {
  color: var(--accent-red);
  background: var(--accent-red-bg);
  border: 1px solid var(--accent-red-border);
}

.badge-pending {
  color: var(--accent-amber);
  background: var(--accent-amber-bg);
}

.panic-box {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.08) 0%, var(--bg-card) 100%);
  border: 1px solid var(--accent-red-border);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
}

.panic-title {
  color: var(--accent-red);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.panic-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.btn-panic-big {
  width: 100%;
  padding: 10px;
  background: var(--accent-red);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.04em;
}

.btn-panic-big:hover {
  background: #ff1f59;
  box-shadow: 0 0 18px rgba(255, 51, 102, 0.5);
  transform: translateY(-1px);
}

/* ========================================================
   7. DATA TABLES (POSITIONS & AUDIT TRAIL)
   ======================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.data-table th {
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 12px;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.empty-state {
  text-align: center;
  padding: 32px 12px !important;
  color: var(--text-muted);
  font-family: var(--font-sans) !important;
}

.empty-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 8px;
}

.btn-close-pos {
  padding: 4px 10px;
  background: var(--accent-red-bg);
  border: 1px solid var(--accent-red-border);
  color: var(--accent-red);
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-close-pos:hover {
  background: var(--accent-red);
  color: #fff;
}

.refresh-indicator {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ========================================================
   8. MODALS (SETTINGS & PANIC)
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-container {
  width: 100%;
  max-width: 720px;
  background: #0d121f;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 242, 254, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(17, 24, 39, 0.5);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-icon { font-size: 24px; }

.modal-title-wrap h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}

.modal-title-wrap p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

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

.modal-tabs {
  display: flex;
  background: #080c14;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 16px;
  gap: 4px;
}

.modal-tab-btn {
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.modal-tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.04);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.setting-intro-box {
  background: rgba(0, 242, 254, 0.05);
  border-left: 3px solid var(--accent-cyan);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 18px;
}

.setting-intro-box h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.setting-intro-box p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action .form-control {
  padding-right: 44px;
}

.btn-toggle-eye {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}

.input-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.input-hint a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.input-hint a:hover {
  text-decoration: underline;
}

.test-action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.btn-test-action {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-active);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-test-action:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
}

.test-feedback {
  font-size: 12px;
  font-weight: 600;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(17, 24, 39, 0.4);
}

.btn-secondary {
  padding: 10px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-secondary:hover {
  color: #fff;
  border-color: var(--border-active);
}

.btn-primary-glow {
  padding: 10px 22px;
  background: linear-gradient(90deg, #00f2fe 0%, #00f59b 100%);
  color: #000;
  border: none;
  font-size: 12px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
}

.btn-primary-glow:hover {
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
  transform: translateY(-1px);
}

/* Panic Confirmation Modal */
.panic-modal-box {
  max-width: 440px;
  padding: 24px;
  text-align: center;
}

.modal-icon { font-size: 40px; margin-bottom: 12px; }

.panic-modal-box h3 {
  color: var(--accent-red);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}

.panic-modal-box p {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-panic-confirm {
  padding: 10px 18px;
  background: var(--accent-red);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.btn-panic-confirm:hover {
  background: #ff1f59;
}

/* ========================================================
   9. TOAST NOTIFICATIONS
   ======================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 150;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 12px 18px;
  background: #0f141f;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideToast 0.3s ease forwards;
  max-width: 360px;
}

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

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid var(--accent-red); }
.toast.info { border-left: 4px solid var(--accent-cyan); }

/* ========================================================
   10. RESPONSIVE MEDIA QUERIES
   ======================================================== */
@media (max-width: 1200px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .top-nav {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .nav-status-group {
    flex-wrap: wrap;
    width: 100%;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .form-grid-2col {
    grid-template-columns: 1fr;
  }
  .chart-viewport {
    height: 300px;
  }
}
