/* ============================================================
   ReelCraftly — Premium Dashboard Design System
   Dark glassmorphism theme matching landing page
   ============================================================ */

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

:root {
  --bg: #050810;
  --bg-soft: #0a0f1e;
  --bg-elevated: #0d1228;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-hover: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --text: #eaf0ff;
  --text-secondary: #b8c4e0;
  --muted: #6b7a9e;
  --brand: #7c3aed;
  --brand-2: #a78bfa;
  --brand-3: #06b6d4;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border-brand: rgba(124, 58, 237, 0.35);
  --danger: #fb7185;
  --success: #34d399;
  --warning: #fbbf24;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-brand: 0 0 30px rgba(124, 58, 237, 0.15);
  --glow-purple: rgba(124, 58, 237, 0.25);
  --glow-cyan: rgba(6, 182, 212, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* ---- App Shell Layout ---- */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

/* ---- Sidebar ---- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: rgba(8, 12, 28, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: radial-gradient(ellipse at 30% -20%, var(--glow-purple), transparent 70%);
  pointer-events: none;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  position: relative;
}
.brand small {
  font-weight: 500;
  opacity: 0.5;
  display: block;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  position: relative;
}

.nav a {
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
}

.nav a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.08));
  border-color: var(--border-brand);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav a.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: linear-gradient(180deg, var(--brand), var(--brand-3));
  border-radius: 0 3px 3px 0;
}

/* ---- Main Content ---- */
.main {
  padding: 32px;
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 800px 400px at 70% 0%, rgba(124, 58, 237, 0.08), transparent),
    radial-gradient(ellipse 600px 400px at 100% 20%, rgba(6, 182, 212, 0.05), transparent);
}

/* ---- Topbar ---- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.breadcrumb b { color: var(--text-secondary); }

.topbar h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Cards ---- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.card:hover {
  border-color: var(--border-hover);
}

/* Stat cards */
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-card .muted {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-card h3 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 8px;
  background: linear-gradient(135deg, #fff, var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card:nth-child(2) h3 {
  background: linear-gradient(135deg, #fff, var(--brand-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card:nth-child(3) h3 {
  background: linear-gradient(135deg, #fff, var(--danger));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* ---- Buttons ---- */
.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--brand), #9333ea);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35), 0 0 0 1px rgba(124, 58, 237, 0.2);
}

.btn:hover::before { opacity: 1; }

.btn:active {
  transform: translateY(0);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn.ghost::before { display: none; }

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-color: var(--border-hover);
  box-shadow: none;
  transform: translateY(-1px);
}

.btn.ghost.active {
  background: rgba(124, 58, 237, 0.15);
  color: #fff;
  border-color: var(--border-brand);
}

.btn.danger {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
}

.btn.danger:hover {
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.35);
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), #9333ea);
}

/* ---- Pill / Badge ---- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.pill.danger {
  color: #fca5a5;
  border-color: rgba(251, 113, 133, 0.3);
  background: rgba(225, 29, 72, 0.12);
}

.pill.success {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.1);
}

.badge {
  font-size: 11px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.1));
  color: var(--brand-2);
  border: 1px solid var(--border-brand);
  border-radius: 999px;
  padding: 3px 10px;
  letter-spacing: 0.02em;
}

.muted { color: var(--muted); }

/* ---- Toolbar ---- */
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

/* ---- Forms ---- */
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  background: rgba(5, 8, 16, 0.6);
  color: var(--text);
  transition: all var(--transition);
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 0 20px rgba(124, 58, 237, 0.08);
  background: rgba(5, 8, 16, 0.8);
}

/* ---- Tables ---- */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 12px 14px;
  font-size: 13.5px;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 8px;
  padding-bottom: 8px;
}

.table tr {
  transition: background var(--transition);
}

.table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ---- Cards Grid ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.guide-card, .select-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.guide-card::before, .select-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.guide-card:hover, .select-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.guide-card h4 {
  margin: 10px 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.guide-card p {
  font-size: 13px;
  line-height: 1.5;
}

.select-card { cursor: pointer; }
.select-card.active {
  border-color: var(--border-brand);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.15);
  background: rgba(124, 58, 237, 0.06);
}

/* ---- Toggle ---- */
.toggle {
  position: relative;
  width: 44px;
  height: 26px;
  background: rgba(100, 116, 139, 0.4);
  border-radius: 999px;
  display: inline-block;
  cursor: pointer;
  vertical-align: middle;
  transition: background var(--transition);
}

