/* Cheko Billing — sky blue, white, navy */
:root {
  --ink: #0B2545;
  --blue: #0369A1;
  --blue-dark: #075985;
  --sky: #38BDF8;
  --sky-300: #7DD3FC;
  --sky-200: #BAE6FD;
  --sky-100: #E0F2FE;
  --ground: #F0F9FF;
  --white: #FFFFFF;
  --muted: #475569;
  --warn: #B45309;
  --warn-bg: #FEF3C7;
  --warn-ink: #7A3A05;
  --bad: #B42318;
  --bad-bg: #FEE4E2;
  --bad-ink: #912018;
  --display: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--ground); font-size: 16px; line-height: 1.5; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.03em; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.bold { font-weight: 700; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* Layout */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.page { padding-top: 36px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 28px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.row-end { align-items: flex-end; }
.grow { flex: 1 1 auto; min-width: 0; }
.push { margin-left: auto; }
.mt-auto { margin-top: auto; }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .main { flex: 999 1 560px; min-width: 0; }
.split > .side { flex: 1 1 320px; min-width: 0; }
.grid { display: grid; gap: 16px; }
.g-150 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.g-200 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.g-240 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g-320 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* Top bar */
.topbar { background: var(--white); border-bottom: 2px solid var(--sky-200); }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand .dot { width: 34px; height: 34px; border-radius: 999px; background: var(--sky); border: 3px solid var(--ink); }
.brand em { font-style: normal; color: var(--blue); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.nav a { padding: 10px 16px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.nav a:hover { background: var(--sky-100); }
.nav a.on { background: var(--ink); color: var(--white); }
.who { padding: 10px 16px; border-radius: 999px; background: var(--sky-100); font-weight: 700; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 10px 4px; font: 600 14px var(--body); color: var(--blue); cursor: pointer; text-decoration: underline; }
.banner { background: var(--ink); color: var(--white); font-size: 14px; }
.banner .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 8px; padding-bottom: 8px; }
.banner .linkbtn { color: var(--sky-300); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent; font: 700 15px var(--body); text-decoration: none; cursor: pointer; text-align: center; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #12345E; color: var(--white); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--sky-100); color: var(--ink); }
.btn-white { background: var(--white); color: var(--ink); }
.btn-danger { background: var(--bad); color: var(--white); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }
.btn svg { flex: none; }

/* Cards */
.card { background: var(--white); border: 2px solid var(--ink); border-radius: 24px; padding: 28px; }
.card-sky { background: var(--sky); }
.card-navy { background: var(--ink); color: var(--white); }
.card-warn { border-color: var(--warn); }
.card-bad { border-color: var(--bad); }
.card-dashed { border: 2px dashed var(--sky-300); border-radius: 20px; padding: 20px 24px; background: var(--white); }
.card-flush { padding: 0; overflow: hidden; }
.pad { padding: 22px 24px; }
.pop { box-shadow: 6px 6px 0 var(--ink); }
.pop-sky { box-shadow: 6px 6px 0 var(--sky); }
.tile { border-radius: 20px; padding: 20px; }
.tile .big { font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: -0.02em; line-height: 1.1; }

/* Badges */
.badge { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--sky-100); color: var(--ink); white-space: nowrap; }
.badge.caps { letter-spacing: 0.06em; text-transform: uppercase; }
.badge.ok { background: var(--sky-100); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); }
.badge.muted { background: #F1F5F9; color: #334155; }
.badge.dark { background: var(--ink); color: var(--white); }
.badge.sky { background: var(--sky); color: var(--ink); }

/* Hero */
.hero { background: var(--sky); border-bottom: 2px solid var(--ink); }
.hero .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px; }
.hero h1 { font-size: clamp(40px, 6.5vw, 60px); line-height: 0.98; }
.steps { margin: 0; flex: 1 1 300px; }
.steps div { display: flex; gap: 14px; align-items: baseline; }
.steps dt { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--blue); }
.steps dd { margin: 0; font-weight: 600; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 14px; font-weight: 700; }
.input, select.input { min-height: 48px; padding: 0 16px; border: 2px solid var(--sky-300); border-radius: 14px; font: 500 16px var(--body); color: var(--ink); background: var(--white); width: 100%; }
.input:focus { border-color: var(--blue); outline: none; }
.input-sm { min-height: 44px; padding: 0 12px; font-size: 15px; }
.error { color: var(--bad-ink); font-size: 14px; font-weight: 600; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
input[type=radio], input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }

/* Choice cards (radio) */
.choice { border: 2px solid var(--sky-200); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; background: var(--white); }
.choice:has(input:checked) { border-color: var(--blue); background: var(--sky-100); }
.choice .big { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.1; }
.choice.wide { flex-direction: row; align-items: flex-start; gap: 10px; }
.chip { min-height: 48px; padding: 0 18px; border: 2px solid var(--sky-200); border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; cursor: pointer; background: var(--white); }
.chip:has(input:checked) { border-color: var(--blue); background: var(--sky-100); }
.filter { min-height: 44px; padding: 0 18px; border: 2px solid var(--sky-200); border-radius: 999px; display: inline-flex; align-items: center; background: var(--white); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; }
.filter.on { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* Bundles / tiles as links */
.bundle { border: 2px solid var(--sky-200); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); background: var(--white); }
.bundle:hover { border-color: var(--blue); color: var(--ink); }
.bundle .big { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.1; }
.bundle.dashed { border-style: dashed; border-color: var(--sky-300); }
.quick { min-height: 56px; border: 2px solid var(--sky-200); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15px; padding: 6px; text-align: center; }
.quick:hover { border-color: var(--blue); color: var(--ink); }
.quick span { font-weight: 500; font-size: 12px; color: var(--muted); }

/* Feature product card (PoaSMS) */
.feature { display: flex; flex-wrap: wrap; padding: 0; overflow: hidden; }
.feature > .lead { flex: 1 1 300px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.feature > .rest { flex: 999 1 480px; min-width: 0; padding: 28px; align-content: center; }
.wallet { display: flex; flex-wrap: wrap; padding: 0; overflow: hidden; border-radius: 28px; }
.wallet > .lead { flex: 999 1 420px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.wallet > .rest { flex: 1 1 320px; min-width: 0; background: var(--white); border-left: 2px solid var(--ink); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.balance { font-family: var(--display); font-weight: 800; font-size: clamp(56px, 9vw, 84px); line-height: 0.9; letter-spacing: -0.04em; }
.amount { font-family: var(--display); font-weight: 800; font-size: 30px; white-space: nowrap; }
.amount-xl { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 6vw, 56px); line-height: 1; letter-spacing: -0.03em; }

/* Meter */
.meter { height: 12px; border-radius: 999px; background: var(--sky-100); overflow: hidden; }
.meter > i { display: block; height: 100%; min-width: 10px; border-radius: 999px; background: var(--blue); }
.meter.warn { background: var(--warn-bg); }
.meter.warn > i { background: var(--warn); }
.meter.on-sky { background: var(--white); border: 2px solid var(--ink); max-width: 420px; }
.meter.on-sky > i { background: var(--ink); }

/* Lists & tables */
.plain { margin: 0; padding: 0; list-style: none; }
.lines > * { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 11px 0; border-top: 1px solid var(--sky-200); }
dl.sum { margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
dl.sum > div { display: flex; justify-content: space-between; gap: 12px; }
dl.sum dt { color: var(--muted); }
dl.sum dd { margin: 0; font-weight: 700; }
.total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 2px dashed var(--sky-300); padding-top: 16px; }
.scroll-x { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; font-weight: 700; padding: 13px 12px; background: var(--sky-100); white-space: nowrap; }
.table td { padding: 13px 12px; border-top: 1px solid var(--sky-200); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 24px; }
.table th:last-child, .table td:last-child { padding-right: 24px; }
.table tr.hl td { background: #FFFBEB; }
.table .acts { text-align: right; white-space: nowrap; }
.table .acts form { display: inline; }
.table .acts a, .table .acts button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font: 700 14px var(--body); background: none; border: 0; color: var(--blue); cursor: pointer; text-decoration: underline; }
.table .acts .danger { color: #A1241A; }
.table .input { min-height: 40px; padding: 0 10px; font-size: 15px; border-radius: 10px; min-width: 90px; }
.timeline { margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--sky-300); list-style: none; display: flex; flex-direction: column; gap: 18px; font-size: 14px; }
.timeline li { display: flex; flex-direction: column; gap: 2px; }
.actions3 a, .actions3 button { border: 2px solid var(--ink); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; background: var(--white); color: var(--ink); text-align: left; font: inherit; cursor: pointer; width: 100%; }
.actions3 .t { font-family: var(--display); font-weight: 800; font-size: 24px; }
.actions3 .go { background: var(--blue); color: var(--white); }
.actions3 .stop { border-color: var(--bad); }
.actions3 .stop .t { color: #A1241A; }

/* Flash */
.flash { background: var(--white); border: 2px solid var(--blue); border-radius: 16px; padding: 14px 18px; font-size: 15px; font-weight: 600; }
.flash.bad { border-color: var(--bad); color: var(--bad-ink); }
.pager { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 700; }

/* Waiting for payment */
.center { max-width: 560px; margin: 0 auto; text-align: center; align-items: center; }
.pulse { width: 72px; height: 72px; border-radius: 999px; background: var(--sky); border: 3px solid var(--ink); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.sandbox { border: 2px dashed var(--warn); border-radius: 16px; padding: 16px; background: #FFFBEB; width: 100%; }

/* Admin shell */
.admin { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 100vh; }
.sidebar { flex: 1 1 230px; max-width: 100%; background: var(--ink); color: var(--white); padding: 20px 16px; display: flex; flex-direction: column; gap: 20px; }
.sidebar .brand { color: var(--white); font-size: 20px; padding: 0 8px; }
.sidebar .brand .dot { width: 32px; height: 32px; border-color: var(--white); }
.sidebar .brand em { color: var(--sky-300); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { padding: 12px 14px; border-radius: 12px; color: var(--sky-100); font-weight: 500; font-size: 15px; text-decoration: none; }
.sidebar nav a:hover { background: #12345E; }
.sidebar nav a.on { background: var(--sky); color: var(--ink); font-weight: 700; }
.sidebar .linkbtn { color: var(--sky-300); text-align: left; padding: 12px 14px; }
.admin > main { flex: 999 1 560px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.admin h1 { font-size: 40px; line-height: 1; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .card { padding: 20px; border-radius: 20px; }
  .wallet > .rest { border-left: 0; border-top: 2px solid var(--ink); }
  .admin > main { padding: 20px 16px; }
  .hero .wrap { padding-top: 36px; padding-bottom: 40px; }
}

/* Quantity stepper (top-up) */
.stepper { display: flex; border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--white); }
.stepper button { flex: none; width: 64px; min-height: 64px; border: 0; background: var(--white); color: var(--ink); font: 700 28px var(--body); cursor: pointer; }
.stepper button:hover:not(:disabled) { background: var(--sky-100); }
.stepper button:disabled { color: #94A3B8; cursor: not-allowed; }
.stepper input { flex: 1 1 auto; min-width: 0; border: 0; border-left: 2px solid var(--sky-200); border-right: 2px solid var(--sky-200); text-align: center; font: 800 32px var(--display); color: var(--ink); background: var(--white); -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: 3px solid var(--blue); outline-offset: -3px; }
button.filter { cursor: pointer; font-family: var(--body); }
.priceline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; background: var(--ground); border-radius: 16px; padding: 18px 20px; font-size: 16px; }
.priceline strong { font-family: var(--display); font-weight: 800; font-size: 24px; white-space: nowrap; }

/* ------------------------------------------------------------------
   Panel layout: sidebar shell, tabs, tables, lighter cards
   ------------------------------------------------------------------ */
.card { border: 1px solid var(--sky-200); border-radius: 16px; padding: 24px; }
.card-sky, .card-navy { border-color: var(--ink); }
.card-warn { border-color: var(--warn); }
.card-bad { border-color: var(--bad); }
.card-flush { padding: 0; }
.pop, .pop-sky { box-shadow: none; }
.card-dashed { border-width: 1px; border-radius: 16px; }
.btn-outline { border-width: 1px; }
.btn-xs { min-height: 40px; padding: 0 16px; font-size: 14px; }
.input { border-width: 1px; }
.choice, .chip, .filter, .bundle, .quick { border-width: 1px; }
.stepper { border-width: 1px; border-radius: 14px; }
.stepper input { border-left-width: 1px; border-right-width: 1px; }
.table td { border-top-color: var(--sky-100); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.shell { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 100vh; }
.side-nav { flex: 0 0 250px; background: var(--white); border-right: 1px solid var(--sky-200); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; }
.side-nav .brand { font-size: 20px; padding: 0 10px; }
.side-nav .brand .dot { width: 32px; height: 32px; }
.side-nav nav { display: flex; flex-direction: column; gap: 18px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 0 12px 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--muted); }
.side-nav nav a { padding: 11px 12px; border-radius: 10px; color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-nav nav a:hover { background: var(--ground); }
.side-nav nav a.on { background: var(--sky-100); font-weight: 700; }
.side-nav .count { padding: 2px 9px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.shell-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.shell-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 14px; padding: 16px 32px 0; }
.shell-main .wrap { max-width: 1240px; margin: 0; padding: 0 32px; }
.shell-main .page { padding-top: 16px; gap: 22px; }
.shell-main h1 { font-size: 32px; letter-spacing: -0.02em; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px 24px; border-bottom: 1px solid var(--sky-200); }
.tabs a { padding: 12px 4px; font-weight: 500; font-size: 15px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--blue); }

.status { white-space: nowrap; font-weight: 500; }
.status::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 999px; background: var(--blue); margin-right: 8px; }
.status.warn::before { background: var(--warn); border-radius: 2px; }
.status.bad::before { background: var(--bad); border-radius: 2px; }
.status.muted { color: var(--muted); }
.status.muted::before { background: transparent; border: 2px solid #64748B; box-sizing: border-box; }

.menu { position: relative; display: inline-block; text-align: left; }
.menu > summary { list-style: none; width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; cursor: pointer; color: var(--ink); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover, .menu[open] > summary { background: var(--sky-100); }
.menu-list { position: absolute; right: 0; top: 46px; z-index: 20; min-width: 210px; background: var(--white); border: 1px solid var(--sky-200); border-radius: 12px; padding: 6px; box-shadow: 0 8px 24px rgba(11, 37, 69, 0.14); display: flex; flex-direction: column; }
.menu-list a, .menu-list button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 0; background: none; width: 100%; text-align: left; font: 500 15px var(--body); color: var(--ink); text-decoration: none; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--ground); color: var(--ink); }
.menu-list .danger { color: #A1241A; }
.table td.rowacts { white-space: nowrap; padding-top: 8px; padding-bottom: 8px; }
.table td.rowacts form { display: inline; }
.table td.rowacts .btn + .btn, .table td.rowacts .btn + form, .table td.rowacts form + .btn { margin-left: 6px; }
.table a.name { font-weight: 700; text-decoration: none; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; }
.facts > div { display: flex; flex-direction: column; gap: 4px; }
.facts dt { font-size: 13px; font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; font-size: 13px; color: var(--muted); }
.facts dd.v { font-size: 17px; font-weight: 700; color: var(--ink); }

.mobile-bar, .nav-backdrop, .nav-close, .side-foot { display: none; }

/* Phones and small tablets: compact top bar, sidebar becomes a drawer. */
@media (max-width: 900px) {
  .shell, .admin { display: block; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; padding: 8px 12px; background: var(--white); border-bottom: 1px solid var(--sky-200); }
  .mobile-bar .brand { font-size: 19px; margin-right: auto; min-width: 0; }
  .mobile-bar .brand .dot { width: 28px; height: 28px; flex: none; }
  .mobile-bar.dark { background: var(--ink); border-bottom-color: var(--ink); }
  .mobile-bar.dark .brand { color: var(--white); }
  .mobile-bar.dark .brand .dot { border-color: var(--white); }
  .mobile-bar.dark .brand em { color: var(--sky-300); }
  .nav-toggle { flex: none; width: 44px; height: 44px; border: 1px solid var(--sky-200); border-radius: 12px; background: var(--white); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; }
  .nav-toggle span { position: relative; }
  .nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after { top: 6px; }
  .mobile-bar.dark .nav-toggle { background: transparent; border-color: #2B4A75; color: var(--white); }

  .side-nav, .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(300px, 86vw); max-width: none; overflow-y: auto; padding: 14px; gap: 18px; border-right: 0; box-shadow: 0 0 40px rgba(11, 37, 69, 0.25); transform: translateX(-100%); visibility: hidden; transition: transform 0.2s ease, visibility 0.2s; }
  .nav-open .side-nav, .nav-open .sidebar { transform: none; visibility: visible; }
  .sidebar nav { flex-direction: column; flex-wrap: nowrap; }
  .nav-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 50; border: 0; padding: 0; background: rgba(11, 37, 69, 0.45); }
  body.nav-open { overflow: hidden; }
  .nav-close { display: inline-flex; align-items: center; justify-content: center; position: absolute; top: 12px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 999px; background: none; color: inherit; font-size: 28px; line-height: 1; cursor: pointer; }
  .side-nav .nav-close:hover { background: var(--ground); }
  .side-nav nav a { padding: 13px 12px; font-size: 16px; }
  .side-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid var(--sky-200); }

  .shell-top { display: none; }
  .shell-main .wrap { padding: 0 16px; }
  .shell-main .page { padding-top: 20px; }
  .shell-main h1 { font-size: 28px; }
  .menu-list { right: auto; left: -160px; }
}
@media (prefers-reduced-motion: reduce) { .side-nav, .sidebar { transition: none; } }

/* A table whose row menus must be able to overflow the card (wide screens). */
@media (min-width: 901px) {
  .card.table-free { overflow: visible; }
  .table-free .table thead th:first-child { border-top-left-radius: 15px; }
  .table-free .table thead th:last-child { border-top-right-radius: 15px; }
}

/* Contain absolutely positioned children (screen-reader text, menus) so a
   scrolling table never widens the page itself. */
.scroll-x { position: relative; }

/* Phones: table rows stack as cards (labels are set by the layout script). */
@media (max-width: 640px) {
  .scroll-x:has(> .table.stacked) { overflow: visible; }
  table.table.stacked { min-width: 0 !important; display: block; }
  .table.stacked thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table.stacked tbody { display: block; }
  .table.stacked tr { display: block; padding: 14px 20px; border-top: 1px solid var(--sky-200); }
  .table.stacked tbody tr:first-child { border-top: 0; }
  .pad + .table.stacked tbody tr:first-child { border-top: 1px solid var(--sky-200); }
  .table.stacked tr.hl { background: #FFFBEB; }
  .table.stacked td, .table.stacked td:first-child, .table.stacked td:last-child { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 5px 0; border: 0; background: none; text-align: right; white-space: normal; }
  .table.stacked td[data-label]::before { content: attr(data-label); flex: none; font-size: 13px; font-weight: 700; color: var(--muted); text-align: left; }
  .table.stacked td.lead { display: block; text-align: left; font-size: 17px; font-weight: 700; padding-bottom: 8px; }
  .table.stacked td.lead .tiny, .table.stacked td.lead .small { font-weight: 500; }
  .table.stacked td[colspan] { display: block; text-align: left; }
  .table.stacked td:empty { display: none; }
  .table.stacked td .input { flex: 1 1 140px; max-width: 60%; }
  .table.stacked .menu-list { left: auto; right: 0; }
}

/* Monthly bar chart (admin revenue) */
.bars { display: flex; align-items: stretch; gap: 6px; height: 220px; }
.bar { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; text-align: center; }
.bar > i { display: block; width: 100%; max-width: 56px; border-radius: 6px 6px 0 0; background: var(--blue); }
.bar > span { white-space: nowrap; }
@media (max-width: 640px) { .bar > span:first-child { display: none; } .bars { gap: 3px; height: 160px; } }
