/* ============================================================
   Scente — Design System v2
   Light mode, modern 2026. Mobile-first, desktop-enhanced.
   Brand: Onyx #0D0B1E · Violet #6D28D9 · Lavender #EDE9FE
          Ghost #F5F3FF · Ink #1E1934
   Fonts: Playfair Display (display) · Inter (UI)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  /* Core palette — same var names, new violet-luxury values */
  --noir:         #0D0B1E;   /* near-black with violet undertone */
  --sage:         #6D28D9;   /* deep violet — primary brand */
  --sage-mist:    #EDE9FE;   /* pale lavender — light surface */
  --sage-deep:    #5B21B6;   /* deeper violet — hover/emphasis */
  --parchment:    #F5F3FF;   /* ghost white — page background */
  --mist:         #E5E1F5;   /* violet-grey — borders/dividers */
  --mid:          #1E1934;   /* deep ink — body text */
  --muted:        #64748B;   /* neutral muted grey */
  --white:        #FFFFFF;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-ui:      'Inter', system-ui, sans-serif;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --radius-pill: 50px;

  --shadow-card:  0 1px 3px rgba(13,11,30,.06), 0 2px 8px rgba(109,40,217,.05);
  --shadow-hover: 0 4px 20px rgba(109,40,217,.14);
  --shadow-lg:    0 8px 40px rgba(13,11,30,.12);
  --transition:   150ms ease;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  font-weight: 400;
  line-height: 1.65;
  color: var(--mid);
  background: var(--parchment);
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--noir);
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2rem, 7vw, 3.4rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; font-weight: 500; }

