/* ==============================================================================
   HedgeFunded.uz — Institutional Design System (app.hedgefunded.uz Admin)
   Exact match with hedgefunded.uz brand guidelines and executive standards
   ============================================================================== */

:root {
  color-scheme: light;
  --ink: #182230;
  --ink-secondary: #344054;
  --muted: #667085;
  --muted-light: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --bg: #f6f8fb;
  --bg-subtle: #f8f9fc;
  --navy: #152b49;
  --navy-hover: #1e3a63;
  --navy-active: #0f1f35;
  --accent: #152b49;
  --gold: #d4af37;
  --gold-hover: #b89726;
  --gold-bg: #fffbf0;
  --gold-line: #f4e5a9;
  --gold-ink: #8a6a00;
  --safe-bg: #eef8f1;
  --safe-ink: #166534;
  --safe-line: #ccebd6;
  --warn-bg: #fff9eb;
  --warn-ink: #7a4b00;
  --warn-line: #f0d8a8;
  --danger-bg: #fff1f0;
  --danger-ink: #b42318;
  --danger-line: #fecdca;
  --blue-bg: #f0f7ff;
  --blue-ink: #026aa2;
  --blue-line: #b9e6fe;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, 0.05), 0 2px 6px rgba(16, 24, 40, 0.03);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.08), 0 4px 12px rgba(16, 24, 40, 0.04);
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* LAYOUT STRUCTURE */
.layout-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 14px;
  }
}

/* TOP NAVIGATION HEADER (Exact hedgefunded.uz aesthetic) */
header.top-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
  display: flex;
  align-items: center;
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 16px;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Brand Link & Mark */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  min-width: max-content;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--navy);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
  font-size: 13.5px;
  letter-spacing: .04em;
  border: 1px solid rgba(212, 175, 55, 0.38);
  box-shadow: 0 2px 6px rgba(21, 43, 73, 0.16);
  flex-shrink: 0;
}

.brand-text {
  font-size: 16px;
  font-weight: 850;
  letter-spacing: .04em;
  color: var(--ink);
  line-height: 1.2;
}

.brand-text span {
  color: var(--muted);
  font-weight: 700;
}

.brand-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f0f4fa;
  color: var(--navy);
  border: 1px solid #d4deee;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}

.nav-tab {
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
}

.nav-tab.active {
  color: var(--navy);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--line);
  font-weight: 750;
}

.nav-tab .badge-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--blue-bg);
  color: var(--blue-ink);
  font-weight: 700;
}

/* Pulsing Dot badge */
.live-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
}

.live-dot-wrap {
  position: relative;
  width: 8px;
  height: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.live-dot-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #22c55e;
  opacity: .75;
  animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}

.live-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

.user-badge {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.user-avatar-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Hamburger */
.mobile-nav-toggle {
  display: none;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  color: var(--navy);
  cursor: pointer;
  transition: all .15s ease;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-nav-toggle:hover {
  background: var(--bg-subtle);
  border-color: var(--navy);
}

.mobile-drawer {
  display: none;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(21, 43, 73, 0.12);
  position: sticky;
  top: 68px;
  z-index: 99;
}

.mobile-drawer.open {
  display: block;
  animation: drawerSlide .2s ease-out;
}

@keyframes drawerSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-drawer-inner {
  padding: 12px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-secondary);
  transition: all .15s ease;
  text-decoration: none;
}

.mobile-nav-item:hover, .mobile-nav-item.active {
  background: var(--bg-subtle);
  color: var(--navy);
  font-weight: 750;
}

.mobile-drawer-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.25;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
  box-shadow: 0 2px 8px rgba(21, 43, 73, 0.2);
}

.btn-primary:hover {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(21, 43, 73, 0.26);
}

.btn-secondary {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--line-strong);
  background: var(--bg-subtle);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-outline:hover {
  background: #ffffff;
  border-color: var(--line-strong);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger-ink);
  border-color: var(--danger-line);
}

.btn-danger:hover {
  background: #fee4e2;
  border-color: #fecdca;
}

.btn-sm {
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  font-size: 15px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
}

