/* ============================================================
   Akoko Data — Fintech redesign prototype
   Design tokens + components. Clean, trustworthy, lots of white.
   ============================================================ */

:root {
  /* Brand — overridable by Tweaks */
  --brand: #155eef;
  --brand-600: #1554d6;
  --brand-700: #1546b0;
  --brand-tint: #eef3ff;
  --brand-tint-2: #e0eaff;

  /* Per-agent accent (storefront) — overridable */
  --accent: #0ea5e9;
  --accent-700: #0284c7;
  --accent-tint: #e6f6fe;

  /* Money / success */
  --green: #0f9d6f;
  --green-600: #0c8a61;
  --green-tint: #e7f7f1;

  --amber: #f59e0b;
  --amber-tint: #fef4e2;
  --red: #e5484d;
  --red-tint: #fde8e8;

  /* Ink (keeps Akoko navy heritage) */
  --ink: #0c1b2a;
  --ink-2: #2c3e50;
  --muted: #5d6b7b;
  --faint: #8794a1;

  /* Surfaces */
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-soft-2: #eef2f7;
  --card: #ffffff;
  --line: #e7ecf2;
  --line-strong: #d7dee7;

  /* Radii */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(12, 27, 42, .05);
  --sh-sm: 0 1px 3px rgba(12, 27, 42, .06), 0 1px 2px rgba(12, 27, 42, .04);
  --sh: 0 4px 16px -6px rgba(12, 27, 42, .12), 0 2px 6px -3px rgba(12, 27, 42, .08);
  --sh-lg: 0 18px 48px -16px rgba(12, 27, 42, .22), 0 8px 20px -10px rgba(12, 27, 42, .12);

  --maxw: 1180px;
  --nav-h: 72px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; font-weight: 800; line-height: 1.08; }
.display { font-size: clamp(34px, 5.2vw, 60px); font-weight: 800; letter-spacing: -0.03em; }
.h1 { font-size: clamp(28px, 3.4vw, 40px); }
.h2 { font-size: clamp(23px, 2.4vw, 30px); }
.h3 { font-size: 19px; font-weight: 700; }
.lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); line-height: 1.6; }
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand);
}
.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }
.cedi { font-feature-settings: "tnum"; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-weight: 700; font-size: 15px; line-height: 1;
  padding: 13px 20px; white-space: nowrap;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(21,94,239,.35); }
.btn-primary:hover { background: var(--brand-600); box-shadow: 0 6px 18px -6px rgba(21,94,239,.5); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-700); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-600); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #16314a; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink-2); background: var(--bg-soft); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 26px; font-size: 16px; border-radius: var(--r); }
.btn-sm { padding: 9px 14px; font-size: 13.5px; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; padding: 6px 11px; border-radius: var(--r-pill);
  background: var(--bg-soft-2); color: var(--ink-2); white-space: nowrap;
}
.pill svg { width: 14px; height: 14px; }
.pill-brand { background: var(--brand-tint); color: var(--brand-700); }
.pill-green { background: var(--green-tint); color: var(--green-600); }
.pill-accent { background: var(--accent-tint); color: var(--accent-700); }
.pill-amber { background: var(--amber-tint); color: #b9770a; }
.pill-line { background: #fff; border: 1px solid var(--line); color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-tint); }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
.card-pad { padding: 24px; }

/* ---------- Inputs ---------- */
.field { display: block; margin-bottom: 16px; }
.field > label, .lbl {
  display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px;
}
.field .hint { font-size: 12.5px; color: var(--faint); margin-top: 6px; }
.input, .select {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 13px 14px; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--faint); }
.input:focus, .select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-tint);
}
.input-group { display: flex; align-items: stretch; }
.input-addon {
  display: flex; align-items: center; gap: 7px; padding: 0 14px;
  background: var(--bg-soft); border: 1px solid var(--line-strong); border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm); font-weight: 700; font-size: 14px; color: var(--ink-2);
}
.input-group .input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: rgba(255,255,255,.82); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  font-size: 14.5px; font-weight: 600; color: var(--ink-2); padding: 9px 13px; border-radius: var(--r-sm);
}
.nav-link:hover { background: var(--bg-soft); color: var(--ink); }

