/* ============================================================
   Scente — Design System
   Mobile-first. 375px base. Scale up.
   Brand: Noir #0D0D0D · Sage #7A9E7E · Mist #B8CEBB
          Deep Sage #4A6E4E · Parchment #F5F2EC
   Fonts: Cormorant Garamond (display) · DM Sans (UI)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --noir:         #0D0D0D;
  --sage:         #7A9E7E;
  --sage-mist:    #B8CEBB;
  --sage-deep:    #4A6E4E;
  --parchment:    #F5F2EC;
  --mist:         #E8E4DC;
  --mid:          #444441;
  --muted:        #888780;
  --white:        #FFFFFF;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui:      'DM Sans', system-ui, sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-pill: 50px;

  --shadow-card: 0 1px 3px rgba(0,0,0,.06);
  --transition: 180ms 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.6;
  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: 300;
  line-height: 1.2;
  color: var(--noir);
  letter-spacing: 0.04em;
}
h1 { font-size: clamp(2rem, 8vw, 3.5rem); letter-spacing: 0.06em; }
h2 { font-size: clamp(1.5rem, 5vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; font-weight: 400; }

.display-serif {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.08em;
}
.label-caps {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  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: 900px; margin: 0 auto; padding: 0 20px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: background var(--transition), color var(--transition), border-color 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); }
.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: #C0392B;
  color: var(--white);
  border: 1px solid #C0392B;
}
.btn-danger:hover { background: #96281B; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: 0.8125rem; }
.btn-lg { min-height: 56px; padding: 14px 32px; font-size: 1rem; }

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

/* ── Stat Card ───────────────────────────────────────────── */
.stat-card {
  background: var(--parchment);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: left;
}
.stat-card .stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 4px;
}
.stat-card .stat-value {
  font-family: var(--font-ui);
  font-size: 1.6rem;
  font-weight: 400;
  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: 400;
  color: var(--mid);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--mist);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--noir);
  font-size: 1rem;
  transition: border-color var(--transition);
  min-height: 44px;
}
.form-control:focus {
  outline: none;
  border-color: var(--sage);
}
.form-control::placeholder { color: var(--muted); }
.form-control.error { border-color: #C0392B; }

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='%23888780' 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: #C0392B; 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: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-active    { background: var(--sage-mist); color: var(--sage-deep); }
.badge-pending   { background: #FEF3CD; color: #92660A; }
.badge-inactive  { background: #FDECEA; color: #8B2020; }
.badge-suspended { background: #F0EBF8; color: #5A2D82; }
.badge-info      { background: #D6EAF8; color: #1A5276; }
.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: #2D2D2D; color: var(--muted); }
.badge-her    { background: var(--sage-mist); color: #2D4A30; }
.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;
}
.flash-success, .alert-success { background: #E8F5E9; color: #2E7D32; border-left: 3px solid #4CAF50; }
.flash-error,   .alert-error   { background: #FDECEA; color: #8B2020; border-left: 3px solid #C0392B; }
.alert-warning { background: #FEF3CD; color: #7D5A0E; border-left: 3px solid #F39C12; }
.alert-info    { background: #D6EAF8; color: #1A5276; border-left: 3px solid #2E86C1; }
.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: var(--sage); 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: 300;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 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); }

/* ── SKU / Product Cards ─────────────────────────────────── */
.sku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.sku-card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--transition);
  position: relative;
}
.sku-card:hover { border-color: var(--sage-mist); }
.sku-card.selected { border-color: var(--sage); background: #F0F7F1; }
.sku-code { font-size: 0.7rem; color: var(--muted); font-family: monospace; }
.sku-name { font-family: var(--font-display); font-size: 1rem; font-weight: 300; 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.875rem; font-weight: 500; 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); }

/* Quantity control */
.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px 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 {
  width: 44px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--mist);
  border-right: 1px 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; /* above mobile nav */
  left: 0; right: 0;
  background: var(--noir);
  color: var(--white);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  font-size: 0.875rem;
}
.cart-bar .cart-total { font-size: 1rem; font-weight: 500; }

/* ── 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;
}
.mobile-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--transition);
  padding: 8px 4px;
  min-height: 64px;
}
.mobile-nav a svg { width: 22px; height: 22px; }
.mobile-nav a.active, .mobile-nav a:hover { color: var(--sage); }
.mobile-nav a.active svg path { stroke: var(--sage); }

/* ── 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: 300;
  letter-spacing: 0.18em;
  color: var(--noir);
}
.app-bar .ibo-code { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.06em; }

/* ── Page header (public) ────────────────────────────────── */
.page-header-pub {
  background: var(--noir);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-header-pub .logo-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--white);
}

/* ── Portal content area ─────────────────────────────────── */
.portal-main {
  padding: 20px;
  padding-bottom: 140px; /* nav + cart bar clearance */
}

/* ── Quick link cards ────────────────────────────────────── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.quick-link {
  background: var(--white);
  border: 1px 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);
  text-decoration: none;
}
.quick-link:hover { border-color: var(--sage); background: var(--parchment); color: var(--sage-deep); }
.quick-link svg { width: 24px; height: 24px; color: var(--sage); }
.quick-link span { font-size: 0.8125rem; font-weight: 400; }

/* ── Activity feed ───────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 0; }
.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.4; }
.activity-time { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

/* ── Maintenance widget ──────────────────────────────────── */
.maintenance-widget {
  background: var(--parchment);
  border: 1px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 16px;
}
.maintenance-widget.ok { border-color: var(--sage-mist); background: #F0F7F1; }
.maintenance-widget.warn { border-color: #F39C12; background: #FEF9EC; }

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

/* ── Landing / Public ────────────────────────────────────── */
.hero-section {
  background: var(--noir);
  padding: 60px 20px 50px;
  text-align: center;
  color: var(--white);
}
.hero-section h1 { color: var(--white); margin-bottom: 16px; }
.hero-lead { font-size: 1.1rem; color: var(--sage-mist); margin-bottom: 32px; line-height: 1.5; }
.hero-sticky {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--noir);
  padding: 16px 20px;
  z-index: 300;
  display: none;
}
@media (max-width: 640px) { .hero-sticky { display: block; } }

.how-step {
  display: flex;
  gap: 16px;
  padding: 16px 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: var(--sage);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.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: 1px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin-bottom: 12px;
}
.earnings-scenario .es-amount {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--sage);
}
.earnings-scenario .es-label { font-size: 0.8125rem; color: var(--muted); margin-top: 4px; }

.tier-card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
}
.tier-card h3 { font-family: var(--font-display); color: var(--noir); margin-bottom: 8px; }
.tier-row { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 4px 0; }
.tier-row .label { color: var(--muted); }
.tier-row .val   { font-weight: 500; color: var(--mid); }

/* ── Admin ───────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px;
  background: var(--noir);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.admin-sidebar .sidebar-logo {
  padding: 20px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.14em;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-sidebar .sidebar-logo small {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--sage-mist);
  text-transform: uppercase;
  margin-top: 2px;
}
.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,.65);
  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: var(--sage-mist); background: rgba(122,158,126,.15); }
.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.1rem; font-family: var(--font-ui); font-weight: 400; 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-card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 20px;
}
.metric-card .m-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; }
.metric-card .m-value { font-size: 1.75rem; font-weight: 400; color: var(--sage); font-family: var(--font-ui); }
.metric-card .m-delta { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

/* Commission run steps */
.comm-steps {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px 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: 400; display: block; margin-bottom: 2px; color: inherit; }

/* Mobile admin (simple stack layout) */
@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); }
}

/* ── 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: 1px solid var(--mist);
  font-size: 0.8125rem;
  cursor: pointer;
  background: var(--white);
  color: var(--muted);
  transition: all var(--transition);
  min-height: 44px;
  display: flex; align-items: center; gap: 6px;
}
.filter-tab.active { background: var(--sage); color: var(--white); border-color: var(--sage); }
.filter-tab:hover:not(.active) { border-color: var(--sage-mist); }

/* ── Copy link box ───────────────────────────────────────── */
.link-box {
  display: flex;
  background: var(--parchment);
  border: 1px 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;
  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(0,0,0,.7);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
}
@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: 420px;
  text-align: center;
}
@media (min-width: 480px) {
  .modal { border-radius: var(--radius-lg); padding: 36px 32px; }
}
.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: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--sage-deep);
}
.sponsor-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  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); }
}
.scent-check-card {
  border: 1px 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);
  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: 400; color: var(--noir); }
.scent-check-card .scent-insp { font-size: 0.68rem; color: var(--muted); }
.scent-check-card.checked { border-color: var(--sage); background: #F0F7F1; }
.scent-check-card.disabled { opacity: 0.45; 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;
}
.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: 500;
  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); }

/* ── 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: var(--sage-mist); border-radius: 2px; }
