:root {
  --admin-bg-1: #0f0820;
  --admin-bg-2: #07161b;
  --admin-bg-3: #21103a;
  --admin-card: rgba(24, 15, 46, 0.56);
  --admin-card-strong: rgba(29, 19, 54, 0.7);
  --admin-border: rgba(171, 126, 255, 0.28);
  --admin-border-soft: rgba(97, 220, 212, 0.2);
  --admin-text: #ecf3ff;
  --admin-muted: #b4b6d5;
  --admin-primary: #8b5cf6;
  --admin-primary-2: #14c7b8;
  --ok: #34d6a6;
  --warn: #ffc867;
  --error: #ff7f93;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed !important;
}

body {
  margin: 0;
  font-family: "Roboto", "Segoe UI", "Trebuchet MS", sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

input:not([readonly]),
textarea:not([readonly]),
[contenteditable=""],
[contenteditable="true"],
[contenteditable="plaintext-only"] {
  -webkit-user-select: text;
  user-select: text;
}

.admin-page {
  min-height: 100vh;
  color: var(--admin-text);
  color-scheme: dark;
  background:
    radial-gradient(68% 70% at 10% 0%, rgba(177, 98, 255, 0.28) 0%, rgba(177, 98, 255, 0) 72%),
    radial-gradient(58% 54% at 96% 6%, rgba(73, 240, 223, 0.25) 0%, rgba(73, 240, 223, 0) 76%),
    repeating-linear-gradient(132deg, rgba(190, 141, 255, 0.048) 0 1px, transparent 1px 20px),
    linear-gradient(148deg, var(--admin-bg-2), var(--admin-bg-1) 50%, #05040c 100%);
}

.admin-shell {
  width: min(1040px, 100% - 32px);
  margin: 24px auto 42px;
}

body.page-preparing {
  overflow: hidden;
}

body.page-preparing .admin-shell {
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  filter: blur(2px);
}

body.page-ready .admin-shell {
  animation: admin-shell-in 760ms cubic-bezier(0.2, 0.8, 0.24, 1) both;
}

@keyframes admin-shell-in {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
    filter: blur(2px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(54% 60% at 50% 14%, rgba(164, 98, 255, 0.38), rgba(164, 98, 255, 0) 72%),
    radial-gradient(46% 52% at 78% 86%, rgba(62, 217, 206, 0.26), rgba(62, 217, 206, 0) 78%),
    linear-gradient(148deg, #060410 0%, #0b1224 45%, #090b16 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 620ms ease, visibility 620ms ease;
}

.page-loader.is-exit {
  opacity: 0;
  visibility: hidden;
}

.page-loader-card {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
}

.page-loader-spinner {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 50%;
  border: 3px solid rgba(150, 217, 255, 0.2);
  border-top-color: #63e9dc;
  border-right-color: #a987ff;
  animation: page-loader-spin 0.9s linear infinite;
}

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

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(44, 24, 75, 0.62), rgba(16, 35, 48, 0.56) 54%, rgba(9, 20, 30, 0.72));
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.45),
    0 10px 22px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  padding: 20px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 34%, rgba(255, 255, 255, 0) 62%);
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 1.1rem + 1.5vw, 2.1rem);
  color: #f4f8ff;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-header-controls {
  flex: 0 1 420px;
  max-width: 420px;
  min-width: min(100%, 320px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.admin-auth-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-auth-identity {
  margin: 0;
  max-width: 100%;
  border: 1px solid rgba(129, 170, 242, 0.38);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #d7e8ff;
  background: rgba(12, 20, 42, 0.58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-auth-row[data-state="authenticated"] .admin-auth-identity {
  border-color: rgba(99, 226, 174, 0.42);
  color: #dcfff1;
  background: rgba(12, 36, 30, 0.62);
}

.admin-auth-row[data-state="pending"] .admin-auth-identity {
  border-color: rgba(120, 202, 255, 0.4);
  color: #e5f5ff;
}

.admin-auth-row[data-state="unauthenticated"] .admin-auth-identity,
.admin-auth-row[data-state="pending"] .admin-auth-identity {
  animation: admin-auth-login-blink 1.05s ease-in-out infinite;
}

@keyframes admin-auth-login-blink {
  0% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(127, 201, 255, 0.06);
  }

  50% {
    opacity: 0.62;
    box-shadow: 0 0 0 4px rgba(127, 201, 255, 0.16);
  }

  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(127, 201, 255, 0.06);
  }
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 420px;
  min-width: min(100%, 320px);
}

.admin-brand-logo {
  width: clamp(120px, 18vw, 220px);
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.35));
}

.admin-brand-text {
  min-width: 0;
}

.admin-header .subtitle {
  margin: 4px 0 0;
  color: #c7c3e4;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: #89eee3;
  font-weight: 700;
}

.admin-grid {
  margin-top: 18px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.admin-bottom-grid {
  margin-top: 16px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: start;
}

.section-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.section-title-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: #9fdff8;
}

.section-title-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-copy {
  margin: 6px 0 12px;
  color: #c0c2e0;
  font-size: 0.95rem;
}

.entries-tab-nav {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--admin-border-soft);
  border-radius: 12px;
  background: rgba(9, 12, 31, 0.48);
}

.entries-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 12px;
  background: transparent;
  color: #ced6f3;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.entries-tab-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.entries-tab-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entries-tab-btn.active {
  background: rgba(99, 217, 199, 0.22);
  border-color: rgba(102, 225, 207, 0.38);
  color: #f2f9ff;
}

