@font-face { font-family: Jakarta; src: url(./vendor/PlusJakartaSans-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Jakarta; src: url(./vendor/PlusJakartaSans-SemiBold.ttf); font-weight: 600; font-display: swap; }
@font-face { font-family: Jakarta; src: url(./vendor/PlusJakartaSans-Bold.ttf); font-weight: 700; font-display: swap; }
:root {
  --bg: #f6f5fb; --panel: #ffffff; --text: #17142a; --muted: #6b6785; --line: #e6e3f0;
  --brand: #7b3ff2; --brand-soft: #efe8ff; --good: #12805c; --good-soft: #e3f6ee;
  --warn: #a15c00; --warn-soft: #fff3dc; --bad: #c0262d; --bad-soft: #fde8e8;
  --shadow: 0 1px 2px rgba(23,20,42,.06), 0 4px 16px rgba(23,20,42,.04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110f1c; --panel: #1b1829; --text: #f1eff9; --muted: #a39fbd; --line: #2d2942;
    --brand: #a07bff; --brand-soft: #2a2145; --good: #4cd29b; --good-soft: #13302a;
    --warn: #f3b44c; --warn-soft: #362a12; --bad: #ff7a7f; --bad-soft: #3a1a1e;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 Jakarta, system-ui, sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 13px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.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: 20px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { font-weight: 700; font-size: 20px; padding: 0 10px 18px; display: flex; align-items: center; gap: 8px; }
.brand span { background: var(--brand); color: #fff; border-radius: 8px; padding: 0 8px; font-size: 14px; }
.nav a { display: flex; justify-content: space-between; padding: 9px 10px; border-radius: 8px; color: var(--text); font-weight: 600; }
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.on { background: var(--brand-soft); color: var(--brand); }
.side .who { margin-top: auto; font-size: 13px; color: var(--muted); padding: 10px; word-break: break-all; }
.main { padding: 24px 28px 60px; max-width: 1280px; width: 100%; }
.menu { display: none; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-bottom: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.section { margin-top: 16px; }
.main > .card + .card { margin-top: 16px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 700; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.stat.alert .value { color: var(--bad); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bg); }
.scroll { overflow-x: auto; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--muted); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
textarea { width: 100%; min-height: 70px; }
button { font: inherit; font-weight: 600; border: 0; border-radius: 9px; padding: 8px 14px; cursor: pointer; background: var(--brand); color: #fff; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.danger { background: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.tabs button.on { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
.bars .bar { display: grid; grid-template-columns: 80px 1fr 50px; gap: 8px; align-items: center; font-size: 13px; margin: 5px 0; }
.bars meter { width: 100%; height: 10px; }
.chat { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.msg.reported { align-self: flex-start; }
.msg.reporter { align-self: flex-end; background: var(--brand-soft); }
.msg.flagged { border: 2px solid var(--bad); }
.msg .meta { font-size: 11px; color: var(--muted); }
.msg img { max-width: 240px; max-height: 240px; border-radius: 10px; display: block; margin-top: 4px; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); margin-bottom: 14px; font-size: 14px; }
.error { padding: 10px 14px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); margin: 10px 0; font-size: 14px; }
.ok { padding: 10px 14px; border-radius: 10px; background: var(--good-soft); color: var(--good); margin: 10px 0; font-size: 14px; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth .card { width: 100%; max-width: 400px; padding: 28px; }
.auth label, .form label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 4px; }
.auth input { width: 100%; }
.auth button { width: 100%; margin-top: 18px; padding: 11px; }
.qr { display: grid; place-items: center; background: #fff; border-radius: 12px; padding: 12px; margin: 10px 0; }
.qr svg { width: 200px; height: 200px; }
.modal-back { position: fixed; inset: 0; background: rgba(10,8,20,.5); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal { background: var(--panel); border-radius: 16px; padding: 22px; width: 100%; max-width: 440px; }
.modal .row.end { margin-top: 16px; }
.switch { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.switch:last-child { border-bottom: 0; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 5; inset: 0 30% 0 0; height: auto; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vw rgba(10,8,20,.4); }
  .menu { display: inline-block; margin-bottom: 12px; }
  .main { padding: 16px; }
  .two, .three { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stat .value { font-size: 22px; }
  .kv { grid-template-columns: 110px 1fr; }
}
