/* Mall House Services theme.

   Tailwind (compiled locally into tailwind.css) supplies layout utilities.
   This file owns the component recipes (.btn, .card, .form-control, .alert,
   .badge, .table ...) and the accessibility floor: focus rings, contrast,
   and comfortable touch targets (44px for primary controls, never below
   the 24px AA minimum). Every text/background pair below was chosen to
   clear WCAG AA 4.5:1. */

:root {
  --ink: #0e1726;           /* body text, navy */
  --ink-soft: #2b3648;
  --ink-muted: #556070;     /* >= 4.5:1 on --canvas and white */
  --canvas: #f3f5f9;
  --surface: #ffffff;
  --line: #e2e6ee;
  --line-strong: #c9cfdb;
  --field-border: #7a8496;  /* >= 3:1 against white for input boundaries */

  --primary: #0e7c66;       /* emerald, white text 5.1:1 */
  --primary-strong: #0a5f4e;
  --primary-tint: #e3f4ef;
  --primary-ink: #064437;   /* text on --primary-tint */
  --accent: #ff7a45;        /* coral - decorative / dark text only */
  --accent-tint: #fff0e8;
  --navy: #0b1324;
  --navy-2: #15213a;

  --success: #13704a; --success-tint: #e5f4ec;
  --danger: #b4232f;  --danger-tint: #fcebec;
  --warning: #8a5a00; --warning-tint: #fff4dc;
  --info: #1f5fbf;    --info-tint: #e7f0fd;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(14, 23, 38, .05), 0 8px 24px rgba(14, 23, 38, .06);
  --shadow-lg: 0 20px 50px rgba(11, 19, 36, .18);

  --font-heading: Outfit, system-ui, sans-serif;
  --font-body: DM Sans, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Legacy names some templates still reference. */
  --brand-primary: var(--primary);
  --brand-dark: var(--navy);
  --brand-ink: var(--ink);
  --brand-paper: var(--canvas);
}

/* Component display rules must never beat the hidden attribute. */
[hidden] { display: none !important; }

/* Sticky headers must never cover the focused element (WCAG 2.4.11). */
html { scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .brand-name { font-family: var(--font-heading); letter-spacing: -.01em; }
/* `body ` prefix outranks Tailwind preflight, which resets heading sizes. */
body h1, .h1 { font-size: 1.85rem; font-weight: 700; line-height: 1.2; }
body h2, .h2 { font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
body h3, .h3 { font-size: 1.15rem; font-weight: 600; }
body h4, .h4 { font-size: 1.05rem; font-weight: 600; }
body h5, .h5 { font-size: 1rem; font-weight: 600; }
body h6, .h6 { font-size: .85rem; font-weight: 600; }
body p { margin: 0 0 1rem; }
main ul:not(.pagination):not(.nav):not(.nav-pills):not(.list-none) {
  list-style: disc; padding-left: 1.25rem; margin: 0 0 1rem;
}
main ol:not(.steps):not(.list-none) { list-style: decimal; padding-left: 1.4rem; margin: 0 0 1rem; }
.list-none { list-style: none; padding: 0; margin: 0; }
a { color: var(--primary-strong); text-underline-offset: 3px; }
/* In-text links need a non-colour cue; Tailwind preflight strips it. */
a:not([class]), p a, li > a:not([class]), .form-text a, .alert a, td a:not(.btn) { text-decoration: underline; }
a:hover { color: var(--primary); }

/* ---------------- focus (accessibility floor) ----------------
   Dark outline + white halo stays visible on light and coloured surfaces.
   Nothing in this file may remove an outline. */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible,
[tabindex]:focus-visible, .btn:focus-visible, .page-link:focus-visible,
.nav-item:focus-visible, .nav-link:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 7px #ffffff;
}
.on-dark a:focus-visible, .on-dark button:focus-visible, .on-dark input:focus-visible,
.on-dark summary:focus-visible, .on-dark [tabindex]:focus-visible {
  outline-color: #ffffff;
  box-shadow: 0 0 0 7px var(--navy);
}

.skip-link {
  position: absolute; left: -9999px; top: .5rem; z-index: 200;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem;
  border-radius: 999px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: .5rem; color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.ico { width: 1.25rem; height: 1.25rem; flex-shrink: 0; stroke: currentColor; fill: none;
       stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- app shell ---------------- */
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 1.25rem; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 268px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 1.25rem 1rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none; color: var(--ink); padding: .25rem .5rem 1.25rem;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff; font-family: var(--font-heading); font-weight: 800; font-size: 1rem;
  box-shadow: 0 6px 16px rgba(14, 124, 102, .35);
}
.brand-name { font-weight: 700; font-size: 1.05rem; line-height: 1.15; }
.brand-name small { display: block; font-family: var(--font-body); font-weight: 500;
                    font-size: .75rem; color: var(--ink-muted); letter-spacing: 0; }

.sidebar-nav { display: flex; flex-direction: column; gap: .15rem; flex-grow: 1; }
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .15rem; }
.nav-section {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted); margin: 1.1rem .75rem .35rem;
}
.sidebar a.nav-item {
  position: relative; display: flex; align-items: center; gap: .7rem;
  min-height: 44px; padding: .5rem .75rem; border-radius: var(--radius-sm);
  color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.sidebar a.nav-item:hover { background: var(--canvas); color: var(--ink); }
.sidebar a.nav-item[aria-current="page"] {
  background: var(--primary-tint); color: var(--primary-ink); font-weight: 700;
}
.sidebar a.nav-item[aria-current="page"]::before {
  content: ""; position: absolute; left: -1rem; top: 8px; bottom: 8px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--primary);
}
.nav-badge {
  margin-left: auto; font-size: .72rem; font-weight: 700; padding: .15rem .5rem;
  border-radius: 999px; background: var(--accent-tint); color: #7a2e0e;
}

