/* ==========================================================================
   FX SCALP AI 2.0 · INSTITUTIONAL / WORLD-CLASS FINTECH THEME
   Super Premium Glassmorphic Dark Architecture with Atmospheric Lighting
   ========================================================================== */

:root {
  /* Surface colors */
  --bg: #05070b;
  --bg-deep: #020408;
  --bg-surface: rgba(11, 15, 23, 0.78);
  --bg-surface-elevated: rgba(16, 22, 34, 0.85);
  --panel: rgba(13, 18, 28, 0.74);
  --panel-2: rgba(17, 24, 38, 0.65);
  --panel-solid: #0d121c;

  /* Line & borders */
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-highlight: rgba(255, 255, 255, 0.2);
  --line-accent: rgba(34, 211, 238, 0.4);

  /* Typography */
  --text: #f1f5f9;
  --text-bright: #ffffff;
  --muted: #94a3b8;
  --muted-2: #64748b;

  /* Premium Accents & Indicators */
  --accent: #22d3ee;
  --accent-hover: #38bdf8;
  --accent-dim: #0891b2;
  --accent-2: rgba(34, 211, 238, 0.12);
  --accent-glow: 0 0 20px -2px rgba(34, 211, 238, 0.35);

  --green: #10b981;
  --green-bright: #34d399;
  --green-2: rgba(16, 185, 129, 0.12);
  --green-glow: 0 0 16px -2px rgba(52, 211, 153, 0.3);

  --red: #f43f5e;
  --red-bright: #fb7185;
  --red-2: rgba(244, 63, 94, 0.12);
  --red-glow: 0 0 16px -2px rgba(244, 63, 94, 0.3);

  --amber: #f59e0b;
  --amber-bright: #fbbf24;
  --amber-2: rgba(245, 158, 11, 0.12);
  --amber-glow: 0 0 16px -2px rgba(245, 158, 11, 0.3);

  --blue: #38bdf8;
  --blue-2: rgba(56, 189, 248, 0.12);

  /* Font Families */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* Shadows */
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5), 0 1px 2px 0 rgba(0, 0, 0, 0.3), inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  --card-shadow-hover: 0 12px 32px -4px rgba(0, 0, 0, 0.7), 0 0 20px -2px rgba(34, 211, 238, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-image:
    /* High-tech micro-dot matrix */
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    /* Atmospheric Cyan Light Aura (top-left) */
    radial-gradient(ellipse 1100px 650px at 15% -8%, rgba(34, 211, 238, 0.11), transparent 65%),
    /* Deep Indigo Light Aura (top-right) */
    radial-gradient(ellipse 950px 650px at 85% 12%, rgba(99, 102, 241, 0.08), transparent 60%),
    /* Oceanic Ambient Floor Glow (bottom) */
    radial-gradient(ellipse 1200px 500px at 50% 100%, rgba(14, 165, 233, 0.05), transparent 70%);
  background-size: 32px 32px, auto, auto, auto;
  background-attachment: fixed;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.4);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

code {
  font-family: var(--mono);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  font-size: 0.84em;
  color: #e2e8f0;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   LAYOUT ARCHITECTURE
   ========================================================================== */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex: 0 0 240px;
  background: rgba(9, 13, 20, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
  box-shadow: 4px 0 24px -2px rgba(0, 0, 0, 0.45);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.96rem;
  color: var(--text-bright);
  padding: 0.4rem 0.5rem 1.4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.8rem;
}

.logo-mark {
  width: 12px;
  height: 12px;
  border-radius: 3.5px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.7);
  display: inline-block;
  flex-shrink: 0;
  position: relative;
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
}

.logo-ver {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-2);
  border: 1px solid rgba(34, 211, 238, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font);
}

.nav-btn i {
  width: 18px;
  text-align: center;
  color: var(--muted-2);
  font-size: 0.95rem;
  transition: color 0.18s;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-bright);
  border-color: rgba(255, 255, 255, 0.06);
}

.nav-btn:hover i {
  color: var(--accent);
}

.nav-btn.active {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.14) 0%, rgba(34, 211, 238, 0.03) 100%);
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.35);
  border-left: 3px solid var(--accent);
  font-weight: 600;
  box-shadow: inset 0 0 14px rgba(34, 211, 238, 0.06);
}

.nav-btn.active i {
  color: var(--accent);
}

