/* ─────────────────────────────────────────────────────────────────────────────
   GrowStack Design System
   Theme: Refined Dark — Amber accents, editorial typography, SaaS-grade layout
   Fonts: Instrument Serif (display) + DM Sans (UI)
───────────────────────────────────────────────────────────────────────────── */

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; } 
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ── Design Tokens ───────────────────────────────────────────────────────────── */
:root {
  /* Colors */
  --void:     #09090B;
  --surface:  #111113;
  --surface-2:#18181B;
  --surface-3:#1C1C1F;
  --border:   rgba(255,255,255,0.07);
  --border-2: rgba(255,255,255,0.12);

  --amber:    #F59E0B;
  --amber-dim:#D97706;
  --amber-glow: rgba(245, 158, 11, 0.15);

  --chalk:    #FAFAF9;
  --muted:    #A1A1AA;
  --subtle:   #52525B;

  --success:  #10B981;
  --error:    #EF4444;
  --info:     #3B82F6;

  /* Typography */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-ui:      'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --gap-xs: 0.25rem;
  --gap-sm: 0.5rem;
  --gap:    1rem;
  --gap-md: 1.5rem;
  --gap-lg: 2rem;
  --gap-xl: 3rem;
  --gap-2xl:5rem;

  /* Radii */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow:    0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.6);
  --glow-amber:0 0 40px rgba(245,158,11,0.2);

  /* Transitions */
  --ease: 0.18s ease;
  --ease-md: 0.28s ease;
}

/* ── Base ─────────────────────────────────────────────────────────────────────── */
body {
  background-color: var(--void);
  color: var(--chalk);
  font-family: var(--font-ui);
  line-height: 1.6;
}

/* ── Layout Utilities ────────────────────────────────────────────────────────── */
.container-wide  { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.container       { max-width: 900px;  margin: 0 auto; padding: 0 1.5rem; }
.container-sm    { max-width: 560px;  margin: 0 auto; padding: 0 1.5rem; }

/* ── Navigation ──────────────────────────────────────────────────────────────── */
.nav-bar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo { display: flex; align-items: center; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem; letter-spacing: -0.01em;
  color: var(--chalk);
}
.logo-accent { color: var(--amber); }
.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
}
.nav-link {
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem; font-weight: 500;
  color: var(--muted);
  border-radius: var(--r-sm);
  transition: color var(--ease), background var(--ease);
}
.nav-link:hover { color: var(--chalk); background: var(--surface-2); }
.nav-link--admin {
  color: var(--amber);
}
.nav-mobile-btn { display: none; padding: 8px; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-btn { display: flex; }
}

.hamburger { display: flex; flex-direction: column; gap: 5px; }
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--muted); border-radius: 2px;
  transition: all var(--ease);
}
.mobile-nav {
  padding: 0.75rem 0 1rem;
  border-top: 1px solid var(--border);
}
.mobile-nav-link {
  display: block; padding: 0.65rem 0;
  font-size: 0.95rem; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.mobile-nav-link--cta { color: var(--amber); font-weight: 600; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  background: var(--amber);
  color: #0A0A0B;
  font-weight: 600; font-size: 0.9rem;
  border-radius: var(--r);
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
  border: none; cursor: pointer;
}
.btn-primary:hover {
  background: #FBBF24;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  background: transparent;
  color: var(--chalk);
  font-weight: 500; font-size: 0.9rem;
  border-radius: var(--r);
  border: 1px solid var(--border-2);
  transition: background var(--ease), border-color var(--ease);
  cursor: pointer;
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--subtle); }

