/* ==========================================================================
   LitVM Charts — Modern Financial Quant Terminal UI
   Theme: Obsidian Deep Glassmorphism · Plus Jakarta Sans · Neon Accents
   ========================================================================== */

/* ─── DESIGN SYSTEM TOKENS ────────────────────────────────────────── */
:root {
  /* Color Palette */
  --bg-deep: #070812;
  --bg-surface: rgba(15, 17, 34, 0.75);
  --bg-surface-elevated: rgba(22, 25, 48, 0.85);
  --bg-card-header: rgba(255, 255, 255, 0.025);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);
  --border-cyan: rgba(6, 182, 212, 0.35);
  --border-indigo: rgba(99, 102, 241, 0.35);

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

  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-violet: #8b5cf6;
  --accent-rose: #f43f5e;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  /* Status Colors */
  --bullish: #10b981;
  --bearish: #f43f5e;
  --neutral: #f59e0b;

  /* Gradients */
  --grad-cyan-indigo: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
  --grad-indigo-violet: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --grad-bullish: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --grad-bearish: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
  --grad-gold: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Courier, monospace;

  /* Border Radii & Shadow */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-glow-cyan: 0 0 24px rgba(6, 182, 212, 0.3);
  --shadow-glow-indigo: 0 0 24px rgba(99, 102, 241, 0.35);
  --shadow-glow-rose: 0 0 24px rgba(244, 63, 94, 0.3);
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.45);
}

/* ─── BASE & RESET ────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ─── DYNAMIC BACKGROUND GLOWS ────────────────────────────────────── */
.glass-bg-glow {
  position: fixed;
  width: 750px;
  height: 750px;
  border-radius: 50%;
  filter: blur(180px);
  z-index: 0;
  opacity: 0.18;
  pointer-events: none;
}
.glow-cyan { top: -300px; left: -180px; background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%); }
.glow-indigo { top: 25%; right: -250px; background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 70%); }
.glow-violet { bottom: -300px; left: 15%; background: radial-gradient(circle, var(--accent-violet) 0%, transparent 70%); }

/* ─── LAYOUT CONTAINER ────────────────────────────────────────────── */
.app-container {
  width: 100%;
  max-width: 1720px;
  padding: 16px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 1;
}

/* ─── HEADER BAR ──────────────────────────────────────────────────── */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-highlight);
  backdrop-filter: blur(30px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  gap: 20px;
  flex-wrap: wrap;
}

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

.logo-box {
  width: 42px;
  height: 42px;
  background: var(--grad-cyan-indigo);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-indigo);
}

.logo-icon { font-size: 22px; color: #fff; }

.brand-text h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.6px;
  background: linear-gradient(135deg, #ffffff 40%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-text h1 span {
  background: var(--grad-cyan-indigo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; margin-top: 2px; }

.header-center-nav { display: flex; align-items: center; gap: 16px; flex: 1; justify-content: center; flex-wrap: wrap; }

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

/* ─── PAIR SEARCH & TIMEFRAME BADGES ──────────────────────────────── */
.search-wrapper { position: relative; }

.search-bar-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 7px 14px;
  gap: 10px;
  transition: all 0.25s ease;
  min-width: 250px;
}

.search-bar-group:focus-within {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.search-icon { color: var(--text-muted); flex-shrink: 0; font-size: 14px; }

.pair-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  width: 100%;
}
.pair-search-input::placeholder { color: var(--text-muted); font-weight: 400; }

.btn-clear-search {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px;
}
.btn-clear-search:hover { color: var(--text-primary); }

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(12, 14, 30, 0.98);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(30px);
  z-index: 100;
  overflow: hidden;
  animation: fadeSlideDown 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  gap: 10px;
}
.search-result-item:hover { background: rgba(99, 102, 241, 0.16); }
.search-result-item:not(:last-child) { border-bottom: 1px solid var(--border-subtle); }

.result-left { display: flex; align-items: center; gap: 10px; }
.result-symbol { font-size: 13px; font-weight: 700; }
.result-name { font-size: 11px; color: var(--text-muted); }
.result-price { font-size: 12px; font-weight: 600; font-family: var(--font-mono); color: var(--text-secondary); }