.entries-tab-btn:not(.active):hover {
  border-color: rgba(145, 164, 222, 0.38);
  color: #edf4ff;
}

.entries-tab-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.entries-tab-panel {
  margin-top: 12px;
}

#entriesTabNamesPanel {
  position: relative;
}

.entries-tab-panel[hidden] {
  display: none !important;
}

#entriesTabNamesPanel.is-loading > :not(.entries-panel-loader) {
  opacity: 0.42;
  filter: blur(0.8px);
  pointer-events: none;
  user-select: none;
}

.entries-panel-loader {
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: 14px;
  background:
    linear-gradient(160deg, rgba(16, 21, 40, 0.72), rgba(8, 14, 30, 0.74));
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  display: grid;
  place-items: center;
  padding: 16px;
}

.entries-panel-loader[hidden] {
  display: none !important;
}

.entries-panel-loader-card {
  width: min(420px, 100%);
  border: 1px solid rgba(154, 182, 248, 0.34);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(9, 14, 29, 0.64);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.entries-loader-skeleton {
  display: grid;
  gap: 8px;
}

.entries-loader-line {
  display: block;
  height: 10px;
  width: 100%;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(175, 197, 255, 0.12), rgba(151, 255, 238, 0.44), rgba(175, 197, 255, 0.12));
  background-size: 220% 100%;
  animation: entries-loader-shimmer 1.08s linear infinite;
}

.entries-loader-line.short {
  width: 72%;
}

@keyframes entries-loader-shimmer {
  0% {
    background-position: 180% 0;
  }

  100% {
    background-position: -40% 0;
  }
}

.entries-loader-text {
  margin: 10px 0 0;
  color: #ddedff;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.01em;
}

.entries-input-wrap {
  position: relative;
}

.entries-input {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--admin-border-soft);
  border-radius: 14px;
  padding: 14px 14px 16px;
  font: 500 1rem/1.45 "Roboto", "Segoe UI", sans-serif;
  color: var(--admin-text);
  background: rgba(14, 10, 30, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  resize: vertical;
  outline: none;
}

.entries-input[readonly] {
  cursor: not-allowed;
}

.entries-input::placeholder {
  color: #a69fcd;
}