.btn-sm { padding: 0.45rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

.btn-danger {
  background: var(--error); color: white;
}
.btn-danger:hover { background: #DC2626; }

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; margin-bottom: 0.4rem;
  font-size: 0.8125rem; font-weight: 500;
  color: var(--muted); letter-spacing: 0.01em;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  color: var(--chalk);
  font-size: 0.9rem;
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}
.form-input::placeholder { color: var(--subtle); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-error {
  display: block; margin-top: 0.35rem;
  font-size: 0.8rem; color: var(--error);
}
.form-hint {
  display: block; margin-top: 0.35rem;
  font-size: 0.8rem; color: var(--muted);
}

.input-errors {
  margin-top: 0.35rem;
}
.input-errors .form-error { display: block; }

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card-hover {
  transition: transform var(--ease-md), box-shadow var(--ease-md), border-color var(--ease-md);
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-2);
}

/* ── Product Card ────────────────────────────────────────────────────────────── */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--ease-md), box-shadow var(--ease-md), border-color var(--ease-md);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border-color: rgba(245,158,11,0.25);
}
.product-card__image {
  aspect-ratio: 16/9;
  background: var(--surface-3);
  overflow: hidden; position: relative;
}
.product-card__image img { width: 100%; height: 100%; object-fit: cover; }
.product-card__type-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 3px 10px;
  background: rgba(9,9,11,0.8);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  backdrop-filter: blur(8px);
}
.product-card__featured-badge {
  position: absolute; top: 12px; right: 12px;
  padding: 3px 10px;
  background: var(--amber);
  border-radius: 100px;
  font-size: 0.7rem; font-weight: 700;
  color: #0A0A0B;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.product-card__body { padding: 1.25rem; }
.product-card__title {
  font-size: 1rem; font-weight: 600;
  color: var(--chalk); margin-bottom: 0.4rem;
  line-height: 1.4;
}
.product-card__desc {
  font-size: 0.8375rem; color: var(--muted);
  line-height: 1.5; margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.product-card__price {
  font-family: var(--font-display);
  font-size: 1.2rem; color: var(--chalk);
}

/* ── Hero Section ────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 7rem 0 5rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -20%; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(245,158,11,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 4px 14px;
  background: var(--amber-glow);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 100px;
  font-size: 0.78rem; font-weight: 600;
  color: var(--amber); letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--chalk);
  margin-bottom: 1.25rem;
}
.hero-title em { font-style: italic; color: var(--amber); }
.hero-subtitle {
  font-size: 1.1rem; color: var(--muted);
  max-width: 520px; line-height: 1.65;
  margin-bottom: 2.5rem;
}
.hero-cta-group {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  align-items: center; margin-bottom: 3rem;
}
.hero-trust {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem;
}
.trust-badge {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: var(--muted);
}
.trust-badge svg { color: var(--success); flex-shrink: 0; }

/* ── Section Titles ──────────────────────────────────────────────────────────── */
.section { padding: var(--gap-2xl) 0; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--chalk);
}
.section-subtitle {
  font-size: 0.95rem; color: var(--muted);
  margin-top: 0.5rem; line-height: 1.6;
}

/* ── Grid ────────────────────────────────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1024px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ── Feature Cards ───────────────────────────────────────────────────────────── */
.feature-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.feature-icon {
  width: 44px; height: 44px;
  background: var(--amber-glow);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber);
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-size: 1rem; font-weight: 600;
  margin-bottom: 0.4rem; color: var(--chalk);
}
.feature-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

/* ── Stats Band ──────────────────────────────────────────────────────────────── */
.stats-band {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-display); font-size: 2.25rem;
  color: var(--chalk); line-height: 1;
}
.stat-number span { color: var(--amber); }
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

/* ── Auth Pages ──────────────────────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center;
  padding: 2rem 0;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  width: 100%;
}
.auth-title {
  font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 400;
  color: var(--chalk); margin-bottom: 0.35rem;
}
.auth-subtitle { font-size: 0.875rem; color: var(--muted); margin-bottom: 2rem; }
.auth-divider {
  text-align: center; position: relative; margin: 1.5rem 0;
  font-size: 0.8rem; color: var(--subtle);
}
.auth-divider::before {
  content: ''; position: absolute;
  top: 50%; left: 0; right: 0; height: 1px;
  background: var(--border);
}
.auth-divider span {
  position: relative; padding: 0 0.75rem;
  background: var(--surface);
}
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--muted); }
.auth-footer a { color: var(--amber); font-weight: 500; }

/* ── Dashboard ───────────────────────────────────────────────────────────────── */
/* ── Dashboard ───────────────────────────────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;  /* sidebar + main — was wrongly 1fr 1fr 1fr */
  min-height: calc(100vh - 64px);
  min-width: 0;
}

/* Collapse to single column on tablets and below */
@media (max-width: 900px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    display: block !important;
  }
}

