/* ==========================================================================
   POLYSCAN SPATIAL — VISIONOS GLASSMORPHIC DESIGN SYSTEM
   Rebuilt completely from scratch in the style of Apple visionOS Spatial UI.
   Features: Frosted glass refractions, floating pill HUDs, specular lighting,
   vibrant pastel gradient cards, radial gauge dials, and ambient depth of field.
   ========================================================================== */

:root {
  /* Core spatial palette */
  --bg-dark: #0d0e12;
  --glass-surface: rgba(28, 30, 38, 0.72);
  --glass-surface-elevated: rgba(38, 41, 52, 0.78);
  --glass-card: rgba(45, 48, 60, 0.58);
  --glass-card-hover: rgba(55, 59, 74, 0.72);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-light: rgba(255, 255, 255, 0.22);
  --glass-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.28);
  
  /* Text & Accents */
  --text-main: #f8fafc;
  --text-muted: rgba(248, 250, 252, 0.65);
  --text-faint: rgba(248, 250, 252, 0.42);
  
  --accent-blue: #38bdf8;
  --accent-purple: #c084fc;
  --accent-pink: #f472b6;
  --accent-amber: #fbbf24;
  --accent-emerald: #34d399;
  --accent-red: #fb7185;
  
  /* Vibrant Pastel Card Gradients (visionOS Smart TV style) */
  --gradient-pastel: linear-gradient(135deg, rgba(251, 194, 235, 0.92) 0%, rgba(200, 195, 255, 0.92) 50%, rgba(166, 193, 238, 0.92) 100%);
  --gradient-sunset: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
  --gradient-arc: conic-gradient(from 180deg at 50% 50%, #c084fc 0deg, #38bdf8 160deg, #fbbf24 280deg, #fb7185 360deg);
  --gradient-pill: linear-gradient(90deg, #fbc2eb 0%, #ffd6a5 100%);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: var(--font-sans);
  color: var(--text-main);
  user-select: none;
}

/* ==========================================================================
   SPATIAL AMBIENT BACKGROUND SCENE
   Photorealistic luxury interior depth of field with warm wood & bokeh
   ========================================================================== */
.spatial-env {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.ambient-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: 
    radial-gradient(circle at 10% 20%, rgba(45, 30, 20, 0.75) 0%, transparent 50%),
    radial-gradient(circle at 90% 30%, rgba(160, 100, 60, 0.4) 0%, transparent 60%),
    radial-gradient(circle at 50% 80%, rgba(20, 25, 40, 0.92) 0%, transparent 70%),
    linear-gradient(180deg, #181920 0%, #0d0e12 100%);
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.glow-1 {
  width: 650px;
  height: 550px;
  background: radial-gradient(circle, rgba(217, 140, 80, 0.25), transparent 70%);
  top: -100px;
  right: -50px;
}
.glow-2 {
  width: 800px;
  height: 700px;
  background: radial-gradient(circle, rgba(100, 140, 220, 0.2), transparent 70%);
  bottom: -150px;
  left: -100px;
}
.glow-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(230, 160, 190, 0.15), transparent 70%);
  top: 40%;
  left: 35%;
}

.ambient-overlay {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(10, 11, 15, 0.5) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.008) 0px, rgba(255, 255, 255, 0.008) 1px, transparent 1px, transparent 4px);
  pointer-events: none;
}

/* ==========================================================================
   SPATIAL CANVAS & TOP FLOATING DOCK
   ========================================================================== */
#spatial-canvas {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 24px 20px 24px;
  gap: 16px;
}

/* Top Floating Pill Navigation (visionOS Room Bar) */
#top-dock {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 14px;
  border-radius: 9999px;
  background: rgba(30, 32, 40, 0.72);
  backdrop-filter: blur(35px) saturate(200%);
  -webkit-backdrop-filter: blur(35px) saturate(200%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), var(--glass-highlight);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-items {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.nav-item .icon {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: #ffffff;
  color: #111116;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.28);
}

.dock-action-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.2s ease;
}

.dock-action-circle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.06);
}

