/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  --bg:            #0d1117;
  --panel:         rgba(18, 24, 34, 0.92);
  --panel-border:  rgba(212, 175, 55, 0.16);
  --panel-hover:   rgba(212, 175, 55, 0.06);
  --text:          #e8edf4;
  --muted:         #8b98a9;
  --gold:          #e0c15c;
  --gold-dim:      #b48918;
  --success:       #22c55e;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --input-bg:      rgba(10, 15, 23, 0.85);
  --input-border:  rgba(255, 255, 255, 0.10);
}

/* ─── Base ───────────────────────────────────────────────────── */
html { font-size: 16px; min-height: 100%; }

body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse at 80% 0%,   rgba(212,175,55,0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 90%,  rgba(56,100,170,0.10) 0%, transparent 45%),
    linear-gradient(160deg, #090d12 0%, #0f1620 50%, #0d1117 100%);
  background-attachment: fixed;
}

a { color: var(--gold); }
a:hover { color: #f2d37b; }

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212,175,55,0.45); }

/* ─── Navbar ─────────────────────────────────────────────────── */
.navbar {
  background: rgba(7, 10, 16, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(212,175,55,0.12);
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold) !important;
  background: linear-gradient(135deg, #f2d37b, #c9980a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  color: var(--muted) !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem !important;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  position: relative;
}

.nav-link:hover {
  color: var(--text) !important;
  background: rgba(255,255,255,0.05);
}

.nav-link.active {
  color: var(--gold) !important;
  background: rgba(212,175,55,0.10);
}

/* ─── Cards ──────────────────────────────────────────────────── */
.feature-card,
.surface-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 1px 0 rgba(255,255,255,0.04) inset;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(212,175,55,0.28);
  box-shadow: 0 16px 48px rgba(0,0,0,0.36);
}

.stat-card {
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 56px rgba(0,0,0,0.40), 0 0 0 1px rgba(212,175,55,0.2);
}

/* ─── Eyebrow label ──────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(212,175,55,0.10);
  border: 1px solid rgba(212,175,55,0.20);
  color: #f2d37b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-gold {
  background: linear-gradient(135deg, #e8cc6a, #b08010);
  color: #120d02;
  border: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 12px rgba(212,175,55,0.30);
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}
.btn-gold:hover, .btn-gold:focus {
  background: linear-gradient(135deg, #f5da82, #c89a20);
  color: #120d02;
  box-shadow: 0 4px 20px rgba(212,175,55,0.45);
  transform: translateY(-1px);
}
.btn-gold:active { transform: translateY(0); }

.btn-outline-light {
  border-color: rgba(255,255,255,0.18);
  color: var(--muted);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.30);
  color: var(--text);
}

/* ─── Form controls (dark theme) ────────────────────────────── */
.form-control,
.form-select {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  border-radius: 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control::placeholder { color: var(--muted); opacity: 0.7; }
.form-control:focus,
.form-select:focus {
  background-color: rgba(12, 18, 28, 0.95);
  border-color: rgba(212,175,55,0.50);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
  outline: none;
}
.form-select option { background: #0f1620; color: var(--text); }
.form-label { color: var(--muted); font-size: 0.8rem; font-weight: 500; margin-bottom: 0.35rem; }
.form-text  { color: var(--muted); font-size: 0.75rem; }

/* Range slider */
.form-range::-webkit-slider-thumb { background: var(--gold); }
.form-range::-moz-range-thumb     { background: var(--gold); border: none; }
.form-range::-webkit-slider-runnable-track { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.3em 0.65em;
  border-radius: 6px;
}

/* ─── Tables ─────────────────────────────────────────────────── */
.table-dark-soft {
  --bs-table-bg:           transparent;
  --bs-table-striped-bg:   rgba(255,255,255,0.025);
  --bs-table-hover-bg:     rgba(212,175,55,0.06);
  --bs-table-color:        var(--text);
  --bs-table-border-color: rgba(255,255,255,0.07);
}
.table-dark-soft thead th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.table-dark-soft tbody tr:hover {
  background: rgba(212,175,55,0.04) !important;
}

/* ─── Progress bars ──────────────────────────────────────────── */
.progress {
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* ─── Live indicator ─────────────────────────────────────────── */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(34,197,94,0.5);
  animation: livePulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.hero-divider {
  width: 1px;
  height: 36px;
  background: #1e293b;
  flex-shrink: 0;
}

.price-value {
  font-size: 2.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #f2d37b, #d4a017);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* ─── Section divider ────────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.20), transparent);
  margin: 2rem 0;
  border: none;
}

/* ─── Info strip ─────────────────────────────────────────────── */
.info-strip {
  background: rgba(10,15,23,0.7);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.6rem;
  padding: 0.65rem 1rem;
}

/* ─── Loading overlay for form submit ────────────────────────── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9,13,18,0.72);
  backdrop-filter: blur(4px);
  z-index: 9998;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.loading-overlay.active { display: flex; }
.loading-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(212,175,55,0.20);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Chart image ────────────────────────────────────────────── */
.chart-preview {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.08);
  object-fit: cover;
}

/* ─── Focus ring (global) ────────────────────────────────────── */
.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(212,175,55,0.35);
  outline: none;
}

/* ─── Alert overrides ────────────────────────────────────────── */
.alert-warning {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.25);
  color: #fde68a;
}
.alert-info {
  background: rgba(59,130,246,0.10);
  border-color: rgba(59,130,246,0.25);
  color: #bfdbfe;
}
.alert-success {
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.25);
  color: #bbf7d0;
}
.alert-danger {
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.25);
  color: #fecaca;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.footer {
  background: rgba(7,10,16,0.70);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(212,175,55,0.08);
  color: var(--muted);
  font-size: 0.8rem;
}

/* ─── Utility ────────────────────────────────────────────────── */
.text-gold   { color: var(--gold) !important; }
.text-muted,
.text-secondary { color: var(--muted) !important; }
.border-subtle { border-color: rgba(255,255,255,0.08) !important; }

/* ─── Responsive overrides ───────────────────────────────────── */
@media (max-width: 767.98px) {
  .feature-card, .surface-card { padding: 1rem; }
  .price-value { font-size: 1.7rem; }
  .nav-link { padding: 0.35rem 0.5rem !important; }
  .container-xl { padding-left: 0.75rem; padding-right: 0.75rem; }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .nav-link { padding: 0.4rem 0.5rem !important; font-size: 0.82rem; }
}
