/* ══════════════════════════════════════════════════════════════
   BeeReach — Premium Glass Design System
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Brand palette - BeeReach amber/gold */
  --brand: #fff947;
  --brand-light: #fffbc4;
  --brand-dark: #c9c100;
  --brand-glow: rgba(255, 249, 71, 0.35);

  /* Accent - violet */
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.3);

  /* Surface system */
  --bg-deep: #070b14;
  --bg-base: #0c1221;
  --bg-raised: #111827;
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.07);
  --bg-glass-active: rgba(255, 255, 255, 0.10);

  /* Glass borders */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.14);
  --border-brand: rgba(255, 249, 71, 0.3);

  /* Text hierarchy */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-muted: #475569;

  /* Semantic */
  --success: #22c55e;
  --warning: #fff947;
  --error: #ef4444;
  --info: #3b82f6;

  /* Spacing */
  --sidebar-w: 260px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px var(--brand-glow);
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background mesh gradient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(255,249,71,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(124,58,237,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 0%, rgba(255,249,71,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

#app { position: relative; z-index: 1; }

/* ── Glass Panels ── */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
}

.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.glass-card-static {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 500; font-size: 0.875rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none; cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap; line-height: 1.25;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--brand);
  color: #000;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(255,249,71,0.2);
}
.btn-primary:hover { background: var(--brand-light); box-shadow: var(--shadow-glow); }

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { background: var(--bg-glass-hover); border-color: var(--border-glass-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-glass); color: var(--text-primary); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-sm { padding: 6px 14px; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 1rem; font-weight: 600; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

/* ── Inputs ── */
.input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-sans); font-size: 0.875rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}
.input::placeholder { color: var(--text-muted); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,249,71,0.12); }

select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
select.input option { background: var(--bg-raised); color: var(--text-primary); }

textarea.input { resize: vertical; min-height: 80px; font-family: var(--font-mono); font-size: 0.8125rem; }

