/* ==========================================================================
   Precursor — Design System (Light)
   ========================================================================== */

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --bg-code: #0f172a;
  --card: #ffffff;
  --card-hover: #f9fafb;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --text: #111827;
  --text-body: #4b5563;
  --text-muted: #9ca3af;
  --green: #059669;
  --green-light: #d1fae5;
  --green-50: #ecfdf5;
  --blue: #2563eb;
  --amber: #d97706;
  --red: #dc2626;
  --purple: #7c3aed;
  --font: 'DM Sans', -apple-system, system-ui, sans-serif;
  --font-display: 'Sora', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
  --max-w: 1100px;
  --radius: 10px;
  --sidebar-w: 240px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.hidden { display: none !important; }


/* ==========================================================================
   LANDING — Nav
   ========================================================================== */
.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 24px;
  background: rgba(10,10,14,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; letter-spacing: -0.3px;
  cursor: pointer; color: #ffffff;
}
.nav-logo svg { width: 24px; height: 24px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.6);
  transition: color 0.15s; cursor: pointer;
}
.nav-links a:hover { color: #ffffff; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 7px;
  background: var(--green); color: white;
  font-size: 13px; font-weight: 600;
  transition: background 0.15s; border: none;
}
.nav-cta:hover { background: #047857; }
.nav-login-btn {
  padding: 7px 16px; border-radius: 7px;
  background: transparent; color: rgba(255,255,255,0.7);
  font-size: 13px; font-weight: 500;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.15s;
}
.nav-login-btn:hover { border-color: rgba(255,255,255,0.3); color: #ffffff; }


/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  padding: 140px 24px 80px;
  text-align: center;
  background: var(--bg);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 100px;
  background: var(--green-50); border: 1px solid var(--green-light);
  font-size: 13px; font-weight: 600; color: var(--green);
  margin-bottom: 28px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 60px);
  font-weight: 800; letter-spacing: -1.5px;
  line-height: 1.1;
  max-width: 680px;
  margin: 0 auto 20px;
  color: var(--text);
}
.hero h1 em {
  font-style: normal;
  color: var(--green);
}
.hero p {
  font-size: 17px; color: var(--text-body);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.hero-actions {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 8px;
  background: var(--green); color: white;
  font-size: 15px; font-weight: 600;
  transition: background 0.15s, transform 0.1s;
  border: none;
}
.btn-primary:hover { background: #047857; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 8px;
  background: var(--bg); color: var(--text);
  font-size: 15px; font-weight: 500;
  border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover { background: var(--bg-alt); border-color: #d1d5db; }

.btn-sm {
  padding: 7px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 600;
  background: var(--green); color: white;
  border: none; transition: background 0.15s;
}
.btn-sm:hover { background: #047857; }
.btn-sm:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  padding: 7px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 500;
  background: transparent; color: var(--text-body);
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.btn-outline:hover { border-color: #d1d5db; color: var(--text); }

.btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 7px;
  background: #fef2f2; color: var(--red);
  font-size: 13px; font-weight: 500;
  border: 1px solid #fecaca;
  transition: background 0.15s;
}
.btn-danger:hover { background: #fee2e2; }

/* Hero Code Block */
.hero-code {
  max-width: 560px;
  margin: 48px auto 0;
  background: var(--bg-code);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-md);
}
.hero-code-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: #1e293b;
  font-size: 12px; color: #94a3b8;
  font-family: var(--mono);
}
.hero-code-header .dot { width: 10px; height: 10px; border-radius: 50%; }
.hero-code-header .dot:nth-child(1) { background: #ef4444; }
.hero-code-header .dot:nth-child(2) { background: #eab308; }
.hero-code-header .dot:nth-child(3) { background: #22c55e; margin-right: 8px; }
.hero-code pre {
  padding: 20px;
  font-family: var(--mono); font-size: 13px;
  line-height: 1.8; overflow-x: auto;
  color: #e2e8f0;
}
.hero-code .comment { color: #64748b; }
.hero-code .keyword { color: #c084fc; }
.hero-code .string { color: #6ee7b7; }
.hero-code .key { color: #93c5fd; }


/* ==========================================================================
   HERO — Dark Premier
   ========================================================================== */
.hero-dark {
  position: relative;
  padding: 160px 24px 100px;
  text-align: center;
  background: #0a0a0e;
  overflow: hidden;
}
.hero-mesh {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(110,231,183,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(59,130,246,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 20% 40%, rgba(124,58,237,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, black, transparent);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 760px; margin: 0 auto;
}
.hero-dark h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 800; letter-spacing: -2px;
  line-height: 1.05;
  color: #ffffff;
  margin-bottom: 20px;
}
.hero-desc {
  font-size: 17px; color: rgba(255,255,255,0.55);
  max-width: 540px; margin: 0 auto 40px;
  line-height: 1.7;
}

/* Eyebrow badge */
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
  backdrop-filter: blur(8px);
}
.hero-eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 8px rgba(110,231,183,0.5);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Gradient text */
.hero-gradient-text {
  background: linear-gradient(135deg, #6ee7b7, #3b82f6, #a78bfa);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease-in-out infinite;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Dark hero buttons */
.hero-actions-dark {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; justify-content: center;
}
.btn-hero-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 10px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff; font-size: 15px; font-weight: 700;
  border: none; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 20px rgba(16,185,129,0.25);
}
.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(16,185,129,0.35);
}
.btn-hero-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8);
  font-size: 15px; font-weight: 500;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}

/* Floating code block */
.hero-code-float {
  max-width: 520px;
  margin: 48px auto 0;
  background: rgba(15,23,42,0.8);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  backdrop-filter: blur(12px);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.04) inset;
}
.hero-code-float-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(30,41,59,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hero-code-dots {
  display: flex; gap: 6px;
}
.hero-code-dots span {
  width: 10px; height: 10px; border-radius: 50%;
}
.hero-code-dots span:nth-child(1) { background: #ef4444; }
.hero-code-dots span:nth-child(2) { background: #eab308; }
.hero-code-dots span:nth-child(3) { background: #22c55e; }
.hero-code-lang {
  font-size: 12px; font-family: var(--mono);
  color: rgba(148,163,184,0.7);
}
.hero-code-float pre {
  padding: 20px;
  font-family: var(--mono); font-size: 13px;
  line-height: 1.8; overflow-x: auto;
  color: #e2e8f0; margin: 0;
}

/* Code syntax tokens */
.c-kw { color: #c084fc; }
.c-key { color: #93c5fd; }
.c-str { color: #6ee7b7; }
.c-cmt { color: #64748b; }

/* Section center utility */
.section-center { text-align: center; }
.section-center .section-subtitle { margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Models Grid — Premier
   ========================================================================== */
.models-grid-premier {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.model-card {
  position: relative;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.model-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.model-card[data-provider="anthropic"] { border-top: 3px solid #7c3aed; }
.model-card[data-provider="openai"] { border-top: 3px solid #2563eb; }
.model-card[data-provider="precursor"] { border-top: 3px solid #059669; }
.model-card[data-provider="deepseek"] { border-top: 3px solid #059669; }
.model-card[data-provider="moonshot"] { border-top: 3px solid #d97706; }
.model-card[data-provider="minimax"] { border-top: 3px solid #d97706; }
.model-card.featured {
  border: 2px solid var(--green);
  border-top: 3px solid var(--green);
  box-shadow: 0 0 0 1px rgba(5,150,105,0.1), var(--shadow);
}
.model-badge {
  position: absolute; top: -10px; right: 16px;
  padding: 3px 10px; border-radius: 100px;
  background: var(--green); color: #ffffff;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.3px;
}
.model-provider {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 6px;
}
.model-provider.purple { color: #7c3aed; }
.model-provider.blue { color: #2563eb; }
.model-provider.green { color: #059669; }
.model-provider.amber { color: #d97706; }
.model-name {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  color: var(--text);
}
.model-desc {
  font-size: 13px; color: var(--text-body);
  line-height: 1.5; margin-bottom: 12px;
}
.model-id {
  display: inline-block;
  font-family: var(--mono); font-size: 12px;
  padding: 3px 8px; border-radius: 5px;
  background: var(--bg-alt); color: var(--green);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
.model-price {
  font-size: 15px; font-weight: 700;
  color: var(--text); letter-spacing: -0.3px;
}
.model-price span {
  font-size: 12px; font-weight: 400;
  color: var(--text-muted);
}

/* ==========================================================================
   CTA — Dark
   ========================================================================== */
.cta-dark {
  position: relative;
  padding: 100px 24px;
  background: #0a0a0e;
  overflow: hidden;
}
.cta-dark-mesh {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(110,231,183,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 30% 60%, rgba(59,130,246,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.cta-dark h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800; letter-spacing: -1px;
  color: #ffffff; margin-bottom: 12px;
}
.cta-dark p {
  font-size: 17px; color: rgba(255,255,255,0.5);
  max-width: 480px; margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   Footer — Dark
   ========================================================================== */
.landing-footer-dark {
  padding: 48px 24px 32px;
  background: #0a0a0e;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner-dark {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  color: #ffffff;
}
.footer-brand svg { width: 20px; height: 20px; }
.footer-brand span { font-size: 15px; font-weight: 700; }
.footer-links-dark {
  display: flex; align-items: center; gap: 24px;
}
.footer-links-dark a {
  font-size: 13px; color: rgba(255,255,255,0.4);
  transition: color 0.15s; cursor: pointer;
}
.footer-links-dark a:hover { color: rgba(255,255,255,0.8); }
.footer-copy-dark {
  width: 100%; text-align: center;
  font-size: 12px; color: rgba(255,255,255,0.25);
  margin-top: 12px;
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   LANDING SECTIONS
   ========================================================================== */
.landing-section { padding: 80px 24px; }
.landing-section.alt { background: var(--bg-alt); }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-label {
  display: inline-block;
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--green); margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800; letter-spacing: -0.8px;
  margin-bottom: 12px; color: var(--text);
}
.section-subtitle {
  font-size: 16px; color: var(--text-body);
  max-width: 520px; line-height: 1.65;
}

/* IDE Grid */
.ide-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 40px; max-width: 700px; margin-left: auto; margin-right: auto;
}
.ide-card {
  padding: 18px 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center; cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.15s;
}
.ide-card:hover { box-shadow: var(--shadow-md); border-color: var(--green-light); }
.ide-card.open {
  grid-column: 1 / -1;
  text-align: left;
  border-color: var(--green);
  box-shadow: var(--shadow-md);
}
.ide-card-header { position: relative; }
.ide-card.open .ide-card-header { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.ide-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.ide-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.ide-setup {
  display: none;
}
.ide-card.open .ide-setup { display: block; }
.ide-setup p {
  font-size: 13px; color: var(--text-body); line-height: 1.6; margin-bottom: 8px;
}
.ide-setup p strong { color: var(--text); }
.ide-setup code {
  background: var(--bg-alt); padding: 1px 5px; border-radius: 4px;
  font-family: var(--mono); font-size: 12px; color: var(--green);
  border: 1px solid var(--border);
}
.ide-setup pre {
  background: var(--bg-code); border-radius: 8px;
  padding: 14px 16px; margin: 10px 0;
  font-family: var(--mono); font-size: 13px;
  line-height: 1.7; color: #e2e8f0;
  overflow-x: auto;
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.step {
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s;
}
.step:hover { box-shadow: var(--shadow-md); }
.step-number {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--green-50); color: var(--green);
  font-size: 15px; font-weight: 700;
  margin-bottom: 16px;
}
.step h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-body); line-height: 1.6; }

/* Preview Box */
.preview-box {
  max-width: 640px;
  margin: 40px auto 0;
  background: var(--bg-code);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.preview-box-header {
  padding: 12px 20px;
  background: #1e293b;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #94a3b8;
  font-family: var(--mono);
}
.preview-box-header .ai-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22d3ee;
}
.preview-body { padding: 20px; }
.preview-body .ai-response {
  font-size: 13px; line-height: 1.7; color: #cbd5e1;
  margin-bottom: 16px;
}
.preview-body .ai-response code {
  background: #334155; padding: 2px 6px; border-radius: 3px;
  font-family: var(--mono); font-size: 12px; color: #6ee7b7;
}
.sponsored-block {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid #334155;
}
.sponsored-block .label {
  font-size: 11px; color: #64748b; margin-bottom: 8px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.sponsored-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 13px;
}
.sponsored-item .dot {
  width: 3px; height: 3px; border-radius: 50%; background: #64748b;
}
.sponsored-item .name { font-weight: 600; color: #93c5fd; }
.sponsored-item .desc { color: #94a3b8; }
.sponsored-footer {
  font-size: 11px; color: #64748b; margin-top: 10px;
}
.credit-earned {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 5px 12px;
  border-radius: 5px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
  font-size: 12px; font-weight: 600; color: #6ee7b7;
}

/* Pricing — single card */
.pricing-breakdown { max-width: 520px; margin: 48px auto 0; }
.pricing-model-card {
  padding: 32px 28px;
  background: var(--card); border: 2px solid var(--green);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.pricing-model-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 20px; }
.pricing-token-table { margin-bottom: 20px; }
.token-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.token-row:last-child { border-bottom: none; }
.token-row.avg { background: var(--bg-alt); margin: 8px -12px 0; padding: 10px 12px; border-radius: 6px; border-bottom: none; }
.token-label { font-size: 14px; color: var(--text-body); font-weight: 500; }
.token-price { font-size: 16px; font-weight: 700; }
.token-price span { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.pricing-credits-callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 8px;
  background: var(--green-50); border: 1px solid var(--green-light);
  margin-top: 20px; font-size: 13px; color: var(--text-body); line-height: 1.5;
}
.pricing-credits-callout svg { flex-shrink: 0; margin-top: 1px; color: var(--green); }
.pricing-credits-callout strong { color: var(--text); display: block; margin-bottom: 2px; }

/* Legacy pricing grid (kept for settings tier cards) */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; max-width: 700px; }
.pricing-card {
  padding: 32px 28px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  transition: border-color 0.2s;
}
.pricing-card.featured {
  border-color: var(--green);
  position: relative;
}
.pricing-card.featured::before {
  content: 'Recommended';
  position: absolute; top: -11px; left: 24px;
  padding: 2px 12px; border-radius: 100px;
  background: var(--green); color: white;
  font-size: 11px; font-weight: 700;
}
.pricing-tier {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--green); margin-bottom: 8px;
}
.pricing-price {
  font-size: 36px; font-weight: 800; letter-spacing: -1.5px; margin-bottom: 4px;
}
.pricing-price span { font-size: 15px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.pricing-desc { font-size: 14px; color: var(--text-body); margin-bottom: 24px; line-height: 1.5; }
.pricing-features { list-style: none; flex: 1; margin-bottom: 24px; }
.pricing-features li {
  padding: 6px 0; font-size: 14px; color: var(--text-body);
  display: flex; align-items: center; gap: 8px;
}
.pricing-features li svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--green); }
.pricing-btn {
  display: block; width: 100%; text-align: center;
  padding: 11px; border-radius: 7px;
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--border);
  background: transparent; color: var(--text);
  transition: background 0.15s;
}
.pricing-btn:hover { background: var(--bg-alt); }
.pricing-card.featured .pricing-btn {
  background: var(--green); color: white; border: none;
}
.pricing-card.featured .pricing-btn:hover { background: #047857; }

/* FAQ */
.faq-list { margin-top: 40px; max-width: 680px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question {
  font-size: 15px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; color: var(--text);
  transition: color 0.15s;
}
.faq-question:hover { color: var(--green); }
.faq-question svg {
  width: 18px; height: 18px; flex-shrink: 0;
  transition: transform 0.2s; color: var(--text-muted);
}
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  font-size: 14px; color: var(--text-body); line-height: 1.7;
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 300px; padding-top: 12px; }

/* CTA */
.cta-section { text-align: center; background: var(--bg-alt); border-top: 1px solid var(--border); }

/* Footer */
.landing-footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.footer-left { display: flex; align-items: center; gap: 8px; }
.footer-left svg { width: 20px; height: 20px; }
.footer-left span { font-size: 14px; font-weight: 600; }
.footer-right { display: flex; align-items: center; gap: 24px; }
.footer-right a { font-size: 13px; color: var(--text-muted); transition: color 0.15s; cursor: pointer; }
.footer-right a:hover { color: var(--text-body); }
.footer-copy { width: 100%; text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 12px; }


/* ==========================================================================
   AUTH PAGES
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg-alt);
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}
.auth-card .auth-logo {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 20px; font-weight: 700; margin-bottom: 6px;
}
.auth-card .auth-logo svg { width: 24px; height: 24px; }
.auth-card .auth-subtitle {
  text-align: center; font-size: 14px; color: var(--text-muted);
  margin-bottom: 32px;
}
.auth-card h2 {
  text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 6px;
}

/* Form fields */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%; padding: 10px 12px; border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text); font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(5,150,105,0.08);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-error { font-size: 13px; color: var(--red); margin-top: 4px; }

.auth-submit {
  width: 100%; padding: 12px;
  border-radius: 8px;
  background: var(--green); color: white;
  font-size: 15px; font-weight: 600;
  border: none; transition: background 0.15s;
  margin-top: 6px;
}
.auth-submit:hover { background: #047857; }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-footer {
  text-align: center; margin-top: 20px;
  font-size: 13px; color: var(--text-muted);
}
.auth-footer a { color: var(--green); font-weight: 600; cursor: pointer; }
.auth-footer a:hover { text-decoration: underline; }


/* ==========================================================================
   APP LAYOUT
   ========================================================================== */
.app-layout { display: flex; min-height: 100vh; background: var(--bg-alt); }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0;
  overflow-y: auto; z-index: 50;
  transition: transform 0.3s ease;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 8px;
  padding: 0 8px 20px;
  font-size: 17px; font-weight: 700;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px; cursor: pointer;
}
.sidebar-logo svg { width: 22px; height: 22px; }
.sidebar-section { margin-bottom: 20px; }
.sidebar-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); padding: 0 8px; margin-bottom: 6px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: var(--text-body);
  transition: all 0.1s; text-decoration: none;
}
.sidebar-item:hover { background: var(--bg-alt); color: var(--text); }
.sidebar-item.active {
  background: var(--green-50); color: var(--green); font-weight: 600;
}
.sidebar-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.6; }
.sidebar-item.active svg { opacity: 1; }
.sidebar-footer {
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 8px; padding: 8px;
}
.sidebar-avatar {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--green); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-info .name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info .plan { font-size: 11px; color: var(--green); font-weight: 600; }
.sidebar-logout {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s;
  margin-top: 6px; width: 100%;
  background: none; border: none;
}
.sidebar-logout:hover { background: #fef2f2; color: var(--red); }
.sidebar-logout svg { width: 16px; height: 16px; }

/* Mobile */
.mobile-header {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  height: 52px; z-index: 60;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center; justify-content: space-between;
}
.mobile-header .nav-logo { font-size: 16px; }
.hamburger-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text);
}
.sidebar-overlay {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3); z-index: 45;
}

/* Main Content */
.main-content {
  flex: 1; margin-left: var(--sidebar-w);
  padding: 28px; max-width: 1000px; min-height: 100vh;
}

/* Page Header */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.page-header h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.page-header-actions { display: flex; align-items: center; gap: 10px; }
.header-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px;
  background: var(--green-50); border: 1px solid var(--green-light);
  font-size: 12px; font-weight: 600; color: var(--green);
}
.header-badge .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }


/* ==========================================================================
   DASHBOARD
   ========================================================================== */
.stat-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  padding: 18px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.stat-card-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; }
.stat-card-value { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.stat-card-value.green { color: var(--green); }
.stat-card-value.blue { color: var(--blue); }
.stat-card-value.purple { color: var(--purple); }
.stat-card-value.amber { color: var(--amber); }
.stat-card-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Chart */
.chart-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.chart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.chart-header h3 { font-size: 15px; font-weight: 600; }
.chart-tabs { display: flex; gap: 2px; }
.chart-tab {
  padding: 5px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 500;
  color: var(--text-muted); background: transparent;
  border: none; transition: all 0.1s;
}
.chart-tab:hover { color: var(--text-body); }
.chart-tab.active { background: var(--bg-alt); color: var(--text); }
.chart-area { position: relative; width: 100%; height: 200px; }
.chart-area svg { width: 100%; height: 100%; }
.chart-legend { display: flex; gap: 16px; margin-top: 6px; }
.chart-legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text-muted);
}
.chart-legend-item .swatch { width: 10px; height: 2px; border-radius: 1px; }

/* Two-column */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* Card */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-header h3 { font-size: 15px; font-weight: 600; }
.card-header .card-meta { font-size: 12px; color: var(--text-muted); }

/* Quick Start */
.quick-start {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.quick-start h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.quick-start-code {
  background: var(--bg-code); border-radius: 8px; overflow: hidden;
}
.quick-start-code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: #1e293b;
}
.quick-start-code-header span {
  font-size: 11px; color: #94a3b8; font-family: var(--mono);
}
.quick-start-code-header .btn-outline {
  color: #94a3b8; border-color: #334155;
  padding: 4px 10px; font-size: 11px;
}
.quick-start-code-header .btn-outline:hover { color: #e2e8f0; border-color: #475569; }
.quick-start-code pre {
  padding: 14px; font-family: var(--mono); font-size: 13px;
  line-height: 1.7; overflow-x: auto; color: #e2e8f0;
}
.quick-start-code pre .comment { color: #64748b; }
.quick-start-code pre .string { color: #6ee7b7; }
.quick-start-code pre .keyword { color: #c084fc; }
.quick-start-code pre .key { color: #93c5fd; }


/* ==========================================================================
   API KEYS
   ========================================================================== */
.api-key-list { margin-top: 6px; }
.api-key-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.api-key-row:last-child { border-bottom: none; }
.api-key-name { font-size: 13px; font-weight: 600; min-width: 100px; }
.api-key-value {
  flex: 1; font-family: var(--mono); font-size: 12px; color: var(--text-muted);
  background: var(--bg-alt); padding: 7px 10px; border-radius: 6px;
  border: 1px solid var(--border);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.api-key-status {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 100px;
}
.api-key-status.active { background: var(--green-50); color: var(--green); }
.api-key-status.revoked { background: #fef2f2; color: var(--red); }
.api-key-actions { display: flex; gap: 4px; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); transition: all 0.1s;
}
.icon-btn:hover { border-color: #d1d5db; color: var(--text-body); }
.icon-btn.danger:hover { border-color: #fecaca; color: var(--red); }

.new-key-form { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; }
.new-key-form input {
  flex: 1; padding: 9px 12px; border-radius: 7px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; outline: none;
}
.new-key-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(5,150,105,0.08); }

.created-key-display {
  background: var(--green-50); border: 1px solid var(--green-light);
  border-radius: var(--radius); padding: 16px; margin-bottom: 20px;
}
.created-key-display .label { font-size: 12px; color: var(--green); font-weight: 700; margin-bottom: 6px; }
.created-key-display .key-display { display: flex; align-items: center; gap: 10px; }
.created-key-display .key-value {
  flex: 1; font-family: var(--mono); font-size: 12px;
  background: var(--bg); padding: 8px 12px; border-radius: 6px;
  border: 1px solid var(--green-light); color: var(--green);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.created-key-display .warning { font-size: 11px; color: var(--amber); margin-top: 6px; }


/* ==========================================================================
   BILLING
   ========================================================================== */
.billing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

.billing-plan-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.billing-plan-card .plan-tier {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--green); margin-bottom: 6px;
}
.billing-plan-card .plan-price { font-size: 32px; font-weight: 800; letter-spacing: -1.5px; }
.billing-plan-card .plan-price span { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.billing-plan-card .plan-detail { font-size: 13px; color: var(--text-body); margin-top: 6px; line-height: 1.5; }
.billing-plan-card .plan-limits { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.billing-plan-card .plan-limit {
  font-size: 11px; color: var(--text-muted);
  padding: 3px 8px; border-radius: 5px;
  background: var(--bg-alt); border: 1px solid var(--border);
}

.wallet-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.wallet-balance { font-size: 32px; font-weight: 800; letter-spacing: -1.5px; color: var(--green); }
.wallet-balance-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; }

.topup-form { margin-top: 16px; display: flex; gap: 6px; flex-wrap: wrap; }
.topup-amount-btn {
  padding: 6px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg); color: var(--text-body);
  transition: all 0.1s;
}
.topup-amount-btn:hover { border-color: #d1d5db; color: var(--text); }
.topup-amount-btn.selected {
  background: var(--green-50); border-color: var(--green-light); color: var(--green);
}
.topup-custom { display: flex; align-items: center; gap: 6px; }
.topup-custom input {
  width: 70px; padding: 6px 10px; border-radius: 7px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; outline: none;
}
.topup-custom input:focus { border-color: var(--green); }

.credits-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.credit-block { padding: 14px; background: var(--bg-alt); border-radius: 8px; }
.credit-block-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; }
.credit-block-value { font-size: 20px; font-weight: 700; }
.credit-block-value.positive { color: var(--green); }
.credit-block-value.neutral { color: var(--text); }

.auto-topup-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.auto-topup-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auto-topup-config { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.auto-topup-config label { font-size: 12px; color: var(--text-body); }
.auto-topup-config input {
  width: 70px; padding: 5px 8px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 12px; outline: none;
}


/* ==========================================================================
   SETTINGS
   ========================================================================== */
.settings-section { margin-bottom: 28px; }
.settings-section h2 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border); gap: 12px;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row-text { flex: 1; }
.toggle-row-text h4 { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.toggle-row-text p { font-size: 12px; color: var(--text-muted); }
.toggle {
  width: 40px; height: 22px; border-radius: 11px;
  background: #d1d5db; position: relative;
  transition: background 0.2s; flex-shrink: 0;
}
.toggle.on { background: var(--green); }
.toggle::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: white; box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}
.toggle.on::after { transform: translateX(18px); }

.spend-cap-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.spend-cap-row label { font-size: 13px; color: var(--text-body); min-width: 100px; }
.spend-cap-row input {
  width: 100px; padding: 7px 10px; border-radius: 7px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; outline: none;
}
.spend-cap-row input:focus { border-color: var(--green); }

.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.tier-card {
  padding: 16px; background: var(--bg);
  border: 2px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all 0.15s; text-align: center;
}
.tier-card:hover { border-color: #d1d5db; }
.tier-card.current { border-color: var(--green); background: var(--green-50); }
.tier-card .tier-card-name { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.tier-card .tier-card-price { font-size: 18px; font-weight: 800; }
.tier-card .tier-card-price span { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.tier-card .tier-card-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.danger-zone {
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: var(--radius); padding: 20px;
}
.danger-zone h3 { font-size: 15px; font-weight: 700; color: var(--red); margin-bottom: 8px; }
.danger-zone p { font-size: 13px; color: var(--text-body); margin-bottom: 12px; }


/* ==========================================================================
   DOCS PAGE
   ========================================================================== */
.docs-layout { max-width: 760px; margin: 0 auto; padding: 100px 24px 80px; }
.docs-layout h1 { font-size: 32px; font-weight: 800; letter-spacing: -1px; margin-bottom: 8px; }
.docs-layout .docs-sub { font-size: 16px; color: var(--text-body); margin-bottom: 40px; }
.docs-layout h2 {
  font-size: 20px; font-weight: 700; letter-spacing: -0.3px;
  margin-top: 40px; margin-bottom: 12px;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.docs-layout h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.docs-layout h3 { font-size: 16px; font-weight: 700; margin-top: 24px; margin-bottom: 8px; }
.docs-layout p { font-size: 14px; color: var(--text-body); line-height: 1.7; margin-bottom: 12px; }
.docs-layout code {
  background: var(--bg-alt); padding: 2px 6px; border-radius: 4px;
  font-family: var(--mono); font-size: 13px; color: var(--green);
  border: 1px solid var(--border);
}
.docs-layout pre {
  background: var(--bg-code); border-radius: 8px;
  padding: 16px; margin: 16px 0;
  overflow-x: auto; font-family: var(--mono); font-size: 13px;
  line-height: 1.7; color: #e2e8f0;
}
.docs-layout pre code {
  background: none; padding: 0; border: none; border-radius: 0;
  color: inherit;
}
.docs-layout table {
  width: 100%; border-collapse: collapse; margin: 12px 0;
  font-size: 13px;
}
.docs-layout th {
  text-align: left; padding: 8px 12px;
  font-weight: 700; color: var(--text);
  border-bottom: 2px solid var(--border);
}
.docs-layout td {
  padding: 8px 12px; color: var(--text-body);
  border-bottom: 1px solid var(--border);
}
.docs-layout td code { font-size: 12px; }
.docs-nav-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  margin-bottom: 20px; cursor: pointer; transition: color 0.15s;
}
.docs-nav-back:hover { color: var(--green); }


/* ==========================================================================
   SHARED COMPONENTS
   ========================================================================== */

/* Progress bar */
.progress-track {
  width: 100%; height: 6px; border-radius: 3px;
  background: var(--bg-alt); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 3px;
  background: var(--green); transition: width 0.5s ease;
}

.spend-cap-bar { margin-bottom: 12px; }
.spend-cap-labels {
  display: flex; justify-content: space-between;
  font-size: 12px; margin-bottom: 6px;
}
.spend-cap-labels .used { color: var(--text-body); }
.spend-cap-labels .limit { color: var(--text-muted); }

/* Log table */
.log-table { width: 100%; border-collapse: collapse; }
.log-table th {
  text-align: left; padding: 8px 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.log-table td {
  padding: 10px; font-size: 12px; color: var(--text-body);
  border-bottom: 1px solid var(--border);
}
.log-table tr:last-child td { border-bottom: none; }
.log-table .model {
  font-family: var(--mono); font-size: 11px;
  padding: 2px 6px; border-radius: 4px;
  background: var(--bg-alt); color: var(--blue); display: inline-block;
}
.log-table .tokens { font-family: var(--mono); font-size: 11px; }
.log-table .cost { font-family: var(--mono); font-size: 11px; color: var(--amber); }
.log-table .credit-col { font-family: var(--mono); font-size: 11px; color: var(--green); }
.log-table .time { font-size: 11px; color: var(--text-muted); }
.status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 5px; }
.status-dot.success { background: var(--green); }
.status-dot.pending { background: var(--amber); }
.status-dot.error { background: var(--red); }

/* Credit bars */
.credit-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.credit-bar-row .label { font-size: 12px; color: var(--text-body); min-width: 70px; }
.credit-bar-track { flex: 1; height: 5px; border-radius: 3px; background: var(--bg-alt); }
.credit-bar-fill { height: 100%; border-radius: 3px; }
.credit-bar-fill.green { background: var(--green); }
.credit-bar-fill.blue { background: var(--blue); }
.credit-bar-fill.purple { background: var(--purple); }
.credit-bar-row .value { font-size: 11px; color: var(--text-muted); font-family: var(--mono); min-width: 40px; text-align: right; }


/* ==========================================================================
   TOASTS
   ========================================================================== */
#toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 10000;
  display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
}
.toast {
  padding: 12px 16px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 13px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-md); pointer-events: auto;
  transform: translateX(120%); opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 360px;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.removing { transform: translateX(120%); opacity: 0; }
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success { border-color: var(--green-light); }
.toast.success .toast-icon { color: var(--green); }
.toast.error { border-color: #fecaca; }
.toast.error .toast-icon { color: var(--red); }
.toast.info { border-color: #bfdbfe; }
.toast.info .toast-icon { color: var(--blue); }


/* ==========================================================================
   LOADING / ERROR / EMPTY
   ========================================================================== */
.loading-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px; color: var(--text-muted);
}
.loading-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state p { font-size: 13px; }

.error-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center;
}
.error-state .error-icon { width: 40px; height: 40px; margin-bottom: 12px; color: var(--red); }
.error-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.error-state p { font-size: 13px; color: var(--text-muted); max-width: 360px; margin-bottom: 16px; }

.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 24px; text-align: center;
}
.empty-state .empty-icon { width: 40px; height: 40px; margin-bottom: 12px; color: var(--text-muted); }
.empty-state p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }

/* Modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  max-width: 440px; width: 100%;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}
.modal h3 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.modal p { font-size: 13px; color: var(--text-body); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .billing-grid { grid-template-columns: 1fr; }
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .ide-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 380px; margin-left: auto; margin-right: auto; }
  .models-grid { grid-template-columns: repeat(2, 1fr); }
  .models-grid-premier { grid-template-columns: repeat(2, 1fr); }
  .nav-links a:not(.nav-cta):not(.nav-login-btn) { display: none; }

  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .mobile-header { display: flex; }
  .main-content { margin-left: 0; padding-top: 64px; }
  .two-col { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 28px; letter-spacing: -0.8px; }
  .hero p { font-size: 15px; }
  .hero-dark { padding: 120px 16px 64px; }
  .hero-dark h1 { font-size: 32px; letter-spacing: -1px; }
  .hero-desc { font-size: 15px; }
  .hero-code-float { margin-top: 32px; }
  .hero-code-float pre { font-size: 11px; padding: 14px; }
  .landing-section { padding: 56px 16px; }
  .models-grid { grid-template-columns: 1fr; }
  .models-grid-premier { grid-template-columns: 1fr; }
  .cta-dark { padding: 64px 16px; }
  .main-content { padding: 12px; padding-top: 64px; }
  .stat-cards { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .tier-grid { grid-template-columns: 1fr; }
  .api-key-row { flex-wrap: wrap; }
  .api-key-value { min-width: 0; }
  .new-key-form { flex-direction: column; }
  .new-key-form input { width: 100%; }
  .docs-layout { padding: 80px 16px 60px; }
  .footer-inner-dark { flex-direction: column; text-align: center; }
}
