/* ═══════════════════════════════════════════════════
   OpenEdgeAI Lead Router — Shared Styles
   ═══════════════════════════════════════════════════ */

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

/* ── Theme: Midnight Violet (default) ── */
:root, [data-theme="midnight-violet"] {
  --bg-deep: #06060b;
  --bg-surface: #0c0c14;
  --bg-card: rgba(14, 14, 24, 0.7);
  --bg-glass: rgba(18, 18, 32, 0.5);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text-primary: #e8e8f0;
  --text-secondary: rgba(232, 232, 240, 0.55);
  --text-tertiary: rgba(232, 232, 240, 0.35);
  --accent-blue: #4f7df7;
  --accent-violet: #8b5cf6;
  --accent-cyan: #22d3ee;
  --accent-green: #34d399;
  --accent-amber: #fbbf24;
  --accent-rose: #f472b6;
  --gradient-hero: linear-gradient(135deg, #4f7df7 0%, #8b5cf6 50%, #c084fc 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(79, 125, 247, 0.15), rgba(139, 92, 246, 0.08));
  --orb1: #4f7df7; --orb2: #8b5cf6; --orb3: #c084fc;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
}

[data-theme="ember-orange"] {
  --bg-deep: #0b0806; --bg-surface: #141008; --bg-card: rgba(20,16,8,0.7); --bg-glass: rgba(28,22,12,0.5);
  --border: rgba(255,200,100,0.06); --border-hover: rgba(255,200,100,0.12);
  --text-primary: #f5ebe0; --text-secondary: rgba(245,235,224,0.55); --text-tertiary: rgba(245,235,224,0.35);
  --accent-blue: #f97316; --accent-violet: #ea580c; --accent-cyan: #fb923c;
  --gradient-hero: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #dc2626 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(249,115,22,0.15), rgba(234,88,12,0.08));
  --orb1: #f97316; --orb2: #ea580c; --orb3: #dc2626;
}

[data-theme="ocean-teal"] {
  --bg-deep: #04090b; --bg-surface: #071214; --bg-card: rgba(7,18,20,0.7); --bg-glass: rgba(10,24,28,0.5);
  --border: rgba(100,220,255,0.06); --border-hover: rgba(100,220,255,0.12);
  --text-primary: #e0f2f1; --text-secondary: rgba(224,242,241,0.55); --text-tertiary: rgba(224,242,241,0.35);
  --accent-blue: #14b8a6; --accent-violet: #0d9488; --accent-cyan: #22d3ee;
  --gradient-hero: linear-gradient(135deg, #14b8a6 0%, #06b6d4 50%, #22d3ee 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(20,184,166,0.15), rgba(6,182,212,0.08));
  --orb1: #14b8a6; --orb2: #06b6d4; --orb3: #22d3ee;
}

[data-theme="neon-mint"] {
  --bg-deep: #050b08; --bg-surface: #0a140e; --bg-card: rgba(10,20,14,0.7); --bg-glass: rgba(14,28,18,0.5);
  --border: rgba(100,255,180,0.06); --border-hover: rgba(100,255,180,0.12);
  --text-primary: #e8f5e9; --text-secondary: rgba(232,245,233,0.55); --text-tertiary: rgba(232,245,233,0.35);
  --accent-blue: #10b981; --accent-violet: #059669; --accent-cyan: #34d399;
  --gradient-hero: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(5,150,105,0.08));
  --orb1: #10b981; --orb2: #059669; --orb3: #6ee7b7;
}

[data-theme="rose-gold"] {
  --bg-deep: #0b0608; --bg-surface: #140c10; --bg-card: rgba(20,12,16,0.7); --bg-glass: rgba(28,16,22,0.5);
  --border: rgba(255,150,180,0.06); --border-hover: rgba(255,150,180,0.12);
  --text-primary: #fce4ec; --text-secondary: rgba(252,228,236,0.55); --text-tertiary: rgba(252,228,236,0.35);
  --accent-blue: #ec4899; --accent-violet: #db2777; --accent-cyan: #f472b6;
  --gradient-hero: linear-gradient(135deg, #ec4899 0%, #db2777 50%, #be185d 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(236,72,153,0.15), rgba(219,39,119,0.08));
  --orb1: #ec4899; --orb2: #db2777; --orb3: #f9a8d4;
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Sora', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ── Utility ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Background orbs ── */
.bg-orbs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.25; animation: orbFloat 20s ease-in-out infinite; }
.orb-1 { width: 500px; height: 500px; background: var(--orb1, #4f7df7); top: -200px; left: -100px; }
.orb-2 { width: 400px; height: 400px; background: var(--orb2, #8b5cf6); top: -80px; right: -150px; animation-delay: -7s; }
.orb-3 { width: 350px; height: 350px; background: var(--orb3, #c084fc); bottom: -100px; left: 30%; animation-delay: -14s; opacity: 0.15; }

.bg-grid {
  position: fixed; inset: 0;
  background-image: linear-gradient(rgba(79,125,247,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(79,125,247,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ── Navigation ── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 14px 24px;
  background: rgba(6, 6, 11, 0.8);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--gradient-hero); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: white; }
.logo-text { font-weight: 600; font-size: 16px; color: var(--text-primary); letter-spacing: -0.02em; }
.logo-text span { color: var(--text-secondary); font-weight: 400; }

.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 13.5px; font-weight: 400; transition: color 0.2s; }
.nav-links a:hover { color: var(--text-primary); }

.btn-nav { padding: 8px 18px; background: rgba(79,125,247,0.12); border: 1px solid rgba(79,125,247,0.25); border-radius: 8px; color: var(--accent-blue) !important; font-weight: 500 !important; transition: all 0.2s; }
.btn-nav:hover { background: rgba(79,125,247,0.2) !important; border-color: rgba(79,125,247,0.4); }
.btn-nav-ghost { padding: 8px 18px; color: var(--text-secondary) !important; font-weight: 400 !important; transition: color 0.2s; }
.btn-nav-ghost:hover { color: var(--text-primary) !important; }

/* ── Buttons ── */
.btn-primary {
  width: 100%; padding: 14px 32px; background: var(--gradient-hero); border: none; border-radius: 12px;
  color: white; font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: all 0.25s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; position: relative; overflow: hidden;
}
.btn-primary::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent); opacity: 0; transition: opacity 0.25s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(79,125,247,0.3); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  width: 100%; padding: 14px 32px; background: var(--bg-glass); border: 1px solid var(--border-hover); border-radius: 12px;
  color: var(--text-primary); font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 400; cursor: pointer;
  transition: all 0.25s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; backdrop-filter: blur(10px);
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.2); background: rgba(18,18,32,0.8); transform: translateY(-2px); }

.btn-sm {
  padding: 8px 16px; border-radius: 8px; font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 400;
  cursor: pointer; transition: all 0.2s; text-decoration: none; border: 1px solid var(--border-hover);
  background: var(--bg-glass); color: var(--text-secondary); display: inline-flex; align-items: center; gap: 6px;
}
.btn-sm:hover { border-color: rgba(255,255,255,0.2); color: var(--text-primary); }
.btn-sm-danger { border-color: rgba(239,68,68,0.2); color: rgba(239,68,68,0.7); }
.btn-sm-danger:hover { border-color: rgba(239,68,68,0.4); color: #ef4444; background: rgba(239,68,68,0.08); }

/* ── Keyframes ── */
@keyframes orbFloat { 0%, 100% { transform: translate(0,0) scale(1); } 33% { transform: translate(30px,-20px) scale(1.05); } 66% { transform: translate(-20px,15px) scale(0.95); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Auth card ── */
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 100px 24px 80px; }
.auth-card { width: 100%; max-width: 440px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; backdrop-filter: blur(20px); animation: cardIn 0.6s cubic-bezier(0.22,1,0.36,1) both; position: relative; z-index: 1; }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header h1 { font-family: 'Instrument Serif', serif; font-size: 32px; font-weight: 400; letter-spacing: -0.02em; margin-bottom: 8px; }
.auth-header h1 em { font-style: italic; background: var(--gradient-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.auth-header p { font-size: 14px; color: var(--text-secondary); font-weight: 300; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-secondary); }
.auth-footer a { color: var(--accent-blue); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.auth-footer a:hover { color: #6b93f8; text-decoration: underline; }

/* ── Form ── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 0.02em; }
.form-input {
  width: 100%; padding: 12px 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary); font-family: 'Sora', sans-serif; font-size: 14px;
  font-weight: 400; outline: none; transition: all 0.2s;
}
.form-input::placeholder { color: var(--text-tertiary); font-weight: 300; }
.form-input:focus { border-color: rgba(79,125,247,0.5); box-shadow: 0 0 0 3px rgba(79,125,247,0.1); background: rgba(79,125,247,0.03); }
.form-input:hover:not(:focus) { border-color: var(--border-hover); }

.form-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.form-check input[type="checkbox"] { appearance: none; width: 18px; height: 18px; border: 1px solid var(--border-hover); border-radius: 4px; background: rgba(255,255,255,0.03); cursor: pointer; flex-shrink: 0; margin-top: 1px; transition: all 0.2s; }
.form-check input[type="checkbox"]:checked { background: var(--accent-blue); border-color: var(--accent-blue); }
.form-check label { font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; cursor: pointer; }
.form-check label a { color: var(--accent-blue); text-decoration: none; }

/* Password strength */
.pw-strength { display: flex; gap: 4px; margin-top: 8px; }
.pw-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.06); transition: background 0.3s; }
.pw-bar.active-weak { background: #ef4444; }
.pw-bar.active-medium { background: var(--accent-amber); }
.pw-bar.active-strong { background: var(--accent-green); }
.pw-label { font-size: 11px; margin-top: 4px; font-weight: 400; }
.pw-label.weak { color: #ef4444; }
.pw-label.medium { color: var(--accent-amber); }
.pw-label.strong { color: var(--accent-green); }

/* ── Alert banner ── */
.alert-banner { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13px; animation: fadeUp 0.4s ease both; }
.alert-warning { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.15); color: var(--accent-amber); }
.alert-warning a { color: var(--accent-amber); font-weight: 500; text-decoration: underline; cursor: pointer; }
.alert-error { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.15); color: #ef4444; }
.alert-success { background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.15); color: var(--accent-green); }

/* ── Verify email ── */
.verify-card { text-align: center; max-width: 480px; }
.verify-icon { width: 80px; height: 80px; margin: 0 auto 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; animation: scaleIn 0.5s cubic-bezier(0.22,1,0.36,1) 0.2s both; }
.verify-icon svg { width: 36px; height: 36px; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.verify-icon svg .check-path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: drawCheck 0.6s ease 0.6s forwards; }
.verify-card h1 { font-family: 'Instrument Serif', serif; font-size: 36px; font-weight: 400; margin-bottom: 12px; animation: fadeUp 0.5s ease 0.3s both; }
.verify-card h1 em { font-style: italic; background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.verify-card p { font-size: 15px; color: var(--text-secondary); font-weight: 300; line-height: 1.6; margin-bottom: 32px; animation: fadeUp 0.5s ease 0.4s both; }

/* Confetti */
.confetti-container { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.confetti-piece { position: absolute; width: 8px; height: 8px; border-radius: 2px; top: -10px; animation: confettiFall 3s linear forwards; }
@keyframes confettiFall { 0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg) scale(0.5); opacity: 0; } }

/* Spinner */
.spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--accent-blue); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 24px; }

/* ── Dashboard ── */
.dash-wrapper { min-height: 100vh; padding: 80px 24px 60px; position: relative; z-index: 1; }
.dash-container { max-width: 960px; margin: 0 auto; }
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; animation: fadeUp 0.5s ease both; }
.dash-user { display: flex; align-items: center; gap: 16px; }
.dash-avatar { width: 52px; height: 52px; border-radius: 14px; background: var(--gradient-hero); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 18px; color: white; }
.dash-user-info h2 { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.dash-user-info p { font-size: 13px; color: var(--text-secondary); font-weight: 300; }
.dash-actions { display: flex; gap: 10px; }

.tier-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.tier-free { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid rgba(255,255,255,0.08); }
.tier-pro { background: linear-gradient(135deg, rgba(52,211,153,0.15), rgba(34,211,238,0.1)); color: var(--accent-green); border: 1px solid rgba(52,211,153,0.2); }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; animation: fadeUp 0.5s ease 0.1s both; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; backdrop-filter: blur(10px); transition: border-color 0.2s; }
.stat-card:hover { border-color: var(--border-hover); }
.stat-label { font-size: 11.5px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.stat-value .stat-unit { font-size: 14px; color: var(--text-secondary); font-weight: 400; margin-left: 2px; }
.stat-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }

.dash-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 16px; backdrop-filter: blur(10px); animation: fadeUp 0.5s ease 0.2s both; }
.dash-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.dash-card-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dash-card-title svg { width: 16px; height: 16px; stroke: var(--accent-blue); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.dash-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; animation: fadeUp 0.5s ease 0.3s both; }

/* Upgrade banner */
.upgrade-banner { background: linear-gradient(135deg, rgba(79,125,247,0.08), rgba(139,92,246,0.06)); border: 1px solid rgba(79,125,247,0.15); border-radius: var(--radius); padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; animation: fadeUp 0.5s ease 0.15s both; }
.upgrade-banner h3 { font-family: 'Instrument Serif', serif; font-size: 22px; font-weight: 400; margin-bottom: 6px; }
.upgrade-banner h3 em { font-style: italic; background: var(--gradient-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.upgrade-banner p { font-size: 13px; color: var(--text-secondary); font-weight: 300; }
.upgrade-features { display: flex; gap: 16px; margin-top: 10px; }
.upgrade-feat { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-secondary); }
.upgrade-feat svg { width: 14px; height: 14px; stroke: var(--accent-green); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-upgrade { padding: 12px 28px; background: var(--gradient-hero); border: none; border-radius: 12px; color: white; font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.25s; white-space: nowrap; position: relative; overflow: hidden; flex-shrink: 0; }
.btn-upgrade::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent); opacity: 0; transition: opacity 0.25s; }
.btn-upgrade:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(79,125,247,0.3); }
.btn-upgrade:hover::before { opacity: 1; }

/* License key */
.license-display { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: rgba(255,255,255,0.02); border: 1px solid rgba(52,211,153,0.12); border-radius: var(--radius-sm); }
.license-key { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 600; color: var(--text-primary); letter-spacing: 0.05em; flex: 1; }
.license-masked { color: var(--text-tertiary); }
.btn-reveal { padding: 6px 12px; border-radius: var(--radius-xs); background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2); color: var(--accent-green); font-family: 'Sora', sans-serif; font-size: 11px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.btn-reveal:hover { background: rgba(52,211,153,0.18); border-color: rgba(52,211,153,0.35); }
.btn-copy { padding: 6px 12px; border-radius: var(--radius-xs); background: rgba(79,125,247,0.1); border: 1px solid rgba(79,125,247,0.2); color: var(--accent-blue); font-family: 'Sora', sans-serif; font-size: 11px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.btn-copy:hover { background: rgba(79,125,247,0.18); border-color: rgba(79,125,247,0.35); }
.license-meta { display: flex; gap: 24px; margin-top: 16px; }
.license-meta-item { font-size: 12px; color: var(--text-tertiary); }
.license-meta-item strong { color: var(--text-secondary); font-weight: 500; }

/* Terminal block */
.cli-block { background: #0a0a14; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.cli-titlebar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.04); }
.cli-dot { width: 8px; height: 8px; border-radius: 50%; }
.cli-dot-r { background: #ff5f57; } .cli-dot-y { background: #febc2e; } .cli-dot-g { background: #28c840; }
.cli-titlebar-text { flex: 1; text-align: center; font-size: 10px; color: var(--text-tertiary); font-family: 'JetBrains Mono', monospace; }
.cli-body { padding: 16px 20px; font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.7; position: relative; }
.cli-line { display: flex; gap: 8px; }
.cli-prompt-char { color: var(--accent-green); user-select: none; }
.cli-cmd-text { color: var(--text-secondary); }
.cli-comment { color: var(--text-tertiary); font-style: italic; }
.cli-copy-btn { position: absolute; top: 12px; right: 12px; padding: 4px 10px; border-radius: 5px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: var(--text-tertiary); font-family: 'Sora', sans-serif; font-size: 10px; cursor: pointer; transition: all 0.2s; }
.cli-copy-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-secondary); }

/* Info rows */
.info-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 13px; color: var(--text-tertiary); }
.info-value { font-size: 13px; color: var(--text-primary); font-weight: 500; }

/* ── Admin Dashboard ── */
.admin-wrapper { min-height: 100vh; padding: 80px 24px 60px; position: relative; z-index: 1; }
.admin-container { max-width: 1200px; margin: 0 auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; animation: fadeUp 0.5s ease both; }
.admin-header h1 { font-family: 'Instrument Serif', serif; font-size: 28px; font-weight: 400; }
.admin-header h1 em { font-style: italic; background: var(--gradient-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.admin-top-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 24px; animation: fadeUp 0.5s ease 0.05s both; }
.admin-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; backdrop-filter: blur(10px); transition: border-color 0.2s; }
.admin-stat:hover { border-color: var(--border-hover); }
.admin-stat .stat-label { font-size: 10.5px; margin-bottom: 6px; }
.admin-stat .stat-value { font-size: 24px; }
.admin-stat .stat-change { font-size: 11px; margin-top: 4px; display: flex; align-items: center; gap: 3px; }
.stat-change.up { color: var(--accent-green); }
.stat-change.down { color: #ef4444; }

.admin-charts { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; animation: fadeUp 0.5s ease 0.1s both; }
.chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; backdrop-filter: blur(10px); }
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.chart-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chart-title svg { width: 16px; height: 16px; stroke: var(--accent-blue); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-period { display: flex; gap: 2px; }
.period-btn { padding: 4px 10px; border-radius: 5px; background: transparent; border: none; color: var(--text-tertiary); font-family: 'Sora', sans-serif; font-size: 11px; cursor: pointer; transition: all 0.2s; }
.period-btn:hover { color: var(--text-secondary); }
.period-btn.active { background: rgba(79,125,247,0.12); color: var(--accent-blue); }
.chart-area { width: 100%; height: 180px; position: relative; }
.chart-area svg { width: 100%; height: 100%; }

.funnel-container { display: flex; flex-direction: column; gap: 8px; }
.funnel-step { display: flex; align-items: center; gap: 12px; }
.funnel-bar-wrap { flex: 1; height: 32px; background: rgba(255,255,255,0.02); border-radius: 6px; overflow: hidden; position: relative; }
.funnel-bar { height: 100%; border-radius: 6px; display: flex; align-items: center; padding: 0 12px; font-size: 11px; font-weight: 500; color: white; transition: width 1s cubic-bezier(0.22,1,0.36,1); }
.funnel-label { width: 90px; font-size: 12px; color: var(--text-secondary); text-align: right; flex-shrink: 0; }
.funnel-rate { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; text-align: center; font-family: 'JetBrains Mono', monospace; }

.admin-revenue { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; animation: fadeUp 0.5s ease 0.15s both; }

/* Admin table */
.admin-table-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); backdrop-filter: blur(10px); overflow: hidden; animation: fadeUp 0.5s ease 0.2s both; }
.table-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.table-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.table-title svg { width: 16px; height: 16px; stroke: var(--accent-blue); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.table-actions { display: flex; gap: 8px; }
.admin-search {
  padding: 6px 12px 6px 32px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-primary); font-family: 'Sora', sans-serif; font-size: 12px; outline: none; width: 200px; transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(232,232,240,0.35)' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center;
}
.admin-search::placeholder { color: var(--text-tertiary); }
.admin-search:focus { border-color: rgba(79,125,247,0.4); }
.btn-export { padding: 6px 14px; border-radius: 6px; background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2); color: var(--accent-green); font-family: 'Sora', sans-serif; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 5px; }
.btn-export:hover { background: rgba(52,211,153,0.18); }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-size: 10.5px; font-weight: 500; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 16px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.01); cursor: pointer; }
.admin-table th:hover { color: var(--text-secondary); }
.admin-table td { padding: 14px 16px; font-size: 13px; color: var(--text-secondary); border-bottom: 1px solid rgba(255,255,255,0.03); }
.admin-table tr:hover td { background: rgba(79,125,247,0.03); }
.admin-table .user-name { color: var(--text-primary); font-weight: 500; }
.admin-table .user-email { font-size: 12px; color: var(--text-tertiary); }

