:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #f0f1f2;
  background: var(--background);
  line-height: 1.5;
  --background: #17181c;
  --surface-soft: #1d1f24;
  --surface: #24262c;
  --surface-raised: #2b2d34;
  --border: #373a43;
  --border-strong: #4a4e59;
  --muted: #a4a7b0;
  --brand: #62d77d;
  --brand-hover: #73e38c;
  --brand-soft: #233b2a;
  --brand-ink: #102016;
  --danger: #f09a94;
  --danger-soft: #3a2425;
  --warning: #dfc96d;
  --radius-small: 6px;
  --radius: 10px;
  --radius-large: 14px;
  --pill: 999px;
  --shadow: 0 8px 24px rgb(0 0 0 / .16);
  --text-display: clamp(2.75rem, 6vw, 5.5rem);
  --text-page: clamp(2.25rem, 5vw, 4rem);
  --text-title: 1.75rem;
  --text-section: 1.25rem;
  --text-card: 1rem;
  --text-body: .9375rem;
  --text-small: .8125rem;
  --text-label: .6875rem;
  --leading-tight: 1.05;
  --leading-body: 1.65;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 80px;
  --space-10: 96px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); font-size: var(--text-body); }
::selection { background: var(--brand); color: var(--brand-ink); }
main { max-width: 1360px; margin: 0 auto; padding: var(--space-6) var(--space-5) var(--space-8); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -.035em; }
h2 {
  margin: 0 0 var(--space-4);
  color: #f0f1f2;
  font-size: var(--text-section);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}
h3 { margin: 0; font-size: var(--text-card); font-weight: 650; line-height: 1.3; }
p { margin-bottom: var(--space-2); line-height: var(--leading-body); }

header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-7);
}
.brand h1 { letter-spacing: .035em; }
.project-name {
  margin-bottom: 0;
  color: #f0f1f2;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .045em;
}
.site-address {
  margin: 0 0 var(--space-2);
  color: #a9a9a9;
  font-size: .88rem;
  letter-spacing: .01em;
}
.brand .site-address { font-size: .95rem; }
.muted, #connection { color: var(--muted); font-size: var(--text-small); }
#connection { margin: var(--space-3) 0 0; }