/* brand lockup */
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-badge {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(150deg, var(--brand), var(--brand-700));
  display: grid; place-items: center; box-shadow: 0 4px 12px -4px rgba(21,94,239,.5);
}
.brand-badge svg { width: 22px; height: 22px; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.brand-name span { color: var(--brand); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 70% at 88% -10%, var(--brand-tint) 0%, transparent 60%),
    radial-gradient(46% 60% at 4% 8%, var(--green-tint) 0%, transparent 55%);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
  padding: clamp(40px, 6vw, 86px) 0;
}
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* quick-buy card */
.quickbuy { padding: 22px; }
.qb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.qb-net {
  width: 46px; height: 46px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
}
.qb-net img { width: 38px; height: 38px; object-fit: contain; }

/* ---------- Section ---------- */
.section { padding: clamp(48px, 6vw, 88px) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin-bottom: 34px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Plans ---------- */
.plan-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 24px; }
.seg { display: inline-flex; background: var(--bg-soft-2); border-radius: var(--r-pill); padding: 4px; gap: 2px; }
.seg button {
  border: none; background: transparent; padding: 8px 15px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 13.5px; color: var(--muted); transition: .15s;
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-xs); }
.seg-icon { flex: none; }
.seg-icon button { padding: 8px 11px; display: grid; place-items: center; color: var(--muted); }
.seg-icon button.on { color: var(--ink); }
.search { position: relative; min-width: 220px; flex: 1; max-width: 320px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--faint); }
.search .input { padding-left: 38px; }

.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan-grid--list { grid-template-columns: 1fr; }
.plan-grid--list > .plan-card { display: flex; align-items: center; gap: 18px; padding: 14px 18px; }
.plan-grid--list > .plan-card > * { margin: 0; }
.plan {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  display: flex; flex-direction: column; gap: 14px;
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: var(--brand-tint-2); }
.plan-size { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.plan-size small { font-size: 15px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.plan-price { font-size: 22px; font-weight: 800; }
.plan-price small { font-size: 13px; font-weight: 600; color: var(--faint); }
.plan-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.plan-meta .pill { font-size: 11.5px; padding: 4px 9px; }
.plan .btn { margin-top: auto; }
.plan.pop { border-color: var(--brand-tint-2); box-shadow: 0 0 0 1px var(--brand-tint-2), var(--sh-sm); }
.plan-flag {
  position: absolute; top: 14px; right: 14px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-700); background: var(--brand-tint); padding: 4px 9px; border-radius: var(--r-pill);
}

/* compact list layout */
.plan-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.plan-row {
  display: grid; grid-template-columns: 92px 1fr auto auto; align-items: center; gap: 18px;
  padding: 15px 20px; border-bottom: 1px solid var(--line); transition: background .12s;
}
.plan-row:last-child { border-bottom: none; }
.plan-row:hover { background: var(--bg-soft); }
.plan-row .rsize { font-size: 19px; font-weight: 800; }
.plan-row .rprice { font-size: 18px; font-weight: 800; }

/* ---------- Feature blocks ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feat { padding: 26px; }
.feat-ic {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px;
}
.feat-ic svg { width: 24px; height: 24px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #c6d3e0; }
.footer a { color: #c6d3e0; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; padding: 56px 0 30px; }
.footer h4 { color: #fff; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; font-weight: 700; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: 13px; color: #8da3b8; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Modal / Drawer ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 80; background: rgba(7,16,26,.5);
  backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s ease;
}
.scrim[hidden] { display: none !important; }
@media (min-width: 720px) { .scrim { align-items: center; } }
@keyframes fade { from { opacity: 0; } }
.sheet {
  background: #fff; width: 100%; max-width: 460px; border-radius: 22px 22px 0 0;
  box-shadow: var(--sh-lg); max-height: 92vh; overflow: auto; animation: rise .26s cubic-bezier(.2,.8,.2,1);
}
@media (min-width: 720px) { .sheet { border-radius: var(--r-xl); } }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.iconbtn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--muted); }
.iconbtn:hover { background: var(--bg-soft); color: var(--ink); }

/* warn box */
.warn {
  display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--r); font-size: 13px; line-height: 1.5;
  background: var(--amber-tint); color: #8a5a06; border: 1px solid #f6e0b3;
}
.warn svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* order summary line */
.sumline { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; font-size: 14.5px; }
.sumline + .sumline { border-top: 1px dashed var(--line); }
.sumline.total { border-top: 1px solid var(--line-strong); margin-top: 4px; padding-top: 15px; font-weight: 800; font-size: 18px; }

