/* FlexForth — purple (#6D28D9) + dark navy (#1E1B4B) theme */
:root {
  --purple: #6d28d9;
  --purple-dark: #5b21b6;
  --purple-light: #ede9fe;
  --navy: #1e1b4b;
  --bg: #f6f5fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --green: #059669;
  --red: #dc2626;
  --amber: #d97706;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(30, 27, 75, 0.08), 0 4px 12px rgba(30, 27, 75, 0.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 640px; }
main.wrap { padding-top: 28px; padding-bottom: 48px; }
h1 { font-size: 1.75rem; margin: 0 0 16px; }
h1.h3 { font-size: 1.25rem; }
h3 { margin-top: 0; }
.center { text-align: center; }
.small { font-size: 0.85rem; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--green); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }

/* Header */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.nav-row { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.brand-name { font-weight: 800; font-size: 1.25rem; letter-spacing: 0.5px; }
.nav-links { display: flex; align-items: center; gap: 14px; }
.nav-links a { color: #d6d3f5; }
.nav-links a:hover { color: #fff; }
.nav-user { color: #a5b4fc; font-size: 0.9rem; }
.inline-form { display: inline; margin: 0; }

/* Buttons */
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 8px;
  padding: 9px 18px; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  text-align: center; transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); color: #fff; }
/* .btn-p (primary) and .btn-n (neutral) were unstyled: buttons using them
   rendered as borderless text and hovering changed nothing visible. */
.btn-p { background: var(--purple); color: #fff; }
.btn-p:hover { background: var(--purple-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(109, 40, 217, 0.35); }
.btn-p:focus-visible { background: var(--purple-dark); color: #fff; outline: 2px solid var(--purple-dark); outline-offset: 2px; }
.btn-n { background: var(--surface, #fff); color: var(--ink, var(--text)); border-color: var(--border); }
.btn-n:hover { background: var(--surface-2, #f4f5fb); border-color: var(--purple); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(20, 27, 60, 0.12); }
.btn-n:focus-visible { background: var(--surface-2, #f4f5fb); outline: 2px solid var(--purple); outline-offset: 2px; }
.btn-ghost { background: transparent; color: #d6d3f5; border-color: rgba(255,255,255,0.35); }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-outline-light { border-color: rgba(255,255,255,0.6); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--red); border-color: var(--border); }
.btn-danger-ghost:hover { background: #fef2f2; }
.btn-block { display: block; width: 100%; margin-top: 10px; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; }
main .btn-ghost, .card .btn-ghost { color: var(--purple); border-color: var(--purple); }
main .btn-ghost:hover, .card .btn-ghost:hover { background: var(--purple-light); color: var(--purple-dark); }

/* Hero */
.hero { background: var(--bg); color: #fff; padding: 0; position: relative; overflow: hidden; }
.hero-kicker { text-transform: uppercase; letter-spacing: 4px; font-size: 0.85rem; color: #c4b5fd; font-weight: 700; margin: 0 0 16px; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.hero-title { font-size: 4.2rem; margin: 0 0 20px; line-height: 1.05; color: #fff; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,0.55), 0 4px 24px rgba(0,0,0,0.35); }
.hero-title span { color: #c4b5fd; margin-left: 0.15em; }
.hero-sub { font-size: 1.35rem; color: #fff; max-width: 700px; line-height: 1.6; font-weight: 500; text-shadow: 0 2px 6px rgba(0,0,0,0.65), 0 4px 18px rgba(0,0,0,0.45); }
.hero-cta { display: flex; gap: 14px; margin: 32px 0 0; flex-wrap: wrap; }
.hero-cta .btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.hero-cta .btn-primary { box-shadow: 0 4px 20px rgba(124,58,237,0.5); }
.hero-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.5); }
.hero-cta .btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.1); }
/* Stats proof bar: full-width navy strip below the hero */
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  background: #1e1b4b; padding: 32px 48px; margin: 0; max-width: none;
  position: relative; z-index: 1; }
.hero-stats div { display: flex; flex-direction: column; align-items: center; text-align: center; white-space: normal; }
.hero-stats strong { font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1.1; }
.hero-stats strong .accent { color: #c4b5fd; font-weight: 800; font-size: 2.4rem; }
.hero-stats strong span { font-size: 2.4rem; font-weight: 800; }
.hero-stats span { color: rgba(255,255,255,0.7); font-size: 0.95rem; margin-top: 6px; line-height: 1.45; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: #fff; }
.section-title { text-align: center; margin-bottom: 36px; font-size: 1.9rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 20px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; margin-bottom: 20px;
}
.price-card { text-align: center; }
.price-card.highlight { border: 2px solid var(--purple); }
.price { font-size: 2.2rem; font-weight: 800; color: var(--navy); margin: 8px 0; }
.price span { font-size: 1rem; font-weight: 400; color: var(--muted); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { text-align: center; padding: 12px; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--purple); color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 12px;
}

/* Forms */
.form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 0.92rem; }
.form input, .form textarea, .form select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-weight: 400;
  font-family: inherit;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-light);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-card p { margin: 0 0 16px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 8px; border-bottom: 2px solid var(--border); }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }

/* Badges */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; white-space: nowrap;
  background: #e5e7eb; color: #374151;
}
.badge-received { background: #dbeafe; color: #1d4ed8; }
.badge-processing { background: #fef3c7; color: #b45309; }
.badge-label_purchased { background: #ede9fe; color: var(--purple-dark); }
.badge-shipped { background: #d1fae5; color: #047857; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }
.badge-on_hold_funds { background: #fee2e2; color: #b91c1c; }
/* #P25 Unified Tracking: tracking-derived statuses (dashboard Recent
   orders, Orders list, Tracking page). Blue for in transit, deeper greens
   as the parcel nears delivery; exception reuses the red of On hold. */
.badge-in_transit { background: #bfdbfe; color: #1e40af; }
.badge-out_for_delivery { background: #a7f3d0; color: #065f46; }
.badge-delivered { background: #bbf7d0; color: #166534; }
.badge-exception { background: #fee2e2; color: #b91c1c; }
/* #C20: dashboard Recent panel — label-only parcels with no scans yet
   ("Label created") and dropped-off parcels keep the same purple as a
   bought label, matching the Tracking page. */
.badge-label_created { background: #ede9fe; color: var(--purple-dark); }
.badge-dropped_off { background: #ede9fe; color: var(--purple-dark); }
.badge-topup { background: #d1fae5; color: #047857; }
.badge-debit { background: #fee2e2; color: #b91c1c; }
.badge-adjustment { background: #fef3c7; color: #b45309; }
.badge-manual_topup { background: #ede9fe; color: #6d28d9; }
.badge-bonus { background: #d1fae5; color: #047857; }
.badge-pending { background: #fef3c7; color: #b45309; }
.badge-ok { background: #d1fae5; color: #047857; }
.badge-warn { background: #fef3c7; color: #b45309; }
.badge-bad { background: #fee2e2; color: #b91c1c; }

/* #P62: per-customer override inputs on the Fulfillment fees page. A
   stored number must stand out from a blank "Global" at a glance, so it
   gets the same amber as the "Mixed" badge; a blank input stays neutral
   and muted. The class is set server-side in the view, not by JS. */
.override-input {
  width: 96px; padding: 6px 8px; text-align: right;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.9rem; font-variant-numeric: tabular-nums;
  background: var(--card); color: var(--text);
}
.override-input::placeholder { color: var(--muted); }
.override-input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-light); }
.override-input.has-value { background: #fef3c7; border-color: #d97706; color: #92400e; font-weight: 700; }
html[data-theme="dark"] .override-input { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .override-input.has-value { background: #451a03; border-color: #f2ab63; color: #fcd34d; }
html[data-theme="dark"] .override-input:focus { box-shadow: 0 0 0 3px rgba(109, 40, 217, .45); }

/* #P67: override inputs that live inside .rev-theme .field labels
   (crew-payout global rates, storage-setup pricing fields). The field
   rule (0,2,1) outranks .override-input.has-value (0,2,0) on
   background/border/colour in light mode, while the dark
   .override-input.has-value rule (0,3,1) would win in dark only — so
   without this the amber would show in dark and not in light. This
   rule wins in both themes, with the same amber in each. */
.rev-theme .field input.override-input.has-value { background: #fef3c7; border-color: #d97706; color: #92400e; }
html[data-theme="dark"] .rev-theme .field input.override-input.has-value { background: #451a03; border-color: #f2ab63; color: #fcd34d; }

/* #P67: the Customer Pricing edit drawer dialog in dark mode. .ff-dialog
   is hardcoded white with no dark variant, while the drawer form's
   labels take dark-theme light colours — the labels were near-invisible
   on the white dialog. Scoped to the pricing drawer only: the
   printed-matter confirm dialog (#C35) and the marketing popups stay
   white in both themes by design. */
html[data-theme="dark"] .ff-dialog--drawer { background: var(--surface); border: 1px solid var(--line); }
html[data-theme="dark"] .ff-dialog--drawer h3 { color: var(--ink); }
html[data-theme="dark"] .ff-dialog--drawer .ff-dialog-x { color: var(--muted); }

/* Banners & flashes */
.banner, .flash { border-radius: 10px; padding: 14px 18px; margin: 16px 0; font-size: 0.95rem; }
.banner-warn, .flash-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.flash-success { background: #ecfdf5; }
.banner-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.banner-danger, .flash-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.banner a { font-weight: 700; }

/* Dashboard bits */
.stat-card .stat-label { display: block; color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .stat-value { display: block; font-size: 2rem; font-weight: 800; color: var(--navy); margin: 6px 0 12px; }
.stat-card .stat-value.small { font-size: 1.2rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.row-between h1, .row-between h3 { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--muted); font-size: 0.88rem; }
/* Agency request checkbox pills (marketplaces + market countries). Base rule
   reproduces the exact inline style the labels used to carry. */
.pick-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #cbd5e1; border-radius: 24px; padding: 8px 16px; font-size: .88rem; cursor: pointer; background: #fff; }
.chip:hover { text-decoration: none; border-color: var(--purple); color: var(--purple); }
.chip-active { background: var(--purple); border-color: var(--purple); color: #fff; }
.chip-active:hover { color: #fff; }
.status-row { display: flex; gap: 12px; flex-wrap: wrap; }
.status-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 10px; padding: 8px 14px; }
.status-chip:hover { text-decoration: none; }

/* Detail lists */
.detail { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; margin: 0; }
.detail dt { color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.detail dd { margin: 0; }
code { background: var(--purple-light); color: var(--purple-dark); padding: 2px 6px; border-radius: 4px; font-size: 0.88em; }

/* Footer */
.site-footer { background: var(--navy); color: #d6d3f5; padding: 32px 0; margin-top: 24px; }
.footer-row { display: flex; justify-content: space-between; align-items: flex-start; }
.site-footer a { color: #fff; }
.site-footer strong { color: #fff; font-size: 1.1rem; }

@media (max-width: 820px) {
  .grid-3, .grid-2, .grid-4, .steps { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.2rem; }
  .nav-links { gap: 8px; font-size: 0.9rem; }
  .detail { grid-template-columns: 1fr; }
  .detail dt { margin-top: 8px; }
}

/* Phase 2: regions + richer footer */
.region-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.region { background: var(--card, #fff); border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; text-align: center; }
.region strong { display: block; font-size: 1.15rem; color: var(--navy); }
.region span { color: var(--muted, #6b7280); font-size: 0.85rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-h { display: block; margin-bottom: 8px; }
.footer-base { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.12); }
@media (max-width: 720px) {
  .region-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ============ Phase 3 ============ */

/* --- Branding: icon mark + wordmark (no duplication) --- */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-icon { height: 44px; width: auto; display: block;
  filter: drop-shadow(0 2px 10px rgba(109,40,217,0.55)); }
.brand-name { font-weight: 800; font-size: 1.6rem; letter-spacing: 0.5px; color: #fff; }
.brand-name em { font-style: normal; background: linear-gradient(120deg, #c4b5fd, #a78bfa 60%, #f0abfc);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-header { transition: box-shadow 0.2s; }
.site-header.scrolled { box-shadow: 0 4px 18px rgba(0,0,0,0.35); }

/* --- Landing slideshow --- */
.hero { position: relative; overflow: hidden; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide::after { content: ""; position: absolute; inset: 0; }
/* Per-slide dark gradients: navy-dominant, each with its own hue so the
   three slides feel distinct. Dark on the left for text contrast, fading
   to transparent on the right so the photo shows through. */
.hero-slide.tint-fulfill::after {
  background: linear-gradient(120deg, rgba(30,27,75,0.72) 0%, rgba(30,27,75,0.35) 55%, rgba(30,27,75,0.08) 100%); }
.hero-slide.tint-agency::after {
  background: linear-gradient(120deg, rgba(15,40,80,0.72) 0%, rgba(15,40,80,0.35) 55%, rgba(15,40,80,0.08) 100%); }
.hero-slide.tint-freight::after {
  background: linear-gradient(120deg, rgba(60,30,10,0.70) 0%, rgba(60,30,10,0.32) 55%, rgba(60,30,10,0.08) 100%); }
.hero-inner { position: relative; z-index: 1; padding: 88px 0 72px; }
.hero-dots { display: flex; gap: 8px; margin-top: 28px; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(109,40,217,0.25);
  border: none; cursor: pointer; padding: 0; }
.hero-dot.active { background: var(--purple); }

/* --- Scroll reveal + counters --- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* --- Service cards with imagery --- */
.service-card { overflow: hidden; padding: 0; }
.service-card img { width: 100%; height: 170px; object-fit: cover; display: block; }
.service-card .service-body { padding: 22px 24px 24px; }

/* --- Inner-page banner strip --- */
.page-banner { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px;
  min-height: 150px; display: flex; align-items: flex-end; }
.page-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-banner::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(30,27,75,0.88), rgba(109,40,217,0.55)); }
.page-banner .page-banner-text { position: relative; z-index: 1; color: #fff; padding: 20px 24px; }
.page-banner .page-banner-text h2 { margin: 0; font-size: 1.5rem; }
.page-banner .page-banner-text p { margin: 4px 0 0; color: #e0e7ff; font-size: 0.95rem; }

/* --- Inventory UI --- */
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter-bar select, .filter-bar input[type="search"] {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.92rem; font-family: inherit;
}
.filter-bar .check { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.row-low { background: #fffbeb; }
.inline-adjust { display: flex; gap: 6px; align-items: center; }
.inline-adjust input[type="number"] { width: 76px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.85rem; }
.inline-adjust input[type="text"] { width: 150px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.85rem; }
.banner-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }

/* --- Scanner --- */
.scanner-box { width: 100%; max-width: 480px; margin: 0 auto; border-radius: 12px; overflow: hidden;
  background: #111; min-height: 300px; }
.scanner-box video { width: 100%; display: block; }

/* --- Printable barcode labels --- */
.label-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.label-card { border: 1px dashed #9ca3af; border-radius: 8px; padding: 12px; text-align: center; background: #fff;
  page-break-inside: avoid; }
.label-card .barcode { width: 100%; height: 64px; }
.label-sku { font-weight: 800; font-size: 1.05rem; color: var(--navy); margin-top: 4px; }
.label-name { font-size: 0.85rem; color: var(--text); }
.label-meta { font-size: 0.75rem; color: var(--muted); }
@media print {
  .no-print, .site-header, .site-footer { display: none !important; }
  body { background: #fff; }
  .print-full { max-width: none; padding: 0; }
  .label-sheet { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .label-card { box-shadow: none; }
}

/* --- Revenue bars --- */
.bar-row { display: grid; grid-template-columns: 70px 1fr 150px; gap: 10px; align-items: center; margin-bottom: 10px; }
.bar-month { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.bar-track { background: var(--bg); border-radius: 999px; height: 14px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--purple), #a78bfa); border-radius: 999px; }
.bar-val { font-size: 0.9rem; }

/* --- New badge flavors --- */
.badge-ok { background: #d1fae5; color: #047857; }
.badge-low { background: #fef3c7; color: #b45309; }
.badge-receive { background: #dbeafe; color: #1d4ed8; }
.badge-ship { background: #ede9fe; color: var(--purple-dark); }
.badge-adjustment { background: #fef3c7; color: #b45309; }
.badge-return { background: #e0e7ff; color: #3730a3; }
.badge-expected { background: #dbeafe; color: #1d4ed8; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }
.badge-owner { background: linear-gradient(120deg, var(--purple), var(--navy)); color: #fff; }
.badge-warehouse { background: #e0e7ff; color: #3730a3; }
/* #P39: the staff page Access level column used to show a badge AND a
   select AND a Save button stacked in every row — the level twice over.
   One pill select now does all three: it displays the current level and
   saves on change (onchange submit). Restricted (Level 2) gets an amber
   tint so the restriction reads at a glance. */
.level-select {
  appearance: none; -webkit-appearance: none;
  padding: 4px 24px 4px 10px; border-radius: 999px; border: 1px solid #c7d2fe;
  background: #e0e7ff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%233730a3' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 9px center;
  color: #3730a3; font-size: .82rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.level-select--restricted { background-color: #fef3c7; border-color: #fcd34d; color: #92400e; }
.level-select--restricted { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2392400e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* --- Cleanup: consistent rhythm --- */
main.wrap h1 { letter-spacing: -0.5px; }
.card h3 { color: var(--navy); }
.section-title { letter-spacing: -0.5px; }
@media (max-width: 720px) {
  .label-sheet { grid-template-columns: 1fr 1fr; }
  .brand-name { font-size: 1.3rem; }
  .bar-row { grid-template-columns: 60px 1fr 110px; }
}

/* --- Hero service panes (slideshow content) --- */
.hero-panes { position: relative; min-height: 340px; }
.hero-pane { display: none; }
.hero-pane.active { display: block; animation: heroFade 0.7s ease; }
@keyframes heroFade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-dot { transition: all 0.3s ease; }
.hero-dot.active { width: 28px; border-radius: 6px; background: var(--purple); }
/* Hero CTAs on the light background: solid purple primary, purple-outline ghost. */
.hero-cta .btn-ghost { color: var(--purple); border-color: var(--purple); background: rgba(255,255,255,0.65); }
.hero-cta .btn-ghost:hover { background: var(--purple-light); color: var(--purple-dark); }

/* --- Marketplace marquee strip --- */
.platform-strip { background: var(--navy); padding: 36px 0; }
.platform-note { text-align: center; color: #c7d2fe; font-size: 1.05rem; margin: 0 0 24px; }
.platform-note strong { color: #fff; }
.marquee { overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marqueeScroll 30s linear infinite; }
.mkt { font-size: 1.7rem; font-weight: 800; letter-spacing: 0.5px; padding-right: 76px; white-space: nowrap; }
.mkt-amazon { color: #ff9900; text-transform: lowercase; }
.mkt-walmart { color: #8ec5ff; }
.mkt-temu { color: #ff6b35; letter-spacing: 2px; }
.mkt-ebay b { font-weight: 800; font-style: normal; }
.eb-e { color: #e53238; } .eb-b { color: #4d9fff; } .eb-a { color: #f5af02; } .eb-y { color: #86b817; }
.mkt-shein { color: #fff; letter-spacing: 3px; }
.mkt-shopify { color: #95bf47; }
@keyframes marqueeScroll { to { transform: translateX(-50%); } }

/* --- How-it-works step images --- */
.step img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 14px;
  box-shadow: var(--shadow); }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .hero-pane.active { animation: none; }
}
@media (max-width: 720px) {
  .hero-panes { min-height: 420px; }
  .brand-icon { height: 36px; }
  .brand-name { font-size: 1.3rem; }
}

/* --- Footer: full original logo --- */
.footer-logo { background: #fff; border-radius: 10px; padding: 8px 14px;
  max-width: 220px; width: 100%; height: auto; display: block; margin-bottom: 12px; }

/* ============ Mobile & tablet ============ */

/* --- Hamburger toggle (desktop: hidden) --- */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 44px; height: 44px; background: transparent; border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px; cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease; }
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Tablet and below: collapsible nav panel --- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-row { position: relative; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); border-top: 1px solid rgba(255,255,255,0.12);
    padding: 8px 20px 18px; box-shadow: 0 18px 30px rgba(0,0,0,0.35);
    max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); overflow-y: auto;
  }
  .site-header.nav-open .nav-links { display: flex; }
  .nav-links a:not(.btn) { padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 1rem; }
  .nav-links a:not(.btn):hover { text-decoration: none; background: rgba(255,255,255,0.05); }
  .nav-links .nav-user { padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav-links .btn { margin-top: 12px; text-align: center; padding: 12px 18px; }
  .nav-links .inline-form { margin-top: 12px; }
  .nav-links .inline-form .btn { width: 100%; margin-top: 0; }

  /* Tablet-friendly grids */
  .steps { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 0; }
  .hero-inner { padding: 64px 0 52px; }
  .hero-title { font-size: 2.8rem; }
  .hero-sub { font-size: 1.15rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); padding: 28px 24px; }
  .hero-stats strong, .hero-stats strong span, .hero-stats strong .accent { font-size: 2rem; }
  .section { padding: 48px 0; }
}

/* --- Phones --- */
@media (max-width: 600px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 0; }
  .hero-inner { padding: 52px 0 44px; }
  .hero-title { font-size: 2.4rem; }
  .hero-sub { font-size: 1.1rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { text-align: center; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 24px 20px; }
  .hero-stats strong, .hero-stats strong span, .hero-stats strong .accent { font-size: 1.8rem; }
  .hero-stats span { font-size: 0.85rem; }
  .section { padding: 40px 0; }
  .section-title { font-size: 1.55rem; }
  .card { padding: 18px; }
  .table { font-size: 0.85rem; }
  .table th, .table td { padding: 8px 6px; }
  .row-between { flex-wrap: wrap; gap: 10px; }
  .chip { padding: 9px 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .stat-card .stat-value { font-size: 1.6rem; }
  .flash, .banner { font-size: 0.9rem; }
}

/* --- Customer guide --- */
.guide-section { scroll-margin-top: 90px; }
.guide-toc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.guide-toc a { text-decoration: none; }
.guide-toc a:hover { text-decoration: underline; }
.guide-steps { padding-left: 1.4rem; }
.guide-steps li { margin-bottom: .55rem; }
.guide-section code { background: rgba(109,40,217,.08); padding: 1px 6px; border-radius: 4px; font-size: .88em; }
@media (max-width: 720px) {
  .guide-toc { grid-template-columns: 1fr; }
}

/* Our Story page */
.page-banner .page-banner-text h1 { margin: 0; font-size: 1.9rem; color: #fff; }
.lede { font-size: 1.12rem; line-height: 1.75; }
.story-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 28px; }
.story-stats div { background: var(--card, #fff); border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px 16px; text-align: center; }
.story-stats strong { display: block; font-size: 1.9rem; color: var(--navy); }
.story-stats span { color: var(--muted, #6b7280); font-size: 0.85rem; }
.timeline { position: relative; margin-top: 8px; padding-left: 28px; border-left: 2px solid #e5e7eb; }
.timeline-item { position: relative; padding-bottom: 28px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -37px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--purple); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--purple); }
.timeline-item h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--navy); }
.timeline-item p { margin: 0; }
.card-img { width: 100%; height: 170px; object-fit: cover; border-radius: 8px; margin-bottom: 14px; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { position: relative; padding: 10px 0 10px 34px; border-bottom: 1px solid #f1f2f4; }
.check-list li:last-child { border-bottom: none; }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 18px; height: 10px; border-left: 3px solid var(--purple); border-bottom: 3px solid var(--purple); transform: rotate(-45deg); }
.cta-row { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .page-banner .page-banner-text h1 { font-size: 1.5rem; }
}

/* Admin sidebar layout */
.admin-app { display: flex; min-height: 100vh; }
.admin-sidebar { width: 232px; flex: 0 0 232px; background: var(--navy); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 0; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 24px 20px; text-decoration: none; }
.side-brand .brand-name { color: #fff; font-size: 1.25rem; font-weight: 800; }
.side-brand .brand-name em { font-style: normal; color: #a78bfa; }
.side-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.side-nav a { display: flex; align-items: center; gap: 12px; color: #c4b5fd; text-decoration: none; font-size: 0.9rem; font-weight: 600; padding: 11px 24px; }
.side-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.side-nav a.active { background: var(--purple-light); color: var(--navy); }
.side-nav a .ic { width: 22px; text-align: center; font-size: 0.95rem; }
.side-foot { padding: 12px 24px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.8rem; color: #a78bfa; }
.btn-signout { color: #fca5a5; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.admin-main { flex: 1; min-width: 0; background: #f3f4f6; }
.admin-topstrip { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 14px 28px; display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: #6b7280; }
.admin-topstrip .who { margin-left: auto; font-weight: 700; color: var(--navy); }
.admin-topstrip .top-link { font-size: 0.82rem; font-weight: 600; color: var(--navy); text-decoration: none; white-space: nowrap; }
.admin-topstrip .top-link:hover { text-decoration: underline; }
.admin-topstrip .top-signout { color: var(--navy); border-color: #d7dbe7; background: #fff; padding: 6px 12px; font-size: 0.82rem; }
.admin-topstrip .top-signout:hover { background: #f3f4f6; color: var(--navy); border-color: #c4b5fd; }
.side-toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--navy); padding: 4px 8px; }
.side-backdrop { display: none; }
@media (max-width: 900px) {
  .side-toggle { display: block; }
  .admin-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; flex-basis: 250px; z-index: 50; transform: translateX(-105%); transition: transform 0.25s ease; height: 100vh; }
  .admin-app.side-open .admin-sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,0.35); }
  .admin-app.side-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 40; }
}

/* Password visibility toggle */
.pwd-wrap { position: relative; display: block; }
.pwd-wrap input { width: 100%; padding-right: 44px; box-sizing: border-box; }
.pwd-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; color: #6b7280; padding: 6px; display: flex; align-items: center; }
.pwd-eye:hover { color: #1a2340; }

/* Parcel details card (label purchase) */
.parcel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.parcel-grid label { display: flex; flex-direction: column; gap: 5px; margin: 0; font-size: 0.82rem; font-weight: 600; color: #6b6b85; }
.parcel-grid input, .parcel-grid select { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1.5px solid #e6e6f0; border-radius: 9px; font-size: 14px; font-family: inherit; color: #191932; background: #fff; }
.parcel-grid input:focus, .parcel-grid select:focus { outline: none; border-color: #6c3ce9; box-shadow: 0 0 0 3px #efe9fd; }
@media (max-width: 640px) { .parcel-grid { grid-template-columns: repeat(2, 1fr); } }
.seg { display: flex; border: 1px solid #d7dbe7; border-radius: 8px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: #fff; padding: 8px 4px; font-size: 0.85rem; cursor: pointer; color: #6b7280; }
.seg button.on { background: #1a2340; color: #fff; font-weight: 700; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; margin: 8px 0; }
.check input { margin-top: 3px; }

/* Admin branding card: tabs + toggle switches */
.brand-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1.5px solid #e6e6f0; margin: 2px 0 18px; }
.brand-tab { border: 0; background: none; cursor: pointer; padding: 9px 14px; font-size: 0.92rem; font-weight: 600; color: #6b6b85; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; font-family: inherit; }
.brand-tab.on { color: #6c3ce9; border-bottom-color: #6c3ce9; }
.brand-panel { display: none; }
.brand-panel.on { display: block; }
.form label.ff-switch { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; cursor: pointer; }
.ff-switch-text { flex: 1; }
label.ff-switch .ff-toggle-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
label.ff-switch .ff-toggle-track { flex-shrink: 0; position: relative; width: 48px; height: 26px; border-radius: 999px; background: #8a8aa3; box-shadow: inset 0 0 0 1.5px rgba(18,18,46,.35); transition: background .2s; }
label.ff-switch .ff-toggle-knob { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1px solid rgba(18,18,46,.25); box-shadow: 0 1px 4px rgba(0,0,0,.4); transition: transform .2s; }
label.ff-switch .ff-toggle-input:checked + .ff-toggle-track { background: #6c3ce9; box-shadow: inset 0 0 0 1.5px rgba(42,16,110,.5); }
label.ff-switch .ff-toggle-input:checked + .ff-toggle-track .ff-toggle-knob { transform: translateX(22px); }

/* Portal auto top-up consent row: checkbox pinned to the text, never floating */
.form label.ff-consent { display: flex; align-items: flex-start; gap: 10px; margin: 0; cursor: pointer; font-weight: 400; }
.form .ff-consent input[type="checkbox"] { flex-shrink: 0; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #6c3ce9; }
.ff-consent-text { flex: 1; font-size: 13px; line-height: 1.55; }

/* Marketing popups */
.ff-overlay { position: fixed; inset: 0; background: rgba(26,35,64,0.55); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ff-dialog { background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); max-width: 420px; width: 100%; padding: 32px 28px; text-align: center; position: relative; }
.ff-dialog .ff-dialog-x { position: absolute; top: 10px; right: 14px; font-size: 22px; color: #6b7280; cursor: pointer; border: 0; background: none; }
.ff-dialog h3 { margin: 0 0 8px; color: #1a2340; }
.ff-dialog p { color: #6b7280; font-size: 0.92rem; }
/* #C35: printed-matter confirm actions — confirm + go-back side by side.
   The dialog is white in both themes, so the ghost Cancel needs the
   light-surface treatment (the base .btn-ghost is pale lavender built for
   dark backgrounds, and the `main .btn-ghost` rescue does not reach the
   overlay, which sits outside <main>). Mirrors the .ms-light ghost fix. */
.pm-confirm-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.pm-confirm-actions .btn { flex: 1 1 200px; }
.pm-confirm-actions .btn-ghost { color: #5b21b6; border-color: #c4b5fd; background: #f5f3ff; }
.pm-confirm-actions .btn-ghost:hover { background: #ede9fe; color: #4c1d95; }
.ff-dialog-emoji { font-size: 42px; margin-bottom: 6px; }
.banner-strip { background: linear-gradient(90deg,#4c1d95,#7c3aed); color: #fff; border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.banner-strip .x { margin-left: auto; cursor: pointer; opacity: 0.85; border: 0; background: none; color: #fff; font-size: 18px; }

/* Pricing page */
.price-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .price-cards { grid-template-columns: 1fr; } }
.price-card { border: 1px solid #e5e7f0; border-radius: 12px; padding: 18px; background: #fff; }
.price-card h4 { margin: 0 0 8px; font-size: 0.8rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; }
.price-card .you { font-size: 1.6rem; font-weight: 800; color: #1a2340; }
.price-card .you small { font-size: 0.85rem; font-weight: 600; color: #6b7280; }
.price-card .std { font-size: 0.85rem; color: #6b7280; margin-top: 4px; }
.price-card .valid { font-size: 0.78rem; color: #15803d; font-weight: 600; margin-top: 8px; }
.wide-card { border: 1px solid #e5e7f0; border-radius: 12px; padding: 18px; margin-bottom: 14px; background: linear-gradient(135deg,#fbfaff,#f4f1ff); }
.wide-card h4 { margin: 0 0 8px; font-size: 0.8rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; }
.pbar { height: 12px; background: #e6e8f3; border-radius: 999px; overflow: hidden; margin: 8px 0; }
.pfill { height: 100%; background: linear-gradient(90deg,#7c3aed,#4c1d95); border-radius: 999px; }
.free-big { font-size: 1.7rem; font-weight: 800; color: #15803d; }

/* Sidebar section headers */
.side-sec { padding: 14px 24px 4px; }
.side-sec .lbl { font-size: 0.85rem; letter-spacing: 1.5px; text-transform: uppercase; color: #d6d9f2; font-weight: 800; }
.side-sec.collapsible { cursor: pointer; display: flex; align-items: center; justify-content: space-between; user-select: none; -webkit-user-select: none; }
.side-sec.collapsible:hover .lbl { color: #c4b5fd; }
.side-sec.collapsible .chev { font-size: 0.65rem; color: #d6d9f2; transition: transform 0.15s ease; }
.side-sec.collapsible.open .chev { transform: rotate(180deg); }
.side-sec-items.collapsed { display: none; }

/* Persistent wallet box in the customer sidebar (navy sidebar, purple accent) */
.side-wallet { margin: 0 24px 12px; padding: 8px 12px; background: rgba(124, 58, 237, 0.22); border: 1px solid rgba(196, 181, 253, 0.4); border-radius: 10px; display: flex; flex-direction: column; gap: 0; }
.side-wallet-lbl { font-size: 0.7rem; letter-spacing: 1.2px; text-transform: uppercase; color: #c4b5fd; font-weight: 700; }
.side-wallet-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.side-wallet-amt { font-size: 1rem; font-weight: 800; color: #fff; line-height: 1.25; }
.side-wallet-topup { font-size: 0.8rem; font-weight: 700; color: #c4b5fd; white-space: nowrap; }
.side-wallet-topup:hover { color: #fff; }

/* Admin filter bars with labels above the inputs (Label Only orders):
   same .filter-bar row as the standard admin layout, with each field
   stacked label-over-input and the buttons aligned with the inputs. */
.filter-bar-labeled { align-items: flex-end; }
.filter-bar .filter-field { display: flex; flex-direction: column; gap: 5px; margin: 0; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.filter-bar .filter-field select, .filter-bar .filter-field input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.92rem; font-family: inherit; background: #fff; }
.filter-bar .filter-field-customer select { min-width: 240px; }
.filter-bar .filter-field-batch select { min-width: 200px; }
.filter-bar .filter-field-batch input { min-width: 120px; }
.filter-bar .filter-actions { display: flex; gap: 8px; align-items: center; }
.cust-list label:hover { background: #f4f5fb; }
.crew-cheer { margin-left: 6px; cursor: help; }
.toggle { position: relative; width: 44px; height: 24px; background: #d7dbe7; border-radius: 20px; cursor: pointer; border: 0; padding: 0; }
.toggle.on { background: #16a34a; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: left .15s; }
.toggle.on::after { left: 23px; }

/* Customer picker (promotions, campaigns) */
.cust-list { max-height: 180px; overflow-y: auto; border: 1px solid #d7dbe7; border-radius: 8px; padding: 8px; background: #fff; }
.cust-list label.cust-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; font-size: 0.88rem; border-radius: 6px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.cust-list label.cust-row:last-child { border-bottom: none; }
.cust-list label.cust-row:hover { background: #f8fafc; }
.cust-list label.cust-row input[type="checkbox"] { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; }
.cust-list label.cust-row .cust-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cust-list label.cust-row .cust-email { flex: 0 1 auto; color: #64748b; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ecommerce agency */
.kpi-row { display:flex; gap:12px; flex-wrap:wrap; margin:16px 0; }
.kpi { background:#fff; border:1px solid #e2e8f0; border-radius:10px; padding:12px 18px; min-width:130px; }
.kpi-n { font-size:1.4rem; font-weight:800; color:#1e2a5a; }
.kpi-l { font-size:.75rem; color:#64748b; }
.meta-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; margin:12px 0; }
.meta-grid .k { font-size:.7rem; text-transform:uppercase; letter-spacing:.4px; color:#64748b; }
.meta-grid .v { font-weight:700; font-size:.95rem; margin-top:2px; }
.meta-grid > div { background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:10px 12px; }
.chk-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:6px; }
.chk-pill { display:flex; align-items:center; gap:8px; border:1px solid #cbd5e1; border-radius:24px; padding:8px 16px; font-size:.88rem; cursor:pointer; background:#fff; }
.chk-pill input { accent-color:#7c3aed; width:16px; height:16px; flex:0 0 auto; }
.condbox { border:1px solid #c4b5fd; background:#faf5ff; border-radius:10px; padding:16px; margin-top:14px; }
.switch { display:flex; align-items:center; gap:10px; font-weight:700; font-size:.9rem; cursor:pointer; }
.switch input { width:18px; height:18px; accent-color:#7c3aed; }
.contract-box { background:#fff; border:1px solid #e2e8f0; border-radius:10px; padding:24px 28px; max-height:480px; overflow-y:auto; }
.contract-box pre { white-space:pre-wrap; font-family:inherit; font-size:.88rem; line-height:1.65; margin:0; }
.esign { border:2px solid #7c3aed; border-radius:12px; background:#faf5ff; }
.sig-preview { margin-top:12px; }
.sig-line { font-family:'Brush Script MT','Segoe Script',cursive; font-size:1.6rem; color:#1e3a8a; min-height:38px; }
.ro { padding:10px 12px; border:1px solid #cbd5e1; border-radius:8px; background:#f8fafc; font-weight:700; }
pre.pre { background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:12px; font-size:.85rem; white-space:pre-wrap; }
.rowbtns { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.note { background:#eff6ff; border:1px solid #bfdbfe; border-radius:10px; padding:12px 16px; font-size:.85rem; margin:14px 0; }
.btn-sm { padding:8px 16px; font-size:.82rem; }
.hidden { display:none !important; }

/* --- Bulk label flow (order queue + batch buy page) --- */
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; }
.bulk-bar[hidden] { display: none; }
.bulk-bar .bulk-count { font-weight: 800; }
.bulk-bar .spacer { flex: 1; }
.bulk-bar .btn-clear { background: transparent; color: #c7cbe0; }
.batch-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 10px; }
.batch-head .oid { font-weight: 800; color: var(--purple-dark); font-size: 1rem; }
.batch-editrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0 2px; }
.batch-editrow select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.88rem; background: #fff; }
.batch-editrow .lbl { font-size: 0.75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.batch-addrform { border: 1px dashed var(--border); border-radius: 10px; padding: 12px; margin: 10px 0; background: #fbfbfe; }
.batch-customs { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.batch-customs label { font-size: 0.75rem; color: #9a3412; font-weight: 700; }
.batch-customs input { width: 130px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; margin-top: 3px; display: block; }
.batch-manual { border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; padding: 12px; margin: 10px 0; }
.batch-dimmed { opacity: 0.35; pointer-events: none; }
.rates-collapsed .rate-extra { display: none; }
.rates-toggle { margin-top: 8px; }
.batch-sticky { position: sticky; bottom: 12px; background: #fff; border: 1px solid var(--border); box-shadow: 0 8px 30px rgba(30,27,75,.15); border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.batch-result { display: flex; gap: 10px; align-items: flex-start; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.batch-result:last-child { border-bottom: 0; }

/* ============ Homepage mock rebuild (Flex Ship) ============ */
.btn-gold { background: #f5b73d; color: #191932; }
.btn-gold:hover { background: #e5a92e; color: #191932; text-decoration: none; }

/* Header restyled to the mock nav: white bar, F-mark + wordmark, ghost + gold buttons */
.site-header { background: #fff; border-bottom: 1px solid #e6e6f0; color: #191932; }
.site-header .brand-icon { height: 29px; filter: none; }
.site-header .brand-name { color: #12122e; font-size: 21px; font-weight: 900; letter-spacing: -0.02em; }
.site-header .brand-name em { background: none; -webkit-background-clip: initial; background-clip: initial; color: #6c3ce9; }
.site-header .nav-links a { color: #191932; font-size: 14.5px; font-weight: 600; }
.site-header .nav-links a:hover { color: #6c3ce9; }
.site-header .nav-links .btn-ghost { background: #fff; border: 1.5px solid #e6e6f0; color: #191932; }
.site-header .nav-links .btn-ghost:hover { background: #f6f6fb; color: #191932; border-color: #cdbcf8; }
.site-header .nav-toggle { border-color: rgba(18,18,46,0.25); }
.site-header .nav-toggle span { background: #12122e; }

/* Homepage (mock) */
.ffhome { font-family: -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif; color: #191932; }
.ffhome .ff-kicker { color: #6c3ce9; font-weight: 800; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; }
.ffhome .ff-sec { font-size: 29px; letter-spacing: -0.02em; color: #12122e; margin: 8px 0 6px; }
.ffhome .ff-sub { color: #6b6b85; font-size: 15.5px; max-width: 720px; line-height: 1.55; margin: 0; }

/* Platform strip: label + marquee */
.ffhome .ff-strip { background: #fff; border-bottom: 1px solid #e6e6f0; padding: 16px 0; }
.ffhome .ff-strip-in { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ffhome .ff-strip-label { font-size: 13.5px; color: #6b6b85; font-weight: 600; }
.ffhome .ff-strip-viewport { overflow: hidden; flex: 1; min-width: 200px; }
.ffhome .ff-strip-track { display: flex; width: max-content; animation: ffmq 22s linear infinite; }
.ffhome .ff-strip-set { display: flex; gap: 38px; padding-right: 38px; align-items: center; }
.ffhome .ff-lg { font-weight: 900; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
@keyframes ffmq { to { transform: translateX(-50%); } }

/* Calculator band: dark gradient + white calc card */
.ffhome .ff-calcband { background: linear-gradient(120deg, #241355, #3a1f7e); color: #fff; padding: 30px 0; }
.ffhome .ff-calcband-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 38px; align-items: center; }
.ffhome .ff-calcband .ff-kicker { color: #c9b3ff; }
.ffhome .ff-calcband h2 { font-size: 28px; letter-spacing: -0.02em; line-height: 1.15; margin: 8px 0 0; color: #fff; }
.ffhome .ff-calcband p { color: #cfcff0; font-size: 15px; line-height: 1.55; margin: 12px 0 0; max-width: 500px; }
.ffhome .ff-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ffhome .ff-pills span { border: 1px solid rgba(255,255,255,0.28); color: #e7e7ff; font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 999px; }
.ffhome .ff-calc { background: #fff; color: #191932; border-radius: 16px; padding: 18px; box-shadow: 0 24px 50px rgba(0,0,0,0.35); }
.ffhome .ff-calc h3 { font-size: 17px; color: #12122e; margin: 0; }
.ffhome .ff-calc-hint { font-size: 12.5px; color: #6b6b85; margin: 4px 0 14px; }
.ffhome .ff-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ffhome .ff-calc-dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ffhome .ff-calc label { font-size: 11.5px; font-weight: 700; color: #6b6b85; letter-spacing: 0.04em; text-transform: uppercase; display: block; margin-bottom: 10px; }
.ffhome .ff-calc input, .ffhome .ff-calc select { width: 100%; border: 1.5px solid #e6e6f0; border-radius: 9px; padding: 9px 10px; font-size: 14px; font-family: inherit; margin-top: 5px; font-weight: 400; letter-spacing: normal; text-transform: none; color: #191932; }
.ffhome .ff-calc-go { width: 100%; margin-top: 14px; padding: 11px; font-size: 15px; }

/* Calculator results: Flex product tabs only */
.ffhome .ff-res { display: flex; align-items: center; gap: 12px; border: 1.5px solid #e6e6f0; border-radius: 12px; padding: 11px 13px; margin-bottom: 8px; background: #fff; }
.ffhome .ff-res-nm { font-weight: 800; font-size: 14.5px; color: #12122e; }
.ffhome .ff-res-ds { font-size: 12px; color: #6b6b85; }
.ffhome .ff-res-pr { margin-left: auto; text-align: right; white-space: nowrap; }
.ffhome .ff-res-pr b { font-size: 17px; color: #12122e; display: block; }
.ffhome .ff-res-cta { display: inline-block; margin-top: 4px; font-size: 12.5px; font-weight: 700; color: #fff; background: #6c3ce9; border-radius: 999px; padding: 5px 12px; }
.ffhome .ff-res-cta:hover { text-decoration: none; background: #5527c9; color: #fff; }

/* Content blocks */
.ffhome .ff-blk { padding: 52px 0; background: #fff; }
.ffhome .ff-blk-alt { background: #f6f6fb; }
.ffhome .ff-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
.ffhome .ff-card { border: 1.5px solid #e6e6f0; border-radius: 14px; padding: 20px; background: #fff; }
.ffhome .ff-card:hover { border-color: #cdbcf8; box-shadow: 0 10px 26px rgba(108,60,233,0.10); }
.ffhome .ff-icn { width: 40px; height: 40px; border-radius: 11px; background: #efe9fd; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.ffhome .ff-card h4 { font-size: 16.5px; color: #12122e; margin: 12px 0 4px; }
.ffhome .ff-tr { font-weight: 800; color: #6c3ce9; font-size: 13px; }
.ffhome .ff-card p { font-size: 13.5px; color: #6b6b85; line-height: 1.5; margin: 7px 0 0; }
.ffhome .ff-from { margin-top: 13px; font-size: 13px; color: #6b6b85; }
.ffhome .ff-from b { font-size: 19px; color: #12122e; }
.ffhome .ff-tagchip { display: inline-block; background: #e5f8f1; color: #087a52; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.ffhome .ff-also { margin-top: 16px; border: 1.5px dashed #cdbcf8; border-radius: 14px; padding: 16px 20px; background: #fbfaff; }
.ffhome .ff-also b { color: #12122e; }
.ffhome .ff-also span { color: #6b6b85; font-size: 13.5px; }
.ffhome .ff-also-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 11px; }
.ffhome .ff-pill { display: inline-block; font-size: 12px; font-weight: 800; padding: 6px 12px; border-radius: 999px; background: #e5f8f1; color: #087a52; }

/* Savings table */
.ffhome table.ff-rates { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: 14px; }
.ffhome table.ff-rates th { text-align: left; color: #6b6b85; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 12px; border-bottom: 2px solid #e6e6f0; }
.ffhome table.ff-rates td { padding: 12px; border-bottom: 1px solid #e6e6f0; }
.ffhome table.ff-rates td.ff-p { font-weight: 800; color: #12122e; }
.ffhome .ff-note { font-size: 12.5px; color: #6b6b85; margin-top: 10px; }

/* Steps */
.ffhome .ff-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 26px; }
.ffhome .ff-step { background: #f6f6fb; border-radius: 14px; padding: 20px; }
.ffhome .ff-stepimg { width: 100%; height: 118px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; background: #dcdcf0; display: block; }
.ffhome .ff-step-n { width: 30px; height: 30px; border-radius: 50%; background: #12122e; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.ffhome .ff-step h4 { margin: 11px 0 5px; font-size: 15.5px; color: #12122e; }
.ffhome .ff-step p { font-size: 13.5px; color: #6b6b85; line-height: 1.5; margin: 0; }

/* Bands */
.ffhome .ff-band { border-radius: 18px; padding: 34px 30px; color: #fff; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 26px; align-items: center; }
.ffhome .ff-band-purp { background: linear-gradient(120deg, #5527c9, #6c3ce9); }
.ffhome .ff-band-navy { background: linear-gradient(120deg, #12122e, #2c1a63); }
.ffhome .ff-band h3 { font-size: 24px; letter-spacing: -0.01em; margin: 0; color: #fff; }
.ffhome .ff-band p { color: #e3e0ff; font-size: 14.5px; line-height: 1.55; margin: 8px 0 0; }
.ffhome .ff-band-white { background: #fff; border-radius: 14px; color: #191932; padding: 18px; }
.ffhome .ff-band-white b { color: #12122e; }
.ffhome .ff-band-white p { color: #6b6b85; font-size: 13.5px; line-height: 1.55; margin: 6px 0 0; }

/* Integration tiles + detail panel */
.ffhome .ff-tiles { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.ffhome .ff-tile { border: 1.5px solid #e6e6f0; background: #fff; border-radius: 13px; padding: 14px 18px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 3px; min-width: 132px; font-family: inherit; }
.ffhome .ff-tile:hover { border-color: #cdbcf8; }
.ffhome .ff-tile.on { border-color: #6c3ce9; box-shadow: 0 8px 22px rgba(108,60,233,0.14); }
.ffhome .ff-tn { font-weight: 900; font-size: 18px; letter-spacing: -0.01em; }
.ffhome .ff-ts { font-size: 11px; font-weight: 800; color: #6b6b85; display: flex; align-items: center; gap: 6px; }
.ffhome .ff-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ffhome .ff-idetail { margin-top: 16px; border: 1.5px solid #cdbcf8; background: #fbfaff; border-radius: 14px; padding: 22px; }
.ffhome .ff-idetail h4 { font-size: 18px; color: #12122e; margin: 0; }
.ffhome .ff-idetail ol { margin: 10px 0 10px 18px; font-size: 14px; color: #6b6b85; line-height: 1.6; }
.ffhome .ff-idetail-connect { font-size: 13.5px; color: #191932; margin: 8px 0 0; }
.ffhome .ff-idetail-sync { font-size: 13.5px; color: #6b6b85; line-height: 1.55; margin: 0; }

/* Homepage responsive (mock breakpoints) */
@media (max-width: 900px) {
  .ffhome .ff-calcband-grid { grid-template-columns: 1fr; }
  .ffhome .ff-cards { grid-template-columns: 1fr 1fr; }
  .ffhome .ff-steps { grid-template-columns: 1fr 1fr; }
  .ffhome .ff-band { grid-template-columns: 1fr; }
  .site-header .nav-links { background: #fff; border-top: 1px solid #e6e6f0; box-shadow: 0 18px 30px rgba(18,18,46,0.15); }
  .site-header .nav-links a:not(.btn) { border-bottom: 1px solid #e6e6f0; }
  .site-header .nav-links a:not(.btn):hover { background: #f6f6fb; }
}
@media (max-width: 640px) {
  .ffhome .ff-cards { grid-template-columns: 1fr; }
  .ffhome .ff-steps { grid-template-columns: 1fr; }
  .ffhome .ff-calc-grid { grid-template-columns: 1fr; }
  .ffhome .ff-calc-dims { grid-template-columns: 1fr 1fr; }
  .ffhome table.ff-rates { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .ffhome .ff-tile { min-width: 0; flex: 1 1 40%; }
  .ffhome .ff-blk { padding: 36px 0; }
  .ffhome .ff-calcband { padding: 28px 0; }
  .ffhome .ff-sec { font-size: 23px; }
  .ffhome .ff-calcband h2 { font-size: 23px; }
  .ffhome .ff-band { padding: 24px 20px; }
  .ffhome .ff-band h3 { font-size: 20px; }
  .ffhome .ff-strip-label { width: 100%; }
}

/* ============ Homepage mock fixes v2 (nav alignment, bigger logo, slim calculator) ============ */
@media (min-width: 901px) {
  /* Nav: links sit right after the logo like the mock; buttons stay right */
  .site-header .nav-row { justify-content: flex-start; gap: 26px; padding-top: 16px; padding-bottom: 16px; }
  .site-header .nav-links { flex: 1; gap: 26px; }
  .site-header .nav-links a:not(.btn) { font-size: 15px; }
  .site-header .nav-links .btn-ghost { margin-left: auto; }
  .site-header .nav-links .btn { padding: 10px 18px; font-size: 14px; }
  /* Logo: bigger than the mock's 29px mark, mock colors (Flex purple, Forth navy) */
  .site-header .brand-icon { height: 40px; }
  .site-header .brand-name { font-size: 26px; }
}
/* Calculator: slim rows, mock spacing */
.ffhome .ff-calc-dims4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ffhome .ff-calc label { margin-bottom: 6px; }
.ffhome .ff-calc-go { margin-top: 12px; }
@media (max-width: 640px) {
  .ffhome .ff-calc-dims4 { grid-template-columns: 1fr 1fr; }
}

/* ============ Portal buy-label cards (Flex Ship mock) ============ */
.buy-rate-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.buy-rate-card { display: flex; align-items: flex-start; gap: 12px; border: 1.5px solid #e6e6f0; border-radius: 12px; padding: 13px 15px; background: #fff; cursor: pointer; }
.buy-rate-card:hover { border-color: #cdbcf8; }
.buy-rate-card.sel, .buy-rate-card:has(input:checked) { border-color: #6c3ce9; background: #fbfaff; box-shadow: 0 6px 18px rgba(108,60,233,0.10); }
.buy-rate-card input[type="radio"] { margin-top: 3px; flex: none; accent-color: #6c3ce9; width: 17px; height: 17px; }
.buy-rate-main { flex: 1; min-width: 0; }
.buy-rate-nm { font-weight: 800; font-size: 15px; color: #12122e; }
.buy-rate-ds { display: block; font-size: 13px; color: #6b6b85; line-height: 1.5; margin-top: 2px; }
.buy-rate-pr { text-align: right; white-space: nowrap; flex: none; }
.buy-rate-pr b { font-size: 17px; color: #12122e; display: block; }
.buy-rate-pr s { display: block; font-size: 12px; color: #b3261e; font-weight: 600; }
.buy-rate-eta { display: block; font-size: 12px; color: #6b6b85; margin-top: 2px; }
.buy-badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.buy-badge-value { background: #e5f8f1; color: #087a52; }
.buy-badge-pop { background: #6c3ce9; color: #fff; }
.buy-badge-pri { background: #fef3c7; color: #92400e; }
.buy-badge-pm { background: #fef3c7; color: #92400e; }
.buy-rate-pm { display: block; font-size: 13px; font-weight: 700; color: #92400e; background: #fffbeb; border: 1px solid #f59e0b; border-radius: 8px; padding: 6px 8px; line-height: 1.5; margin-top: 6px; }
.buy-addon { border-color: #cdbcf8; background: #fbfaff; }
.buy-summary { border-top: 2px solid #12122e; margin: 18px 0; }
.buy-sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px solid #e6e6f0; font-size: 14px; color: #191932; }
.buy-sum-row.buy-sum-total { font-weight: 800; font-size: 16px; color: #12122e; border-bottom: 2px solid #12122e; }
@media (max-width: 640px) {
  .buy-rate-pr { white-space: normal; }
  /* #C32 theme check (2026-11-16): at 500px a long-titled page (e.g. the
     buy-label page) pushed the top bar 4px past the viewport — its nowrap
     items (theme switch, account, Password, Sign out) sum wider than the
     screen. Let the bar wrap so the account row drops below instead of
     overflowing; one row whenever it fits, as today. */
  .admin-topstrip { flex-wrap: wrap; }
}

/* Flex Protection toggle (portal buy page, mock style) */
.form label.buy-addon-toggle { display: flex; align-items: center; gap: 14px; background: #efe9fd; border: 1.5px dashed #6c3ce9; cursor: pointer; }
.buy-addon-text { flex: 1; }
/* #C32 theme check (2026-11-16): this used to be a bare `.ff-toggle-input`
   (0,1,0), so `.form input { width: 100% }` (0,1,1) won the width — the
   visually-hidden Protection checkbox was 488px wide and pushed the buy
   page 45px past a 500px phone viewport. Scoped to the label like the
   .ff-switch rule (0,2,1) so the 1px width holds. */
label.buy-addon-toggle .ff-toggle-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
label.buy-addon-toggle .ff-toggle-track { flex-shrink: 0; position: relative; width: 48px; height: 26px; border-radius: 999px; background: #8a8aa3; box-shadow: inset 0 0 0 1.5px rgba(18,18,46,.35); transition: background .2s; }
label.buy-addon-toggle .ff-toggle-knob { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1px solid rgba(18,18,46,.25); box-shadow: 0 1px 4px rgba(0,0,0,.4); transition: transform .2s; }
label.buy-addon-toggle .ff-toggle-input:checked + .ff-toggle-track { background: #6c3ce9; box-shadow: inset 0 0 0 1.5px rgba(42,16,110,.5); }
label.buy-addon-toggle .ff-toggle-input:checked + .ff-toggle-track .ff-toggle-knob { transform: translateX(22px); }
.ff-toggle-input:focus-visible + .ff-toggle-track { outline: 2px solid #6c3ce9; outline-offset: 2px; }

/* ============ Bulk Label Only (portal bulk views) ============ */
/* Stepper, same markup and look as the single-label buy.ejs stepper. */
.stepper { display: flex; align-items: center; gap: 6px; padding: 18px 22px 2px; }
.pstep { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--muted); background: none; border: none; padding: 0; font-family: inherit; white-space: nowrap; }
.pstep-n { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); font-size: 13px; font-weight: 800; background: #fff; }
.pstep-t { text-align: left; }
.step-line { flex: 1; height: 2px; background: var(--border); min-width: 10px; }
.pstep.active { color: var(--text); }
.pstep.active .pstep-n { background: var(--purple); border-color: var(--purple); color: #fff; }
.pstep.done { color: var(--purple); }
.pstep.done .pstep-n { border-color: var(--purple); background: #EFE9FF; color: var(--purple); font-size: 0; }
.pstep.done .pstep-n::before { content: "\2713"; font-size: 14px; }
.pstep.done + .step-line { background: var(--purple); }
@media (max-width: 560px) {
  .pstep .pstep-t { display: none; }
  .pstep.active .pstep-t { display: inline; }
}
/* Bulk stepper: 5 steps must fit the narrow card, where the shared stepper
   rules above overflow and cut off step 5 ("Labels"). The card already
   supplies the side padding, so drop the stepper's own 22px sides, shrink
   the gaps, circles and labels, and let the connector lines flex-shrink
   instead of holding a 10px minimum each. Scoped to .bulk-stepper so the
   4-step single-label stepper in buy.ejs is untouched. */
.bulk-stepper { padding: 18px 0 2px; gap: 4px; }
.bulk-stepper .pstep { gap: 6px; font-size: 12.5px; flex-shrink: 1; }
.bulk-stepper .pstep-n { width: 26px; height: 26px; font-size: 12px; }
.bulk-stepper .step-line { flex: 1 1 8px; min-width: 6px; }
@media (max-width: 720px) {
  .bulk-stepper .pstep .pstep-t { display: none; }
  .bulk-stepper .pstep.active .pstep-t { display: inline; }
}
/* CSV dropzone on the bulk upload page. */
.bulk-dropzone { border: 2px dashed #cdbcf8; border-radius: 12px; background: #fbfaff; padding: 28px 18px; text-align: center; cursor: pointer; margin: 12px 0; }
.bulk-dropzone.drag-over { border-color: var(--purple); background: var(--purple-light); }
.bulk-dropzone input[type="file"] { display: block; margin: 0 auto 8px; max-width: 100%; }
/* "Or paste your CSV" on the bulk upload page: full-width textarea, same
   control styling as the portal's .form fields. */
.bulk-paste { display: block; font-weight: 600; font-size: 0.92rem; margin: 14px 0; }
.bulk-paste textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit; resize: vertical; }
.bulk-paste textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-light); }
/* From address on the bulk upload page: labels above inputs, same styling as
   the portal's .form fields, inside the shared 2-column .form-row grid so
   every field (including ZIP / Country) gets an equal-width cell. Scoped
   here because this form carries no .form class and the shared .form rules
   would also restyle its checkbox label. */
.bulk-from label { display: flex; flex-direction: column; gap: 6px; margin: 0; font-weight: 600; font-size: 0.92rem; }
.bulk-from input, .bulk-from select { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit; background: #fff; }
.bulk-from input:focus, .bulk-from select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-light); }
/* Review-page summary stats. */
.bulk-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.bulk-stat { flex: 1; min-width: 110px; background: #f8f7ff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.bulk-stat b { display: block; font-size: 1.4rem; color: var(--navy); margin-top: 2px; }
/* Inline per-row fix box on the review page. */
.bulk-fix { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px 14px; }
/* Two-column list of the 20 template columns on the upload page. */
.bulk-cols { columns: 2; column-gap: 28px; }
.bulk-cols li { font-size: .92rem; margin-bottom: 4px; break-inside: avoid; }
@media (max-width: 560px) {
  .bulk-cols { columns: 1; }
}

/* Address autocomplete (Photon / OpenStreetMap). The component wraps the
   street input in .aa-wrap itself, so no per-page CSS is needed. */
.aa-wrap { position: relative; display: block; width: 100%; }
.aa-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(31, 41, 55, 0.14); overflow: hidden; }
.aa-item { padding: 10px 12px; font-size: 0.95rem; line-height: 1.4; color: var(--text); cursor: pointer; }
.aa-item:hover, .aa-item.aa-active { background: var(--purple); color: #fff; }
.aa-attrib { padding: 6px 12px; font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--border); background: #fafafa; }

/* ==========================================================================
   Revenue Dashboard theme system (2026-11-08).
   Tokens copied exactly from the approved mock
   (workspace/your_files/revenue-dashboard-mock/revenue-dashboard-mock.html).
   Theme is applied via html[data-theme="light"|"dark"]; an explicit choice
   beats the system setting, and no choice follows prefers-color-scheme.
   Scoping: the variables + body + sidebar/topbar theming below are GLOBAL.
   All mock component classes live under a .rev-theme wrapper further down,
   so the existing classes they share a name with (.stat-card, .filter-bar,
   .steps/.step, .btn-ghost) keep their current meaning outside it.
   ========================================================================== */
:root {
  --bg: #eceef6;
  --bg-grad: radial-gradient(1100px 500px at 85% -10%, rgba(124,58,237,.14), transparent 60%), radial-gradient(800px 420px at -10% 0%, rgba(37,99,235,.10), transparent 55%);
  --surface: #ffffff;
  --surface-2: #f4f5fb;
  --ink: #141b31;
  --ink-soft: #2a3350;
  --muted: #5d6780;
  --line: #dde1ee;
  --navy: #0d1531;
  --navy-2: #16224d;
  --purple: #6c2bd9;
  --purple-bright: #7c3aed;
  --purple-text: #6c2bd9;
  --chip-bg: #efe9fd;
  --good: #0a8f5b;
  --warn: #c2570a;
  --shadow-soft: 0 10px 30px rgba(20,27,60,.10);
  --radius: 18px;
  /* Aliases so the pre-existing stylesheet follows the theme too. */
  --purple-dark: #5b21b6;
  --purple-light: #ede9fe;
  --card: #ffffff;
  --text: #141b31;
  --border: #dde1ee;
  --green: #0a8f5b;
  --red: #dc2626;
  --amber: #c2570a;
  --shadow: 0 1px 3px rgba(20,27,60,.08), 0 4px 12px rgba(20,27,60,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f22;
    --bg-grad: radial-gradient(1100px 500px at 85% -10%, rgba(124,58,237,.25), transparent 60%), radial-gradient(800px 420px at -10% 0%, rgba(37,99,235,.16), transparent 55%);
    --surface: #151d3a;
    --surface-2: #1a2347;
    --ink: #eef1fc;
    --ink-soft: #d5dbf2;
    --muted: #a8b3d9;
    --line: #28325c;
    --chip-bg: #2a2150;
    --purple-text: #cdbffa;
    --good: #34d399;
    --warn: #f2ab63;
    --shadow-soft: 0 10px 30px rgba(0,0,0,.45);
    --card: #151d3a;
    --text: #eef1fc;
    --border: #28325c;
    --green: #34d399;
    --red: #f87171;
    --amber: #f2ab63;
    --shadow: 0 1px 3px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.35);
  }
}
/* Explicit theme (set by the theme toggles) always beats the system setting. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eceef6;
  --bg-grad: radial-gradient(1100px 500px at 85% -10%, rgba(124,58,237,.14), transparent 60%), radial-gradient(800px 420px at -10% 0%, rgba(37,99,235,.10), transparent 55%);
  --surface: #ffffff;
  --surface-2: #f4f5fb;
  --ink: #141b31;
  --ink-soft: #2a3350;
  --muted: #5d6780;
  --line: #dde1ee;
  --chip-bg: #efe9fd;
  --purple-text: #6c2bd9;
  --good: #0a8f5b;
  --warn: #c2570a;
  --shadow-soft: 0 10px 30px rgba(20,27,60,.10);
  --card: #ffffff;
  --text: #141b31;
  --border: #dde1ee;
  --green: #0a8f5b;
  --red: #dc2626;
  --amber: #c2570a;
  --shadow: 0 1px 3px rgba(20,27,60,.08), 0 4px 12px rgba(20,27,60,.06);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f22;
  --bg-grad: radial-gradient(1100px 500px at 85% -10%, rgba(124,58,237,.25), transparent 60%), radial-gradient(800px 420px at -10% 0%, rgba(37,99,235,.16), transparent 55%);
  --surface: #151d3a;
  --surface-2: #1a2347;
  --ink: #eef1fc;
  --ink-soft: #d5dbf2;
  --muted: #a8b3d9;
  --line: #28325c;
  --chip-bg: #2a2150;
  --purple-text: #cdbffa;
  --good: #34d399;
  --warn: #f2ab63;
  --shadow-soft: 0 10px 30px rgba(0,0,0,.45);
  --card: #151d3a;
  --text: #eef1fc;
  --border: #28325c;
  --green: #34d399;
  --red: #f87171;
  --amber: #f2ab63;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.35);
}

/* Global body + headings follow the theme fonts (Sora headings, Manrope body). */
body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Sora", "Manrope", sans-serif; }
.rev-theme { color: var(--ink); }

/* Global sidebar + topbar theming (shared Admin / Customer / FlexCrew chrome). */
.admin-sidebar { background: linear-gradient(180deg, var(--navy), var(--navy-2)); }
.admin-sidebar .side-nav a.active {
  background: linear-gradient(90deg, var(--purple-bright), #5b21b6);
  color: #fff;
  box-shadow: 0 8px 18px rgba(124,58,237,.45), inset 0 1px 0 rgba(255,255,255,.35);
}
.admin-main { background: var(--bg); }
.admin-topstrip { background: var(--surface); border-bottom: 1px solid var(--line); color: var(--muted); }
.admin-topstrip .who, .admin-topstrip .top-link, .admin-topstrip .top-signout, .side-toggle { color: var(--ink); }
.admin-topstrip .top-signout { background: var(--surface); border-color: var(--line); }
.admin-topstrip .top-signout:hover { background: var(--surface-2); border-color: #c4b5fd; }

/* Dark-mode camouflage fixes for pre-existing chrome that used hardcoded
   light colours or navy text (would blend into the dark surfaces). */
html[data-theme="dark"] .card h3,
html[data-theme="dark"] .stat-card .stat-value,
html[data-theme="dark"] .price,
html[data-theme="dark"] .bulk-stat b { color: var(--ink); }
html[data-theme="dark"] .section-alt,
html[data-theme="dark"] .label-card,
html[data-theme="dark"] .chip { background: var(--surface); }
html[data-theme="dark"] .form input,
html[data-theme="dark"] .form textarea,
html[data-theme="dark"] .form select,
html[data-theme="dark"] .filter-bar .filter-field select,
html[data-theme="dark"] .filter-bar .filter-field input,
html[data-theme="dark"] .bulk-from input,
html[data-theme="dark"] .bulk-from select,
html[data-theme="dark"] .parcel-grid input,
html[data-theme="dark"] .parcel-grid select,
html[data-theme="dark"] .ffhome .ff-calc input,
html[data-theme="dark"] .ffhome .ff-calc select,
html[data-theme="dark"] .inline-adjust input,
/* #C18: the label-only buy form was the one input style this list missed.
   #loForm .form-row inputs force background:#fff (buy.ejs:31) with no
   colour, so in dark theme they kept the white box while the text came
   from the dark colour-scheme UA default (near-white) — typed text
   measured 1.03:1, invisible. Same dark treatment as every other input. */
html[data-theme="dark"] #loForm .form-row input,
html[data-theme="dark"] #loForm .form-row select {
  background: var(--surface-2); color: var(--ink); border-color: var(--line);
}
/* #P39: the level pill in dark theme — keep the tinted text on a dark
   surface so both levels stay readable. */
html[data-theme="dark"] .level-select { background-color: #312e81; border-color: #6366f1; color: #c7d2fe; }
html[data-theme="dark"] .level-select--restricted { background-color: #451a03; border-color: #b45309; color: #fcd34d; }
html[data-theme="dark"] .aa-list { background: var(--surface); }
html[data-theme="dark"] .aa-attrib { background: var(--surface-2); }
html[data-theme="dark"] .region,
html[data-theme="dark"] .story-stats div,
html[data-theme="dark"] .timeline { border-color: var(--line); }
html[data-theme="dark"] .row-low { background: #2d2410; }
html[data-theme="dark"] main .btn-ghost,
html[data-theme="dark"] .card .btn-ghost { color: var(--purple-text); border-color: #8f7bd8; }
html[data-theme="dark"] main .btn-ghost:hover,
html[data-theme="dark"] .card .btn-ghost:hover { background: var(--chip-bg); color: var(--purple-text); }
/* #P23: plain-link colour in dark theme. The global `a` rule uses #6d28d9,
   which is camouflaged on the dark navy surfaces (e.g. customer names on
   the Customers list). Button / chip / tile / pill / tab anchors keep their
   own designed colours via :not(). */
html[data-theme="dark"] a:not(.btn):not(.chip):not(.ta-btn):not(.op-tile):not(.pill):not(.ms-tab) { color: var(--purple-text); }
html[data-theme="dark"] .chip:hover { color: var(--purple-text); }
html[data-theme="dark"] .pstep.done { color: var(--purple-text); }
html[data-theme="dark"] .batch-head .oid { color: var(--purple-text); }
/* #P30: the admin Settings tabs are <button class="brand-tab">, not links,
   so the #P23 plain-link rule never reached them. On the dark card surface
   the inactive tab measured 3.21:1 and the active tab 2.73:1 — both
   camouflaged. Same dark treatment as #P23. Light theme untouched. */
html[data-theme="dark"] .brand-tab { color: var(--muted); }
html[data-theme="dark"] .brand-tab.on { color: var(--purple-text); border-bottom-color: var(--purple-text); }
/* #C21: the Store Management request pills kept a white fill in dark mode
   while their labels inherited the light theme ink — light text on a white
   pill (all 5 marketplaces + all 5 countries unreadable). The .note bar had
   the same shape: light-blue fill with light inherited ink. Same fix as
   #P23/#P30 and the .chip dark rule above (fill -> var(--surface)).
   Light theme untouched. */
html[data-theme="dark"] .pick-pill { background: var(--surface); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .note { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
/* #P33: impersonation banner — slim amber strip shown while a super admin
   views the portal as a customer. Amber ramp in both themes so it stays
   readable and visibly distinct from the page chrome. Light theme values
   are the base; the dark override darkens the same ramp. */
.impersonate-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fef3c7; border-bottom: 1px solid #f59e0b; color: #92400e; padding: 8px 28px; font-size: .88rem; font-weight: 600; }
html[data-theme="dark"] .impersonate-banner { background: #451a03; border-bottom-color: #92400e; color: #fde68a; }
/* #C15: the bulk light boxes keep near-white backgrounds in dark theme
   while their text inherits the dark (near-white) ink — unreadable
   (dropzone 1.09:1, stat numbers 1.06:1, fix box 1.09:1). Force the
   light-theme text colours inside them; the native file button follows
   via color-scheme: light, and ghost Save buttons inside .bulk-fix get
   the light-theme ghost colours back. Light theme untouched. */
html[data-theme="dark"] .bulk-dropzone { color: #1f2937; color-scheme: light; }
html[data-theme="dark"] .bulk-dropzone .muted { color: #6b7280; }
html[data-theme="dark"] .bulk-stat { color: #1f2937; }
html[data-theme="dark"] .bulk-stat .muted { color: #6b7280; }
html[data-theme="dark"] .bulk-stat b { color: #1f2937; }
html[data-theme="dark"] .bulk-fix { color: #1f2937; }
html[data-theme="dark"] .bulk-fix .btn-ghost { color: #6d28d9; border-color: #cdbcf8; }
/* #C16: the buy-label summary rows use hardcoded dark ink (#191932 /
   #12122e) and dark borders, on a card that goes dark in dark theme —
   dark-on-dark. Force the theme ink + line colours in dark only. The
   bulk-quotes summary sits on cards that stay white in dark, so it is
   deliberately NOT touched here. */
html[data-theme="dark"] .buy-summary { border-top-color: var(--ink); }
html[data-theme="dark"] .buy-sum-row { color: var(--ink); border-bottom-color: var(--line); }
html[data-theme="dark"] .buy-sum-row.buy-sum-total { color: var(--ink); border-bottom-color: var(--ink); }
/* #C32 theme check (2026-11-16): the buy-label page in dark theme, measured
   in a real render (ratios below are the before values).
   (1) Selected preset 1.54:1 — it kept its light fill (#f5f3ff) while the
   dark ghost-button rule recoloured its text to light lavender. The dark
   `.card .btn-ghost` rule is (0,3,1) and beats the views' `.lo-preset.sel`
   (0,3,0), so this override is (0,4,1). Selected now reads as the portal's
   purple selected state (same gradient as .pill.active), on the buy-label
   AND the Label Only pages. (2) Rate cards kept their hardcoded white fill
   with dark ink — readable (17.56:1) but the only white islands on the dark
   page. They now follow the dark surfaces, the selected card on the chip
   tint, with theme ink for name/price and muted for the description; the
   struck-through price takes the dark red. (3) The Flex Protection toggle
   kept its light lavender fill while its text inherited the dark near-white
   ink — 1.05:1, title invisible. It now follows the dark surface.
   Light theme untouched throughout. */
html[data-theme="dark"] .lo-presets .lo-preset.sel { background: linear-gradient(135deg, var(--purple-bright), var(--purple)); color: #fff; border-color: transparent; }
html[data-theme="dark"] .buy-rate-card { background: var(--surface-2); border-color: var(--line); }
html[data-theme="dark"] .buy-rate-card.sel, html[data-theme="dark"] .buy-rate-card:has(input:checked) { background: var(--chip-bg); border-color: var(--purple-bright); }
html[data-theme="dark"] .buy-rate-nm, html[data-theme="dark"] .buy-rate-pr b { color: var(--ink); }
html[data-theme="dark"] .buy-rate-ds { color: var(--muted); }
html[data-theme="dark"] .buy-rate-pm { color: #92400e; background: #fffbeb; border-color: #f59e0b; }
html[data-theme="dark"] .buy-rate-pr s { color: var(--red); }
html[data-theme="dark"] .buy-addon { background: var(--surface-2); border-color: var(--line); }
html[data-theme="dark"] label.buy-addon-toggle { background: var(--surface-2); border-color: var(--purple-bright); color: var(--ink); }
/* #C16 (2): #P23 flips every plain link to light lavender in dark theme,
   which is unreadable inside the light banner cards (.banner-warn etc.
   keep their #fffbeb background in dark) — e.g. "Top up your wallet"
   in the low-balance banner. Links inside banners keep the light-theme
   purple. The :not() chain matches #P23's specificity so this wins. */
html[data-theme="dark"] .banner a:not(.btn):not(.chip):not(.ta-btn):not(.op-tile):not(.pill):not(.ms-tab),
html[data-theme="dark"] .flash a:not(.btn):not(.chip):not(.ta-btn):not(.op-tile):not(.pill):not(.ms-tab) { color: #6c2bd9; }
.rev-theme *::before, .rev-theme *::after { box-sizing:inherit; }
.rev-theme .num { font-family:"Sora", "Manrope", sans-serif; font-variant-numeric:tabular-nums; }
.rev-theme .page-head { display:flex; flex-wrap:wrap; align-items:flex-start; gap:16px; }
.rev-theme .page-head .titles { flex:1 1 260px; min-width:0; }
.rev-theme .page-head h1 { font-family:"Sora",sans-serif; font-size:30px; font-weight:800; letter-spacing:-.3px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
/* Executive Command Centre heading (#P17): navy-to-purple gradient text in Sora, larger than the plain heading. --ink is navy in light mode and near-white in dark mode, so the gradient stays readable in both. display:block keeps the gradient text robust. */
.rev-theme .page-head h1.ecc-heading { display:block; font-family:"Sora",sans-serif; font-size:34px; font-weight:800; letter-spacing:-.5px; line-height:1.1; background:linear-gradient(90deg, var(--ink) 0%, #7c3aed 100%); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent; }
.rev-theme .mock-badge {
    font-family:"Manrope",sans-serif; font-size:11px; font-weight:800; letter-spacing:1.2px;
    color:var(--purple-text); background:var(--chip-bg); border:1px solid rgba(124,58,237,.35);
    padding:5px 10px; border-radius:999px; vertical-align:middle;
  }
.rev-theme .page-head .sub { margin-top:5px; color:var(--muted); font-size:14px; font-weight:600; }
.rev-theme .top-actions { display:flex; flex-wrap:wrap; gap:9px; }
.rev-theme .ta-btn {
    display:inline-flex; align-items:center; gap:8px;
    padding:10px 16px; border-radius:12px; font-weight:800; font-size:13.5px;
    border:1.5px solid var(--purple); color:var(--purple-text);
    background:var(--surface);
    box-shadow:0 3px 0 rgba(108,43,217,.35), var(--shadow-soft);
    transition:transform .16s ease, box-shadow .16s ease, background .16s ease;
  }
.rev-theme .ta-btn:hover { transform:translateY(-2px); box-shadow:0 5px 0 rgba(108,43,217,.35), 0 14px 26px rgba(20,27,60,.16); }
.rev-theme .ta-btn:active { transform:translateY(1px); box-shadow:0 1px 0 rgba(108,43,217,.35); }
.rev-theme .ta-btn.primary {
    background:linear-gradient(135deg, var(--purple-bright), var(--purple));
    color:#fff; border-color:transparent;
    box-shadow:0 4px 0 #4c1d95, 0 12px 24px rgba(108,43,217,.35), inset 0 1px 0 rgba(255,255,255,.35);
  }
.rev-theme .ta-btn.primary:hover { box-shadow:0 6px 0 #4c1d95, 0 16px 30px rgba(108,43,217,.42), inset 0 1px 0 rgba(255,255,255,.35); }
.rev-theme .period-bar {
    margin-top:22px;
    display:flex; flex-wrap:wrap; align-items:center; gap:12px;
    background:var(--surface); border:1px solid var(--line); border-radius:16px;
    padding:12px 14px; box-shadow:var(--shadow-soft);
  }
.rev-theme .period-bar .pb-label { font-size:12px; font-weight:800; letter-spacing:1.4px; color:var(--muted); padding-left:4px; }
.rev-theme .pills { display:flex; flex-wrap:wrap; gap:6px; background:var(--surface-2); border:1px solid var(--line); padding:4px; border-radius:999px; }
.rev-theme .pill {
    border:0; background:transparent; color:var(--muted);
    padding:8px 18px; border-radius:999px; font-weight:800; font-size:13.5px;
    transition:all .18s ease;
  }
.rev-theme .pill:hover { color:var(--ink); transform:translateY(-1px); }
.rev-theme .pill.active {
    background:linear-gradient(135deg, var(--purple-bright), var(--purple)); color:#fff;
    box-shadow:0 4px 12px rgba(108,43,217,.4), inset 0 1px 0 rgba(255,255,255,.35);
  }
.rev-theme .custom-range { display:none; align-items:center; gap:8px; flex-wrap:wrap; }
.rev-theme .custom-range.open { display:flex; }
.rev-theme .custom-range input {
    font:inherit; font-size:13.5px; font-weight:700; color:var(--ink);
    background:var(--surface-2); border:1px solid var(--line); border-radius:10px; padding:7px 10px;
    color-scheme:light dark;
  }
.rev-theme .custom-range .apply {
    border:0; border-radius:10px; padding:8px 14px; font-weight:800; font-size:13px;
    background:var(--navy); color:#fff;
  }
html[data-theme="dark"] .rev-theme .custom-range .apply { background:var(--purple-bright); }
.rev-theme .period-caption { margin-left:auto; font-size:13px; font-weight:700; color:var(--muted); text-align:right; }
.rev-theme .period-caption b { color:var(--ink-soft); }
.rev-theme .sec-head { display:flex; align-items:baseline; gap:12px; margin:30px 0 14px; flex-wrap:wrap; }
.rev-theme .sec-head h2 { font-family:"Sora",sans-serif; font-size:19px; font-weight:700; }
.rev-theme .sec-head .hint { font-size:13px; color:var(--muted); font-weight:600; }
.rev-theme .tile {
    position:relative; overflow:hidden; text-align:left; width:100%;
    border:0; border-radius:var(--radius); padding:20px 20px 17px;
    color:#fff;
    transition:transform .22s cubic-bezier(.2,.8,.3,1.2), box-shadow .22s ease;
    will-change:transform;
  }
.rev-theme .tile::after {
    content:""; position:absolute; inset:0; pointer-events:none;
    background:linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 48%, transparent 62%);
    transform:translateX(-120%);
    transition:transform .6s ease;
  }
.rev-theme .tile:hover { transform:translateY(-6px); }
.rev-theme .tile:hover::after { transform:translateX(120%); }
.rev-theme .tile:active { transform:translateY(-2px) scale(.995); }
.rev-theme .tile:focus-visible, .rev-theme .op-tile:focus-visible, .rev-theme .pill:focus-visible, .rev-theme .ta-btn:focus-visible {
    outline:3px solid rgba(124,58,237,.55); outline-offset:2px;
  }
.rev-theme .tile .t-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.rev-theme .tile .t-label { font-size:11.5px; font-weight:800; letter-spacing:1.6px; opacity:.92; }
.rev-theme .tile .t-icon {
    width:40px; height:40px; border-radius:12px; flex:0 0 auto;
    display:grid; place-items:center;
    background:rgba(255,255,255,.18);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 0 rgba(0,0,0,.15);
  }
.rev-theme .tile .t-value { display:block; font-size:42px; font-weight:800; letter-spacing:-.5px; margin-top:10px; line-height:1.05; text-shadow:0 2px 10px rgba(0,0,0,.18); }
.rev-theme .tile .t-meta { display:block; margin-top:7px; font-size:12.8px; font-weight:600; opacity:.92; line-height:1.45; }
.rev-theme .tile .t-foot { margin-top:13px; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.rev-theme .delta { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:800; background:rgba(255,255,255,.2); padding:4px 9px; border-radius:999px; box-shadow:inset 0 1px 0 rgba(255,255,255,.35); }
.rev-theme .tile .t-link { font-size:12.5px; font-weight:800; opacity:.95; }
.rev-theme .tile.pickpack {
    background:linear-gradient(140deg, #9d6bf5 0%, #7c3aed 48%, #5b21b6 100%);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(46,16,101,.55), 0 6px 0 #4c1d95, 0 18px 32px rgba(109,40,217,.38);
  }
.rev-theme .tile.pickpack:hover { box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(46,16,101,.55), 0 10px 0 #4c1d95, 0 26px 44px rgba(109,40,217,.48); }
.rev-theme .tile.labelrev {
    background:linear-gradient(140deg, #4fc3f7 0%, #2563eb 52%, #1e3a8a 100%);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(23,37,84,.55), 0 6px 0 #1e3a8a, 0 18px 32px rgba(37,99,235,.38);
  }
.rev-theme .tile.labelrev:hover { box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(23,37,84,.55), 0 10px 0 #1e3a8a, 0 26px 44px rgba(37,99,235,.48); }
.rev-theme .tile.storage {
    background:linear-gradient(140deg, #3ed6a5 0%, #059669 52%, #064e3b 100%);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(2,44,34,.55), 0 6px 0 #065f46, 0 18px 32px rgba(5,150,105,.38);
  }
.rev-theme .tile.storage:hover { box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(2,44,34,.55), 0 10px 0 #065f46, 0 26px 44px rgba(5,150,105,.48); }
.rev-theme .tile.stores {
    background:linear-gradient(140deg, #ffb648 0%, #f97316 52%, #9a3412 100%);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.55), inset 0 -4px 0 rgba(67,20,7,.5), 0 6px 0 #9a3412, 0 18px 32px rgba(249,115,22,.38);
  }
.rev-theme .tile.stores:hover { box-shadow:inset 0 1px 0 rgba(255,255,255,.55), inset 0 -4px 0 rgba(67,20,7,.5), 0 10px 0 #9a3412, 0 26px 44px rgba(249,115,22,.48); }
.rev-theme .tile.revenue {
    background:linear-gradient(140deg, #3ed6a5 0%, #059669 52%, #064e3b 100%);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(2,44,34,.55), 0 6px 0 #065f46, 0 18px 32px rgba(5,150,105,.38);
  }
.rev-theme .tile.revenue:hover { box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(2,44,34,.55), 0 10px 0 #065f46, 0 26px 44px rgba(5,150,105,.48); }
.rev-theme .rev-grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:18px; }
.rev-theme #revDetailGrid { grid-template-columns:repeat(2, minmax(0,1fr)); }
.rev-theme .total-banner {
    margin-top:20px; position:relative; overflow:hidden; width:100%; text-align:left; border:0;
    border-radius:22px; padding:26px 28px; color:#fff;
    background:linear-gradient(120deg, #0d1531 0%, #251257 52%, #6c2bd9 115%);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.28), inset 0 -4px 0 rgba(0,0,0,.35), 0 8px 0 #080d20, 0 24px 44px rgba(23,16,66,.45);
    transition:transform .22s cubic-bezier(.2,.8,.3,1.2), box-shadow .22s ease;
    display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:28px; align-items:center;
  }
.rev-theme .total-banner:hover { transform:translateY(-5px); box-shadow:inset 0 1px 0 rgba(255,255,255,.28), inset 0 -4px 0 rgba(0,0,0,.35), 0 12px 0 #080d20, 0 32px 56px rgba(23,16,66,.55); }
.rev-theme .total-banner .glow { position:absolute; width:340px; height:340px; border-radius:50%; right:-90px; top:-140px; background:radial-gradient(circle, rgba(167,139,250,.5), transparent 65%); pointer-events:none; }
.rev-theme .total-banner .tb-label { font-size:12px; font-weight:800; letter-spacing:2.2px; color:#b7a6f7; display:flex; align-items:center; gap:9px; }
.rev-theme .total-banner .tb-value { display:block; font-size:56px; font-weight:800; letter-spacing:-1px; margin-top:8px; line-height:1; text-shadow:0 4px 22px rgba(124,58,237,.55); }
.rev-theme .total-banner .tb-sub { display:block; margin-top:9px; font-size:13.5px; font-weight:600; color:#c9cff2; line-height:1.5; max-width:420px; }
.rev-theme .total-banner .tb-delta { margin-top:14px; }
.rev-theme .mix { display:flex; flex-direction:column; gap:9px; position:relative; }
.rev-theme .mix-row { display:grid; grid-template-columns:118px 1fr 52px; align-items:center; gap:10px; font-size:12.5px; font-weight:700; color:#dfe4fb; }
.rev-theme .mix-track { height:10px; border-radius:99px; background:rgba(255,255,255,.14); overflow:hidden; box-shadow:inset 0 1px 3px rgba(0,0,0,.35); }
.rev-theme .mix-fill { height:100%; border-radius:99px; transition:width .7s cubic-bezier(.2,.8,.3,1); box-shadow:inset 0 1px 0 rgba(255,255,255,.5); }
.rev-theme .mix-row .num { text-align:right; font-size:12.5px; }
.rev-theme .op-grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:18px; }
.rev-theme .op-tile {
    position:relative; text-align:left; width:100%;
    background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
    padding:18px 20px 16px; color:var(--ink);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 5px 0 var(--line), var(--shadow-soft);
    transition:transform .2s cubic-bezier(.2,.8,.3,1.2), box-shadow .2s ease;
  }
html[data-theme="dark"] .rev-theme .op-tile { box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 5px 0 #0a0f22, var(--shadow-soft); }
.rev-theme .op-tile:hover { transform:translateY(-5px); box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 9px 0 var(--line), 0 22px 36px rgba(20,27,60,.16); }
.rev-theme .op-tile .o-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.rev-theme .op-tile .o-label { font-size:11.5px; font-weight:800; letter-spacing:1.5px; color:var(--muted); }
.rev-theme .o-icon { width:38px; height:38px; border-radius:11px; display:grid; place-items:center; color:#fff; box-shadow:inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 0 rgba(0,0,0,.18), 0 6px 12px rgba(20,27,60,.18); }
.rev-theme .o-icon.c-purple { background:linear-gradient(140deg,#8b5cf6,#6d28d9); }
.rev-theme .o-icon.c-blue { background:linear-gradient(140deg,#38bdf8,#2563eb); }
.rev-theme .o-icon.c-pink { background:linear-gradient(140deg,#f472b6,#db2777); }
.rev-theme .o-icon.c-orange { background:linear-gradient(140deg,#fbbf24,#ea580c); }
.rev-theme .o-icon.c-navy { background:linear-gradient(140deg,#3b4a7d,#131e42); }
.rev-theme .o-icon.c-teal { background:linear-gradient(140deg,#2dd4bf,#0d9488); }
.rev-theme .o-icon.c-red { background:linear-gradient(140deg,#fb7185,#e11d48); }
.rev-theme .o-icon.c-green { background:linear-gradient(140deg,#4ade80,#16a34a); }
.rev-theme .op-tile .o-value { display:block; font-size:29px; font-weight:800; margin-top:9px; letter-spacing:-.4px; }
.rev-theme .op-tile .o-sub { display:block; margin-top:5px; font-size:12.8px; font-weight:600; color:var(--muted); line-height:1.5; }
.rev-theme .op-tile .o-sub b { color:var(--ink-soft); }
.rev-theme .op-tile .o-link { margin-top:11px; display:inline-block; font-size:13px; font-weight:800; color:var(--purple-text); }
.rev-theme .new-badge { font-size:10px; font-weight:800; letter-spacing:1px; color:#fff; background:linear-gradient(135deg,#f43f5e,#e11d48); padding:3px 8px; border-radius:999px; box-shadow:0 4px 10px rgba(225,29,72,.4); }
.rev-theme .split-lines { margin-top:8px; display:flex; flex-direction:column; gap:4px; }
.rev-theme .split-lines .sl { display:flex; justify-content:space-between; font-size:12.8px; font-weight:700; color:var(--muted); }
.rev-theme .split-lines .sl b { color:var(--ink-soft); font-family:"Sora",sans-serif; font-size:12.8px; }
.rev-theme .graph-toggle {
    display:inline-flex; align-items:center; gap:10px;
    border:1.5px solid var(--line); background:var(--surface-2); color:var(--ink);
    padding:6px 14px 6px 7px; border-radius:999px; font-weight:800; font-size:13px;
    box-shadow:var(--shadow-soft); transition:transform .16s ease, border-color .16s ease;
    flex:0 0 auto;
  }
.rev-theme .graph-toggle:hover { transform:translateY(-1px); border-color:var(--purple); }
.rev-theme .graph-toggle .gt-track {
    width:46px; height:26px; border-radius:999px; background:#c3cbe4; position:relative; flex:0 0 auto;
    box-shadow:inset 0 1px 3px rgba(0,0,0,.25); transition:background .2s ease;
  }
html[data-theme="dark"] .rev-theme .graph-toggle .gt-track { background:#2e3a68; }
.rev-theme .graph-toggle .gt-thumb {
    position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%;
    background:#fff; box-shadow:0 2px 6px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.9);
    transition:transform .22s cubic-bezier(.2,.8,.3,1.2);
  }
.rev-theme .graph-toggle.is-on .gt-track { background:linear-gradient(135deg, var(--purple-bright), var(--purple)); }
.rev-theme .graph-toggle.is-on .gt-thumb { transform:translateX(20px); }
.rev-theme .graph-toggle:focus-visible { outline:3px solid rgba(124,58,237,.55); outline-offset:2px; }
.rev-theme .graphs-section.is-hidden { display:none !important; }
.rev-theme .graphs-grid { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(0,1fr); gap:18px; }
.rev-theme .chart-card {
    background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
    padding:18px 20px 16px; box-shadow:var(--shadow-soft); min-width:0; overflow:hidden;
  }
.rev-theme .chart-card.bars-card { grid-column:1 / -1; }
.rev-theme .chart-head { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.rev-theme .chart-head h3 { font-family:"Sora",sans-serif; font-size:15.5px; font-weight:700; }
.rev-theme .chart-badge {
    font-size:11px; font-weight:800; letter-spacing:.6px; color:var(--purple-text);
    background:var(--chip-bg); border:1px solid rgba(124,58,237,.28); padding:4px 9px; border-radius:999px;
  }
.rev-theme .chart-sub { margin-top:4px; font-size:12.8px; color:var(--muted); font-weight:600; line-height:1.5; }
.rev-theme .chart-wrap { margin-top:12px; min-width:0; }
.rev-theme .chart-wrap svg { width:100%; height:auto; display:block; max-width:100%; }
.rev-theme .donut-wrap { display:flex; justify-content:center; }
.rev-theme .donut-wrap svg { max-width:210px; }
.rev-theme .chart-legend { margin-top:12px; display:flex; flex-direction:column; gap:7px; }
.rev-theme .legend-row { display:flex; align-items:center; gap:9px; font-size:13px; font-weight:700; color:var(--ink-soft); }
.rev-theme .legend-dot { width:11px; height:11px; border-radius:3.5px; flex:0 0 auto; box-shadow:inset 0 1px 0 rgba(255,255,255,.5); }
.rev-theme .legend-row .lg-val { margin-left:auto; font-family:"Sora",sans-serif; font-size:12.8px; color:var(--ink); white-space:nowrap; }
.rev-theme .legend-row .lg-pct { font-size:12px; color:var(--muted); width:38px; text-align:right; }
.rev-theme .stream-bars { margin-top:14px; display:flex; flex-direction:column; gap:13px; }
.rev-theme .sb-row { display:grid; grid-template-columns:148px minmax(0,1fr) 92px; align-items:center; gap:12px; }
.rev-theme .sb-label { font-size:13px; font-weight:800; color:var(--ink-soft); display:flex; align-items:center; gap:8px; min-width:0; }
.rev-theme .sb-track { height:14px; border-radius:99px; background:var(--surface-2); border:1px solid var(--line); overflow:hidden; box-shadow:inset 0 1px 3px rgba(20,27,60,.10); }
.rev-theme .sb-fill { height:100%; border-radius:99px; transition:width .65s cubic-bezier(.2,.8,.3,1); box-shadow:inset 0 1px 0 rgba(255,255,255,.55); min-width:6px; }
.rev-theme .sb-val { font-family:"Sora",sans-serif; font-size:13px; font-weight:700; color:var(--ink); text-align:right; white-space:nowrap; }
.rev-theme .cust-bars { margin-top:14px; display:flex; flex-direction:column; gap:14px; }
.rev-theme .cb-row { display:grid; grid-template-columns:218px minmax(0,1fr) 128px; align-items:center; gap:12px; }
.rev-theme .cb-label { min-width:0; }
.rev-theme .cb-name { display:block; font-size:13.5px; font-weight:800; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rev-theme .cb-meta { display:block; margin-top:1px; font-size:11.8px; font-weight:700; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rev-theme .cb-track { height:14px; border-radius:99px; background:var(--surface-2); border:1px solid var(--line); overflow:hidden; box-shadow:inset 0 1px 3px rgba(20,27,60,.10); }
.rev-theme .cb-fill { height:100%; border-radius:99px; transition:width .65s cubic-bezier(.2,.8,.3,1); box-shadow:inset 0 1px 0 rgba(255,255,255,.55); min-width:6px; }
.rev-theme .cb-val { text-align:right; }
.rev-theme .cb-amt { display:block; font-family:"Sora",sans-serif; font-size:13px; font-weight:700; color:var(--ink); white-space:nowrap; }
.rev-theme .cb-pct { display:block; font-size:11.5px; font-weight:700; color:var(--muted); }
.rev-theme .axis text { font-family:"Manrope",sans-serif; }
.rev-theme .lower-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:18px; margin-top:20px; }
.rev-theme .panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:20px 22px; box-shadow:var(--shadow-soft); }
.rev-theme .panel h3 { font-family:"Sora",sans-serif; font-size:16px; font-weight:700; display:flex; align-items:center; gap:9px; }
.rev-theme .panel .p-sub { margin-top:4px; font-size:13px; color:var(--muted); font-weight:600; }
.rev-theme .cust-table { width:100%; border-collapse:collapse; margin-top:14px; }
.rev-theme .cust-table th { text-align:left; font-size:11px; letter-spacing:1.2px; color:var(--muted); font-weight:800; padding:8px 10px; border-bottom:2px solid var(--line); }
.rev-theme .cust-table td { padding:10px; font-size:13.5px; font-weight:600; color:var(--ink-soft); border-bottom:1px solid var(--line); }
.rev-theme .cust-table tr:last-child td { border-bottom:0; }
.rev-theme .cust-table .cname { font-weight:800; color:var(--ink); }
.rev-theme .cust-table td.nowrap { white-space:nowrap; }
/* #P27: Recent orders panel is narrow — tighter cell padding plus
   word-boundary wrapping on the name columns so the table fits inside
   the panel instead of the nowrap CREATED date pushing it past the panel
   edge. Fixed layout + explicit column widths guarantee the fit at any
   viewport; badge/date fonts are scoped down slightly so the widest badge
   ("Out for delivery") and the longest date ("Dec 31, 11:59 PM") still fit.
   #P32: break-anywhere was removed from the CUSTOMER name — it split
   "FlexForth" mid-word ("FlexFort" / "h LLC") on the live site. Customer
   names now wrap only at spaces; the CUSTOMER column was widened
   (19% -> 23%, taken from STATUS) so a single-token name like "FlexForth"
   fits whole on one line. The RECIPIENT column keeps break-anywhere: a
   25-char hyphenated name (e.g. "Montgomery-Wright") cannot fit the
   column whole, so it must break mid-word to stay inside its cell
   instead of overflowing under the status badge. */
.rev-theme .cust-table.recent-orders { table-layout: fixed; }
.rev-theme .cust-table.recent-orders th { padding: 8px 5px; font-size: 10px; letter-spacing: .4px; }
.rev-theme .cust-table.recent-orders td { padding: 10px 5px; }
.rev-theme .cust-table.recent-orders th:nth-child(1) { width: 7%; }
.rev-theme .cust-table.recent-orders th:nth-child(2) { width: 23%; }
.rev-theme .cust-table.recent-orders th:nth-child(3) { width: 20%; }
.rev-theme .cust-table.recent-orders th:nth-child(4) { width: 22%; }
.rev-theme .cust-table.recent-orders th:nth-child(5) { width: 28%; }
/* Badges may wrap to two lines here (scoped override of the global
   nowrap) so the STATUS column doesn't force the table wider. */
.rev-theme .cust-table.recent-orders .badge { font-size: .68rem; padding: 2px 6px; white-space: normal; text-align: center; line-height: 1.35; }
.rev-theme .cust-table.recent-orders td.nowrap { font-size: .72rem; }
.rev-theme .cust-table.recent-orders td.break { overflow-wrap: anywhere; font-size: .8rem; }
/* #P32: customer name wraps at word boundaries only (see comment above). */
.rev-theme .cust-table.recent-orders td.small.break { overflow-wrap: normal; word-break: normal; }
.rev-theme .status-dot { display:inline-flex; align-items:center; gap:6px; font-weight:800; font-size:12.5px; color:var(--good); }
.rev-theme .status-dot::before { content:""; width:8px; height:8px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.2); }
.rev-theme .formula-list { margin-top:14px; display:flex; flex-direction:column; gap:11px; }
.rev-theme .formula { background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:11px 13px; }
.rev-theme .formula .f-name { font-size:12px; font-weight:800; letter-spacing:.6px; display:flex; align-items:center; gap:8px; }
.rev-theme .formula .f-dot { width:9px; height:9px; border-radius:3px; flex:0 0 auto; }
.rev-theme .formula code { display:block; margin-top:5px; font-family:ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size:12px; line-height:1.55; color:var(--ink-soft); white-space:normal; }
.rev-theme .api-note { margin-top:14px; font-size:12.5px; font-weight:600; color:var(--muted); line-height:1.6; }
.rev-theme .api-note code { font-family:ui-monospace, Menlo, Consolas, monospace; font-size:11.8px; background:var(--chip-bg); color:var(--purple-text); padding:2px 7px; border-radius:6px; }
.rev-theme .view { display:none; }
.rev-theme .view.active { display:block; animation:viewIn .3s ease; }
@keyframes viewIn { from{ opacity:0; transform:translateY(6px);} to{ opacity:1; transform:none;} }
.rev-theme .rev-detail-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:18px; margin-top:20px; }
.rev-theme .tile.wide-detail .t-break { margin-top:12px; border-top:1px solid rgba(255,255,255,.28); padding-top:11px; display:flex; flex-direction:column; gap:5px; }
.rev-theme .tile.wide-detail .t-break .br { display:flex; justify-content:space-between; gap:10px; font-size:12.8px; font-weight:700; opacity:.96; }
.rev-theme .tile.wide-detail .t-break .br span:last-child { font-family:"Sora",sans-serif; }
.rev-theme .data-table { width:100%; border-collapse:collapse; margin-top:14px; }
.rev-theme .data-table th { text-align:left; font-size:11px; letter-spacing:1.1px; color:var(--muted); font-weight:800; padding:8px 10px; border-bottom:2px solid var(--line); }
.rev-theme .data-table th.r, .rev-theme .data-table td.r { text-align:right; }
.rev-theme .data-table td { padding:10px; font-size:13.5px; font-weight:600; color:var(--ink-soft); border-bottom:1px solid var(--line); font-variant-numeric:tabular-nums; }
.rev-theme .data-table tr.total-row td { border-top:2px solid var(--line); border-bottom:0; font-weight:800; color:var(--ink); background:var(--surface-2); }
.rev-theme .data-table .neg { color:#d3345c; }
html[data-theme="dark"] .rev-theme .data-table .neg { color:#fda4af; }
.rev-theme .modal-backdrop {
    position:fixed; inset:0; background:rgba(9,12,28,.55); backdrop-filter:blur(3px);
    display:none; align-items:flex-end; justify-content:center; z-index:60; padding:0;
  }
.rev-theme .modal-backdrop.open { display:flex; }
.rev-theme .modal {
    background:var(--surface); color:var(--ink); width:100%; max-width:560px; max-height:88vh; overflow:auto;
    border-radius:22px 22px 0 0; padding:24px 24px 28px; box-shadow:0 -18px 50px rgba(0,0,0,.35);
    animation:sheetIn .28s cubic-bezier(.2,.8,.3,1);
  }
@media (min-width:640px) {
.rev-theme .modal-backdrop { align-items:center; padding:20px; }
.rev-theme .modal { border-radius:22px; }}
@keyframes sheetIn { from{ transform:translateY(26px); opacity:0;} to{ transform:none; opacity:1;} }
.rev-theme .modal .m-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.rev-theme .modal .m-label { font-size:11.5px; font-weight:800; letter-spacing:1.6px; color:var(--muted); }
.rev-theme .modal h3 { font-family:"Sora",sans-serif; font-size:21px; font-weight:800; margin-top:4px; }
.rev-theme .modal .m-value { font-family:"Sora",sans-serif; font-size:34px; font-weight:800; margin-top:12px; letter-spacing:-.5px; }
.rev-theme .modal .m-formula { margin-top:8px; font-size:13px; font-weight:600; color:var(--muted); line-height:1.6; }
.rev-theme .m-close { border:0; width:36px; height:36px; border-radius:50%; background:var(--surface-2); color:var(--ink); font-size:17px; font-weight:800; flex:0 0 auto; }
.rev-theme .m-rows { margin-top:18px; border-top:1px solid var(--line); }
.rev-theme .m-row { display:flex; justify-content:space-between; gap:14px; padding:11px 2px; border-bottom:1px solid var(--line); font-size:14px; font-weight:600; color:var(--ink-soft); }
.rev-theme .m-row .num { font-weight:700; color:var(--ink); }
.rev-theme .m-row.total { font-weight:800; color:var(--ink); border-bottom:0; }
.rev-theme .m-row.total .num { font-weight:800; }
.rev-theme .m-note { margin-top:14px; font-size:12.8px; color:var(--muted); font-weight:600; line-height:1.6; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:11px 13px; }
.rev-theme .setup-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:6px; }
@media (max-width:1080px) {
.rev-theme .setup-grid { grid-template-columns:1fr; }}
.rev-theme .field-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:14px; }
@media (max-width:560px) {
.rev-theme .field-grid { grid-template-columns:1fr; }}
.rev-theme .field label { display:block; font-size:12.5px; font-weight:800; color:var(--ink-soft); line-height:1.45; margin-bottom:6px; }
.rev-theme .field label .opt { color:var(--muted); font-weight:600; }
.rev-theme .field input, .rev-theme .field select {
    width:100%; font:inherit; font-size:14px; font-weight:700; color:var(--ink);
    background:var(--surface-2); border:1.5px solid var(--line); border-radius:11px; padding:10px 12px;
  }
.rev-theme .field input:focus, .rev-theme .field select:focus { outline:3px solid rgba(124,58,237,.35); border-color:var(--purple); }
.rev-theme .field.is-new input { border-color:#059669; background:rgba(5,150,105,.07); box-shadow:0 0 0 3px rgba(5,150,105,.14); }
.rev-theme .new-pill { display:inline-block; font-size:9.5px; font-weight:800; letter-spacing:.8px; color:#fff; background:linear-gradient(135deg,#059669,#047857); padding:2px 7px; border-radius:999px; vertical-align:2px; margin-left:5px; }
.rev-theme .form-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:16px; }
.rev-theme .btn-save { border:0; background:linear-gradient(135deg,var(--purple-bright),var(--purple)); color:#fff; font-weight:800; font-size:13.5px; padding:11px 18px; border-radius:11px; box-shadow:0 4px 0 #4c1d95; }
.rev-theme .btn-ghost { background:var(--surface); border:1.5px solid var(--purple); color:var(--purple-text); font-weight:800; font-size:13.5px; padding:10px 16px; border-radius:11px; }
.rev-theme .callout { margin-top:14px; background:rgba(5,150,105,.08); border:1px solid rgba(5,150,105,.35); border-radius:12px; padding:12px 14px; font-size:13px; font-weight:600; color:var(--ink-soft); line-height:1.6; }
.rev-theme .callout b { color:var(--ink); }
.rev-theme .callout.free { background:var(--chip-bg); border-color:rgba(124,58,237,.3); }
.rev-theme .basis-pills { display:flex; flex-wrap:wrap; gap:6px; background:var(--surface-2); border:1px solid var(--line); padding:4px; border-radius:999px; margin-top:14px; }
.rev-theme .basis-pill { flex:1; border:0; background:transparent; color:var(--muted); padding:9px 10px; border-radius:999px; font-weight:800; font-size:13px; white-space:nowrap; }
.rev-theme .basis-pill.active { background:linear-gradient(135deg,#059669,#047857); color:#fff; box-shadow:0 4px 12px rgba(5,150,105,.4); }
.rev-theme .calc-box { margin-top:14px; background:var(--navy); color:#e6eaf9; border-radius:14px; padding:16px 18px; }
.rev-theme .calc-box .cb-rowline { display:flex; justify-content:space-between; gap:12px; padding:7px 0; border-bottom:1px solid rgba(255,255,255,.12); font-size:13.5px; font-weight:600; }
.rev-theme .calc-box .cb-rowline:last-child { border-bottom:0; }
.rev-theme .calc-box .cb-rowline b { font-family:"Sora",sans-serif; color:#fff; white-space:nowrap; }
.rev-theme .calc-box .cb-total { font-size:15px; font-weight:800; color:#fff; }
.rev-theme .calc-box .cb-total b { color:#6ee7b7; font-size:17px; }
.rev-theme .steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-top:14px; }
@media (max-width:1080px) {
.rev-theme .steps { grid-template-columns:repeat(2,1fr); }}
@media (max-width:560px) {
.rev-theme .steps { grid-template-columns:1fr; }}
.rev-theme .step { background:var(--surface-2); border:1px solid var(--line); border-radius:14px; padding:14px 15px; }
.rev-theme .step .s-num { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:linear-gradient(135deg,#059669,#047857); color:#fff; font-family:"Sora",sans-serif; font-weight:800; font-size:13px; margin-bottom:9px; }
.rev-theme .step h4 { margin:0 0 5px; font-family:"Sora",sans-serif; font-size:13.5px; }
.rev-theme .step p { font-size:12.8px; color:var(--muted); font-weight:600; line-height:1.55; }
.rev-theme .step code { display:block; margin-top:7px; font-family:ui-monospace,Menlo,Consolas,monospace; font-size:11.5px; color:var(--ink-soft); line-height:1.5; }
.rev-theme .impact-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; margin-top:14px; }
@media (max-width:720px) {
.rev-theme .impact-grid { grid-template-columns:1fr; }}
.rev-theme .impact { display:flex; gap:11px; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:12px 13px; }
.rev-theme .impact .i-dot { width:10px; height:10px; border-radius:50%; margin-top:5px; flex:0 0 auto; background:#059669; box-shadow:0 0 0 3px rgba(5,150,105,.18); }
.rev-theme .impact .i-dot.purple { background:var(--purple-bright); box-shadow:0 0 0 3px rgba(124,58,237,.18); }
.rev-theme .impact b { display:block; font-size:13.5px; color:var(--ink); }
.rev-theme .impact span { display:block; margin-top:2px; font-size:12.8px; color:var(--muted); font-weight:600; line-height:1.5; }
.rev-theme .example-table { width:100%; border-collapse:collapse; margin-top:12px; }
.rev-theme .example-table th { text-align:left; font-size:11px; letter-spacing:1px; color:var(--muted); font-weight:800; padding:7px 9px; border-bottom:2px solid var(--line); }
.rev-theme .example-table th.r, .rev-theme .example-table td.r { text-align:right; }
.rev-theme .example-table td { padding:9px; font-size:13px; font-weight:600; color:var(--ink-soft); border-bottom:1px solid var(--line); }
.rev-theme .example-table tr.total-row td { font-weight:800; color:var(--ink); background:var(--surface-2); border-bottom:0; }
.rev-theme .role-chip { display:inline-flex; align-items:center; gap:7px; font-size:11px; font-weight:800; letter-spacing:1.1px; padding:5px 10px; border-radius:999px; border:1px solid rgba(124,58,237,.3); background:var(--chip-bg); color:var(--purple-text); }
.rev-theme .role-chip.crew { border-color:rgba(5,150,105,.35); background:rgba(5,150,105,.09); color:#047857; }
html[data-theme="dark"] .rev-theme .role-chip.crew { color:#6ee7b7; }
.rev-theme .portal-hero {
    position:relative; overflow:hidden; border-radius:22px; padding:28px; color:#fff;
    background:linear-gradient(120deg, #0d1531 0%, #251257 52%, #6c2bd9 115%);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.28), inset 0 -4px 0 rgba(0,0,0,.35), 0 8px 0 #080d20, 0 24px 44px rgba(23,16,66,.4);
    display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,.9fr); gap:24px; align-items:center;
  }
.rev-theme .portal-hero h2 { font-family:"Sora",sans-serif; font-size:30px; font-weight:800; letter-spacing:-.4px; }
.rev-theme .portal-hero p { margin-top:8px; font-size:14.5px; font-weight:600; color:#c9cff2; line-height:1.55; max-width:520px; }
.rev-theme .portal-hero .hero-stats { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; position:relative; }
.rev-theme .hero-stat { background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.16); border-radius:14px; padding:13px 12px; backdrop-filter:blur(2px); }
.rev-theme .hero-stat b { display:block; font-family:"Sora",sans-serif; font-size:24px; }
.rev-theme .hero-stat span { display:block; margin-top:2px; font-size:11px; font-weight:800; letter-spacing:.8px; color:#c9cff2; }
.rev-theme .portal-grid-3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.rev-theme .portal-grid-3.portal-grid-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (max-width:1080px) {
.rev-theme .portal-grid-3 { grid-template-columns:1fr; }
.rev-theme .portal-hero { grid-template-columns:1fr; }}
.rev-theme .alert-banner { display:flex; gap:12px; align-items:flex-start; border-radius:14px; padding:14px 16px; font-size:13.5px; font-weight:600; line-height:1.55; }
.rev-theme .alert-banner.warn { background:#fff7e8; border:1px solid #f2d492; color:#6b4a12; }
html[data-theme="dark"] .rev-theme .alert-banner.warn { background:#2d2410; border-color:#6b5518; color:#f5d98b; }
.rev-theme .alert-banner.motivate { background:linear-gradient(120deg, var(--chip-bg), var(--surface-2)); border:1px solid var(--line); color:var(--ink-soft); box-shadow:var(--shadow-soft); }
.rev-theme .alert-banner b { color:inherit; }
.rev-theme .back-link { display:inline-flex; align-items:center; gap:6px; font-size:13.5px; font-weight:800; color:var(--purple-text); background:none; border:0; padding:0; margin-bottom:10px; }
.rev-theme .filter-bar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:12px 14px; box-shadow:var(--shadow-soft); }
.rev-theme .filter-bar select { font:inherit; font-size:13.5px; font-weight:700; color:var(--ink); background:var(--surface-2); border:1px solid var(--line); border-radius:999px; padding:8px 32px 8px 14px; }
.rev-theme .stat-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:20px; box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 5px 0 var(--line), var(--shadow-soft); }
html[data-theme="dark"] .rev-theme .stat-card { box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 5px 0 #0a0f22, var(--shadow-soft); }
.rev-theme .stat-card .s-label { font-size:13px; font-weight:700; color:var(--muted); }
.rev-theme .stat-card .s-value { display:block; font-family:"Sora",sans-serif; font-size:32px; font-weight:800; margin-top:8px; letter-spacing:-.5px; }
.rev-theme .stat-card .s-value small { font-size:14px; font-weight:700; color:var(--muted); font-family:"Manrope",sans-serif; }
.rev-theme .stat-card .s-delta { display:block; margin-top:8px; font-size:13px; font-weight:800; color:var(--good); }
.rev-theme .stat-card .s-sub { display:block; margin-top:4px; font-size:12.5px; font-weight:600; color:var(--muted); }
.rev-theme .theme-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:11px; margin-top:14px; }
@media (max-width:820px) {
.rev-theme .theme-strip { grid-template-columns:repeat(2,1fr); }}
.rev-theme .theme-swatch { border-radius:12px; padding:11px 12px; font-size:12px; font-weight:800; color:#fff; line-height:1.4; }
.rev-theme .theme-swatch span { display:block; font-weight:600; opacity:.9; font-size:11.5px; }
.rev-theme .foot-note { margin-top:34px; font-size:12.5px; color:var(--muted); font-weight:600; text-align:center; line-height:1.6; }
.theme-switch { display:flex; gap:4px; background:var(--surface-2); border:1px solid var(--line); padding:4px; border-radius:999px; }
.theme-switch button {
    flex:1 1 0; display:inline-flex; align-items:center; justify-content:center; gap:7px;
    border:0; background:transparent; color:var(--muted);
    padding:8px 14px; border-radius:999px; font-weight:800; font-size:13px; white-space:nowrap;
    transition:background .18s ease, color .18s ease, transform .18s ease;
  }
.theme-switch button:hover { color:var(--ink); transform:translateY(-1px); }
.theme-switch button.active {
    background:linear-gradient(135deg, var(--purple-bright), var(--purple)); color:#fff;
    box-shadow:0 4px 12px rgba(108,43,217,.4), inset 0 1px 0 rgba(255,255,255,.35);
  }
.theme-switch button:focus-visible { outline:3px solid rgba(124,58,237,.55); outline-offset:2px; }
html[data-theme="dark"] .theme-switch button:focus-visible { outline-color:rgba(205,191,250,.85); }
/* #P31: the theme toggle moved from the sidebar (.theme-box) into the
   top header strip, before the user name, in all three portals. Compact
   pill so the strip fits at 1366px and ~820px without pushing the name,
   Password or Sign out out of view; the auto margin takes the free space
   so the toggle sits immediately before the name (and .who no longer
   needs its own auto margin). Base .theme-switch colours are theme-aware
   vars, so light and dark both work. */
.admin-topstrip .theme-switch { margin-left:auto; flex:0 0 auto; padding:3px; gap:3px; }
.admin-topstrip .theme-switch button { flex:0 0 auto; padding:5px 10px; font-size:12px; gap:5px; }
.admin-topstrip .theme-switch button svg { width:13px; height:13px; }
.admin-topstrip .who { margin-left:0; }
/* #C19: sidebar footer order is now Currency, Wallet (the Theme toggle
   moved to the top header strip in #P31). The currency block is first,
   so it carries the top divider, with an even 12px gap below to the
   wallet box. */
.currency-switch { margin:16px 0 12px; padding:14px 10px 0; border-top:1px solid rgba(255,255,255,.10); }
.appearance-panel {
    margin-top:28px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
    padding:20px 22px; box-shadow:var(--shadow-soft);
  }
.appearance-panel .ap-head { display:flex; flex-wrap:wrap; align-items:center; gap:16px; justify-content:space-between; }
.appearance-panel h3 { font-family:"Sora",sans-serif; font-size:16px; font-weight:700; display:flex; align-items:center; gap:9px; }
.appearance-panel .ap-sub { margin-top:4px; font-size:13px; color:var(--muted); font-weight:600; line-height:1.55; max-width:640px; }
.appearance-panel .theme-switch { flex:0 0 auto; min-width:230px; }
.contrast-strip { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:11px; margin-top:16px; }
@media (max-width:720px) {
.contrast-strip { grid-template-columns:1fr; }
.appearance-panel .theme-switch { width:100%; }}
.contrast-chip { background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:12px 14px; }
.contrast-chip .cc-label { font-size:10.5px; font-weight:800; letter-spacing:1.4px; color:var(--muted); }
.contrast-chip .cc-value { display:block; margin-top:5px; font-family:"Sora",sans-serif; font-size:16px; font-weight:800; color:var(--ink); }
.contrast-chip .cc-link { display:inline-block; margin-top:4px; font-size:12.5px; font-weight:800; color:var(--purple-text); }
.contrast-chip .cc-note { display:block; margin-top:3px; font-size:12px; font-weight:600; color:var(--ink-soft); line-height:1.5; }
html[data-theme="dark"] .rev-theme .o-icon.c-navy { background:linear-gradient(140deg,#6476ad,#2b3a6e); }
html[data-theme="dark"] .rev-theme .ta-btn { border-color:#8f7bd8; box-shadow:0 3px 0 rgba(108,43,217,.5), var(--shadow-soft); }
html[data-theme="dark"] .rev-theme .btn-ghost { border-color:#8f7bd8; }
html[data-theme="dark"] .rev-theme .mock-badge { border-color:rgba(167,139,250,.55); }
html[data-theme="dark"] .rev-theme .field.is-new input { background:rgba(5,150,105,.14); }
html[data-theme="dark"] .rev-theme .tile:focus-visible, html[data-theme="dark"] .rev-theme .op-tile:focus-visible, html[data-theme="dark"] .rev-theme .pill:focus-visible, html[data-theme="dark"] .rev-theme .ta-btn:focus-visible, html[data-theme="dark"] .rev-theme .graph-toggle:focus-visible { outline-color:rgba(205,191,250,.85); }
html[data-theme="dark"] .rev-theme .sb-track, html[data-theme="dark"] .rev-theme .cb-track { box-shadow:inset 0 1px 3px rgba(0,0,0,.4); }
html[data-theme="dark"] ::placeholder { color:#8b96bd; opacity:1; }
@media (max-width:1080px) {
.rev-theme .rev-grid, .rev-theme .op-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
.rev-theme .total-banner { grid-template-columns:1fr; }
.rev-theme .lower-grid, .rev-theme .rev-detail-grid { grid-template-columns:1fr; }
.rev-theme .graphs-grid { grid-template-columns:1fr; }
.rev-theme .chart-card.bars-card { grid-column:auto; }}
@media (max-width:820px) {
.rev-theme .period-caption { margin-left:0; text-align:left; width:100%; }}
@media (max-width:560px) {
.rev-theme .rev-grid, .rev-theme .op-grid, .rev-theme #revDetailGrid { grid-template-columns:1fr; }
.rev-theme .page-head h1 { font-size:25px; }
.rev-theme .page-head h1.ecc-heading { font-size:28px; }
.rev-theme .total-banner .tb-value { font-size:46px; }
.rev-theme .mix-row { grid-template-columns:102px 1fr 46px; }
.rev-theme .cust-table th:nth-child(3), .rev-theme .cust-table td:nth-child(3) { display:none; }
.rev-theme .sb-row { grid-template-columns:1fr 74px; }
.rev-theme .sb-track { grid-column:1 / -1; order:3; }
.rev-theme .cb-row { grid-template-columns:1fr 92px; }
.rev-theme .cb-track { grid-column:1 / -1; order:3; }
.rev-theme .chart-card { padding:16px 14px 14px; }
.rev-theme .graph-toggle { width:100%; justify-content:flex-start; }}
@media (prefers-reduced-motion: reduce) {
.rev-theme .tile, .rev-theme .op-tile, .rev-theme .total-banner, .rev-theme .ta-btn, .rev-theme .pill, .theme-switch button { transition:none; }
.rev-theme .tile::after { display:none; }
.rev-theme .view.active { animation:none; }
.rev-theme .modal { animation:none; }
.rev-theme .mix-fill, .rev-theme .sb-fill, .rev-theme .cb-fill, .rev-theme .graph-toggle .gt-thumb, .rev-theme .graph-toggle .gt-track { transition:none; }}