:root {
  color-scheme: dark;
  --ink: #e8f6fb;
  --muted: #7893a0;
  --muted-2: #506875;
  --bg: #05090c;
  --surface: #0a1116;
  --surface-2: #0e1820;
  --surface-3: #12222b;
  --line: #1b313d;
  --line-strong: #245064;
  --cyan: #22d3ee;
  --cyan-2: #0891b2;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --red: #ef4444;
  --green: #10b981;
  --radius: 16px;
  --shadow: 0 22px 70px #010305;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: #091319;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 248px minmax(0, 1fr);
}

aside {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #071015;
  padding: 28px 18px 22px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-fin {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--cyan-2);
  border-radius: 12px 12px 12px 4px;
  background: #08232c;
  color: var(--cyan);
  font-size: 20px;
  font-weight: 900;
  box-shadow: inset 0 0 0 3px #0a171d;
}

.brand-lockup strong {
  display: block;
  letter-spacing: 0.08em;
}

.brand-lockup strong span {
  color: var(--cyan);
}

.brand-lockup small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

aside nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  margin-top: 48px;
}

aside nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #071015;
  border-radius: 11px;
  padding: 12px 13px;
  color: #7f98a4;
  font-weight: 650;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

aside nav a span {
  color: #38505b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

aside nav a:hover {
  border-color: var(--line);
  background: #0b171d;
  color: var(--ink);
}

aside nav a.active {
  border-color: #174357;
  background: #0b212b;
  color: #d9f8ff;
  box-shadow: inset 3px 0 0 var(--cyan);
}

aside nav a.active span {
  color: var(--cyan);
}

.side-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #09151b;
  padding: 12px;
}

.side-foot b,
.side-foot small {
  display: block;
}

.side-foot b {
  color: #a7bbc4;
  font-size: 11px;
}

.side-foot small {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9px;
}

.secure-dot,
.hero-status i,
.live-label i {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px #0d3028;
}

.main-shell {
  min-width: 0;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #071015;
  padding: 0 34px;
}

.header-context {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.11em;
}

.header-context span {
  color: var(--cyan);
  font-weight: 800;
}

.header-context b {
  color: #9cb1bb;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: right;
}

.user-menu b,
.user-menu small {
  display: block;
}

.user-menu b {
  font-size: 12px;
}

.user-menu small {
  margin-top: 3px;
  color: var(--cyan-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  padding: 7px 10px;
}

.content {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 34px;
}

.hero,
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 206px;
  align-items: center;
  border: 1px solid #174255;
  border-radius: 20px;
  background: #091820;
  padding: 38px;
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  right: -70px;
  bottom: -150px;
  width: 440px;
  height: 330px;
  border: 46px solid #0d2e3b;
  border-radius: 50%;
  content: "";
}

.hero > div {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.025em;
}

.hero h1,
.page-heading h1 {
  margin-top: 9px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
}

.hero p,
.page-heading p {
  max-width: 680px;
  margin: 12px 0 0;
}

.hero-status,
.live-label {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #195843;
  border-radius: 999px;
  background: #0a211b;
  padding: 10px 14px;
  color: #8be0ba;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric {
  position: relative;
  display: grid;
  min-height: 156px;
  grid-template-columns: 1fr auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 21px;
  box-shadow: 0 14px 36px #020609;
}

.metric > span {
  grid-column: 1;
  color: #8199a4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric strong {
  grid-column: 1 / -1;
  align-self: end;
  font-size: 34px;
}

.metric small {
  grid-column: 1 / -1;
  color: var(--muted-2);
  font-size: 10px;
}

.metric-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--cyan);
  font-weight: 900;
}

.metric.blue .metric-icon {
  border-color: #214d8f;
  background: #102342;
  color: #78aefc;
}

.metric.amber .metric-icon {
  border-color: #6f4b12;
  background: #2a1c07;
  color: #ffbd46;
}

.metric.red .metric-icon {
  border-color: #692628;
  background: #2c1012;
  color: #fb7777;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 14px;
}

.panel,
.credential-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 36px #020609;
}

.panel {
  padding: 22px;
}