.sidebar {
  /* REMOVED display:none !important — was hiding sidebar on ALL screens */
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

/* Hide sidebar on mobile — show it as nothing, main content takes full width */
@media (max-width: 900px) {
  .sidebar {
    display: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: unset !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
  }
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 0;
  transition: all var(--ease);
  margin-bottom: 2px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  text-decoration: none;
  width: 100%;
  text-align: left;
}
.sidebar-nav-item:hover { color: var(--chalk); background: var(--surface-2); }
.sidebar-nav-item.active {
  color: var(--amber);
  background: var(--amber-glow);
  border-left: 2px solid var(--amber);
}

.sidebar-section-label {
  padding: 0.5rem 1.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-top: 1rem;
}

.dashboard-main {
  padding: 2rem;
  background: var(--void);
  min-width: 0;  /* prevents grid blowout */
  overflow-x: hidden;
}

/* Mobile dashboard main */
@media (max-width: 900px) {
  .dashboard-main {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 1rem !important;
  }
}

.page-header { margin-bottom: 2rem; }
.page-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--chalk);
  letter-spacing: -0.01em;
}
.page-subtitle { font-size: 0.875rem; color: var(--muted); margin-top: 0.25rem; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
}
.stat-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--chalk);
}
.stat-card__sub { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }
/* ── Tables ──────────────────────────────────────────────────────────────────── */
.table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 0.85rem 1rem;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
tbody td {
  padding: 0.9rem 1rem;
  font-size: 0.875rem; color: var(--chalk);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }

/* ── Badges / Chips ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px;
  font-size: 0.7rem; font-weight: 600;
  border-radius: 100px; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge--success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge--error   { background: rgba(239,68,68,0.15);  color: var(--error); }
.badge--pending { background: rgba(245,158,11,0.15); color: var(--amber); }
.badge--draft   { background: var(--surface-3); color: var(--muted); }

/* ── Product Detail ──────────────────────────────────────────────────────────── */
.product-hero {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}
.product-hero-grid {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 4rem; align-items: start;
}
@media (max-width: 900px) { .product-hero-grid { grid-template-columns: 1fr; gap: 2rem; } }

.product-cover {
  aspect-ratio: 16/10;
  background: var(--surface-3);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.product-cover img { width: 100%; height: 100%; object-fit: cover; }

.product-buy-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.75rem;
  position: sticky; top: 80px;
}
.product-price {
  font-family: var(--font-display);
  font-size: 2.25rem; color: var(--chalk);
  margin-bottom: 0.25rem;
}
.product-buy-box ul { list-style: none; margin: 1rem 0 1.5rem; }
.product-buy-box ul li {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: var(--muted);
  padding: 0.35rem 0;
}
.product-buy-box ul li svg { color: var(--success); flex-shrink: 0; }

.guarantee-note {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface-2);
  border-radius: var(--r);
  font-size: 0.8rem; color: var(--muted);
  margin-top: 1rem;
}

/* ── Flash Messages ──────────────────────────────────────────────────────────── */
.flash-zone {
  position: fixed; top: 80px; right: 1.5rem;
  z-index: 200; max-width: 380px;
}
.flash {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--r);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 0.5rem;
  animation: slideIn 0.2s ease;
}
.flash--success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #34D399; }
.flash--error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #FCA5A5; }
.flash--info    { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: #93C5FD; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  margin-top: 5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem; margin-bottom: 2.5rem;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-brand .logo-text { font-size: 1.25rem; }
.footer-tagline { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; max-width: 200px; }
.footer-links-group h4 {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--subtle);
  margin-bottom: 0.85rem;
}
.footer-links-group a {
  display: block; font-size: 0.85rem; color: var(--muted);
  padding: 0.2rem 0; transition: color var(--ease);
}
.footer-links-group a:hover { color: var(--chalk); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--subtle);
}
.footer-security { display: flex; align-items: center; gap: 0.35rem; }