.entries-input:focus {
  border-color: #57e3d4;
  box-shadow: 0 0 0 3px rgba(48, 214, 196, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.entries-paste-btn {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 10px;
  right: 18px;
  z-index: 4;
  width: auto;
  height: auto;
  min-width: 62px;
  min-height: 22px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7fd8e3;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  cursor: pointer;
  line-height: 1;
  font-size: 12px;
  font-weight: 700;
  font-family: "Roboto", "Segoe UI", "Trebuchet MS", sans-serif;
  letter-spacing: 0.01em;
  white-space: nowrap;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color 140ms ease, opacity 140ms ease, filter 140ms ease;
}

.entries-paste-btn svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.entries-paste-label {
  display: inline-block;
  color: currentColor;
  line-height: 1;
}

.entries-paste-btn:hover {
  color: #9fe8f1;
  filter: drop-shadow(0 0 0.28rem rgba(75, 208, 196, 0.36));
}

.entries-paste-btn:focus-visible {
  outline: none;
  color: #b0f2fa;
  filter: drop-shadow(0 0 0.34rem rgba(75, 208, 196, 0.5));
}

.entries-paste-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
}

@media (pointer: coarse) {
  .entries-paste-btn {
    min-width: 66px;
    min-height: 30px;
    gap: 6px;
    font-size: 13px;
  }

  .entries-paste-btn svg {
    width: 19px;
    height: 19px;
  }
}

.entries-event-required-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid rgba(255, 200, 103, 0.56);
  border-radius: 14px;
  background:
    linear-gradient(150deg, rgba(30, 18, 44, 0.88), rgba(11, 27, 40, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  cursor: not-allowed;
  user-select: none;
}

.entries-event-required-overlay[hidden] {
  display: none !important;
}

.entries-event-required-overlay p {
  margin: 0;
  max-width: 26ch;
  color: #ffe2ad;
  font-size: clamp(1.22rem, 1.05rem + 0.9vw, 1.66rem);
  font-weight: 800;
  line-height: 1.34;
  text-wrap: balance;
}

.entries-tools {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.entries-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.entries-count-tools {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.entries-count-value {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(103, 223, 210, 0.36);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8df1d0;
  background: rgba(8, 42, 40, 0.42);
  cursor: default;
  user-select: none;
}

.entries-count-checks {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.entries-count-checks[hidden] {
  display: none !important;
}

.entry-check {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #d7def3;
  opacity: 0.92;
  transition: color 140ms ease, opacity 140ms ease;
}

.entry-check.check-2 {
  margin-left: -3px;
}

.entries-count-value[data-sync="pending"] .entry-check.check-1 {
  color: #d7def3;
  opacity: 0.96;
}

.entries-count-value[data-sync="pending"] .entry-check.check-2 {
  opacity: 0;
}

.entries-count-value[data-sync="db"] .entry-check {
  color: #d7def3;
  opacity: 0.96;
}

.entries-count-value[data-sync="rendered"] .entry-check {
  color: #57d8ff;
  opacity: 1;
}

.control-stack {
  margin-top: 10px;
}

.room-row {
  margin-bottom: 12px;
  max-width: 680px;
}

.header-room-row {
  margin-bottom: 0;
  max-width: 420px;
  width: fit-content;
  margin-left: auto;
}

.header-room-row .field-label {
  margin-bottom: 6px;
  white-space: nowrap;
  text-align: left;
  color: #f6fbff;
}

.header-room-row.room-row.is-connected .field-label,
.header-room-row.room-row.is-priority-attention .field-label {
  color: #f6fbff;
}

.header-room-row .room-inline {
  width: auto;
  justify-content: flex-start;
}

.header-room-row .room-inline .room-input-wrap {
  flex: 0 1 210px;
  max-width: 210px;
  min-width: 160px;
}

.header-room-row .generate-link-btn {
  min-width: 0;
  justify-content: center;
}

.room-input {
  text-transform: lowercase;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.room-row.is-connected .field-label {
  color: #7feee2;
}

.room-row.is-connected .room-input {
  border-color: #45d5c6;
  background: rgba(9, 34, 35, 0.56);
  box-shadow: 0 0 0 3px rgba(69, 213, 198, 0.2);
}

.room-row.is-connected .room-input:focus {
  border-color: #63e9dc;
  box-shadow: 0 0 0 3px rgba(69, 213, 198, 0.3);
}

.room-input.is-connected {
  border-color: #45d5c6;
  background: rgba(9, 34, 35, 0.56);
  box-shadow: 0 0 0 3px rgba(69, 213, 198, 0.2);
}

.room-input.is-connected:focus {
  border-color: #63e9dc;
  box-shadow: 0 0 0 3px rgba(69, 213, 198, 0.3);
}

.room-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.room-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.room-row.is-priority-attention .field-label {
  color: #f6fbff;
}

.room-input-wrap.is-priority .room-input {
  border-color: rgba(255, 207, 128, 0.72);
  background: rgba(36, 24, 22, 0.62);
  animation: room-id-priority-pulse 0.95s ease-in-out infinite;
}

.room-input-wrap.is-priority .room-input:focus {
  animation: none;
  border-color: #ffdb9a;
  box-shadow: 0 0 0 3px rgba(255, 200, 103, 0.34);
}

.room-input-wrap.is-priority::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  border: 1px solid rgba(255, 200, 103, 0.36);
  pointer-events: none;
  animation: room-id-priority-ring 0.95s ease-in-out infinite;
}

.room-inline .room-input-wrap .room-input {
  width: 100%;
  padding-right: 42px;
}

.room-verified-badge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(158, 242, 255, 0.68);
  background: linear-gradient(150deg, #5db0ff, #2f80ed 64%, #295ec2);
  box-shadow:
    0 4px 10px rgba(19, 59, 122, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.14) inset;
  color: #f7fbff;
  pointer-events: none;
}

.room-verified-badge svg {
  width: 13px;
  height: 13px;
  display: block;
}

.room-verified-badge .badge-shape {
  fill: #3f8bff;
}

.room-verified-badge .badge-check {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.room-verified-badge.is-pending {
  border-color: rgba(176, 220, 255, 0.82);
  background: linear-gradient(145deg, rgba(63, 104, 173, 0.95), rgba(46, 79, 129, 0.95));
}

.room-verified-badge.is-pending svg {
  opacity: 0;
}

.room-verified-badge.is-pending::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  animation: room-verified-spin 760ms linear infinite;
}

.room-verified-badge[hidden] {
  display: none !important;
}

.room-row.is-connected .room-verified-badge {
  animation: room-verified-pop 180ms ease-out;
}

@keyframes room-verified-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes room-verified-pop {
  0% {
    transform: translateY(-50%) scale(0.75);
    opacity: 0;
  }

  100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
}

@keyframes room-id-priority-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 200, 103, 0.14);
  }

  60% {
    box-shadow: 0 0 0 4px rgba(255, 200, 103, 0.24);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 200, 103, 0.12);
  }
}

@keyframes room-id-priority-ring {
  0% {
    opacity: 0.34;
  }

  60% {
    opacity: 0.82;
  }

  100% {
    opacity: 0.34;
  }
}

@media (prefers-reduced-motion: reduce) {
  .room-input-wrap.is-priority .room-input,
  .room-input-wrap.is-priority::after {
    animation: none;
  }
}

.generate-link-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-icon-copy {
  width: 14px;
  height: 14px;
  display: inline-block;
}

.btn-icon-copy svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.btn-icon-link {
  width: 14px;
  height: 14px;
  display: inline-flex;
}

.btn-icon-link svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spin-config-row {
  display: block;
}

.control-stack > .spin-config-row {
  margin-top: 16px;
  padding-top: 16px;
}

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

.banner-context-row {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.banner-context-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-border-soft);
}

.banner-context-panel > .field-label {
  margin: 0 0 8px;
}

.banner-context-field {
  min-width: 0;
}

.banner-context-field .field-label {
  margin-bottom: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #dbd4f5;
}

.duration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.duration-slider {
  display: block;
  width: 100%;
  min-width: 0;
  accent-color: #45d5c6;
  cursor: pointer;
}

.duration-slider-value {
  flex: 0 0 auto;
  min-width: 70px;
  border: 1px solid var(--admin-border-soft);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  color: #e3ebff;
  background: rgba(13, 10, 29, 0.58);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #d7d1f3;
  font-weight: 600;
}