/* ======================= AGENT STOREFRONT ======================= */
.store-banner {
  position: relative; height: 230px; overflow: hidden;
  background:
    linear-gradient(120deg, color-mix(in oklab, var(--accent) 88%, #000 0%), color-mix(in oklab, var(--accent) 60%, #1a2a3a));
}
.store-banner .ph-stripe { position: absolute; inset: 0; opacity: .16; }
.store-profile { position: relative; z-index: 2; margin-top: -60px; padding-top: 28px; }
.store-card { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.store-info { flex: 1 1 320px; min-width: 0; padding-top: 60px; }
.store-name { white-space: nowrap; }
.store-avatar {
  width: 128px; height: 128px; border-radius: 24px; border: 5px solid #fff; flex: none;
  box-shadow: var(--sh); object-fit: cover; background: var(--bg-soft-2);
}
.store-cta { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 60px; }

/* ======================= ADMIN ======================= */
.admin { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: var(--bg-soft); transition: grid-template-columns .22s ease; }
body.side-collapsed .admin { grid-template-columns: 0 minmax(0, 1fr); }
body.side-collapsed .side { transform: translateX(-100%); visibility: hidden; transition: transform .22s ease, visibility .22s; }
.side {
  grid-column: 1; grid-row: 1;
  width: 248px; box-sizing: border-box;
  background: #fff; border-right: 1px solid var(--line);
  padding: 18px 14px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.admin-main { grid-column: 2; grid-row: 1; }
.side-brand { padding: 8px 10px 18px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-sm);
  font-weight: 600; font-size: 14.5px; color: var(--ink-2); margin-bottom: 2px;
}
.nav-item svg { width: 19px; height: 19px; color: var(--faint); }
.nav-item:hover { background: var(--bg-soft); }
.nav-item.on { background: var(--brand-tint); color: var(--brand-700); }
.nav-item.on svg { color: var(--brand); }
.nav-section { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 16px 12px 6px; }

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 66px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.admin-body { padding: 28px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.kpi { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.kpi-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.kpi-ic svg { width: 22px; height: 22px; }
.kpi-val { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.kpi-lbl { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.trend { font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.trend.up { color: var(--green-600); }
.trend.down { color: var(--red); }

.chart-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 22px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding-top: 10px; }
.bar { flex: 1; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--brand), var(--brand-tint-2)); min-height: 4px; transition: height .5s cubic-bezier(.2,.8,.2,1); position: relative; }
.bar.g { background: linear-gradient(180deg, var(--green), var(--green-tint)); }
.bar:hover { filter: brightness(1.06); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-soft); }
.avatar-sm { width: 34px; height: 34px; border-radius: 9px; background: var(--bg-soft-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ink-2); }

/* ======================= Prototype chrome ======================= */
.proto-fab {
  position: fixed; left: 18px; bottom: 18px; z-index: 90;
  background: var(--ink); color: #fff; border: none; border-radius: var(--r-pill);
  padding: 11px 16px 11px 13px; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px;
  box-shadow: var(--sh-lg);
}
.proto-fab svg { width: 16px; height: 16px; }
.proto-menu {
  position: fixed; left: 18px; bottom: 64px; z-index: 91; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-lg); padding: 8px; width: 250px; animation: rise .18s ease;
}
.proto-menu .pm-item { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.proto-menu .pm-item:hover { background: var(--bg-soft); }
.proto-menu .pm-item.on { background: var(--brand-tint); color: var(--brand-700); }
.proto-menu .pm-num { width: 22px; height: 22px; border-radius: 6px; background: var(--bg-soft-2); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--muted); }
.pm-head { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 8px 11px 6px; }

/* placeholder image slot */
.ph {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 11px, transparent 11px 22px),
    rgba(255,255,255,.04);
  display: grid; place-items: center;
}
.ph-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; letter-spacing: .03em; }

/* spinner + success ring */
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--brand-tint); border-top-color: var(--brand); margin: 0 auto; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.success-ring { width: 84px; height: 84px; border-radius: 50%; background: var(--green-tint); color: var(--green-600); display: grid; place-items: center; margin: 0 auto; animation: pop .4s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(.6); } }

