/* ===== MT5 AutoTrader Pro - Obsidian Flow Design System ===== */
:root {
  --bg: oklch(0.13 0.02 260);
  --bg-card: oklch(0.17 0.02 260);
  --bg-card-60: oklch(0.17 0.02 260 / 0.6);
  --fg: oklch(0.93 0.005 260);
  --fg-muted: oklch(0.65 0.01 260);
  --border: oklch(0.28 0.02 260);
  --border-50: oklch(0.28 0.02 260 / 0.5);
  --primary: oklch(0.72 0.15 195);
  --primary-fg: oklch(0.15 0.02 260);
  --destructive: oklch(0.65 0.2 25);
  --chart-cyan: oklch(0.72 0.15 195);
  --chart-green: oklch(0.75 0.12 145);
  --chart-violet: oklch(0.7 0.14 280);
  --chart-gold: oklch(0.78 0.15 85);
  --chart-magenta: oklch(0.7 0.12 310);
  --sidebar-w: 240px;
  --sidebar-collapsed: 64px;
  --header-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--fg);
}
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* ===== LAYOUT ===== */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-card-60);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-50);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
  min-width: var(--sidebar-collapsed);
}
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .status-text { display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px 0; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-50);
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon {
  background: linear-gradient(135deg, var(--primary), var(--chart-violet));
  color: white;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
}
.logo-text { font-weight: 600; font-size: 14px; white-space: nowrap; }
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}
.sidebar-toggle:hover { color: var(--primary); }

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--fg-muted);
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-item:hover { color: var(--fg); background: oklch(0.2 0.02 260); }
.nav-item.active {
  color: var(--primary);
  background: oklch(0.72 0.15 195 / 0.12);
}
.nav-item i { width: 20px; text-align: center; font-size: 16px; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-50);
}
.bot-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-muted);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #555;
  flex-shrink: 0;
}
.status-dot.active {
  background: var(--chart-green);
  box-shadow: 0 0 8px var(--chart-green);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.main-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-50);
  flex-shrink: 0;
}
.main-header h1 { font-size: 20px; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 16px; }

.bot-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.bot-badge.active {
  background: oklch(0.75 0.12 145 / 0.2);
  color: var(--chart-green);
  border: 1px solid oklch(0.75 0.12 145 / 0.3);
}
.bot-badge.off {
  background: oklch(0.65 0.2 25 / 0.15);
  color: var(--destructive);
  border: 1px solid oklch(0.65 0.2 25 / 0.2);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--chart-green);
  letter-spacing: 1px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chart-green);
  animation: blink 1.5s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.tab-content::-webkit-scrollbar { width: 6px; }
.tab-content::-webkit-scrollbar-track { background: transparent; }
.tab-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--bg-card-60);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-50);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s;
}
.glass-card:hover {
  border-color: oklch(0.35 0.02 260);
}
.glass-card.gold-border {
  border-color: oklch(0.78 0.15 85 / 0.3);
}
.glass-card.gold-border:hover {
  border-color: oklch(0.78 0.15 85 / 0.5);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== GRID LAYOUTS ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

/* ===== PRICE CARDS ===== */
.price-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.price-symbol {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.price-values {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.price-bid, .price-ask {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
}
.price-label {
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.price-spread {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg-muted);
}
.price-change {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.positive { color: var(--chart-green); }
.negative { color: var(--destructive); }
.neutral { color: var(--fg-muted); }
.flash-green { animation: flash-g 0.5s; }
.flash-red { animation: flash-r 0.5s; }
@keyframes flash-g { 0% { background: oklch(0.75 0.12 145 / 0.3); } 100% { background: transparent; } }
@keyframes flash-r { 0% { background: oklch(0.65 0.2 25 / 0.3); } 100% { background: transparent; } }

/* ===== TABLES ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--fg-muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-50);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid oklch(0.2 0.01 260 / 0.3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.data-table tr:hover { background: oklch(0.2 0.02 260 / 0.3); }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-buy { background: oklch(0.75 0.12 145 / 0.2); color: var(--chart-green); }
.badge-sell { background: oklch(0.65 0.2 25 / 0.2); color: var(--destructive); }
.badge-hold { background: oklch(0.78 0.15 85 / 0.2); color: var(--chart-gold); }
.badge-open { background: oklch(0.72 0.15 195 / 0.2); color: var(--primary); }
.badge-closed { background: oklch(0.4 0.01 260 / 0.3); color: var(--fg-muted); }
.badge-tp { background: oklch(0.75 0.12 145 / 0.2); color: var(--chart-green); }
.badge-sl { background: oklch(0.65 0.2 25 / 0.2); color: var(--destructive); }
.badge-high { background: oklch(0.65 0.2 25 / 0.2); color: var(--destructive); }
.badge-medium { background: oklch(0.78 0.15 85 / 0.2); color: var(--chart-gold); }
.badge-low { background: oklch(0.75 0.12 145 / 0.2); color: var(--chart-green); }

/* ===== SCORE BARS ===== */
.score-bar-container {
  width: 100%;
  height: 6px;
  background: oklch(0.2 0.01 260);
  border-radius: 3px;
  overflow: hidden;
}
.score-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s;
}
.score-bar.positive { background: var(--chart-green); }
.score-bar.negative { background: var(--destructive); }
.score-bar.neutral { background: var(--fg-muted); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
}
.btn-ghost:hover { color: var(--fg); background: oklch(0.2 0.02 260); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-active {
  background: var(--primary);
  color: var(--primary-fg);
}

/* ===== FORM CONTROLS ===== */
select, input[type="text"], input[type="number"] {
  background: oklch(0.15 0.02 260);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
select:focus, input:focus { border-color: var(--primary); }
select { cursor: pointer; }

.slider-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.slider-label span:last-child {
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
  font-weight: 600;
}
input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: oklch(0.2 0.02 260);
  border-radius: 3px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px oklch(0.72 0.15 195 / 0.4);
}

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  cursor: pointer;
}
.toggle-switch input { display: none; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: oklch(0.25 0.02 260);
  border-radius: 13px;
  transition: background 0.3s;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--fg);
  transition: transform 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(22px);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: oklch(0.2 0.02 260);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s, background 0.5s;
}

/* ===== CONFIDENCE BAR ===== */
.confidence-bar {
  width: 60px;
  height: 4px;
  background: oklch(0.2 0.02 260);
  border-radius: 2px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}
.confidence-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

/* ===== BOT TAB ===== */
.bot-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - 48px);
  position: relative;
  overflow: hidden;
}