.display-serif {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
}
.label-caps {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Layout ──────────────────────────────────────────────── */
.container    { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 20px; }
.container-lg { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

@media (min-width: 768px) {
  .container    { max-width: 560px; padding: 0 28px; }
  .container-lg { padding: 0 40px; }
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--sage);
  color: var(--white);
  border: 1px solid var(--sage);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
  box-shadow: 0 4px 14px rgba(109,40,217,.30);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--sage);
  border: 1px solid var(--sage);
}
.btn-secondary:hover { background: var(--sage-mist); }
.btn-ghost {
  background: transparent;
  color: var(--mid);
  border: 1px solid var(--mist);
}
.btn-ghost:hover { background: var(--mist); }
.btn-danger {
  background: #DC2626;
  color: var(--white);
  border: 1px solid #DC2626;
}
.btn-danger:hover { background: #B91C1C; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: 0.8125rem; }
.btn-lg { min-height: 54px; padding: 14px 34px; font-size: 1rem; font-weight: 500; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}
.card-parchment { background: var(--parchment); }
.card-sage { background: var(--sage); color: var(--white); }

/* ── Stat Card ───────────────────────────────────────────── */
.stat-card {
  background: var(--white);
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  text-align: left;
  box-shadow: var(--shadow-card);
}
.stat-card .stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.stat-card .stat-value {
  font-family: var(--font-ui);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--sage);
  line-height: 1;
}
.stat-card .stat-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--mid);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--noir);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 46px;
}
.form-control:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(109,40,217,.12);
}
.form-control::placeholder { color: #94A3B8; }
.form-control.error { border-color: #DC2626; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 1rem; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; margin-top: 2px; accent-color: var(--sage); }
.form-check label { font-size: 0.875rem; color: var(--mid); cursor: pointer; }

.form-error { font-size: 0.8125rem; color: #DC2626; margin-top: 4px; display: block; }
.form-help  { font-size: 0.8125rem; color: var(--muted); margin-top: 4px; display: block; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-active    { background: #D1FAE5; color: #065F46; }
.badge-pending   { background: #FEF3C7; color: #92400E; }
.badge-inactive  { background: #FEE2E2; color: #991B1B; }
.badge-suspended { background: #EDE9FE; color: #5B21B6; }
.badge-info      { background: #DBEAFE; color: #1E40AF; }
.badge-rank-d    { background: var(--mist); color: var(--mid); }
.badge-rank-l    { background: var(--sage-mist); color: var(--sage-deep); }
.badge-rank-e    { background: var(--noir); color: var(--white); }

.badge-him    { background: #1E293B; color: #94A3B8; }
.badge-her    { background: #FCE7F3; color: #9D174D; }
.badge-unisex { border: 1px solid var(--sage); color: var(--sage); background: transparent; }

/* ── Alerts / Flash ──────────────────────────────────────── */
.flash, .alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  font-weight: 400;
}
.flash-success, .alert-success { background: #ECFDF5; color: #065F46; border-left: 3px solid #10B981; }
.flash-error,   .alert-error   { background: #FEF2F2; color: #991B1B; border-left: 3px solid #EF4444; }
.alert-warning { background: #FFFBEB; color: #92400E; border-left: 3px solid #F59E0B; }
.alert-info    { background: #EFF6FF; color: #1E40AF; border-left: 3px solid #3B82F6; }
.alert-sage    { background: var(--sage-mist); color: var(--sage-deep); border-left: 3px solid var(--sage); }

/* ── Progress Bar ────────────────────────────────────────── */
.progress-wrap { margin: 8px 0; }
.progress-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 0.8125rem; }
.progress-track { height: 6px; background: var(--mist); border-radius: 3px; overflow: hidden; }
.progress-fill  { height: 100%; background: linear-gradient(90deg, var(--sage), var(--sage-deep)); border-radius: 3px; transition: width 0.5s ease; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
  background: var(--parchment);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 11px 12px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--mist);
}
.table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--mist);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--parchment); transition: background var(--transition); }

/* ── SKU / Product Cards ─────────────────────────────────── */
.sku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
@media (min-width: 768px) {
  .sku-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
}
@media (min-width: 1024px) {
  .sku-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}
.sku-card {
  background: var(--white);
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.sku-card:hover { border-color: var(--sage); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.sku-card.selected { border-color: var(--sage); background: var(--parchment); }
.sku-code { font-size: 0.68rem; color: var(--muted); font-family: monospace; letter-spacing: 0.04em; }
.sku-name { font-family: var(--font-display); font-size: 1rem; font-weight: 500; color: var(--noir); }
.sku-inspired { font-size: 0.75rem; color: var(--muted); }
.sku-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--mist);
}
.sku-price { font-size: 0.9rem; font-weight: 600; color: var(--sage-deep); }
.sku-retail { font-size: 0.75rem; color: var(--muted); text-decoration: line-through; }
.sku-margin { font-size: 0.75rem; color: var(--sage); font-weight: 500; }

/* Quantity control */
.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  width: 36px; height: 36px;
  background: var(--parchment);
  color: var(--mid);
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  transition: background var(--transition);
  min-height: 36px;
}
.qty-btn:hover { background: var(--mist); }
.qty-input {
  flex: 1;
  min-width: 36px;
  text-align: center;
  border: none;
  border-left: 1.5px solid var(--mist);
  border-right: 1.5px solid var(--mist);
  font-size: 0.875rem;
  background: var(--white);
  padding: 0 4px;
  height: 36px;
}
.qty-input:focus { outline: none; }

/* ── Sticky Cart / Summary ───────────────────────────────── */
.cart-bar {
  position: fixed;
  bottom: 64px;
  left: 0; right: 0;
  background: var(--noir);
  color: var(--white);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  font-size: 0.875rem;
  box-shadow: 0 -4px 20px rgba(13,11,30,.25);
}
.cart-bar .cart-total { font-size: 1rem; font-weight: 600; }

@media (min-width: 768px) { .cart-bar { bottom: 0; } }

/* ── Mobile Bottom Nav ───────────────────────────────────── */
.mobile-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--white);
  border-top: 1px solid var(--mist);
  display: flex;
  align-items: stretch;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(13,11,30,.06);
}
.mobile-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
  padding: 8px 4px;
  min-height: 64px;
}
.mobile-nav a svg { width: 21px; height: 21px; }
.mobile-nav a.active, .mobile-nav a:hover { color: var(--sage); }

/* Desktop: horizontal tab bar */
@media (min-width: 768px) {
  .mobile-nav {
    position: static;
    height: auto;
    border-top: none;
    border-bottom: 1px solid var(--mist);
    box-shadow: none;
    padding: 0 32px;
    justify-content: flex-start;
  }
  .mobile-nav a {
    flex: none;
    flex-direction: row;
    min-height: 48px;
    height: 48px;
    gap: 7px;
    padding: 0 16px;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    text-transform: none;
    border-radius: 0;
    border-bottom: 2px solid transparent;
  }
  .mobile-nav a.active {
    color: var(--sage);
    border-bottom-color: var(--sage);
  }
  .mobile-nav a svg { width: 15px; height: 15px; }
}

/* ── Top App Bar (portal) ────────────────────────────────── */
.app-bar {
  background: var(--white);
  border-bottom: 1px solid var(--mist);
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 150;
}
.app-bar .logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--noir);
}
.app-bar .ibo-code { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.06em; margin-top: 1px; }

@media (min-width: 768px) {
  .app-bar { padding: 0 32px; height: 60px; }
  .app-bar .logo-text { font-size: 1.5rem; }
}

/* ── Page header (public) ────────────────────────────────── */
.page-header-pub {
  background: var(--noir);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 150;
}
.page-header-pub .logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--white);
}

@media (min-width: 768px) {
  .page-header-pub { padding: 0 40px; height: 64px; }
  .page-header-pub .logo-text { font-size: 1.7rem; }
}

/* ── Portal content area ─────────────────────────────────── */
.portal-main { padding: 24px 20px 140px; }

@media (min-width: 768px) {
  .portal-main {
    padding: 32px 40px 60px;
  }
}

/* ── Quick link cards ────────────────────────────────────── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.quick-link {
  background: var(--white);
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--mid);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}
.quick-link:hover { border-color: var(--sage); background: var(--parchment); color: var(--sage-deep); box-shadow: var(--shadow-hover); }
.quick-link svg { width: 24px; height: 24px; color: var(--sage); }
.quick-link span { font-size: 0.8125rem; font-weight: 500; }

/* ── Activity feed ───────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--mist);
  align-items: flex-start;
  font-size: 0.875rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage-mist); margin-top: 6px; flex-shrink: 0; }
.activity-text { flex: 1; color: var(--mid); line-height: 1.45; }
.activity-time { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

/* ── Maintenance widget ──────────────────────────────────── */
.maintenance-widget { background: var(--parchment); border: 1.5px solid var(--mist); border-radius: var(--radius-md); padding: 16px; }
.maintenance-widget.ok   { border-color: #A7F3D0; background: #ECFDF5; }
.maintenance-widget.warn { border-color: #FCD34D; background: #FFFBEB; }

/* ── Section headings ────────────────────────────────────── */
.section-title {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--mist);
  margin-bottom: 16px;
}

/* ── Landing / Public ────────────────────────────────────── */
.hero-section {
  background: linear-gradient(155deg, #0D0B1E 0%, #1A1040 60%, #2A1565 100%);
  padding: 60px 20px 50px;
  text-align: center;
  color: var(--white);
}
.hero-section h1 { color: var(--white); margin-bottom: 18px; }
.hero-lead {
  font-size: 1.05rem;
  color: rgba(237,233,254,.82);
  margin-bottom: 36px;
  line-height: 1.65;
}
@media (min-width: 768px) {
  .hero-section { padding: 88px 40px 76px; text-align: left; }
  .hero-section h1 { font-size: clamp(2.6rem, 3.5vw, 3.8rem); }
  .hero-lead { max-width: 520px; font-size: 1.12rem; }
}
@media (min-width: 1024px) { .hero-section { padding: 110px 80px 100px; } }

.hero-sticky {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--noir);
  padding: 16px 20px;
  z-index: 300;
  display: none;
  box-shadow: 0 -4px 20px rgba(13,11,30,.3);
}
@media (max-width: 640px) { .hero-sticky { display: block; } }

.how-step {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--mist);
  align-items: flex-start;
}
.how-step:last-child { border-bottom: none; }
.how-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage), var(--sage-deep));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(109,40,217,.30);
}
.how-content h4 { color: var(--noir); margin-bottom: 4px; }
.how-content p  { font-size: 0.875rem; color: var(--muted); }

