/* ═══════════════════════════════════════════
   radz.xyz — CreatorSuite AI
   Design: Dark-first SaaS, Syne + DM Sans
   ═══════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --sidebar-w: 240px;
  --topbar-h: 72px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

[data-theme="dark"] {
  --bg-base:    #09090e;
  --bg-surface: #111118;
  --bg-card:    #16161f;
  --bg-elevated:#1e1e2a;
  --bg-input:   #1a1a25;
  --border:     rgba(255,255,255,0.07);
  --border-focus: rgba(99,102,241,0.6);
  --text-primary:   #f0f0f8;
  --text-secondary: #8b8ba8;
  --text-muted:     #555570;
  --accent:   #6366f1;
  --accent-2: #a78bfa;
  --accent-3: #34d399;
  --accent-warm: #f59e0b;
  --accent-rose: #f43f5e;
  --glow: rgba(99,102,241,0.15);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
}

[data-theme="light"] {
  --bg-base:    #f4f4f8;
  --bg-surface: #ffffff;
  --bg-card:    #ffffff;
  --bg-elevated:#f8f8fc;
  --bg-input:   #f0f0f6;
  --border:     rgba(0,0,0,0.08);
  --border-focus: rgba(99,102,241,0.5);
  --text-primary:   #0f0f18;
  --text-secondary: #555575;
  --text-muted:     #9999b5;
  --accent:   #5b5ef4;
  --accent-2: #7c3aed;
  --accent-3: #059669;
  --accent-warm: #d97706;
  --accent-rose: #e11d48;
  --glow: rgba(99,102,241,0.08);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-mark {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--glow);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.logo-dot { color: var(--accent); }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 450;
  transition: all var(--transition);
  cursor: pointer;
}

.nav-item svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--glow);
  color: var(--accent);
  font-weight: 500;
}

.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.plan-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.plan-icon { font-size: 18px; }

.plan-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.plan-limit {
  font-size: 11px;
  color: var(--text-muted);
}

.usage-bar {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* ══════════════════════════════════════════
   MOBILE HEADER
══════════════════════════════════════════ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 200;
}

.hamburger {
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.mobile-logo span { color: var(--accent); }

.theme-toggle-mobile {
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
}

.theme-toggle-mobile svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ══════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOPBAR ── */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {}
.page-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.page-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: block; }

.api-key-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 12px;
  color: var(--text-secondary);
}

.api-key-status:hover { border-color: var(--accent); }

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-rose);
  flex-shrink: 0;
}

.api-key-status.connected .status-dot { background: var(--accent-3); }
.api-key-status.connected .status-text::after { content: ' Connected'; }

/* ── VIEWS ── */
.view { display: none; padding: 28px; flex: 1; }
.view.active { display: block; animation: fadeIn 0.2s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   COMPONENTS
══════════════════════════════════════════ */

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--glow);
}
.btn-primary:hover {
  background: #5254e6;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text-primary); }

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
}

.card:hover { border-color: rgba(99,102,241,0.2); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── FORM ELEMENTS ── */
.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, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color var(--transition);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8ba8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ── GRID ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* ── STAT CARDS ── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.stat-delta {
  font-size: 11px;
  font-weight: 500;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.stat-delta.up { color: var(--accent-3); }
.stat-delta.down { color: var(--accent-rose); }

/* ── BADGE ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
}

.badge-accent { background: var(--glow); color: var(--accent); border: 1px solid rgba(99,102,241,0.2); }
.badge-green { background: rgba(52,211,153,0.1); color: var(--accent-3); border: 1px solid rgba(52,211,153,0.2); }
.badge-amber { background: rgba(245,158,11,0.1); color: var(--accent-warm); border: 1px solid rgba(245,158,11,0.2); }
.badge-rose { background: rgba(244,63,94,0.1); color: var(--accent-rose); border: 1px solid rgba(244,63,94,0.2); }

/* ── OUTPUT AREA ── */
.output-area {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 200px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
  position: relative;
}

.output-placeholder {
  color: var(--text-muted);
  font-style: italic;
  font-size: 13px;
}

.output-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ── LOADING SPINNER ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-dots span {
  display: inline-block;
  animation: blink 1.4s infinite both;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 450;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  white-space: nowrap;
}

.tab:hover { color: var(--text-primary); }
.tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ── SECTION HEADER ── */
.section-header {
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── PLATFORM ICONS ── */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.platform-btn:hover, .platform-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--glow);
}

.platform-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

/* ── PRICING CARDS ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--glow);
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: 14px; right: -28px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 36px;
  transform: rotate(45deg);
  letter-spacing: 0.05em;
}

.pricing-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.pricing-amount {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
}

.pricing-period {
  font-size: 13px;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.pricing-features li {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--accent-3);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

/* ── HISTORY ITEM ── */
.history-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
}