/* ==========================================================================
   SPATIAL STAGE (LEFT VERTICAL DOCK + MAIN GLASS WINDOW)
   ========================================================================== */
.spatial-stage {
  flex: 1;
  display: flex;
  gap: 16px;
  min-height: 0;
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}

#left-dock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  padding: 12px 8px;
  border-radius: 9999px;
  background: rgba(30, 32, 40, 0.72);
  backdrop-filter: blur(35px) saturate(200%);
  -webkit-backdrop-filter: blur(35px) saturate(200%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), var(--glass-highlight);
}

.side-dock-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-dock-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.side-dock-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: scale(1.08);
}

.side-dock-btn.active {
  background: #ffffff;
  color: #111116;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.32);
}

/* ==========================================================================
   MAIN LARGE SPATIAL GLASS WINDOW
   ========================================================================== */
#spatial-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: 38px;
  background: rgba(26, 28, 36, 0.76);
  backdrop-filter: blur(48px) saturate(190%);
  -webkit-backdrop-filter: blur(48px) saturate(190%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.65), var(--glass-highlight);
  min-width: 0;
  overflow: hidden;
}

.window-header {
  height: 68px;
  min-height: 68px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.window-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.window-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-blue);
}

.window-header .title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.spacer { flex: 1; }

.search-capsule {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 8px 18px;
  width: 320px;
  transition: all 0.2s ease;
}

.search-capsule:focus-within {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.search-icon {
  width: 15px;
  height: 15px;
  color: var(--text-faint);
}

#search {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  width: 100%;
}
#search::placeholder {
  color: var(--text-faint);
}

.status-pills { display: flex; gap: 8px; }

.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
}

.pill.ok .dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}
.pill.ok {
  color: var(--accent-emerald);
  border-color: rgba(52, 211, 153, 0.3);
}

.pill.bad .dot {
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
}
.pill.bad {
  color: var(--accent-red);
  border-color: rgba(251, 113, 133, 0.3);
}

.window-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 28px 40px 28px;
}

/* ==========================================================================
   UNIVERSAL SPATIAL SCROLLBARS (Eliminates ugly white square scrollbars!)
   ========================================================================== */
* {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent !important;
}

::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22) !important;
  border-radius: 9999px !important;
  border: 1px solid transparent !important;
  background-clip: padding-box !important;
  transition: background 0.2s ease !important;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.42) !important;
}

::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

::-webkit-scrollbar-corner {
  background: transparent !important;
}

/* ==========================================================================
   SPATIAL FORMS, INPUTS, SELECTS & BUTTONS
   ========================================================================== */
input, select, textarea {
  background: rgba(35, 38, 50, 0.72) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 14px !important;
  padding: 10px 16px !important;
  font-family: var(--font-sans) !important;
  font-size: 13.5px !important;
  outline: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35) !important;
  box-sizing: border-box !important;
  min-width: 0;
}

/* Remove ugly browser number spinner arrows completely! */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  display: none !important;
  margin: 0 !important;
}
input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(56, 189, 248, 0.6) !important;
  background: rgba(45, 50, 68, 0.88) !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.3), inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

input::placeholder, textarea::placeholder {
  color: var(--text-faint) !important;
}

select {
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 36px !important;
  border-radius: 9999px !important;
}

select option {
  background: #1c1e28;
  color: #ffffff;
  padding: 10px 14px;
}

/* ==========================================================================
   VISIONOS SPATIAL GLASS DROPDOWN (No square blue OS popups!)
   ========================================================================== */
.spatial-dropdown {
  position: relative;
  display: inline-block;
  z-index: 100;
}

.spatial-dropdown:has(.open) {
  z-index: 200;
}

