@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
  --bg: #070b14;
  --bg-elevated: #0d1322;
  --card: #111827;
  --card-2: #161f33;
  --input-bg: #0c1220;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --text: #f1f5f9;
  --text-soft: #cbd5e1;
  --muted: #8b9bb8;
  --gold: #f5b942;
  --gold-hover: #fbca5c;
  --gold-dim: rgba(245, 185, 66, 0.13);
  --gold-border: rgba(245, 185, 66, 0.34);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.14);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.14);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.14);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.15);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(900px 420px at 15% -8%, rgba(245, 185, 66, 0.08), transparent 60%),
    radial-gradient(700px 380px at 88% -10%, rgba(59, 130, 246, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

code, .mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
code {
  background: rgba(148, 163, 184, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.85em;
  color: #fde68a;
}

/* Navbar */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 26px;
  background: rgba(11, 16, 28, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #f5b942, #d97706);
  color: #0b0f19;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(245, 185, 66, 0.3);
}
.nav-links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nav-link {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover, .nav-link.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.container { max-width: 1200px; margin: 0 auto; padding: 28px 20px 64px; }

/* Cards & Layout */
.card {
  background: linear-gradient(180deg, rgba(22, 31, 51, 0.6), rgba(17, 24, 39, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card-subtle {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.card-title { margin: 0; font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 17px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(135deg, #f5b942, #eab308);
  color: #0b0f19;
  box-shadow: 0 4px 16px rgba(245, 185, 66, 0.24);
}
.btn-gold:hover { background: linear-gradient(135deg, #fbca5c, #f5b942); color: #0b0f19; }
.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(245, 185, 66, 0.45); color: var(--text); }
.btn-green { background: var(--green); color: #052e16; }
.btn-green:hover { background: #4ade80; color: #052e16; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #f87171; color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); padding: 6px 10px; }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.btn-sm { padding: 6px 11px; font-size: 0.8rem; border-radius: 7px; }
.btn-lg { padding: 12px 22px; font-size: 0.96rem; }

/* Badges & Status Dots */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-green { background: var(--green-dim); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.25); }
.badge-red { background: var(--red-dim); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }
.badge-amber { background: var(--amber-dim); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.25); }
.badge-blue { background: var(--blue-dim); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.25); }
.badge-gold { background: var(--gold-dim); color: var(--gold); border: 1px solid var(--gold-border); }

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.65); }
  70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Forms & Inputs (Chrome/Safari Dark Autofill Fix) */
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.field-hint {
  font-size: 0.77rem;
  color: var(--muted);
  margin: -8px 0 12px;
}
input, select, textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  margin-bottom: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.15);
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Tables */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th {
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-ok { background: var(--green-dim); border: 1px solid rgba(34, 197, 94, 0.35); color: #86efac; }
.alert-err { background: var(--red-dim); border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; }
.alert-warn { background: var(--gold-dim); border: 1px solid var(--gold-border); color: #fde68a; }

.muted { color: var(--muted); font-size: 0.86rem; }
.stat-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.stat-val { font-size: 1.55rem; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }

/* Onboarding Stepper */
.stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.step-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.step-item.done { border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.06); }
.step-item.active { border-color: var(--gold-border); background: rgba(245, 185, 66, 0.06); }
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  background: var(--card-2);
  color: var(--muted);
  border: 1px solid var(--border-strong);
}
.step-item.done .step-num { background: var(--green); color: #052e16; border-color: var(--green); }
.step-item.active .step-num { background: var(--gold); color: #0b0f19; border-color: var(--gold); }

/* Copyable code box */
.copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 9px;
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--gold);
  word-break: break-all;
}

/* Tabs */
.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.tab-btn {
  padding: 7px 14px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
}
.tab-btn.active {
  background: var(--gold);
  color: #0b0f19;
}

/* Guide Step Card */
.guide-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.guide-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Details Accordion */
details.faq {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 10px;
}
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.faq summary::after { content: "+"; color: var(--gold); font-weight: 700; font-size: 1.1rem; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 10px 0 0; color: var(--muted); font-size: 0.88rem; }

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.filter-bar input { margin-bottom: 0; max-width: 280px; }
.filter-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.filter-pill.active, .filter-pill:hover {
  border-color: var(--gold-border);
  background: var(--gold-dim);
  color: var(--gold);
}

/* Toast Notification */
#toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: #162235;
  border: 1px solid var(--gold-border);
  color: var(--text);
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  animation: fadeSlide 0.2s ease;
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Auth Wrapper */
.auth-card {
  max-width: 440px;
  margin: 44px auto;
  padding: 28px;
}

.inline-form { display: inline-flex; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { margin-bottom: 0; width: auto; }

@media (max-width: 680px) {
  .nav { padding: 12px 14px; }
  .container { padding: 18px 14px 48px; }
  .guide-step { grid-template-columns: 1fr; }
}