/* fade-in for route — must remain visible even if animation is paused/frozen.
   Opacity only: an animated `transform` here would create a containing block
   that re-anchors position:fixed descendants (the buy-sheet modal) to .route
   instead of the viewport, making the modal drift with scroll. */
.route { animation: routein .34s ease both; }
@keyframes routein { from { opacity: 0; } }

/* ======================= Admin panel extras ======================= */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin-bottom: 4px; }

/* filter chips with counts */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 8px; border-radius: var(--r-pill); border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.chip:hover { border-color: var(--line-strong); }
.chip.on { background: var(--brand-tint); border-color: transparent; color: var(--brand-700); }
.chip .cnt { min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--bg-soft-2); color: var(--muted); display: grid; place-items: center; font-size: 11.5px; font-weight: 800; }
.chip.on .cnt { background: var(--brand); color: #fff; }

/* toggle switch */
.switch { width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); border: none; padding: 0; position: relative; transition: background .18s; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .18s; }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(18px); }
.switch.brand.on { background: var(--brand); }

/* group / status badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill); }
.badge-agent { background: var(--brand-tint); color: var(--brand-700); }
.badge-admin { background: #f1e9ff; color: #6d28d9; }
.badge-ok { background: var(--green-tint); color: var(--green-600); }
.badge-warn { background: var(--amber-tint); color: #b9770a; }
.badge-bad { background: var(--red-tint); color: #c0353a; }

.toolbar-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.cell-strong { font-weight: 700; }
.actions-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: #fff; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.actions-btn:hover { background: var(--bg-soft); }

/* form layout */
.form-cols { display: grid; grid-template-columns: 320px 1fr; gap: 26px; align-items: start; }
.form-section-title { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 4px 0 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
textarea.input { resize: vertical; min-height: 92px; line-height: 1.55; font-family: inherit; }

/* uploader placeholder */
.uploader { border: 1.5px dashed var(--line-strong); border-radius: var(--r); background: var(--bg-soft); display: grid; place-items: center; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; }
.uploader:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-700); }
.uploader svg { width: 26px; height: 26px; margin-bottom: 8px; }
.uploader.avatar { aspect-ratio: 1; }
.uploader.banner { height: 120px; }

/* swatch picker */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 11px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; position: relative; transition: transform .12s; }
.swatch:hover { transform: scale(1.08); }
.swatch.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor; }
.swatch.on::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; }

/* alias field */
.alias-wrap .input-addon { font-size: 13px; color: var(--faint); font-weight: 600; }
.alias-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; margin-top: 7px; }
.alias-status.ok { color: var(--green-600); }
.alias-status.bad { color: var(--red); }
.alias-status svg { width: 15px; height: 15px; }