.sidebar-foot {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.session-chip {
  background: rgba(56, 189, 248, 0.09);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.side-clocks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
  padding: 0;
  background: transparent;
  border: none;
}

.clock-tile {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}

.clock-tile:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.clock-tile.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12) 0%, rgba(14, 165, 233, 0.04) 100%);
  border: 1px solid rgba(34, 211, 238, 0.38);
  box-shadow: 0 2px 10px -2px rgba(34, 211, 238, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.clock-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.clock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.4);
  flex-shrink: 0;
}

.clock-dot.live {
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
  animation: pulseDot 2s infinite ease-in-out;
}

.clock-city {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-bright);
}

.clock-tile.active .clock-city {
  color: #38bdf8;
}

.clock-tz {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted-2);
  margin-left: auto;
  letter-spacing: 0.02em;
}

.clock-tile.active .clock-tz {
  color: #7dd3fc;
  font-weight: 600;
}

.clock-time {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.clock-tile.active .clock-time {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

.side-meta {
  font-size: 0.72rem;
  color: var(--muted-2);
  padding: 0 0.2rem;
}

.content {
  flex: 1;
  min-width: 0;
  padding: 1.3rem 1.8rem 2.5rem;
}

/* ==========================================================================
   TOPBAR COMMAND CONSOLE
   ========================================================================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  background: var(--panel);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--line);
  border-top-color: var(--line-highlight);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  box-shadow: var(--card-shadow);
  flex-wrap: wrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

/* Environment Pill */
.env-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
  cursor: help;
  transition: all 0.2s;
}

.env-pill.practice {
  background: rgba(16, 185, 129, 0.14);
  color: var(--green-bright);
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 16px -2px rgba(16, 185, 129, 0.25);
}

.env-pill.live {
  background: rgba(244, 63, 94, 0.16);
  color: var(--red-bright);
  border-color: rgba(244, 63, 94, 0.55);
  box-shadow: 0 0 20px -2px rgba(244, 63, 94, 0.4);
}

.env-selector-top {
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.env-selector-top.practice-selected {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.env-selector-top.live-selected {
  background: rgba(244, 63, 94, 0.16);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.6);
  animation: live-pulse-border 2s infinite ease-in-out;
}

@keyframes live-pulse-border {
  0%, 100% { box-shadow: 0 0 10px rgba(244, 63, 94, 0.3); border-color: rgba(244, 63, 94, 0.6); }
  50% { box-shadow: 0 0 20px rgba(244, 63, 94, 0.6); border-color: rgba(244, 63, 94, 0.9); }
}

/* Mode Pill */
.mode-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  border: 1px solid var(--line-2);
  transition: all 0.2s;
}

.mode-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

.mode-pill.auto {
  color: var(--green-bright);
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(52, 211, 153, 0.45);
}
.mode-pill.auto .dot {
  background: var(--green-bright);
  box-shadow: 0 0 10px var(--green-bright);
}

.mode-pill.paper {
  color: var(--blue);
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(96, 165, 250, 0.45);
}
.mode-pill.paper .dot {
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
}

.mode-pill.paused {
  color: var(--amber-bright);
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(251, 191, 36, 0.4);
}
.mode-pill.paused .dot {
  background: var(--amber-bright);
  box-shadow: 0 0 10px var(--amber-bright);
}

.mode-pill.killed {
  color: var(--red-bright);
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.6);
  box-shadow: 0 0 16px -2px rgba(244, 63, 94, 0.35);
}
.mode-pill.killed .dot {
  background: var(--red-bright);
  box-shadow: 0 0 10px var(--red-bright);
}

/* Micro KPI Tiles in Topbar */
.top-kpi {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.top-kpi .k {
  font-size: 0.64rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
}

.top-kpi .v {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
}

/* Select Dropdown */
.select {
  background: #0d121c;
  color: var(--text);
  border: 1px solid var(--line-2);
  padding: 0.52rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

/* ==========================================================================
   BUTTONS (TACTILE & WORLD-CLASS)
   ========================================================================== */
.btn {
  padding: 0.52rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font);
  text-decoration: none;
  user-select: none;
  position: relative;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
  color: #041014;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.26) 100%);
  color: var(--green-bright);
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(52, 211, 153, 0.25);
}
.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.32) 0%, rgba(5, 150, 105, 0.4) 100%);
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow: 0 0 16px -2px rgba(52, 211, 153, 0.4);
  transform: translateY(-1px);
}

.btn-warn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.26) 100%);
  color: var(--amber-bright);
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(251, 191, 36, 0.25);
}
.btn-warn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.38) 100%);
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 0 16px -2px rgba(251, 191, 36, 0.4);
  transform: translateY(-1px);
}