.spatial-dropdown-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: rgba(35, 38, 52, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.spatial-dropdown-btn:hover {
  background: rgba(45, 50, 68, 0.88);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.spatial-dropdown-btn.open {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.spatial-dropdown-chevron {
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-label {
  color: #ffffff;
  font-weight: 600;
}

.item-check {
  color: var(--accent-emerald);
  font-weight: 700;
}

.spatial-dropdown-btn.open .spatial-dropdown-chevron {
  transform: rotate(180deg);
}

.spatial-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  max-width: 380px;
  z-index: 10000;
  background: rgba(24, 26, 36, 0.97);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.85), var(--glass-highlight);
  display: none;
  flex-direction: column;
  gap: 4px;
  animation: dropdownIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.spatial-dropdown-menu.open {
  display: flex;
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.spatial-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.15s ease;
}

.spatial-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.spatial-dropdown-item.selected {
  background: #ffffff;
  color: #111116;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

/* VisionOS Capsule Buttons */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

button:hover, .btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

button:active, .btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

button.primary, .btn.primary {
  background: #ffffff !important;
  color: #0f1015 !important;
  border-color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.32), 0 2px 6px rgba(0, 0, 0, 0.3);
  font-weight: 700;
}

button.primary:hover, .btn.primary:hover {
  background: #f1f5f9 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(255, 255, 255, 0.45);
}

button.danger, .btn.danger {
  background: rgba(251, 113, 133, 0.22) !important;
  color: #fb7185 !important;
  border: 1px solid rgba(251, 113, 133, 0.45) !important;
  box-shadow: 0 4px 18px rgba(251, 113, 133, 0.25);
}

button.danger:hover, .btn.danger:hover {
  background: rgba(251, 113, 133, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 24px rgba(251, 113, 133, 0.4);
}

button.small, .btn-sm {
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 600;
}

/* Fields & Labels */
.field, label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-muted);
}

.field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-faint);
}

/* Filter bar container */
.filters {
  position: relative;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  background: var(--glass-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), var(--glass-highlight);
}

.filters:has(.open) {
  z-index: 250;
}

/* Checkboxes in pill style */
input[type="checkbox"] {
  appearance: auto !important;
  width: 16px !important;
  height: 16px !important;
  accent-color: var(--accent-blue) !important;
  cursor: pointer;
}

/* ==========================================================================
   LAYOUT, GRIDS & STATS CARDS
   ========================================================================== */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.center { align-items: center; }

.grid {
  display: grid;
  gap: 16px;
}
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-32 { grid-template-columns: 1.6fr 1.2fr; }
.cols-23 { grid-template-columns: 1.2fr 1.6fr; }

@media (max-width: 1100px) {
  .cols-2, .cols-3, .cols-4, .cols-32, .cols-23 {
    grid-template-columns: 1fr;
  }
}

/* Stat Cards in Demo Bot & Dashboard */
.stat, .stat-card {
  background: var(--glass-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), var(--glass-highlight);
  transition: all 0.2s ease;
}

.stat:hover, .stat-card:hover {
  border-color: var(--glass-border-light);
  transform: translateY(-2px);
}

.stat .label, .stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-faint);
}

.stat .value, .stat-value {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-faint);
}

/* Panels */
.panel, .card {
  position: relative;
  background: var(--glass-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), var(--glass-highlight);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-head, .panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #ffffff;
}

.panel-head h3, .panel-head h2 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.panel-body {
  display: flex;
  flex-direction: column;
}

.delayed-banner {
  border-radius: 20px;
  padding: 14px 20px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #38bdf8;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.45;
}

.empty {
  padding: 30px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13.5px;
}

/* ==========================================================================
   SPATIAL HUD CARDS & WIDGET ARCHITECTURE (EXACT SCREENSHOT LAYOUT)
   ========================================================================== */
.grid-spatial {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 1.35fr;
  gap: 18px;
}

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

