/* Zabt licence panel — dark first, mint accent (Zabt brand: mint #12C48B on ink). */
:root {
  --mint: #12C48B;
  --mint-hover: #0A8A63;
  --mint-soft: rgba(18, 196, 139, .14);
  --ink: #062b1f;
  --gold: #E6B54A;
  --gold-soft: rgba(230, 181, 74, .15);
  --bg: #07090a;
  --surface: #101413;
  --surface-2: #161c1a;
  --text: #EEF3F1;
  --muted: #8E9A96;
  --border: #232b28;
  --border-strong: #2f3935;
  --danger: #F1707B;
  --danger-soft: rgba(241, 112, 123, .14);
  --warn: #E0B84A;
  --warn-soft: rgba(224, 184, 74, .14);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px rgba(0, 0, 0, .35);
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --mint-hover: #0A8A63;
    --mint-soft: rgba(18, 196, 139, .13);
    --gold: #9A6B00;
    --gold-soft: rgba(196, 140, 20, .13);
    --bg: #F2F5F3;
    --surface: #ffffff;
    --surface-2: #F7F9F8;
    --text: #0D1210;
    --muted: #5B6864;
    --border: #DDE3E0;
    --border-strong: #C9D1CD;
    --danger: #C4314B;
    --danger-soft: rgba(196, 49, 75, .1);
    --warn: #8F6300;
    --warn-soft: rgba(184, 134, 11, .13);
    --shadow: 0 1px 2px rgba(13, 18, 16, .05), 0 8px 24px rgba(13, 18, 16, .06);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.glow {
  position: fixed; inset: -30vh -20vw auto; height: 70vh; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(18, 196, 139, .16), transparent 70%);
}
.top, main { position: relative; z-index: 1; }
.top { z-index: 10; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 13px; }
.error { color: var(--danger); min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }
.error:empty { min-height: 0; margin: 0; }
code { font-family: var(--mono); font-size: 12.5px; padding: 1px 5px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }
.mono { font-family: var(--mono); letter-spacing: .02em; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }

/* ------------------------------------------------------------ header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.brand-text { color: var(--muted); }
.brand-text b { color: var(--text); font-weight: 750; }
.mark {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(145deg, #2BE0A6, var(--mint) 55%, var(--mint-hover));
  color: var(--ink); font-size: 19px; font-weight: 800;
  box-shadow: 0 6px 18px rgba(18, 196, 139, .35);
}
.mark.big { width: 56px; height: 56px; border-radius: 16px; font-size: 32px; margin-bottom: 18px; }
.live {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px;
  font-size: 12px; color: var(--mint); background: var(--mint-soft); font-weight: 600;
}
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

main { max-width: 1240px; margin: 0 auto; padding: 24px 16px 64px; }

/* ------------------------------------------------------------ controls */
input, textarea, button, select { font: inherit; color: inherit; }
input, textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface-2); transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--muted); opacity: .7; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
textarea { font-size: 12.5px; word-break: break-all; resize: vertical; line-height: 1.55; }
input[type=date] { color-scheme: inherit; }

button {
  padding: 9px 16px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer;
  background: var(--surface-2); color: var(--text); font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .06s;
}
button:hover { border-color: var(--mint); }
button:active { transform: translateY(1px); }
button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--mint-soft); border-color: var(--mint); }
button:disabled { opacity: .55; cursor: wait; }
button.primary { background: var(--mint); border-color: var(--mint); color: var(--ink); }
button.primary:hover { background: #2BD99C; border-color: #2BD99C; }
button.ghost { background: transparent; }
button.icon { width: 40px; padding: 9px 0; font-size: 17px; line-height: 1; }
button.wide { width: 100%; padding: 12px; font-size: 15px; }
button.sm { padding: 5px 10px; font-size: 13px; font-weight: 550; border-radius: 8px; }
button.danger { background: transparent; color: var(--danger); }
button.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
button.gold { background: transparent; color: var(--gold); }
button.gold:hover { border-color: var(--gold); background: var(--gold-soft); }
button.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
button.danger-fill:hover { filter: brightness(1.08); background: var(--danger); border-color: var(--danger); }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

/* ------------------------------------------------------------ login */
.login { display: grid; place-items: center; min-height: calc(100vh - 140px); }
.login-card {
  width: 100%; max-width: 420px; padding: 36px 32px 28px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow);
}
.login-card h1 { font-size: 24px; margin-bottom: 6px; }
.login-card > p { margin: 0 0 22px; font-size: 14px; }
#loginForm { display: flex; flex-direction: column; gap: 10px; }
#loginForm button { padding: 11px; }

