:root {
  --bg: #202020;
  --panel: #292929;
  --panel-raised: #303030;
  --line: #3b3b3b;
  --line-strong: #505050;
  --text: #ececec;
  --muted: #a7a7a7;
  --accent: #a48fe0;
  --accent-hover: #b6a3eb;
  --green: #42c66a;
  --red: #f05d5e;
  --radius-sm: 8px;
  --radius: 12px;
  --sidebar-width: 224px;
  --sidebar-padding-x: 14px;
  --sidebar-padding-top: 24px;
  --sidebar-padding-bottom: 18px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --text-2xs: 10px;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-md: 13.5px;
  --text-xl: 22px;
  --motion-fast: 140ms;
  --motion-medium: 220ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 14px 40px rgba(0, 0, 0, .22);
}

body {
  min-height: 100vh;
  background: var(--bg);
  font-family: "Inter", sans-serif;
  letter-spacing: -.006em;
}

.app-frame {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: var(--sidebar-padding-top) var(--sidebar-padding-x) var(--sidebar-padding-bottom);
  border-right: 1px solid var(--line);
  background: var(--panel-raised);
}

.app-brand {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-1);
  padding: 4px 6px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.app-brand strong {
  display: block;
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .04em;
}

.app-nav,
.server-navigation,
.server-tabs {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.app-nav a,
.server-home-link,
.server-tabs button {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
  transition:
    background-color var(--motion-fast) ease,
    color var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-out);
}

.app-nav a:active,
.server-home-link:active,
.server-tabs button:active {
  transform: scale(.985);
}

.app-nav a:hover,
.app-nav a.active,
.server-tabs button:hover,
.server-home-link:hover,
.server-tabs button[aria-selected="true"] {
  background: rgba(164, 143, 224, .16);
  color: var(--text);
}