.col-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* WIDGET 1: LIVE FEED / CAMERA CARD */
.widget-live-feed {
  position: relative;
  height: 220px;
  border-radius: 26px;
  overflow: hidden;
  background: 
    linear-gradient(180deg, rgba(15, 17, 24, 0.3) 0%, rgba(15, 17, 24, 0.88) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='300' viewBox='0 0 600 300'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%231e293b'/%3E%3Cstop offset='100%25' stop-color='%230f172a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='600' height='300' fill='url(%23g)'/%3E%3Ccircle cx='480' cy='60' r='90' fill='%2338bdf8' opacity='0.15' filter='blur(40px)'/%3E%3Ccircle cx='120' cy='220' r='140' fill='%23c084fc' opacity='0.15' filter='blur(50px)'/%3E%3Cpath d='M0 240 Q 150 180 300 220 T 600 160 L 600 300 L 0 300 Z' fill='%231e293b' opacity='0.6'/%3E%3C/svg%3E") center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid var(--glass-border);
}

.live-pill-tag {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(20, 22, 30, 0.65);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

.live-pill-tag .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.live-feed-footer {
  display: flex;
  flex-direction: column;
}

.live-feed-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.live-feed-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* WIDGET 2: ACTION PILL CARD */
.widget-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 22px;
  background: var(--glass-card);
  border: 1px solid var(--glass-border);
}

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

.action-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
  color: #1a1b24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(251, 194, 235, 0.4);
}

.action-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.action-sub {
  font-size: 11px;
  color: var(--text-faint);
}

.action-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-play-btn:hover {
  background: #ffffff;
  color: #111116;
  transform: scale(1.08);
}

/* WIDGET 3: CONTROL CARD */
.widget-control-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 120px;
  padding: 18px;
  border-radius: 24px;
  background: var(--glass-card);
  border: 1px solid var(--glass-border);
}

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

.control-icon-pill {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* WIDGET 4: VIBRANT PASTEL GRADIENT CARD */
.widget-pastel-gradient {
  height: 240px;
  border-radius: 28px;
  background: var(--gradient-pastel);
  color: #161824;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 45px rgba(251, 194, 235, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;
}

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

.pastel-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pastel-status {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(22, 24, 36, 0.75);
}

.pastel-bottom {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pastel-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #12131c;
}

.pastel-sub {
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(18, 19, 28, 0.68);
}

/* WIDGET 5: CAPSULE SLIDER */
.widget-capsule-slider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  border-radius: 9999px;
  background: var(--glass-card);
  border: 1px solid var(--glass-border);
  padding: 5px 18px 5px 6px;
  position: relative;
}

.slider-pill-fill {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border-radius: 9999px;
  background: var(--gradient-pill);
  color: #161824;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(251, 194, 235, 0.35);
}