.btn-kill {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.08em;
  font-weight: 700;
  box-shadow: 0 0 20px -2px rgba(239, 68, 68, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.btn-kill:hover:not(:disabled) {
  filter: brightness(1.15);
  box-shadow: 0 0 28px -2px rgba(239, 68, 68, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-bright);
  border-color: var(--line-2);
}

.btn-danger {
  background: var(--red-2);
  color: var(--red-bright);
  border-color: rgba(244, 63, 94, 0.4);
}

.btn-sm {
  padding: 0.36rem 0.72rem;
  font-size: 0.78rem;
  border-radius: 6px;
}

.w-100 {
  width: 100%;
  justify-content: center;
}

.row-gap {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   TABS
   ========================================================================== */
.tab {
  display: none;
  animation: tabFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.tab.active {
  display: block;
}

@keyframes tabFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   BANNERS
   ========================================================================== */
.banner {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  padding: 1rem 1.3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  border-top-color: var(--line-highlight);
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  margin-bottom: 1.25rem;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
}

.banner-icon {
  font-size: 1.55rem;
  width: 44px;
  text-align: center;
  flex-shrink: 0;
}

.banner-body {
  flex: 1;
  min-width: 0;
}

.banner-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
  color: var(--text-bright);
}

.banner-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.banner-side {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.banner.ok {
  border-color: rgba(52, 211, 153, 0.35);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12) 0%, var(--panel) 80%);
}
.banner.ok::before { background: var(--green-bright); }
.banner.ok .banner-icon { color: var(--green-bright); text-shadow: 0 0 12px rgba(52, 211, 153, 0.4); }

.banner.info {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.12) 0%, var(--panel) 80%);
}
.banner.info::before { background: var(--blue); }
.banner.info .banner-icon { color: var(--blue); text-shadow: 0 0 12px rgba(56, 189, 248, 0.4); }

.banner.warn {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, var(--panel) 80%);
}
.banner.warn::before { background: var(--amber-bright); }
.banner.warn .banner-icon { color: var(--amber-bright); text-shadow: 0 0 12px rgba(251, 191, 36, 0.4); }

.banner.danger {
  border-color: rgba(244, 63, 94, 0.45);
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.14) 0%, var(--panel) 80%);
}
.banner.danger::before { background: var(--red-bright); }
.banner.danger .banner-icon { color: var(--red-bright); text-shadow: 0 0 12px rgba(244, 63, 94, 0.4); }

.banner.wait {
  border-color: rgba(34, 211, 238, 0.35);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.1) 0%, var(--panel) 80%);
}
.banner.wait::before { background: var(--accent); }
.banner.wait .banner-icon { color: var(--accent); text-shadow: 0 0 12px rgba(34, 211, 238, 0.4); }

/* ==========================================================================
   KPI CARDS & PERFORMANCE METRICS
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.kpi {
  background: linear-gradient(180deg, rgba(20, 26, 38, 0.75) 0%, rgba(13, 17, 26, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow: var(--card-shadow);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.kpi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}

.kpi:hover {
  border-color: rgba(34, 211, 238, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.kpi-k {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.kpi-v {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-bright);
}

.kpi-s {
  font-size: 0.74rem;
  color: var(--muted-2);
  margin-top: 0.35rem;
}

.meter {
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  margin-top: 0.6rem;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), #6366f1);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
  transition: width 0.4s ease;
}

.meter-fill.warn {
  background: linear-gradient(90deg, var(--amber-bright), #ea580c);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}
.meter-fill.danger {
  background: linear-gradient(90deg, #ea580c, var(--red-bright));
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
}
.meter-fill.good {
  background: linear-gradient(90deg, var(--green-bright), var(--accent));
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

/* ==========================================================================
   PANELS & CONTAINERS
   ========================================================================== */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top-color: var(--line-highlight);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: var(--card-shadow);
  position: relative;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.panel h3 {
  font-size: 0.98rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-bright);
}

.panel h3 i {
  color: var(--accent);
}

.sub {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
}

.lead {
  color: #cbd5e1;
  font-size: 0.96rem;
  line-height: 1.55;
  margin-bottom: 0.8rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }

.empty {
  padding: 1.3rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.15);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.gap { gap: 0.8rem; }

@media (max-width: 1100px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .sidebar { width: 210px; flex-basis: 210px; }
  .pipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
}

/* Status Chips */
.chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  text-transform: uppercase;
  border: 1px solid transparent;
}