.badge-verified { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 500; background: rgba(52,211,153,0.1); color: var(--accent-green); }
.badge-unverified { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 500; background: rgba(251,191,36,0.1); color: var(--accent-amber); }

.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-tertiary); }
.table-pagination { display: flex; gap: 4px; }
.page-btn { width: 28px; height: 28px; border-radius: 6px; background: transparent; border: 1px solid var(--border); color: var(--text-tertiary); font-family: 'Sora', sans-serif; font-size: 11px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.page-btn:hover { border-color: var(--border-hover); color: var(--text-secondary); }
.page-btn.active { background: rgba(79,125,247,0.12); border-color: rgba(79,125,247,0.25); color: var(--accent-blue); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .admin-top-stats { grid-template-columns: repeat(3, 1fr); }
  .admin-charts { grid-template-columns: 1fr; }
  .admin-revenue { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .dash-two-col { grid-template-columns: 1fr; }
  .upgrade-banner { flex-direction: column; text-align: center; }
  .upgrade-features { justify-content: center; flex-wrap: wrap; }
  .dash-header { flex-direction: column; gap: 16px; }
  .admin-top-stats { grid-template-columns: 1fr 1fr; }
  .admin-header { flex-direction: column; gap: 12px; }
}

/* -- Docs -- */
.docs-layout { display: grid; grid-template-columns: 260px 1fr 200px; min-height: calc(100vh - 72px); margin-top: 72px; gap: 0; }

.docs-sidebar { position: sticky; top: 72px; height: calc(100vh - 72px); overflow-y: auto; padding: 24px 16px; border-right: 1px solid var(--border); background: var(--bg-card); backdrop-filter: blur(20px); }

.docs-sidebar-section { text-transform: uppercase; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--text-tertiary); padding: 16px 12px 6px; margin-top: 8px; }

.docs-sidebar a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--text-secondary); font-size: 13.5px; text-decoration: none; transition: all 0.2s; border-left: 2px solid transparent; }
.docs-sidebar a:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.docs-sidebar a.active { color: var(--text-primary); background: rgba(79,125,247,0.08); border-left-color: var(--accent-blue); font-weight: 500; }