.slider-val-right {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

/* WIDGET 6: RADIAL DIAL GAUGE CARD */
.widget-radial-gauge {
  height: 310px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px 20px 20px;
  text-align: center;
}

.radial-header-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.radial-header-sub {
  font-size: 12px;
  color: var(--text-faint);
}

.radial-meter-container {
  position: relative;
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radial-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.radial-bg-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 13;
  stroke-linecap: round;
}

.radial-value-arc {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 80;
  transition: stroke-dashoffset 0.8s ease;
}

.radial-center-button {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(30, 32, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radial-center-button:hover {
  background: #ffffff;
  color: #111116;
  transform: scale(1.08);
}

.radial-readout-block {
  margin-top: -6px;
}

.radial-bold-metric {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.radial-metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-faint);
  margin-top: 1px;
}

/* WIDGET 7: MEDIA / WHALE STREAM CARD */
.widget-media-player {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 24px;
  background: var(--glass-card);
  border: 1px solid var(--glass-border);
}

.media-cover-art {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #2b3040, #181b24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.media-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.media-pill-tag {
  align-self: flex-start;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-emerald);
  margin-bottom: 2px;
}

.media-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-artist {
  font-size: 11.5px;
  color: var(--text-faint);
}

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

.media-ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.media-ctrl-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   VISIONOS TOGGLE SWITCHES
   ========================================================================== */
.spatial-toggle {
  position: relative;
  width: 44px;
  height: 26px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.spatial-toggle.active, .spatial-toggle:has(input:checked) {
  background: #ffffff;
}

.spatial-toggle .toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.spatial-toggle.active .toggle-knob, .spatial-toggle:has(input:checked) .toggle-knob {
  transform: translateX(18px);
  background: #111116;
}

/* ==========================================================================
   GLASS TABLES & LEADERBOARDS
   ========================================================================== */
table, .table, .spatial-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  margin-top: 8px;
}

table th, .table th {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: left;
  border: none;
  background: transparent;
}

table th.num, .table th.num { text-align: right; }

table td, .table td {
  padding: 12px 16px;
  font-size: 13px;
  background: rgba(38, 41, 52, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  transition: all 0.15s ease;
}

table td.num, .table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

table tr td:first-child, .table tr td:first-child {
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

table tr td:last-child, .table tr td:last-child {
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

table tr:hover td, .table tr:hover td {
  background: rgba(55, 59, 74, 0.75);
}

tr.clickable {
  cursor: pointer;
}

table.kv {
  border-spacing: 0 4px;
}

table.kv td {
  padding: 9px 14px;
  font-size: 12.5px;
}

table.kv td.k {
  color: var(--text-muted);
  font-weight: 500;
  width: 38%;
}

/* ==========================================================================
   BADGES & CHIPS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.badge-green, .badge.green {
  background: rgba(52, 211, 153, 0.16);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.32);
}

.badge-blue, .badge.blue {
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.32);
}

.badge-purple, .badge.purple {
  background: rgba(192, 132, 252, 0.16);
  color: var(--accent-purple);
  border: 1px solid rgba(192, 132, 252, 0.32);
}

.badge-red, .badge.red {
  background: rgba(251, 113, 133, 0.16);
  color: var(--accent-red);
  border: 1px solid rgba(251, 113, 133, 0.32);
}

.badge-yellow, .badge.yellow {
  background: rgba(251, 191, 36, 0.16);
  color: var(--accent-amber);
  border: 1px solid rgba(251, 191, 36, 0.32);
}

.badge-dim, .badge.dim {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.live-dot-mini {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
  display: inline-block;
  animation: pulse 1.8s infinite;
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}

.chip-yes {
  background: rgba(52, 211, 153, 0.18);
  color: var(--accent-emerald);
  border-color: rgba(52, 211, 153, 0.38);
  font-weight: 700;
}

.chip-no {
  background: rgba(251, 113, 133, 0.18);
  color: var(--accent-red);
  border-color: rgba(251, 113, 133, 0.38);
  font-weight: 700;
}

.chip-mono {
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.score-chip {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ==========================================================================
   DEMO BOT SPATIAL TOOLBAR & DIAGNOSTICS
   ========================================================================== */
.spatial-hero-toolbar {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--glass-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 16px 24px;
  margin-bottom: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), var(--glass-highlight);
}

.spatial-hero-toolbar:has(.open) {
  z-index: 250;
}

.hero-account-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-bot-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.hero-bot-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-bot-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.hero-bot-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   COMPACT RISK STRIP & STEPPERS (Replaces huge bulky settings panel)
   ========================================================================== */
.compact-risk-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(30, 33, 46, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 12px 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.risk-items-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.risk-pill-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.risk-pill-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-faint);
}

.risk-pill-val {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono);
}

.spatial-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.stepper-btn {
  width: 34px;
  height: 34px;
  border-radius: 50% !important;
  padding: 0 !important;
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.stepper-btn:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  transform: scale(1.08);
}

.stepper-btn:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.3) !important;
}

/* Diagnostic Box */
.diag-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

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

.diag-stat-card {
  background: rgba(30, 33, 44, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diag-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-faint);
}

.diag-stat-value {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #ffffff;
}

.skip-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.skip-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12.5px;
}

.skip-label {
  color: var(--text-muted);
}

.skip-count {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-amber);
  background: rgba(251, 191, 36, 0.12);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11.5px;
}

/* ==========================================================================
   INTERACTIVE SIGNAL PILL CHIPS (Replaces ugly checkboxes!)
   ========================================================================== */
.signal-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px 0;
}

.signal-pill-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.signal-pill-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
}

.signal-pill-chip.active {
  background: #ffffff;
  color: #111116;
  border-color: #ffffff;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.28);
  font-weight: 700;
}

.signal-pill-chip .chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: all 0.2s ease;
}

.signal-pill-chip.active .chip-dot {
  background: #111116;
}