.btn-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* MAIN CONTENT */
main.main-content {
  flex: 1;
  padding: 28px 0 60px;
}

/* PAGE HEADER */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-header-left {
  max-width: 760px;
}

.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 750;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-title {
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -.025em;
  color: var(--ink);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* EXECUTIVE HERO BANNER */
.hero-banner {
  background: linear-gradient(135deg, #152b49 0%, #1b3860 100%);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  color: #ffffff;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(21, 43, 73, 0.16);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-info-grid {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-account-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
}

.hero-account-badge .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .8;
  font-weight: 700;
}

.hero-account-badge .val {
  font-size: 15px;
  font-weight: 850;
  letter-spacing: .02em;
  color: var(--gold);
  font-family: var(--font-mono);
}

.hero-metrics-row {
  display: flex;
  gap: 24px;
  align-items: center;
}

.hero-metric-item .lbl {
  font-size: 11px;
  opacity: .75;
  font-weight: 650;
}

.hero-metric-item .val {
  font-size: 18px;
  font-weight: 850;
  margin-top: 2px;
  letter-spacing: -.02em;
}

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

.btn-hero-light {
  background: #ffffff;
  color: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-hero-light:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

.btn-hero-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-hero-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* CARDS & SURFACES */
.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 14px;
  flex-wrap: wrap;
}

.chart-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.01em;
}

.chart-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  display: block;
}

/* KPI METRIC CARDS GRID */
.grid-kpi {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .grid-kpi {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

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

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-xs);
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 6px;
}

.kpi-label {
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.kpi-value {
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -.03em;
  color: var(--ink);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.kpi-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: auto;
}

/* Mini Progress Bar */
.mini-bar {
  width: 100%;
  height: 6px;
  background: var(--bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--line);
}

.mini-bar-fill {
  height: 100%;
  background: var(--navy);
  border-radius: var(--radius-pill);
  transition: width .4s ease;
}

.mini-bar-fill.safe {
  background: #16a34a;
}

.mini-bar-fill.warn {
  background: #d97706;
}

.mini-bar-fill.danger {
  background: #dc2626;
}

/* COMPLIANCE & RISK TELEMETRY BAR */
.compliance-bar {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  box-shadow: var(--shadow-xs);
}

.comp-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comp-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comp-icon.safe {
  background: var(--safe-bg);
  color: var(--safe-ink);
  border: 1px solid var(--safe-line);
}

.comp-icon.warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-line);
}

.comp-icon.gold {
  background: var(--gold-bg);
  color: var(--gold-ink);
  border: 1px solid var(--gold-line);
}

.comp-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: .04em;
}

.comp-val {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 1px;
}

/* STATUS TAGS / PILLS */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.tag-safe {
  background: var(--safe-bg);
  color: var(--safe-ink);
  border: 1px solid var(--safe-line);
}

.tag-warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-line);
}

.tag-danger {
  background: var(--danger-bg);
  color: var(--danger-ink);
  border: 1px solid var(--danger-line);
}

.tag-blue {
  background: var(--blue-bg);
  color: var(--blue-ink);
  border: 1px solid var(--blue-line);
}

.tag-gold {
  background: var(--gold-bg);
  color: var(--gold-ink);
  border: 1px solid var(--gold-line);
}

.tag-neutral {
  background: #f2f4f7;
  color: #475467;
  border: 1px solid var(--line);
}

/* CHARTS SECTION */
.grid-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

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

.chart-wrapper {
  position: relative;
  height: 330px;
  width: 100%;
}

.chart-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.chart-btn-filter {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s ease;
}

.chart-btn-filter:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.chart-btn-filter.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

/* SYMBOL BREAKDOWN */
.symbol-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.symbol-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color .15s ease;
}

.symbol-item:hover {
  border-color: var(--line-strong);
}

.sym-tag {
  font-size: 12.5px;
  font-weight: 850;
  font-family: var(--font-mono);
  color: var(--navy);
  background: #ffffff;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

/* DIRECTION RATIO BAR */
.ratio-bar-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ratio-bar {
  display: flex;
  height: 10px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 8px 0;
}

.ratio-buy {
  background: #16a34a;
  height: 100%;
}

.ratio-sell {
  background: #dc2626;
  height: 100%;
}

/* TABLES */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  text-align: left;
}

