:root {
  --bg: #050508;
  --panel: #0b0f1a;
  --panel2: #0f1524;
  --line: #1c2436;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent2: #22d3ee;
  --amber: #f59e0b;
  --danger: #f43f5e;
  --ok: #10b981;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--accent2); }
.center { min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; color: #fff; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--panel2); border-color: var(--line); color: var(--text); }
.btn.danger { background: rgba(244,63,94,.1); border-color: rgba(244,63,94,.4); color: #fda4af; }
.btn.sm { height: 32px; padding: 0 10px; font-size: 12px; border-radius: 9px; }
.btn.google { background: #fff; color: #1e293b; width: 100%; height: 44px; }
.btn.block { width: 100%; }

input[type=text], input[type=email], input[type=number], input[type=search] {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: #070a12; color: var(--text); font: inherit;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.2); }
input.num { text-align: right; font-variant-numeric: tabular-nums; height: 34px; border-radius: 9px; min-width: 84px; }
input.code { text-align: center; letter-spacing: .5em; font-size: 22px; font-family: ui-monospace, monospace; }
label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px; }

.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login .card { width: 100%; max-width: 380px; }
.badge-admin { display: inline-block; padding: 2px 8px; border-radius: 999px; background: rgba(245,158,11,.15); color: #fcd34d; border: 1px solid rgba(245,158,11,.4); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.stack > * + * { margin-top: 12px; }
.divider { display: flex; align-items: center; gap: 10px; color: #64748b; font-size: 11px; text-transform: uppercase; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.msg { padding: 9px 12px; border-radius: 10px; font-size: 12px; }
.msg.err { background: rgba(244,63,94,.1); border: 1px solid rgba(244,63,94,.4); color: #fda4af; }
.msg.info { background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.35); color: #93c5fd; }
.linkbtn { background: none; border: 0; color: var(--accent2); cursor: pointer; font: inherit; font-size: 12px; padding: 0; }
.linkbtn:disabled { color: #64748b; cursor: not-allowed; }

header.top { position: sticky; top: 0; z-index: 10; background: rgba(5,5,8,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .inner { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
header.top h1 { font-size: 16px; margin: 0; flex: 1; min-width: 0; }
nav.tabs { max-width: 1100px; margin: 0 auto; padding: 0 16px; display: flex; gap: 4px; overflow-x: auto; }
nav.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 12px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
nav.tabs button.active { color: #fff; border-bottom-color: var(--accent); }
main.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
h2 { font-size: 15px; margin: 0 0 4px; }
h3 { font-size: 13px; margin: 0 0 8px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.section + .section { margin-top: 16px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
th { background: var(--panel2); color: var(--muted); font-weight: 600; font-size: 12px; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
.feat { display: flex; gap: 8px; flex-wrap: wrap; }
.feat label { display: inline-flex; align-items: center; gap: 4px; margin: 0; color: var(--text); font-size: 12px; }
.changed { outline: 2px solid var(--amber); outline-offset: -1px; }
.bar { position: sticky; bottom: 0; background: rgba(5,5,8,.95); border-top: 1px solid var(--line); padding: 12px 16px; margin: 16px -16px -16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bar .grow { flex: 1; min-width: 180px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; border: 1px solid var(--line); color: var(--muted); }
.pill.ok { color: #6ee7b7; border-color: rgba(16,185,129,.4); }
.hint { font-size: 12px; color: #64748b; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100% - 32px); background: var(--panel2); border: 1px solid var(--line); padding: 10px 14px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 50; }
.toast.err { border-color: rgba(244,63,94,.5); color: #fda4af; }
.toast.ok { border-color: rgba(16,185,129,.5); color: #6ee7b7; }