.toggle::after {
  content: '';
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle.on { background: var(--success); }
.toggle.on::after { left: 21px; }

/* ---- Stepper (Series Create Wizard) ---- */
.stepper {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.step {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  background: var(--panel);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  transition: all var(--transition);
}

.step.active {
  border-color: var(--border-brand);
  color: #e9ddff;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.05));
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.1);
}

.step.done {
  border-color: rgba(52, 211, 153, 0.3);
  color: #86efac;
  background: rgba(52, 211, 153, 0.06);
}

.wizard-actions {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- Tabs ---- */
.tab-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.tab {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: all var(--transition);
}

.tab:hover {
  color: var(--text-secondary);
  border-color: var(--border-hover);
}

.tab.active {
  border-color: var(--border-brand);
  color: #e9ddff;
  font-weight: 600;
  background: rgba(124, 58, 237, 0.12);
}

.hidden { display: none !important; }

/* ---- Modals (Series) ---- */
.series-modal { position: fixed; inset: 0; z-index: 90; display: none; }
.series-modal.show { display: block; }

.series-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 16, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.series-dialog {
  position: relative;
  width: min(560px, calc(100% - 32px));
  margin: 8vh auto;
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.1), rgba(10, 15, 30, 0.98));
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(124, 58, 237, 0.1);
  padding: 24px;
  color: var(--text);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.series-dialog::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.3), transparent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.series-row { display: grid; gap: 6px; margin-bottom: 14px; }
.series-row label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.series-row input {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(5, 8, 16, 0.6);
  color: var(--text);
}
.series-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ---- Legal Modals ---- */
.legal-modal { position: fixed; inset: 0; z-index: 80; }

.legal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 16, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.legal-card {
  position: relative;
  width: min(920px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.08), rgba(10, 15, 30, 0.98));
  border-radius: var(--radius-xl);
  border: 1px solid rgba(124, 58, 237, 0.2);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(124, 58, 237, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.legal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.legal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.legal-close {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.legal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.legal-content {
  padding: 20px;
  overflow: auto;
  line-height: 1.7;
  color: var(--text-secondary);
}

.legal-content h4 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.legal-content p { margin: 0 0 14px; }
.legal-content strong { color: #fff; }

.legal-subline { color: var(--muted); margin-bottom: 14px; }

.legal-stack { display: grid; gap: 12px; }

.legal-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: rgba(5, 8, 16, 0.4);
  transition: border-color var(--transition);
}

.legal-box:hover { border-color: var(--border-hover); }

.legal-box h5 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.legal-box p { margin: 0; color: var(--text-secondary); }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  background: transparent;
  padding: 20px 24px;
  margin-top: 24px;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.legal-nav { display: flex; gap: 14px; flex-wrap: wrap; }

.legal-link {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  padding: 0;
  text-decoration: none;
  transition: color var(--transition);
}

.legal-link:hover { color: #eef3ff; text-decoration: underline; }

.legal-link-highlight {
  color: #f5d0fe;
  background: rgba(124,58,237,.22);
  border: 1px solid rgba(183,148,255,.55);
  border-radius: 999px;
  padding: 4px 10px;
  text-decoration: none;
}
.legal-link-highlight:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(124,58,237,.35);
}

/* ---- Cookie Banner ---- */
.cookie-banner {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: rgba(8, 12, 28, 0.95);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 18px 24px;
  z-index: 99999;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
}

.cookie-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-inner p {
  margin: 0;
  flex: 1;
  min-width: 280px;
  font-size: 14px;
  color: var(--text-secondary);
}

.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---- Billing Plan Cards ---- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.plan-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.plan-card.active {
  border-color: var(--border-brand);
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.15), 0 8px 32px rgba(0, 0, 0, 0.3);
  background: rgba(124, 58, 237, 0.06);
}

.plan-name {
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.plan-price {
  margin: 0;
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff, var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.plan-price small {
  font-size: 16px;
  font-weight: 500;
  -webkit-text-fill-color: var(--muted);
}

.old-price {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 16px;
  margin: 0;
  opacity: 0.6;
}

.plan-sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  min-height: 36px;
  line-height: 1.4;
}

.plan-features {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--text-secondary);
}

.plan-features li::before {
  content: '✓';
  color: var(--brand-2);
  font-weight: 700;
  margin-right: 8px;
}

.series-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.series-row::before {
  content: '◉';
  color: var(--brand-2);
  font-size: 12px;
  margin-right: 2px;
}

.series-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  transition: all var(--transition);
  font-family: inherit;
}

.series-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  color: #fff;
}

.choose-btn {
  margin-top: auto;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.choose-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  color: #fff;
}

.plan-card.active .choose-btn {
  background: linear-gradient(135deg, var(--brand), #9333ea);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }

  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    z-index: 30;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar::before { height: 100%; }

  .sidebar .nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sidebar .nav::-webkit-scrollbar { display: none; }

  .sidebar .nav a {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 13px;
  }

  .sidebar .nav a.active::before { display: none; }

  .grid-3 { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 16px; }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .toolbar { flex-wrap: wrap; }
  .table th, .table td { padding: 10px 8px; font-size: 12px; }
}

@media (max-width: 700px) {
  .plan-grid { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .legal-card { margin: 8px; }
  h2 { font-size: 20px; }
  .main { padding: 12px; }
}

/* ---- Utility: Toast Container ---- */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- Section Headers ---- */
h2 {
  font-weight: 700;
  letter-spacing: -0.03em;
}

h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

/* ---- Scrollbar Styling ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---- Selection ---- */
::selection {
  background: rgba(124, 58, 237, 0.3);
  color: #fff;
}