.earnings-scenario {
  background: var(--white);
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}
.earnings-scenario:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.earnings-scenario .es-amount {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--sage);
}
.earnings-scenario .es-label { font-size: 0.8125rem; color: var(--muted); margin-top: 6px; }

.tier-card {
  background: var(--white);
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.tier-card h3 { font-family: var(--font-display); color: var(--noir); margin-bottom: 10px; font-size: 1.2rem; }
.tier-row { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 5px 0; }
.tier-row .label { color: var(--muted); }
.tier-row .val   { font-weight: 600; color: var(--mid); }

/* ── Admin ───────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 224px;
  background: var(--noir);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.admin-sidebar .sidebar-logo {
  padding: 22px 20px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-sidebar .sidebar-logo small {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: rgba(237,233,254,.5);
  text-transform: uppercase;
  margin-top: 2px;
  font-weight: 400;
}
.sidebar-nav { flex: 1; padding: 16px 0; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: rgba(255,255,255,.6);
  font-size: 0.875rem;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}
.sidebar-nav a:hover   { color: var(--white); background: rgba(255,255,255,.06); }
.sidebar-nav a.active  { color: rgba(237,233,254,.95); background: rgba(109,40,217,.25); }
.sidebar-nav a svg     { width: 18px; height: 18px; flex-shrink: 0; }

.admin-main { flex: 1; overflow-x: hidden; background: var(--parchment); }
.admin-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--mist);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-topbar h1 { font-size: 1.05rem; font-family: var(--font-ui); font-weight: 500; color: var(--mid); }
.admin-content { padding: 28px; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.metric-grid-3 { grid-template-columns: repeat(3, 1fr); }
.metric-card {
  background: var(--white);
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.metric-card .m-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.metric-card .m-value { font-size: 1.8rem; font-weight: 600; color: var(--sage); }
.metric-card .m-delta { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

.comm-steps {
  display: flex;
  margin-bottom: 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--mist);
}
.comm-step {
  flex: 1;
  padding: 14px 16px;
  background: var(--white);
  border-right: 1px solid var(--mist);
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}
.comm-step:last-child { border-right: none; }
.comm-step.active { background: var(--sage-mist); color: var(--sage-deep); font-weight: 500; }
.comm-step.done   { background: var(--parchment); color: var(--sage); }
.comm-step-num { font-size: 1.1rem; font-weight: 600; display: block; margin-bottom: 2px; color: inherit; }

.admin-two-col,
.admin-detail-grid {
  display: grid;
  gap: 20px;
  align-items: start;
}
.admin-two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-detail-grid { grid-template-columns: 280px minmax(0, 1fr); gap: 24px; }
.admin-detail-grid--wide { grid-template-columns: 300px minmax(0, 1fr); }
.admin-tab {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  margin: 0 8px 12px 0;
}
.admin-tab.active,
.admin-tab:hover {
  border-color: var(--sage);
  color: var(--sage);
  background: var(--sage-mist);
}

@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .sidebar-nav { display: flex; flex-wrap: wrap; padding: 8px; }
  .sidebar-nav a { padding: 8px 12px; font-size: 0.8rem; border-radius: var(--radius-sm); }
  .admin-content { padding: 16px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid-3,
  .admin-two-col,
  .admin-detail-grid,
  .admin-detail-grid--wide { grid-template-columns: 1fr; }
  .admin-topbar { padding: 0 16px; }
}

/* ── Scent filter tabs ───────────────────────────────────── */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-tab {
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--mist);
  font-size: 0.8125rem;
  cursor: pointer;
  background: var(--white);
  color: var(--muted);
  transition: all var(--transition);
  min-height: 40px;
  display: flex; align-items: center; gap: 6px;
  font-weight: 500;
}
.filter-tab.active { background: var(--sage); color: var(--white); border-color: var(--sage); box-shadow: 0 2px 8px rgba(109,40,217,.25); }
.filter-tab:hover:not(.active) { border-color: var(--sage); color: var(--sage); }

