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

:root {
  --bg:           #10121e;
  --bg-card:      #181b2e;
  --bg-elevated:  #1f223a;
  --border:       #2a2d48;
  --border-light: #363a5c;
  --text:         #f2f2fc;
  --text-muted:   #a0a3c4;
  --text-faint:   #5a5e88;
  --purple:       #7c3aed;
  --purple-light: #9d5cf6;
  --blue:         #2563eb;
  --blue-light:   #3b82f6;
  --green:        #10b981;
  --yellow:       #f59e0b;
  --red:          #ef4444;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:    0 8px 48px rgba(0,0,0,0.6);
  --transition:   0.18s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
input, select, button, textarea { font: inherit; }

/* ─── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  border-color: transparent;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,58,237,0.4); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-light);
}
.btn-outline:hover { border-color: var(--purple-light); color: var(--purple-light); background: rgba(124,58,237,0.06); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); background: var(--bg-elevated); }

.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; }
.btn-full { width: 100%; }

/* ─── NAV ──────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(8,8,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links { display: flex; gap: 1.5rem; flex: 1; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 0.75rem; align-items: center; }

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
}

/* ─── HERO ─────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 1.5rem 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.3);
  color: var(--purple-light);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 800px;
}

.gradient-text {
  color: #b48dff;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 540px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2rem; }

.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 3rem;
}
.avatars { display: flex; }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: #fff;
  border: 2px solid var(--bg);
  margin-left: -8px;
}
.avatar:first-child { margin-left: 0; }

/* Hero screenshot */
.hero-screenshot { width: 100%; max-width: 680px; }
.screenshot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.screenshot-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28ca41; }
.screenshot-title { margin-left: 0.5rem; font-size: 0.8rem; color: var(--text-muted); }

.flow-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem;
  overflow-x: auto;
  justify-content: center;
}
.flow-node {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  min-width: 80px;
  white-space: nowrap;
}
.flow-node small { display: block; color: var(--text-muted); font-weight: 400; margin-top: 0.2rem; }
.flow-node.trigger { border-color: var(--green); color: var(--green); }
.flow-node.ai { border-color: var(--purple-light); color: var(--purple-light); }
.flow-node.action { border-color: var(--blue-light); color: var(--blue-light); }
.flow-arrow { color: var(--text-faint); font-size: 1.2rem; }

/* ─── LOGOS ────────────────────────────────────────────────────────────────── */
.logos-section {
  padding: 3rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.logos-label { color: var(--text-faint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.25rem; }
.logos-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.platform-badge {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ─── SECTIONS ─────────────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.section-header p { color: var(--text-muted); font-size: 1.05rem; }

.features-section, .categories-section, .pricing-section, .faq-section {
  padding: 6rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.feature-icon { font-size: 1.75rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* Categories */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--transition);
}
.category-card:hover { border-color: var(--purple); background: rgba(124,58,237,0.05); transform: translateY(-2px); }
.category-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.category-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.35rem; }
.category-card p { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 0.75rem; }
.file-count {
  display: inline-block;
  background: rgba(124,58,237,0.12);
  color: var(--purple-light);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ─── PRICING ──────────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  transition: border-color var(--transition);
}
.pricing-card.popular {
  border-color: var(--purple);
  background: linear-gradient(180deg, rgba(124,58,237,0.08) 0%, var(--bg-card) 100%);
}
.popular-badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  white-space: nowrap;
}
.plan-name { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.75rem; }
.plan-price { display: flex; align-items: baseline; gap: 0.25rem; margin-bottom: 0.5rem; }
.price-amount { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; }
.price-period { color: var(--text-muted); font-size: 0.9rem; }
.plan-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.5rem; }
.plan-features { list-style: none; margin-bottom: 1.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.plan-features li { font-size: 0.88rem; color: var(--text-muted); }
.plan-features li:not(.muted) { color: var(--text); }
.plan-features li.muted { opacity: 0.4; }
.plan-btn { width: 100%; }

/* ─── FAQ ──────────────────────────────────────────────────────────────────── */
.faq-list { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--text-muted); font-size: 1.2rem; transition: transform var(--transition); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 1.25rem 1rem; color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }

/* ─── CTA ──────────────────────────────────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding: 6rem 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(124,58,237,0.06));
  border-top: 1px solid var(--border);
}
.cta-section h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.75rem; }
.cta-section p { color: var(--text-muted); margin-bottom: 2rem; }

/* ─── FOOTER ───────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 3rem 1.5rem 2rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 3rem; flex-wrap: wrap; justify-content: space-between; margin-bottom: 2rem; }
.footer-brand { max-width: 240px; }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.75rem; }
.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-links div { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links h4 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 0.25rem; }
.footer-links a { color: var(--text-muted); font-size: 0.88rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { max-width: 1200px; margin: 0 auto; color: var(--text-faint); font-size: 0.82rem; padding-top: 2rem; border-top: 1px solid var(--border); }

/* ─── MODALS ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}
.modal-overlay.hidden { display: none; }

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

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  animation: slideUp 0.2s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-large { max-width: 640px; }
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--text); border-color: var(--border-light); }

.modal-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.75rem; background: var(--bg-elevated); border-radius: var(--radius-sm); padding: 0.25rem; }
.modal-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.modal-tab.active { background: var(--bg-card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }

.auth-form h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.4rem; }
.form-group input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus { border-color: var(--purple); }
.form-error { color: var(--red); font-size: 0.82rem; margin-bottom: 0.75rem; min-height: 1rem; }

.hidden { display: none !important; }

/* ─── DASHBOARD ────────────────────────────────────────────────────────────── */
.dashboard-body { display: flex; overflow: hidden; height: 100vh; }

/* Sidebar */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
}
.sidebar-header { padding: 1.25rem 1rem; border-bottom: 1px solid var(--border); }
.sidebar-nav { display: flex; flex-direction: column; padding: 0.5rem; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-item:hover { background: var(--bg-elevated); color: var(--text); }
.nav-item.active { background: rgba(124,58,237,0.12); color: var(--purple-light); }
.nav-icon { font-size: 1rem; width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-section-label {
  padding: 1rem 1.25rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}
.sidebar-footer { margin-top: auto; padding: 1rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.5rem; }
.user-card { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.25rem; }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-info { overflow: hidden; }
.user-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple-light);
}
.sidebar-btn { justify-content: flex-start; font-size: 0.82rem; }

/* Dashboard main */
.dashboard-main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.dash-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8,8,15,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.dash-search-wrap { flex: 1; max-width: 480px; }
.dash-search {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}
.dash-search:focus { border-color: var(--purple); }
.dash-header-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }

.plan-badge {
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  color: var(--purple-light);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Upgrade banner */
.upgrade-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(90deg, rgba(124,58,237,0.15), rgba(37,99,235,0.1));
  border-bottom: 1px solid rgba(124,58,237,0.25);
  font-size: 0.88rem;
}
.upgrade-banner span { flex: 1; }
.banner-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; padding: 0 0.25rem; }

/* Views */
.view { padding: 1.5rem; flex: 1; }
.view.hidden { display: none; }
.view.active { display: block; }
.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.view-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.view-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

.filter-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.filter-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

/* Files grid */
.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.file-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition);
  cursor: pointer;
}
.file-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.file-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.file-icon { font-size: 1.75rem; }

.file-name { font-size: 0.95rem; font-weight: 700; line-height: 1.3; }
.file-desc { color: var(--text-muted); font-size: 0.82rem; line-height: 1.5; flex: 1; }
.file-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.meta-tag {
  background: var(--bg-elevated);
  color: var(--text-faint);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  border: 1px solid var(--border);
}
.file-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.download-count { color: var(--text-faint); font-size: 0.78rem; }
.file-locked { color: var(--text-faint); font-size: 0.8rem; }

/* File detail modal */
.file-detail-header { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.file-detail-icon { font-size: 2.5rem; }
.file-detail-meta { flex: 1; }
.file-detail-meta h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; }
.file-detail-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.file-detail-desc { color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; margin-bottom: 1.5rem; }
.file-detail-actions { display: flex; gap: 0.75rem; }

