:root {
  --bg: #f4f5fb; --card: #fff; --ink: #10132a; --muted: #686d8a; --line: #e5e7f3; --soft: #f2f3fa;
  --accent: #5b4cf0; --accent-2: #8b5cf6; --accent-3: #06b6d4; --accent-ink: #fff; --accent-soft: #ecebfe;
  --danger: #c81e3a; --danger-soft: #fdecef; --ok: #0f8a4f; --ok-soft: #dcf7e8; --warn: #b4620a; --warn-soft: #fdf0d5;
  --side: #0c0f22; --side-ink: #a9aed0; --side-line: rgba(255, 255, 255, .08);
  --grad: linear-gradient(135deg, #5b4cf0, #8b5cf6);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 19, 42, .04), 0 8px 24px -12px rgba(16, 19, 42, .12);
  --shadow-lg: 0 24px 60px -20px rgba(16, 19, 42, .35);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080a17; --card: #11142a; --ink: #e9ebf8; --muted: #969bbb; --line: #222644; --soft: #191d38;
    --accent: #8f83ff; --accent-soft: #24225a;
    --danger: #ff7a8c; --danger-soft: #3a1420; --ok: #4ade80; --ok-soft: #10331f; --warn: #fbbf24; --warn-soft: #3a2a0a;
    --side: #0b0d1e;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset; --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1 { font-size: 1.65rem; margin: 0; font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: 1.05rem; margin: 0 0 12px; font-weight: 700; letter-spacing: -.01em; }
.muted { color: var(--muted); margin: 2px 0 0; font-size: .9rem; }
.center { text-align: center; }
[hidden] { display: none !important; }
a { color: var(--accent); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* brand */
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted); font-weight: 600; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; margin-top: -2px; }
.logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #5b4cf0, #06b6d4); color: #fff;
  box-shadow: 0 8px 18px -8px rgba(91, 76, 240, .9); }