/* Timeframe Pills Bar */
.timeframe-badges {
  display: flex;
  gap: 3px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.timeframe {
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.timeframe:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.06); }
.timeframe.active {
  background: var(--grad-cyan-indigo);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

/* Header Live Ticker Display */
.price-indicator { text-align: right; min-width: 120px; }
.price-value { font-size: 19px; font-weight: 800; font-family: var(--font-mono); letter-spacing: -0.5px; display: block; }
.price-change-positive { color: var(--accent-emerald); font-size: 11px; font-weight: 700; font-family: var(--font-mono); }
.price-change-negative { color: var(--accent-rose); font-size: 11px; font-weight: 700; font-family: var(--font-mono); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}
.badge-simulator { background: rgba(99, 102, 241, 0.12); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-ai { background: rgba(139, 92, 246, 0.15); color: #ddd6fe; border: 1px solid rgba(139, 92, 246, 0.3); }
.pulse { width: 6px; height: 6px; background-color: currentColor; border-radius: 50%; animation: pulseGlow 2s infinite alternate; }

/* ─── BUTTON SYSTEM ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

.btn-glow:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.55);
}

.btn-primary {
  background: var(--grad-cyan-indigo);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-secondary:not(:disabled):hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); }

.btn-accent {
  background: var(--grad-indigo-violet);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.btn-outline:not(:disabled):hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); border-color: var(--border-highlight); }
.btn-outline.active { background: rgba(99, 102, 241, 0.2); border-color: var(--accent-indigo); color: var(--text-primary); }

.btn-sm { padding: 6px 12px !important; font-size: 11px !important; border-radius: var(--radius-sm); }
.btn-full { width: 100%; padding: 11px; }

/* ─── DASHBOARD MAIN GRID ────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 18px;
}
@media (max-width: 1250px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ─── CARD BASE ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-highlight);
  backdrop-filter: blur(28px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card-header-small {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card-header);
}
.card-header-small h2 { font-size: 14px; font-weight: 800; letter-spacing: -0.3px; }

/* ─── LEFT PANEL: CHART TERMINAL & SEGMENT TABS ──────────────────── */
.panel-left { display: flex; flex-direction: column; overflow: hidden; }

.chart-mode-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.2);
  gap: 6px;
}

.chart-mode-tab {
  background: transparent;
  border: none;
  padding: 12px 18px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-mode-tab:hover { color: var(--text-primary); }
.chart-mode-tab.active { color: var(--accent-cyan); border-bottom-color: var(--accent-cyan); }

.chart-tools-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
  gap: 12px;
  flex-wrap: wrap;
}

.chart-tools-group { display: flex; gap: 6px; align-items: center; }
.tool-label { font-size: 11px; color: var(--text-muted); font-weight: 700; margin-right: 4px; uppercase; }

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 540px;
  padding: 8px;
  background: #090a16;
}

#chart-container { width: 100%; height: 100%; border-radius: var(--radius-md); overflow: hidden; }
.chart-overlay-status { position: absolute; top: 18px; left: 18px; z-index: 10; }