.field-label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-label-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #9fdff8;
}

.field-label-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field-label-icon-plus {
  width: 16px;
  height: 16px;
}

.field-label-icon-plus svg {
  stroke-width: 2.4;
}

.field-label-icon-key {
  width: 17px;
  height: 17px;
}

.field-label-icon-key svg {
  stroke-width: 2.35;
}

.field-required-mark {
  color: #ffc867;
  font-weight: 800;
}

.duration-header .field-label {
  margin-bottom: 0;
}

.number-input {
  width: 100%;
  border: 1px solid var(--admin-border-soft);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 1rem;
  background: rgba(13, 10, 29, 0.58);
  color: var(--admin-text);
  outline: none;
}

.number-input:focus {
  border-color: #57e3d4;
  box-shadow: 0 0 0 3px rgba(48, 214, 196, 0.3);
}

.room-input:focus {
  border-color: var(--admin-border-soft);
  box-shadow: 0 0 0 3px rgba(133, 146, 200, 0.24);
}

.number-input-wrap {
  position: relative;
  width: min(190px, 100%);
}

.number-input-compact {
  width: 100%;
  padding-right: 56px;
}

.number-unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  color: #a9add0;
  pointer-events: none;
  letter-spacing: 0.01em;
}

.checkbox {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #ece8ff;
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #45d5c6;
}

.entries-auto-remove-inline {
  margin-top: 0;
  margin-left: auto;
  white-space: nowrap;
}

.winner-history-empty {
  margin: 0;
  color: #b2b7da;
  font-size: 0.9rem;
}

.winner-history-header {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
}

.winner-history-title {
  margin: 0;
}

.winner-history-actions {
  margin: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.winner-history-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--admin-border-soft);
  border-radius: 12px;
  background: rgba(12, 10, 30, 0.44);
  max-height: 320px;
  overflow: auto;
}

.winner-history-list:empty {
  display: none;
}

.winner-history-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(133, 146, 200, 0.2);
}

.winner-history-item:last-child {
  border-bottom: 0;
}

.winner-history-main {
  min-width: 0;
  flex: 1 1 auto;
}

.winner-history-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f2f6ff;
  overflow-wrap: anywhere;
}

.winner-history-meta {
  margin: 4px 0 0;
  font-size: 0.77rem;
  color: #aeb5da;
}

.winner-history-context {
  margin: 4px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cfe5ff;
}

.winner-history-remove {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 157, 171, 0.45);
  border-radius: 999px;
  background: rgba(93, 25, 39, 0.42);
  color: #ffd7de;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.winner-history-remove:hover {
  background: rgba(131, 34, 54, 0.62);
  border-color: rgba(255, 173, 184, 0.6);
  color: #fff3f6;
}

.winner-history-remove:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.appearance-panel {
  margin-top: 16px;
  border-top: 1px solid var(--admin-border-soft);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 16px 0 0;
}

.appearance-panel > .field-label {
  margin: 0 0 8px;
}

.appearance-title {
  margin: 0 0 8px;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9df4eb;
}

.select-input {
  width: 100%;
  border: 1px solid var(--admin-border-soft);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.98rem;
  background: rgba(13, 10, 31, 0.62);
  color: var(--admin-text);
  outline: none;
  cursor: pointer;
}

.select-input option {
  cursor: pointer;
}

.select-input:focus {
  border-color: #57e3d4;
  box-shadow: 0 0 0 3px rgba(48, 214, 196, 0.3);
}

.palette-preview {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
}

.swatch {
  display: block;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(185, 241, 232, 0.24);
}

.custom-appearance {
  margin-top: 10px;
  border-top: 0;
  border-radius: 0;
  padding: 10px 0 0;
  background: transparent;
}

.custom-color-count-group {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.custom-color-count-group .field-label {
  margin-bottom: 0;
  margin-right: 4px;
}

.custom-color-count-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #dbe5ff;
  cursor: pointer;
}

.custom-color-count-option input {
  margin: 0;
  width: 14px;
  height: 14px;
  accent-color: #63d9c7;
  cursor: pointer;
}

.custom-color-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.custom-appearance[data-count="3"] .custom-color-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.custom-appearance[data-count="4"] .custom-color-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.custom-color-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #dbd4f5;
}

.custom-color-item[hidden] {
  display: none !important;
}

.custom-color-item input[type="color"] {
  width: 100%;
  height: 36px;
  border: 1px solid rgba(152, 116, 255, 0.38);
  border-radius: 8px;
  padding: 2px;
  background: rgba(10, 18, 31, 0.86);
  cursor: pointer;
}

.text-color-control {
  margin-top: 10px;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #dbd4f5;
}

.text-color-control .field-label {
  margin-bottom: 0;
  margin-right: 4px;
}

.text-color-switch-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.text-color-switch-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #dbe5ff;
}

.text-color-switch {
  position: relative;
  width: 48px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.text-color-switch.is-disabled {
  cursor: not-allowed;
}

.text-color-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.text-color-switch-track {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(128, 144, 204, 0.45);
  background: rgba(8, 10, 20, 0.74);
  transition: background 160ms ease, border-color 160ms ease;
}

.text-color-switch input:disabled + .text-color-switch-track,
.text-color-switch.is-disabled .text-color-switch-track {
  cursor: not-allowed;
  opacity: 0.72;
}

.text-color-switch-track::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e7edff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 160ms ease, background 160ms ease;
}

