:root {
  --bg: #05060c;
  --panel: #0c0f1a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3f5ff;
  --muted: #9aa3c2;
  --cyan: #00e8ff;
  --discord: #5865f2;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Outfit, system-ui, sans-serif;
  line-height: 1.5;
}
a { color: var(--cyan); }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
aside {
  background: #080a12;
  border-right: 1px solid var(--line);
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 18px;
  font-family: Syne, sans-serif;
  font-weight: 800;
}
.side-brand img { width: 42px; height: 42px; object-fit: contain; mix-blend-mode: screen; }
aside nav { display: grid; gap: 4px; }
aside nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
}
aside nav a.on, aside nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.side-user { margin-top: auto; display: grid; gap: 4px; padding-top: 16px; }
.side-user small, .side-user a { color: var(--muted); }
.main { min-width: 0; }
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(5, 6, 12, 0.92);
  backdrop-filter: blur(12px);
  z-index: 5;
}
.top h1 { font-family: Syne, sans-serif; font-size: 1.25rem; margin: 0; }
.top .grow { margin-left: auto; color: var(--muted); font-size: 0.92rem; }
.content { padding: 22px; }
.menu-toggle { display: none; }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.stat { padding: 16px; }
.stat b { display: block; font-family: Syne, sans-serif; font-size: 1.6rem; }
.stat span, .lead, .help { color: var(--muted); }
.panel { padding: 16px; margin-bottom: 16px; }
.panel h2 { font-family: Syne, sans-serif; font-size: 1.05rem; margin: 0 0 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.thumb { width: 54px; height: 40px; object-fit: cover; border-radius: 8px; background: #10131f; }
.badge { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 0.75rem; background: rgba(255,255,255,.06); color: var(--muted); }
.badge.on { background: rgba(61, 255, 138, 0.12); color: #b9ffd4; }
.badge.off { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.badge.news { background: rgba(0, 232, 255, 0.12); color: #9af4ff; }
.badge.up { background: rgba(225, 75, 255, 0.14); color: #f0c1ff; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 650;
  background: linear-gradient(180deg, #6d78ff, var(--discord));
  color: #fff;
}
.btn.ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.14); color: var(--text); }
.btn.danger { background: #8c2f45; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 0.88rem; }
.actions, .row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form { display: grid; gap: 14px; max-width: 760px; }
label.field { display: grid; gap: 6px; font-weight: 650; }
label.field input, label.field textarea, label.field select {
  font-weight: 450;
  background: #090c16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
}
textarea { min-height: 180px; resize: vertical; }
textarea.short { min-height: 74px; }
.checks { display: flex; flex-wrap: wrap; gap: 16px; }
.checks label { display: flex; gap: 8px; align-items: center; font-weight: 550; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px 16px;
  display: grid;
  gap: 12px;
  margin: 0;
}
legend { padding: 0 6px; font-family: Syne, sans-serif; }
.help { font-size: 0.85rem; font-weight: 400; }
.flash { padding: 12px 14px; border-radius: 12px; margin: 0 0 16px; }
.flash.ok { background: rgba(61, 255, 138, 0.1); color: #b9ffd4; }
.flash.bad { background: rgba(255, 90, 90, 0.12); color: #ffc1c1; }
.flash.warn { background: rgba(255, 196, 80, 0.12); color: #ffe1a8; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.pager a, .pager span {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--muted);
}
.pager .on { color: var(--text); border-color: rgba(0, 232, 255, 0.45); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
}
.filters a.on { color: var(--text); border-color: rgba(0, 232, 255, 0.45); background: rgba(0, 232, 255, 0.08); }
.search { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.search input { background: #090c16; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 8px 12px; min-width: min(280px, 100%); }
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    linear-gradient(180deg, rgba(5, 6, 12, 0.55), rgba(5, 6, 12, 0.9)),
    url("../assets/hero-house.jpg") center / cover no-repeat;
}
.login-card {
  width: min(440px, 100%);
  background: rgba(8, 10, 18, 0.9);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 24px;
}
.login-card img { width: 84px; height: 84px; object-fit: contain; mix-blend-mode: screen; }
.login-card h1 { font-family: Syne, sans-serif; margin: 8px 0 12px; }
.inline { display: inline; }
.muted { color: var(--muted); }
.split { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

@media (max-width: 900px) {
  .statgrid, .two { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  aside {
    position: fixed;
    z-index: 30;
    width: min(280px, 88vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
  }
  body.nav-open aside { transform: none; }
  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 25;
  }
  .menu-toggle { display: inline-flex; }
  .content, .top { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 560px) {
  .statgrid, .two { grid-template-columns: 1fr; }
}