.sidebar-account { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: .65rem; margin-bottom: .75rem; padding: 0 .25rem; }
.avatar {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--navy); color: #fff; font-weight: 700; text-transform: uppercase;
}
.user-chip .meta { line-height: 1.2; min-width: 0; }
.user-chip .meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .meta span { font-size: .8rem; color: var(--ink-muted); text-transform: capitalize; }

.main-col { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 2rem; background: rgba(243, 245, 249, .94);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.topbar-title { font-family: var(--font-heading); font-weight: 600; color: var(--ink-muted); font-size: .95rem; }
.topbar-brand { display: none; }
.wallet-pill {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px;
  padding: .35rem .95rem .35rem .45rem; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700;
  box-shadow: var(--shadow);
}
.wallet-pill:hover { color: var(--ink); border-color: var(--primary); }
.wallet-pill .dot { display: inline-grid; place-items: center; width: 32px; height: 32px;
                    border-radius: 50%; background: var(--primary-tint); color: var(--primary-ink); }
.wallet-pill .ico { width: 1rem; height: 1rem; }
.main-panel { padding: 1.75rem 2rem 3rem; max-width: 1240px; width: 100%; }

.mobile-nav-toggle, .drawer-close { display: none; }
.drawer-backdrop { display: none; }

@media (max-width: 960px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(300px, 86vw);
    transform: translateX(-105%); visibility: hidden; box-shadow: var(--shadow-lg); height: 100%;
  }
  .sidebar.mobile-nav-open { transform: none; visibility: visible; }
  .drawer-backdrop.is-open {
    display: block; position: fixed; inset: 0; z-index: 50; background: rgba(11, 19, 36, .45);
  }
  .mobile-nav-toggle, .drawer-close {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-width: 44px; min-height: 44px; padding: .4rem .7rem; border-radius: 12px;
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
    font: inherit; font-weight: 600; cursor: pointer;
  }
  .drawer-close { position: absolute; top: 1rem; right: 1rem; padding: .4rem; }
  .topbar { padding: .6rem 1rem; }
  .topbar-title { display: none; }
  .topbar-brand { display: inline-flex; padding: 0; }
  .topbar-brand .brand-name { display: none; }
  .main-panel { padding: 1.25rem 1rem 2.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .sidebar { transition: transform .22s ease, visibility .22s; }
}

/* ---------------- page header ---------------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
             gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .25rem 0 0; color: var(--ink-muted); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em;
           text-transform: uppercase; color: var(--primary-strong); margin-bottom: .35rem; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .55rem 1.25rem; border-radius: 999px;
  border: 1.5px solid transparent; background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; font-size: .98rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
}
.btn:hover { color: inherit; }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { min-height: 36px; padding: .35rem .85rem; font-size: .86rem; }
.btn-lg { min-height: 54px; padding: .8rem 1.75rem; font-size: 1.08rem; }

.btn-brand, .btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(14,124,102,.28); }
.btn-brand:hover, .btn-primary:hover { background: var(--primary-strong); color: #fff; }
.btn-dark-brand { background: var(--navy); color: #fff; }
.btn-dark-brand:hover { background: var(--navy-2); color: #fff; }
.btn-accent { background: var(--accent); color: var(--navy); }
.btn-accent:hover { background: #ff925f; color: var(--navy); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #0e5a3b; color: #fff; }
.btn-outline-dark, .btn-outline-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-outline-dark:hover, .btn-outline-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-outline-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color: #fff; }
.btn-outline-info { background: transparent; border-color: var(--info); color: var(--info); }
.btn-outline-info:hover { background: var(--info); color: #fff; }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy); }
.btn-link { background: none; border: 0; color: var(--primary-strong); text-decoration: underline;
            min-height: 0; padding: 0; border-radius: 0; }

/* ---------------- forms ---------------- */
.form-label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .95rem; }
.form-control, .form-select {
  display: block; width: 100%; min-height: 46px; padding: .6rem .9rem;
  border: 1.5px solid var(--field-border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.4;   /* 16px: no iOS zoom */
}
.form-control:hover, .form-select:hover { border-color: var(--ink-soft); }
.form-control:focus-visible, .form-select:focus-visible { border-color: var(--primary); }
.form-select { padding-right: 2.25rem; }
.form-control::placeholder { color: var(--ink-muted); opacity: 1; }
.form-control:disabled, .form-control[readonly] { background: var(--canvas); }
.form-control-sm, .form-select-sm { min-height: 38px; padding: .35rem .65rem; }
textarea.form-control { min-height: 7rem; }
.form-text { display: block; margin-top: .35rem; font-size: .85rem; color: var(--ink-muted); }
.form-check { position: relative; padding-left: 2rem; margin-bottom: .6rem; }
.form-check-input { width: 1.2rem; height: 1.2rem; accent-color: var(--primary); }
.form-check > .form-check-input { position: absolute; left: 0; top: .15rem; }
.form-check-label { font-weight: 600; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend.form-label { float: none; width: auto; padding: 0; }
.input-group { display: flex; }
.input-group > .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group > .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Radio "choice cards" for payment method pickers. */
.choice-list { display: grid; gap: .6rem; }
.choice-list .form-check {
  margin: 0; padding: .85rem 1rem .85rem 2.85rem; border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--surface);
}
.choice-list .form-check > .form-check-input { left: 1rem; top: 1.05rem; }
.choice-list .form-check:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); }