/* Upload & Deploy Mode Zones */
.upload-zone-wrapper { padding: 24px; }
.upload-dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-lg);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  transition: border-color 0.3s;
  background: rgba(0, 0, 0, 0.2);
}
.upload-placeholder { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.upload-icon { font-size: 44px; }
.upload-hint { font-size: 11px; color: var(--text-muted); }

.simple-text-input {
  flex: 1;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12px;
  outline: none;
}

.deploy-zone-wrapper { padding: 24px; }
.deploy-card h3 { font-size: 17px; margin-bottom: 6px; font-weight: 800; }
.deploy-field-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.deploy-field-group label { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.deploy-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  font-family: var(--font-mono);
}
.deploy-field-group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contract-code-section { margin: 14px 0; background: #05060d; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 14px; }
.code-header { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-bottom: 8px; font-weight: 700; }
.solidity-code { font-family: var(--font-mono); font-size: 11px; color: #a5b4fc; max-height: 180px; overflow-y: auto; }
.deploy-status-console { margin-top: 16px; background: #030408; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 14px; }
.console-logs { font-family: var(--font-mono); font-size: 11px; color: #34d399; max-height: 120px; overflow-y: auto; }

/* ─── RIGHT PANEL: ACCESS GATEWAY & AI COMMAND CENTER ───────────── */
.panel-right { display: flex; flex-direction: column; gap: 18px; }

/* Gateway Card */
.wallet-card { border-top: 3px solid var(--accent-indigo); }
.wallet-status { font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: var(--radius-sm); }
.wallet-status.disconnected { background: rgba(239, 68, 68, 0.15); color: var(--accent-rose); border: 1px solid rgba(239, 68, 68, 0.3); }
.wallet-status.connected { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }

.wallet-body { padding: 18px; }
.wallet-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.icon-avatar { width: 50px; height: 50px; background: rgba(99, 102, 241, 0.12); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; border: 1px solid rgba(99, 102, 241, 0.3); }
.wallet-info-row { width: 100%; display: flex; justify-content: space-between; font-size: 13px; align-items: center; }
.address-field { font-family: var(--font-mono); color: var(--accent-indigo); background: rgba(99, 102, 241, 0.12); padding: 3px 8px; border-radius: 6px; font-weight: 700; }
.balance-glow { font-weight: 800; color: var(--accent-cyan); font-family: var(--font-mono); }
.divider { width: 100%; height: 1px; background: var(--border-subtle); margin: 8px 0; }

/* Subscription Plans Grid */
.plan-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.plan-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.plan-card-featured { border-color: rgba(139, 92, 246, 0.45); background: rgba(139, 92, 246, 0.08); }
.plan-card-elite { border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.08); }

.plan-badge { font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; }
.plan-badge-pro { color: #c084fc; }
.plan-badge-elite { color: #fbbf24; }

.plan-price { margin: 6px 0; }
.plan-price-amount { font-size: 17px; font-weight: 800; font-family: var(--font-mono); }
.plan-price-unit { font-size: 10px; color: var(--text-muted); }

.plan-feature-list { list-style: none; font-size: 10px; color: var(--text-secondary); text-align: left; margin: 8px 0; line-height: 1.45; }
.btn-plan { font-size: 11px; padding: 7px; border-radius: 6px; margin-top: 6px; font-weight: 700; }
.btn-plan-starter { background: var(--accent-indigo); color: #fff; }
.btn-plan-pro { background: var(--accent-violet); color: #fff; }
.btn-plan-elite { background: var(--grad-gold); color: #fff; }

/* Active Subscription Info Box */
.subscription-active-box { background: rgba(16, 185, 129, 0.06); border: 1px solid rgba(16, 185, 129, 0.28); border-radius: var(--radius-md); padding: 14px; }
.active-plan-header { display: flex; justify-content: space-between; align-items: center; }
.active-plan-badge { font-size: 12px; font-weight: 800; color: var(--accent-emerald); }
.active-plan-label { font-size: 10px; color: var(--text-muted); }
.pairs-quota-count { font-size: 15px; font-weight: 800; font-family: var(--font-mono); }
.pairs-quota-bar { width: 110px; height: 5px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.pairs-quota-fill { height: 100%; background: var(--accent-emerald); transition: width 0.35s ease; }
.active-plan-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ─── AI ANALYST COMMAND CENTER CARDS ────────────────────────────── */
.analyst-card { border-top: 3px solid var(--accent-cyan); }
.analyst-body { padding: 16px; }

.analysis-status { text-align: center; padding: 28px 14px; color: var(--text-secondary); }
.status-icon { font-size: 36px; margin-bottom: 10px; }

.spinner {
  width: 30px; height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

/* Hero Signal Banner */
.signal-hero-banner {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.signal-hero-main { display: flex; align-items: center; gap: 12px; }

.signal-badge {
  padding: 7px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.signal-badge.BULLISH, .signal-badge:not(.bearish):not(.neutral) { background: var(--grad-bullish); color: #fff; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35); }
.signal-badge.BEARISH, .signal-badge.bearish { background: var(--grad-bearish); color: #fff; box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35); }
.signal-badge.NEUTRAL, .signal-badge.neutral { background: var(--grad-gold); color: #fff; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35); }

.confidence-box { font-size: 11px; color: var(--text-muted); }
.confidence-box strong { font-size: 16px; color: var(--text-primary); display: block; font-family: var(--font-mono); }

.signal-hero-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.risk-pill { font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); }
.timeframe-pill { font-size: 11px; color: var(--accent-cyan); font-weight: 700; }

/* Position Setup Grid */
.position-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.position-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.entry-card { border-left: 3px solid var(--accent-indigo); }
.sl-card { border-left: 3px solid var(--accent-rose); }
.tp1-card { border-left: 3px solid var(--accent-emerald); }
.tp2-card { border-left: 3px solid var(--accent-amber); }

.pos-label { font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; }
.pos-price { font-size: 17px; font-weight: 800; font-family: var(--font-mono); }
.pos-meta { display: flex; gap: 6px; font-size: 10px; font-weight: 700; font-family: var(--font-mono); }
.sl-pct { color: var(--accent-rose); }
.tp-pct { color: var(--accent-emerald); }
.pos-rr { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); padding: 1px 5px; border-radius: 4px; }
.pos-rationale { font-size: 10px; color: var(--text-muted); line-height: 1.35; margin-top: 3px; }

/* Technical Indicators & Structure */
.report-section { margin-top: 12px; }
.report-section h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; font-weight: 800; }

.pattern-detail-text { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.levels-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.level-card { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border-subtle); padding: 10px; border-radius: var(--radius-sm); }
.level-card .label { font-size: 10px; color: var(--text-muted); display: block; font-weight: 700; uppercase; }
.level-card .value { font-size: 14px; font-weight: 800; font-family: var(--font-mono); margin-top: 2px; }
.level-card.sup .value { color: var(--accent-emerald); }
.level-card.res .value { color: var(--accent-rose); }

.indicator-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.indicator-card { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 10px 12px; }
.indicator-title { font-size: 10px; font-weight: 800; color: var(--text-muted); uppercase; }
.indicator-value { font-size: 14px; font-weight: 800; font-family: var(--font-mono); margin: 3px 0; }
.indicator-status { font-size: 10px; font-weight: 700; color: var(--accent-cyan); }
.indicator-summary { font-size: 10px; color: var(--text-secondary); line-height: 1.35; }

.narrative-text { font-size: 12px; color: var(--text-secondary); line-height: 1.55; font-style: italic; background: rgba(0, 0, 0, 0.25); padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); }

/* ─── DEV TERMINAL DRAWER ────────────────────────────────────────── */
.dev-terminal { margin-top: 10px; }
.terminal-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; cursor: pointer; }
.terminal-title { display: flex; align-items: center; gap: 10px; }
.terminal-title h2 { font-size: 13px; font-weight: 800; }
.term-status-badge { font-size: 10px; background: rgba(255, 255, 255, 0.06); padding: 3px 8px; border-radius: 4px; color: var(--text-muted); font-family: var(--font-mono); }

.collapsible-closed .terminal-body { display: none; }
.terminal-body { display: grid; grid-template-columns: 250px 1fr; border-top: 1px solid var(--border-subtle); max-height: 230px; }
.terminal-side-nav { padding: 12px; border-right: 1px solid var(--border-subtle); overflow-y: auto; }
.empty-list-desc { font-size: 11px; color: var(--text-muted); }

.terminal-viewer { display: flex; flex-direction: column; padding: 12px; overflow-y: auto; font-family: var(--font-mono); font-size: 11px; }
.viewer-header { display: flex; gap: 10px; margin-bottom: 10px; color: var(--text-secondary); }
.viewer-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pane pre { background: #030408; padding: 10px; border-radius: 6px; max-height: 135px; overflow: auto; color: #a5b4fc; }
.pane-title { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; font-weight: 700; }

/* ─── MODAL OVERLAY ──────────────────────────────────────────────── */
.wallet-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 14, 0.88);
  backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wallet-modal {
  width: 100%; max-width: 420px;
  background: rgba(13, 15, 34, 0.98);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.7);
}
.wallet-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.wallet-modal-header h2 { font-size: 17px; font-weight: 800; }
.btn-modal-close { background: transparent; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.wallet-modal-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }

.wallet-error-toast {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  margin-bottom: 14px;
}

.wallet-options-list { display: flex; flex-direction: column; gap: 10px; }
.wallet-option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  color: var(--text-primary);
}
.wallet-option:hover { background: rgba(99, 102, 241, 0.16); border-color: var(--accent-indigo); }
.wallet-option-icon { font-size: 26px; }
.wallet-option-info { flex: 1; }
.wallet-option-name { font-size: 13px; font-weight: 700; }
.wallet-option-desc { font-size: 10px; color: var(--text-muted); }
.wallet-option-badge { font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); color: var(--text-muted); }
.wallet-option-badge.recommended { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }

.hidden { display: none !important; }

/* ─── ANIMATIONS ──────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseGlow { from { opacity: 0.4; } to { opacity: 1; } }
@keyframes fadeSlideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