/* ==========================================================================
   TRADE CARDS & CARD GRID
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.trade-card {
  background: rgba(35, 38, 50, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), var(--glass-highlight);
  cursor: pointer;
}

.trade-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(45, 50, 66, 0.72);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), var(--glass-highlight);
}

.tc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tc-bet {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tc-market {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tc-market:hover {
  color: var(--accent-blue);
}

.tc-bet-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  border-radius: 10px;
}

.tc-bet-ico { font-size: 14px; }
.tc-bet-label { font-size: 10px; font-weight: 700; color: var(--text-faint); letter-spacing: 0.5px; }
.tc-bet-phrase { color: #ffffff; }
.tc-bet-on { color: #ffffff; }
.tc-bet-side { color: var(--text-muted); font-size: 11px; }

.tc-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(20, 22, 30, 0.4);
  border-radius: 14px;
  padding: 10px 12px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-faint);
}

.metric-val {
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #ffffff;
}

.tc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   MODALS & SCORE BREAKDOWN
   ========================================================================== */
.modal-back {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 11, 16, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  background: rgba(30, 33, 44, 0.88);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--glass-border-light);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), var(--glass-highlight);
  overflow: hidden;
}

.m-head {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.m-body {
  padding: 22px 24px;
  overflow-y: auto;
  font-size: 13.5px;
  color: var(--text-main);
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 12.5px;
}

.breakdown-row .name {
  width: 130px;
  color: var(--text-muted);
}

.breakdown-row .bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.breakdown-row .bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--accent-emerald);
}

.breakdown-row .bar-fill.accent { background: var(--accent-blue); }
.breakdown-row .bar-fill.red { background: var(--accent-red); }

.breakdown-row .pts {
  width: 60px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.scroll {
  overflow-y: auto;
}

.scroll::-webkit-scrollbar { width: 6px; }
.scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 3px;
}
.scroll::-webkit-scrollbar-track { background: transparent; }

/* Signal cards & Dashboard components */
.signal-card {
  background: rgba(35, 38, 50, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.signal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.card-subtitle, .sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.cond-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12.5px;
}

.metrics {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.detail {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 2px;
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.ml-8 { margin-left: 8px; }

/* ==========================================================================
   DECISION CARDS & LIVE RADAR (Why the bot enters, transparent reasoning)
   ========================================================================== */
.decision-card {
  background: rgba(35, 38, 52, 0.65);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), var(--glass-highlight);
  transition: all 0.22s ease;
}

.decision-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), var(--glass-highlight);
}

.decision-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.decision-market-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
}

.decision-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(22, 24, 34, 0.5);
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 900px) {
  .decision-pillars { grid-template-columns: 1fr; }
}

.pillar-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pillar-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent-blue);
}

.pillar-desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.pillar-highlight {
  color: #ffffff;
  font-weight: 600;
}

.edge-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(52, 211, 153, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

/* Live Decision Radar Feed */
.radar-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}

.radar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(30, 33, 44, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  transition: all 0.15s ease;
}

.radar-row:hover {
  background: rgba(45, 50, 66, 0.65);
}

.radar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.radar-market {
  color: #ffffff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radar-reason {
  color: var(--text-muted);
  font-size: 12px;
}

/* Utility text helpers */
.text-accent { color: var(--accent-blue); }
.text-green, .pos { color: var(--accent-emerald); }
.text-red, .neg { color: var(--accent-red); }
.text-muted, .dim { color: var(--text-muted); }
.text-faint, .faint { color: var(--text-faint); }
.font-mono, .mono { font-family: var(--font-mono); }
.neutral { color: var(--text-muted); }
.meta { font-size: 12px; color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-18 { margin-top: 18px; }
.mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

/* Modal and Toasts */
.toast-wrap, #toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 12px 22px;
  border-radius: 9999px;
  background: rgba(28, 30, 40, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), var(--glass-highlight);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.t-title { font-weight: 700; color: #fff; }
.t-body { font-size: 12px; color: var(--text-muted); }

.basket-card-glow {
  border-color: rgba(16, 185, 129, 0.45) !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.15), var(--glass-highlight) !important;
}

