:root { --bg: #0e0f13; --panel: #161821; --cell: #1f2230; --line: #2a2e3d; --ink: #f2f3f7; --muted: #a0a4b4; --accent: #2bc8e6; --gold: #e5b567; --ok: #3ccf8e; --bad: #ff7b72; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, 'Segoe UI', Roboto, sans-serif; }
#app { min-height: 100%; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 26px; margin: 0; }
h2 { font-size: 17px; margin: 0 0 12px; }
.shell { display: flex; min-height: 100vh; }
.side { width: 250px; flex: 0 0 250px; background: #101218; border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; font-weight: 800; font-size: 18px; padding: 4px 8px 18px; }
.brand img { width: 30px; height: 30px; margin-right: 10px; border-radius: 6px; }
.brand span { color: var(--accent); margin-left: 5px; }
.nav a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.nav a:hover { color: var(--ink); background: var(--cell); }
.nav a.on { color: var(--accent); background: rgba(43, 200, 230, 0.13); }
.me { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.me b { display: block; }
.main { flex: 1; min-width: 0; padding: 24px 32px 48px; max-width: 1240px; }
.head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); grid-gap: 16px; margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; }
.cards .card { margin-bottom: 0; display: flex; flex-direction: column; }
.lab { color: var(--muted); font-weight: 600; font-size: 13px; }
.big { font-size: 30px; font-weight: 800; margin: 8px 0 4px; }
.big small { font-size: 18px; font-weight: 700; margin-left: 6px; }
.sub { color: var(--muted); font-size: 13.5px; }
.link { margin-top: auto; padding-top: 12px; font-weight: 700; color: var(--accent); }
.two { display: grid; grid-template-columns: 2fr 1fr; grid-gap: 16px; }
.two .card { margin-bottom: 0; }
.row { display: flex; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.dot.on { background: var(--ok); }
button { font: inherit; font-weight: 700; color: var(--ink); background: var(--cell); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; margin-left: 8px; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: #06242c; border-color: var(--accent); }
button.danger { color: var(--bad); }
button:disabled { opacity: 0.55; cursor: default; }
label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 13px; color: var(--muted); }
input, select { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; color: var(--ink); background: var(--cell); border: 1px solid var(--line); border-radius: 10px; font: inherit; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.chips { margin: 5px 0 12px; }
.chips button { margin: 0 6px 6px 0; padding: 6px 12px; border-radius: 16px; }
.chips button.on { background: var(--accent); color: #06242c; border-color: var(--accent); }
.err { color: var(--bad); margin: 8px 0; }
.err:empty { display: none; }
.ok { color: var(--ok); }
.note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login .card { width: 100%; max-width: 380px; }
.modal { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px; overflow: auto; z-index: 5; }
.modal .card { width: 100%; max-width: 520px; }
.actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--cell); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; z-index: 6; }
.tag { font-size: 12px; font-weight: 700; color: var(--gold); margin-left: 8px; }
@media (max-width: 800px) {
  .shell { display: block; min-height: 0; }
  .side { width: auto; padding: 10px 12px; }
  .brand { padding-bottom: 8px; }
  .nav { display: flex; overflow-x: auto; }
  .nav a { flex: 0 0 auto; }
  .me { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; }
  .main { padding: 16px; }
  .two { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; }
  .row .grow { flex-basis: 100%; margin-bottom: 8px; }
  .row button:first-of-type { margin-left: 0; }
}
button.flush { margin-left: 0; }
button.wide { width: 100%; }
button.top { margin-top: 6px; }