.docs-sidebar .step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-glass); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--text-tertiary); flex-shrink: 0; }
.docs-sidebar a.active .step-num { background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple, #8b5cf6)); color: #fff; }

.docs-search-wrap { padding: 0 4px 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.docs-search { width: 100%; padding: 8px 12px 8px 34px; background: var(--bg-glass); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 13px; outline: none; }
.docs-search:focus { border-color: var(--accent-blue); }

.docs-content { max-width: 780px; margin: 0 auto; padding: 32px 40px; min-height: 100vh; }
.docs-content .docs-section { margin-bottom: 64px; scroll-margin-top: 90px; }
.docs-content h2 { font-family: 'Instrument Serif', serif; font-size: 28px; color: var(--text-primary); margin-bottom: 16px; line-height: 1.3; }
.docs-content h3 { font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 32px 0 12px; }
.docs-content p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; font-size: 14.5px; }
.docs-content ul, .docs-content ol { color: var(--text-secondary); padding-left: 20px; margin-bottom: 16px; font-size: 14.5px; line-height: 1.8; }

.docs-toc { position: sticky; top: 90px; padding: 24px 16px; font-size: 12px; max-height: calc(100vh - 100px); overflow-y: auto; }
.docs-toc-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-tertiary); margin-bottom: 12px; }
.docs-toc a { display: block; padding: 4px 0 4px 12px; color: var(--text-tertiary); text-decoration: none; border-left: 1px solid var(--border); font-size: 12.5px; transition: all 0.2s; }
.docs-toc a:hover { color: var(--text-secondary); }
.docs-toc a.active { color: var(--accent-blue); border-left-color: var(--accent-blue); }