.chip.ok {
  background: var(--green-2);
  color: var(--green-bright);
  border-color: rgba(52, 211, 153, 0.3);
}
.chip.warn {
  background: var(--amber-2);
  color: var(--amber-bright);
  border-color: rgba(251, 191, 36, 0.3);
}
.chip.danger {
  background: var(--red-2);
  color: var(--red-bright);
  border-color: rgba(244, 63, 94, 0.35);
}
.chip.info {
  background: rgba(56, 189, 248, 0.12);
  color: var(--blue);
  border-color: rgba(56, 189, 248, 0.3);
}
.chip.accent {
  background: var(--accent-2);
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.35);
}

/* ==========================================================================
   DECISION PIPELINE (INSTITUTIONAL EXECUTION & RISK ENGINE BAR)
   ========================================================================== */
#pipeline-panel {
  position: relative;
  background: radial-gradient(120% 120% at 50% 0%, rgba(34, 211, 238, 0.04) 0%, rgba(13, 17, 27, 0.7) 100%), var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.55), 0 0 20px -5px rgba(34, 211, 238, 0.08);
}

#pipeline-panel h3 i {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.7);
  animation: pulseIcon 2.8s infinite ease-in-out;
}

#pipe-stage {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.18);
  text-transform: uppercase;
}

#pipe-message {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.08) 0%, rgba(15, 23, 42, 0.55) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1.15rem;
  margin: 0.35rem 0 1.15rem 0;
  color: var(--text-bright);
  font-size: 0.88rem;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  word-break: break-word;
  overflow-wrap: break-word;
}

.pipe-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}

.pipe-step {
  background: linear-gradient(180deg, rgba(20, 27, 40, 0.82) 0%, rgba(12, 16, 25, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.pipe-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.25), transparent);
}

.pipe-step:hover {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 8px 24px -2px rgba(0, 0, 0, 0.65), 0 0 18px -2px rgba(34, 211, 238, 0.14);
  transform: translateY(-2px);
}

.pipe-k {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.pipe-v {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: break-word;
}

.pipe-v.mono {
  font-family: var(--mono);
}

#pipe-cand {
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.02em;
}

#pipe-reason {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.22);
  word-break: break-word;
  overflow-wrap: break-word;
}

.pipe-s {
  font-size: 0.74rem;
  color: var(--muted-2);
  margin-top: 0.5rem;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: break-word;
}

.pipe-step .meter {
  margin-top: 0.65rem;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   CIRCUIT BREAKERS
   ========================================================================== */
.brk-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.brk {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(22, 29, 43, 0.7) 0%, rgba(15, 20, 31, 0.8) 100%);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.brk.tripped {
  border-color: rgba(244, 63, 94, 0.5);
  background: rgba(244, 63, 94, 0.09);
  box-shadow: 0 0 16px -2px rgba(244, 63, 94, 0.25);
}

.brk .n { font-weight: 600; color: var(--text-bright); }
.brk .v { font-family: var(--mono); color: var(--text); }
.brk .l { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }

.def-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.86rem;
}

.def {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.52rem 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.def:last-child {
  border-bottom: none;
}

.def:hover {
  background: rgba(255, 255, 255, 0.025);
}

.def .k {
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.def .v {
  font-family: var(--mono);
  text-align: right;
  color: var(--text-bright);
}

/* Institutional styling for Ledger vs Broker Statement */
#ledger-check {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

#ledger-check .def {
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  margin-bottom: 0;
}

#ledger-check .def:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

#ledger-check .def .k {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.86rem;
}

#ledger-check .def .v {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-bright);
}

#ledger-check .chip.ok {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.03em;
  font-size: 0.78rem;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

#ledger-check .chip.danger {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
}

.mini-log {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  max-height: 200px;
  overflow: auto;
  line-height: 1.55;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

/* ==========================================================================
   POSITION GUARDIAN (SUPER PREMIUM INSTITUTIONAL MONITOR)
   ========================================================================== */
#guardian-panel h3 i {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
  animation: pulseIcon 2.5s infinite ease-in-out;
}

@keyframes pulseIcon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.08); }
}

#btn-close-pos {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22) 0%, rgba(185, 28, 28, 0.3) 100%);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#btn-close-pos:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(185, 28, 28, 0.45) 100%);
  border-color: rgba(239, 68, 68, 0.75);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