.particles-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.3;
  animation: float-particle linear infinite;
}
.particle.off {
  background: #444;
  opacity: 0.15;
}
@keyframes float-particle {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 0.3; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-20px) translateX(var(--drift)); opacity: 0; }
}

.bot-avatar-container {
  position: relative;
  width: 256px;
  height: 256px;
  margin-bottom: 32px;
}
.bot-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
}
.bot-avatar.active {
  box-shadow: 0 0 60px oklch(0.72 0.15 195 / 0.4), 0 0 120px oklch(0.72 0.15 195 / 0.2);
  border: 2px solid oklch(0.72 0.15 195 / 0.5);
  animation: avatar-glow 3s ease-in-out infinite, hologram-flicker 4s ease-in-out infinite;
}
.bot-avatar.inactive {
  filter: grayscale(100%) brightness(0.5);
  border: 2px solid #333;
}
@keyframes avatar-glow {
  0%, 100% { box-shadow: 0 0 40px oklch(0.72 0.15 195 / 0.3), 0 0 80px oklch(0.72 0.15 195 / 0.15); }
  50% { box-shadow: 0 0 60px oklch(0.72 0.15 195 / 0.5), 0 0 120px oklch(0.72 0.15 195 / 0.25); }
}
@keyframes hologram-flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.8; }
  94% { opacity: 1; }
  96% { opacity: 0.85; }
  97% { opacity: 1; }
}

.scanlines {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    oklch(0.72 0.15 195 / 0.05) 2px,
    oklch(0.72 0.15 195 / 0.05) 4px
  );
  z-index: 3;
  pointer-events: none;
  animation: scanline-scroll 8s linear infinite;
}
.scanlines.off { opacity: 0; }
@keyframes scanline-scroll {
  0% { background-position: 0 0; }
  100% { background-position: 0 256px; }
}

.power-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  margin-bottom: 24px;
  position: relative;
}
.power-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 30px oklch(0.72 0.15 195 / 0.5);
}
.power-btn.active::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid oklch(0.72 0.15 195 / 0.3);
  animation: power-ring 2s ease-in-out infinite;
}
@keyframes power-ring {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0; }
}
.power-btn.inactive {
  background: oklch(0.2 0.02 260);
  color: #555;
}

.bot-info {
  text-align: center;
  max-width: 400px;
}
.bot-info h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--primary);
}
.bot-info p {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
}
.bot-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  justify-content: center;
}
.bot-stat {
  text-align: center;
}
.bot-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}
.bot-stat-label {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 4px;
}

/* ===== OVERVIEW SECTIONS ===== */
.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title i { color: var(--primary); }

.risk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.risk-label {
  font-size: 13px;
  min-width: 140px;
  color: var(--fg-muted);
}
.risk-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  min-width: 60px;
  text-align: right;
}

/* ===== ANALYSIS TAB ===== */
.analysis-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.chart-container {
  width: 100%;
  height: 400px;
  position: relative;
  margin-bottom: 24px;
}
.chart-container canvas { width: 100% !important; height: 100% !important; }

