/* mituan design system */
:root {
  --bg: #0b0d17; --bg2: #11142a; --card: rgba(255,255,255,.045); --card-solid: #151832; --line: rgba(255,255,255,.09);
  --text: #e9eaf6; --muted: #9aa0c3; --faint: #6b7096;
  --brand1: #6366f1; --brand2: #a855f7; --brand3: #ec4899;
  --grad: linear-gradient(120deg, var(--brand1), var(--brand2) 55%, var(--brand3));
  --ok: #22c55e; --warn: #f59e0b; --bad: #ef4444; --idle: #64748b;
  --radius: 18px; --shadow: 0 10px 40px rgba(0,0,0,.35);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f5f6fb; --bg2: #eef0fa; --card: #ffffff; --card-solid: #ffffff; --line: rgba(20,24,60,.09);
          --text: #171a33; --muted: #5d6385; --faint: #9095b3; --shadow: 0 10px 30px rgba(40,44,90,.08); }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.6 system-ui, -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--text); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(900px 500px at 10% -10%, rgba(99,102,241,.18), transparent 60%),
                    radial-gradient(800px 500px at 100% 0%, rgba(236,72,153,.12), transparent 60%);
  background-attachment: fixed;
}
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 6px 16px rgba(168,85,247,.45)); }
.wordmark { font-weight: 800; font-size: 24px; letter-spacing: -.5px; background: var(--grad);
            -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
        box-shadow: var(--shadow); backdrop-filter: blur(14px); }
h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: -.5px; }
h2 { font-size: 17px; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
h2 .dot { width: 8px; height: 8px; border-radius: 3px; background: var(--grad); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.section { margin: 18px 0; }
.btn { appearance: none; border: 1px solid var(--line); background: var(--card-solid); color: var(--text);
       border-radius: 12px; padding: 9px 14px; font: inherit; font-size: 14px; cursor: pointer; display: inline-flex;
       align-items: center; gap: 6px; text-decoration: none; transition: transform .12s, border-color .12s, background .12s; white-space: nowrap; }
.btn:hover { border-color: rgba(168,85,247,.55); transform: translateY(-1px); }
.btn.primary { background: var(--grad); border: 0; color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(139,92,246,.35); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 99px;
        border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.25); }
.pill.warn { color: var(--warn); background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.25); }
.pill.bad { color: var(--bad); background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.25); }
.pill.idle { color: var(--idle); }
.pill.brand { color: #c4b5fd; background: rgba(139,92,246,.12); border-color: rgba(139,92,246,.3); }
.pill.brand::before { display: none; }
@media (prefers-color-scheme: light) { .pill.brand { color: #7c3aed; } }
.bar { height: 9px; border-radius: 99px; background: rgba(127,127,170,.18); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .6s ease; }
.bar.warn > i { background: linear-gradient(90deg, #f59e0b, #f97316); }
.bar.bad > i { background: linear-gradient(90deg, #ef4444, #dc2626); }
.bar.inf > i { background: repeating-linear-gradient(45deg, rgba(139,92,246,.6) 0 8px, rgba(236,72,153,.6) 8px 16px); }
.copybox { display: flex; align-items: center; gap: 8px; background: rgba(127,127,170,.08); border: 1px dashed var(--line);
           border-radius: 12px; padding: 8px 8px 8px 14px; }
.copybox code { flex: 1; font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 6px 0; border-top: 1px dashed var(--line); }
.kv:first-of-type { border-top: 0; }
.kv span:first-child { color: var(--muted); }
.stat { padding: 16px; border-radius: 14px; background: rgba(127,127,170,.07); border: 1px solid var(--line); }
.stat b { display: block; font-size: 22px; letter-spacing: -.3px; margin-top: 2px; }
.stat small { color: var(--muted); font-size: 12.5px; }
footer { text-align: center; color: var(--faint); font-size: 13px; padding: 36px 0 44px; }
footer b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* modal & toast */
.modal { position: fixed; inset: 0; background: rgba(5,6,15,.6); backdrop-filter: blur(6px); display: none;
         align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal.show { display: flex; }
.modal .card { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: var(--card-solid); }
.modal.wide .card { width: min(860px, 100%); }
.qr { background: #fff; border-radius: 14px; padding: 12px; width: 260px; height: 260px; margin: 6px auto 12px; }
.qr svg { width: 100%; height: 100%; display: block; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); opacity: 0;
         background: var(--card-solid); border: 1px solid var(--line); border-radius: 12px; padding: 10px 18px;
         box-shadow: var(--shadow); transition: all .25s; z-index: 60; font-size: 14px; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
input, textarea, select { font: inherit; color: var(--text); background: rgba(127,127,170,.08); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 11px; outline: none; width: 100%; }
input:focus, textarea:focus { border-color: rgba(168,85,247,.6); box-shadow: 0 0 0 3px rgba(168,85,247,.15); }
input[type=checkbox] { width: auto; accent-color: var(--brand2); }
label.f { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.empty { text-align: center; padding: 40px; color: var(--muted); }
@media (max-width: 640px) { h1 { font-size: 23px; } .card { padding: 18px; } .wordmark { font-size: 21px; } }
