:root {
  color-scheme: dark;
  --bg: #0c1017;
  --panel: #121822;
  --card: #161e2a;
  --line: #283343;
  --txt: #edf1f7;
  --muted: #9ba8bb;
  --accent: #a9ecc6;
  --danger: #ff9c9c;
  --radius: 14px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font:
    15px/1.6 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
a {
  color: var(--accent);
}
button {
  border: 1px solid var(--line);
  background: #202b3b;
  color: var(--txt);
  padding: 9px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s;
}
button:hover {
  background: #314056;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #10241a;
}
.danger {
  color: var(--danger);
}
:focus-visible {
  outline: 3px solid #85b9ff;
  outline-offset: 3px;
}
input,
select {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: #0f1621;
  border: 1px solid #364357;
  border-radius: 8px;
  color: var(--txt);
  margin-top: 6px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
h1,
h2,
h3,
p {
  margin: 0 0 12px;
}
h1 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.2;
  letter-spacing: -1.3px;
  font-weight: 650;
}
h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.7;
}
.muted {
  color: var(--muted);
}
.small,
small {
  font-size: 12px;
}
.eyebrow,
.nav-label {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 14px;
}
.eyebrow {
  color: var(--accent);
}
.brand-icon {
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: #10241a;
  border-radius: 11px;
  width: 35px;
  height: 35px;
  font-size: 23px;
  font-weight: 800;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 700;
  text-decoration: none;
  color: var(--txt);
  flex-wrap: wrap;
  margin: 12px 0 48px;
}
.brand small {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-left: 45px;
  margin-top: -15px;
}
.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  padding: 20px;
  background: #101620;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.nav-link {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #b7c3d4;
  font-size: 13px;
  padding: 12px;
  margin-bottom: 6px;
}
.nav-link.active {
  background: #233329;
  color: var(--accent);
}
.nav-label {
  margin-top: 28px;
  margin-bottom: 9px;
}
.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.icon-button {
  padding: 0 8px;
  font-size: 22px;
  background: transparent;
  border: 0;
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 40px;
  font-size: 12px;
}
.sidebar-foot button {
  margin-top: 20px;
  display: block;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
}
main {
  padding: 0 40px;
  max-width: 1700px;
  width: 100%;
  margin: auto;
  min-width: 0;
}
.topbar {
  height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  border: 1px solid var(--line);
  padding: 3px 7px;
  border-radius: 5px;
  color: var(--muted);
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.actions,
.row,
.toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.actions {
  align-items: center;
}
.grow {
  flex: 1;
  min-width: 180px;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 24px;
  margin-bottom: 20px;
}
.overview-grid,
.health-grid,
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 28px 0;
}
.health-grid {
  grid-template-columns: repeat(3, 1fr);
}
.metric {
  font-size: 29px;
  letter-spacing: -1px;
  margin-top: 14px;
}
.health-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.health-line:last-child {
  border: 0;
}
.yes {
  color: var(--accent);
}
.unknown {
  color: #d6c995;
}
.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  overflow: auto;
}
.tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 12px 0;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}
.tabs button.active {
  color: var(--accent);
  border-color: var(--accent);
}
.callout {
  padding: 16px 20px;
  background: #252318;
  border: 1px solid #51462b;
  border-radius: 10px;
  color: #e8d4a8;
  margin-bottom: 20px;
  font-size: 13px;
}
.callout p {
  margin: 6px 0 0;
  color: #d0c09c;
}
.toolbar {
  margin-bottom: 24px;
}
.mod-card {
  position: relative;
  margin: 0;
}
.mod-card h3 {
  margin-top: 14px;
  overflow-wrap: anywhere;
}
.mod-card .actions {
  margin-top: 20px;
}
.mod-card .description {
  font-size: 13px;
  color: var(--muted);
  min-height: 42px;
}
.mod-card dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.mod-card dt {
  color: var(--muted);
}
.mod-card dd {
  margin: 0;
}
.empty {
  padding: 40px;
  text-align: center;
  border: 1px dashed #364357;
  border-radius: 14px;
  grid-column: 1/-1;
  color: var(--muted);
}
pre {
  font:
    12px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 300px;
  overflow: auto;
}
.console {
  background: #0b1018;
  color: #b6dcc7;
  border-radius: 8px;
  padding: 20px;
  height: 400px;
  max-height: 500px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.full {
  grid-column: 1/-1;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkbox input {
  width: auto;
}
.danger-zone {
  margin-top: 28px;
}
footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 70px;
  padding: 24px 0;
  color: var(--muted);
  font-size: 11px;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 20%, #1d332c 0, transparent 60%);
}
.login-card {
  max-width: 430px;
  width: 100%;
  padding: 32px;
}
.login-card .brand-icon {
  margin-bottom: 30px;
}
.login-card h1 {
  font-size: 33px;
}
.login-card label {
  margin: 20px 0;
}
.login-card button {
  width: 100%;
  margin: 8px 0 20px;
}
.error {
  color: var(--danger);
}
dialog {
  color: var(--txt);
  background: var(--panel);
  border: 1px solid #3c4e65;
  border-radius: 18px;
  padding: 30px;
  width: 520px;
  max-width: calc(100vw - 30px);
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #030810bb;
  backdrop-filter: blur(5px);
}
dialog label {
  margin: 18px 0;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
summary {
  cursor: pointer;
}
#notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #243d31;
  border: 1px solid #528568;
  box-shadow: 0 10px 40px #0008;
  color: #dcffe9;
  padding: 16px 24px;
  border-radius: 10px;
  z-index: 5;
  max-width: calc(100vw - 40px);
}
#notice.error {
  background: #422629;
  color: #ffd5d5;
  border-color: #946068;
}
.backup-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.backup-row code {
  overflow-wrap: anywhere;
}
.player-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  gap: 16px;
  flex-wrap: wrap;
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  aside {
    padding: 15px;
  }
  main {
    padding: 0 24px;
  }
  .health-grid {
    gap: 12px;
  }
  .card {
    padding: 18px;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  aside {
    height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: block;
  }
  .brand {
    margin: 0 0 12px;
  }
  .brand small,
  .sidebar-foot {
    display: none;
  }
  .nav-label {
    margin-top: 12px;
  }
  .nav-link {
    display: inline-block;
    width: auto;
  }
  #server-list {
    display: inline;
  }
  .topbar {
    height: 60px;
    margin-bottom: 26px;
  }
  main {
    padding: 0 16px;
  }
  .page-title {
    gap: 14px;
  }
  .health-grid {
    grid-template-columns: 1fr;
  }
  .health-grid .card {
    margin: 0;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .tabs {
    gap: 20px;
  }
  .nav-row {
    flex-wrap: wrap;
  }
  footer span {
    display: none;
  }
  .metric {
    font-size: 25px;
  }
  .toolbar label {
    width: 100%;
  }
  .login-card {
    padding: 24px;
  }
  .row label {
    flex: 1;
  }
  h1 {
    letter-spacing: -0.6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