/* ------------------------------------------------------------ cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; }
.cols > .card { margin-bottom: 20px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start;
  padding: 14px 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); font-weight: 400;
}
.stat .n { font-size: 28px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .l { font-size: 12.5px; color: var(--muted); }
.stat.ok .n { color: var(--mint); }
.stat.life .n { color: var(--gold); }
.stat.warn .n { color: var(--warn); }
.stat.bad .n { color: var(--danger); }
.stat .n.zero { color: var(--muted); }
.stat.on { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }

/* fields */
#issueForm { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field em { font-style: normal; font-weight: 400; opacity: .75; }
.field small { font-size: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* plan picker */
.plans { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plans legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 6px; }
.plan { position: relative; cursor: pointer; }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan-body {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.plan-body b { font-size: 14.5px; }
.plan-body small { font-size: 12px; color: var(--muted); }
.plan:hover .plan-body { border-color: var(--muted); }
.plan input:checked + .plan-body { border-color: var(--mint); background: var(--mint-soft); box-shadow: 0 0 0 1px var(--mint) inset; }
.plan input:focus-visible + .plan-body { box-shadow: 0 0 0 3px var(--mint-soft); }
.plan.lifetime input:checked + .plan-body { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 1px var(--gold) inset; }
.plan.lifetime b { color: var(--gold); }
.inf { font-size: 17px; line-height: 0; }

/* result */
.result { display: flex; flex-direction: column; }
.result #resultBody { display: flex; flex-direction: column; gap: 12px; }
.result #resultBody .card-head { margin-bottom: 0; }
.placeholder {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 220px; border: 1.5px dashed var(--border-strong); border-radius: 12px; color: var(--text); padding: 20px;
}
.placeholder p { margin: 8px 0 0; font-size: 14px; }
.key-ico { font-size: 34px; color: var(--mint); opacity: .8; }
.result.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(18, 196, 139, .55); } 100% { box-shadow: 0 0 0 14px rgba(18, 196, 139, 0); } }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 13.5px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }

/* badges / pills */
.badge, .pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 650; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok, .badge.year { background: var(--mint-soft); color: var(--mint); }
.pill.revoked { background: var(--danger-soft); color: var(--danger); }
.pill.ended, .pill.soon { background: var(--warn-soft); color: var(--warn); }
.badge.life { background: var(--gold-soft); color: var(--gold); }
.badge.plain { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

/* ------------------------------------------------------------ list */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
#search { width: 260px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chips button {
  padding: 5px 12px; font-size: 13px; font-weight: 550; border-radius: 99px;
  background: transparent; color: var(--muted);
}
.chips button.on { background: var(--mint-soft); color: var(--mint); border-color: var(--mint); }

.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: start; padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 550; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.is-revoked td:not(.actions) { opacity: .55; }
td.id { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
td .sub { color: var(--muted); font-size: 12.5px; }
td.num { font-variant-numeric: tabular-nums; }
td.pcs-warn { color: var(--danger); font-weight: 750; }
td.actions .row { flex-wrap: nowrap; justify-content: flex-end; }
td.actions .row { gap: 6px; }
td.actions button.sm { padding: 5px 9px; }
.empty-list { text-align: center; color: var(--muted); padding: 28px 0; margin: 0; }

/* ------------------------------------------------------------ dialog + toast */
dialog {
  width: min(440px, calc(100vw - 32px)); padding: 24px; border-radius: 16px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
}
dialog::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); }
dialog h3 { font-size: 18px; margin-bottom: 6px; }
dialog p { margin: 0 0 16px; font-size: 14px; white-space: pre-line; }
dialog .field { margin-bottom: 16px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 20px);
  padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  background: var(--text); color: var(--bg); box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); color: #fff; }

/* ------------------------------------------------------------ tabs + customers (T68) */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-size: 15px; color: var(--muted); }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.tabs button .muted { font-size: 13px; }

.cust-hint { font-size: 13px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--muted); }
.cust-hint.existing { border-style: solid; border-color: var(--mint); background: var(--mint-soft); color: var(--mint); font-weight: 600; }

.who-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shops-chip {
  padding: 1px 8px; font-size: 11.5px; font-weight: 650; border-radius: 99px;
  background: var(--mint-soft); color: var(--mint); border-color: transparent;
}
.shops-chip:hover { border-color: var(--mint); }