.docs-breadcrumb { font-size: 13px; color: var(--text-tertiary); margin-bottom: 32px; display: flex; align-items: center; gap: 8px; }
.docs-breadcrumb a { color: var(--text-tertiary); text-decoration: none; transition: color 0.2s; }
.docs-breadcrumb a:hover { color: var(--text-secondary); }

.docs-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 20px 0; }
.docs-video-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all 0.2s; }
.docs-video-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.docs-video-thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, rgba(79,125,247,0.15), rgba(139,92,246,0.15)); display: flex; align-items: center; justify-content: center; position: relative; }
.docs-video-play { width: 56px; height: 56px; background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.2); }
.docs-video-card h4 { padding: 16px 16px 4px; font-size: 14.5px; color: var(--text-primary); }
.docs-video-card p { padding: 0 16px 16px; font-size: 13px; color: var(--text-tertiary); }

.docs-callout { padding: 16px 20px; border-radius: 10px; margin: 16px 0; font-size: 14px; line-height: 1.6; border-left: 3px solid; }
.docs-callout.info { background: rgba(79,125,247,0.08); border-left-color: var(--accent-blue); color: var(--text-secondary); }
.docs-callout.warning { background: rgba(234,179,8,0.08); border-left-color: #eab308; color: var(--text-secondary); }
.docs-callout.tip { background: rgba(34,197,94,0.08); border-left-color: #22c55e; color: var(--text-secondary); }
.docs-callout strong { color: var(--text-primary); display: block; margin-bottom: 4px; }

.docs-faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; overflow: hidden; }
.docs-faq-q { padding: 16px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--text-primary); font-weight: 500; font-size: 14.5px; background: var(--bg-card); transition: background 0.2s; }
.docs-faq-q:hover { background: rgba(255,255,255,0.03); }
.docs-faq-q .faq-icon { transition: transform 0.3s; color: var(--text-tertiary); }
.docs-faq-item.open .faq-icon { transform: rotate(45deg); }
.docs-faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0 20px; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.docs-faq-item.open .docs-faq-a { max-height: 500px; padding: 0 20px 16px; }