/* ── Utility Classes ─────────────────────────────────────────────────────────── */
.text-amber   { color: var(--amber); }
.text-muted   { color: var(--muted); }
.text-subtle  { color: var(--subtle); }
.text-success { color: var(--success); }
.text-error   { color: var(--error); }
.text-center  { text-align: center; }
.mt-auto { margin-top: auto; }
.flex     { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.w-full { width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* ── Empty States ─────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 4rem 1.5rem;
}
.empty-state-icon {
  width: 56px; height: 56px;
  background: var(--surface-2);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  color: var(--muted);
}
.empty-state h3 { font-size: 1rem; color: var(--chalk); margin-bottom: 0.35rem; }
.empty-state p  { font-size: 0.875rem; color: var(--muted); }

/* ── Prose / Rich Text ───────────────────────────────────────────────────────── */
.prose {
  color: var(--muted); line-height: 1.75; font-size: 0.9375rem;
}
.prose h2 { font-family: var(--font-display); color: var(--chalk); margin: 1.5rem 0 0.5rem; font-size: 1.3rem; }
.prose h3 { color: var(--chalk); margin: 1.25rem 0 0.4rem; font-size: 1rem; }
.prose p  { margin-bottom: 0.9rem; }
.prose ul { padding-left: 1.25rem; margin-bottom: 0.9rem; }
.prose li { margin-bottom: 0.35rem; }
.prose strong { color: var(--chalk); font-weight: 600; }

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

/* ── Pagination ──────────────────────────────────────────────────────────────── */
.pagination {
  display: flex; justify-content: center; gap: 0.35rem;
  margin-top: 2.5rem;
}
.pagination a, .pagination span {
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--muted);
  transition: all var(--ease);
}
.pagination a:hover { color: var(--chalk); border-color: var(--border-2); }
.pagination .active span { background: var(--amber); border-color: var(--amber); color: #0A0A0B; }

/* ── Scrollbar (Webkit) ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--subtle); }

/* ── Selection ───────────────────────────────────────────────────────────────── */
::selection { background: var(--amber-glow); color: var(--amber); }


/* ── Hero Grid ───────────────────────────────────────────────────────────────── */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .hero-image-wrap {
        order: -1;
    }
}
.hero-image {
    width: 100%;
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}
.hero-image-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.hero-float-card {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
}
.hero-image-wrap {
    position: relative;
}

/* ── Left Drawer Nav ─────────────────────────────────────────────────────────── */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    backdrop-filter: blur(4px);
}
.nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 201;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
}
.nav-drawer--open {
    transform: translateX(0);
}
.nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.nav-drawer-links {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}
.nav-drawer-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    transition: all var(--ease);
    border-left: 2px solid transparent;
    background: none;
    border-top: none;
    border-right: none;
    border-bottom: none;
    cursor: pointer;
    font-family: var(--font-ui);
}
.nav-drawer-link:hover {
    color: var(--chalk);
    background: var(--surface-2);
    border-left-color: var(--border-2);
}
.nav-drawer-link--cta {
    margin: 1rem 1.5rem 0;
    background: var(--amber);
    color: #0A0A0B;
    border-radius: var(--r);
    justify-content: center;
    padding: 0.75rem;
    border-left: none;
    font-weight: 600;
}
.nav-drawer-link--cta:hover {
    background: #FBBF24;
    border-left-color: transparent;
}
@media (max-width: 768px) {
    .dashboard-layout {
        display: block !important;
    }
    .sidebar {
        display: none !important;;
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border) !important;
    }
    .dashboard-main {
        margin-left: 0 !important;
        width: 100% !important;
        min-height: unset !important;
        padding: 1rem !important;
    }
}
/* ── Package Cards ───────────────────────────────────────────────────────────── */
.package-card {
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.package-card:hover {
    border-color: rgba(245, 158, 11, 0.5) !important;
    background: var(--surface-2) !important;
}

.package-selected {
    border-color: var(--amber) !important;
    background: rgba(245, 158, 11, 0.08) !important;
}

.package-selected .package-name {
    color: var(--amber) !important;
}

/* Checkmark indicator for selected packages */
.package-card::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.package-selected::after {
    background: var(--amber);
    border-color: var(--amber);
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}

[x-cloak] { display: none !important; }

/* ── Hide mobile btn on desktop ──────────────────────────────────────────────── */
@media (min-width: 769px) {
    .nav-mobile-btn { display: none; }
    .nav-drawer { display: none !important; }
    .nav-overlay { display: none !important; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-mobile-btn { display: flex; }
}