.table thead th {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 750;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid #f0f2f5;
  color: var(--ink);
  vertical-align: middle;
}

.table tbody tr {
  transition: background .12s ease;
}

.table tbody tr:hover {
  background: #f9fbfe;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* TRADES PILLS & BADGES */
.pill-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 850;
  padding: 3px 8px;
  border-radius: 6px;
  background: #eef8f1;
  color: #166534;
  border: 1px solid #ccebd6;
  letter-spacing: .04em;
}

.pill-sell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 850;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fff1f0;
  color: #b42318;
  border: 1px solid #fecdca;
  letter-spacing: .04em;
}

.ticket-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  background: var(--bg);
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all .15s ease;
}

.ticket-chip:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

/* FILTERS & SEARCH TOOLBAR */
.toolbar-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}

.toolbar-grid {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-lbl {
  font-size: 11px;
  font-weight: 750;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.select, .input-text {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--ink);
  font-size: 13.5px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  min-width: 170px;
}

.select:focus, .input-text:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(21, 43, 73, 0.12);
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.search-input-wrap input {
  padding-left: 36px;
  width: 100%;
}

/* UPLOAD & IMPORT */
.grid-upload {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
}

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

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 4px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.dropzone {
  border: 2px dashed #cfd7e3;
  border-radius: var(--radius-lg);
  padding: 38px 24px;
  text-align: center;
  background: #fbfcfe;
  cursor: pointer;
  transition: all .2s ease;
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--navy);
  background: #f0f5fc;
  transform: scale(1.005);
}

.dropzone-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.dropzone-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}

.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  resize: vertical;
}

.textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(21, 43, 73, 0.12);
}

.code-snippet {
  background: #182230;
  color: #e4e7ec;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  line-height: 1.6;
  margin: 12px 0 18px;
}

/* NOTICE BOX */
.notice {
  background: var(--gold-bg);
  border: 1px solid var(--gold-line);
  color: var(--gold-ink);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.55;
  margin-top: 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.notice-icon {
  color: #b54708;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(16, 24, 40, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  transform: translateY(12px) scale(0.97);
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 18px;
  font-weight: 850;
  color: var(--ink);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--ink);
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: #182230;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn .25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success {
  border-left: 4px solid #16a34a;
}

.toast.toast-error {
  border-left: 4px solid #dc2626;
}

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

/* FOOTER */
footer.app-footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding: 24px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
  gap: 16px;
  flex-wrap: wrap;
}