/* ── Checkbox ── */
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.875rem; color: var(--text-secondary); }
.checkbox-label input[type="checkbox"] {
  appearance: none; width: 18px; height: 18px;
  border: 1.5px solid var(--border-glass-hover);
  border-radius: 5px; background: transparent;
  cursor: pointer; transition: all 0.2s ease;
  display: grid; place-content: center;
}
.checkbox-label input[type="checkbox"]::before {
  content: ''; width: 10px; height: 10px;
  border-radius: 2px; transform: scale(0);
  transition: transform 0.15s ease;
  background: var(--brand);
}
.checkbox-label input[type="checkbox"]:checked { border-color: var(--brand); }
.checkbox-label input[type="checkbox"]:checked::before { transform: scale(1); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; font-size: 0.75rem; font-weight: 500;
  border-radius: var(--radius-full); line-height: 1.4;
}
.badge-success { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-warning { background: rgba(255,249,71,0.15); color: #fffbc4; }
.badge-error   { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-info    { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-neutral { background: rgba(148,163,184,0.12); color: #94a3b8; }

/* ── Sidebar ── */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: rgba(12, 18, 33, 0.85);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-right: 1px solid var(--border-glass);
  display: flex; flex-direction: column;
  z-index: 50;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand { padding: 20px 20px 16px; border-bottom: 1px solid var(--border-glass); }
.sidebar-brand h1 { font-size: 1.125rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.sidebar-brand-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, #c9c100 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px rgba(255,249,71,0.3);
}
.sidebar-brand span { font-size: 0.75rem; color: var(--text-tertiary); font-weight: 400; margin-top: 2px; display: block; }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.sidebar-section { margin-bottom: 20px; }
.sidebar-section-title {
  font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); padding: 4px 12px 8px; display: block;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-md);
  font-size: 0.875rem; font-weight: 450; color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s ease;
  border: 1px solid transparent; width: 100%; text-align: left;
  background: none;
}
.nav-item:hover { background: var(--bg-glass-hover); color: var(--text-primary); }
.nav-item.active {
  background: rgba(255,249,71,0.1);
  color: var(--brand-light);
  border-color: rgba(255,249,71,0.15);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg { opacity: 1; }
.nav-item .nav-badge {
  margin-left: auto; font-size: 0.6875rem; padding: 1px 7px;
  border-radius: var(--radius-full); background: rgba(255,249,71,0.2); color: var(--brand-light);
}

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

/* ── Combined status indicator ── */
.sidebar-combined-status {
  position: relative;
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  cursor: default;
}
.sidebar-combined-status-main {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-combined-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.sidebar-status-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 12px;
  right: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 100;
}
.sidebar-combined-status:hover .sidebar-status-tooltip {
  display: block;
}
.sidebar-status-tooltip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 3px 0;
}
.status-dot-warning {
  background: #fff947;
  box-shadow: 0 0 6px rgba(255,249,71,0.4);
}

/* ── Logout button ── */
.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 14px;
  margin-top: 4px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.sidebar-logout-btn svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}
.sidebar-logout-btn:hover {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.2);
  color: #f87171;
}
.sidebar-logout-btn:hover svg {
  opacity: 1;
}

/* ── Main content ── */
.main-content { margin-left: var(--sidebar-w); min-height: 100vh; }
.page-wrapper { padding: 28px 32px 40px; max-width: 1280px; margin: 0 auto; }

/* ── Page header ── */
.page-header { margin-bottom: 28px; }
.page-header h2 { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.02em; }
.page-header p { color: var(--text-secondary); font-size: 0.9375rem; margin-top: 4px; }

/* ── Status dot ── */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.status-dot-connected { background: var(--success); box-shadow: 0 0 8px rgba(34,197,94,0.6); }
.status-dot-disconnected { background: var(--error); }
.status-dot-connecting { background: var(--warning); animation: pulse-dot 1.5s ease infinite; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ── Table ── */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table thead th {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border-glass);
}
.data-table tbody td {
  padding: 14px 16px; font-size: 0.875rem; color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover { background: var(--bg-glass); }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fade-in 0.2s ease;
}
.modal-panel {
  background: var(--bg-raised);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modal-enter 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal-header { padding: 20px 24px 0; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.modal-header h3 { font-size: 1.125rem; font-weight: 600; }
.modal-body { 
  padding: 20px 24px; 
  overflow-y: auto;
  max-height: calc(90vh - 80px);
}
.modal-footer { padding: 0 24px 20px; display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; }

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Animations ── */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

.animate-in { animation: slide-up 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }

/* ── Skeleton loader ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-glass) 25%, rgba(255,255,255,0.06) 50%, var(--bg-glass) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Toast ── */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px; border-radius: var(--radius-md);
  font-size: 0.875rem; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  animation: slide-in-right 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: var(--shadow-lg);
  border: 1px solid;
  max-width: 380px;
}
.toast-success { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.25); color: #4ade80; }
.toast-error   { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.25); color: #f87171; }
.toast-info    { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.25); color: #60a5fa; }
.toast-warning { background: rgba(255,249,71,0.15); border-color: rgba(255,249,71,0.25); color: #fffbc4; }
.toast-exit { animation: toast-out 0.3s ease forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateX(120%); } }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 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); }

/* ── Tabs ── */
.tab-bar { display: flex; gap: 2px; background: var(--bg-glass); padding: 3px; border-radius: var(--radius-md); border: 1px solid var(--border-glass); }
.tab-item {
  padding: 7px 16px; font-size: 0.8125rem; font-weight: 500;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text-secondary);
  transition: all 0.2s ease; border: none; background: none;
}
.tab-item:hover { color: var(--text-primary); }
.tab-item.active { background: var(--bg-glass-active); color: var(--text-primary); box-shadow: var(--shadow-sm); }

/* ── Responsive ── */
.mobile-header { display: none; }
.mobile-overlay { display: none; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .page-wrapper { padding: 16px 16px 32px; }
  .page-header h2 { font-size: 1.375rem; }
  .mobile-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: rgba(12,18,33,0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky; top: 0; z-index: 40;
  }
  .mobile-overlay {
    display: none; position: fixed; inset: 0; z-index: 45;
    background: rgba(0,0,0,0.5);
  }
  .mobile-overlay.open { display: block; }
}

/* ── Pricing card ── */
.pricing-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.pricing-card.featured {
  border-color: var(--brand);
  box-shadow: 0 0 40px rgba(255,249,71,0.12);
}
.pricing-card.featured::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