.panel.compact {
  margin-bottom: 16px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.panel-head h2 {
  margin-top: 6px;
  font-size: 17px;
}

.panel-head > a {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 750;
}

.bars {
  display: grid;
  gap: 17px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.7fr) minmax(100px, 1.3fr) 28px;
  align-items: center;
  gap: 12px;
  color: #8fa5ae;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.bar-row strong {
  color: var(--ink);
  text-align: right;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #112029;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan-2);
}

.feed {
  display: grid;
}

.feed-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #14262f;
  padding: 13px 0;
}

.feed-row:hover b {
  color: var(--cyan);
}

.feed-row b,
.feed-row small {
  display: block;
}

.feed-row b {
  overflow: hidden;
  color: #bed0d7;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-row small,
.feed-row time {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 9px;
}

.severity {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--blue);
}

.severity.ban,
.severity.blocked {
  background: var(--red);
}

.severity.kick {
  background: var(--amber);
}

.page-heading {
  padding: 14px 2px 6px;
}

.page-heading h1 {
  font-size: 36px;
}

.credential-card {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(360px, 1.3fr) auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  border-color: #176077;
  background: #09222c;
  padding: 24px;
}

.credential-card h2 {
  margin-top: 7px;
  font-size: 18px;
}

.credential-card p {
  margin: 6px 0 0;
  font-size: 11px;
}

pre {
  max-width: 100%;
  overflow: auto;
  border: 1px solid #1b3946;
  border-radius: 10px;
  background: #050b0f;
  color: #a8dbea;
  padding: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.server-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}

.server-title {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.server-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #17526a;
  border-radius: 12px;
  background: #0a2430;
  color: var(--cyan);
  font-size: 18px;
  font-weight: 900;
}

.server-title h3 {
  font-size: 15px;
}

.server-title p {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  border: 1px solid #593132;
  border-radius: 999px;
  background: #261113;
  padding: 6px 9px;
  color: #e78181;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.status.online {
  border-color: #1d5944;
  background: #0d281f;
  color: #78ddb2;
}

.server-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--line);
}

.server-stats span {
  background: #0b151b;
  padding: 13px;
  color: var(--muted-2);
  font-size: 9px;
}

.server-stats b {
  display: block;
  margin-bottom: 4px;
  color: #b6c9d1;
  font-size: 11px;
}

.server-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 15px;
}

.button,
.icon-button {
  cursor: pointer;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #10212a;
  color: #c8dce4;
  font-size: 11px;
  font-weight: 750;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
}

.button:hover,
.icon-button:hover {
  border-color: var(--cyan-2);
  background: #13313e;
}

.button:active,
.icon-button:active {
  transform: translateY(1px);
}

.button.primary {
  border-color: #1aacc8;
  background: #0d98b3;
  color: #001015;
}

.button.primary:hover {
  border-color: #45e4ff;
  background: #22d3ee;
}

.button.ghost {
  background: #0a151b;
}

.button.danger-ghost {
  border-color: #5c2a2d;
  background: #241013;
  color: #ed9494;
}

.button.large {
  min-height: 48px;
  font-size: 12px;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.form-grid.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label,
fieldset {
  min-width: 0;
}

label > span,
fieldset legend {
  display: block;
  margin-bottom: 7px;
  color: #839ba6;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: #071015;
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan-2);
  box-shadow: 0 0 0 3px #0c2b36;
}

input::placeholder,
textarea::placeholder {
  color: #3e555f;
}

.span-2 {
  grid-column: span 2;
}

fieldset {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a151b;
  padding: 8px 10px;
}

.check input {
  width: auto;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px 170px auto;
  gap: 10px;
  margin-bottom: 14px;
}