.app-nav a > span,
.server-home-link > span,
.server-tabs button > span {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 2px;
  background: #6e6e6e;
  transition: background-color var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.app-nav a.active > span,
.server-tabs button[aria-selected="true"] > span {
  background: var(--accent);
  transform: scale(1.18);
}

.sidebar-utilities {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: auto;
  padding: 14px 6px 0;
  border-top: 1px solid var(--line);
}

.sidebar-utilities a {
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.sidebar-utilities .sidebar-utility-link,
.sidebar-utilities .link-button {
  padding: 3px 0;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 500;
  text-align: left;
}

.sidebar-utilities .sidebar-utility-link:hover,
.sidebar-utilities .link-button:hover {
  color: var(--text);
}

.sidebar-utilities .sidebar-identity {
  padding: 3px 0;
}

.sidebar-utilities strong,
.sidebar-utilities small {
  display: block;
  max-width: 174px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-utilities strong {
  font-size: var(--text-xs);
  font-weight: 600;
}

.sidebar-utilities small {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-2xs);
  text-transform: capitalize;
}

.sidebar-utilities form {
  margin: 0;
}

.language-switch {
  display: flex;
  gap: 4px;
}

.language-switch form {
  margin: 0;
}

.language-switch button {
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}

.language-switch button.active,
.language-switch button:hover {
  border-color: var(--accent);
  background: rgba(164, 143, 224, .16);
  color: var(--text);
}

.public-language {
  position: fixed;
  top: 20px;
  right: 20px;
}

body:has(.public-main) {
  overflow: hidden;
}

.public-main {
  display: grid;
  width: 100%;
  height: 100dvh;
  max-width: none;
  margin: 0;
  padding: clamp(24px, 5vh, 48px) 24px;
  overflow-y: auto;
  place-items: center;
}

.public-main .auth-card {
  width: min(100%, 500px);
  margin: 0;
}

body:has(.server-shell) .app-frame {
  grid-template-columns: minmax(0, 1fr);
}

body:has(.server-shell) .app-sidebar {
  display: none;
}

header {
  height: 72px;
  padding-right: max(26px, calc((100% - 1180px) / 2));
  padding-left: max(26px, calc((100% - 1180px) / 2));
  background: rgba(32, 32, 32, .9);
  backdrop-filter: blur(14px);
}

header > a {
  letter-spacing: -.025em;
}

header .brand-mark {
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  letter-spacing: .5px;
}

header nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

header nav a:hover {
  color: var(--text);
}

main {
  max-width: 1232px;
  margin-top: 44px;
  margin-bottom: 72px;
}

.app-frame > main:not(:has(.server-shell)) {
  width: 100%;
  padding: 0 clamp(24px, 4vw, 56px);
}

.app-frame > main:has(.dashboard-page) {
  max-width: 1500px;
}

@media (min-width: 761px) {
  .app-frame:has(.dashboard-page) {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .app-frame > main:has(.dashboard-page) {
    height: 100%;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
    overflow: hidden;
  }

  .dashboard-page {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
  }

  .dashboard-page .server-list {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
  }

  .dashboard-page .server-list-body {
    min-height: 0;
    max-height: none;
    flex: 1;
  }
}

main:has(.server-shell) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3 {
  line-height: 1.18;
  letter-spacing: -.025em;
}

h1 {
  font-size: clamp(24px, 3vw, 30px);
}

h2 {
  font-size: 20px;
}

p {
  margin-top: 6px;
}

.details div:last-child {
  border-bottom: 0;
}

.card,
.empty {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--panel-raised);
  box-shadow: none;
}

.server-card {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.server-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: none;
}

.button,
button,
.mini-button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 720;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .12s ease;
}

.button,
button:not(.secondary):not(.danger):not(.link-button):not(.file-name):not(.toast-close):not(.copy):not([role="tab"]) {
  background: var(--accent);
  color: #251708;
}

.button:hover,
button:not(:disabled):not(.secondary):not(.danger):not(.link-button):not(.file-name):not(.toast-close):not(.copy):not([role="tab"]):hover {
  background: var(--accent-hover);
}

button:not(:disabled):active,
.button:active {
  transform: translateY(1px);
}

.secondary,
.mini-button {
  border-color: var(--line);
  background: #393939;
  color: var(--text);
}

.compact {
  min-height: 32px;
  padding: 6px 10px;
  font-size: var(--text-sm);
}

.secondary:not(:disabled):hover,
.mini-button:hover {
  border-color: var(--line-strong);
  background: #454545;
}

.danger {
  border-color: #8c3d42;
  background: #8c353a;
  color: #fff;
}

.danger:not(:disabled):hover {
  background: #a54146;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border-color: var(--line) !important;
  border-radius: var(--radius-sm) !important;
  background: #242424 !important;
  color: var(--text) !important;
  transition: border-color .16s ease, box-shadow .16s ease;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--accent) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(164, 143, 224, .16);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.status {
  border: 1px solid rgba(255, 255, 255, .05);
  font-size: 13px;
  font-weight: 650;
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1000;
  display: flex;
  width: min(390px, calc(100vw - 32px));
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid #484848;
  border-radius: 11px;
  background: var(--panel-raised);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .32);
  color: var(--text);
  opacity: 0;
  pointer-events: auto;
  transform: translateY(12px) scale(.98);
  transition: opacity .2s ease, transform .2s ease;
}

.toast-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-success {
  border-left: 3px solid var(--accent);
}

.toast-error {
  border-left: 3px solid var(--red);
}

.toast-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: rgba(164, 143, 224, .18);
  color: var(--accent);
  font-weight: 850;
}

.toast-error .toast-icon {
  background: rgba(169, 120, 120, .18);
  color: #cb9494;
}

.operation-toast {
  grid-template-columns: 28px 1fr;
}

.operation-toast strong,
.operation-toast small {
  display: block;
}

.operation-toast small {
  margin-top: 2px;
  color: var(--muted);
}

.operation-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(164, 143, 224, .28);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: operation-spin .8s linear infinite;
}

.operation-result {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
}

.operation-result.success { background: rgba(66, 198, 106, .16); color: var(--green); }
.operation-result.error { background: rgba(240, 93, 94, .16); color: var(--red); }

@keyframes operation-spin {
  to { transform: rotate(360deg); }
}

.toast-close {
  min-height: 28px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
}

.editor-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-name,
.copy {
  min-height: auto;
}

.details .copy.mini-button {
  min-height: 30px;
  margin-left: var(--space-2);
  padding: 4px 9px;
  color: var(--text);
  font-size: var(--text-xs);
}