.guard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (min-width: 1680px) {
  .guard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.guard-box {
  background: linear-gradient(180deg, rgba(20, 27, 40, 0.82) 0%, rgba(12, 16, 25, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-color: rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.guard-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.3), transparent);
}

.guard-box:hover {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.75), 0 0 24px -2px rgba(34, 211, 238, 0.16);
  transform: translateY(-2px);
}

.guard-box .t {
  font-size: 0.76rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.guard-big {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--mono);
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 0.95rem;
}
.guard-big.pos {
  color: #34d399;
  text-shadow: 0 0 20px rgba(52, 211, 153, 0.45);
}
.guard-big.neg {
  color: #fb7185;
  text-shadow: 0 0 20px rgba(244, 63, 94, 0.45);
}

.guard-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
  padding: 0.45rem 0.2rem;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  gap: 1rem;
}
.guard-row:last-child {
  border-bottom: none;
}
.guard-row .k {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.guard-row .mono {
  font-family: var(--mono);
  font-weight: 600;
  text-align: right;
  color: #f8fafc;
}
.guard-row span:not(.k) {
  text-align: right;
}
.guard-row .small {
  font-size: 0.8rem;
  color: #94a3b8;
}

.guard-box .meter {
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0.75rem 0 0.5rem;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.stages {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding-top: 0.6rem;
}

.stage {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 0.5rem 0.4rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  transition: all 0.2s ease;
}
.stage.done {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.26) 100%);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 12px -2px rgba(52, 211, 153, 0.3);
}
.stage.now {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.24) 0%, rgba(6, 182, 212, 0.18) 100%);
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 14px -2px rgba(34, 211, 238, 0.35);
  position: relative;
}

/* ==========================================================================
   TABLES & FINANCIAL LEDGER
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3);
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.tbl th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--line-2);
  background: rgba(13, 17, 26, 0.95);
  white-space: nowrap;
}

.tbl td {
  padding: 0.58rem 0.7rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #e2e8f0;
}

.tbl tbody tr {
  transition: background 0.15s ease;
}
.tbl tbody tr:hover {
  background: rgba(34, 211, 238, 0.035);
}

.tbl .num {
  font-family: var(--mono);
}

.tbl-matrix tr.row-detail td {
  white-space: normal;
  background: rgba(34, 211, 238, 0.05);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  border-left: 3px solid var(--accent);
}
.tbl-matrix tr.clickable { cursor: pointer; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.badge-buy { background: var(--green-2); color: var(--green-bright); border: 1px solid rgba(52, 211, 153, 0.35); }
.badge-sell { background: var(--red-2); color: var(--red-bright); border: 1px solid rgba(244, 63, 94, 0.35); }
.badge-wait { background: rgba(148, 163, 184, 0.12); color: var(--muted); border: 1px solid rgba(148, 163, 184, 0.2); }
.badge-bl { background: rgba(92, 104, 119, 0.2); color: var(--muted-2); }

.pos { color: var(--green-bright); font-weight: 600; }
.neg { color: var(--red-bright); font-weight: 600; }
.warn { color: var(--amber-bright); font-weight: 600; }
.acc { color: var(--accent); font-weight: 600; }

/* Filter Chips */
.filter-chip {
  padding: 0.36rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  border: 1px solid var(--line);
  transition: all 0.18s ease;
  user-select: none;
}
.filter-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-bright);
  border-color: var(--line-2);
}
.filter-chip.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22) 0%, rgba(6, 182, 212, 0.14) 100%);
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 12px -2px rgba(34, 211, 238, 0.25);
}

.bar {
  display: inline-block;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  width: 70px;
  vertical-align: middle;
  margin-right: 0.4rem;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
label {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin: 0.7rem 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.form-control {
  width: 100%;
  background: #0d121c;
  border: 1px solid var(--line-2);
  color: var(--text-bright);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}
.form-control.sm {
  padding: 0.4rem 0.7rem;
  width: 180px;
  font-size: 0.82rem;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

form .btn {
  margin-top: 1rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.7rem 0;
  cursor: pointer;
}

.pair-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pair-picker .pp {
  padding: 0.32rem 0.6rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: var(--mono);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
}
.pair-picker .pp:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-bright);
}
.pair-picker .pp.on {
  background: var(--accent-2);
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.45);
}
.pair-picker .pp.nodata {
  opacity: 0.4;
  text-decoration: line-through;
}

/* ==========================================================================
   TERMINAL & LOGS
   ========================================================================== */
