:root {
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --ink: #0d1726;
  --ink-soft: #334155;
  --muted: #68778a;
  --line: #e2e7ed;
  --line-strong: #cbd4df;
  --accent: #0c8f6c;
  --accent-strong: #086d52;
  --accent-soft: #e4f5ef;
  --navy: #0b1220;
  --navy-soft: #121c2e;
  --warn: #a15c08;
  --warn-soft: #fdf3e3;
  --danger: #b43838;
  --danger-soft: #fbecec;
  --info: #2d5f93;
  --info-soft: #eaf1f8;
  --violet: #6651b8;
  --violet-soft: #efebfa;
  --shadow-sm: 0 1px 2px rgba(13, 23, 38, .05);
  --shadow: 0 1px 2px rgba(13, 23, 38, .04), 0 16px 40px rgba(13, 23, 38, .07);
  --radius: 16px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
.noscript { padding: 40px; text-align: center; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- login ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(420px, .95fr);
  background: #f7f9fb;
}
.login-art {
  position: relative;
  overflow: hidden;
  padding: 52px;
  color: #eaf2ef;
  background:
    radial-gradient(900px 600px at 10% 0%, rgba(87, 223, 176, .22), transparent 62%),
    radial-gradient(700px 500px at 90% 100%, rgba(80, 131, 209, .16), transparent 60%),
    linear-gradient(145deg, #07111f 0%, #0b1a2a 52%, #102438 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000 10%, transparent 92%);
  pointer-events: none;
}
.login-art > * { position: relative; z-index: 1; }
.art-brand { display: flex; align-items: center; gap: 12px; }
.art-brand .mark { width: 38px; height: 38px; }
.art-brand strong { font-size: 17px; letter-spacing: -.02em; }
.art-brand span { color: #8ca3b5; font-size: 12px; margin-left: 4px; }
.art-copy { max-width: 520px; margin: 56px 0; }
.art-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid rgba(138, 240, 204, .24);
  border-radius: 999px; color: #8af0cc; background: rgba(18, 53, 44, .5);
  font-size: 11px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase;
}
.art-copy h1 { margin: 26px 0 18px; font-size: clamp(34px, 4vw, 54px); line-height: 1.04; letter-spacing: -.045em; }
.art-copy h1 em { color: #57dfb0; font-style: normal; }
.art-copy p { margin: 0; max-width: 440px; color: #9fb3c2; font-size: 15px; line-height: 1.75; }
.art-features { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.art-feature {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 10px;
  background: rgba(255, 255, 255, .035); color: #c1d1dc; font-size: 12px;
}
.art-feature svg { color: #57dfb0; }
.art-foot { display: flex; align-items: center; gap: 10px; color: #71879a; font-size: 11px; letter-spacing: .02em; }
.art-dot { width: 7px; height: 7px; border-radius: 50%; background: #57dfb0; box-shadow: 0 0 0 4px rgba(87, 223, 176, .12); }
.login-panel {
  display: flex; align-items: center; justify-content: center; padding: 44px 32px;
}
.login-card { width: min(400px, 100%); }
.login-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 30px; font-size: 15px; font-weight: 700; }
.login-card h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.035em; }
.login-card > p { margin: 0 0 28px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.login-form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field > label { font-size: 12px; font-weight: 650; color: var(--ink-soft); }
.field-hint { font-size: 11px; color: var(--muted); line-height: 1.45; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input-icon {
  position: absolute; left: 12px; color: #8b98a8; display: grid; place-items: center; pointer-events: none;
}
.input-wrap input { padding-left: 38px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 9px;
  background: #fff; color: var(--ink); padding: 11px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s; font-size: 14px;
}
input[type="checkbox"], input[type="radio"] {
  width: 16px; height: 16px; padding: 0; margin: 0; border: 0;
  border-radius: 4px; accent-color: var(--accent); flex: none;
}
.check-field {
  display: flex; align-items: center; gap: 8px; min-height: 38px;
  font-size: 12px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
}
.check-field span { line-height: 1.2; }
input::placeholder, textarea::placeholder { color: #9aa6b4; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(12, 143, 108, .12);
}
input:disabled, select:disabled, textarea:disabled { background: #f1f4f7; color: var(--muted); }
textarea { resize: vertical; min-height: 84px; }
.otp-input { letter-spacing: .42em; font-family: var(--mono); font-size: 19px; text-align: center; padding-left: 12px !important; }
.login-error {
  display: flex; gap: 9px; align-items: flex-start; padding: 11px 12px; border-radius: 9px;
  background: var(--danger-soft); border: 1px solid #f1cfcf; color: #8f2929; font-size: 12px; line-height: 1.5;
}
.login-error svg { flex: none; margin-top: 1px; }
.login-note {
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; gap: 9px; color: var(--muted); font-size: 11px; line-height: 1.6;
}
.login-note svg { flex: none; color: #8b98a8; }
.login-help { margin-top: 22px; color: #94a1b0; font-size: 11px; text-align: center; }

/* ---------- shell ---------- */
.admin-shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 242px; flex: none; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0b1220, #0d1727);
  color: #dce6ef; border-right: 1px solid #1b293e;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 22px 20px 18px; }
.sidebar-brand .mark { width: 32px; height: 32px; flex: none; }
.sidebar-brand strong { display: block; font-size: 14px; letter-spacing: -.02em; }
.sidebar-brand small { display: block; margin-top: 2px; color: #6f8499; font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.sidebar-env {
  margin: 4px 14px 18px; padding: 9px 11px; border-radius: 9px;
  border: 1px solid #1e2e46; background: #101b2c;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; color: #8fa2b5;
}
.sidebar-env b { color: #8af0cc; font-weight: 650; display: inline-flex; align-items: center; gap: 6px; }
.sidebar-env .status-dot { width: 6px; height: 6px; border-radius: 50%; background: #57dfb0; box-shadow: 0 0 0 3px rgba(87,223,176,.12); }
.sidebar-nav { display: grid; gap: 3px; padding: 0 12px; overflow-y: auto; }
.nav-label { padding: 14px 10px 7px; color: #5e7288; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px;
  border: 0; border-radius: 8px; background: transparent; color: #9fb1c3;
  font-size: 13px; text-align: left; transition: background .15s, color .15s;
}
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-item:hover { background: #142135; color: #e8eff6; text-decoration: none; }
.nav-item.active { background: #17352f; color: #8af0cc; }
.nav-item.active svg { opacity: 1; }
.nav-item .nav-count {
  margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px;
  background: #1d2b40; color: #8fa2b5; font-size: 10px; text-align: center;
}
.nav-item.active .nav-count { background: #1f5142; color: #a5f3d4; }
.sidebar-foot { margin-top: auto; padding: 14px 14px 18px; }
.sidebar-user {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px;
  border: 1px solid #1b293e; background: #0f1929;
}
.avatar {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center; background: #17352f; color: #8af0cc;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.sidebar-user .who { min-width: 0; flex: 1; }
.sidebar-user .who b { display: block; font-size: 12px; color: #e3ebf2; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .who span { display: block; margin-top: 2px; color: #6f8499; font-size: 10px; }
.icon-btn {
  width: 34px; height: 34px; flex: none; display: inline-grid; place-items: center;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: inherit;
}
.icon-btn:hover { background: rgba(127, 146, 166, .14); }
.sidebar-user .icon-btn { color: #7f93a8; width: 28px; height: 28px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  min-height: 68px; padding: 14px 32px; display: flex; align-items: center;
  justify-content: space-between; gap: 20px; background: rgba(243,245,248,.88);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
}
.topbar-title h1 { margin: 0; font-size: 17px; letter-spacing: -.025em; font-weight: 680; }
.topbar-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-clock { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.topbar-account { display: none; align-items: center; gap: 8px; }
.topbar-account .avatar { width: 28px; height: 28px; border-radius: 8px; font-size: 10px; }
.topbar-account-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.topbar-account .icon-btn { width: 30px; height: 30px; border: 0; color: var(--muted); }
.topbar-account .icon-btn:hover { background: #e8edf2; color: var(--ink); }
.view { padding: 28px 32px 64px; width: min(1420px, 100%); margin: 0 auto; }

/* ---------- primitives ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 19px 20px 0; }
.card-head h2, .card-head h3 { margin: 0; font-size: 14px; letter-spacing: -.01em; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.card-body { padding: 18px 20px 20px; }
.card-pad { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-soft); border-radius: 0 0 var(--radius) var(--radius); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.section-head h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split-main { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 8px 13px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-soft);
  font-size: 12px; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { background: #f7f9fb; border-color: #b7c2cf; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-dark:hover { background: #162237; border-color: #162237; }
.btn-danger { color: var(--danger); border-color: #eccaca; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: #dfb1b1; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef2f6; color: var(--ink); }
.btn-sm { min-height: 30px; padding: 5px 10px; font-size: 11px; border-radius: 7px; }
.btn-lg { min-height: 44px; padding: 11px 18px; font-size: 13px; }
.btn-block { width: 100%; }
.btn .spinner { width: 14px; height: 14px; border-width: 2px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px;
  border-radius: 999px; font-size: 10px; font-weight: 650; line-height: 1.5;
  background: #eef2f6; color: #5d6b7c; white-space: nowrap;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill-green { background: var(--accent-soft); color: var(--accent-strong); }
.pill-amber { background: var(--warn-soft); color: var(--warn); }
.pill-red { background: var(--danger-soft); color: var(--danger); }
.pill-blue { background: var(--info-soft); color: var(--info); }
.pill-violet { background: var(--violet-soft); color: var(--violet); }
.pill-plain { background: #f1f4f7; color: var(--muted); }
.pill-plain::before { display: none; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.status-dot.green { background: var(--accent); box-shadow: 0 0 0 3px rgba(12,143,108,.12); }
.status-dot.amber { background: #d1891c; box-shadow: 0 0 0 3px rgba(209,137,28,.12); }
.status-dot.red { background: var(--danger); box-shadow: 0 0 0 3px rgba(180,56,56,.1); }

.stat { padding: 18px 19px; position: relative; overflow: hidden; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.stat-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #f1f5f8; color: #5d6c7e; }
.stat-icon.green { background: var(--accent-soft); color: var(--accent-strong); }
.stat-icon.blue { background: var(--info-soft); color: var(--info); }
.stat-icon.amber { background: var(--warn-soft); color: var(--warn); }
.stat-icon.red { background: var(--danger-soft); color: var(--danger); }
.stat-icon.violet { background: var(--violet-soft); color: var(--violet); }
.stat-value { margin-top: 14px; font-size: 30px; line-height: 1; font-weight: 680; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-hint { margin-top: 8px; color: var(--muted); font-size: 10px; }
.stat-hint b { color: var(--ink-soft); font-weight: 600; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 12px; }
/* The merchant table now carries country, currency, rate, markup and timezone
   alongside the operational columns. Give it a floor so the wrapper scrolls
   horizontally instead of squeezing values into wrapped, unreadable cells. */
table.data.merchants { min-width: 1280px; }
table.data.merchants th.col-country,
table.data.merchants th.col-currency,
table.data.merchants th.col-rate,
table.data.merchants th.col-markup,
table.data.merchants th.col-timezone { white-space: nowrap; }
table.data th {
  padding: 10px 14px; text-align: left; color: #778596; background: var(--surface-soft);
  border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #fafbfd; }
table.data tbody tr.clickable { cursor: pointer; }
table.data .cell-main { font-weight: 600; color: var(--ink); }
table.data .cell-sub { margin-top: 3px; color: var(--muted); font-size: 10px; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.amount { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.mono-sm { font-family: var(--mono); font-size: 10px; color: var(--muted); }

.empty { padding: 48px 24px; text-align: center; }
.empty-icon { width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 14px; background: #f1f5f8; display: grid; place-items: center; color: #8b98a8; }
.empty h3 { margin: 0 0 6px; font-size: 14px; }
.empty p { margin: 0 auto 18px; max-width: 360px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.filterbar .search { position: relative; min-width: 220px; flex: 1; max-width: 360px; }
.filterbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #8b98a8; }
.filterbar .search input { padding-left: 34px; }
.filterbar select { width: auto; min-width: 130px; padding: 8px 30px 8px 11px; background-color: #fff; font-size: 12px; }
.filterbar input { min-height: 36px; font-size: 12px; }
.filterbar .search { max-width: 420px; }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.pager select { width: auto; min-width: 110px; padding: 8px 30px 8px 11px; background: #fff; font-size: 12px; }
.pager .muted { font-size: 11px; }
.pager button[disabled] { opacity: .45; cursor: not-allowed; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-head h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.back-link:hover { color: var(--ink); text-decoration: none; }

.kv { display: grid; gap: 12px; }
.kv-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 12px; border-bottom: 1px solid #edf0f4; }
.kv-row:last-child { padding-bottom: 0; border-bottom: 0; }
.kv-key { color: var(--muted); font-size: 11px; }
.kv-val { font-size: 12px; font-weight: 550; text-align: right; word-break: break-all; }
.kv-val.small { font-size: 11px; font-weight: 400; }

.check-list { display: grid; gap: 2px; }
.check-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf0f4; }
.check-item:last-child { border-bottom: 0; }
.check-mark { width: 19px; height: 19px; flex: none; border-radius: 6px; display: grid; place-items: center; margin-top: 1px; background: #f1f4f7; color: #8b98a8; }
.check-mark.done { background: var(--accent-soft); color: var(--accent-strong); }
.check-mark.warn { background: var(--warn-soft); color: var(--warn); }
.check-body { min-width: 0; flex: 1; }
.check-body b { display: block; font-size: 12px; font-weight: 600; }
.check-body span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.check-action { font-size: 10px; color: var(--accent-strong); white-space: nowrap; }

.net-list { display: grid; gap: 1px; background: var(--line); border-radius: 11px; overflow: hidden; border: 1px solid var(--line); }
.net-row { display: grid; grid-template-columns: 1.4fr .8fr .8fr 1fr; gap: 12px; align-items: center; padding: 12px 14px; background: #fff; font-size: 11px; }
.net-row.head { background: var(--surface-soft); color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.net-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.net-name span { color: var(--muted); font-weight: 400; font-size: 10px; }

.timeline { display: grid; gap: 0; }
.tl-item { position: relative; padding: 0 0 18px 22px; }
.tl-item::before { content: ""; position: absolute; left: 5px; top: 5px; bottom: -4px; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 4px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: var(--accent); box-shadow: 0 0 0 1px var(--line-strong); }
.tl-dot.amber { background: #d1891c; }
.tl-dot.red { background: var(--danger); }
.tl-time { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.tl-title { margin: 2px 0 2px; font-size: 12px; font-weight: 600; }
.tl-desc { color: var(--muted); font-size: 10px; line-height: 1.55; }

/* ---------- wizard ---------- */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 26px; }
.step { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 600; }
.step-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); background: #fff; font-size: 10px; }
.step.active { color: var(--ink); }
.step.active .step-num { background: var(--navy); border-color: var(--navy); color: #fff; }
.step.done { color: var(--accent-strong); }
.step.done .step-num { background: var(--accent-soft); border-color: #bce7d8; color: var(--accent-strong); }
.step-line { flex: 1; height: 1px; background: var(--line); margin: 0 14px; min-width: 24px; }
.wizard-card { max-width: 780px; }
.wizard-body { padding: 24px; }
.wizard-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-soft); border-radius: 0 0 var(--radius) var(--radius); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { padding: 18px 0; border-top: 1px solid var(--line); }
.form-section:first-child { padding-top: 0; border-top: 0; }
.form-section h3 { margin: 0 0 4px; font-size: 13px; }
.form-section > p { margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.inline-note { display: flex; gap: 8px; padding: 10px 12px; border-radius: 9px; background: var(--info-soft); color: #345c87; font-size: 11px; line-height: 1.55; }
.inline-note.warn { background: var(--warn-soft); color: #7b4a09; }
.inline-note.green { background: var(--accent-soft); color: var(--accent-strong); }
.inline-note svg { flex: none; margin-top: 1px; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.toggle-row .toggle-title { font-size: 13px; font-weight: 650; }
.toggle-row .field-hint { margin-top: 4px; max-width: 560px; }
.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-track { display: block; width: 44px; height: 25px; border-radius: 999px; background: #cfd8e3; transition: background .16s ease; }
.switch-thumb { display: block; width: 19px; height: 19px; margin: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(13, 23, 38, .25); transition: transform .16s ease; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(19px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled + .switch-track { opacity: .55; }

.pair-list { display: grid; gap: 8px; }
.pair-option {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer;
}
.pair-option:hover { border-color: var(--line-strong); background: #fafbfd; }
.pair-option input { width: 15px; height: 15px; accent-color: var(--accent); }
.pair-option .pair-main { flex: 1; min-width: 0; }
.pair-option b { display: block; font-size: 12px; }
.pair-option span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.pair-option .pill { font-size: 9px; }

.secret-box {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border: 1px dashed #b9c6d3; border-radius: 9px; background: #fbfcfd;
  font-family: var(--mono); font-size: 11px; word-break: break-all;
}
.secret-box code { flex: 1; min-width: 0; }
.key-reveal {
  padding: 18px; border-radius: 11px; background: #0b1220; color: #dce6ef; border: 1px solid #1b293e;
}
.key-reveal .label { color: #7f93a8; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.key-reveal code { display: block; margin: 10px 0 14px; color: #8af0cc; font-family: var(--mono); font-size: 12px; word-break: break-all; line-height: 1.65; }
.key-reveal .row { gap: 8px; }
.key-reveal .btn { background: #17253a; border-color: #263a55; color: #dce6ef; }
.key-reveal .btn:hover { background: #1e3049; }
.code-block {
  margin: 0; padding: 14px; border-radius: 9px; overflow-x: auto;
  background: #0b1220; color: #bcd0e0; font-family: var(--mono); font-size: 10px; line-height: 1.7;
}
.code-block .c { color: #6f8499; }
.code-block .g { color: #8af0cc; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab {
  padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- modal / toast ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: 24px; background: rgba(7, 14, 24, .46); backdrop-filter: blur(3px);
  animation: fade .15s ease-out;
}
.modal {
  width: min(680px, 100%); max-height: calc(100vh - 48px); overflow: auto;
  background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(7,14,24,.3);
  animation: rise .18s ease-out;
}
.modal.wide { width: min(920px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 0; }
.modal-head h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.modal-body { padding: 18px 22px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-soft); border-radius: 0 0 16px 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.99); } }

.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 8px; width: min(360px, calc(100vw - 40px)); }
.toast {
  display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px;
  border-radius: 10px; background: #0b1220; color: #e7eef5; box-shadow: 0 16px 40px rgba(7,14,24,.28);
  font-size: 12px; line-height: 1.5; animation: rise .18s ease-out;
}
.toast.success svg { color: #57dfb0; }
.toast.error { background: #3b1717; }
.toast.error svg { color: #f3aaaa; }
.toast svg { flex: none; margin-top: 1px; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(127,146,166,.25);
  border-top-color: var(--accent); animation: spin .7s linear infinite; display: inline-block;
}
.spinner.light { border-color: rgba(255,255,255,.25); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { padding: 56px; display: grid; place-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, #eef2f6 25%, #f6f8fa 50%, #eef2f6 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.copy-btn.copied { color: var(--accent-strong); border-color: #bce7d8; background: var(--accent-soft); }

/* responsive */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-mobile-brand { display: flex; }
  .login-panel { padding: 36px 22px; min-height: 100vh; }
  .admin-shell { display: block; }
  .sidebar {
    width: 100%; height: auto; position: sticky; top: 0; z-index: 30;
    border-right: 0; border-bottom: 1px solid #1b293e;
  }
  .sidebar-brand { padding: 14px 16px 10px; }
  .sidebar-env, .sidebar-foot, .nav-label { display: none; }
  .sidebar-nav { display: flex; gap: 4px; padding: 0 12px 10px; overflow-x: auto; }
  .nav-item { width: auto; flex: none; padding: 8px 11px; font-size: 12px; }
  .nav-item .nav-count { display: none; }
  .topbar { position: static; padding: 14px 18px; }
  .topbar-clock { display: none; }
  .view { padding: 20px 16px 48px; }
  .grid-2, .grid-3, .split-main { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .net-row { grid-template-columns: 1.3fr .8fr .8fr; }
  .net-row > :nth-child(4) { display: none; }
  .topbar-account { display: flex; }
  .topbar { padding-right: 12px; }
  .view > *, .stack > *, .grid > *, .page-head > * { min-width: 0; }
}
@media (max-width: 560px) {
  .stat-value { font-size: 26px; }
  .filterbar .search { max-width: none; }
  .filterbar select { flex: 1; }
  .card-head, .card-body, .card-pad { padding-left: 16px; padding-right: 16px; }
  .wizard-body { padding: 18px 16px; }
  .wizard-foot { padding: 14px 16px; }
  .topbar-title p { display: none; }
  .topbar-account-name { display: none; }
  .topbar { gap: 10px; }
  .topbar-actions { gap: 6px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { max-height: 92vh; border-radius: 16px 16px 0 0; }
  .modal-foot { border-radius: 0; }
}