.notice-error {
  border-color: #8c2f2f;
  background: #351717;
  color: #ff7b72;
}

.hidden {
  display: none !important;
}

.secondary {
  background: #30363d;
  color: var(--text);
}

.server-tabs {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.tab-panel {
  min-height: 240px;
}

.tab-panel:not(.hidden) {
  animation: tab-enter var(--motion-medium) var(--ease-out) both;
}

.server-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--bg);
}

.server-sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0;
  padding: var(--sidebar-padding-top) var(--sidebar-padding-x) var(--sidebar-padding-bottom);
  border-right: 1px solid var(--line);
  background: var(--panel-raised);
}

.server-heading-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-3);
}

.server-heading-identity > div {
  min-width: 0;
}

.server-heading-identity h1,
.server-heading-identity p {
  margin-bottom: 0;
}

.server-glyph {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #241d34;
  font-weight: 850;
}

.server-workspace {
  min-width: 0;
  padding: 26px clamp(var(--space-6), 3vw, var(--space-12)) var(--space-12);
  animation: workspace-enter var(--motion-medium) var(--ease-out) both;
}

.app-frame > main > :not(.server-shell) {
  animation: workspace-enter var(--motion-medium) var(--ease-out) both;
}

.server-workspace .card:hover {
  border-color: var(--line);
}

@keyframes workspace-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes tab-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.server-heading {
  margin: 0 0 20px;
}

.server-heading h1 {
  font-size: 16px;
  font-weight: 600;
}

.server-heading p {
  margin: 4px 0 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

code,
#console-output,
.command-form input,
.details dd,
.metric strong {
  font-family: "JetBrains Mono", monospace;
}

.section-label {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.install-card {
  align-self: stretch;
}

.install-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.install-heading h2 {
  margin-bottom: 0;
  text-transform: capitalize;
}

.install-track {
  height: 8px;
  margin: 22px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #3a3a3a;
}

.install-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .35s ease;
}

.install-track span.failed {
  background: var(--red);
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.install-steps span {
  color: #6f6f6f;
  font-size: 10px;
  text-align: center;
  transition: color .2s ease;
}

.install-steps span.active {
  color: var(--accent);
}

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

.users-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .7fr);
  align-items: start;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.management-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100dvh - (var(--space-8) * 2));
}

@media (min-width: 761px) {
  .app-frame:has(.management-page) {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .app-frame > main:has(.management-page) {
    height: 100%;
    max-width: none;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
    overflow: hidden;
  }

  .management-page {
    height: 100%;
    overflow: hidden;
  }
}

.management-page > .title-row {
  flex: 0 0 auto;
}

.management-page .card:hover {
  border-color: var(--line);
}

.accounts-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.local-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line);
}

.local-tabs button {
  min-height: 34px;
  padding: 7px 12px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-md);
  font-weight: 550;
}

.local-tabs button:hover,
.local-tabs button[aria-selected="true"] {
  background: rgba(164, 143, 224, .14);
  color: var(--text);
}

.local-tabs button[aria-selected="true"] {
  box-shadow: inset 0 -2px var(--accent);
}

.local-tab-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.local-panel:not(.hidden) {
  min-height: 0;
  animation: workspace-enter var(--motion-fast) ease both;
}

.users-workspace > .local-panel,
.security-workspace > .local-panel,
.account-page .local-tab-workspace > .local-panel {
  flex: 1;
}

.local-scroll {
  min-height: 0;
  overflow-y: auto;
  padding-right: var(--space-2);
  scrollbar-color: var(--line-strong) var(--panel);
  scrollbar-width: thin;
}

.accounts-scroll {
  min-height: 0;
  overflow-y: auto;
  padding-right: var(--space-2);
  scrollbar-color: var(--line-strong) var(--panel);
  scrollbar-width: thin;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.user-actions form {
  margin: 0;
}

.create-user-card {
  width: min(100%, 680px);
  max-width: none;
  margin: 0;
}

.create-user-panel {
  display: flex;
  align-items: flex-start;
}

.users-layout > .form {
  max-width: none;
  margin-top: 0;
}

.section-heading {
  margin-bottom: var(--space-5);
}

.section-heading h2,
.section-heading p {
  margin-bottom: var(--space-1);
}

.user-access-card {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--line);
}