.terminal {
  background: #030508;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  height: 380px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}

.log-line { color: #94a3b8; white-space: pre-wrap; }
.log-line.err { color: var(--red-bright); }
.log-line.trade { color: var(--green-bright); }
.log-line.warn { color: var(--amber-bright); }
.log-line.sig { color: var(--accent); }

/* Charts & Heatmap */
.chart-box {
  position: relative;
  height: 280px;
  margin: 0.8rem 0 1.2rem;
}

.heat {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.4rem;
}
.heat .cell {
  padding: 0.55rem 0.45rem;
  border-radius: 6px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.74rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   MODAL & TOAST NOTIFICATIONS
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: modalFade 0.2s ease;
}

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

.modal-card {
  background: linear-gradient(180deg, #131924 0%, #0c1018 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
  width: min(540px, 92vw);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.7), 0 0 30px rgba(34, 211, 238, 0.12);
}

.modal-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--text-bright);
}

.modal-body {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.toast {
  position: fixed;
  bottom: 1.4rem;
  right: 1.4rem;
  background: #111722;
  border: 1px solid var(--line-2);
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  z-index: 110;
  max-width: 440px;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.6);
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toast.err { border-left-color: var(--red-bright); }
.toast.ok { border-left-color: var(--green-bright); }

/* ==========================================================================
   LOGIN EXPERIENCE (WORLD-CLASS ENTRANCE)
   ========================================================================== */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.login-card {
  background: linear-gradient(180deg, rgba(17, 24, 38, 0.85) 0%, rgba(10, 14, 23, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 2.4rem 2.5rem;
  width: min(440px, 92vw);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    0 35px 80px -10px rgba(0, 0, 0, 0.7),
    0 0 40px -8px rgba(34, 211, 238, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 1.15rem;
  color: var(--text-bright);
}

.login-sub {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 0.45rem 0 1.35rem;
  line-height: 1.5;
}

.login-error {
  margin-top: 0.9rem;
  color: var(--red-bright);
  font-size: 0.86rem;
  background: var(--red-2);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.login-ok {
  margin-top: 0.9rem;
  color: #34d399;
  font-size: 0.86rem;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.unlock-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  margin-bottom: 1.2rem;
}

.unlock-banner {
  color: #f87171;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sec-q-label {
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.5rem;
  font-weight: 600;
}

.sec-q-text {
  font-size: 0.92rem;
  color: var(--text-bright);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0.25rem 0 0.7rem;
}

.login-foot {
  margin-top: 1.4rem;
  font-size: 0.74rem;
  color: var(--muted-2);
  line-height: 1.55;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE OVERHAULS (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  html, body {
    font-size: 14px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
  }

  .app {
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .sidebar {
    width: 100%;
    max-width: 100vw;
    flex: 0 0 auto;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 0.65rem 0.85rem 0.45rem;
    box-sizing: border-box;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }

  .sidebar .logo {
    padding: 0.2rem 0.2rem 0.45rem;
    font-size: 0.94rem;
    margin-bottom: 0.4rem;
  }

  .sidebar .nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
    padding: 0.25rem 0 0.55rem;
    scrollbar-width: none;
  }
  .sidebar .nav::-webkit-scrollbar { display: none; }

  .sidebar .nav-btn {
    white-space: nowrap;
    flex: 0 0 auto;
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    min-height: 38px;
  }
  .sidebar .nav-btn.active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.2) 0%, rgba(34, 211, 238, 0.08) 100%);
    color: var(--accent);
    border-color: rgba(34, 211, 238, 0.45);
    border-left: 1px solid rgba(34, 211, 238, 0.45);
  }

  .sidebar-foot {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    padding-top: 0.45rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--line);
  }
  .sidebar-foot .side-clocks { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; gap: 0.35rem; }
  .sidebar-foot .side-meta { font-size: 0.7rem; }
  .sidebar-foot #btn-logout { width: auto; padding: 0.32rem 0.8rem; font-size: 0.76rem; }

  .content {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
    padding: 0.8rem 0.75rem 2.5rem;
    box-sizing: border-box;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    margin-bottom: 0.95rem;
    width: 100%;
    box-sizing: border-box;
  }

  .topbar-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    width: 100%;
  }

  .topbar-left .env-pill, .topbar-left .mode-pill {
    padding: 0.4rem 0.75rem;
    font-size: 0.76rem;
    flex: 1 1 calc(50% - 0.45rem);
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
  }

  .topbar-left .top-kpi {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    min-width: 70px;
    flex: 1 1 calc(33.33% - 0.5rem);
    box-sizing: border-box;
  }
  .topbar-left .top-kpi .k { font-size: 0.62rem; }
  .topbar-left .top-kpi .v { font-size: 0.9rem; }

  .topbar-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
  }
  .topbar-right #mode-selector {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
    font-size: 16px;
    padding: 0.55rem 0.8rem;
    box-sizing: border-box;
  }
  .topbar-right #btn-start {
    min-height: 44px;
    justify-content: center;
    font-size: 0.9rem;
  }
  .topbar-right #btn-pause {
    min-height: 44px;
    justify-content: center;
    font-size: 0.9rem;
  }
  .topbar-right #btn-kill {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
    justify-content: center;
    font-size: 0.94rem;
    letter-spacing: 0.08em;
  }

  .banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 0.95rem;
    width: 100%;
    box-sizing: border-box;
  }
  .banner-side {
    text-align: left;
    white-space: normal;
    width: 100%;
    word-break: break-word;
    font-size: 0.76rem;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    width: 100%;
    box-sizing: border-box;
  }
  .kpi { padding: 0.75rem 0.85rem; box-sizing: border-box; }
  .kpi-v { font-size: 1.3rem !important; word-break: break-word; }
  .kpi-k { font-size: 0.7rem; }
  .kpi-s { font-size: 0.68rem; }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 0.85rem;
    width: 100%;
    box-sizing: border-box;
  }

  .panel {
    min-width: 0;
    max-width: 100%;
    padding: 0.95rem 0.9rem;
    margin-bottom: 0.95rem;
    box-sizing: border-box;
  }
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }
  .panel-head .row-gap {
    width: 100%;
    gap: 0.45rem;
  }
  .form-control.sm {
    width: 100% !important;
    min-height: 42px;
    font-size: 16px !important;
    box-sizing: border-box;
  }
  .filter-chip {
    padding: 0.38rem 0.75rem;
    font-size: 0.76rem;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .pipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .pipe-step { padding: 0.85rem 0.95rem; }
  .pipe-v { font-size: 1.15rem; }
  #pipe-reason { font-size: 0.98rem; }

  .guard-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .guard-big { font-size: 1.4rem; }
  .guard-row { font-size: 0.84rem; }

  .brk {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.35rem 0.55rem;
    padding: 0.7rem 0.85rem;
    align-items: center;
  }
  .brk .n { grid-column: 1; grid-row: 1; font-weight: 600; }
  .brk .chip { grid-column: 2; grid-row: 1; justify-self: end; }
  .brk .v { grid-column: 1; grid-row: 2; font-family: var(--mono); font-size: 0.8rem; }
  .brk .l { grid-column: 2; grid-row: 2; justify-self: end; font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }

  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    box-sizing: border-box;
    scrollbar-width: thin;
  }
  .tbl { font-size: 0.8rem; min-width: 580px; }
  .tbl th, .tbl td { padding: 0.48rem 0.48rem; }

  .modal-card, .modal-card.wide {
    width: 95vw !important;
    max-width: 95vw !important;
    padding: 1.2rem 1.1rem;
    max-height: 88vh;
    overflow-y: auto;
    box-sizing: border-box;
  }
  .modal-actions {
    flex-direction: column-reverse;
    gap: 0.55rem;
    width: 100%;
  }
  .modal-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .toast {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.85rem;
    max-width: none;
    width: auto;
    padding: 0.8rem 1.1rem;
    font-size: 0.88rem;
    text-align: center;
  }

  .form-control {
    font-size: 16px !important;
    min-height: 44px;
    box-sizing: border-box;
  }
  form .btn {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    font-size: 0.94rem;
  }

  .terminal {
    height: 280px;
    font-size: 0.72rem;
    padding: 0.7rem;
    word-break: break-all;
  }
  .mini-log {
    max-height: 160px;
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  html, body { font-size: 13.5px; }
  .login-body { padding: 1rem 0.75rem; }
  .login-card { padding: 1.6rem 1.3rem; width: 100%; border-radius: var(--radius-lg); }
  .login-card .form-control { font-size: 16px !important; min-height: 46px; }
  .login-card .btn { min-height: 48px; font-size: 0.96rem; }
  .login-foot { word-break: break-all; font-size: 0.72rem; }
  .pipe-grid { grid-template-columns: 1fr; gap: 0.65rem; }
  .pipe-step { padding: 0.85rem 1rem; }
  #ledger-check .def { padding: 0.55rem 0.65rem; gap: 0.5rem; }
  #ledger-check .def .k { font-size: 0.8rem; }
  #ledger-check .def .v { font-size: 0.82rem; }
  .sidebar-foot .side-clocks { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 360px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .pipe-grid { grid-template-columns: 1fr; }
  .topbar-left .env-pill, .topbar-left .mode-pill { flex: 1 1 100%; }
  .topbar-left .top-kpi { flex: 1 1 calc(50% - 0.4rem); }
  #ledger-check .def { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  #ledger-check .def .v { align-self: flex-end; }
}

/* ==========================================================================
   SUPER UI CARDS · CAPITAL ALLOCATION & LIVE PRODUCTION GATEWAY
   ========================================================================== */
.super-card {
  border: 1px solid rgba(34, 211, 238, 0.25) !important;
  background: linear-gradient(135deg, rgba(14, 22, 36, 0.88), rgba(9, 13, 22, 0.94)) !important;
  box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.7), 0 0 24px -6px rgba(34, 211, 238, 0.15) !important;
  margin-bottom: 1.5rem;
}

