/* =========================================================
   Brainix — Global Styles
   Dark fintech / cyberpunk theme layered on top of Tailwind
   ========================================================= */

html { scroll-behavior: smooth; }

body.grid-bg {
  background-color: #0B0F17;
  background-image:
    linear-gradient(rgba(0,229,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center top;
}

body.grid-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(600px 400px at 15% -5%, rgba(0,229,255,0.14), transparent 70%),
    radial-gradient(700px 500px at 100% 10%, rgba(124,92,255,0.12), transparent 70%);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0B0F17; }
::-webkit-scrollbar-thumb { background: #1c2536; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #263252; }

/* Glassmorphism card */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.glass-hover { transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.glass-hover:hover {
  border-color: rgba(0,229,255,0.35);
  box-shadow: 0 0 30px rgba(0,229,255,0.12);
  transform: translateY(-2px);
}

/* Glow text / borders */
.text-glow { text-shadow: 0 0 18px rgba(0,229,255,0.55); }
.border-glow { box-shadow: 0 0 0 1px rgba(0,229,255,0.35), 0 0 24px rgba(0,229,255,0.15); }

.btn-glow {
  box-shadow: 0 0 0 1px rgba(0,229,255,0.5), 0 0 22px rgba(0,229,255,0.35);
  transition: box-shadow .25s ease, transform .15s ease;
}
.btn-glow:hover { box-shadow: 0 0 0 1px rgba(0,229,255,0.8), 0 0 34px rgba(0,229,255,0.55); transform: translateY(-1px); }

/* Focus ring across inputs */
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,229,255,0.45);
}

/* Status dots */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-online { background: #22C55E; box-shadow: 0 0 8px #22C55E; }
.dot-degraded { background: #F59E0B; box-shadow: 0 0 8px #F59E0B; }
.dot-offline { background: #EF4444; box-shadow: 0 0 8px #EF4444; }

/* Terminal window */
.terminal {
  background: #0A0E16;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 0 60px -10px rgba(0,229,255,0.15);
}
.terminal-bar { background: #111828; border-bottom: 1px solid rgba(255,255,255,0.06); }
.terminal pre code { font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.7; }
.tok-key { color: #7C5CFF; }
.tok-str { color: #22C55E; }
.tok-fn  { color: #00E5FF; }
.tok-com { color: #566073; }
.tok-num { color: #F59E0B; }

/* Table row hover */
.tbl-row { transition: background-color .15s ease; }
.tbl-row:hover { background: rgba(255,255,255,0.03); }

/* Masked API key font */
.key-mono { font-family: 'JetBrains Mono', monospace; letter-spacing: .02em; }

/* Sidebar active link */
.nav-link { position: relative; }
.nav-link.active { color: #fff; background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.25); }
.nav-link.active::before {
  content: "";
  position: absolute; left: -1px; top: 8px; bottom: 8px; width: 3px;
  background: #00E5FF; border-radius: 3px; box-shadow: 0 0 8px #00E5FF;
}

/* Toggle switch */
.switch { width: 44px; height: 24px; border-radius: 999px; background: #1c2536; position: relative; cursor: pointer; transition: background .2s; border: 1px solid rgba(255,255,255,0.08); }
.switch.on { background: rgba(0,229,255,0.25); border-color: rgba(0,229,255,0.5); }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #8792A6; transition: transform .2s, background .2s; }
.switch.on .knob { transform: translateX(20px); background: #00E5FF; box-shadow: 0 0 8px #00E5FF; }

/* Fade-up animation */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp .6s ease both; }

/* Marquee logos (optional trust bar) */
.badge-soft { background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.25); color: #00E5FF; }

/* Chart placeholder gradient bars */
.bar-grad { background: linear-gradient(180deg, #00E5FF, rgba(0,229,255,0.05)); border-radius: 4px 4px 0 0; }