/* UTILITY CLASSES */
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 750; }
.text-safe { color: var(--safe-ink); }
.text-danger { color: var(--danger-ink); }
.text-warn { color: var(--warn-ink); }
.text-muted { color: var(--muted); }
.text-safe-bright { color: #4ade80 !important; }
.text-danger-bright { color: #f87171 !important; }
.hidden { display: none !important; }

/* RESPONSIVE DESIGN & ADAPTIVE RESIZING */
@media (max-width: 1240px) {
  .nav-ext-link {
    display: none !important;
  }
}

@media (max-width: 1080px) {
  .nav-links {
    display: none !important;
  }
  .mobile-nav-toggle {
    display: inline-flex !important;
  }
  .nav-logout-btn {
    display: none !important;
  }
}

@media (max-width: 768px) {
  header.top-nav {
    height: 60px;
  }
  .mobile-drawer {
    top: 60px;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-title {
    font-size: 21px;
  }
  .hero-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .filter-bar .form-control, .filter-bar .select-control {
    width: 100% !important;
  }
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
  }
  table.data-table {
    min-width: 660px;
  }
}

@media (max-width: 580px) {
  .brand-badge {
    display: none !important;
  }
  .live-badge-text {
    display: none !important;
  }
  .live-badge {
    padding: 6px 9px;
  }
  .user-badge-name {
    display: none !important;
  }
  .user-badge {
    padding: 6px 9px;
  }
  .brand-text {
    font-size: 14.5px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

/* ==============================================================================
   HEDGEFUNDED INSTITUTIONAL QUANT WORKSTATION & TERMINAL
   Brand Design Code: Deep Navy #152b49, Institutional Gold #d4af37,
   Muted Low-Saturation Emerald #10b981 & Rose #f43f5e.
   ============================================================================== */

.bb-terminal-wrap {
  background: #080f1a;
  color: #cbd5e1;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(21, 43, 73, 0.85);
  border-top: 2px solid #d4af37;
  box-shadow: 0 16px 40px rgba(8, 15, 26, 0.65), 0 0 1px rgba(212, 175, 55, 0.2);
  overflow: hidden;
  font-family: var(--font-mono);
  margin-bottom: 28px;
}

.bb-header-bar {
  background: #0c1626;
  border-bottom: 1px solid rgba(21, 43, 73, 0.7);
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.bb-cmd-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 750;
  color: #d4af37;
}

.bb-command-input {
  background: #080f1a;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  color: #f1f5f9;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  outline: none;
  width: 220px;
  text-transform: uppercase;
  transition: all .15s ease;
}

.bb-command-input:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.bb-command-input::placeholder {
  color: #64748b;
  font-weight: 500;
}

.bb-cursor {
  display: inline-block;
  width: 6px;
  height: 14px;
  background: #d4af37;
  vertical-align: -2px;
  animation: bbBlink 1s infinite;
}

@keyframes bbBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.bb-fn-bar {
  display: flex;
  gap: 6px;
  padding: 7px 16px;
  background: #091220;
  border-bottom: 1px solid rgba(21, 43, 73, 0.5);
  overflow-x: auto;
  white-space: nowrap;
}

.bb-fn-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #0e192c;
  border: 1px solid rgba(21, 43, 73, 0.8);
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 650;
  color: #94a3b8;
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}

.bb-fn-key:hover {
  background: #152b49;
  border-color: #d4af37;
  color: #f1f5f9;
}

.bb-fn-badge {
  color: #d4af37;
  background: rgba(212, 175, 55, 0.15);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
}

.bb-fn-key.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.bb-ticker-bar {
  background: #070d17;
  border-bottom: 1px solid rgba(21, 43, 73, 0.5);
  padding: 7px 16px;
  font-size: 11px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  white-space: nowrap;
}

.bb-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bb-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.55fr 1.3fr;
  gap: 1px;
  background: rgba(21, 43, 73, 0.5);
}

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

.bb-panel {
  background: #0a1322;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bb-panel-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #d4af37;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(21, 43, 73, 0.6);
  padding-bottom: 7px;
}

.bb-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.bb-stat-val {
  font-weight: 750;
}

.bb-stat-val.safe { color: #10b981; }
.bb-stat-val.warn { color: #d4af37; }
.bb-stat-val.cyan { color: #38bdf8; }
.bb-stat-val.danger { color: #f43f5e; }

.bb-btn {
  background: #111e33;
  color: #d4af37;
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bb-btn:hover {
  background: #152b49;
  border-color: #d4af37;
  color: #ffffff;
}

.bb-btn-cyan {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.bb-btn-cyan:hover {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

.bb-btn-green {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
}

.bb-btn-green:hover {
  background: #059669;
  border-color: #10b981;
  color: #ffffff;
}

.bb-log-screen {
  background: #070d17;
  border: 1px solid rgba(21, 43, 73, 0.7);
  border-radius: 6px;
  padding: 10px;
  height: 180px;
  overflow-y: auto;
  font-size: 10.5px;
  line-height: 1.55;
  color: #94a3b8;
  font-family: var(--font-mono);
}

.monte-carlo-chart-wrap {
  width: 100%;
  height: 200px;
  position: relative;
}

/* QUANT SPECIFIC MODULES (HFT / MARKET MAKING / MARKOV) */
.hf-quant-box {
  background: #080f1b;
  border: 1px solid rgba(21, 43, 73, 0.7);
  border-radius: 6px;
  padding: 10px 12px;
}

.hf-depth-row {
  display: grid;
  grid-template-columns: 60px 1fr 65px 65px 1fr 60px;
  gap: 4px;
  align-items: center;
  font-size: 10.5px;
  padding: 2.5px 0;
  position: relative;
}

.hf-depth-bar-bid {
  height: 14px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 2px;
  transition: width .2s ease;
}

.hf-depth-bar-ask {
  height: 14px;
  background: rgba(244, 63, 94, 0.15);
  border-radius: 2px;
  transition: width .2s ease;
}

.hf-obi-track {
  width: 100%;
  height: 8px;
  background: #0e192c;
  border-radius: 99px;
  position: relative;
  overflow: hidden;
  margin: 6px 0;
  border: 1px solid rgba(21, 43, 73, 0.6);
}

.hf-obi-fill {
  height: 100%;
  position: absolute;
  top: 0;
  transition: all .25s ease;
}

.hf-markov-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
  text-align: center;
  margin-top: 4px;
}

.hf-markov-table th {
  padding: 4px 6px;
  color: #64748b;
  font-weight: 700;
  border-bottom: 1px solid rgba(21, 43, 73, 0.6);
}

.hf-markov-table td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-weight: 600;
}

.hf-markov-cell-active {
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  font-weight: 800;
  border-radius: 3px;
}

.hf-tape-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.bb-trader-select {
  background: #0e192c;
  border: 1px solid rgba(21, 43, 73, 0.8);
  color: #d4af37;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.bb-trader-select:focus {
  border-color: #d4af37;
}

.bb-tilt-alert {
  animation: hfTiltSubtle 1.2s infinite alternate;
}

@keyframes hfTiltSubtle {
  0% { border-color: rgba(244, 63, 94, 0.8); box-shadow: 0 0 16px rgba(244, 63, 94, 0.25); }
  100% { border-color: rgba(212, 175, 55, 0.6); box-shadow: 0 0 4px rgba(212, 175, 55, 0.15); }
}

/* ==============================================================================
   HEDGEFUNDED INSTITUTIONAL DARK THEME
   Brand Standards: Midnight Obsidian, Deep Navy, Royal Gold, Crisp Data Lines
   ============================================================================== */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070d18;
  --bg-subtle: #0b1528;
  --ink: #e6edf8;
  --ink-secondary: #94a3b8;
  --muted: #64748b;
  --muted-light: #475569;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  
  --navy: #152b49;
  --navy-hover: #1f3d68;
  --navy-active: #0c1c32;
  
  --gold-bg: rgba(212, 175, 55, 0.12);
  --gold-line: rgba(212, 175, 55, 0.35);
  --gold-ink: #f0d879;
  
  --safe-bg: rgba(16, 185, 129, 0.12);
  --safe-line: rgba(16, 185, 129, 0.3);
  --safe-ink: #34d399;
  
  --warn-bg: rgba(245, 158, 11, 0.12);
  --warn-line: rgba(245, 158, 11, 0.3);
  --warn-ink: #fbbf24;
  
  --danger-bg: rgba(244, 63, 94, 0.12);
  --danger-line: rgba(244, 63, 94, 0.3);
  --danger-ink: #f87171;
  
  --blue-bg: rgba(56, 189, 248, 0.12);
  --blue-line: rgba(56, 189, 248, 0.3);
  --blue-ink: #38bdf8;
}

[data-theme="dark"] body {
  background-color: var(--bg);
  color: var(--ink);
}

[data-theme="dark"] header.top-nav {
  background: rgba(10, 18, 34, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.65);
}

[data-theme="dark"] .brand-text {
  color: #ffffff;
}

[data-theme="dark"] .brand-mark {
  background: linear-gradient(135deg, #152b49 0%, #0a1324 100%);
  border-color: #d4af37;
  color: #d4af37;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
}

[data-theme="dark"] .brand-badge {
  background: rgba(212, 175, 55, 0.18);
  color: #e5c96a;
  border-color: rgba(212, 175, 55, 0.35);
}

[data-theme="dark"] .nav-tab {
  color: #94a3b8;
}

[data-theme="dark"] .nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .nav-tab.active {
  color: #d4af37;
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
}

[data-theme="dark"] .live-badge {
  background: #0d1a32;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .live-badge-text {
  color: #cbd5e1;
}

[data-theme="dark"] .user-badge {
  background: #0d1a32;
  border-color: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .metric-box,
[data-theme="dark"] .crm-card,
[data-theme="dark"] .modal-card,
[data-theme="dark"] .upload-box {
  background: #0c1628;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  color: var(--ink);
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .crm-card:hover,
[data-theme="dark"] .modal-card {
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .card-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .table-wrap,
[data-theme="dark"] table.data-table {
  background: #0c1628;
  color: var(--ink);
}

[data-theme="dark"] table.data-table th {
  background: #0f1c34;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] table.data-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

[data-theme="dark"] table.data-table tr:hover td {
  background: rgba(21, 43, 73, 0.4);
}

[data-theme="dark"] .page-title,
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 {
  color: #ffffff;
}

[data-theme="dark"] .page-subtitle {
  color: #94a3b8;
}

[data-theme="dark"] .btn-secondary {
  background: #112038;
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

[data-theme="dark"] .btn-secondary:hover {
  background: #182e50;
  color: #ffffff;
  border-color: rgba(212, 175, 55, 0.4);
}

[data-theme="dark"] .btn-outline {
  border-color: rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

[data-theme="dark"] .btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

[data-theme="dark"] .mobile-drawer {
  background: #070e1b;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

[data-theme="dark"] .mobile-nav-item {
  color: #cbd5e1;
}

[data-theme="dark"] .mobile-nav-item:hover,
[data-theme="dark"] .mobile-nav-item.active {
  background: rgba(212, 175, 55, 0.12);
  color: #d4af37;
}

[data-theme="dark"] .app-footer {
  background: #070d18;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #0a1324;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

/* THEME SWITCH PILL BUTTON (Universal UX standard) */
.theme-switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border-radius: 9999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-subtle);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  flex-shrink: 0;
  outline: none;
}

.theme-switch-pill:hover {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
  transform: translateY(-1px);
}

.theme-pill-track {
  width: 36px;
  height: 20px;
  border-radius: 9999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.25s ease;
  display: flex;
  align-items: center;
  padding: 0 2px;
}

.theme-pill-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  position: absolute;
  left: 2px;
  display: grid;
  place-items: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, color 0.25s ease;
  font-size: 10px;
}

.theme-switch-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Dark Mode State of Switch */
[data-theme="dark"] .theme-switch-pill {
  background: #0d1a32;
  border-color: rgba(212, 175, 55, 0.4);
  color: var(--gold-soft);
}

[data-theme="dark"] .theme-pill-track {
  background: #152b49;
}

[data-theme="dark"] .theme-pill-thumb {
  transform: translateX(16px);
  background: #d4af37;
  color: #060b14;
}

[data-theme="dark"] .theme-icon-sun {
  display: none !important;
}
[data-theme="dark"] .theme-icon-moon {
  display: block !important;
  color: #060b14;
}

/* Light Mode State of Switch */
[data-theme="light"] .theme-switch-pill,
:root:not([data-theme="dark"]) .theme-switch-pill {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #152b49;
}

[data-theme="light"] .theme-pill-track,
:root:not([data-theme="dark"]) .theme-pill-track {
  background: #e2e8f0;
}

[data-theme="light"] .theme-pill-thumb,
:root:not([data-theme="dark"]) .theme-pill-thumb {
  transform: translateX(0);
  background: #f59e0b;
  color: #ffffff;
}

[data-theme="light"] .theme-icon-moon,
:root:not([data-theme="dark"]) .theme-icon-moon {
  display: none !important;
}
[data-theme="light"] .theme-icon-sun,
:root:not([data-theme="dark"]) .theme-icon-sun {
  display: block !important;
  color: #ffffff;
}

/* Fallback square button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.theme-toggle-btn:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.45);
  color: var(--gold);
}