.table-panel {
  padding: 0;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #14262f;
  padding: 15px 17px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  background: #0b151b;
  color: #5e7782;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

td {
  color: #9eb2bb;
  font-size: 11px;
}

td b,
td small {
  display: block;
}

td b {
  color: #c1d2d9;
}

td small {
  margin-top: 4px;
  color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

tbody tr:hover td {
  background: #0b171d;
}

.score {
  display: inline-grid;
  min-width: 42px;
  place-items: center;
  border: 1px solid #6e4b17;
  border-radius: 8px;
  background: #2a1c08;
  padding: 6px;
  color: #ffc45c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
}

.pill {
  display: inline-block;
  border: 1px solid #344752;
  border-radius: 999px;
  background: #121d23;
  padding: 6px 9px;
  color: #8499a2;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 800;
}

.pill.active {
  border-color: #1b5543;
  background: #0c271e;
  color: #78d9ae;
}

details {
  margin-top: 6px;
}

summary {
  cursor: pointer;
  color: var(--cyan-2);
  font-size: 9px;
}

td details pre {
  width: 340px;
  max-height: 220px;
  white-space: pre-wrap;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inline-form select {
  width: 130px;
  padding: 8px;
}

.empty {
  display: grid;
  min-height: 160px;
  place-items: center;
  align-content: center;
  padding: 24px;
  text-align: center;
}

.empty-mark {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  place-items: center;
  border: 1px solid #16485b;
  border-radius: 13px;
  background: #0a2430;
  color: var(--cyan);
  font-weight: 900;
}

.empty p {
  max-width: 340px;
  margin: 6px 0 0;
  font-size: 11px;
}

.alert {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 11px;
}

.alert.error {
  border-color: #6b2b30;
  background: #291013;
  color: #f1a2a7;
}

.login-shell,
.install-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 0.9fr) minmax(480px, 1.1fr);
  background: #05090c;
}

.login-brand,
.install-intro {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #184052;
  background: #081820;
  padding: clamp(36px, 6vw, 82px);
}

.login-brand::after,
.install-intro::after {
  position: absolute;
  right: -180px;
  bottom: -210px;
  width: 620px;
  height: 480px;
  border: 68px solid #0d2d39;
  border-radius: 50%;
  content: "";
}

.login-brand > *,
.install-intro > * {
  position: relative;
  z-index: 1;
}

.login-brand h1,
.install-intro h1 {
  max-width: 620px;
  margin-top: 10px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98;
}

.login-brand p,
.install-intro p {
  max-width: 580px;
  font-size: 16px;
}

.login-points,
.install-intro ol {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  color: #90aab5;
  list-style: none;
}

.login-points li,
.install-intro li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.login-points i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--cyan);
}

.install-intro li b {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.login-card,
.install-card {
  align-self: center;
  width: min(520px, calc(100% - 60px));
  margin: 30px auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  padding: clamp(28px, 5vw, 52px);
  box-shadow: var(--shadow);
}

.install-card {
  width: min(720px, calc(100% - 60px));
}

.login-card h2,
.install-card h2 {
  margin-top: 7px;
  font-size: 28px;
}

.login-card > div > p {
  margin: 8px 0 0;
}

.login-card form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.login-note {
  display: block;
  margin-top: 20px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.install-card .form-grid {
  margin-top: 25px;
}

.error-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  align-content: center;
  background: var(--bg);
  padding: 30px;
  text-align: center;
}

.error-shell h1 {
  max-width: 680px;
  margin: 12px 0 20px;
  font-size: 34px;
}

.error-shell p {
  margin: -8px 0 22px;
}

@media (max-width: 1120px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .credential-card {
    grid-template-columns: 1fr;
  }

  .server-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .login-shell,
  .install-shell {
    grid-template-columns: 1fr;
  }

  .login-brand,
  .install-intro {
    min-height: 520px;
    border-right: 0;
    border-bottom: 1px solid #184052;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  aside {
    position: fixed;
    left: -270px;
    width: 248px;
    transition: left 180ms ease;
  }

  body.menu-open aside {
    left: 0;
    box-shadow: 20px 0 60px #000;
  }

  .menu-toggle {
    display: block;
  }

  header {
    padding: 0 16px;
  }

  .header-context {
    display: none;
  }

  .content {
    padding: 20px 14px;
  }

  .hero {
    min-height: 260px;
    align-items: flex-start;
    flex-direction: column;
    padding: 26px;
  }

  .metric-grid,
  .form-grid,
  .form-grid.wide,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .server-stats {
    grid-template-columns: 1fr;
  }

  .login-brand,
  .install-intro {
    min-height: 440px;
    padding: 34px 24px;
  }

  .login-card,
  .install-card {
    width: calc(100% - 28px);
    margin: 14px auto;
    padding: 28px 20px;
  }

  .login-brand h1,
  .install-intro h1 {
    font-size: 44px;
  }
}