.docs-prev-next { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.docs-prev-next a { flex: 1; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; transition: all 0.2s; }
.docs-prev-next a:hover { border-color: var(--accent-blue); background: rgba(79,125,247,0.04); }
.docs-prev-next .label { font-size: 12px; color: var(--text-tertiary); margin-bottom: 4px; }
.docs-prev-next .title { font-size: 14.5px; color: var(--text-primary); font-weight: 500; }
.docs-prev-next .next { text-align: right; }

.docs-changelog-entry { padding: 20px 0; border-bottom: 1px solid var(--border); display: flex; gap: 20px; }
.docs-changelog-date { min-width: 100px; font-size: 13px; color: var(--text-tertiary); font-weight: 500; }
.docs-changelog-body h4 { font-size: 15px; color: var(--text-primary); margin-bottom: 6px; }
.docs-changelog-body p { font-size: 14px; color: var(--text-secondary); }
.docs-changelog-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; margin-right: 8px; }
.docs-changelog-tag.feature { background: rgba(34,197,94,0.15); color: #22c55e; }
.docs-changelog-tag.fix { background: rgba(79,125,247,0.15); color: var(--accent-blue); }
.docs-changelog-tag.improvement { background: rgba(234,179,8,0.15); color: #eab308; }

.docs-code-block { background: #0a0a14; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.docs-code-block .cli-titlebar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.04); }
.docs-code-block .cli-body { padding: 16px 20px; font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.7; position: relative; }
.docs-code-block .cli-copy-btn { position: absolute; top: 12px; right: 12px; padding: 4px 10px; border-radius: 5px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: var(--text-tertiary); font-family: 'Sora', sans-serif; font-size: 10px; cursor: pointer; transition: all 0.2s; }
.docs-code-block .cli-copy-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-secondary); }

.docs-hamburger { display: none; position: fixed; bottom: 20px; right: 20px; z-index: 1001; width: 48px; height: 48px; border-radius: 50%; background: var(--accent-blue); color: white; border: none; cursor: pointer; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }

.docs-mobile-overlay { display: none; }

.docs-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; display: none; }
.docs-backdrop.visible { display: block; }

@media (max-width: 1200px) {
  .docs-layout { grid-template-columns: 260px 1fr; }
  .docs-toc { display: none; }
}
@media (max-width: 768px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar {
    position: fixed; left: -280px; width: 280px; z-index: 1000;
    transition: left 0.3s ease; top: 0; height: 100vh; padding-top: 80px;
  }
  .docs-sidebar.mobile-open { left: 0; }
  .docs-hamburger { display: flex; align-items: center; justify-content: center; }
  .docs-content { padding: 24px 20px; }
  .docs-prev-next { flex-direction: column; }
  .docs-video-grid { grid-template-columns: 1fr; }
}
