:root {
  --bg: #0f1115; --panel: #171a21; --panel-2: #1f232c; --text: #e8eaf0; --muted: #9aa3b2; --line: #2a2f3a;
  --accent: #ff6b8a; --accent-2: #ffb86b; --ok: #3ddc97; --warn: #ffcc4d; --err: #ff5c5c; --info: #6aa9ff;
  --radius: 14px; --pad: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f6f6f8; --panel: #ffffff; --panel-2: #f0f1f5; --text: #15171c; --muted: #5f6675; --line: #e3e5eb; }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--info); text-decoration: none; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--pad); border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; color: var(--text); font-size: 17px; }
.main { padding: var(--pad); padding-bottom: calc(84px + var(--safe-bottom)); max-width: 960px; margin: 0 auto; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-around; background: var(--panel); border-top: 1px solid var(--line); padding: 8px 0 calc(8px + var(--safe-bottom)); z-index: 5; }
.nav a { color: var(--muted); font-size: 13px; padding: 6px 10px; border-radius: 10px; }
.nav a.active { color: var(--text); background: var(--panel-2); font-weight: 600; }
@media (min-width: 760px) {
  .nav { position: sticky; top: 53px; bottom: auto; border-top: none; border-bottom: 1px solid var(--line); justify-content: center; gap: 8px; }
  .main { padding-bottom: 40px; }
  body { display: flex; flex-direction: column; }
  .top { order: 0; } .nav { order: 1; } .main { order: 2; width: 100%; }
}
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--pad); margin-bottom: 14px; }
.card h2 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
h1 { font-size: 24px; margin: 4px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--panel-2); border-radius: 12px; padding: 12px; }
.stat .n { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 12px; margin-top: 2px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .03em; }
.b-ok { background: rgba(61,220,151,.15); color: var(--ok); } .b-err { background: rgba(255,92,92,.15); color: var(--err); }
.b-warn { background: rgba(255,204,77,.18); color: var(--warn); } .b-info { background: rgba(106,169,255,.15); color: var(--info); }
.b-neutral { background: var(--panel-2); color: var(--muted); } .b-muted { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.tier { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; color: #111; }
.tier.T1 { background: #ff4d6d; color: #fff; } .tier.T2 { background: #ff7a9a; } .tier.T3 { background: #ffb86b; } .tier.T4 { background: #ffd36b; }
.tier.T5 { background: #c3e88d; } .tier.T6 { background: #8fd3ff; } .tier.T7 { background: #d9dde6; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: none; padding-top: 0; }
.msg { font-size: 15px; margin: 4px 0; word-break: break-word; }
button, .btn { font: inherit; border: none; border-radius: 12px; padding: 12px 16px; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; -webkit-appearance: none; }
button.secondary, .btn.secondary { background: var(--panel-2); color: var(--text); }
button.danger { background: var(--err); }
button.link { background: none; color: var(--info); padding: 0; font-weight: 500; }
button.small, .btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
button:disabled { opacity: .5; cursor: default; }
.inline { display: inline; }
form .field { margin-bottom: 12px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=time], input[type=number], select, textarea {
  width: 100%; font: inherit; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
textarea { min-height: 90px; }
input[type=checkbox] { width: 20px; height: 20px; vertical-align: middle; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.check label { margin: 0; color: var(--text); font-size: 15px; }
.flash { margin: 12px var(--pad) 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; max-width: 928px; }
.flash.ok { background: rgba(61,220,151,.15); color: var(--ok); } .flash.err { background: rgba(255,92,92,.15); color: var(--err); } .flash.warn { background: rgba(255,204,77,.18); color: var(--warn); }
.banner { background: linear-gradient(90deg, #ff6b8a, #ffb86b); color: #111; font-weight: 700; padding: 8px var(--pad); font-size: 13px; text-align: center; }
.banner.live { background: var(--err); color: #fff; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.kill { background: var(--err); color: #fff; width: 100%; font-size: 16px; padding: 14px; }
.kill.resume { background: var(--ok); color: #111; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs a { padding: 6px 10px; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 13px; }
.tabs a.active { background: var(--accent); color: #fff; }
details summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.warnbox { border: 1px solid var(--warn); border-radius: 12px; padding: 10px 12px; font-size: 14px; background: rgba(255,204,77,.08); }
.login { max-width: 380px; margin: 60px auto; }
code { background: var(--panel-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.weights input { width: 90px; text-align: right; }
.hidden { display: none; }
