/* UnlilPay — design tokens, layouts and components. No external assets. */

:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f2f4f7;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff4ff;
  --primary-text: #1d4ed8;
  --good: #067647;
  --good-soft: #ecfdf3;
  --good-line: #abefc6;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --warn-line: #fedf89;
  --bad: #b42318;
  --bad-soft: #fef3f2;
  --bad-line: #fecdca;
  --neutral-soft: #f2f4f7;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .14), 0 4px 8px -4px rgba(16, 24, 40, .06);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: 248px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b0e14;
    --surface: #121722;
    --surface-2: #161c29;
    --surface-3: #1c2333;
    --border: #232b3b;
    --border-strong: #2f3a4f;
    --text: #e7eaf0;
    --text-2: #c2c9d6;
    --muted: #8b95a8;
    --primary: #4d8bff;
    --primary-hover: #6b9fff;
    --primary-soft: rgba(77, 139, 255, .14);
    --primary-text: #8fb4ff;
    --good: #47cd89;
    --good-soft: rgba(71, 205, 137, .12);
    --good-line: rgba(71, 205, 137, .3);
    --warn: #fdb022;
    --warn-soft: rgba(253, 176, 34, .12);
    --warn-line: rgba(253, 176, 34, .3);
    --bad: #f97066;
    --bad-soft: rgba(249, 112, 102, .12);
    --bad-line: rgba(249, 112, 102, .3);
    --neutral-soft: rgba(255, 255, 255, .06);
    --shadow-sm: none;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, .6);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; color: var(--text); line-height: 1.3; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.icon { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.break-all { word-break: break-all; }
.truncate { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 16px; align-content: start; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  font: 500 13.5px/1 var(--font); cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { color: var(--bad); border-color: var(--bad-line); }
.btn-danger:hover { background: var(--bad-soft); }
.btn-ghost { border-color: transparent; box-shadow: none; background: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; margin: 0; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--neutral-soft); color: var(--text-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.is-good { background: var(--good-soft); color: var(--good); }
.badge.is-warn { background: var(--warn-soft); color: var(--warn); }
.badge.is-bad { background: var(--bad-soft); color: var(--bad); }
.badge.is-neutral { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.tag .icon { width: 15px; height: 15px; color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2 { flex: 1; }
.card-head p { color: var(--muted); font-size: 13px; }
.card-body { padding: 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }

/* ---------- alerts ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: 13.5px;
}
.alert .icon { margin-top: 1px; }
.alert strong { display: block; color: var(--text); font-weight: 600; }
.alert.is-good { background: var(--good-soft); border-color: var(--good-line); }
.alert.is-good .icon { color: var(--good); }
.alert.is-warn { background: var(--warn-soft); border-color: var(--warn-line); }
.alert.is-warn .icon { color: var(--warn); }
.alert.is-bad { background: var(--bad-soft); border-color: var(--bad-line); }
.alert.is-bad .icon { color: var(--bad); }
.alert.is-info { background: var(--primary-soft); border-color: transparent; }
.alert.is-info .icon { color: var(--primary); }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field small, .hint { font-size: 12.5px; color: var(--muted); }
.input, input:not([type]), input[type=text], input[type=password], input[type=number], input[type=search], input[type=date], input[type=email], input[type=url], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: 14px var(--font); box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 120px; padding: 10px 12px; font: 12.5px/1.5 var(--mono); resize: vertical; }
select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[readonly] { background: var(--surface-2); color: var(--text-2); }
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--primary); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); background: var(--surface-2); padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .primary-cell { color: var(--text); font-weight: 500; }
.table .sub { display: block; font-size: 12px; color: var(--muted); }
.table .right, .table th.right { text-align: right; }
.cell-link { color: var(--text); font-weight: 500; }

/* ---------- key / value ---------- */
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 0; margin: 0; }
.kv dt, .kv dd { padding: 10px 0; border-bottom: 1px solid var(--border); margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { color: var(--text); word-break: break-all; }
.kv > :nth-last-child(-n + 2) { border-bottom: 0; }
.code-block { margin: 0; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-3); color: var(--text-2); overflow: auto; white-space: pre-wrap; word-break: break-all; }
.copy-field { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.copy-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 13px; }
.secret { font-family: var(--mono); font-size: 13px; word-break: break-all; padding: 12px; border-radius: var(--radius-sm); background: var(--warn-soft); border: 1px dashed var(--warn-line); color: var(--text); }

/* ---------- stats & charts ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 18px 20px; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { margin-top: 6px; font-size: 26px; font-weight: 650; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-note { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.chart { display: block; width: 100%; height: 180px; }
.chart rect { fill: var(--primary); opacity: .78; transition: opacity .15s; }
.chart rect:hover, .chart rect.is-today { opacity: 1; }
.chart rect.is-empty { fill: var(--border); opacity: 1; }
.chart line { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.share { display: grid; gap: 14px; }
.share-row { display: grid; gap: 6px; }
.share-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.share-head strong { font-weight: 500; color: var(--text); }
.bar { display: block; width: 100%; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar rect { fill: var(--primary); }

/* ---------- lists ---------- */
.feed { display: grid; }
.feed-item { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--primary); flex: none; }
.feed-item strong { display: block; font-weight: 500; font-size: 13.5px; }
.feed-item span { font-size: 12.5px; color: var(--muted); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 32px; height: 32px; margin-bottom: 8px; color: var(--border-strong); }
.empty h3 { margin-bottom: 4px; }
.steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--border); }
.steps li:last-child::before { display: none; }
.step-dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); color: var(--muted); flex: none; font-size: 12px; font-weight: 600; }
.steps li.done .step-dot { border-color: var(--good); background: var(--good); color: #fff; }
.steps li.done .step-dot .icon { width: 14px; height: 14px; }
.steps li.current .step-dot { border-color: var(--primary); color: var(--primary); }
.steps strong { display: block; font-size: 13.5px; font-weight: 600; }
.steps p { font-size: 13px; color: var(--muted); }

/* ---------- pager & toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.toolbar .field { min-width: 140px; }
.toolbar .field.grow { flex: 1; min-width: 220px; }
.search { position: relative; }
.search .icon { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; color: var(--muted); }
.search input { padding-left: 34px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

/* ---------- admin layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--primary); color: #fff; }
.brand-mark .icon { width: 20px; height: 20px; }
.brand-name { font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--muted); }
.nav { display: grid; gap: 2px; }
.nav-label { padding: 14px 10px 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--surface-3); text-decoration: none; }
.nav a.is-active { background: var(--primary-soft); color: var(--primary-text); }
.nav a .icon { color: var(--muted); }
.nav a.is-active .icon { color: var(--primary); }
.sidebar-foot { margin-top: auto; display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-weight: 600; }
.user strong { display: block; font-size: 13.5px; font-weight: 600; }
.user span { font-size: 12px; color: var(--muted); }
.sidebar-foot .btn { justify-content: flex-start; width: 100%; color: var(--text-2); font-weight: 500; padding: 0 10px; }
.main { min-width: 0; padding: 28px 32px 48px; }
.main-inner { max-width: 1200px; margin: 0 auto; display: grid; gap: 20px; }
.main-inner > *, .grid-2 > *, .grid-3 > *, .stack > *, .stats > * { min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; color: var(--muted); }
.crumb { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.crumb .icon { width: 14px; height: 14px; }

/* ---------- public site ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.site-header .brand { padding: 0; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a:not(.btn) { padding: 6px 10px; border-radius: 6px; color: var(--text-2); font-weight: 500; }
.site-nav a:not(.btn):hover { background: var(--surface-3); text-decoration: none; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.site-main { padding: 40px 0 64px; }
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 32px 0 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-size: 12.5px; font-weight: 500; }
.hero h1 { margin: 16px 0 14px; font-size: 44px; line-height: 1.12; letter-spacing: -.03em; font-weight: 700; }
.hero p.lead { font-size: 17px; color: var(--text-2); max-width: 560px; }
.hero .row { margin-top: 28px; }
.preview { padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.preview-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.preview-row:last-child { border-bottom: 0; }
.preview-amount { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature { padding: 20px; }
.feature .icon-box { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px; }
.feature h3 { margin-bottom: 6px; font-size: 15px; }
.feature p { color: var(--muted); font-size: 13.5px; }
.section-title { margin: 56px 0 20px; }
.section-title h2 { font-size: 22px; font-weight: 650; }
.section-title p { margin-top: 6px; color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.metric { padding: 18px 20px; }
.metric strong { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.metric span { color: var(--muted); font-size: 13px; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.doc-nav { position: sticky; top: 84px; display: grid; gap: 2px; }
.doc-nav a { padding: 6px 10px; border-radius: 6px; color: var(--text-2); font-size: 13.5px; }
.doc-nav a:hover { background: var(--surface-3); text-decoration: none; }
.doc-section { padding: 24px; scroll-margin-top: 84px; }
.doc-section h2 { font-size: 18px; margin-bottom: 8px; }
.doc-section p { color: var(--text-2); margin-bottom: 12px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 400px; padding: 32px; }
.auth-card .brand { justify-content: center; padding: 0 0 20px; }
.auth-card h1 { text-align: center; font-size: 20px; }
.auth-card .sub { text-align: center; color: var(--muted); margin: 6px 0 24px; }
.auth-foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- checkout ---------- */
.pay { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 40px 16px; }
.pay-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--text); font-weight: 650; }
.pay-card { width: 100%; max-width: 880px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.pay-summary { padding: 32px; background: var(--surface-2); border-right: 1px solid var(--border); }
.pay-summary .merchant { font-size: 13px; color: var(--muted); }
.pay-summary .subject { margin-top: 4px; font-size: 16px; font-weight: 600; }
.pay-amount { margin: 18px 0 24px; font-size: 38px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pay-panel { padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.pay-panel h2 { font-size: 17px; }
.method { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--primary); border-radius: var(--radius-sm); background: var(--primary-soft); }
.method .icon-box { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--primary); color: #fff; }
.method strong { display: block; }
.method span { font-size: 12.5px; color: var(--muted); }
.qr { display: grid; place-items: center; padding: 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border); }
.qr img { display: block; width: 220px; height: 220px; }
.pay-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.pay-foot { margin-top: 20px; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pay-foot .icon { width: 14px; height: 14px; }
.result { width: 100%; max-width: 460px; padding: 36px 32px; text-align: center; }
.result-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: var(--neutral-soft); color: var(--muted); }
.result-icon .icon { width: 28px; height: 28px; }
.result-icon.is-good { background: var(--good-soft); color: var(--good); }
.result-icon.is-bad { background: var(--bad-soft); color: var(--bad); }
.result-icon.is-warn { background: var(--warn-soft); color: var(--warn); }
.result h1 { font-size: 20px; }
.result p { margin-top: 8px; color: var(--muted); }
.result .row { justify-content: center; margin-top: 24px; }
.options { display: grid; gap: 10px; }
.option { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }
.option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.option input { accent-color: var(--primary); width: 16px; height: 16px; }
.option strong { display: block; font-weight: 600; }
.option small { color: var(--muted); }

fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain legend { padding: 0; margin-bottom: 8px; }
.centered { display: grid; place-items: center; padding: 24px 0; }

/* ---------- portal ---------- */
.portal-head { background: var(--surface); border-bottom: 1px solid var(--border); }
.portal-head .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stats, .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { padding: 0 6px 0 0; }
  .brand-sub, .nav-label { display: none; }
  .nav { display: flex; order: 3; width: 100%; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .nav a { flex: none; height: 32px; }
  .sidebar-foot { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; }
  .sidebar-foot .user { display: none; }
  .sidebar-foot .btn span { display: none; }
  .main { padding: 20px 16px 40px; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 8px; }
  .hero h1 { font-size: 32px; }
  .doc { grid-template-columns: 1fr; }
  .doc-nav { position: static; display: flex; flex-wrap: wrap; }
  .pay-card { grid-template-columns: 1fr; }
  .pay-summary { border-right: 0; border-bottom: 1px solid var(--border); }
  .grid-2, .form-grid, .metrics { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .stats, .features { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .site-nav a:not(.btn) { display: none; }
  .pay { padding: 20px 12px; }
  .pay-summary, .pay-panel, .auth-card { padding: 24px 20px; }
  .toolbar .field, .toolbar .field.grow { min-width: 0; flex: 1 1 100%; }
  .table th, .table td { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