.cust-list { display: flex; flex-direction: column; gap: 10px; }
.cust { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); transition: border-color .15s; }
.cust.open { border-color: var(--border-strong); }
.cust-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 14px; }
.cust-toggle {
  display: flex; align-items: center; gap: 12px; min-width: 0; text-align: start;
  background: transparent; border: 0; padding: 0; font-weight: 400;
}
.cust-toggle:hover { border: 0; }
.avatar {
  flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--mint-soft); color: var(--mint); font-weight: 750; font-size: 17px;
}
.cust-title { display: flex; flex-direction: column; min-width: 0; }
.cust-title b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-title small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--muted); font-size: 20px; transition: transform .15s; margin-inline-start: 4px; }
.cust.open .chev { transform: rotate(90deg); }
.cust-stats { display: flex; gap: 18px; }
.cstat { display: flex; flex-direction: column; align-items: center; min-width: 44px; }
.cstat b { font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.cstat span { font-size: 11.5px; color: var(--muted); }
.cstat.ok b { color: var(--mint); }
.cstat.life b { color: var(--gold); }
.cust-acts { flex-wrap: nowrap; }
.cust-shops { border-top: 1px solid var(--border); padding: 6px 14px 10px; }
.shop-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.shop-row:last-child { border-bottom: 0; }
.shop-row.is-revoked .shop-info, .shop-row.is-revoked .shop-meta { opacity: .55; }
.shop-info { display: flex; flex-direction: column; min-width: 0; }
.shop-info b { font-weight: 600; }
.shop-info .sub, .shop-meta .sub { color: var(--muted); font-size: 12.5px; }
.shop-meta { flex-wrap: nowrap; }

@media (max-width: 760px) {
  .tabs { width: 100%; }
  .tabs button { flex: 1; }
  .cust-head { grid-template-columns: 1fr; gap: 10px; }
  .cust-stats { justify-content: space-between; }
  .shop-row { grid-template-columns: 1fr; gap: 6px; }
  .shop-meta { flex-wrap: wrap; }
}

/* ------------------------------------------------------------ billing (T69) */
select { appearance: none; cursor: pointer; padding-inline-end: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type=number] { font-variant-numeric: tabular-nums; }

.money {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; position: relative;
}
.money-item {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 18px 18px; text-align: start;
  background: transparent; border: 0; border-radius: 0; font-weight: 400;
}
.money-item + .money-item { border-inline-start: 1px solid var(--border); }
.money-item .l { font-size: 12.5px; color: var(--muted); }
.money-item .l b { color: var(--text); }
.money-item .n { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.money-item.owed:hover { background: var(--surface-2); border-color: transparent; }
.money-item.owed.on { background: var(--danger-soft); }
.n.ok, b.ok { color: var(--mint); }
.n.bad, b.bad { color: var(--danger); }
.n.zero { color: var(--muted); }
.money-bar { height: 4px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.money > .money-bar { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 0; }
.money-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint-hover), var(--mint)); transition: width .4s; }

.billing { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px 14px; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px 12px; align-items: end; }
.billing legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 6px; }
.billing legend em { font-style: normal; font-weight: 400; opacity: .75; }
.billing .full-btn { grid-column: 1 / -1; justify-self: start; }

.pill.pay.paid { background: var(--mint-soft); color: var(--mint); }
.pill.pay.partial { background: var(--warn-soft); color: var(--warn); }
.pill.pay.unpaid { background: var(--danger-soft); color: var(--danger); }
.pill.pay.none { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.pay-btn {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 4px 6px; margin: -4px -6px; background: transparent; border: 1px solid transparent; font-weight: 400;
}
.pay-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.pay-btn .sub { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cstat.bad b { color: var(--danger); }

.dlg-money { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; margin-bottom: 16px; }

dialog.wide { width: min(620px, calc(100vw - 32px)); }
.pay-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pay-head p { margin: 2px 0 14px; }
.pay-sum { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; align-items: end; margin-bottom: 10px; }
.pay-sum > div { display: flex; flex-direction: column; }
.pay-sum .l { font-size: 12.5px; color: var(--muted); }
.pay-sum b { font-size: 20px; font-variant-numeric: tabular-nums; }
.pay-price { display: flex; gap: 8px; align-items: flex-end; }
.pay-price .field { flex: 1; margin: 0; }
.pay-form { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 10px 12px; margin: 18px 0 0; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.pay-form .grow { grid-column: 1 / -1; }
dialog .pay-form .field { margin: 0; }
.pay-btns { grid-column: 1 / -1; }
.pay-h { margin: 18px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pay-list { max-height: 240px; overflow-y: auto; }
.pay-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.pay-row:last-child { border-bottom: 0; }
.pay-info { display: flex; flex-direction: column; min-width: 0; }
.pay-info b { font-variant-numeric: tabular-nums; }
.pay-info .sub { color: var(--muted); font-size: 12.5px; }

@media (max-width: 760px) {
  .money { grid-template-columns: 1fr; }
  .money-item + .money-item { border-inline-start: 0; border-top: 1px solid var(--border); }
  .money-item { flex-direction: row; justify-content: space-between; align-items: baseline; padding: 10px 14px; }
  .money-item .n { font-size: 18px; }
  .billing, .dlg-money, .pay-form { grid-template-columns: 1fr 1fr; }
  .billing label:nth-of-type(3), .dlg-money label:nth-of-type(3) { grid-column: 1 / -1; }
  .pay-sum { grid-template-columns: 1fr 1fr; }
  .pay-price { grid-column: 1 / -1; }
  td.pay-cell .pay-btn { align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  main { padding-top: 16px; }
  .card { padding: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat .n { font-size: 24px; }
  .two, .plans { grid-template-columns: 1fr; }
  .list-head { flex-direction: column; align-items: stretch; }
  .list-head .row { flex-wrap: nowrap; }
  #search { width: 100%; flex: 1; }
  .brand-text { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 0 16px; }

  /* table → stacked cards */
  .table-wrap { margin: 0; padding: 0; overflow: visible; }
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tbody tr { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--surface-2); }
  td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: end; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: start; flex-shrink: 0; }
  td.who { flex-direction: column; text-align: start; gap: 0; padding-bottom: 6px; font-weight: 650; }
  td.who::before { display: none; }
  td.id { order: -1; }
  td.actions { padding-top: 10px; }
  td.actions::before { display: none; }
  td.actions .row { flex-wrap: wrap; justify-content: flex-start; width: 100%; }
}