/* ---------------- cards ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 .75rem; }

.stat-card { position: relative; overflow: hidden; }
.stat-card .label { display: flex; align-items: center; gap: .5rem; color: var(--ink-muted); font-size: .9rem; font-weight: 500; }
.stat-card .value { font-family: var(--font-heading); font-size: 1.7rem; font-weight: 700; margin-top: .35rem; }
.stat-icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--primary-tint); color: var(--primary-ink);
}
.stat-icon.coral { background: var(--accent-tint); color: #7a2e0e; }
.stat-icon.blue { background: var(--info-tint); color: #123d7d; }
.stat-icon.gold { background: var(--warning-tint); color: #5c3c00; }
.stat-icon .ico { width: 1.05rem; height: 1.05rem; }

.balance-card {
  background: radial-gradient(120% 140% at 100% 0%, rgba(255,122,69,.35), transparent 50%),
              linear-gradient(135deg, var(--navy) 0%, #12305a 100%);
  color: #fff; border: 0;
}
.balance-card .label, .balance-card .text-muted { color: rgba(255,255,255,.86); }

/* ---------------- tables ---------------- */
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: .75rem .7rem; border-bottom: 1px solid var(--line); text-align: left; }
.table th {
  font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-muted); background: var(--canvas);
}
.table thead th:first-child { border-top-left-radius: 10px; }
.table thead th:last-child { border-top-right-radius: 10px; }
.table tbody tr:hover { background: #fafbfd; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-sm th, .table-sm td { padding: .45rem .5rem; }
.align-middle th, .align-middle td { vertical-align: middle; }
.table-responsive { overflow-x: auto; border-radius: 10px; }
.table-responsive:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------------- badges ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .7rem;
  border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.2; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.text-bg-success { background: var(--success-tint); color: #0b4a30; }
.text-bg-danger { background: var(--danger-tint); color: #7d1520; }
.text-bg-warning { background: var(--warning-tint); color: #5c3c00; }
.text-bg-info { background: var(--info-tint); color: #123d7d; }
.text-bg-secondary { background: #eceff4; color: #364152; }
.text-bg-light { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.badge-network { font-size: .75rem; }

/* ---------------- alerts ---------------- */
.alert {
  position: relative; display: block; padding: .9rem 3rem .9rem 1.1rem; margin-bottom: 1rem;
  border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 500;
}
.alert-success { background: var(--success-tint); border-color: #b5dcc6; color: #0b4a30; }
.alert-danger { background: var(--danger-tint); border-color: #f0b8bd; color: #7d1520; }
.alert-warning { background: var(--warning-tint); border-color: #f1d79a; color: #5c3c00; }
.alert-info { background: var(--info-tint); border-color: #b9d1f5; color: #123d7d; }
.alert-secondary { background: #eceff4; border-color: var(--line-strong); color: #364152; }
.btn-close {
  position: absolute; top: .45rem; right: .45rem; width: 36px; height: 36px; min-height: 36px;
  padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; background: transparent; color: inherit;
  font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.btn-close:hover { background: rgba(0,0,0,.07); }

/* ---------------- pagination ---------------- */
.pagination { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 0; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 40px; padding: .3rem .75rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); text-decoration: none;
}
.page-item.disabled .page-link { color: var(--ink-muted); background: var(--canvas); }
.page-link[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination-sm .page-link { min-width: 36px; min-height: 36px; font-size: .86rem; }

/* ---------------- text utilities (contrast-controlled) ---------------- */
.text-muted { color: var(--ink-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-white { color: #fff; }
.text-white-50 { color: rgba(255,255,255,.86); }
.text-light { color: #f4f6fa; }
.text-reset { color: inherit; }
.bg-dark { background: var(--navy); }
.border-warning { border-color: #d9a520; }
.small, small { font-size: .86rem; }

pre { overflow-x: auto; }
code, pre, kbd { font-family: var(--font-mono); font-size: .9em; }
:not(pre) > code { background: #eceff4; color: #2a3446; padding: .1rem .35rem; border-radius: 6px; }

/* ---------------- pill nav ---------------- */
.nav, .nav-pills { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: .45rem 1.05rem;
  border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface);
  color: var(--ink-soft); text-decoration: none; font-weight: 600;
}
.nav-link:hover { border-color: var(--ink-soft); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------------- packages ---------------- */
.package-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.package-card {
  position: relative; display: flex; flex-direction: column; gap: .25rem; height: 100%;
  padding: 1.15rem 1.15rem 1rem; border-radius: var(--radius); background: var(--surface);
  border: 1.5px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
}
a.package-card:hover, label.package-card:hover { border-color: var(--primary); color: var(--ink); }
.package-card .net { font-size: .8rem; font-weight: 600; color: var(--ink-muted); }
.package-card .size { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; line-height: 1.05; }
.package-card .size span { font-size: 1rem; font-weight: 600; color: var(--ink-muted); margin-left: .15rem; }
.package-card .price { margin-top: auto; padding-top: .65rem; font-weight: 700; color: var(--primary-ink); }
.package-card .buy { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem;
                     font-weight: 700; color: var(--primary-strong); }
.package-card:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); }
.net-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; flex-shrink: 0; }
.net-mtn { background: #f5c400; } .net-telecel { background: #e30613; }
.net-airteltigo_ishare, .net-airteltigo_bigtime { background: #1f5fbf; }

/* ---------------- results / misc ---------------- */
.result-icon {
  display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 1rem;
  border-radius: 50%; font-size: 2rem; font-weight: 800;
}
.result-success { background: var(--success-tint); color: var(--success); }
.result-pending { background: var(--warning-tint); color: var(--warning); }
.result-failed { background: var(--danger-tint); color: var(--danger); }

.spinner-border {
  display: inline-block; width: 2rem; height: 2rem;
  border: .25em solid currentColor; border-right-color: transparent; border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .spinner-border { animation: mhs-spin .75s linear infinite; }
}
@keyframes mhs-spin { to { transform: rotate(360deg); } }

.bulk-panel { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .5rem; background: var(--surface); }
.bulk-panel > summary { padding: .7rem .9rem; cursor: pointer; font-weight: 600; }
.bulk-panel > summary:hover { background: var(--canvas); }
.bulk-panel .bulk-body { padding: 0 .9rem .8rem; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--ink-muted); }

/* ---------------- auth ---------------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside {
  position: relative; overflow: hidden; color: #fff; padding: 3rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  background:
    radial-gradient(60% 60% at 90% 10%, rgba(255,122,69,.45), transparent 60%),
    radial-gradient(70% 70% at 0% 100%, rgba(14,124,102,.65), transparent 60%),
    var(--navy);
}
.auth-aside .brand { color: #fff; padding: 0; }
.auth-aside .brand-name small { color: rgba(255,255,255,.82); }
.auth-aside .pitch-title { font-family: var(--font-heading); font-size: 2.1rem; font-weight: 700;
                           line-height: 1.15; max-width: 22ch; margin: 0 0 1.25rem; }
.auth-aside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.auth-aside li { display: flex; gap: .6rem; align-items: center; color: rgba(255,255,255,.92); }
.auth-aside li .ico { color: #ffb08e; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; background: var(--surface); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { margin-bottom: .35rem; }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { padding: 1.25rem; }
  .auth-aside .auth-pitch { display: none; }
  .auth-main { align-items: flex-start; }
}

/* ---------------- public pages (home, storefront, docs) ---------------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.94);
               backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between;
                          gap: .75rem 1rem; min-height: 70px; flex-wrap: wrap; padding-block: .5rem; }
.site-header .brand { padding: 0; }
.site-links { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.site-links a:not(.btn) { padding: .5rem .75rem; border-radius: 999px; color: var(--ink-soft);
                          text-decoration: none; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.site-links a:not(.btn):hover { background: var(--canvas); color: var(--ink); }
@media (max-width: 640px) { .site-links .hide-sm { display: none; } }
/* Legacy navbar classes used by the storefront. */
.navbar { padding: .8rem 0; }
.navbar > .container { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.navbar-brand { font-weight: 800; text-decoration: none; }

.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 28px;
  padding: 3.5rem 2.5rem;
  background:
    radial-gradient(50% 70% at 100% 0%, rgba(255,122,69,.5), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(14,124,102,.75), transparent 60%),
    var(--navy);
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.05; margin: 0 0 1rem; }
.hero .lead { font-size: 1.15rem; color: rgba(255,255,255,.9); max-width: 46ch; }
.hero .accent { color: #ffb08e; }
/* Grid children default to min-width:auto; long <pre> lines would widen the page. */
.hero-grid > *, .dev-band > *, .docs-layout > *, .feature-grid > *, .steps > * { min-width: 0; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
.hero-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .85rem;
             border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
             font-size: .85rem; font-weight: 600; margin-bottom: 1.25rem; }
.hero-panel { background: #fff; color: var(--ink); border-radius: 22px; padding: 1.25rem; box-shadow: var(--shadow-lg); }
.hero-panel .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
                   padding: .8rem .6rem; border-bottom: 1px solid var(--line); }
.hero-panel .row:last-child { border-bottom: 0; }
@media (max-width: 900px) {
  .hero { padding: 2.25rem 1.4rem; border-radius: 22px; }
  .hero-grid { grid-template-columns: 1fr; }
}

.section { padding: 4rem 0 0; }
.section-head { max-width: 640px; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 .5rem; }
.section-head p { color: var(--ink-muted); font-size: 1.05rem; }
.feature-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature { padding: 1.5rem; }
.feature h3 { margin: .9rem 0 .4rem; }
.feature p { color: var(--ink-muted); margin: 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { padding: 1.5rem; }
.step-num { font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; color: var(--primary); }
.dev-band { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2rem; align-items: center;
            background: var(--navy); color: #fff; border-radius: 28px; padding: 2.5rem; }
.dev-band p { color: rgba(255,255,255,.88); }
.dev-band .code-block { border-color: #26365a; }
@media (max-width: 900px) { .dev-band { grid-template-columns: 1fr; padding: 1.5rem; } }
.site-footer { margin-top: 4rem; padding: 2rem 0; border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: var(--ink-muted); }

/* ---------------- code blocks + docs ---------------- */
.code-block { position: relative; background: #0d1526; color: #e6ebf5; border-radius: 14px;
              border: 1px solid #1d2a44; overflow: hidden; min-width: 0; }
.code-block pre { margin: 0; padding: 1.1rem 1.2rem; font-size: .86rem; line-height: 1.6; }
.code-block pre:focus-visible { outline: 3px solid #fff; outline-offset: -3px; box-shadow: none; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem;
             padding: .4rem .5rem .4rem 1rem; background: #121d33; border-bottom: 1px solid #1d2a44;
             font-size: .8rem; color: #c6cfe0; }
.copy-btn { min-height: 36px; padding: .25rem .8rem; border-radius: 8px; border: 1px solid #3a4a6a;
            background: transparent; color: #e6ebf5; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.copy-btn:hover { background: #1d2a44; }
.code-block button:focus-visible { outline: 3px solid #fff; outline-offset: 1px; box-shadow: none; }

/* .tablist is a plain wrapper; the role="tablist" element sits inside it
   next to the copy button, so the tablist only ever contains tabs. */
.tablist { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; padding: .35rem;
           background: #121d33; border-bottom: 1px solid #1d2a44; }
.tablist [role="tablist"] { display: flex; flex-wrap: wrap; gap: .25rem; }
.tab-label { padding: .35rem .6rem; font-size: .86rem; font-weight: 600; color: #c6cfe0; }
.tablist [role="tab"] { min-height: 40px; padding: .35rem .9rem; border-radius: 8px; border: 0;
                        background: transparent; color: #c6cfe0; font: inherit; font-size: .86rem;
                        font-weight: 600; cursor: pointer; }
.tablist [role="tab"]:hover { background: #1d2a44; color: #fff; }
.tablist [role="tab"][aria-selected="true"] { background: var(--primary); color: #fff; }
.tablist .copy-btn { margin-left: auto; }

.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.docs-toc { position: sticky; top: 90px; }
.docs-toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.docs-toc ul ul { margin-bottom: .25rem; }
.docs-toc li > a { text-decoration: none; }
.docs-toc a { display: flex; align-items: center; min-height: 40px; padding: .3rem .7rem; border-radius: 8px;
              color: var(--ink-soft); text-decoration: none; font-size: .92rem; }
.docs-toc a:hover { background: var(--surface); color: var(--ink); }
.docs-toc .toc-group { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
                       color: var(--ink-muted); margin: 1rem .7rem .3rem; }
.docs-section { padding: 2rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.docs-section:last-child { border-bottom: 0; }
.docs-section h2 { margin: 0 0 .75rem; }
.docs-section h3 { margin: 1.5rem 0 .6rem; }
.endpoint { display: inline-flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .45rem .75rem .45rem .45rem;
            background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
            font-family: var(--font-mono); font-size: .9rem; margin-bottom: 1rem; word-break: break-all; }
.method { font-family: var(--font-body); font-weight: 800; font-size: .74rem; letter-spacing: .05em;
          padding: .25rem .55rem; border-radius: 7px; }
.method-get { background: var(--info-tint); color: #123d7d; }
.method-post { background: var(--success-tint); color: #0b4a30; }
.param-table td:first-child code { white-space: nowrap; }
@media (max-width: 960px) {
  .docs-layout { grid-template-columns: 1fr; gap: 1rem; }
  .docs-toc { position: static; }
  .docs-toc ul { display: flex; flex-wrap: wrap; gap: .35rem; }
  .docs-toc .toc-group { display: none; }
  .docs-toc a { background: var(--surface); border: 1px solid var(--line); min-height: 40px; }
}

.key-reveal { background: var(--accent-tint); border: 1.5px dashed #c2410c; border-radius: var(--radius); padding: 1.25rem; }
.key-value { display: block; width: 100%; font-family: var(--font-mono); font-size: .95rem; word-break: break-all;
             background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: .7rem .85rem; }

/* ---------------- motion ---------------- */
@media (prefers-reduced-motion: no-preference) {
  .btn, .package-card, .sidebar a.nav-item, .nav-link, .form-control, .form-select {
    transition: background-color .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
  }
  a.package-card:hover { transform: translateY(-3px); }
}
