/**
 * BLENDION v0 Personal OS Theme — overrides production SPA without breaking JS hooks.
 * Reference: v0-personal-os-redesign (Space Grotesk / Outfit / cyan-magenta palette)
 */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&family=Outfit:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg: #0a0a0f;
  --bg2: #0d0d14;
  --panel: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 0, 170, 0.12);
  --cyan: #00ffc8;
  --magenta: #ff00aa;
  --green: #00ff88;
  --red: #ff4444;
  --yellow: #ffaa00;
  --violet: #00aaff;
  --text: #e4e4e7;
  --text-dim: #71717a;
  --text-mid: #a1a1aa;
  --mono: 'Fira Code', 'Courier New', monospace;
  --sidebar: 280px;
  --radius: 12px;
  --glow-cyan: 0 0 20px rgba(0, 255, 200, 0.15);
  --glow-magenta: 0 0 20px rgba(255, 0, 170, 0.12);
}

html, body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  background: var(--bg) !important;
  color: var(--text) !important;
}

body::before {
  background:
    radial-gradient(ellipse 90% 70% at 15% 5%, rgba(0, 255, 200, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 60% 60% at 85% 85%, rgba(255, 0, 170, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(0, 170, 255, 0.04) 0%, transparent 70%) !important;
}

/* ── Lock screen v0 ── */
.lock-card {
  background: rgba(10, 10, 15, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 1.25rem !important;
  box-shadow: var(--glow-cyan), 0 25px 50px rgba(0, 0, 0, 0.5) !important;
}
.lock-title {
  font-family: 'Space Grotesk', sans-serif !important;
  letter-spacing: 0.08em !important;
}
.lock-input {
  border-color: rgba(0, 255, 200, 0.25) !important;
  color: var(--cyan) !important;
}
.lock-btn {
  background: linear-gradient(135deg, rgba(0, 255, 200, 0.15), rgba(255, 0, 170, 0.12)) !important;
  border-color: rgba(0, 255, 200, 0.35) !important;
  font-family: 'Space Grotesk', sans-serif !important;
}

/* ── Sidebar v0 (280px glass) ── */
.sidebar,
.sidebar-new {
  width: var(--sidebar) !important;
  min-width: var(--sidebar) !important;
  max-width: var(--sidebar) !important;
  background: rgba(10, 10, 15, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.sidebar-new .brand {
  padding: 12px 14px 16px !important;
  margin: 8px 10px 12px !important;
  border-radius: 1rem !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: linear-gradient(135deg, rgba(0, 255, 200, 0.08), rgba(0, 170, 255, 0.06), rgba(255, 0, 170, 0.06)) !important;
  border-bottom: none !important;
}

.sidebar-new .brand-mark {
  width: 44px !important;
  height: 44px !important;
  border-radius: 0.75rem !important;
  background: linear-gradient(135deg, #00ffc8, #00aaff, #ff00aa) !important;
  box-shadow: 0 0 24px rgba(0, 255, 200, 0.35) !important;
  font-size: 0 !important;
}
.sidebar-new .brand-mark::after {
  content: '⚡';
  font-size: 22px;
  line-height: 44px;
}

.sidebar-new .brand-name {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  background: linear-gradient(90deg, #00ffc8, #00aaff, #00ffc8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.sidebar-new .brand-name span,
.sidebar-brand-name span { color: #fff !important; -webkit-text-fill-color: #fff; }

.sidebar-new .brand-sub {
  font-size: 0.65rem !important;
  letter-spacing: 0.2em !important;
  color: rgba(255, 0, 170, 0.75) !important;
  text-transform: uppercase !important;
}

.sidebar-new .nav-group-label,
.nav-section {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 0.625rem !important;
  letter-spacing: 0.25em !important;
  color: rgba(255, 255, 255, 0.3) !important;
}

.sidebar-new .nav-link,
.nav-item {
  border-radius: 0.875rem !important;
  padding: 10px 14px !important;
  margin: 2px 8px !important;
  font-size: 0.9rem !important;
  transition: all 0.25s ease !important;
}

.sidebar-new .nav-link:hover,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  transform: translateX(2px);
}

.sidebar-new .nav-link.active,
.nav-item.active {
  background: linear-gradient(90deg, rgba(0, 255, 200, 0.15), transparent) !important;
  border-left: 2px solid #00ffc8 !important;
  color: #00ffc8 !important;
  box-shadow: none !important;
}

.sidebar-new .nav-link.active::before {
  display: none !important;
}

.sidebar-new .nav-link.active svg,
.nav-item.active .nav-item-icon {
  color: #00ffc8 !important;
  filter: drop-shadow(0 0 6px rgba(0, 255, 200, 0.4));
}

.nav-badge {
  background: rgba(0, 255, 200, 0.12) !important;
  border: 1px solid rgba(0, 255, 200, 0.2) !important;
  color: #00ffc8 !important;
  border-radius: 0.5rem !important;
  font-family: var(--mono) !important;
}

/* ── Topbar v0 ── */
.topbar {
  height: 72px !important;
  padding: 0 1.5rem !important;
  background: rgba(10, 10, 15, 0.65) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.brand,
.topbar .brand {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 1rem !important;
  letter-spacing: 0.15em !important;
}

.topbar-chip {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 0.75rem !important;
  padding: 6px 14px !important;
  font-family: var(--mono) !important;
}

.dot-live {
  background: #00ff88 !important;
  box-shadow: 0 0 8px #00ff88 !important;
}

.page-title {
  font-family: 'Space Grotesk', sans-serif !important;
  letter-spacing: 0.25em !important;
  color: rgba(255, 255, 255, 0.35) !important;
}

/* ── Panels / cards (glass) ── */
.panel,
.glass-card,
.widget,
.card {
  background: rgba(255, 255, 255, 0.02) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: var(--radius) !important;
  box-shadow: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.panel:hover {
  box-shadow: var(--glow-cyan) !important;
}

.panel-hdr,
.panel-title {
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
}

.panel-title {
  color: var(--text) !important;
}

/* ── Stat / metric tiles ── */
.m-val, .stat-val, .metric-val {
  font-family: var(--mono) !important;
  font-weight: 600 !important;
  color: #00ffc8 !important;
}

.m-lbl, .stat-lbl, .label {
  font-size: 0.65rem !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  color: var(--text-dim) !important;
}

/* ── Buttons ── */
.btn, button:not(.nav-link):not(.lock-btn) {
  border-radius: 0.75rem !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

.btn.bc, .btn-primary, button.primary {
  background: linear-gradient(135deg, rgba(0, 255, 200, 0.2), rgba(0, 170, 255, 0.15)) !important;
  border: 1px solid rgba(0, 255, 200, 0.35) !important;
  color: #00ffc8 !important;
}

.btn.bc:hover, .btn-primary:hover {
  box-shadow: var(--glow-cyan) !important;
  filter: brightness(1.08);
}

/* ── Tables ── */
.tbl th, table th {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--text-dim) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.tbl tr:hover td, table tr:hover td {
  background: rgba(0, 255, 200, 0.04) !important;
}

/* ── Inputs ── */
.inp, input, select, textarea {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0.75rem !important;
  color: var(--text) !important;
}

.inp:focus, input:focus, select:focus, textarea:focus {
  border-color: rgba(0, 255, 200, 0.4) !important;
  box-shadow: 0 0 0 2px rgba(0, 255, 200, 0.1) !important;
  outline: none !important;
}

/* ── Toast ── */
#toast, .toast {
  border-radius: 1rem !important;
  backdrop-filter: blur(12px) !important;
  font-family: 'Outfit', sans-serif !important;
}

/* ── Scrollbar v0 ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

/* ── Main content offset for wider sidebar ── */
.main {
  margin-left: 0 !important;
}

@media (min-width: 1024px) {
  .layout { padding-left: 0; }
}

/* ── Pulse glow (status dots) ── */
@keyframes pulse-glow-v0 {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px currentColor; }
  50% { opacity: 0.65; box-shadow: 0 0 10px currentColor; }
}
.dot-live, .status-dot.active {
  animation: pulse-glow-v0 2s ease-in-out infinite !important;
}

/* ── Agent page accents ── */
#page-assistant .panel-hdr { border-left: 3px solid #00aaff; }
#page-trading .panel-hdr { border-left: 3px solid #00ff88; }
#page-tiktok .panel-hdr { border-left: 3px solid #ff00aa; }
#page-devops .panel-hdr { border-left: 3px solid #ffaa00; }

/* ── Mobile: preserve usability (drawer rules live in blendion-v0-mobile.css) ── */
@media (max-width: 768px) {
  :root { --sidebar: 100%; }
  .topbar { height: auto !important; min-height: 56px !important; flex-wrap: wrap !important; }
}
