:root {
  --bg: #030303;
  --card: #0a090e;
  --card-2: #0d0c13;
  --text: #fafafa;
  --soft: #d4d4d8;
  --muted: #a1a1aa;
  --faint: #71717a;
  --dim: #52525b;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.055);
  --accent: #ff7a1a;
  --accent-bright: #ff9a4d;
  --green: #5be38d;
  --amber: #ffc857;
  --red: #ff6464;
  --blue: #8fa8ff;
  --display: "Unbounded", sans-serif;
  --body: "Instrument Sans", sans-serif;
  --mono: "JetBrains Mono", monospace;
}
* , *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -12%, rgba(255, 106, 0, 0.12), transparent 68%),
    radial-gradient(720px 560px at 100% 18%, rgba(80, 112, 255, 0.055), transparent 70%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
button { font: inherit; color: inherit; }
code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--accent-bright);
  font-family: var(--mono);
  font-size: 0.9em;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

/* ---------------------------------------------------------- top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(3, 3, 3, 0.76);
  backdrop-filter: blur(16px) saturate(1.2);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 30px; height: 30px; filter: drop-shadow(0 4px 14px rgba(255, 106, 0, 0.32)); }
.brand-text { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: -0.02em; color: var(--soft); white-space: nowrap; }
.brand-text strong { color: var(--text); font-weight: 700; }
.brand-sub { margin-left: 8px; padding-left: 9px; border-left: 1px solid var(--line); color: var(--faint); font-family: var(--mono); font-size: 9px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.server-chip { max-width: 260px; overflow: hidden; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-family: var(--mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn.primary { background: #f4f4f5; color: #080808; }
.btn.primary:hover { background: #fff; transform: translateY(-1px); }
.btn.primary:disabled { opacity: 0.55; cursor: wait; transform: none; }
.btn.ghost { border-color: var(--line); background: transparent; color: var(--muted); }
.btn.ghost:hover { border-color: rgba(255, 122, 26, 0.35); color: var(--text); }

/* ---------------------------------------------------------- boot + login */
.boot {
  display: flex;
  justify-content: center;
  padding: 140px 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}
.login {
  max-width: 560px;
  margin: 0 auto;
  padding: 78px 0 40px;
  text-align: center;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-bright);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.login h1, .dash-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(32px, 4.6vw, 46px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.045em;
}
.lede { max-width: 470px; margin: 16px auto 28px; color: var(--muted); font-size: 14.5px; line-height: 1.55; text-wrap: balance; }
.login-card {
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 45%), var(--card);
  text-align: left;
}
.login-card label { color: var(--faint); font-family: var(--mono); font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; }
.login-card input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f0e15;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
}
.login-card input:focus { outline: 2px solid rgba(255, 122, 26, 0.5); outline-offset: 1px; border-color: transparent; }
.login-card .btn { margin-top: 4px; }
.hint { margin: 4px 0 0; color: var(--dim); font-size: 10.5px; line-height: 1.5; }
.form-error { margin: 0; padding: 9px 11px; border: 1px solid rgba(255, 100, 100, 0.28); border-radius: 8px; background: rgba(255, 100, 100, 0.07); color: #ffd0d0; font-size: 12px; }
.login-help { margin: 18px 0 0; color: var(--dim); font-size: 11px; }
.login-help a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.login-help a:hover { color: var(--accent-bright); }

/* ---------------------------------------------------------- dashboard */
#dashboard-view { padding: 48px 0 20px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.dash-head h1 { font-size: clamp(28px, 3.6vw, 38px); }
.server-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; color: var(--faint); font-size: 12px; }
.server-meta .sep { color: var(--dim); }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.state-dot.online { background: var(--green); box-shadow: 0 0 10px rgba(91, 227, 141, 0.55); }
.state-dot.offline { background: var(--amber); }
.licence-box { flex: none; text-align: right; }
.licence-box span { display: block; }
#licence-plan { color: var(--soft); font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
#licence-expiry { margin-top: 4px; color: var(--faint); font-size: 11px; }

.feed-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 200, 87, 0.28);
  border-radius: 10px;
  background: rgba(255, 200, 87, 0.06);
  color: #ffe6ae;
  font-size: 12px;
}

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { padding: 15px 16px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--card); }
.stat span { display: block; color: var(--faint); font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.stat b { display: block; margin-top: 7px; font-family: var(--display); font-size: 25px; font-weight: 600; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

.card { margin-bottom: 14px; padding: 22px 24px 18px; border: 1px solid var(--line-soft); border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent 42%), var(--card); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.card h2 { margin: 0; font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: -0.025em; }
.card-head p { margin: 6px 0 0; color: var(--faint); font-size: 11.5px; }
.card-meta { display: flex; align-items: center; gap: 12px; flex: none; color: var(--dim); font-family: var(--mono); font-size: 9.5px; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(91, 227, 141, 0.6); animation: pulse 2.4s ease-out infinite; }
.card-note { color: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(91, 227, 141, 0.3); } 70%, 100% { box-shadow: 0 0 0 7px rgba(91, 227, 141, 0); } }

.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table { width: 100%; min-width: 780px; border-collapse: collapse; }
th { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--dim); font-family: var(--mono); font-size: 8.5px; font-weight: 500; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); color: var(--soft); font-size: 11.5px; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.mono { color: var(--faint); font-family: var(--mono); font-size: 10px; white-space: nowrap; }
td.player { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.check { max-width: 170px; color: var(--muted); font-family: var(--mono); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.details { max-width: 420px; color: var(--faint); font-size: 10.5px; line-height: 1.45; }
.empty-row td { padding: 24px 10px; color: var(--dim); text-align: center; }

.tier { display: inline-flex; padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.05em; text-transform: uppercase; }
.tier.blatant { border-color: rgba(255, 100, 100, 0.35); background: rgba(255, 100, 100, 0.08); color: #ffb3b3; }
.tier.high { border-color: rgba(255, 200, 87, 0.32); background: rgba(255, 200, 87, 0.07); color: #ffe6ae; }
.tier.medium { border-color: rgba(255, 122, 26, 0.32); background: rgba(255, 122, 26, 0.07); color: var(--accent-bright); }
.tier.low { color: var(--faint); }

.status { display: inline-flex; padding: 3px 7px; border-radius: 5px; font-family: var(--mono); font-size: 8.5px; text-transform: uppercase; }
.status.active { background: rgba(255, 100, 100, 0.09); color: #ffb3b3; }
.status.pardoned { background: rgba(91, 227, 141, 0.08); color: #b6f5ce; }
.status.expired { background: rgba(255, 255, 255, 0.05); color: var(--faint); }
.record { color: var(--accent-bright); font-family: var(--mono); font-size: 9.5px; text-decoration: underline; text-underline-offset: 2px; }
.record:hover { color: var(--accent-soft, #ffc39a); }

.note { max-width: 760px; margin: 22px auto 10px; color: var(--dim); font-size: 11px; line-height: 1.6; text-align: center; }
.note code { font-size: 10px; }
.note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

.footer { margin-top: 30px; border-top: 1px solid var(--line-soft); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0 30px; color: var(--dim); font-size: 10.5px; flex-wrap: wrap; }
.footer-inner a:hover { color: var(--soft); }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .login { padding-top: 52px; }
  .dash-head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .licence-box { text-align: left; }
  .server-chip { display: none; }
  .card { padding: 18px 16px 14px; }
  .card-head { flex-direction: column; gap: 8px; }
  .card-meta { width: 100%; justify-content: space-between; }
  .topbar-inner { height: 56px; }
  .brand-sub { display: none; }
  .note { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}