.risk-alloc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

@media (max-width: 1080px) {
  .risk-alloc-grid { grid-template-columns: 1fr; }
}

.risk-alloc-box {
  background: rgba(16, 24, 38, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.risk-alloc-box:hover {
  border-color: var(--line-2);
  background: rgba(18, 28, 44, 0.75);
}

.risk-alloc-box.matrix-box {
  background: linear-gradient(180deg, rgba(18, 30, 48, 0.7), rgba(11, 18, 30, 0.8));
  border-color: rgba(34, 211, 238, 0.2);
}

.box-title {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.alloc-mode-selector {
  background: rgba(10, 15, 25, 0.6);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.toggle-control {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.toggle-control input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.toggle-label {
  font-size: 0.92rem;
  color: var(--text-bright);
}

.text-secondary {
  color: var(--muted);
  line-height: 1.4;
  margin-top: 0.35rem;
}

.risk-chips-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.risk-chip {
  background: rgba(22, 33, 50, 0.7);
  border: 1px solid var(--line-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--mono);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.risk-chip .chip-sub {
  font-size: 0.68rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.risk-chip:hover {
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--accent);
  color: var(--accent-hover);
  transform: translateY(-1px);
}

.risk-chip.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(14, 165, 233, 0.15));
  border-color: var(--accent);
  color: var(--accent-hover);
  box-shadow: 0 0 16px -2px rgba(34, 211, 238, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.risk-chip.active .chip-sub {
  color: var(--text-bright);
}

.input-prefix-wrap, .input-suffix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix, .input-suffix {
  position: absolute;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  pointer-events: none;
}

.input-prefix { left: 0.75rem; }
.input-prefix-wrap input { padding-left: 1.8rem; }

.input-suffix { right: 0.75rem; }
.input-suffix-wrap input { padding-right: 1.8rem; }

.projection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  background: rgba(8, 12, 20, 0.65);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.proj-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.proj-k {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.proj-v {
  font-size: 0.98rem;
  font-weight: 700;
}

/* Live Production Gateway Card */
.live-secrets-card {
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.live-env-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin-bottom: 1.25rem;
}

.live-env-banner.live-mode {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.35);
}

.env-banner-icon {
  font-size: 1.5rem;
  color: var(--green-bright);
}

.live-env-banner.live-mode .env-banner-icon {
  color: var(--red-bright);
}

.env-banner-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-bright);
  letter-spacing: 0.03em;
}

.env-banner-sub {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  padding-right: 2.6rem;
}

.btn-toggle-pw {
  position: absolute;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.btn-toggle-pw:hover {
  color: var(--accent);
}

.card-divider {
  border: 0;
  height: 1px;
  background: var(--line-2);
  margin: 1.25rem 0;
}

.live-verify-box {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.live-verify-box.error {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.3);
}

.verify-head {
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.verify-details {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
}

.env-switcher-section {
  padding: 0.5rem 0;
}

.env-switch-box {
  background: rgba(14, 20, 32, 0.6);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.env-switch-box.live-active {
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(30, 14, 20, 0.5);
}

.badge-practice {
  background: rgba(16, 185, 129, 0.2);
  color: var(--green-bright);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-live {
  background: rgba(244, 63, 94, 0.25);
  color: var(--red-bright);
  border: 1px solid rgba(244, 63, 94, 0.5);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(244, 63, 94, 0.5); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4); }
  50% { border-color: rgba(244, 63, 94, 0.9); box-shadow: 0 0 12px 2px rgba(244, 63, 94, 0.3); }
}