.text-color-switch input:checked + .text-color-switch-track {
  background: rgba(198, 214, 255, 0.28);
  border-color: rgba(204, 220, 255, 0.58);
}

.text-color-switch input:checked + .text-color-switch-track::before {
  transform: translateX(20px);
  background: #ffffff;
}

.text-color-switch input:focus-visible + .text-color-switch-track {
  box-shadow: 0 0 0 3px rgba(99, 217, 199, 0.32);
}

.audio-tick-icon-toggle {
  margin-top: 0;
  margin-left: 10px;
  position: relative;
  min-height: 36px;
  padding: 0 10px 0 8px;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(132, 148, 198, 0.44);
  background: rgba(10, 15, 30, 0.68);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
}

.audio-tick-icon-toggle.is-disabled {
  cursor: not-allowed;
}

.audio-tick-icon-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.audio-tick-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.audio-tick-text {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #eff5ff;
  line-height: 1;
}

.audio-tick-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: #eff5ff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.audio-tick-icon .icon-audio-off {
  display: none;
}

.audio-tick-icon-toggle input:not(:checked) + .audio-tick-icon .icon-audio-on {
  display: none;
}

.audio-tick-icon-toggle input:not(:checked) + .audio-tick-icon .icon-audio-off {
  display: block;
  stroke: #b6c2df;
}

.audio-tick-icon-toggle input:not(:checked) + .audio-tick-icon {
  opacity: 0.74;
}

.audio-tick-icon-toggle input:not(:checked) ~ .audio-tick-text {
  color: #b6c2df;
}

.audio-tick-icon-toggle input:disabled + .audio-tick-icon {
  opacity: 0.5;
}

.audio-tick-icon-toggle input:disabled ~ .audio-tick-text {
  opacity: 0.5;
}

.audio-tick-icon-toggle input:focus-visible + .audio-tick-icon {
  filter: drop-shadow(0 0 0.32rem rgba(99, 217, 199, 0.52));
}

.button-row {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

#spinBtn {
  min-width: 240px;
  padding: 14px 30px;
  font-size: 1.04rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 180ms ease, filter 160ms ease;
}