.logo svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.logo.portal { background: linear-gradient(135deg, #f43f5e, #f59e0b); box-shadow: 0 8px 18px -8px rgba(244, 63, 94, .9); }

/* controls */
label { display: block; font-weight: 650; font-size: .85rem; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; font: inherit; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
input::placeholder { text-transform: none; letter-spacing: normal; color: var(--muted); opacity: .8; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; }
.stack { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 17px; font: inherit; font-weight: 700; font-size: .92rem;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none;
  transition: transform .12s, box-shadow .15s, border-color .15s, background .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 10px 22px -10px rgba(91, 76, 240, .85); }
.btn.primary:hover { color: #fff; box-shadow: 0 14px 26px -10px rgba(91, 76, 240, 1); transform: translateY(-1px); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.btn.sm { padding: 6px 11px; font-size: .82rem; border-radius: 10px; }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.err { background: var(--danger-soft); color: var(--danger); border-radius: 12px; padding: 10px 13px; font-size: .9rem; font-weight: 600; }

/* auth: brand panel beside the form */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 44px 48px; color: #fff;
  background: radial-gradient(900px 500px at 110% -10%, rgba(6, 182, 212, .55), transparent 60%),
              radial-gradient(700px 500px at -10% 110%, rgba(139, 92, 246, .7), transparent 60%), #1b1464; }
.auth-art.portal { background: radial-gradient(900px 500px at 110% -10%, rgba(245, 158, 11, .45), transparent 60%),
              radial-gradient(700px 500px at -10% 110%, rgba(244, 63, 94, .55), transparent 60%), #1a1030; }
.auth-art::after { content: ""; position: absolute; right: -140px; bottom: -140px; width: 520px; height: 520px; border-radius: 50%;
  border: 60px solid rgba(255, 255, 255, .05); box-shadow: 0 0 0 70px rgba(255, 255, 255, .035), 0 0 0 150px rgba(255, 255, 255, .02); pointer-events: none; }
.auth-art .brand { color: #fff; }
.auth-art .brand small { color: rgba(255, 255, 255, .7); }
.auth-art .logo { background: rgba(255, 255, 255, .16); box-shadow: none; backdrop-filter: blur(6px); }
.auth-art h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; margin: 0 0 14px; max-width: 13em; }
.auth-art p { color: rgba(255, 255, 255, .8); font-size: 1.02rem; max-width: 30em; margin: 0; }
.points { position: relative; z-index: 1; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.points li { display: flex; gap: 12px; align-items: center; font-weight: 600; color: rgba(255, 255, 255, .92); }
.points li span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .14); flex: none; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card > .brand { display: none; margin-bottom: 26px; }
.auth-card h1 { font-size: 1.9rem; }
.auth-card form { margin-top: 22px; }
.auth-card .btn.primary { width: 100%; padding: 13px; font-size: 1rem; margin-top: 4px; }
.auth-card .center { margin-top: 20px; }

.forgot { justify-self: end; margin-top: -6px; font-size: .86rem; }
.ok-note { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 10px 13px; font-size: .9rem; font-weight: 600; }

.menu-btn { display: none; }

/* shell */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px; padding: 22px 14px; color: #fff;
  background: radial-gradient(420px 260px at 0 0, rgba(91, 76, 240, .35), transparent 70%), var(--side); border-right: 1px solid var(--side-line); }
.side .brand { padding: 0 8px; color: #fff; }
.side .brand small { color: var(--side-ink); }
.side nav { display: grid; gap: 3px; }
.side nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; color: var(--side-ink);
  text-decoration: none; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side nav a.active { background: linear-gradient(90deg, rgba(91, 76, 240, .5), rgba(91, 76, 240, .12)); color: #fff; }
.side nav a.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: #8b7dff; }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--side-line); }
.who { font-size: .8rem; color: var(--side-ink); overflow-wrap: anywhere; }
.who b { display: block; color: #fff; font-size: .9rem; }
.side .btn.ghost { color: #fff; border-color: var(--side-line); }
.side .btn.ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #fff; }
.content { padding: 32px 36px 64px; min-width: 0; max-width: 1280px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .muted { font-size: .95rem; margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* cards, stats, tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card + .card { margin-top: 18px; }
.stats .card { margin-top: 0; }
.card-pad { padding: 20px; }
.card > .card-pad:first-child:has(+ .table-wrap), .card > .card-pad:first-child:has(+ .empty) { padding-bottom: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat { position: relative; padding: 18px 20px; transition: transform .15s, box-shadow .15s; }
.stat:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(16, 19, 42, .04), 0 16px 30px -16px rgba(16, 19, 42, .25); }
.stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tone, var(--accent)); opacity: .9; }
.stat .ico { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  color: var(--tone, var(--accent)); background: color-mix(in srgb, var(--tone, var(--accent)) 14%, transparent); }
.stat .ico svg.i { width: 20px; height: 20px; }
.stat .k { color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding-right: 46px; }
.stat .v { font-size: 1.95rem; font-weight: 800; margin-top: 6px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .s { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.t-violet { --tone: #7c5cf6; } .t-cyan { --tone: #0aa5c2; } .t-green { --tone: #12a35f; } .t-amber { --tone: #e08a0b; } .t-rose { --tone: #e8456b; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; padding: 12px 18px;
  background: var(--soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num .btn { margin: 2px 0 2px 4px; }
.sub { display: block; color: var(--muted); font-size: .82rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; font-size: .92em; }
.empty { padding: 44px 18px; text-align: center; color: var(--muted); font-weight: 500; }
.empty::before { content: ""; display: block; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; background: var(--accent-soft)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c6cf5' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4.5 10.5a11 11 0 0 1 15 0M7.5 14a6.5 6.5 0 0 1 9 0'/%3E%3Ccircle cx='12' cy='17.5' r='1' fill='%237c6cf5'/%3E%3C/svg%3E") center / 28px no-repeat; }
.empty .btn { margin-top: 14px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--soft); color: var(--muted); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; background: var(--muted); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chip { padding: 6px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }

/* getting started */
.progress { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; margin: 4px 0 16px; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5b4cf0, #06b6d4); }
.todo { display: grid; gap: 4px; }
.todo > * { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); font-weight: 600; }
.todo a:hover { background: var(--soft); text-decoration: none; }
.todo a::after { content: "→"; margin-left: auto; color: var(--accent); }
.todo .tick { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; font-size: .78rem; color: var(--muted); }
.todo .done { color: var(--muted); font-weight: 500; text-decoration: line-through; }
.todo .done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }

.notice { display: flex; gap: 12px; align-items: center; padding: 14px 18px; margin-bottom: 18px; border-radius: var(--radius); background: var(--warn-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
pre.script { margin: 0; padding: 16px; max-height: 340px; overflow: auto; background: #0c0f22; color: #cfd3f5; border-radius: 12px; font-size: .8rem; line-height: 1.55; white-space: pre; }
ol.steps { margin: 0 0 14px; padding-left: 20px; color: var(--muted); font-size: .9rem; }
ol.steps li { margin: 5px 0; }
ol.steps b { color: var(--ink); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: .92rem; margin: 6px 0 18px; padding: 14px 16px; background: var(--soft); border-radius: 12px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
tr.click { cursor: pointer; }
.suspended-note { background: var(--danger-soft); color: var(--danger); border-radius: 12px; padding: 10px 13px; margin-bottom: 14px; font-size: .9rem; }

/* branding page */
.brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.logo-pick { display: flex; gap: 16px; align-items: center; margin-top: 8px; }
.logo-box { display: grid; place-items: center; width: 92px; height: 92px; flex: none; border-radius: 20px; border: 2px dashed var(--line); background: var(--soft); overflow: hidden; color: var(--muted); font-size: .78rem; font-weight: 600; }
.logo-box img { max-width: 100%; max-height: 100%; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.sw { width: 42px; height: 42px; border-radius: 13px; border: 3px solid var(--card); outline: 2px solid var(--line); cursor: pointer; transition: transform .12s; }
.sw:hover { transform: scale(1.08); }
.sw.active { outline: 3px solid var(--ink); }
input[type=color] { height: 46px; padding: 5px; cursor: pointer; }
.phone { --b1: #5b4cf0; --b2: #8b5cf6; --on: #fff; --acc: #5b4cf0; position: sticky; top: 24px; border-radius: 34px; border: 8px solid #10132a; background: #f3f4fb; overflow: hidden;
  box-shadow: var(--shadow-lg); color: #10132a; font-size: .8rem; }
.ph-hero { display: grid; justify-items: center; gap: 2px; padding: 26px 14px 56px; text-align: center; color: var(--on); background: linear-gradient(140deg, var(--b1), var(--b2)); border-radius: 0 0 22px 22px; }
.ph-hero b { font-size: 1.05rem; font-weight: 800; }
.ph-hero span { opacity: .85; font-size: .78rem; }
.ph-mark { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px; border-radius: 16px; background: rgba(255, 255, 255, .18); }
.ph-mark svg { width: 28px; height: 28px; }
.ph-mark.logo { width: 64px; height: 64px; background: #fff; padding: 6px; border-radius: 18px; }
.ph-mark.logo img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.ph-body { padding: 0 10px 18px; margin-top: -40px; display: grid; gap: 10px; }
.ph-card { background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 10px 22px -16px rgba(16, 19, 42, .5); }
.ph-card small { display: block; font-weight: 800; margin-bottom: 8px; font-size: .78rem; }
.ph-input { padding: 9px 10px; border-radius: 10px; border: 2px solid #e5e7f3; background: #f6f7fc; color: #9aa0bd; }
.ph-btn { margin-top: 8px; padding: 10px; border-radius: 10px; text-align: center; font-weight: 800; color: var(--on); background: linear-gradient(135deg, var(--b1), var(--b2)); }
.ph-plan { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 2px solid #e5e7f3; border-radius: 12px; background: #fafbff; }
.ph-plan span:first-child { margin-right: auto; }
.ph-plan b, .ph-plan i { display: block; font-style: normal; }
.ph-plan i { color: #686d8a; font-size: .7rem; }
.ph-price { font-weight: 800; color: var(--acc); }
.ph-plan em { font-style: normal; font-weight: 800; color: #fff; background: #16a34a; padding: 5px 12px; border-radius: 99px; }
@media (max-width: 980px) { .brand-grid { grid-template-columns: minmax(0, 1fr); } .phone { position: static; max-width: 300px; margin: 0 auto; } }

/* subscriptions */
.notice > div { margin-right: auto; }
.notice.bad { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.sub-status p { margin: 10px 0 0; font-size: 1.05rem; font-weight: 600; }
.sub-status p.muted { font-size: .9rem; font-weight: 400; margin-top: 4px; }
.periods { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.period { position: relative; cursor: pointer; }
.period input { position: absolute; opacity: 0; }
.period span { display: grid; gap: 2px; padding: 16px 18px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.period b { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.period em { font-style: normal; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.period i { font-style: normal; color: var(--muted); font-size: .85rem; }
.period input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.period input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sub-wait { display: grid; justify-items: center; gap: 6px; padding: 22px 0 8px; text-align: center; }
.spin { width: 42px; height: 42px; border: 5px solid var(--ok-soft); border-top-color: var(--ok); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; margin-bottom: 18px; }
.bill-grid .card + .card { margin-top: 0; }
.bill-foot { grid-column: 1 / -1; display: grid; gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.switch { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--soft); cursor: pointer; }
.switch input { margin: 3px 0 0; flex: none; }
.switch b, .switch i { display: block; font-style: normal; }
.switch i { color: var(--muted); font-weight: 400; font-size: .85rem; }
@media (max-width: 980px) { .bill-grid { grid-template-columns: minmax(0, 1fr); } .row3 { grid-template-columns: 1fr; } }

/* setup guide */
.guide { max-width: 860px; }
.guide p { margin: 8px 0 0; }
.guide ol { margin: 10px 0 0; padding-left: 22px; }
.guide ol li { margin: 7px 0; }
.guide .actions { margin-top: 14px; }
.ticks { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 8px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: .75rem; font-weight: 800; }
.step-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; font-weight: 800; font-size: 1.05rem; color: #fff; background: linear-gradient(135deg, #5b4cf0, #06b6d4); }
.callout { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: .93rem; }
.callout.warn { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.faq { display: grid; gap: 8px; margin-top: 4px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.faq summary { font-weight: 650; cursor: pointer; }
.faq details p { color: var(--muted); margin: 10px 0 2px; }
@media (max-width: 820px) { .step-card { grid-template-columns: 1fr; gap: 12px; } }

/* modal + toast */
.modal { position: fixed; inset: 0; background: rgba(8, 10, 23, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s; }
.modal-box { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: var(--shadow-lg); animation: rise .2s; }
.modal-box.wide { max-width: 780px; }
.modal-box h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: #10132a; color: #fff; padding: 11px 18px; border-radius: 999px; font-size: .92rem; font-weight: 600;
  box-shadow: var(--shadow-lg); z-index: 60; animation: rise .2s; border: 1px solid rgba(255, 255, 255, .12); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; margin-bottom: -10px; } }

/* phones */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-card > .brand { display: flex; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat .v { font-size: 1.55rem; }
  /* top bar with a menu button; the pages drop down as a list */
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-right: 0; }
  .side .brand { padding: 0; margin-right: auto; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 11px; border: 1px solid var(--side-line); background: rgba(255, 255, 255, .07); color: #fff; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
  .side nav, .side-foot { display: none; width: 100%; }
  .side.open nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 6px; }
  .side.open nav a { padding: 12px; background: rgba(255, 255, 255, .05); }
  .side nav a.active::before { display: none; }
  .side.open .side-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 4px; }
  .side.open .who { display: block; }

  /* tables: each row becomes a card, each cell a "name: value" line */
  .table-wrap { overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td, td.num { width: auto; padding: 0; border: 0; text-align: left; overflow-wrap: anywhere; }
  td::before { content: attr(data-label); display: block; margin-bottom: 1px; color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
  td:first-child { grid-column: 1 / -1; font-size: 1.03rem; }   /* the row's name, across the top */
  td:first-child::before, td[data-label=""]::before { display: none; }
  td[data-label=""] { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }   /* its buttons, across the bottom */
  td[data-label=""]:empty { display: none; }
  tbody tr:hover td { background: none; }
  td.num .btn { margin: 0; }
  .card > .card-pad:first-child:has(+ .table-wrap) { padding-bottom: 0; border-bottom: 1px solid var(--line); padding-bottom: 12px; }

  /* headings, filters and pop-ups */
  .page-head { margin-bottom: 18px; }
  .page-head .actions, .page-head .actions .btn { width: 100%; }
  .filters input { max-width: none !important; width: 100%; margin: 4px 0 0 !important; }
  .modal { padding: 0; place-items: end center; }
  .modal-box, .modal-box.wide { max-width: none; max-height: 94vh; border-radius: 20px 20px 0 0; padding: 20px 16px; }
  .modal-foot .btn { flex: 1 1 auto; }
  .notice { flex-wrap: wrap; }
  .logo-pick { flex-wrap: wrap; }
  .periods { grid-template-columns: 1fr; }
  input, select, textarea { font-size: 16px; }   /* smaller text makes iPhones zoom the page on focus */
  .content { padding: 22px 16px 48px; }
  .row { grid-template-columns: 1fr; }
  h1 { font-size: 1.4rem; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}

/* ───────── containers and icons (same colours, tidier shapes) ───────── */

/* cards: softer edge, deeper but lighter shadow, and a proper header when a title sits above a table */
.card { border-radius: 20px; border-color: color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: 0 1px 1px rgba(16, 19, 42, .03), 0 2px 4px rgba(16, 19, 42, .03), 0 14px 34px -18px rgba(16, 19, 42, .18); }
.card-pad { padding: 22px 24px; }
.card > .card-pad:first-child:has(+ .table-wrap), .card > .card-pad:first-child:has(+ .empty) { padding: 16px 24px; border-bottom: 1px solid var(--line); }
.card > .card-pad:first-child:has(+ .table-wrap) h2, .card > .card-pad:first-child:has(+ .empty) h2 { margin: 0; }
.card-pad > h2:first-child, .modal-box h2 { display: flex; align-items: center; gap: 10px; }
.card-pad > h2:first-child::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: linear-gradient(180deg, #5b4cf0, #06b6d4); flex: none; }
th { padding: 11px 24px; font-size: .7rem; }
td { padding: 15px 24px; }
.filters { padding: 14px 24px; }

/* stat cards: the icon leads, in a tile of its own colour; no stripe across the top */
.stat { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: start; padding: 20px 22px; overflow: hidden; }
.stat::before { inset: auto -44px -52px auto; width: 120px; height: 120px; border-radius: 50%; background: var(--tone, var(--accent)); opacity: .05; }
.stat .ico { position: static; grid-row: 1 / span 3; width: 50px; height: 50px; border-radius: 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--tone, var(--accent)) 22%, transparent), color-mix(in srgb, var(--tone, var(--accent)) 9%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone, var(--accent)) 18%, transparent); }
.stat .ico svg.i { width: 24px; height: 24px; stroke-width: 1.8; }
.stat .k { padding-right: 0; font-size: .74rem; }
.stat .v { margin-top: 2px; font-size: 1.85rem; }

/* menu: every icon in its own tile; the page you are on lights its tile up */
.side nav { gap: 2px; }
.side nav a { padding: 7px 10px; gap: 12px; }
.side nav a svg.i { box-sizing: content-box; width: 18px; height: 18px; padding: 8px; border-radius: 11px; background: rgba(255, 255, 255, .06); transition: background .15s, box-shadow .15s; }
.side nav a:hover svg.i { background: rgba(255, 255, 255, .11); }
.side nav a.active { background: rgba(255, 255, 255, .07); }
.side nav a.active svg.i { background: var(--grad); color: #fff; box-shadow: 0 8px 16px -8px rgba(91, 76, 240, 1); }
.nav-h { margin: 14px 0 4px; padding: 0 12px; color: var(--side-ink); opacity: .6; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* page heading with the page's own icon */
.page-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.page-ico { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 17px; color: var(--accent); background: var(--card);
  border: 1px solid var(--line); box-shadow: 0 10px 22px -14px rgba(91, 76, 240, .7); }
.page-ico svg.i { width: 25px; height: 25px; stroke-width: 1.8; }
.page-ico:empty { display: none; }

/* the first cell of a row: an icon or initials, then the name */
.lead { display: flex; align-items: center; gap: 13px; min-width: 0; }
.row-ico, .avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 13px; font-weight: 800; font-size: .86rem; letter-spacing: .02em;
  color: var(--tone, var(--muted)); background: color-mix(in srgb, var(--tone, var(--muted)) 13%, transparent); }
.row-ico svg.i { width: 20px; height: 20px; }
.row-ico.on { --tone: #12a35f; }
.lead > div { min-width: 0; }
.lead b { display: block; }
.pill { white-space: nowrap; }
@media (min-width: 821px) { td:first-child .lead { min-width: 200px; } }

/* buttons */
.btn { border-radius: 13px; }
.btn.sm { border-radius: 10px; gap: 6px; }
.btn[data-act="add-router"]::before, .btn[data-act="add-plan"]::before, .btn[data-act="new-codes"]::before, .btn[data-act="add-provider"]::before, .btn[data-act="add-partner"]::before, .btn[data-act="script"]::before, .btn[data-act="edit-plan"]::before, .btn[data-act="edit"]::before, .btn[data-act="edit-partner"]::before, .btn[data-act="password"]::before, .btn[data-act="reset-password"]::before, .btn[data-act="grant"]::before, .btn[data-act="payout"]::before, .btn[data-act="copy-link"]::before, .btn[data-act="mpesa-test"]::before, .btn[data-act="billing-test"]::before, .btn[data-act="toggle-router"]::before, .btn[data-act="disable-code"]::before, .btn[data-act="suspend"]::before, .btn[data-act="reactivate"]::before, .btn[data-act="print"]::before, a.btn[target="_blank"]::before, #copy::before { content: ""; width: 16px; height: 16px; flex: none; background: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.btn[data-act="add-router"], .btn[data-act="add-plan"], .btn[data-act="new-codes"], .btn[data-act="add-provider"], .btn[data-act="add-partner"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M12%205v14M5%2012h14'%2F%3E%3C%2Fsvg%3E"); }
.btn[data-act="script"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M4%206l6%206-6%206M12%2018h8'%2F%3E%3C%2Fsvg%3E"); }
.btn[data-act="edit-plan"], .btn[data-act="edit"], .btn[data-act="edit-partner"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M4%2020h4L19%209l-4-4L4%2016v4ZM14%206l4%204'%2F%3E%3C%2Fsvg%3E"); }
.btn[data-act="password"], .btn[data-act="reset-password"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Ccircle%20cx%3D'8'%20cy%3D'15'%20r%3D'4'%2F%3E%3Cpath%20d%3D'M11%2012l9-9M16%207l3%203'%2F%3E%3C%2Fsvg%3E"); }
.btn[data-act="grant"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Crect%20x%3D'3'%20y%3D'5'%20width%3D'18'%20height%3D'16'%20rx%3D'2'%2F%3E%3Cpath%20d%3D'M3%2010h18M8%203v4M16%203v4M12%2013v5M9.5%2015.5h5'%2F%3E%3C%2Fsvg%3E"); }
.btn[data-act="payout"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Crect%20x%3D'2.5'%20y%3D'6'%20width%3D'19'%20height%3D'12'%20rx%3D'2'%2F%3E%3Ccircle%20cx%3D'12'%20cy%3D'12'%20r%3D'2.5'%2F%3E%3C%2Fsvg%3E"); }
.btn[data-act="copy-link"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Crect%20x%3D'9'%20y%3D'9'%20width%3D'11'%20height%3D'11'%20rx%3D'2'%2F%3E%3Cpath%20d%3D'M5%2015V6a2%202%200%200%201%202-2h9'%2F%3E%3C%2Fsvg%3E"); }
.btn[data-act="mpesa-test"], .btn[data-act="billing-test"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M20%2011a8%208%200%201%200-2.3%206.3M20%204v7h-7'%2F%3E%3C%2Fsvg%3E"); }
.btn[data-act="toggle-router"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M12%203v9M6.3%206.3a8%208%200%201%200%2011.4%200'%2F%3E%3C%2Fsvg%3E"); }
.btn[data-act="disable-code"], .btn[data-act="suspend"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Ccircle%20cx%3D'12'%20cy%3D'12'%20r%3D'9'%2F%3E%3Cpath%20d%3D'M5.6%205.6l12.8%2012.8'%2F%3E%3C%2Fsvg%3E"); }
.btn[data-act="reactivate"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M5%2012.5l4.5%204.5L19%207.5'%2F%3E%3C%2Fsvg%3E"); }
.btn[data-act="print"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M7%208V3h10v5M7%2017H5a2%202%200%200%201-2-2v-4a2%202%200%200%201%202-2h14a2%202%200%200%201%202%202v4a2%202%200%200%201-2%202h-2'%2F%3E%3Crect%20x%3D'7'%20y%3D'14'%20width%3D'10'%20height%3D'7'%20rx%3D'1'%2F%3E%3C%2Fsvg%3E"); }
a.btn[target="_blank"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M14%204h6v6M20%204l-9%209M18%2014v5a1%201%200%200%201-1%201H5a1%201%200%200%201-1-1V7a1%201%200%200%201%201-1h5'%2F%3E%3C%2Fsvg%3E"); }
#copy { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Crect%20x%3D'9'%20y%3D'9'%20width%3D'11'%20height%3D'11'%20rx%3D'2'%2F%3E%3Cpath%20d%3D'M5%2015V6a2%202%200%200%201%202-2h9'%2F%3E%3C%2Fsvg%3E"); }
.btn.sm::before { width: 14px !important; height: 14px !important; }

/* empty lists */
.empty { padding: 52px 24px; }
.empty::before { width: 68px; height: 68px; border-radius: 22px; background-size: 32px; box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 6%, transparent); margin-bottom: 20px; }

/* small boxes inside pages */
.kv { border-radius: 16px; padding: 16px 18px; }
.notice { border-radius: 18px; }
pre.script { border-radius: 16px; padding: 18px; }
.todo > * { border-radius: 14px; }
.switch { border-radius: 16px; }
.period span { border-radius: 18px; }

/* pop-ups: a close button, and room for it beside the title */
.modal-frame { position: relative; width: 100%; max-width: 560px; }
.modal-frame:has(.modal-box.wide) { max-width: 780px; }
.modal-frame .modal-box, .modal-frame .modal-box.wide { max-width: none; border-radius: 24px; padding: 28px; }
.modal-x { position: absolute; top: 16px; right: 16px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; border: 0;
  background: var(--soft); color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer; transition: background .15s, color .15s; }
.modal-x:hover { background: var(--danger-soft); color: var(--danger); }
.modal-box > h2:first-child { padding-right: 40px; margin-bottom: 14px; }

@media (max-width: 820px) {
  .card-pad { padding: 18px 16px; }
  .card > .card-pad:first-child:has(+ .table-wrap), .card > .card-pad:first-child:has(+ .empty) { padding: 14px 16px; }
  .filters { padding: 12px 16px; }
  td, td.num { padding: 0; }
  .stat { grid-template-columns: 1fr; row-gap: 10px; padding: 16px; }
  .stat .ico { grid-row: auto; width: 42px; height: 42px; border-radius: 13px; }
  .stat .ico svg.i { width: 21px; height: 21px; }
  .stat .v { font-size: 1.6rem; }
  .nav-h { grid-column: 1 / -1; margin: 8px 0 0; padding: 0 4px; }
  .side.open nav a { padding: 9px 10px; }
  .page-ico { width: 44px; height: 44px; border-radius: 14px; }
  .page-ico svg.i { width: 22px; height: 22px; }
  .modal-frame, .modal-frame:has(.modal-box.wide) { max-width: none; align-self: end; }
  .modal-frame .modal-box, .modal-frame .modal-box.wide { border-radius: 24px 24px 0 0; padding: 22px 16px; }
}

/* printed voucher sheet */
.print-sheet { display: none; }
@media print {
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 8px; color: #000; background: #fff; }
  .voucher { border: 1px dashed #888; border-radius: 8px; padding: 10px 12px; break-inside: avoid; font: 12px/1.35 system-ui, sans-serif; }
  .voucher .op { font-weight: 700; }
  .voucher .code { font: 700 18px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .12em; margin: 4px 0; }
}