/* ── Stat card ── */
.stat-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; }
.stat-card .stat-label { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 2px; }
.stat-card .stat-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}

/* ── Empty state ── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state svg { width: 48px; height: 48px; color: var(--text-muted); margin: 0 auto 16px; }
.empty-state h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.empty-state p { color: var(--text-tertiary); font-size: 0.875rem; }

/* ── Community detail header ── */
.community-hero {
  background: linear-gradient(135deg, rgba(255,249,71,0.08) 0%, rgba(124,58,237,0.06) 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.community-hero::before {
  content: '';
  position: absolute;
  top: -60%; right: -20%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,249,71,0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Utility ── */
.mono { font-family: var(--font-mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Keyword chips ── */
.keyword-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; font-size: 0.75rem; font-weight: 500;
  background: rgba(255,249,71,0.15); color: #fffbc4;
  border-radius: var(--radius-full); line-height: 1.4;
}
.keyword-chip button {
  background: none; border: none; color: inherit;
  cursor: pointer; padding: 0; font-size: 1rem; line-height: 1;
  opacity: 0.7;
}
.keyword-chip button:hover { opacity: 1; }

/* ── Template cards grid ── */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.template-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column; gap: 12px;
}
.template-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.template-card .template-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: rgba(255,249,71,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-light);
}
.template-card h3 { font-size: 1rem; font-weight: 600; }
.template-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; flex: 1; }

/* ── Onboarding ── */
.onboarding-container {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.onboarding-card {
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  max-width: 640px; width: 100%;
  padding: 48px;
  animation: modal-enter 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.onboarding-progress {
  display: flex; gap: 4px; margin-bottom: 32px;
}
.onboarding-progress-step {
  flex: 1; height: 4px;
  background: var(--bg-glass-active);
  border-radius: var(--radius-full);
  transition: background 0.3s ease;
}
.onboarding-progress-step.active { background: var(--brand); }
.onboarding-progress-step.done { background: var(--success); }
.onboarding-step {
  animation: fade-in 0.3s ease;
}
.onboarding-features {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin: 24px 0;
}
.onboarding-feature {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}
.onboarding-feature svg { width: 24px; height: 24px; color: var(--brand); flex-shrink: 0; margin-top: 2px; }
.onboarding-feature h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 2px; }
.onboarding-feature p { font-size: 0.8125rem; color: var(--text-secondary); }

/* ── Toggle switch ── */
.toggle-switch {
  position: relative; display: inline-block;
  width: 44px; height: 24px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--bg-glass-active);
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
  border: 1px solid var(--border-glass);
}
.toggle-slider::before {
  content: ''; position: absolute;
  height: 18px; width: 18px;
  left: 2px; bottom: 2px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all 0.3s ease;
}
.toggle-switch input:checked + .toggle-slider {
  background: rgba(255,249,71,0.3);
  border-color: var(--brand);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: var(--brand);
}

/* ── Page transitions ── */
#page-content > * { animation: page-enter 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes page-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Enhanced empty state ── */
.empty-state {
  text-align: center; padding: 64px 24px;
  animation: fade-in 0.5s ease;
}
.empty-state-icon {
  width: 80px; height: 80px; border-radius: var(--radius-xl);
  background: rgba(255,249,71,0.08);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.empty-state-icon svg { width: 36px; height: 36px; color: var(--brand); opacity: 0.6; }
.empty-state h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--text-tertiary); font-size: 0.9375rem; max-width: 400px; margin: 0 auto 24px; line-height: 1.5; }

/* ── Micro-interactions ── */
.glass-card { cursor: default; }
.glass-card:hover { transform: translateY(-2px); }

/* ── Collapsible section ── */
.collapsible-header {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 8px 0;
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
}
.collapsible-header svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.collapsible-header.open svg { transform: rotate(90deg); }
.collapsible-content {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
}
.collapsible-content.open { max-height: 500px; }

@media (max-width: 768px) {
  .template-grid { grid-template-columns: 1fr; }
  .onboarding-features { grid-template-columns: 1fr; }
  .onboarding-card { padding: 32px 24px; }
}

