:root {
  --bg-1: rgb(20, 25, 35);
  --bg-2: rgb(35, 43, 54);
  --panel: rgb(55, 65, 75);
  --panel-soft: rgba(55, 65, 75, 0.78);
  --panel-dark: rgb(38, 47, 58);

  --text: rgb(255, 255, 255);
  --muted: rgb(200, 210, 220);
  --line: rgb(210, 220, 235);

  --danger: rgb(255, 85, 60);
  --primary: rgb(70, 120, 255);
  --primary-hover: rgb(92, 140, 255);
  --success: rgb(70, 180, 120);

  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 42px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(70, 120, 255, 0.22), transparent 34%),
    radial-gradient(circle at 80% 90%, rgba(255, 85, 60, 0.12), transparent 30%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

h1 {
  margin: 0 0 28px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.06em;
  font-weight: 900;
}

h2 {
  margin: 0 0 18px;
  font-size: 22px;
  letter-spacing: -0.04em;
  font-weight: 850;
}

.card {
  position: relative;
  max-width: 1050px;
  margin: 18px 0;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  border: 1px solid rgba(210, 220, 235, 0.22);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  overflow: hidden;
}

.card::before,
.card::after {
  content: "";
  display: block;
  height: 2px;
  width: calc(100% - 64px);
  margin: 0 auto;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(210, 220, 235, 0.9),
    transparent
  );
}

.card::before {
  margin-bottom: 22px;
}

.card::after {
  margin-top: 22px;
}

input {
  width: 100%;
  min-width: 0;
  margin: 8px 0;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(210, 220, 235, 0.18);
  background: rgba(20, 25, 35, 0.52);
  color: var(--text);
  outline: none;
  font-size: 15px;
}

input::placeholder {
  color: rgba(200, 210, 220, 0.68);
}

input:focus {
  border-color: rgba(70, 120, 255, 0.85);
  box-shadow: 0 0 0 4px rgba(70, 120, 255, 0.18);
}

label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin: 12px 0;
}

label input {
  width: auto;
}

button {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  background: var(--primary);
  color: var(--text);
  font-weight: 850;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(70, 120, 255, 0.28);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--primary-hover);
  box-shadow: 0 16px 34px rgba(70, 120, 255, 0.34);
}

button:active {
  transform: translateY(0);
}

button.revoke {
  background: var(--danger);
  box-shadow: 0 12px 28px rgba(255, 85, 60, 0.24);
}

button.edit {
  background: var(--panel-dark);
  border: 1px solid rgba(210, 220, 235, 0.24);
  box-shadow: none;
}

#adminToken {
  max-width: 420px;
  background: rgba(55, 65, 75, 0.7);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.grid .field {
  min-width: 0;
  width: 100%;
}

.grid .field input {
  width: 100%;
  min-width: 0;
}

.ban-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(20, 25, 35, 0.56);
  border: 1px solid rgba(210, 220, 235, 0.14);
}

.ban-row b {
  font-size: 18px;
}

.ban-row div:first-child {
  color: var(--muted);
  line-height: 1.55;
}

.ban-row div:first-child b {
  color: var(--text);
}

.ban-row > div:last-child {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

pre#output {
  max-width: 1050px;
  min-height: 120px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(20, 25, 35, 0.72);
  border: 1px solid rgba(210, 220, 235, 0.12);
  color: var(--muted);
  overflow: auto;
}

.shell {
  max-width: 1280px;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 26px;
}

.subtitle {
  max-width: 920px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.eyebrow {
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(55, 65, 75, 0.72);
  border: 1px solid rgba(210, 220, 235, 0.18);
  color: var(--muted);
  white-space: nowrap;
}

.status-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 18px rgba(70, 180, 120, 0.8);
}

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.login-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  max-width: 640px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.helper {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 16px;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: block;
  min-width: 0;
}

.field span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.toggle-row {
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: rgba(20, 25, 35, 0.38);
  border: 1px solid rgba(210, 220, 235, 0.12);
}

.toggle-row small {
  display: block;
  color: rgba(200, 210, 220, 0.72);
  margin-top: 3px;
}

.bans-list {
  display: grid;
  gap: 12px;
}

.empty-state {
  color: var(--muted);
  padding: 18px;
  border-radius: 16px;
  background: rgba(20, 25, 35, 0.4);
  border: 1px dashed rgba(210, 220, 235, 0.2);
}

.ban-row div:first-child {
  display: grid;
  gap: 4px;
}

.ban-row span {
  color: var(--muted);
}

.ban-row small {
  color: rgba(200, 210, 220, 0.7);
}

.ban-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.toast-container {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 44px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  transform: translateY(32px);
  opacity: 0;
  padding: 16px 18px;
  border-radius: 18px;
  color: white;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: auto;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.hide {
  opacity: 0;
  transform: translateY(24px);
}

.toast strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.toast p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.45;
}

.toast-content {
  min-width: 0;
}

.toast-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  box-shadow: none;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: none;
  box-shadow: none;
}

.toast-error {
  background: rgba(255, 85, 60, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.toast-success {
  background: rgba(70, 180, 120, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

@media (max-width: 720px) {
  body {
    padding: 20px;
  }

  .hero,
  .section-head {
    flex-direction: column;
  }

  .login-row {
    grid-template-columns: 1fr;
  }

  .ban-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .ban-actions {
    margin-top: 10px;
  }

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

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 46px;
  height: 26px;
  margin: 0;
  padding: 0;
  flex: 0 0 46px;
  border-radius: 999px;
  background: rgba(20, 25, 35, 0.75);
  border: 1px solid rgba(210, 220, 235, 0.22);
  position: relative;
  cursor: pointer;
}

.toggle-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s ease, background 0.2s ease;
}

.toggle-row input[type="checkbox"]:checked {
  background: var(--primary);
}

.toggle-row input[type="checkbox"]:checked::after {
  transform: translate(19px, -50%);
  background: white;
}