/* storefront preview card in form */
.sf-preview { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.sf-preview-banner { height: 72px; }
.sf-preview-body { padding: 0 16px 16px; margin-top: -26px; }
.sf-ava { width: 52px; height: 52px; border-radius: 14px; border: 3px solid #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }

/* appearance config tiles */
.opt-tile { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; cursor: pointer; background: #fff; transition: .15s; }
.opt-tile:hover { border-color: var(--line-strong); }
.opt-tile.on { border-color: transparent; box-shadow: 0 0 0 2px var(--brand); }
.opt-tile .opt-label { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-weight: 700; font-size: 13.5px; }
.opt-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; color: #fff; }
.opt-tile.on .opt-check { background: var(--brand); border-color: var(--brand); }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mini-box { height: 30px; border-radius: 6px; background: var(--bg-soft-2); }
.mini-rows { display: flex; flex-direction: column; gap: 6px; }
.mini-row { height: 16px; border-radius: 5px; background: var(--bg-soft-2); }

/* login */
.login-stage { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(70% 80% at 80% -10%, var(--brand-tint) 0%, transparent 55%), radial-gradient(50% 60% at 0% 100%, var(--green-tint) 0%, transparent 55%), var(--bg-soft); }
.login-card { width: 100%; max-width: 410px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: 1fr !important; }
  .checkout-grid .card[style*="sticky"] { position: static !important; }
  .form-cols { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin-main { grid-column: 1; }
  .side {
    grid-column: 1; grid-row: 1;
    display: block;
    position: fixed; top: 0; left: 0; right: auto;
    width: 272px; max-width: 82vw; height: 100vh;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: var(--sh-lg);
    overflow-y: auto;
    visibility: hidden;
  }
  body.side-open .side { transform: translateX(0); visibility: visible; }
  body.side-open { overflow: hidden; }
  .side-backdrop { display: none; }
  body.side-open .side-backdrop {
    display: block;
    position: fixed; inset: 0; background: rgba(12,27,42,.45);
    z-index: -1;
  }
}
@media (min-width: 981px) {
  .side-backdrop { display: none !important; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .nav-links .nav-link.hide-sm { display: none; }
  .plan-grid { grid-template-columns: 1fr 1fr; }
  .plan-row { grid-template-columns: 70px 1fr auto; }
  .plan-row .rdur { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .store-avatar { width: 96px; height: 96px; }
  .store-info { padding-top: 16px; flex-basis: 100%; }
  .store-cta  { padding-top: 32px; margin-top: 8px; flex-basis: 100%; justify-content: center; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   ADDITIONS — networks, vouchers, order tracking, DataHub admin
   Built on existing tokens; no palette changes.
   ============================================================ */

/* ---------- Network logo marks (only place non-primary brand colour appears) ---------- */
.net-logo {
  flex: none; display: grid; place-items: center; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(12,27,42,.06);
}
.net-logo .net-mark { font-weight: 800; letter-spacing: -0.03em; }
.net-logo .net-sub { font-weight: 700; opacity: .85; letter-spacing: 0; }

/* ---------- Network picker ---------- */
.net-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 22px; }
.net-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 12px 13px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  cursor: pointer;
}
.net-card:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); }
.net-card .net-name { font-weight: 700; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.net-card.on { border-color: transparent; box-shadow: 0 0 0 2px var(--nc, var(--brand)); }
.net-card .net-check {
  position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--nc, var(--brand)); color: #fff; display: none; place-items: center;
}
.net-card.on .net-check { display: grid; }
.net-card .net-check svg { width: 13px; height: 13px; }
.net-all {
  background: linear-gradient(135deg, var(--bg-soft), #fff);
}
.net-all .net-logo {
  background: conic-gradient(from 210deg, #FFCB05, #F58220, #E2231A, #0057B8, #16a34a, #FFCB05);
  color: #fff;
}
@media (max-width: 860px) { .net-picker { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 460px) { .net-picker { grid-template-columns: repeat(2, 1fr); } }

/* network pill on plan cards / sheets */
.pill-net { color: #fff; border: none; }

/* ---------- Hero product tiles ---------- */
.hero-tiles { display: flex; flex-direction: column; gap: 16px; }
.prod-tile {
  display: flex; align-items: center; gap: 18px; text-align: left; width: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px;
  box-shadow: var(--sh-sm); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  cursor: pointer;
}
.prod-tile:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: var(--brand-tint-2); }
.prod-art {
  width: 84px; height: 84px; border-radius: var(--r); flex: none; display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.prod-art svg { width: 38px; height: 38px; }
.prod-tile .prod-body { flex: 1; min-width: 0; }
.prod-tile .prod-title { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.prod-tile .prod-sub { color: var(--muted); font-size: 14px; margin-top: 4px; line-height: 1.45; }
.prod-tile .prod-arrow { color: var(--faint); flex: none; transition: transform .15s, color .15s; }
.prod-tile:hover .prod-arrow { transform: translateX(3px); color: var(--brand); }
.prod-arrow svg { width: 22px; height: 22px; }

/* ---------- Voucher type picker (public) ---------- */
.vtype-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.vtype-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--sh-sm); display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.vtype-card:hover { transform: translateY(-4px); box-shadow: var(--sh); }
.vtype-art { height: 160px; position: relative; display: grid; place-items: center; }
.vtype-art svg { width: 56px; height: 56px; }
.vtype-art .vtype-tag {
  position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.9); color: var(--ink);
  font-weight: 800; font-size: 12px; letter-spacing: .04em; padding: 5px 11px; border-radius: var(--r-pill);
}
.vtype-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
@media (max-width: 640px) { .vtype-grid { grid-template-columns: 1fr; } }

/* ---------- Quantity stepper ---------- */
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.stepper button {
  width: 56px; flex: none; border: none; background: var(--bg-soft); color: var(--ink);
  display: grid; place-items: center; font-size: 20px; transition: background .12s;
}
.stepper button:hover { background: var(--bg-soft-2); }
.stepper button:disabled { opacity: .4; cursor: not-allowed; }
.stepper button svg { width: 20px; height: 20px; }
.stepper .step-val {
  flex: 1; text-align: center; font-size: 26px; font-weight: 800; align-self: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- Voucher success — PIN rows (focal element) ---------- */
.no-store-note {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  color: var(--faint); font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.pin-list { display: flex; flex-direction: column; gap: 14px; }
.pin-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden;
  box-shadow: var(--sh-xs);
}
.pin-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
.pin-card-head .pin-idx { font-size: 12.5px; font-weight: 800; color: var(--muted); letter-spacing: .03em; }
.pin-rows { padding: 8px 16px 16px; }
.pin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.pin-row + .pin-row { border-top: 1px dashed var(--line); }
.pin-row .pin-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.pin-row .pin-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: clamp(20px, 5vw, 26px);
  font-weight: 700; letter-spacing: .06em; color: var(--ink); margin-top: 3px; word-break: break-all;
}
.pin-row .pin-copy { flex: none; }
.copy-btn.copied { background: var(--green-tint); color: var(--green-600); border-color: transparent; }

/* ---------- Horizontal status timeline (order tracking) ---------- */
.track-line { display: flex; align-items: flex-start; margin: 6px 0 4px; }
.track-step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.track-step .td-dot {
  width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid var(--line-strong);
  display: grid; place-items: center; color: var(--faint); z-index: 1;
}
.track-step .td-dot svg { width: 15px; height: 15px; }
.track-step.done .td-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.track-step.current .td-dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 5px var(--brand-tint); }
.track-step.fail .td-dot { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 5px var(--red-tint); }
.track-step .td-bar { position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.track-step.done .td-bar, .track-step.current .td-bar { background: var(--brand); }
.track-step:first-child .td-bar { display: none; }
.track-step .td-label { font-size: 12.5px; font-weight: 700; margin-top: 9px; color: var(--ink-2); }
.track-step .td-time { font-size: 11px; color: var(--faint); margin-top: 2px; }
.track-step:not(.done):not(.current) .td-label { color: var(--faint); }
.refresh-ind { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.refresh-ind .dot { width: 7px; height: 7px; background: var(--green); }
.big-ref { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: clamp(26px, 5vw, 38px); font-weight: 700; letter-spacing: .04em; }

/* ---------- DataHub wallet card (dashboard) ---------- */
.wallet-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.wallet-card.low { box-shadow: 0 0 0 1px var(--red-tint), var(--sh-sm); }
.wallet-bal { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.wallet-low-banner {
  display: flex; align-items: center; gap: 8px; background: var(--red-tint); color: #c0353a;
  font-size: 12.5px; font-weight: 700; padding: 8px 11px; border-radius: var(--r-sm);
}
.wallet-low-banner svg { width: 15px; height: 15px; flex: none; }

/* ---------- Tabs (agent storefront, admin sub-pages) ---------- */
.tabs { display: inline-flex; gap: 4px; background: var(--bg-soft-2); border-radius: var(--r-pill); padding: 4px; }
.tabs button {
  border: none; background: transparent; padding: 9px 18px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 14px; color: var(--muted); transition: .15s; display: inline-flex; align-items: center; gap: 7px;
}
.tabs button svg { width: 16px; height: 16px; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-xs); }

/* ---------- Webhook logs ---------- */
.hook-list { display: flex; flex-direction: column; }
.hook-row { border-bottom: 1px solid var(--line); }
.hook-row:last-child { border-bottom: none; }
.hook-head {
  display: grid; grid-template-columns: 150px 1fr 130px 110px 34px; align-items: center; gap: 14px;
  padding: 14px 18px; cursor: pointer; transition: background .12s; width: 100%; text-align: left; border: none; background: transparent;
}
.hook-head:hover { background: var(--bg-soft); }
.hook-ts { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; color: var(--muted); }
.hook-event { font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.hook-event .ev-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hook-chev { color: var(--faint); display: grid; place-items: center; transition: transform .18s; }
.hook-chev svg { width: 18px; height: 18px; }
.hook-row.open .hook-chev { transform: rotate(90deg); }
.hook-body { padding: 0 18px 18px; }
.hook-actions { display: flex; gap: 10px; margin-top: 12px; }
@media (max-width: 720px) {
  .hook-head { grid-template-columns: 1fr 34px; gap: 6px; row-gap: 6px; }
  .hook-head .hook-ts { grid-column: 1; }
}

/* ---------- JSON viewer (syntax-tinted) ---------- */
.json-view {
  background: #0d1b2a; color: #c6d3e0; border-radius: var(--r); padding: 16px 18px; overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; line-height: 1.7; margin: 0;
}
.json-view .jk { color: #7dd3fc; }
.json-view .js { color: #86efac; }
.json-view .jn { color: #fcd34d; }
.json-view .jb { color: #f0abfc; }
.json-view .jp { color: #6b8299; }

/* ---------- Masked PIN cell (ledger) ---------- */
.pin-mask { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.pin-mask button { border: none; background: transparent; color: var(--faint); display: grid; place-items: center; padding: 2px; }
.pin-mask button:hover { color: var(--brand); }
.pin-mask button svg { width: 15px; height: 15px; }

/* ---------- eye toggle inside an input ---------- */
.input-eye { position: relative; }
.input-eye .input { padding-right: 44px; }
.input-eye button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px;
  border: none; background: transparent; color: var(--faint); display: grid; place-items: center; border-radius: 8px;
}
.input-eye button:hover { color: var(--ink); background: var(--bg-soft); }
.input-eye button svg { width: 18px; height: 18px; }

/* test-connection inline result */
.test-result { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.test-result.ok { color: var(--green-600); }
.test-result svg { width: 15px; height: 15px; }

/* row-expand (sales) */
.row-expand { background: var(--bg-soft); }
.row-expand td { padding: 0 !important; }
.row-expand .rx-inner { padding: 18px 20px; display: grid; grid-template-columns: 220px 1fr; gap: 26px; }
@media (max-width: 720px) { .row-expand .rx-inner { grid-template-columns: 1fr; gap: 16px; } }
.rx-field { display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.rx-field .rxl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.rx-field .rxv { font-weight: 700; font-size: 14px; }
.expand-btn { border: none; background: transparent; color: var(--faint); display: grid; place-items: center; padding: 4px; transition: transform .18s; }
.expand-btn svg { width: 18px; height: 18px; }
.expand-btn.open { transform: rotate(90deg); color: var(--brand); }

/* mini vertical timeline (sales expand / order lookup) */
.vtl { display: flex; flex-direction: column; gap: 0; }
.vtl-step { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.vtl-step:last-child { padding-bottom: 0; }
.vtl-step .vtl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--brand); flex: none; margin-top: 2px; z-index: 1; }
.vtl-step.fail .vtl-dot { background: var(--red); }
.vtl-step::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.vtl-step:last-child::before { display: none; }
.vtl-step .vtl-label { font-weight: 700; font-size: 13.5px; }
.vtl-step .vtl-time { font-size: 12px; color: var(--faint); font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* voucher-board badge */
.badge-wassce { background: #ede9fe; color: #6d28d9; }
.badge-bece { background: var(--brand-tint); color: var(--brand-700); }

/* sub-page helper text under inputs already use .hint */
.helper-blue { color: var(--brand-700); font-weight: 600; }

/* order lookup result */
.lookup-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.lookup-empty svg { width: 40px; height: 40px; color: var(--line-strong); margin-bottom: 12px; }