/* Detail modal sections */
.detail-section { margin-bottom: 1.25rem; }
.detail-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}
.detail-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.detail-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.detail-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.detail-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.8;
}
.detail-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.detail-two-col {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.detail-two-col-item {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.3rem 0.5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.detail-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.detail-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.check-box {
  color: var(--text-faint);
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.detail-expandable {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
}
.detail-expandable summary { user-select: none; }
.detail-prose {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
  white-space: pre-wrap;
}

.locked-notice {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: var(--yellow);
  margin-bottom: 1rem;
}

/* Empty / loading states */
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.loading-state { display: flex; justify-content: center; padding: 4rem; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Downloads list */
.downloads-list { display: flex; flex-direction: column; gap: 0.75rem; }
.download-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}
.download-item-info { flex: 1; }
.download-item-name { font-weight: 600; font-size: 0.9rem; }
.download-item-meta { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.2rem; }
.download-item-date { color: var(--text-faint); font-size: 0.78rem; white-space: nowrap; }

/* Upgrade plans in modal */
.upgrade-plans { display: flex; flex-direction: column; gap: 0.75rem; }
.upgrade-plan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  transition: border-color var(--transition);
}
.upgrade-plan-item:hover { border-color: var(--purple); }
.upgrade-plan-name { font-weight: 700; font-size: 0.95rem; }
.upgrade-plan-price { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.15rem; }
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ─── SIDEBAR BACKDROP ─────────────────────────────────────────────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 140;
  backdrop-filter: blur(2px);
}

/* ─── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* ── Homepage nav ── */
  .nav { padding: 0 1rem; }
  .nav-inner { gap: 0.5rem; }
  .nav-links { display: none; }
  .logo { font-size: 0.82rem; }
  .logo svg { flex-shrink: 0; }
  .nav-actions .btn-ghost { display: none; }

  /* ── Homepage hero ── */
  .hero { padding: 90px 1.25rem 60px; }
  .hero-subtitle { font-size: 1rem; }
  .hero-social-proof { flex-wrap: wrap; justify-content: center; text-align: center; }
  .flow-preview { justify-content: flex-start; padding: 1.25rem; gap: 0.4rem; }
  .flow-node { padding: 0.45rem 0.65rem; min-width: 60px; font-size: 0.72rem; }

  /* ── Homepage sections ── */
  .features-section, .categories-section, .pricing-section, .faq-section { padding: 3.5rem 1.25rem; }
  .pricing-grid { grid-template-columns: 1fr; }

  /* ── Footer ── */
  .footer { padding: 2.5rem 1.25rem 1.5rem; }
  .footer-inner { flex-direction: column; gap: 1.75rem; }
  .footer-brand { max-width: 100%; }
  .footer-links { gap: 1.5rem; }

  /* ── Dashboard sidebar ── */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 150;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 32px rgba(0,0,0,0.5); }
  .sidebar-toggle { display: flex; }
  .sidebar-backdrop.active { display: block; }

  /* ── Dashboard header ── */
  .dash-header { padding: 0.6rem 0.75rem; gap: 0.5rem; }
  .dash-search-wrap { flex: 1; min-width: 0; }

  /* ── Upgrade banner ── */
  .upgrade-banner { flex-wrap: wrap; gap: 0.5rem; padding: 0.65rem 1rem; font-size: 0.82rem; }
  .upgrade-banner > span { order: -1; width: 100%; }

  /* ── Dashboard view ── */
  .view { padding: 1rem; }
  .view-title { font-size: 1.2rem; }

  /* ── File modal ── */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: var(--radius) var(--radius) 0 0; max-height: 92vh; padding: 1.5rem; }
  .modal-large { max-width: 100%; border-radius: var(--radius) var(--radius) 0 0; max-height: 92vh; }
  .file-detail-actions { flex-direction: column; }
  .file-detail-actions .btn { width: 100%; }
  .detail-grid-2col { grid-template-columns: 1fr !important; }

  /* ── Admin sidebar ── */
  .admin-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform var(--transition);
  }
  .admin-sidebar.open { transform: translateX(0); box-shadow: 4px 0 32px rgba(0,0,0,0.5); }
  .sidebar-backdrop.active { display: block; }

  /* ── Admin topbar ── */
  .admin-topbar { gap: 0.75rem; }
  .admin-topbar h1 { flex: 1; }
  .admin-topbar .sidebar-toggle { display: flex; }

  /* ── Admin table ── */
  .table-card { overflow-x: auto; }
  table { min-width: 640px; }
  .table-controls { gap: 0.5rem; }
  .table-search { width: 160px; }

  /* ── Admin stats ── */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .logo { font-size: 0.75rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .files-grid { grid-template-columns: 1fr; }
  .modal { padding: 1.25rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-pill { font-size: 0.72rem; padding: 0.25rem 0.6rem; }
}