.btn.compact {
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.84rem;
  letter-spacing: 0;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.btn.ghost {
  border-color: rgba(137, 238, 227, 0.38);
  background: linear-gradient(160deg, rgba(147, 104, 255, 0.26), rgba(47, 220, 204, 0.14));
  color: #e8f7ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-icon-left {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.btn.primary {
  background: linear-gradient(130deg, var(--admin-primary), var(--admin-primary-2));
  color: #f7faff;
  box-shadow: 0 10px 24px rgba(123, 78, 232, 0.46), 0 2px 10px rgba(23, 170, 155, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn.success {
  background: linear-gradient(130deg, #1ec8b7, #179e93);
  color: #f5fff9;
  box-shadow: 0 10px 22px rgba(15, 129, 119, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.status {
  margin: 14px 0 0;
  border: 1px solid var(--admin-border-soft);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: right;
  font-weight: 600;
  background: rgba(12, 10, 30, 0.58);
  color: #cfd7f1;
  min-height: 44px;
}

.status[data-tone="ok"] {
  background: rgba(16, 70, 61, 0.66);
  color: var(--ok);
}

.status[data-tone="warn"] {
  background: rgba(73, 53, 18, 0.62);
  color: var(--warn);
}

.status[data-tone="error"] {
  background: rgba(86, 24, 36, 0.66);
  color: var(--error);
}

.winner-card {
  margin-top: 14px;
  border: 1px solid var(--admin-border-soft);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(12, 10, 30, 0.56);
}

.winner-card-standalone {
  margin-top: 10px;
}

.winner-summary-card {
  margin-top: 0;
}

.winner-summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.winner-summary-row {
  margin-top: 10px;
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.winner-summary-row .winner-card {
  flex: 1 1 auto;
  margin-top: 0;
}

.winner-spin-inline {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.winner-spin-inline #spinBtn {
  min-width: 180px;
  height: 100%;
  padding: 12px 24px;
}

.status-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.status-card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.status-role-badge {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  border: 1px solid rgba(255, 200, 103, 0.42);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffd897;
  background: rgba(56, 37, 16, 0.42);
  white-space: nowrap;
  line-height: 1.2;
  font-family: inherit;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.status-role-badge-label {
  display: inline-flex;
  align-items: center;
}

.status-role-badge-icon {
  display: inline-flex;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: currentColor;
}

.status-role-icon {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: none;
}

.status-role-badge[data-role="admin"] .status-role-icon-admin,
.status-role-badge[data-role="setup"] .status-role-icon-admin {
  display: block;
}

.status-role-badge[data-role="read-only"] .status-role-icon-view-only {
  display: block;
}

.status-role-badge[data-role="admin"] {
  border-color: rgba(52, 214, 166, 0.42);
  color: #8df1d0;
  background: rgba(14, 43, 34, 0.44);
}

.status-role-badge[data-role="setup"] {
  border-color: rgba(157, 179, 224, 0.4);
  color: #d3ddf4;
  background: rgba(24, 28, 46, 0.46);
}

.status-role-badge[data-clickable="1"] {
  cursor: pointer;
}

.status-role-badge[data-clickable="1"]:hover {
  box-shadow: 0 0 0 3px rgba(255, 200, 103, 0.16);
}

.status-role-badge[data-role="read-only"][data-clickable="1"] {
  border-color: rgba(255, 200, 103, 0.64);
  background: rgba(64, 43, 17, 0.5);
}

.status-role-badge[data-role="read-only"][data-clickable="1"]:hover {
  border-color: rgba(255, 219, 145, 0.82);
  color: #ffe1a8;
}

.status-role-badge:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}

.status-role-badge[data-role="admin"]:disabled {
  cursor: default !important;
}

.status-indicator-grid {
  margin-top: 8px;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow: hidden;
}

.status-indicator {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid var(--admin-border-soft);
  border-radius: 12px;
  padding: 7px 9px;
  background: rgba(12, 10, 30, 0.48);
  min-height: 56px;
}

.status-indicator-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9fdff8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-indicator-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.status-indicator-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-indicator-value {
  margin: 5px 0 0;
  font-size: 0.83rem;
  line-height: 1.28;
  font-weight: 700;
  color: #d3ddf4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-indicator-value.display-dot {
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: currentColor;
  font-size: 0;
  line-height: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.status-indicator[data-tone="ok"] .status-indicator-value {
  color: #8df1d0;
}

.status-indicator[data-tone="ok"] {
  border-color: rgba(52, 214, 166, 0.46);
}

.status-indicator[data-tone="warn"] .status-indicator-value {
  color: #ffd897;
}

.status-indicator[data-tone="warn"] {
  border-color: rgba(255, 200, 103, 0.46);
}

.status-indicator[data-tone="error"] .status-indicator-value {
  color: #ffc2cb;
}

.status-indicator[data-tone="error"] {
  border-color: rgba(255, 127, 147, 0.46);
}

.status-indicator[data-tone="info"] .status-indicator-value {
  color: #b9dcff;
}

.control-status-bar {
  margin: 16px -20px -20px;
  padding: 11px 14px 12px;
  gap: 0;
  border-top: 1px solid rgba(187, 216, 255, 0.32);
  border-radius: 0 0 20px 20px;
  background:
    linear-gradient(90deg, rgba(66, 101, 163, 0.42), rgba(51, 88, 151, 0.34) 42%, rgba(30, 105, 102, 0.3)),
    linear-gradient(180deg, rgba(15, 25, 46, 0.9), rgba(8, 14, 30, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 18px 24px rgba(123, 176, 255, 0.16),
    inset 0 -14px 22px rgba(3, 8, 18, 0.36);
  overflow: hidden;
  justify-content: center;
  width: auto;
  max-width: none;
}

.control-status-bar .status-indicator {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 0;
  padding: 0 13px;
}

.control-status-bar .status-indicator + .status-indicator {
  border-left: 1px solid rgba(193, 219, 255, 0.26);
}

.control-status-bar .status-indicator:last-child {
  border-right: 0;
}

.control-status-bar .status-indicator-label {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: #a8c4ef;
  white-space: nowrap;
}

.control-status-bar .status-indicator-icon {
  width: 13px;
  height: 13px;
}

.control-status-bar .status-indicator-value {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
}

.status-toast-stack {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}

.status-toast {
  border: 1px solid rgba(201, 181, 255, 0.88);
  border-radius: 12px;
  padding: 10px 12px;
  color: #f9f6ff;
  font-size: 0.89rem;
  font-weight: 650;
  line-height: 1.36;
  text-align: center;
  background:
    linear-gradient(140deg, rgba(103, 67, 224, 0.97), rgba(137, 92, 246, 0.95) 56%, rgba(74, 49, 174, 0.96));
  box-shadow:
    0 16px 34px rgba(25, 16, 62, 0.46),
    0 0 0 1px rgba(229, 218, 255, 0.2) inset,
    0 0 20px rgba(153, 113, 255, 0.34);
  text-shadow: 0 1px 8px rgba(18, 11, 44, 0.4);
  opacity: 0;
  transform: translateY(8px) scale(0.99);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.status-toast.is-leaving {
  opacity: 0;
  transform: translateY(6px) scale(0.99);
}

.status-toast[data-tone="ok"] {
  border-color: rgba(164, 255, 214, 0.9);
  color: #f3fff9;
  background: linear-gradient(140deg, rgba(18, 122, 82, 0.97), rgba(23, 170, 112, 0.95) 56%, rgba(11, 93, 62, 0.96));
  box-shadow:
    0 16px 34px rgba(10, 51, 35, 0.42),
    0 0 22px rgba(106, 245, 183, 0.3);
}

.status-toast[data-tone="warn"] {
  border-color: rgba(255, 223, 157, 0.92);
  color: #fff9ee;
  background: linear-gradient(140deg, rgba(166, 96, 18, 0.98), rgba(217, 139, 33, 0.95) 58%, rgba(130, 76, 16, 0.97));
  box-shadow:
    0 16px 34px rgba(65, 40, 10, 0.42),
    0 0 22px rgba(255, 188, 92, 0.32);
  text-shadow: 0 1px 8px rgba(54, 31, 8, 0.32);
}

.status-toast[data-tone="error"] {
  border-color: rgba(255, 190, 190, 0.92);
  color: #fff4f5;
  background: linear-gradient(140deg, rgba(166, 35, 56, 0.98), rgba(212, 61, 81, 0.95) 58%, rgba(131, 25, 44, 0.97));
  box-shadow:
    0 16px 34px rgba(68, 13, 26, 0.44),
    0 0 22px rgba(255, 121, 137, 0.32);
}

.admin-lower {
  margin: 28px auto 0;
  text-align: center;
  color: #aeb7d5;
  font-size: 0.8rem;
  line-height: 1.5;
}

.admin-lower p {
  margin: 4px 0;
}

.admin-lower a {
  color: #8ceee3;
  text-decoration: none;
}

.admin-lower a:hover {
  text-decoration: underline;
}

.winner-decision-dialog {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
}

.winner-decision-dialog[hidden] {
  display: none !important;
}

.winner-decision-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 20, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.winner-decision-panel {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--admin-border-soft);
  border-radius: 16px;
  padding: 16px;
  background:
    linear-gradient(156deg, rgba(31, 18, 56, 0.9), rgba(11, 27, 41, 0.86) 56%, rgba(9, 17, 27, 0.92));
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.winner-decision-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #f2f7ff;
}

.winner-decision-message {
  margin: 10px 0 0;
  color: #c7d0eb;
  font-size: 0.92rem;
  line-height: 1.45;
}

.winner-decision-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

body.dialog-open {
  overflow: hidden;
}

.winner-label {
  margin: 0;
  color: var(--admin-muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.winner-name {
  margin: 4px 0 0;
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.7rem);
  font-weight: 900;
  color: #63e9dc;
  text-shadow: 0 4px 16px rgba(17, 110, 100, 0.35);
}

.winner-meta {
  margin: 6px 0 0;
  color: var(--admin-muted);
  font-size: 0.85rem;
}

html {
  background: transparent;
}

.display-page {
  overflow: hidden;
  color: #f8fbff;
  background: transparent;
}

.display-page.display-preview-black {
  background: #000000;
}

#wheelCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
  background: transparent;
}

.display-page.display-disabled #wheelCanvas {
  opacity: 0.62;
  filter: blur(8px) brightness(0.58) saturate(0.68) contrast(0.95);
}

.display-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(12px, 2vh, 26px) clamp(14px, 2vw, 24px) 28px;
}

.display-state {
  margin: 0;
  padding: 10px 16px;
  border: 1px solid rgba(204, 228, 255, 0.18);
  border-radius: 999px;
  background: rgba(7, 16, 31, 0.62);
  font-weight: 700;
  letter-spacing: 0.01em;
  backdrop-filter: blur(4px);
  text-align: center;
  display: none;
}

.display-takeover-prompt {
  pointer-events: auto;
  position: fixed;
  top: 14px;
  right: 14px;
  margin: 0;
  width: auto;
  max-width: min(78vw, 320px);
  border: 1px solid rgba(255, 200, 103, 0.46);
  border-radius: 10px;
  padding: 7px 9px;
  background: linear-gradient(
    160deg,
    rgba(41, 29, 12, 0.86),
    rgba(22, 24, 33, 0.8) 58%,
    rgba(38, 30, 14, 0.84)
  );
  backdrop-filter: blur(10px) saturate(125%);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  box-shadow: 0 12px 24px rgba(28, 20, 8, 0.36);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.display-takeover-prompt[hidden] {
  display: none !important;
}

.display-takeover-message {
  margin: 0;
  color: #ffe0a8;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.15;
}

.display-takeover-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 225, 163, 0.62);
  border-radius: 8px;
  width: 28px;
  height: 24px;
  padding: 0;
  background: linear-gradient(160deg, rgba(115, 85, 32, 0.92), rgba(79, 59, 20, 0.9));
  color: #fff1d3;
  font: 800 0.8rem/1 "Roboto", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease, border-color 140ms ease, filter 140ms ease;
}

.display-takeover-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 237, 191, 0.8);
  filter: brightness(1.06);
}

.display-takeover-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 215, 144, 0.3);
}

.display-takeover-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.winner-banner {
  --winner-ribbon-light: rgba(62, 114, 200, 0.86);
  --winner-ribbon-base: rgba(32, 69, 138, 0.82);
  --winner-ribbon-dark: rgba(27, 55, 114, 0.9);
  --winner-ribbon-tail: rgba(23, 47, 97, 0.95);
  --winner-ribbon-border: rgba(175, 222, 255, 0.56);
  --winner-ribbon-text: #f5fbff;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: fit-content;
  max-width: min(86vw, 760px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  padding: 20px 28px 22px;
  background:
    linear-gradient(160deg, rgba(16, 21, 33, 0.62), rgba(9, 12, 21, 0.55) 46%, rgba(7, 10, 18, 0.62));
  backdrop-filter: blur(11px) saturate(170%) contrast(1.04) brightness(1.02);
  -webkit-backdrop-filter: blur(11px) saturate(170%) contrast(1.04) brightness(1.02);
  box-shadow:
    0 34px 82px rgba(0, 0, 0, 0.44),
    0 12px 30px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.winner-banner[hidden] {
  display: none !important;
}

.winner-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.07) 38%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(135% 110% at 10% -30%, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.1) 34%, rgba(255, 255, 255, 0) 64%),
    radial-gradient(120% 100% at 90% -24%, rgba(166, 210, 255, 0.34), rgba(166, 210, 255, 0) 66%);
  mix-blend-mode: screen;
  opacity: 0.72;
  pointer-events: none;
}

.winner-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(189, 220, 255, 0.14),
    inset 0 15px 28px rgba(255, 255, 255, 0.07),
    inset 0 -16px 32px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

.winner-banner > * {
  position: relative;
  z-index: 1;
}

.winner-banner.bump-in {
  animation: winner-bump-in 1180ms cubic-bezier(0.16, 0.92, 0.22, 1) both;
  will-change: transform, opacity;
}

.winner-banner.bump-out {
  animation: winner-bump-out 620ms cubic-bezier(0.2, 0.72, 0.24, 1) both;
  will-change: transform, opacity;
}

@keyframes winner-bump-in {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
  }

  54% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.055);
  }

  78% {
    transform: translate(-50%, -50%) scale(0.992);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes winner-bump-out {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  26% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.03);
  }

  62% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.988);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
  }
}

