/* Sbscrbr dashboard (design 25). Same look as the hosted pages; no external fonts or scripts. */
:root {
  --accent: #3b4fd8;
  --accent-soft: #eef0fd;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --soft: #374151;
  --line: #e5e7eb;
  --field: #d1d5db;
  --ok: #047857;
  --ok-bg: #d1fae5;
  --warn: #92400e;
  --warn-bg: #fef3c7;
  --bad: #b91c1c;
  --bad-bg: #fee2e2;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.06), 0 8px 24px rgba(17, 24, 39, 0.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
input, select, button, textarea { font: inherit; color: inherit; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* top bar */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-inner { width: 100%; padding: 10px 32px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.logo span.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.projects { display: flex; gap: 4px; flex-wrap: wrap; }
.projects a { padding: 4px 10px; border-radius: 8px; color: var(--soft); }
.projects a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.spacer { flex: 1; }
.envs { display: inline-flex; border: 1px solid var(--field); border-radius: 8px; overflow: hidden; }
.envs a { padding: 4px 12px; color: var(--soft); }
.envs a.on.test { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.envs a.on.live { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.who { color: var(--muted); font-size: 13px; }
.link-button { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }
.link-button:hover { text-decoration: underline; }

/* layout */
.layout { width: 100%; padding: 24px 32px; display: flex; gap: 24px; align-items: flex-start; }
.nav { flex: 0 0 180px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; }
.nav a { padding: 7px 10px; border-radius: 8px; color: var(--soft); }
.nav a.on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.breadcrumb ol { list-style: none; margin: 0 0 -8px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "›"; color: var(--field); font-weight: 600; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 500; }
.head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.head .sub { color: var(--muted); }
.card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-top: 2px; }
.stat .hint { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 700; border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* pills and messages */
.pill { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: #065f46; }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.muted { background: var(--line); color: var(--soft); }
.msg { border-radius: 10px; padding: 12px 14px; }
.msg.error { background: var(--bad-bg); color: var(--bad); }
.msg.ok { background: var(--ok-bg); color: #065f46; }
.msg.info { background: var(--accent-soft); color: var(--text); }
.secret-box { background: var(--warn-bg); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.secret-box code { font-size: 14px; word-break: break-all; background: #fff; padding: 8px 10px; border-radius: 8px; user-select: all; }

/* forms */
form.inline { display: inline; }
.form { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; }
.field label { font-weight: 600; font-size: 13px; }
.field .help { color: var(--muted); font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], select, textarea { border: 1px solid var(--field); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.05); }
.btn.secondary { background: #fff; color: var(--soft); border: 1px solid var(--field); }
.btn.danger { background: #fff; color: var(--bad); border: 1px solid #fca5a5; }
.btn.small { padding: 4px 10px; font-size: 13px; font-weight: 500; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li { display: flex; gap: 8px; align-items: center; }
.tick { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.tick.yes { background: var(--ok-bg); color: var(--ok); }
.tick.no { background: var(--line); color: var(--muted); }

/* login and setup */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth .card { width: 100%; max-width: 420px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.auth.wide .card { max-width: 560px; }
.qr { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr svg { border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; }

@media (max-width: 760px) {
  .layout { flex-direction: column; align-items: stretch; padding: 16px; }
  .nav { position: static; flex-direction: row; flex-wrap: wrap; flex-basis: auto; }
  .top-inner { padding: 10px 16px; }
}
.gap { margin-top: 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.head .spacer { flex: 1; }
.form > .field { flex: none; }
.row.align-top { align-items: flex-start; }
.qr { flex-wrap: nowrap; }
.qr svg { width: 220px; height: 220px; flex: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.qr > div { flex: 1 1 auto; }
.qr p { margin: 0 0 8px; }
.nowrap { white-space: nowrap; }
fieldset.card { border: 0; margin: 0; min-width: 0; }
fieldset.plain-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] { opacity: 0.85; }
.top-note { margin: -6px 0 12px; }
.checks { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
label.check { display: flex; gap: 8px; align-items: flex-start; }
label.check input { margin-top: 3px; }
label.check .help { display: block; color: var(--muted); font-size: 12px; }
.field .label { font-weight: 600; font-size: 13px; }
input[type=number] { border: 1px solid var(--field); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; }
.sub-h { font-size: 14px; margin: 20px 0 10px; }
details summary { cursor: pointer; color: var(--accent); font-weight: 600; }
