/* ──────────────────────────────────────────────
   MemberSites — Global Stylesheet
   ────────────────────────────────────────────── */
:root {
  --accent:     #4f46e5;
  --accent-dk:  #3730a3;
  --accent-lt:  #ede9fe;
  --success:    #16a34a;
  --danger:     #dc2626;
  --warning:    #d97706;
  --bg:         #f8f8fc;
  --surface:    #ffffff;
  --border:     #e5e7eb;
  --text:       #111827;
  --muted:      #6b7280;
  --radius:     10px;
  --shadow:     0 2px 16px rgba(79,70,229,.08);
}

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

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container--sm { max-width: 560px; }
.container--md { max-width: 760px; }

/* ── Navbar ────────────────────────────────── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.brand {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -.5px;
}
.nav-links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; gap: 8px; align-items: center;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s;
}
.nav-links a:hover { background: var(--bg); }

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent);
  color: #fff !important;
  border: none; border-radius: var(--radius);
  padding: 10px 22px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--accent-dk); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn--lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }
.btn--sm { padding: 6px 14px; font-size: 13px; }
.btn-outline {
  background: transparent !important;
  border: 2px solid var(--accent);
  color: var(--accent) !important;
}
.btn-outline:hover { background: var(--accent-lt) !important; }
.btn-danger { background: var(--danger) !important; }
.btn-success { background: var(--success) !important; }

/* ── Hero ──────────────────────────────────── */
.hero {
  padding: 96px 24px 80px;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-lt) 0%, #f0f4ff 60%, var(--bg) 100%);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin: 0 0 20px;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 600px; margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Section ───────────────────────────────── */
.section { padding: 80px 24px; }
.section--alt { background: var(--surface); }
.section-title { text-align: center; margin-bottom: 56px; }
.section-title h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 800; margin: 0 0 12px; }
.section-title p { color: var(--muted); font-size: 17px; margin: 0; }

/* ── Feature grid ──────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  max-width: 1100px; margin: 0 auto;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { margin: 0 0 10px; font-size: 18px; }
.feature-card p { color: var(--muted); margin: 0; font-size: 15px; }

/* ── Pricing cards ─────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px; max-width: 900px; margin: 0 auto;
}
.pricing-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
  position: relative;
}
.pricing-card.featured { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-lt); }
.pricing-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  padding: 4px 16px; border-radius: 99px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.pricing-card h3 { font-size: 20px; margin: 0 0 8px; }
.pricing-price { font-size: 48px; font-weight: 800; color: var(--accent); line-height: 1; }
.pricing-price sup { font-size: 24px; vertical-align: super; }
.pricing-period { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.pricing-features { list-style: none; margin: 0 0 28px; padding: 0; text-align: left; }
.pricing-features li { padding: 6px 0; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.pricing-features li::before { content: "✓"; color: var(--success); font-weight: 700; }

/* ── Cards / Products ──────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(79,70,229,.15); }
.product-card-body { padding: 24px; }
.product-card h3 { margin: 0 0 8px; font-size: 18px; }
.product-card p { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.product-price { font-size: 22px; font-weight: 700; color: var(--accent); }
.product-type { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; margin-left: 8px; }
.type-one-time { background: #fef3c7; color: #92400e; }
.type-recurring { background: #dbeafe; color: #1e40af; }
.member-badge { background: #dcfce7; color: #166534; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }

/* ── Auth / Forms ──────────────────────────── */
.auth-wrapper {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 48px 44px;
  width: 100%; max-width: 480px;
  box-shadow: var(--shadow);
}
.auth-card h2 { margin: 0 0 6px; font-size: 26px; }
.auth-card .subtitle { color: var(--muted); margin: 0 0 32px; font-size: 15px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 15px;
  background: var(--bg); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-lt);
}
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

.btn-block { width: 100%; justify-content: center; padding: 13px; font-size: 15px; }
.auth-alt { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.auth-alt a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* ── Alerts ────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-info    { background: var(--accent-lt); color: var(--accent-dk); border: 1px solid #c4b5fd; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

/* ── Dashboard ─────────────────────────────── */
.dash-header { padding: 40px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.dash-header h1 { margin: 0 0 4px; font-size: 26px; }
.dash-header p  { color: var(--muted); margin: 0; }
.dash-layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 40px 0; }
.dash-sidebar { }
.dash-menu { list-style: none; margin: 0; padding: 0; }
.dash-menu li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: background .15s;
}
.dash-menu li a:hover, .dash-menu li a.active { background: var(--accent-lt); color: var(--accent); }
.dash-main { }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-header h2 { margin: 0; font-size: 20px; }

/* ── Table ─────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--bg); padding: 12px 16px; text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
td { padding: 13px 16px; border-top: 1px solid var(--border); }
tr:hover td { background: #fafaff; }

/* ── Badge ─────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.badge-green  { background: #dcfce7; color: #166534; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-gray   { background: #f3f4f6; color: #4b5563; }

/* ── Checkout ──────────────────────────────── */
.checkout-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; max-width: 560px; margin: 40px auto;
  box-shadow: var(--shadow);
}
.checkout-header { background: var(--accent); color: #fff; padding: 28px 32px; }
.checkout-header h2 { margin: 0 0 4px; font-size: 22px; }
.checkout-header p  { margin: 0; opacity: .85; font-size: 15px; }
.checkout-body { padding: 32px; }
.order-summary { background: var(--bg); border-radius: var(--radius); padding: 20px; margin-bottom: 28px; }
.order-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.order-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.order-total { font-weight: 700; font-size: 18px; color: var(--accent); }

/* ── Admin ─────────────────────────────────── */
.admin-wrap { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }
.admin-sidebar { background: #1e1b4b; padding: 32px 0; }
.admin-sidebar .brand { color: #fff; padding: 0 24px; display: block; margin-bottom: 32px; font-size: 18px; }
.admin-menu { list-style: none; margin: 0; padding: 0; }
.admin-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 24px; color: #a5b4fc;
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.admin-menu a:hover, .admin-menu a.active { background: rgba(99,102,241,.25); color: #fff; }
.admin-content { padding: 40px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.admin-topbar h1 { margin: 0; font-size: 24px; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.stat-card .stat-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat-card .stat-value { font-size: 36px; font-weight: 800; color: var(--accent); line-height: 1.1; margin-top: 4px; }
.stat-card .stat-sub   { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── Misc ──────────────────────────────────── */
.page-wrap { min-height: calc(100vh - 64px); padding: 48px 24px; }
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.mt-4 { margin-top: 16px; } .mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; } .mb-8 { margin-bottom: 32px; }
.gap-2 { gap: 8px; }
.flex { display: flex; } .items-center { align-items: center; }
.success-icon { font-size: 72px; margin-bottom: 24px; }

.footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 32px 24px; text-align: center;
}
.footer p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; justify-content: center; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 13px; }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .navbar { padding: 0 16px; }
  .nav-links { gap: 4px; }
  .nav-links li:not(:last-child) a { display: none; }
  .dash-layout { grid-template-columns: 1fr; }
  .admin-wrap { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .auth-card { padding: 32px 24px; }
}
