/* Futu 超市 · 代理后台 */

:root {
  color-scheme: light;
  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --line: #e4e8e6;
  --line-strong: #cfd6d2;
  --ink: #101815;
  --ink-2: #4a5651;
  --ink-3: #87938d;
  --brand: #0f9d76;
  --brand-ink: #0a7a5b;
  --brand-soft: #e4f5ef;
  --side: #0d1512;
  --side-2: #16211c;
  --side-ink: #b9c6bf;
  --amber: #a86a0a;
  --amber-soft: #fcf1d9;
  --red: #c2362f;
  --red-soft: #fdebe9;
  --blue: #2463c9;
  --blue-soft: #e7effc;
  --gray-soft: #eef1ef;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(13, 21, 18, 0.05);
  --shadow-pop: 0 12px 40px rgba(13, 21, 18, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--ink-3); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.boot { display: grid; place-items: center; height: 100dvh; color: var(--ink-3); }

/* ---------- 登录 ---------- */
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 15% -10%, #d9f0e7 0%, transparent 60%),
    radial-gradient(700px 500px at 110% 110%, #e3ece8 0%, transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 372px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px 26px;
  box-shadow: 0 20px 60px rgba(13, 21, 18, 0.08);
}
.login-card h1 { font-size: 21px; letter-spacing: 0.01em; margin-top: 16px; }
.login-card .sub { color: var(--ink-3); margin: 2px 0 22px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; height: 42px; margin-top: 6px; font-size: 15px; }
.login-card .foot { margin-top: 16px; font-size: 12.5px; color: var(--ink-3); text-align: center; line-height: 1.7; }
.login-card .foot a.disabled { color: var(--ink-3); pointer-events: none; text-decoration: none; }
.login-card .howto { margin: 0 0 18px; font-size: 13.5px; }
.login-card a.btn { display: grid; place-items: center; text-decoration: none; }
.code-input { font-family: var(--mono); font-size: 24px; letter-spacing: 0.42em; text-align: center; height: 50px; padding-left: 0.42em; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
}

/* ---------- 外壳 ---------- */
.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100dvh; }
.side {
  background: var(--side);
  color: var(--side-ink);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100dvh;
  padding: 16px 12px 12px;
  overflow-y: auto;
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: #fff; }
.side .brand .brand-mark { width: 30px; height: 30px; border-radius: 8px; font-size: 16px; }
.side .brand b { font-size: 15px; font-weight: 650; }
.side .brand small { display: block; font-size: 11.5px; color: #7f8f87; font-weight: 400; margin-top: -1px; }
.nav-group { font-size: 11.5px; color: #6f7f77; padding: 14px 10px 6px; letter-spacing: 0.06em; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 2px;
  border-radius: 8px; color: var(--side-ink);
}
.nav a:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav a.active { background: #1c2b25; color: #fff; }
.nav a.active svg { color: #4fd3aa; }
.nav a .count {
  margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px;
  background: #b7791f; color: #fff; font-size: 11.5px; text-align: center; line-height: 18px;
}
svg { width: 18px; height: 18px; flex: none; }
.nav svg, .btn svg { width: 17px; height: 17px; }
.topbar svg { width: 22px; height: 22px; }
.step .n svg { width: 14px; height: 14px; }
.side .who {
  margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid #1e2a25;
  display: flex; align-items: center; gap: 8px;
}
.side .who .name { color: #e7eeea; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .who .role { font-size: 11.5px; color: #7f8f87; }
.side .who button {
  margin-left: auto; background: none; border: 0; color: #8fa097; cursor: pointer;
  padding: 6px; border-radius: 6px; display: grid;
}
.side .who button:hover { background: var(--side-2); color: #fff; }

.main { min-width: 0; }
.topbar {
  display: none; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--side); color: #fff;
  position: sticky; top: 0; z-index: 20;
}
.topbar button { background: none; border: 0; color: #fff; padding: 6px; display: grid; cursor: pointer; }
.topbar b { font-weight: 600; }
.page { padding: 26px 30px 60px; max-width: 1180px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; font-weight: 650; letter-spacing: 0.01em; }
.page-head p { color: var(--ink-3); margin-top: 2px; font-size: 13.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.scrim { display: none; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 15px; font-weight: 620; }
.card-head .sub { color: var(--ink-3); font-size: 13px; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.grid > .card { margin-bottom: 0; }
.stack > * + * { margin-top: 16px; }

/* ---------- 指标块 ---------- */
.stat { padding: 16px 18px; }
.stat .label { color: var(--ink-2); font-size: 13px; }
.stat .value { font-size: 26px; font-weight: 650; letter-spacing: -0.01em; margin-top: 4px; line-height: 1.2; }
.stat .value small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.stat .foot { color: var(--ink-3); font-size: 12.5px; margin-top: 6px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.mini-stats > div { padding: 12px 18px; border-right: 1px solid var(--line); }
.mini-stats > div:last-child { border-right: 0; }
.mini-stats .label { color: var(--ink-3); font-size: 12.5px; }
.mini-stats .value { font-weight: 620; font-size: 15px; }

/* ---------- 按钮 / 表单 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  font-weight: 520; cursor: pointer; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--surface-2); border-color: #b9c2bd; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn.danger { color: var(--red); border-color: #e7c1be; }
.btn.danger:hover { background: var(--red-soft); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.link { border: 0; background: none; color: var(--brand-ink); padding: 0 4px; height: auto; }
.btn.link.danger { color: var(--red); }
.btn[disabled] { opacity: 0.55; cursor: default; pointer-events: none; }

.field { display: block; }
.field > span, .field > label { display: block; font-size: 13px; font-weight: 520; color: var(--ink-2); margin-bottom: 5px; }
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; line-height: 1.5; }
.input, select.input, textarea.input {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
textarea.input { height: auto; padding: 9px 11px; resize: vertical; min-height: 92px; line-height: 1.55; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 157, 118, 0.14); }
.input::placeholder { color: #a5aea9; }
.input.sm { height: 32px; padding: 0 9px; font-size: 13px; }
.input.num { text-align: right; }
.form { display: grid; gap: 15px; }
.form.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.with-suffix { position: relative; }
.with-suffix .input { padding-right: 34px; }
.with-suffix i { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--ink-3); font-size: 13px; pointer-events: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.chip:hover { border-color: var(--brand); color: var(--brand-ink); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 36px; height: 21px; border-radius: 12px; background: #c9d0cc; transition: background 0.15s; flex: none; position: relative; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(15px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.toolbar .input { width: auto; min-width: 120px; height: 34px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.toolbar .spacer { flex: 1; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 12px 11px; cursor: pointer; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 520; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--brand-ink); border-bottom-color: var(--brand); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-weight: 520; font-size: 12.5px; color: var(--ink-3);
  padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafcfb; }
.table th.right, .table td.right { text-align: right; }
.table td .sub { color: var(--ink-3); font-size: 12.5px; }
.table .title { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .act { white-space: nowrap; text-align: right; }
.table .act .btn + .btn { margin-left: 4px; }
.table tr.clickable { cursor: pointer; }
.table tr.dim td { color: var(--ink-3); }
.empty { padding: 44px 20px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink-2); font-weight: 560; margin-bottom: 4px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.pager .spacer { flex: 1; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 520; white-space: nowrap; background: var(--gray-soft); color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.badge.plain::before { display: none; }
.badge.green { background: var(--brand-soft); color: var(--brand-ink); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }

/* ---------- 提示条 ---------- */
.note { display: flex; gap: 10px; padding: 11px 14px; border-radius: 9px; background: var(--blue-soft); color: #1d4a94; font-size: 13.5px; margin-bottom: 16px; align-items: flex-start; }
.note.warn { background: var(--amber-soft); color: #7a4d05; }
.note.bad { background: var(--red-soft); color: #8f2823; }
.note.ok { background: var(--brand-soft); color: #0a6048; }
.note svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.note a { color: inherit; text-decoration: underline; }
.note .btn { margin-left: auto; flex: none; }

/* ---------- 开店步骤 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step { padding: 16px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.step:last-child { border-right: 0; }
.step .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 650; background: var(--gray-soft); color: var(--ink-2); margin-bottom: 4px; }
.step.done .n { background: var(--brand); color: #fff; }
.step b { font-weight: 600; }
.step p { color: var(--ink-3); font-size: 12.5px; flex: 1; }
.step a { font-size: 13px; margin-top: 6px; font-weight: 520; }
.step.done a { color: var(--ink-3); }

/* ---------- 图表 ---------- */
.viz { position: relative; padding: 14px 18px 6px; }
.viz svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz .grid-line { stroke: var(--line); stroke-width: 1; }
.viz .axis-text { fill: var(--ink-3); font-size: 11px; }
.viz .val-text { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.viz .bar { fill: var(--brand); transition: fill 0.1s; }
.viz .slot:hover .bar, .viz .slot:focus .bar { fill: var(--brand-ink); }
.viz .slot { outline: none; cursor: default; }
.viz .slot .hit { fill: transparent; }
.viz .slot:hover .hit, .viz .slot:focus-visible .hit { fill: rgba(16, 24, 21, 0.04); }
.viz-tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--ink); color: #fff; border-radius: 8px; padding: 8px 10px;
  font-size: 12.5px; line-height: 1.5; white-space: nowrap;
  transform: translate(-50%, -100%); box-shadow: var(--shadow-pop);
}
.viz-tip b { display: block; font-weight: 600; }
.viz-tip span { color: #b9c6bf; }
.rows { padding: 6px 18px 14px; }
.rows .row { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; }
.rows .row .meter { height: 6px; border-radius: 3px; background: var(--gray-soft); overflow: hidden; }
.rows .row .meter i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.rows .row .v { font-weight: 600; white-space: nowrap; }
.rows .row .v small { color: var(--ink-3); font-weight: 400; margin-left: 6px; }

/* ---------- 键值 ---------- */
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 9px 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; word-break: break-all; }
.codebox { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.copy { border: 0; background: none; color: var(--brand-ink); cursor: pointer; font-size: 12.5px; padding: 0 4px; }
.sep { height: 1px; background: var(--line); margin: 16px 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c2c9c5; margin-right: 6px; }
.dot.on { background: var(--brand); box-shadow: 0 0 0 3px rgba(15, 157, 118, 0.18); }
.dot.err { background: var(--red); }

/* ---------- 机器人预览 ---------- */
.botcard { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.botcard .avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 19px; flex: none; }
.botcard .meta b { font-size: 15.5px; display: block; }
.botcard .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 3px; flex: none; }
.price-grid { display: grid; gap: 8px; margin-top: 2px; }
.price-grid label { display: grid; grid-template-columns: 68px 130px auto minmax(0, 1fr); gap: 10px; align-items: center; }
.price-grid em { font-style: normal; color: var(--ink-2); font-size: 13px; }
.price-grid small { color: var(--ink-3); font-size: 12.5px; }
.price-grid.tiers label { grid-template-columns: 62px 150px 170px auto minmax(0, 1fr); }
.price-grid.tiers label.head b { font-weight: 550; font-size: 12.5px; color: var(--ink-2); }
.btn.ghost { border-color: transparent; background: none; color: var(--brand-ink); padding-left: 6px; padding-right: 6px; }
.btn.ghost:hover { background: var(--brand-soft); }
.quote-box { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 12px; background: var(--surface-2); }
.quote-box .label { color: var(--ink-3); font-size: 12.5px; }
.quote-box .big { font-size: 20px; margin: 4px 0 10px; letter-spacing: -0.01em; }
.quote-box .hint { color: var(--ink-3); font-size: 12px; margin-top: 8px; }
.table.compact th, .table.compact td { padding: 7px 10px; font-size: 13px; }
.form.cols .toggle-row.full, .form.cols .full { grid-column: 1 / -1; }
.toggle-row { display: flex; gap: 12px; align-items: flex-start; padding: 2px 0; }
.toggle-row .switch { margin-top: 2px; }
.toggle-row b { font-weight: 600; display: block; }
.toggle-row p { margin: 1px 0 0; color: var(--ink-3); font-size: 12.5px; }
.howto { counter-reset: step; display: grid; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.howto li { counter-increment: step; display: flex; gap: 10px; color: var(--ink-2); }
.howto li::before { content: counter(step); width: 21px; height: 21px; border-radius: 50%; background: var(--gray-soft); display: grid; place-items: center; font-size: 12px; font-weight: 650; flex: none; margin-top: 1px; }
.phone { background: #dfe7e3; border-radius: 14px; padding: 14px; }
.phone .bubble { background: #fff; border-radius: 12px 12px 12px 4px; padding: 10px 12px; font-size: 13.5px; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.phone .keys { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 6px; }
.phone .keys span { background: rgba(255,255,255,.72); border-radius: 7px; text-align: center; padding: 6px 4px; font-size: 12.5px; color: #25604c; }

/* ---------- 弹窗 / 提示 ---------- */
#modal-root:empty { display: none; }
.modal-back { position: fixed; inset: 0; background: rgba(13, 21, 18, 0.45); display: grid; place-items: center; padding: 20px; z-index: 50; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 460px; box-shadow: var(--shadow-pop); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px 12px; }
.modal-head h3 { font-size: 16px; font-weight: 640; }
.modal-head button { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--ink-3); padding: 4px; display: grid; border-radius: 6px; }
.modal-head button:hover { background: var(--gray-soft); color: var(--ink); }
.modal-body { padding: 4px 20px 18px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.modal h4 { font-size: 13px; color: var(--ink-3); font-weight: 520; margin: 18px 0 8px; }

#toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 9px; box-shadow: var(--shadow-pop); font-size: 13.5px; max-width: min(88vw, 480px); animation: pop 0.16s ease-out; }
.toast.bad { background: var(--red); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.split { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .topbar { display: flex; }
  .side { position: fixed; z-index: 40; width: 244px; left: 0; top: 0; transform: translateX(-102%); transition: transform 0.18s ease-out; }
  .nav-open .side { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(13, 21, 18, 0.45); z-index: 30; }
  .page { padding: 18px 14px 50px; }
  .grid.c2 { grid-template-columns: minmax(0, 1fr); }
  .form.cols { grid-template-columns: minmax(0, 1fr); }
  .price-grid label { grid-template-columns: 62px minmax(0, 1fr) auto; }
  .price-grid.tiers label { grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr); }
  .price-grid.tiers label .btn, .price-grid.tiers label.head i { display: none; }
  .price-grid small { grid-column: 1 / -1; }
  .stat .value { font-size: 22px; }
  .card-body { padding: 14px; }
  .card-head, .toolbar { padding-left: 14px; padding-right: 14px; }
  .page-head .actions { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
  .mini-stats { grid-template-columns: minmax(0, 1fr); }
  .mini-stats > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .mini-stats > div:last-child { border-bottom: 0; }
  .kv { grid-template-columns: 80px minmax(0, 1fr); }
}