.banner-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.84rem;
  color: #dbe8ff;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(8, 20, 45, 0.28);
}

.banner-name {
  margin: 0;
  font-size: clamp(2rem, 2.8vw, 3.7rem);
  font-weight: 900;
  line-height: 1.05;
  color: #f7fbff;
  text-shadow: 0 2px 14px rgba(4, 10, 24, 0.34);
  overflow-wrap: anywhere;
}

.banner-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.banner-category {
  margin: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(0.8rem, 1vw, 1.05rem);
  font-weight: 800;
  color: var(--winner-ribbon-text);
  text-shadow: 0 1px 8px rgba(8, 20, 45, 0.32);
  border: 1px solid var(--winner-ribbon-border);
  border-radius: 8px;
  background: linear-gradient(
    150deg,
    var(--winner-ribbon-light),
    var(--winner-ribbon-base) 58%,
    var(--winner-ribbon-dark)
  );
  box-shadow:
    0 8px 18px rgba(10, 24, 56, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28);
}

.banner-category[hidden],
.banner-prize[hidden] {
  display: none !important;
}

.banner-category::before,
.banner-category::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 14px;
  transform: translateY(-50%);
  background: var(--winner-ribbon-tail);
  z-index: -1;
}

.banner-category::before {
  left: -8px;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.banner-category::after {
  right: -8px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.banner-prize {
  margin: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  font-size: clamp(1rem, 1.35vw, 1.45rem);
  font-weight: 700;
  color: #ebf2ff;
  text-shadow: 0 1px 10px rgba(8, 20, 45, 0.3);
}

.banner-prize::before,
.banner-prize::after {
  content: "";
  display: block;
  width: clamp(24px, 4.2vw, 56px);
  height: 1px;
  background: linear-gradient(90deg, rgba(184, 220, 255, 0.06), rgba(210, 234, 255, 0.86), rgba(184, 220, 255, 0.06));
}

@media (max-width: 860px) {
  .display-takeover-prompt {
    top: 10px;
    right: 10px;
    max-width: min(88vw, 280px);
    padding: 6px 8px;
  }

  .display-takeover-btn {
    width: 26px;
    height: 22px;
    font-size: 0.74rem;
  }

  .admin-header-controls {
    flex-basis: 100%;
    max-width: 100%;
    width: 100%;
    align-items: flex-start;
  }

  .admin-auth-row {
    justify-content: flex-start;
  }

  .header-room-row {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
  }

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

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

  .spin-config-row {
    align-items: stretch;
  }

  .number-input-wrap {
    width: 100%;
    max-width: 210px;
  }

  .entries-input {
    min-height: 300px;
  }

  .custom-color-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="password"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px;
  }

  .admin-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .admin-brand-logo {
    width: clamp(110px, 36vw, 170px);
    height: auto;
  }

  .admin-brand-text {
    width: 100%;
  }

  .admin-header .subtitle {
    margin-top: 4px;
  }

  .entries-tab-nav {
    width: 100%;
    display: flex;
  }

  .entries-tab-btn {
    flex: 1 1 0;
    text-align: center;
  }

  .entries-auto-remove-inline {
    width: 100%;
    margin-left: 0;
    margin-top: 6px;
  }

  .status-card-heading {
    align-items: flex-start;
  }

  .status-card-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .room-inline {
    flex-wrap: wrap;
  }

  .room-inline .room-input-wrap {
    width: 100%;
  }

  .generate-link-btn {
    width: 100%;
  }

  .header-room-row .room-inline {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .header-room-row .room-inline .room-input-wrap {
    width: auto;
    flex: 1 1 0;
    max-width: none;
    min-width: 0;
  }

  .header-room-row .generate-link-btn {
    width: auto;
    min-width: 0;
    padding-inline: 10px;
    font-size: 0.78rem;
  }

  .winner-summary-row {
    flex-direction: column;
  }

  .winner-spin-inline {
    width: 100%;
  }

  .winner-spin-inline #spinBtn {
    width: 100%;
    height: auto;
  }

  .control-status-bar {
    margin: 14px -20px -20px;
    padding: 10px 10px 11px;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .control-status-bar .status-indicator {
    flex: 1 1 0;
    min-width: 0;
    gap: 4px;
    padding: 0 5px;
  }

  .control-status-bar .status-indicator-label,
  .control-status-bar .status-indicator-value {
    font-size: 0.66rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .control-status-bar .status-indicator-label {
    letter-spacing: 0.03em;
  }

  .status-toast-stack {
    top: 12px;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    width: min(380px, calc(100vw - 24px));
  }

  .winner-decision-actions .btn {
    width: 100%;
  }
}