.indicator-row {
  display: grid;
  grid-template-columns: 150px 1fr 80px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid oklch(0.2 0.01 260 / 0.3);
  font-size: 13px;
}
.indicator-name { font-weight: 500; }
.indicator-value { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--fg-muted); }
.indicator-score { font-family: 'JetBrains Mono', monospace; font-weight: 600; text-align: center; }
.indicator-detail { font-size: 12px; color: var(--fg-muted); }

.overall-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
}
.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--primary);
  margin-bottom: 16px;
}
.score-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
}
.score-action {
  font-size: 16px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: 1px;
}
.score-meta {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--fg-muted);
}
.score-meta span strong { color: var(--fg); }

/* ===== NEWS TAB ===== */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.news-item {
  padding: 16px;
  border-bottom: 1px solid oklch(0.2 0.01 260 / 0.3);
}
.news-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.news-desc {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}
.news-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 11px;
  color: var(--fg-muted);
}

/* ===== KPI CARDS ===== */
.kpi-card {
  text-align: center;
}
.kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}
.kpi-label {
  font-size: 12px;
  color: var(--fg-muted);
}

/* ===== SETTINGS ===== */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.setting-label {
  font-size: 13px;
  color: var(--fg-muted);
}

.weight-bar {
  height: 12px;
  border-radius: 6px;
  display: flex;
  overflow: hidden;
  margin: 12px 0;
}
.weight-segment {
  height: 100%;
  transition: width 0.3s;
}

.symbol-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.symbol-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}
.symbol-btn.active {
  background: oklch(0.72 0.15 195 / 0.15);
  border-color: var(--primary);
  color: var(--primary);
}
.symbol-btn.active.gold {
  background: oklch(0.78 0.15 85 / 0.15);
  border-color: var(--chart-gold);
  color: var(--chart-gold);
}
.symbol-btn.inactive {
  text-decoration: line-through;
  opacity: 0.4;
}

/* ===== AI OUTLOOK MODAL ===== */
.ai-result {
  background: oklch(0.15 0.02 260);
  border: 1px solid oklch(0.72 0.15 195 / 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}
.ai-result h4 {
  color: var(--primary);
  margin-bottom: 12px;
}
.ai-section {
  margin-bottom: 12px;
}
.ai-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ai-section p {
  font-size: 13px;
  line-height: 1.6;
}
.ai-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ai-tag {
  padding: 3px 10px;
  border-radius: 12px;
  background: oklch(0.72 0.15 195 / 0.15);
  color: var(--primary);
  font-size: 11px;
  font-weight: 500;
}

/* ===== LOADING ===== */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid oklch(0.2 0.02 260);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 13px;
  animation: slide-in 0.3s ease;
  box-shadow: 0 4px 12px oklch(0 0 0 / 0.3);
}
.toast.success { border-left: 3px solid var(--chart-green); }
.toast.error { border-left: 3px solid var(--destructive); }
@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== TABS BUTTONS ROW ===== */
.tf-buttons {
  display: flex;
  gap: 4px;
}
.tf-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  transition: all 0.2s;
}
.tf-btn.active, .tf-btn:hover {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -240px;
    z-index: 1000;
  }
  .sidebar.mobile-open { left: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .indicator-row { grid-template-columns: 120px 1fr 60px; }
  .indicator-detail { display: none; }
}

/* ===== SECTION GAP ===== */
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.gap-16 { gap: 16px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* ===== BRIDGE CONNECTION STYLES ===== */
.status-dot.bridge-on {
  background: oklch(0.72 0.15 195);
  box-shadow: 0 0 8px oklch(0.72 0.15 195 / 0.6);
}
.status-dot.bridge-off {
  background: oklch(0.65 0.2 25);
  box-shadow: 0 0 8px oklch(0.65 0.2 25 / 0.4);
  animation: pulse-slow 2s infinite;
}
@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.bridge-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
}
.bridge-badge.on {
  background: oklch(0.72 0.15 195 / 0.15);
  color: oklch(0.72 0.15 195);
  border: 1px solid oklch(0.72 0.15 195 / 0.3);
}
.bridge-badge.off {
  background: oklch(0.65 0.2 25 / 0.15);
  color: oklch(0.65 0.2 25);
  border: 1px solid oklch(0.65 0.2 25 / 0.3);
}
.stat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-50);
}
.stat-row:last-child { border-bottom: none; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.badge-green {
  background: oklch(0.75 0.12 145 / 0.15);
  color: oklch(0.75 0.12 145);
}
.badge-red {
  background: oklch(0.65 0.2 25 / 0.15);
  color: oklch(0.65 0.2 25);
}
.badge-yellow {
  background: oklch(0.78 0.15 85 / 0.15);
  color: oklch(0.78 0.15 85);
}
pre {
  white-space: pre-wrap;
  word-break: break-all;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
