.admin-page {
  background:
    linear-gradient(90deg, rgba(7, 6, 15, 0.92) 0%, rgba(7, 6, 15, 0.76) 54%, rgba(7, 6, 15, 0.45) 100%),
    linear-gradient(0deg, #07060f 0%, rgba(7, 6, 15, 0.48) 40%, rgba(7, 6, 15, 0.35) 100%),
    url("/assets/sanctum-hall.jpg") center / cover no-repeat fixed,
    var(--void);
}

.admin-shell { padding-block: clamp(36px, 6vh, 72px) 56px; }
.admin-heading { margin-bottom: 28px; }
.admin-heading h1 {
  font-size: clamp(34px, 5vw, 62px);
  letter-spacing: -0.04em;
  line-height: 0.98;
}
.admin-heading .edition { margin-bottom: 12px; }

.admin-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.admin-tab {
  position: relative;
  padding: 10px 2px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.admin-tab[aria-selected="true"],
.admin-tab:hover { color: var(--text); }
.admin-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  background: var(--gold);
}

.admin-card {
  padding: clamp(20px, 3vw, 30px);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.admin-card.narrow { max-width: 480px; }
.admin-card h2,
dialog h2 {
  margin: 0;
  color: var(--text);
  font: 400 22px / 1.2 var(--font-display);
}
.admin-note,
dialog p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 6px 0 0;
}

.admin-form {
  display: flex;
  flex-direction: column;
}
.admin-form label {
  display: block;
  color: var(--muted);
  margin: 16px 0 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.admin-form input,
.admin-form select {
  padding: 10px 13px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(7, 6, 15, 0.78);
  font: inherit;
  font-size: 13px;
}
.admin-form input:focus-visible,
.admin-form select:focus-visible { border-color: var(--line-hover); }
.admin-form .actions { margin-top: 20px; }

.control-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.actions.end { justify-content: flex-end; }

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.action.sm {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 7px;
}
.action.primary {
  border: 0;
  background: linear-gradient(180deg, #efd08c 0%, #d4a14c 100%);
  color: #151008;
  font-weight: 650;
}
.action.danger {
  border-color: rgba(229, 141, 141, 0.35);
  color: #f2b8b8;
  background: rgba(229, 141, 141, 0.08);
}
.action:hover:enabled { filter: brightness(1.08); }
.action.secondary:hover:enabled {
  border-color: var(--line-hover);
  background: rgba(255, 255, 255, 0.07);
}
.action:disabled { opacity: 0.42; cursor: default; }

/* Users Table */
.table-wrap {
  margin-top: 20px;
  overflow-x: auto;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.users-table th {
  padding: 10px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.users-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(184, 158, 255, 0.08);
  vertical-align: middle;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}
.badge.online { color: var(--online); background: rgba(94, 230, 168, 0.12); }
.badge.banned { color: #f2b8b8; background: rgba(229, 141, 141, 0.14); }
.badge.gm { color: var(--gold); background: rgba(232, 194, 116, 0.14); }

.telemetry { margin: 20px 0 22px; }
.telemetry div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.telemetry dt { color: var(--muted); font-size: 13px; }
.telemetry dd { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--text); }

.admin-feedback {
  margin-top: 16px;
  color: var(--gold);
  font-size: 13px;
  min-height: 1.5em;
}
.admin-feedback[data-state="error"] { color: #f2b8b8; }
.admin-feedback:empty { display: none; }