.user-access-head,
.member-row,
.member-actions,
.badge-row {
  display: flex;
  align-items: center;
}

.user-access-head,
.member-row {
  justify-content: space-between;
  gap: var(--space-4);
}

.badge-row,
.member-actions {
  gap: var(--space-2);
}

.badge-row {
  margin-top: var(--space-2);
}

.access-badge,
.account-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
}

.account-state.enabled {
  border-color: rgba(66, 198, 106, .3);
  background: rgba(66, 198, 106, .09);
  color: #78d992;
}

.account-state.disabled {
  border-color: rgba(240, 93, 94, .3);
  color: #ef8a8b;
}

.user-permissions {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: #242424;
}

.user-permissions p {
  margin: var(--space-2) 0 0;
}

.permission-label {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.permission-list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.permission-list a {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--text);
  text-decoration: none;
}

.permission-list a:hover span {
  color: var(--accent-hover);
}

.permission-list strong {
  color: var(--muted);
  font-size: var(--text-sm);
}

.access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: var(--space-8);
}

.access-grid h3 {
  margin: 0 0 var(--space-4);
}

.member-list {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) var(--panel);
  scrollbar-width: thin;
}

.access-card,
.access-members,
.player-management-card {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.access-grid {
  min-height: 0;
  flex: 1;
}

.member-row {
  min-height: 68px;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
}

.member-row:last-child {
  border-bottom: 0;
}

.member-row > div:first-child span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.member-actions form {
  margin: 0;
}

.remove-access {
  color: #ef8a8b;
  font-size: var(--text-sm);
}

.access-empty {
  padding: var(--space-6);
  color: var(--muted);
  text-align: center;
}

.admin-access-note,
.role-explainer {
  color: var(--muted);
  font-size: var(--text-sm);
}

.admin-access-note {
  margin-bottom: 0;
}

.member-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #252525;
}

.member-form label {
  display: grid;
  gap: var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

.member-form select {
  width: 100%;
  padding: 11px;
}

.member-form button {
  align-self: flex-start;
}

.role-explainer {
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: #202020;
}

.role-explainer p {
  margin: 0;
}

.role-explainer p + p {
  margin-top: var(--space-2);
}

.backup-list {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  margin-top: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) var(--panel);
  scrollbar-width: thin;
}

.backups-card {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.server-workspace:has(#tab-backups:not(.hidden)) {
  display: flex;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

#tab-backups:not(.hidden) {
  display: flex;
  min-height: 0;
  flex: 1;
}

.backup-row {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.backup-row:last-child {
  border-bottom: 0;
}

.backup-meta strong,
.backup-meta span {
  display: block;
}

.backup-meta span {
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: var(--text-sm);
}

.backup-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.backup-actions form {
  margin: 0;
}

.backup-actions button,
.backup-actions .mini-button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: var(--text-sm);
}

.backup-empty {
  padding: var(--space-8);
  color: var(--muted);
  text-align: center;
}

.backup-empty p {
  margin-bottom: 0;
}

.backup-policy,
.update-form,
.restart-policy {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .015);
}

.backup-policy {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto auto;
  align-items: center;
}

.backup-policy label,
.restart-policy label {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

.backup-policy input[type="number"] {
  height: 38px;
  margin-top: 0;
}

.restart-policy {
  align-items: center;
}

.restart-policy button {
  margin-left: auto;
}

.backup-policy label,
.update-form label {
  color: var(--muted);
}

.backup-policy input[type="number"],
.update-form select {
  width: 130px;
  margin-left: 6px;
  padding: 8px;
}

.update-history article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.update-history article span,
.update-history article small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.update-history {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) var(--panel);
  scrollbar-width: thin;
}

.update-history article,
.update-history > p {
  margin: 0;
  padding: var(--space-4);
}

.updates-card {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.server-workspace:has(#tab-updates:not(.hidden)) {
  display: flex;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

#tab-updates:not(.hidden) {
  display: flex;
  min-height: 0;
  flex: 1;
}

#metrics-chart {
  width: 100%;
  height: 280px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #242424;
}

