@import url('/fonts/fonts.css');

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

:root {
  --navy: #080B18;
  --navy-2: #0d1124;
  --cobalt: #3D6FEE;
  --cobalt-dim: #2d56c8;
  --amber: #F59E0B;
  --text: #e8eaf0;
  --text-dim: #8b90a8;
  --glass-bg: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.12);
  --radius: 14px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--text);
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 700;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Blobs ─────────────────────────────────────────── */
.blob-wrap {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(90px);
}
.blob-cobalt {
  width: 600px; height: 600px;
  top: -180px; right: -160px;
  background: radial-gradient(circle, rgba(61,111,238,.28) 0%, transparent 70%);
}
.blob-amber {
  width: 500px; height: 500px;
  bottom: -140px; left: -120px;
  background: radial-gradient(circle, rgba(245,158,11,.18) 0%, transparent 70%);
}

/* ── Layout ────────────────────────────────────────── */
.page-wrap { position: relative; z-index: 1; }

/* ── Nav ───────────────────────────────────────────── */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(8,11,24,.7);
  backdrop-filter: blur(16px);
  position: sticky; top: 0; z-index: 100;
}
.nav-logo {
  font-size: 18px; font-weight: 900; color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo-dot { color: var(--cobalt); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: 15px;
  padding: 7px 14px; border-radius: 8px; transition: all .18s;
}
.nav-links a:hover { color: var(--text); background: var(--glass-bg); }
.btn-nav {
  background: var(--cobalt); color: #fff !important;
  padding: 8px 18px !important; border-radius: 9px !important;
}
.btn-nav:hover { background: var(--cobalt-dim) !important; }

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-weight: 800; font-size: 15px;
  padding: 11px 22px; border-radius: 10px; border: none;
  cursor: pointer; transition: all .18s; text-decoration: none;
}
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-dim); }
.btn-secondary {
  background: var(--glass-bg); color: var(--text);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover { background: rgba(255,255,255,.1); }
.btn-danger { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-sm { font-size: 13px; padding: 7px 14px; border-radius: 8px; }
.btn-icon { padding: 8px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Cards ─────────────────────────────────────────── */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px;
}

/* ── Forms ─────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label { font-size: 14px; color: var(--text-dim); }
.form-input {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--glass-border);
  border-radius: 9px; color: var(--text);
  font-family: inherit; font-size: 15px; font-weight: 700;
  padding: 11px 14px; outline: none; transition: border-color .18s;
  width: 100%;
}
.form-input:focus { border-color: var(--cobalt); }
.form-input::placeholder { color: var(--text-dim); }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b90a8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px;
}
.form-error {
  font-size: 13px; color: #f87171;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25);
  border-radius: 8px; padding: 10px 14px; display: none;
}
.form-error.visible { display: block; }

/* ── Badge ─────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 800; padding: 4px 9px;
  border-radius: 6px; letter-spacing: .03em;
}
.badge-cobalt { background: rgba(61,111,238,.18); color: #7ba3ff; border: 1px solid rgba(61,111,238,.3); }
.badge-green { background: rgba(34,197,94,.12); color: #4ade80; border: 1px solid rgba(34,197,94,.25); }
.badge-amber { background: rgba(245,158,11,.12); color: #fbbf24; border: 1px solid rgba(245,158,11,.25); }
.badge-dim { background: rgba(255,255,255,.06); color: var(--text-dim); border: 1px solid var(--glass-border); }

/* ── Code ──────────────────────────────────────────── */
code {
  font-family: 'JetBrains Mono', monospace; font-size: .88em;
  background: rgba(255,255,255,.07); border-radius: 5px; padding: 2px 6px;
}
.code-block {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  background: rgba(0,0,0,.35); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 18px 20px; overflow-x: auto;
  line-height: 1.7; white-space: pre; color: var(--text);
}

/* ── Key reveal box ────────────────────────────────── */
.key-reveal {
  background: rgba(61,111,238,.08);
  border: 1px solid rgba(61,111,238,.3);
  border-radius: 10px; padding: 16px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; word-break: break-all; position: relative;
}
.key-reveal-warning {
  font-family: 'Nunito', sans-serif; font-size: 13px;
  color: var(--amber); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}

/* ── Table ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; padding: 10px 14px;
  color: var(--text-dim); font-size: 12px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
  border-bottom: 1px solid var(--glass-border);
}
td { padding: 14px 14px; border-bottom: 1px solid rgba(255,255,255,.05); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ── Auth pages ────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card .card { padding: 36px; }
.auth-title { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.auth-sub { font-size: 15px; color: var(--text-dim); margin-bottom: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-footer { text-align: center; margin-top: 22px; font-size: 14px; color: var(--text-dim); }
.auth-footer a { color: var(--cobalt); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Dashboard ─────────────────────────────────────── */
.dash-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.dash-sidebar {
  background: rgba(0,0,0,.25); border-right: 1px solid var(--glass-border);
  padding: 28px 20px; display: flex; flex-direction: column; gap: 4px;
}
.dash-sidebar-logo {
  font-size: 16px; font-weight: 900; color: var(--text);
  padding: 0 10px; margin-bottom: 20px; text-decoration: none;
}
.dash-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px; color: var(--text-dim);
  font-size: 14px; text-decoration: none; transition: all .18s;
}
.dash-nav-item:hover, .dash-nav-item.active {
  background: var(--glass-bg); color: var(--text);
}
.dash-nav-item svg { flex-shrink: 0; }
.dash-main { padding: 40px; overflow-y: auto; }
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.dash-title { font-size: 24px; font-weight: 900; }
.dash-section { margin-bottom: 32px; }
.dash-section-title { font-size: 13px; font-weight: 800; color: var(--text-dim); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.dash-sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--glass-border); }

