:root {
  --bg: #0b0f1a; --bg2: #0e1424; --card: #151b2e; --card2: #1a2138; --line: #232b45;
  --text: #e7eaf5; --muted: #8b93ad; --accent: #6366f1; --accent2: #22d3ee;
  --ok: #34d399; --bad: #f87171; --warn: #fbbf24; --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 500px at 80% -10%, rgba(99,102,241,.18), transparent 60%),
              radial-gradient(900px 400px at 10% 0%, rgba(34,211,238,.10), transparent 55%), var(--bg);
  color: var(--text); min-height: 100vh;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 860px; margin: 0 auto; padding: 40px 22px 70px; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.btn {
  display: inline-block; border: 1px solid var(--line); background: var(--card2); color: var(--text);
  border-radius: 9px; padding: 7px 15px; font-size: 13.5px; cursor: pointer; font-family: inherit; transition: all .15s;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #4f46e5); border-color: transparent; color: #fff; }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(248,113,113,.5); color: var(--bad); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.chip { display: inline-block; background: var(--card2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 4px 12px; font-size: 12.5px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); }
.pill.ok { color: var(--ok); border-color: rgba(52,211,153,.4); }
.pill.warn { color: var(--warn); border-color: rgba(251,191,36,.4); }
input, textarea, select {
  background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none; width: 100%;
}
input:focus, textarea:focus { border-color: var(--accent); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.hint { font-size: 12.5px; color: var(--muted); }
.toast-root { position: fixed; top: 70px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--card2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  padding: 12px 18px; border-radius: 10px; font-size: 14px; max-width: 340px; box-shadow: var(--shadow); }
.toast.err { border-left-color: var(--bad); }
.toast.ok { border-left-color: var(--ok); }
.modal-mask { position: fixed; inset: 0; background: rgba(5,8,16,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 24px; box-shadow: var(--shadow); }
.modal-title { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