.monitoring-values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.monitoring-values > div {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .015);
}

.monitoring-values span,
.monitoring-values strong {
  display: block;
}

.monitoring-values span {
  color: var(--muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.monitoring-values strong {
  margin-top: var(--space-2);
  font-size: 20px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.chart-legend span::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
  background: #a48fe0;
  content: "";
}
.chart-legend .memory::before { background: #d0a45d; }
.chart-legend .players::before { background: #77b08a; }

.runtime-history article {
  display: grid;
  grid-template-columns: 170px 220px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.runtime-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-5);
}

.runtime-history-head h3 {
  margin: 0;
}

.runtime-history {
  max-height: 300px;
  overflow-y: auto;
  padding-right: var(--space-2);
  scrollbar-color: var(--line-strong) var(--panel);
  scrollbar-width: thin;
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.two-factor-card form,
.two-factor-card label {
  display: grid;
  gap: 8px;
}

.totp-secret {
  display: block;
  margin: 14px 0;
  padding: 12px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.session-list article,
.security-findings article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.session-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.security-findings article {
  display: block;
  padding-left: 14px;
  border-left: 3px solid var(--muted);
}

.security-findings .finding-critical { border-left-color: var(--red); }
.security-findings .finding-warning { border-left-color: var(--accent); }
.security-findings p { margin: 4px 0 0; }
.audit-filter { display: flex; gap: 8px; }

.security-page .security-card {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.audit-header {
  display: block;
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.audit-header .title-row {
  margin-bottom: var(--space-4);
}

.audit-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  padding-top: var(--space-4);
}

.audit-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(135px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.audit-filter label {
  display: grid;
  gap: var(--space-2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
}

.audit-filter-actions {
  display: flex;
  align-items: end;
  gap: var(--space-2);
}

.audit-filter-actions > button,
.audit-filter-actions > .button {
  display: inline-flex;
  width: 74px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  line-height: 1;
}

.audit-table-wrap {
  min-height: 0;
  flex: 1;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  scrollbar-color: var(--line-strong) var(--panel);
  scrollbar-width: thin;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.audit-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  padding: var(--space-3);
  background: #252525;
  color: var(--muted);
  font-size: var(--text-xs);
  text-align: left;
  text-transform: uppercase;
}

.audit-table td {
  padding: var(--space-3);
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.audit-details {
  max-width: 320px;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.empty-cell {
  padding: var(--space-8) !important;
  color: var(--muted);
  text-align: center;
}

.audit-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-4);
  color: var(--muted);
  font-size: var(--text-sm);
}

.audit-pagination > div {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.security-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: 0;
}

.security-summary article {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
}

.security-summary span {
  color: var(--muted);
  font-size: var(--text-xs);
}

.security-summary strong {
  font-family: "JetBrains Mono", monospace;
  font-size: var(--text-xl);
}

.security-findings {
  min-height: 0;
  overflow-y: auto;
  padding-right: var(--space-2);
}

.finding-severity {
  display: inline-block;
  margin-right: var(--space-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.account-form-panel {
  align-self: stretch;
}

.account-form-panel > form {
  width: min(100%, 680px);
  max-width: none;
  margin: 0;
}

.sessions-card {
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  .account-grid {
    grid-template-columns: 1fr;
  }

  .runtime-history article {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .backup-policy,
  .update-form,
  .restart-policy {
    align-items: stretch;
    flex-direction: column;
  }

  .backup-policy input[type="number"],
  .update-form select {
    width: 100%;
    margin: 6px 0 0;
  }
}

@media (max-width: 920px) {
  .users-layout,
  .access-grid,
  .creation-grid,
  .jvm-section {
    grid-template-columns: 1fr;
  }

  .management-page {
    height: auto;
  }

  .audit-filter,
  .security-summary {
    grid-template-columns: 1fr 1fr;
  }

  .backup-policy,
  .monitoring-values {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .backup-policy,
  .monitoring-values {
    grid-template-columns: 1fr;
  }

  .backup-policy button,
  .restart-policy button {
    width: 100%;
    margin-left: 0;
  }

  .user-access-head,
  .member-row,
  .member-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .backup-row,
  .backup-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.server-card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.server-card-title h2 {
  margin-bottom: 0;
}

.server-card-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.server-card-identity p {
  color: var(--muted);
  font-size: 13px;
}

.server-card-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.server-card-meta code {
  color: var(--text);
  text-align: right;
}

#console-output {
  height: auto;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  border-color: #353535;
  background: #1a1a1a;
  color: #c4c4c4;
  font-size: 12px;
  line-height: 1.8;
}

.server-workspace:has(#tab-console:not(.hidden)) {
  display: flex;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

#tab-console:not(.hidden) {
  display: flex;
  min-height: 0;
  flex: 1;
}

.console-card {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  margin-top: 0;
}

.command-form {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.command-form input[name="command"] {
  padding: 9px 10px;
  border: 1px solid #353535 !important;
  background: #1a1a1a !important;
  color: var(--text) !important;
  font-size: 12.5px;
}

.command-form input[name="command"]:focus {
  border-color: var(--accent) !important;
  box-shadow: none;
}

.server-card small {
  color: var(--muted);
}

.dashboard-title {
  margin: 4px 0 var(--space-5);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-raised);
}

.dashboard-title h1 {
  font-size: 24px;
}

.dashboard-title p:last-child {
  margin-bottom: 0;
}

.server-list {
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.server-list-body {
  max-height: min(640px, calc(100vh - 250px));
  overflow-y: auto;
  scrollbar-color: var(--line-strong) var(--panel);
  scrollbar-width: thin;
}

.server-list-head,
.server-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(165px, .9fr) minmax(145px, .75fr) minmax(80px, .4fr) minmax(90px, .45fr) minmax(140px, max-content);
  align-items: center;
  gap: var(--space-5);
}

.server-list-head {
  padding: 11px var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-raised);
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.server-row {
  min-height: 80px;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: background var(--motion-fast) ease;
}

.server-row:last-child {
  border-bottom: 0;
}

.server-row:hover {
  background: rgba(164, 143, 224, .07);
}

.server-row .server-card-identity h2 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.server-row .server-card-identity p {
  max-width: 280px;
  margin: var(--space-1) 0 0;
  overflow: hidden;
  color: #6e6e6e;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-row code {
  color: var(--text);
  font-size: 11.5px;
}

.server-row .status {
  justify-self: start;
  margin-right: var(--space-2);
}

@media (prefers-reduced-motion: reduce) {
  .server-workspace,
  .tab-panel:not(.hidden),
  .app-frame > main > :not(.server-shell) {
    animation: none;
  }

}

.server-list-empty {
  border: 0;
  text-align: center;
}

.state-offline {
  background: #252c35;
  color: var(--muted);
}

.state-installing {
  background: #4a3517;
  color: var(--accent);
}

.state-starting,
.state-loading {
  background: #343044;
  color: var(--accent-hover);
}

.state-error {
  background: #4b1f1f;
  color: #ff7b72;
}

.files-card:hover {
  border-color: var(--line);
}

.files-card {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.server-workspace:has(#tab-files:not(.hidden)) {
  display: flex;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

#tab-files:not(.hidden) {
  display: flex;
  min-height: 0;
  flex: 1;
}

.file-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--panel-raised);
}

.file-toolbar code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-toolbar button {
  min-height: 32px;
  padding: 5px 10px;
}

.file-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.file-actions form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
}

.file-actions input:not([type="hidden"]):not([type="file"]) {
  min-width: 0;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
}

.file-actions input:not([type="hidden"]):not([type="file"]),
.file-actions button {
  height: 42px;
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

.file-picker {
  position: relative;
  display: flex;
  min-width: 0;
  height: 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker-button {
  display: flex;
  height: 100%;
  flex: none;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  background: var(--panel-raised);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.file-picker-name {
  min-width: 0;
  padding: 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-table-wrap {
  position: relative;
  min-height: 220px;
  max-height: none;
  flex: 1;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
}

.file-drop-overlay {
  position: absolute;
  z-index: 4;
  inset: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-2);
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: rgb(31 27 43 / 94%);
  color: var(--text);
  pointer-events: none;
}

.file-drop-overlay span {
  color: var(--muted);
  font-size: var(--text-sm);
}

.upload-progress {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-raised);
}

.upload-progress > div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: var(--text-sm);
}

.upload-progress progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  accent-color: var(--accent);
}

.file-organize-dialog label {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: var(--text-sm);
}

.file-organize-dialog input {
  width: 100%;
}

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

.file-table th,
.file-table td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.file-table th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
}

.confirm-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 70px rgb(0 0 0 / 45%);
}

.confirm-dialog::backdrop {
  background: rgb(6 8 12 / 68%);
  backdrop-filter: blur(3px);
}

.confirm-dialog form {
  display: grid;
  gap: 20px;
  padding: 22px;
}

.confirm-dialog h2,
.confirm-dialog p {
  margin: 0 0 8px;
}

.file-delete-message {
  overflow-wrap: anywhere;
  font-family: "JetBrains Mono", monospace;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.action-reason {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
  color: var(--muted);
}

.action-reason input {
  width: 100%;
  padding: 10px;
  color: var(--text);
}

.file-name {
  padding: 0;
  background: transparent;
  color: var(--text);
  font-weight: 650;
}

.file-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-button,
.file-row-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
}

.mini-button {
  background: #30363d;
  color: var(--text);
}

.file-row-actions .mini-danger {
  background: #6e2d2d;
  color: #fff;
}

.text-editor-dialog {
  width: min(1100px, calc(100vw - 48px));
  height: min(760px, calc(100dvh - 48px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 70px rgb(0 0 0 / 50%);
}

.text-editor-dialog::backdrop {
  background: rgb(6 8 12 / 72%);
  backdrop-filter: blur(3px);
}

.text-editor {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
}

.text-editor .overview-title {
  flex: none;
  margin: 0;
}

.editor-file-path {
  display: block;
  max-width: min(70vw, 760px);
  margin-top: var(--space-1);
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-editor textarea {
  width: 100%;
  min-height: 0;
  flex: 1;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070a0e;
  color: var(--text);
  font: 13px/1.5 ui-monospace, monospace;
  resize: none;
}

.text-editor .editor-footer {
  flex: none;
  justify-content: space-between;
}

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

.metric {
  padding: 18px;
}

.metric:hover,
.players-card:hover {
  border-color: var(--line);
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 5px 0;
  font-size: 27px;
}

.players-card {
  margin-bottom: 18px;
}

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

.player-chip {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #252c35;
}

.player-management-card:hover {
  border-color: var(--line);
}

.player-management-note {
  min-height: 22px;
  margin: 10px 0 14px;
}

.player-table-wrap {
  min-height: 0;
  flex: 1;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) var(--panel);
  scrollbar-width: thin;
}

.player-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--panel);
}

.monitoring-card {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) var(--panel);
  scrollbar-width: thin;
}

.server-workspace:has(#tab-monitoring:not(.hidden)),
.server-workspace:has(#tab-players:not(.hidden)),
.server-workspace:has(#tab-access:not(.hidden)) {
  display: flex;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

#tab-monitoring:not(.hidden),
#tab-players:not(.hidden),
#tab-access:not(.hidden) {
  display: flex;
  min-height: 0;
  flex: 1;
}

.player-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

.player-table th,
.player-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.player-table tr:last-child td {
  border-bottom: 0;
}

.player-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.player-table code {
  color: var(--muted);
  font-size: 12px;
}

.player-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.player-identity > span:last-child,
.player-identity small {
  display: block;
}

.player-identity small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.player-identity .player-online {
  color: var(--green);
}

.player-avatar {
  position: relative;
  overflow: hidden;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid rgba(164, 143, 224, .28);
  border-radius: 8px;
  background: linear-gradient(145deg, #494259, #302d39);
  color: var(--accent-hover);
  font-size: 11px;
  font-weight: 750;
}

.player-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  object-fit: cover;
}

.player-badges .status,
.player-row-actions .mini-button {
  margin: 2px 4px 2px 0;
}

.player-row-actions .mini-button {
  border: 0;
  background: #343238;
}

.player-row-actions .mini-danger {
  background: rgba(169, 120, 120, .18);
  color: #d9a0a0;
}

.player-empty {
  padding: 34px !important;
  color: var(--muted);
  text-align: center !important;
}

.player-profile-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-raised);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}

.player-profile-dialog::backdrop {
  background: rgba(8, 8, 10, .72);
  backdrop-filter: blur(3px);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 34px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-head h2 { margin: 0 0 4px; }
.profile-avatar { width: 64px; height: 64px; flex-basis: 64px; }

.state-starting,
.state-stopping,
.state-restarting {
  background: #4a3517;
  color: var(--accent);
}

.settings-card {
  margin-bottom: 18px;
}

.settings-card:hover {
  border-color: var(--line);
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.settings-form label {
  color: var(--muted);
  font-weight: 650;
}

.settings-form input:not([type="checkbox"]),
.settings-form select {
  width: 100%;
  margin-top: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.settings-form .wide {
  grid-column: 1 / -1;
}

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

.settings-state {
  margin-left: 12px;
}

.creation-checks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.app-frame > main:has(.server-create-page) {
  max-width: 1500px;
  margin-top: var(--space-8);
  padding: 0 clamp(24px, 4vw, 56px) var(--space-12);
}

.server-create-page {
  width: 100%;
}

.creation-page-head {
  margin-bottom: var(--space-5);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-raised);
}

.creation-page-head h1 {
  font-size: 24px;
}

.creation-page-head p:last-child {
  margin-bottom: 0;
}

.server-create-form {
  display: grid;
  width: 100%;
  max-width: none;
  gap: var(--space-6);
  margin-top: 0;
}

.server-create-form:hover {
  border-color: var(--line);
}

.creation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.creation-section {
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .012);
}

.creation-section h2 {
  margin-bottom: var(--space-4);
  font-size: 17px;
}

.jvm-section {
  display: grid;
  grid-template-columns: minmax(230px, .7fr) minmax(180px, .5fr) minmax(0, 1.5fr);
  align-items: center;
  gap: var(--space-5);
}

.jvm-section h2,
.jvm-section p {
  margin-bottom: var(--space-1);
}

.jvm-section textarea {
  width: 100%;
  margin-top: 7px;
  padding: 10px;
  resize: vertical;
}

.jvm-section .hint {
  display: block;
  margin-top: var(--space-2);
  font-weight: 400;
}

.creation-submit {
  display: flex;
  justify-content: flex-end;
}

.server-create-form .eula-check a {
  color: var(--accent);
}

.danger-zone {
  border-color: var(--line);
}

.danger-zone:hover {
  border-color: var(--line);
}

.delete-form {
  display: flex;
  align-items: end;
  gap: 12px;
}

.delete-form label {
  flex: 1;
  color: var(--muted);
}

.delete-form input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
}

@media (max-width: 760px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-brand {
    padding-bottom: 12px;
  }

  .app-nav {
    flex-direction: row;
    overflow-x: auto;
  }

  .app-sidebar > .sidebar-utilities {
    display: none;
  }

  .server-list-head {
    display: none;
  }

  .server-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 14px;
  }

  .server-row > code,
  .server-row > span:not(.status) {
    grid-column: 1;
  }

  .server-row .status {
    grid-column: 2;
    grid-row: 1;
  }

  .actions {
    flex-wrap: wrap;
  }

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

  .settings-form {
    grid-template-columns: 1fr;
  }

  .creation-checks {
    grid-template-columns: 1fr;
  }

  .delete-form {
    align-items: stretch;
    flex-direction: column;
  }

  .file-actions {
    grid-template-columns: 1fr;
  }

  .file-actions form {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }

  .files-card {
    min-height: 560px;
  }

  .server-workspace:has(#tab-files:not(.hidden)),
  .server-workspace:has(#tab-console:not(.hidden)) {
    height: auto;
    overflow: visible;
  }

  .console-card {
    min-height: 560px;
  }

  #console-output {
    min-height: 420px;
    max-height: 60dvh;
    flex: none;
  }

  .file-table-wrap {
    max-height: 55dvh;
    flex: none;
  }

  .server-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .server-sidebar {
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .server-tabs {
    flex-direction: row;
    overflow-x: auto;
  }

  .server-tabs button {
    flex: 0 0 auto;
  }

  .server-workspace {
    padding: 16px;
  }
}