/* ── Landing ───────────────────────────────────────── */
.hero { padding: 100px 40px 80px; text-align: center; }
.hero-eyebrow { font-size: 13px; color: var(--cobalt); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 20px; }
.hero-title { font-size: clamp(36px, 6vw, 64px); font-weight: 900; line-height: 1.1; margin-bottom: 20px; }
.hero-sub { font-size: 18px; color: var(--text-dim); max-width: 520px; margin: 0 auto 36px; line-height: 1.6; font-weight: 700; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.apis-section { padding: 0 40px 80px; max-width: 1100px; margin: 0 auto; }
.apis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.api-card { padding: 24px; }
.api-card-name { font-size: 18px; font-weight: 900; margin-bottom: 6px; }
.api-card-desc { font-size: 14px; color: var(--text-dim); margin-bottom: 14px; line-height: 1.5; font-weight: 700; }

.docs-section { padding: 0 40px 80px; max-width: 900px; margin: 0 auto; }
.section-title { font-size: 28px; font-weight: 900; margin-bottom: 8px; }
.section-sub { font-size: 16px; color: var(--text-dim); margin-bottom: 36px; font-weight: 700; }

.endpoint { border-bottom: 1px solid var(--glass-border); padding: 28px 0; }
.endpoint:last-child { border-bottom: none; }
.endpoint-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.method { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.method-get { background: rgba(34,197,94,.15); color: #4ade80; }
.endpoint-path { font-family: 'JetBrains Mono', monospace; font-size: 15px; color: var(--text); }
.endpoint-desc { font-size: 14px; color: var(--text-dim); margin-bottom: 14px; font-weight: 700; }

/* ── Toast ─────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  background: #1a1f38; border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 14px 20px; font-size: 14px;
  transform: translateY(20px); opacity: 0; transition: all .25s;
  pointer-events: none; max-width: 320px;
}
#toast.show { transform: translateY(0); opacity: 1; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .hero { padding: 60px 20px 50px; }
  .apis-section, .docs-section { padding-left: 20px; padding-right: 20px; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .dash-main { padding: 24px 20px; }
}
