:root {
  --bg: #0d0f14; --panel: #161a22; --panel2: #1d222c; --line: #2a303c; --text: #e8ebf1; --muted: #8b93a4;
  --accent: #f0359c; --accent2: #7c5cff; --ok: #27c281; --warn: #f2b33d; --bad: #ef5a5a;
  --radius: 10px; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: var(--accent); text-decoration: none; }
.boot { padding: 40px; color: var(--muted); }
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { font-weight: 700; font-size: 18px; padding: 4px 10px 16px; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--muted); margin: 2px 0; }
.nav a.on, .nav a:hover { background: var(--panel2); color: var(--text); }
.nav .grp { font-size: 12px; color: var(--muted); opacity: .7; padding: 14px 12px 4px; }
.main { padding: 24px 28px; max-width: 1100px; width: 100%; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.top h1 { font-size: 20px; margin: 0; }
.bal { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.bal b { color: var(--accent); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card h2 { font-size: 16px; margin: 0 0 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tile { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; transition: border-color .15s; }
.tile:hover, .tile.on { border-color: var(--accent); }
.tile .t { font-weight: 600; }
.tile .s { color: var(--muted); font-size: 12px; }
.tile .p { color: var(--accent); font-weight: 700; font-size: 18px; margin-top: 6px; }
.tile.dis { opacity: .45; cursor: not-allowed; }
label { display: block; color: var(--muted); font-size: 12px; margin: 10px 0 4px; }
input, select, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 9px 11px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { min-height: 110px; font-family: ui-monospace, monospace; font-size: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1; min-width: 140px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer; color: #fff; background: linear-gradient(90deg, var(--accent), var(--accent2)); white-space: nowrap; }
.btn.ghost { background: var(--panel2); border: 1px solid var(--line); color: var(--text); }
.btn.sm { padding: 5px 12px; font-size: 12px; }
.btn.danger { background: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.flex0 { flex: 0 0 auto !important; min-width: 0 !important; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--panel2); border: 1px solid var(--line); }
.tag.succeeded, .tag.ACTIVE, .tag.paid, .tag.completed { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.tag.processing, .tag.pending, .tag.waiting { color: var(--warn); }
.tag.failed, .tag.FROZEN, .tag.review { color: var(--bad); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.err { color: var(--bad); margin-top: 8px; }
.okmsg { color: var(--ok); margin-top: 8px; }
.notice { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; white-space: pre-wrap; }
.quote { background: var(--panel2); border: 1px dashed var(--accent); border-radius: var(--radius); padding: 12px 14px; margin-top: 12px; }
.quote b { color: var(--accent); font-size: 18px; }
.vcard { background: linear-gradient(135deg, #2b1a4f, #6b1f56); border-radius: 14px; padding: 18px 20px; max-width: 380px; aspect-ratio: 1.6; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 10px 30px #0006; }
.vcard .num { font-family: ui-monospace, monospace; font-size: 20px; letter-spacing: 2px; }
.auth { max-width: 380px; margin: 10vh auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 14px; border-radius: 999px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); cursor: pointer; }
.tabs a.on { color: #fff; border-color: var(--accent); }
.sms-code { font-size: 22px; font-weight: 700; color: var(--ok); font-family: ui-monospace, monospace; }
.mobile-top { display: none; }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; position: fixed; inset: 0; z-index: 10; height: auto; }
  .side.open { display: block; }
  .mobile-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
  .main { padding: 16px; }
  table { display: block; overflow-x: auto; }
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.steps a { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--muted); text-align: center; }
.steps a b { font-size: 12px; font-weight: 500; }
.steps a span { font-size: 15px; font-weight: 700; color: var(--text); }
.steps a.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.steps a.on b { color: var(--accent); }