section { margin: var(--space-6) 0; }
.portal-shell { display: block; }
.portal-content { min-width: 0; }
.portal-switcher {
  display: flex;
  gap: var(--space-1);
  margin: 0 0 var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
.portal-switcher button {
  width: auto;
  min-height: 34px;
  padding: var(--space-2) var(--space-3);
  border-color: transparent;
  background: transparent;
  color: #9f9f9f;
  text-align: left;
  font-size: .8rem;
  font-weight: 550;
}
.portal-switcher button:hover { background: var(--surface); color: #f4f5f6; }
.portal-switcher button.active { border-color: #3f704a; background: var(--brand-soft); color: var(--brand); }
.dashboard-layout { display: block; }
.dashboard-main { min-width: 0; }
.whitelist-sidebar {
  position: sticky;
  top: 24px;
  margin-top: var(--space-6);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.whitelist-sidebar h2 { margin-bottom: var(--space-2); }
.whitelist-overview { margin: var(--space-4) 0 0; padding: 0; list-style: none; }
.whitelist-player {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border);
}
.whitelist-identity { flex: 1 1 auto; min-width: 0; }
.whitelist-player strong { display: block; min-width: 0; font-size: .88rem; overflow-wrap: anywhere; }
.whitelist-servers { display: flex; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-1); }
.server-tag {
  padding: var(--space-1) var(--space-2);
  border: 1px solid #42664b;
  border-radius: var(--pill);
  background: var(--brand-soft);
  color: #9eeaaf;
  font-size: .68rem;
}
.whitelist-empty { padding: var(--space-4) 0; border-top: 1px solid var(--border); color: var(--muted); font-size: var(--text-small); list-style: none; }
.whitelist-empty strong, .whitelist-empty span { display: block; }
.whitelist-empty strong { margin-bottom: var(--space-1); color: #d7d7d7; font-size: var(--text-small); }
.whitelist-empty span { line-height: 1.55; }
.whitelist-edit-button {
  min-height: 0;
  margin-top: var(--space-1);
  padding: 0;
  border: 0;
  background: transparent;
  color: #a9a9a9;
  font-size: .72rem;
  font-weight: 500;
  text-decoration: underline;
}
.whitelist-player.editing { display: block; }
.whitelist-editor strong { margin-bottom: var(--space-2); }
.whitelist-options { display: grid; gap: var(--space-2); }
.whitelist-option { display: flex; align-items: center; gap: var(--space-2); margin: 0; }
.whitelist-option input { min-height: 0; margin: 0; accent-color: var(--brand); }
.whitelist-editor-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.whitelist-editor-actions button { min-height: 32px; padding: var(--space-1) var(--space-2); font-size: .76rem; }
.whitelist-page { margin-top: var(--space-6); }
.whitelist-page > .section-heading h2 { margin-bottom: var(--space-2); font-size: var(--text-title); }
.whitelist-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin: var(--space-5) 0 var(--space-7);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.whitelist-stats div { padding: var(--space-5); border-right: 1px solid var(--border); }
.whitelist-stats div:last-child { border-right: 0; }
.whitelist-stats span { display: block; margin-bottom: var(--space-2); color: var(--muted); font-size: var(--text-small); }
.whitelist-stats strong { display: block; font-size: 1.65rem; line-height: 1; }
.whitelist-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.whitelist-section-heading h3 { margin-bottom: var(--space-1); font-size: 1.12rem; }
.request-grid, .whitelist-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.request-card, .whitelist-player, .whitelist-state-card {
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.request-card { display: flex; min-height: 285px; flex-direction: column; }
.request-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.request-card h4 { margin: var(--space-1) 0 0; font-size: 1.3rem; }
.request-number { color: var(--muted); font-size: var(--text-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.request-status { padding: var(--space-1) var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--pill); color: #d6d8dc; font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.request-status.pending { border-color: #735f2d; background: #372f1e; color: #ead77e; }
.request-status.approved { border-color: #467e53; background: var(--brand-soft); color: #9eeaaf; }
.request-status.denied { border-color: #77484a; background: var(--danger-soft); color: #f3aaa5; }
.request-submitted { margin: var(--space-3) 0 0; color: var(--muted); font-size: var(--text-small); }
.request-detail { margin: var(--space-3) 0 var(--space-5); color: #d0d2d6; font-size: var(--text-small); }
.request-controls { margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--border); }
.request-control-label { display: block; margin-bottom: var(--space-2); color: var(--muted); font-size: var(--text-label); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.approval-choices { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.approval-choices label { padding: var(--space-2) var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--pill); background: var(--surface-soft); }
.request-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.whitelist-overview { margin-top: 0; }
.whitelist-player { align-items: center; min-height: 116px; border-top: 1px solid var(--border); }
.whitelist-player strong { margin-bottom: var(--space-3); color: #f0f1f2; font-size: 1.05rem; }
.whitelist-player .whitelist-edit-button {
  min-height: 34px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  background: transparent;
  color: #e0e1e3;
  font-size: .78rem;
  font-weight: 650;
  text-decoration: none;
}
.whitelist-state-card { grid-column: 1 / -1; list-style: none; color: var(--muted); }
.whitelist-state-card strong, .whitelist-state-card span { display: block; }
.whitelist-state-card strong { margin-bottom: var(--space-1); color: #e2e3e5; }
.whitelist-empty { grid-column: 1 / -1; padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); }
.whitelist-editor { width: 100%; }
.whitelist-editor .whitelist-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.server-detail-page { margin-top: var(--space-6); }
.back-button {
  min-height: 0;
  margin-bottom: var(--space-4);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-small);
  font-weight: 600;
}
.back-button:hover { background: transparent; color: var(--brand); }
.detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.detail-control-panel { display: grid; justify-items: end; gap: var(--space-2); }
.detail-control-panel .actions { margin-top: 0; }
.detail-kicker { margin-bottom: var(--space-1); color: var(--muted); font-size: var(--text-label); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.detail-header h2 { margin: 0; font-size: var(--text-title); }
.detail-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow); }
.detail-summary div { min-width: 0; padding: var(--space-4); border-right: 1px solid var(--border); }
.detail-summary div:last-child { border-right: 0; }
.detail-summary span { display: block; margin-bottom: var(--space-1); color: var(--muted); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; }
.detail-summary strong { display: block; overflow-wrap: anywhere; font-size: .93rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.detail-card { min-width: 0; padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow); }
.detail-card h3 { margin-bottom: var(--space-4); }
.detail-card dl { display: grid; grid-template-columns: minmax(115px, .7fr) minmax(0, 1.3fr); gap: var(--space-2) var(--space-4); margin: 0; }
.detail-card dt { color: var(--muted); font-size: var(--text-small); }
.detail-card dd { margin: 0; overflow-wrap: anywhere; font-size: var(--text-small); }
.detail-card ul { margin: 0; color: #d0d0d0; font-size: var(--text-small); }
.detail-plugins ul { columns: 2; column-gap: var(--space-5); }
.detail-plugins li { break-inside: avoid; margin-bottom: var(--space-2); }
.detail-plugins li span, .detail-plugins li small { display: block; }
.detail-plugins li small { margin-top: var(--space-1); color: var(--muted); font-size: .68rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.server-card, .metrics, .compact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}
.server-card { display: flex; min-height: 330px; padding: var(--space-5); flex-direction: column; }
.server-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.server-card-heading h3 { margin: 0; font-size: 1.45rem; }
.server-card-heading .detail-kicker { margin-bottom: var(--space-2); }
.server-card-players { min-height: 92px; margin-top: var(--space-4); }
.server-card-players > p:first-child { margin-bottom: var(--space-2); color: #d6d8dc; font-weight: 600; }
.server-card-players ul { margin: 0; padding-left: var(--space-5); color: var(--muted); font-size: var(--text-small); }
.server-card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
}
.server-card-meta span { display: block; margin-bottom: var(--space-1); color: var(--muted); font-size: .68rem; letter-spacing: .04em; }
.server-card-meta strong { display: block; overflow-wrap: anywhere; color: #e6e7e9; font-size: .88rem; }
.server-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.server-card-footer .actions { margin-top: 0; justify-content: flex-end; }
.server-details-button { white-space: nowrap; }
.row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.server-card .row { justify-content: space-between; }
.badge {
  border: 1px solid var(--border-strong);
  border-radius: var(--pill);
  background: var(--surface-raised);
  padding: var(--space-1) var(--space-3);
  color: #d6d8dc;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge.online { border-color: #467e53; background: var(--brand-soft); color: #9eeaaf; }
.badge.offline { border-color: #77484a; background: var(--danger-soft); color: #f3aaa5; }
.actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-4); }

button, input, select {
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  font: inherit;
}
button {
  padding: var(--space-2) var(--space-3);
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
  font-size: .86rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
button:hover:not(:disabled) { border-color: var(--brand-hover); background: var(--brand-hover); }
button.secondary, [data-action="restart"] { border-color: var(--border-strong); background: var(--surface-raised); color: #e5e6e8; }
button.secondary:hover:not(:disabled), [data-action="restart"]:hover:not(:disabled) { border-color: #5d626e; background: #343740; }
[data-action="stop"] { border-color: #7a484a; background: var(--danger-soft); color: #f4aaa5; }
[data-action="stop"]:hover:not(:disabled) { border-color: #96575a; background: #492b2d; }
button:disabled { opacity: .42; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
input, select { padding: var(--space-2) var(--space-3); background: var(--surface-soft); color: #f0f1f2; }
label { display: block; margin: var(--space-3) 0 var(--space-1); color: #b6b6b6; font-size: .85rem; }

.compact {
  max-width: 440px;
  margin: 10vh 0;
  padding: var(--space-6);
  border-top: 3px solid var(--brand);
}
.compact h1 { margin: var(--space-6) 0 var(--space-5); font-size: var(--text-title); }
.compact input { display: block; width: 100%; margin-bottom: var(--space-4); }
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  width: min(100%, 520px);
  padding: 0;
  overflow: hidden;
}
.metrics div { min-width: 150px; padding: var(--space-4) var(--space-5); border-right: 1px solid var(--border); }
.metrics div:last-child { border-right: 0; }
.metrics span { display: block; color: var(--muted); font-size: .7rem; letter-spacing: .08em; }
.metrics strong { font-size: 1.4rem; font-weight: 540; }
.section-heading { justify-content: space-between; align-items: end; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.backup-panel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow); }
.backup-panel div { min-width: 0; padding: var(--space-4); border-right: 1px solid var(--border); }
.backup-panel div:last-child { border-right: 0; }
.backup-panel span { display: block; margin-bottom: var(--space-1); color: var(--muted); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.backup-panel strong { display: block; overflow-wrap: anywhere; font-size: .82rem; }
.backup-state.completed { color: #9eeaaf; }
.backup-state.failed { color: #f3aaa5; }
.backup-state.running { color: var(--warning); }
.backup-page { max-width: 980px; margin-top: var(--space-6); }
.backup-page h2 { margin: 0 0 var(--space-2); font-size: var(--text-title); }
.backup-note { max-width: 680px; margin-top: var(--space-5); color: var(--muted); font-size: var(--text-small); line-height: var(--leading-body); }
.audit-filters { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
.audit-filters label { margin: 0; }
.audit-filters input { min-width: 230px; }

pre {
  height: 310px;
  overflow: auto;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #101115;
  color: #d8dae0;
  font: .78rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.table-state { padding: var(--space-6) var(--space-5); background: var(--surface); text-align: left; }
.table-state strong, .table-state span { display: block; }
.table-state strong { margin-bottom: 4px; color: #dedede; font-size: var(--text-body); }
.table-state span { color: var(--muted); font-size: var(--text-small); line-height: 1.55; }
.list-state { padding: var(--space-3) 0; color: var(--muted); list-style: none; }
.list-state strong, .list-state span { display: block; }
.list-state strong { margin-bottom: var(--space-1); color: #d7d7d7; font-size: var(--text-small); }
.list-state span { font-size: var(--text-small); line-height: 1.55; }
.is-loading { animation: state-pulse 1.4s ease-in-out infinite alternate; }
@keyframes state-pulse { from { opacity: .48; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .is-loading { animation: none; } }
.command-row { display: flex; gap: var(--space-2); }
.command-row input { flex: 1; min-width: 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-large); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: var(--text-small); }
th, td { padding: var(--space-3); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: var(--surface-soft); color: var(--muted); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td button { margin: 0 var(--space-1) var(--space-1) 0; }
.approval-choices { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.approval-choices label { display: flex; align-items: center; gap: var(--space-2); margin: 0; white-space: nowrap; }
.approval-choices input { min-height: 0; margin: 0; accent-color: var(--brand); }
.audit-status { font-size: .75rem; text-transform: capitalize; }
.audit-status.completed { color: #9eeaaf; }
.audit-status.failed { color: #f3aaa5; }
.audit-status.accepted { color: #c9c9c9; }
.error { color: var(--danger); font-size: .86rem; overflow-wrap: anywhere; }
.error:empty { display: none; }
.notice { padding: var(--space-3) var(--space-4); border: 1px solid #3e6748; border-left: 4px solid var(--brand); border-radius: var(--radius); background: var(--brand-soft); color: #e5f4e8; }
.console-picker { margin: 0 0 var(--space-3); }
.console-picker select { min-width: 150px; }
.pagination { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-4); }
ul { padding-left: var(--space-5); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
[hidden] { display: none !important; }

/* Compact admin density */
.admin-header { margin-bottom: var(--space-5); }
.admin-header .brand h1 { font-size: 1.5rem; }
.admin-header .brand .site-address { font-size: .78rem; }
.admin-header #connection { margin-top: var(--space-1); font-size: .7rem; }
.portal-shell { font-size: .83rem; }
.portal-shell section { margin: var(--space-4) 0; }
.portal-shell h2 { margin-bottom: var(--space-3); font-size: 1rem; }
.portal-shell button, .portal-shell input, .portal-shell select { min-height: 32px; }
.portal-shell button { padding: 5px 9px; font-size: .74rem; }
.portal-switcher { margin-bottom: var(--space-3); padding-bottom: var(--space-2); }
.portal-switcher button { min-height: 30px; padding: 5px 9px; font-size: .74rem; }
.portal-shell .portal-switcher button:hover:not(:disabled) { border-color: transparent; background: var(--surface); color: #f4f5f6; }
.portal-shell .portal-switcher button.active,
.portal-shell .portal-switcher button.active:hover:not(:disabled) { border-color: #3f704a; background: var(--brand-soft); color: var(--brand); }
.grid { gap: 10px; }
.server-card { min-height: 250px; padding: var(--space-3); }
.server-card-heading h3 { font-size: 1.1rem; }
.server-card-players { min-height: 60px; margin-top: var(--space-2); }
.server-card-meta { gap: var(--space-2); margin-top: var(--space-2); padding: 10px 0; }
.server-card-meta span { font-size: .62rem; }
.server-card-meta strong { font-size: .8rem; }
.server-card-footer { padding-top: 10px; }
.badge { padding: 3px 8px; font-size: .65rem; }
.metrics { width: min(100%, 470px); }
.metrics div { padding: 10px var(--space-3); }
.metrics strong { font-size: 1.05rem; }
.whitelist-page { margin-top: var(--space-4); }
.utility-page { max-width: 1080px; margin-top: var(--space-4); }
.utility-page > .section-heading { margin-bottom: var(--space-4); }
.utility-page > .section-heading h2 { margin-bottom: var(--space-1); font-size: 1.3rem; }
.console-page { max-width: 920px; }
.console-page .console-picker { width: 180px; }
.console-page .console-picker label { margin-top: 0; }
.whitelist-page > .section-heading h2, .backup-page h2, .detail-header h2 { font-size: 1.3rem; }
.whitelist-stats { margin: var(--space-3) 0 var(--space-5); }
.whitelist-stats div { padding: var(--space-3); }
.whitelist-stats strong { font-size: 1.2rem; }
.request-grid, .whitelist-overview { gap: 10px; }
.request-card, .whitelist-player, .whitelist-state-card { padding: var(--space-3); }
.request-card { min-height: 215px; }
.request-card h4 { font-size: 1rem; }
.request-submitted { margin-top: var(--space-2); }
.request-detail { margin: var(--space-2) 0 var(--space-3); }
.request-controls { padding-top: 10px; }
.approval-choices { gap: 6px; margin-bottom: 10px; }
.approval-choices label { padding: 5px 9px; }
.whitelist-player { min-height: 82px; }
.whitelist-player strong { margin-bottom: 6px; font-size: .88rem; }
.server-tag { padding: 3px 7px; font-size: .62rem; }
.detail-header { margin-bottom: var(--space-3); }
.detail-summary div, .detail-card, .backup-panel div { padding: 10px; }
.detail-grid { gap: 8px; margin-top: 8px; }
.detail-card h3 { margin-bottom: 10px; }
.portal-shell pre { height: 210px; padding: 10px; font-size: .68rem; }
.portal-shell th, .portal-shell td { padding: 6px 8px; }
.portal-shell .table-state { padding: var(--space-4) var(--space-3); }
.portal-shell .pagination { gap: 10px; margin-top: 10px; }

/* Operational upgrades */
.nav-badge { display: inline-grid; min-width: 18px; height: 18px; place-items: center; padding: 0 5px; border-radius: var(--pill); background: var(--brand); color: var(--brand-ink); font-size: .62rem; font-weight: 800; }
.nav-warning { display: inline-block; width: 7px; height: 7px; margin-left: 3px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.server-identity { display: flex; align-items: center; gap: 10px; }
.server-mark { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border: 1px solid #477a52; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: 1rem; font-weight: 800; }
.maintenance-card { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); }
.maintenance-card h2 { margin: 2px 0 4px; }
.maintenance-card p { margin: 0; }
.maintenance-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }
.whitelist-toolbar { display: flex; gap: var(--space-2); margin: 0 0 var(--space-3); }
.whitelist-toolbar label { margin: 0; }
.whitelist-toolbar input { width: 230px; }
.backup-catalog-heading { margin: var(--space-5) 0 var(--space-3); }
.backup-catalog-heading h3 { margin: 0 0 3px; }
.backup-catalog { display: grid; gap: 8px; }
.backup-snapshot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(180px, .8fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.backup-snapshot > strong, .backup-snapshot > span { display: block; }
.backup-snapshot-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
.backup-snapshot h4 { margin: 0 0 3px; font-size: .88rem; }
.backup-snapshot code { color: var(--muted); font-size: .64rem; }
.backup-snapshot-meta { display: grid; gap: 3px; color: var(--muted); font-size: .7rem; }
.backup-snapshot-actions { display: flex; gap: 6px; justify-content: flex-end; }
.backup-snapshot-actions .button-link { min-height: 32px; padding: 5px 9px; border-color: var(--border-strong); background: var(--surface-raised); color: #ddd; font-size: .7rem; }
.checksum-status { padding: 3px 7px; border: 1px solid var(--border-strong); border-radius: var(--pill); color: var(--muted); font-size: .61rem; white-space: nowrap; }
.checksum-status.verified_at_creation { border-color: #477a52; background: var(--brand-soft); color: #9eeaaf; }
.checksum-status.incomplete, .checksum-status.invalid_manifest { border-color: #77484a; background: var(--danger-soft); color: #f3aaa5; }
.confirm-dialog { width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-large); background: var(--surface); color: var(--text); box-shadow: 0 24px 90px #000b; }
.confirm-dialog::backdrop { background: #050607c9; backdrop-filter: blur(3px); }
.confirm-dialog form { padding: var(--space-5); }
.confirm-dialog h2 { margin: 3px 0 var(--space-4); font-size: 1.3rem; }
.confirm-impact { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); }
.confirm-impact div { padding: var(--space-3); }
.confirm-impact div + div { border-left: 1px solid var(--border); }
.confirm-impact span, .confirm-impact strong { display: block; }
.confirm-impact span { margin-bottom: 3px; color: var(--muted); font-size: .65rem; text-transform: uppercase; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-5); }
.restore-dialog label { display: grid; gap: 5px; margin-top: var(--space-3); }
.maintenance-banner { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border: 1px solid #71662f; border-radius: var(--radius); background: #282617; color: #eadb90; font-size: var(--text-small); }
.maintenance-banner strong { white-space: nowrap; }
.updates-page h2 { font-size: 1.3rem; }
.update-safety-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: var(--space-4) 0 var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); overflow: hidden; }
.update-safety-grid > div { min-width: 0; padding: var(--space-3); }
.update-safety-grid > div + div { border-left: 1px solid var(--border); }
.update-safety-grid span, .update-safety-grid strong, .update-safety-grid small { display: block; }
.update-safety-grid span { color: var(--muted); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; }
.update-safety-grid strong { margin: 3px 0; font-size: .82rem; }
.update-safety-grid small { color: var(--muted); font-size: .64rem; }
.update-toolbar { display: flex; align-items: end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-3); }
.update-toolbar h3 { margin: 0 0 3px; }
.update-toolbar p { margin: 0; }
.update-catalog { display: grid; gap: 8px; }
.update-item { display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(220px, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.update-item.update { border-color: #3c6546; background: #18201a; }
.update-choice { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; }
.update-choice input { width: 16px; min-height: 16px; margin: 0; }
.update-choice span, .update-choice strong, .update-choice small { display: block; min-width: 0; }
.update-choice strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.update-choice small { margin-top: 2px; color: var(--muted); font-size: .64rem; }
.update-versions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.update-versions span, .update-versions small, .update-versions strong { display: block; min-width: 0; }
.update-versions small { color: var(--muted); font-size: .6rem; text-transform: uppercase; }
.update-versions strong { margin-top: 3px; overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.update-status { justify-self: end; padding: 3px 7px; border: 1px solid var(--border-strong); border-radius: var(--pill); color: var(--muted); font-size: .61rem; white-space: nowrap; }
.update-status.update { border-color: #477a52; background: var(--brand-soft); color: #9eeaaf; }
.update-status.manual { border-color: #71662f; background: #282617; color: #eadb90; }
.update-reason { grid-column: 1 / -1; margin: -4px 0 0 26px; font-size: .66rem; }
.update-group-details { grid-column: 1 / -1; margin: 0 0 0 26px; border-top: 1px solid var(--border); }
.update-group-details summary { width: fit-content; margin-top: 9px; padding: 5px 0; color: var(--brand); cursor: pointer; font-size: .68rem; font-weight: 700; list-style-position: inside; }
.update-group-servers { display: grid; gap: 5px; padding: 5px 0 2px; }
.update-server-choice { display: grid; grid-template-columns: 18px minmax(110px, .5fr) 1fr; align-items: center; gap: 9px; margin: 0; padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--surface-raised); }
.update-server-choice input { width: 15px; min-height: 15px; margin: 0; }
.update-server-choice strong { font-size: .7rem; }
.update-server-choice span { color: var(--muted); font-size: .67rem; }
.update-empty { display: grid; gap: 3px; padding: var(--space-5); border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--muted); }
.update-empty strong { color: var(--text); }
.update-dialog { width: min(520px, calc(100vw - 32px)); }

/* Public site */
.public-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding: var(--space-2) 0 var(--space-6); border-bottom: 1px solid var(--border); }
.public-nav div, .public-footer div { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.public-nav a, .public-footer a { color: #aaa; font-size: .82rem; text-decoration: none; }
.public-nav a:hover, .public-footer a:hover { color: var(--brand); }
.public-wordmark { color: #fff !important; font-weight: 760; letter-spacing: .14em; }
.public-hero { min-height: 490px; margin: 0; padding: var(--space-10) 0 var(--space-8); }
.public-hero-compact { min-height: 310px; padding-top: var(--space-9); }
.public-kicker { margin-bottom: var(--space-3); color: #969696; font-size: var(--text-label); font-weight: 700; letter-spacing: .18em; }
.public-hero h1 { max-width: 900px; margin-bottom: var(--space-5); font-size: var(--text-display); font-weight: 750; line-height: var(--leading-tight); letter-spacing: -.055em; }
.public-form-shell h1, .privacy-copy h1 { max-width: 900px; margin-bottom: var(--space-5); font-size: var(--text-page); font-weight: 750; line-height: var(--leading-tight); letter-spacing: -.05em; }
.public-intro { max-width: 600px; color: #aaa; font-size: 1.125rem; line-height: var(--leading-body); }
.public-actions { display: flex; align-items: stretch; gap: var(--space-2); margin-top: var(--space-6); flex-wrap: wrap; }
.address-button { display: flex; align-items: center; gap: var(--space-5); min-width: 280px; border-color: var(--border-strong); background: var(--surface); color: #f0f1f2; text-align: left; }
.address-button:hover:not(:disabled) { border-color: #4d7c58; background: var(--brand-soft); color: #eaf7ed; }
.address-button small { color: #8e8e8e; font-size: .7rem; font-weight: 500; }
.button-link { display: inline-flex; align-items: center; min-height: 42px; padding: var(--space-2) var(--space-4); border: 1px solid var(--brand); border-radius: var(--radius-small); background: var(--brand); color: var(--brand-ink); font-size: .86rem; font-weight: 700; text-decoration: none; transition: background-color .16s ease, border-color .16s ease; }
.button-link:hover { border-color: var(--brand-hover); background: var(--brand-hover); }
.copy-feedback { min-height: 1.4em; margin-top: var(--space-2); color: #9e9e9e; font-size: .78rem; }
.public-status { margin: 0; padding: var(--space-8) 0; border-top: 1px solid var(--border); }
.public-section-heading { display: flex; align-items: end; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-5); }
.public-section-heading h2 { font-size: var(--text-title); }
.public-section-heading > p { color: #888; font-size: var(--text-small); }
.public-server-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.public-server-card { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); min-height: 132px; padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow); }
.public-server-card h3 { margin-bottom: var(--space-2); }
.public-server-card p { color: #888; font-size: var(--text-small); }
.public-state { padding: var(--space-1) var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--pill); background: var(--surface-raised); color: #bbbfc7; font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; }
.public-state.online { border-color: #467e53; background: var(--brand-soft); color: #9eeaaf; }
.public-state.offline { border-color: #77484a; background: var(--danger-soft); color: #f3aaa5; }
.public-state.unresponsive { border-color: #71662f; background: #37331f; color: #eadb90; }
.public-footer { display: flex; justify-content: space-between; gap: var(--space-5); padding: var(--space-6) 0 var(--space-1); border-top: 1px solid var(--border); color: #858892; font-size: .78rem; }
.public-form-shell { max-width: 600px; margin: var(--space-9) 0; }
.privacy-copy { max-width: 760px; margin: var(--space-9) 0; }
.public-form-shell > p, .privacy-copy > p { color: #aaa; line-height: var(--leading-body); }
.public-form { max-width: 520px; margin: var(--space-6) 0 var(--space-5); }
.public-form input { display: block; width: 100%; margin-bottom: var(--space-4); }
.public-form button { width: 100%; }
.cf-turnstile { min-height: 65px; margin: var(--space-4) 0; }
.public-fineprint { max-width: 520px; font-size: .78rem; }
.public-fineprint a { color: #ccc; }
.tracking-code { margin: var(--space-6) 0 var(--space-4); padding: var(--space-4); border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); overflow-wrap: anywhere; }
.tracking-code code { font-size: 1rem; }
.status-result { margin-top: var(--space-6); padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow); }
.status-result span { display: block; color: #888; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.status-result strong { display: block; margin: var(--space-1) 0 var(--space-2); font-size: 1.3rem; }
.privacy-copy h2 { margin: var(--space-7) 0 var(--space-2); color: #ddd; font-size: var(--text-small); font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }

@media (max-width: 640px) {
  main { padding: var(--space-5) var(--space-4) var(--space-7); }
  header { align-items: flex-start; margin-bottom: var(--space-6); }
  h1 { font-size: 1.75rem; }
  .grid { grid-template-columns: 1fr; }
  .metrics { display: grid; grid-template-columns: repeat(3, 1fr); }
  .metrics div { min-width: 0; padding: var(--space-3); }
  .metrics strong { font-size: 1.15rem; }
  .command-row { flex-wrap: wrap; }
  .command-row input { flex-basis: 100%; }
  .backup-panel { grid-template-columns: 1fr; }
  .backup-panel div { border-right: 0; border-bottom: 1px solid var(--border); }
  .backup-panel div:last-child { border-bottom: 0; }
  .audit-filters { display: grid; }
  .audit-filters input { min-width: 0; width: 100%; }
}

@media (max-width: 900px) {
  .portal-switcher { overflow-x: auto; }
  .portal-switcher button { width: auto; flex: 0 0 auto; }
  .dashboard-layout { display: block; }
  .detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-summary div:nth-child(2) { border-right: 0; }
  .detail-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .public-server-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .portal-shell button, .portal-shell input, .portal-shell select { min-height: 34px; }
  .whitelist-stats, .request-grid, .whitelist-overview { grid-template-columns: 1fr; }
  .whitelist-stats div { border-right: 0; border-bottom: 1px solid var(--border); }
  .whitelist-stats div:last-child { border-bottom: 0; }
  .request-card { min-height: 0; }
  .whitelist-player { align-items: flex-start; flex-direction: column; }
  .whitelist-servers { justify-content: flex-start; }
  .whitelist-editor .whitelist-options { grid-template-columns: 1fr; }
  .server-card { min-height: 0; }
  .server-card-meta { grid-template-columns: 1fr; }
  .server-card-footer { align-items: stretch; flex-direction: column; }
  .server-card-footer .actions { justify-content: flex-start; }
  .server-details-button { width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-card dl { grid-template-columns: 1fr; gap: var(--space-1); }
  .detail-card dd { margin-bottom: 8px; }
  .detail-plugins ul { columns: 1; }
  .public-nav { align-items: flex-start; }
  .public-nav div { justify-content: flex-end; gap: var(--space-3); }
  .public-hero { min-height: 430px; padding: var(--space-8) 0 var(--space-7); }
  .public-hero h1 { font-size: 2.75rem; }
  .public-server-grid { grid-template-columns: 1fr; }
  .public-section-heading, .public-footer { align-items: flex-start; flex-direction: column; }
  .address-button { min-width: 0; width: 100%; }
  .public-actions .button-link { width: 100%; justify-content: center; }
  .public-form-shell, .privacy-copy { margin: var(--space-7) 0; }
  .maintenance-card, .maintenance-banner { align-items: flex-start; flex-direction: column; }
  .maintenance-actions { justify-content: flex-start; }
  .whitelist-toolbar { display: grid; }
  .whitelist-toolbar input { width: 100%; }
  .backup-snapshot { grid-template-columns: 1fr; }
  .backup-snapshot-actions { justify-content: flex-start; flex-wrap: wrap; }
  .update-safety-grid { grid-template-columns: 1fr 1fr; }
  .update-safety-grid > div + div { border-left: 0; }
  .update-safety-grid > div:nth-child(even) { border-left: 1px solid var(--border); }
  .update-safety-grid > div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .update-toolbar { align-items: stretch; flex-direction: column; }
  .update-item { grid-template-columns: 1fr; }
  .update-status { justify-self: start; }
  .update-reason { grid-column: auto; margin-left: 0; }
  .update-group-details { grid-column: auto; margin-left: 0; }
  .update-server-choice { grid-template-columns: 18px 1fr; }
  .update-server-choice span { grid-column: 2; }
}