.history-item:hover { border-color: rgba(99,102,241,0.3); background: var(--bg-elevated); }

.history-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.history-content { flex: 1; min-width: 0; }

.history-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.history-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.icon-btn {
  width: 28px; height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all var(--transition);
  font-size: 13px;
}

.icon-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* ── KEYWORD TAGS ── */
.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.keyword-tag {
  padding: 5px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.keyword-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--glow);
}

/* ── SEO SCORE ── */
.seo-score-ring {
  width: 80px; height: 80px;
  position: relative;
  flex-shrink: 0;
}

.seo-score-ring svg { transform: rotate(-90deg); }

.seo-score-ring circle {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}

.seo-score-bg { stroke: var(--border); }
.seo-score-fill { stroke: var(--accent); stroke-dasharray: 220; stroke-dashoffset: 220; transition: stroke-dashoffset 1s ease; }

.seo-score-num {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

/* ── QUICK ACTIONS ── */
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.quick-action:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.quick-action-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.quick-action-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.quick-action-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── TOAST ── */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInUp 0.3s ease;
  max-width: 320px;
}

.toast.success { border-color: rgba(52,211,153,0.3); }
.toast.error { border-color: rgba(244,63,94,0.3); }

@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideOutDown {
  to { transform: translateY(20px); opacity: 0; }
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 28px; height: 28px;
  background: var(--bg-elevated);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover { color: var(--text-primary); }

.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  margin-bottom: 16px;
}

.modal-input:focus { border-color: var(--accent); }

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.modal-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.modal-note a { color: var(--accent); text-decoration: none; }

/* ── SIDEBAR OVERLAY (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
}

.empty-icon { font-size: 40px; opacity: 0.5; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.empty-desc { font-size: 13px; color: var(--text-muted); }

/* ── RANGE SLIDER ── */
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── TOGGLE ── */
.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.toggle-label { font-size: 14px; color: var(--text-primary); }
.toggle-desc { font-size: 12px; color: var(--text-muted); }

.toggle {
  width: 40px; height: 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.toggle.on { background: var(--accent); border-color: var(--accent); }

.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.toggle.on::after { left: 20px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-overlay.open { display: block; }
  .mobile-header { display: flex; }
  .main-content { margin-left: 0; padding-top: 56px; }
  .topbar { display: none; }
  .view { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .platform-grid { grid-template-columns: repeat(3, 1fr); }
  .tabs { gap: 2px; }
  .tab { padding: 6px 10px; font-size: 12px; }
}

/* ── HERO GRADIENT ── */
.hero-gradient {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99,102,241,0.12), transparent);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(167,139,250,0.08), transparent);
  border-radius: 50%;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.hero-title span { color: var(--accent); }

.hero-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ── PROGRESS BAR ── */
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* ── COPY BUTTON STATES ── */
.btn-copy.copied {
  background: rgba(52,211,153,0.1);
  color: var(--accent-3);
  border-color: rgba(52,211,153,0.3);
}

/* Utilities */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.font-display { font-family: var(--font-display); }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