/* ── Copy link box ───────────────────────────────────────── */
.link-box {
  display: flex;
  background: var(--parchment);
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
}
.link-box input {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  border: none;
  font-size: 0.8125rem;
  color: var(--mid);
  min-width: 0;
}
.link-box input:focus { outline: none; }
.link-copy-btn {
  padding: 10px 16px;
  background: var(--sage);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
}
.link-copy-btn:hover { background: var(--sage-deep); }

/* ── Payment modal ───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,11,30,.7);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  backdrop-filter: blur(4px);
}
@media (min-width: 480px) {
  .modal-overlay { align-items: center; justify-content: center; }
}
.modal {
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 28px 24px 40px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 480px) { .modal { border-radius: var(--radius-lg); padding: 40px 36px; } }
.modal h3 { margin-bottom: 8px; }
.modal p  { font-size: 0.875rem; color: var(--muted); margin-bottom: 28px; }
.modal-actions { display: flex; flex-direction: column; gap: 12px; }

/* ── Sponsor banner (register) ───────────────────────────── */
.sponsor-banner {
  background: var(--sage-mist);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--sage-deep);
  border: 1px solid rgba(109,40,217,.15);
}
.sponsor-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 600;
  flex-shrink: 0;
}

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

/* ── Utilities ───────────────────────────────────────────── */
.text-sage   { color: var(--sage); }
.text-muted  { color: var(--muted); }
.text-noir   { color: var(--noir); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.p-0   { padding: 0; }
.gap-8 { gap: 8px; }
.gap-12{ gap: 12px; }
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Scent checkbox grid (activate page) ────────────────── */
.scent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 400px) { .scent-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .scent-grid { grid-template-columns: repeat(4, 1fr); } }
.scent-check-card {
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  cursor: pointer;
  position: relative;
  text-align: center;
  background: var(--white);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  user-select: none;
}
.scent-check-card input[type="checkbox"] {
  position: absolute; top: 8px; right: 8px;
  width: 16px; height: 16px;
  accent-color: var(--sage);
}
.scent-check-card .scent-name { font-size: 0.8rem; font-weight: 500; color: var(--noir); }
.scent-check-card .scent-insp { font-size: 0.68rem; color: var(--muted); }
.scent-check-card.checked { border-color: var(--sage); background: var(--parchment); box-shadow: 0 0 0 2px rgba(109,40,217,.12); }
.scent-check-card.disabled { opacity: 0.4; pointer-events: none; }

/* ── Order summary sticky bar ────────────────────────────── */
.order-summary-bar {
  background: var(--white);
  border-top: 1px solid var(--mist);
  padding: 16px 20px;
  position: sticky;
  bottom: 0;
  box-shadow: 0 -4px 16px rgba(13,11,30,.06);
}
.order-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  padding: 4px 0;
  color: var(--mid);
}
.order-summary-row.total {
  font-size: 1rem;
  font-weight: 600;
  color: var(--noir);
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--mist);
}
.order-summary-profit {
  background: var(--sage-mist);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: var(--sage-deep);
  font-weight: 500;
}

/* ── Payout history table ────────────────────────────────── */
.payout-row-expand { background: var(--parchment); }
.payout-row-expand td { padding: 0; }
.payout-expand-inner { padding: 12px 16px; font-size: 0.8125rem; }

/* ── Responsive grid utilities ───────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 480px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }

/* ── Scrollbar (webkit) ──────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--parchment); }
::-webkit-scrollbar-thumb { background: rgba(109,40,217,.25); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--sage); }
