:root {
  --admin-bg: #030919;
  --admin-bg-deep: #010611;
  --admin-surface: #08152a;
  --admin-surface-raised: #0b1a33;
  --admin-surface-soft: #0d1d36;
  --admin-border: #1b3151;
  --admin-border-strong: #29466f;
  --admin-text: #f3f7ff;
  --admin-muted: #8fa1bd;
  --admin-purple: #8b3dff;
  --admin-purple-soft: #431b8c;
  --admin-cyan: #18d6f2;
  --admin-green: #25df86;
  --admin-amber: #ffb129;
  --admin-red: #ff476f;
  --admin-pink: #f63b9d;
  --admin-sidebar-width: 228px;
  --admin-topbar-height: 66px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--admin-text);
  background: var(--admin-bg);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 8%, rgba(42, 64, 137, .13), transparent 28rem),
    var(--admin-bg);
  color: var(--admin-text);
}

button, input { font: inherit; }

button, a, input { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--admin-cyan);
  outline-offset: 2px;
}

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

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--admin-sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 18px 10px 14px;
  border-right: 1px solid rgba(35, 63, 104, .75);
  background: linear-gradient(180deg, #050c1e 0%, #030817 100%);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 9px;
  color: var(--admin-text);
  text-decoration: none;
}

.admin-brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(25, 214, 242, .72);
  border-radius: 11px 11px 11px 4px;
  background: linear-gradient(145deg, #12d8f3 5%, #406aff 48%, #b022f2 88%);
  box-shadow: 0 0 22px rgba(73, 86, 255, .35);
  color: white;
  font-size: 25px;
  font-weight: 900;
  transform: skew(-5deg);
}

.admin-brand strong,
.admin-brand small { display: block; letter-spacing: .08em; }
.admin-brand strong { font-size: 16px; }
.admin-brand small { margin-top: 2px; color: #a968ff; font-size: 8px; font-weight: 800; }

.admin-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  margin-top: 24px;
  overflow-y: auto;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #b6c2d6;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.admin-nav-link:hover { background: rgba(32, 51, 87, .45); color: white; }
.admin-nav-link[aria-current="page"] {
  border-color: rgba(139, 61, 255, .48);
  background: linear-gradient(90deg, rgba(139, 61, 255, .5), rgba(43, 61, 152, .24));
  color: white;
}
.admin-nav-icon { width: 20px; text-align: center; color: #b9c8e1; }
.admin-nav-link[aria-current="page"] .admin-nav-icon { color: #d4a5ff; }
.admin-nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-nav-unavailable {
  margin-left: auto;
  color: #667996;
  font-size: 9px;
  text-transform: uppercase;
}

.admin-sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--admin-border);
  color: var(--admin-muted);
  font-size: 12px;
}

.admin-connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--admin-amber);
  box-shadow: 0 0 9px currentColor;
}
.admin-connection-dot[data-state="online"] { background: var(--admin-green); }
.admin-connection-dot[data-state="offline"] { background: var(--admin-red); }

.admin-main { grid-column: 2; min-width: 0; }

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--admin-topbar-height);
  padding: 0 18px;
  border-bottom: 1px solid rgba(35, 63, 104, .72);
  background: rgba(3, 9, 25, .94);
  backdrop-filter: blur(16px);
}

.admin-menu-button { display: none; }
.admin-icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: var(--admin-surface);
  color: var(--admin-text);
  cursor: pointer;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(460px, 48vw);
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: rgba(7, 17, 36, .9);
  color: var(--admin-muted);
}
.admin-search input { width: 100%; border: 0; outline: 0; background: transparent; color: white; }
.admin-search input::placeholder { color: #72839d; }
.admin-search select {
  max-width: 108px;
  border: 0;
  border-right: 1px solid var(--admin-border);
  outline: 0;
  background: transparent;
  color: var(--admin-text);
  font: inherit;
}
.admin-search kbd { padding: 2px 6px; border: 1px solid #334760; border-radius: 4px; color: #7e8da4; font-size: 10px; }

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.admin-status {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(37, 223, 134, .12);
  border-radius: 7px;
  background: rgba(16, 78, 63, .18);
  color: var(--admin-green);
  font-size: 12px;
}
.admin-status span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.admin-status[data-state="reconnecting"] {
  border-color: rgba(247, 190, 74, .18);
  background: rgba(111, 72, 14, .18);
  color: var(--admin-amber);
}
.admin-status[data-state="offline"] {
  border-color: rgba(255, 82, 111, .18);
  background: rgba(103, 25, 42, .18);
  color: var(--admin-red);
}

.admin-notifications {
  position: relative;
}
.admin-notifications small {
  position: absolute;
  top: -6px;
  right: -7px;
  padding: 2px 4px;
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  background: var(--admin-surface);
  color: var(--admin-muted);
  font-size: 7px;
  line-height: 1;
}

.admin-identity { display: flex; align-items: center; gap: 8px; padding-left: 4px; }
.admin-avatar { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--admin-border-strong); border-radius: 50%; background: #152542; font-weight: 800; }
.admin-identity strong, .admin-identity small { display: block; }
.admin-identity strong { font-size: 12px; }
.admin-identity small { margin-top: 2px; color: var(--admin-muted); font-size: 10px; }
.admin-sign-out-button { white-space: nowrap; }

.admin-content { padding: 18px; }
.admin-shell[data-auth-required="true"] {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}
.admin-shell[data-auth-required="true"] .admin-sidebar,
.admin-shell[data-auth-required="true"] .admin-topbar {
  display: none;
}
.admin-shell[data-auth-required="true"] .admin-main {
  display: grid;
  min-width: 0;
  min-height: 100vh;
}
.admin-shell[data-auth-required="true"] .admin-content {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(126, 58, 242, .18), transparent 32%),
    radial-gradient(circle at 82% 88%, rgba(24, 214, 242, .12), transparent 34%),
    var(--admin-bg);
}
.admin-sign-in {
  width: min(460px, 100%);
  padding: 32px;
  border: 1px solid var(--admin-border-strong);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(16, 32, 65, .98), rgba(5, 14, 32, .98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .56);
  text-align: center;
}
.admin-sign-in-mark {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  place-items: center;
  border: 1px solid rgba(24, 214, 242, .52);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--admin-cyan), var(--admin-purple) 56%, #f024be);
  box-shadow: 0 0 34px rgba(126, 58, 242, .42);
  color: white;
  font-size: 40px;
  font-weight: 900;
}
.admin-sign-in > small {
  color: var(--admin-cyan);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.admin-sign-in h1 {
  margin: 12px 0 10px;
  font-size: clamp(28px, 5vw, 38px);
}
.admin-sign-in p {
  margin: 0 auto 22px;
  color: var(--admin-muted);
  line-height: 1.65;
}
.admin-sign-in-button {
  width: 100%;
  min-height: 48px;
}
.admin-sign-in-error {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid rgba(255, 82, 111, .45);
  border-radius: 6px;
  background: rgba(255, 82, 111, .1);
  color: #ff9aac;
  line-height: 1.45;
}
.admin-sign-in .admin-sign-in-note {
  margin: 14px 0 0;
  font-size: 11px;
}

.admin-loading,
.admin-error,
.admin-unavailable {
  display: grid;
  min-height: 330px;
  place-items: center;
  align-content: center;
  gap: 9px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  text-align: center;
}
.admin-loading small,
.admin-error small,
.admin-unavailable p { max-width: 520px; color: var(--admin-muted); }
.admin-spinner { width: 30px; height: 30px; border: 3px solid #263d62; border-top-color: var(--admin-purple); border-radius: 50%; animation: admin-spin .8s linear infinite; }
@keyframes admin-spin { to { transform: rotate(360deg); } }

.admin-button {
  min-height: 38px;
  padding: 0 17px;
  border: 1px solid #7741d7;
  border-radius: 6px;
  background: linear-gradient(135deg, #7028df, #913cff);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.admin-page-header { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.admin-page-header h1 { margin: 0; font-size: clamp(22px, 2.1vw, 29px); letter-spacing: 0; }
.admin-page-header p { margin: 4px 0 0; color: var(--admin-muted); font-size: 13px; }
.admin-page-meta { margin-left: auto; color: var(--admin-muted); font-size: 11px; }

.admin-section-card {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(10, 26, 51, .98), rgba(6, 18, 37, .98));
}

.admin-stale-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 177, 41, .4);
  border-radius: 7px;
  background: rgba(90, 58, 12, .22);
  color: #ffe0a3;
  font-size: 12px;
}
.admin-stale-warning span { color: #d4bc8b; }

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-metric-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 106px;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(12, 29, 56, .98), rgba(7, 20, 41, .98));
}
.admin-metric-card--purple { border-color: rgba(139, 61, 255, .35); }
.admin-metric-card--green { border-color: rgba(37, 223, 134, .28); }
.admin-metric-card--amber { border-color: rgba(255, 177, 41, .28); }
.admin-metric-card--pink { border-color: rgba(246, 59, 157, .28); }
.admin-metric-card--cyan { border-color: rgba(24, 214, 242, .28); }
.admin-metric-icon {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(139, 61, 255, .09);
  color: var(--admin-purple);
  font-size: 23px;
}
.admin-metric-card--green .admin-metric-icon { color: var(--admin-green); }
.admin-metric-card--amber .admin-metric-icon { color: var(--admin-amber); }
.admin-metric-card--pink .admin-metric-icon { color: var(--admin-pink); }
.admin-metric-card--cyan .admin-metric-icon { color: var(--admin-cyan); }
.admin-metric-card small,
.admin-metric-card strong,
.admin-metric-card p { display: block; }
.admin-metric-card small { color: #9fb1ca; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.admin-metric-card strong { margin-top: 5px; font-size: clamp(18px, 1.6vw, 26px); line-height: 1.08; }
.admin-metric-card strong em { color: var(--admin-muted); font-size: 10px; font-style: normal; }
.admin-metric-card p { margin: 5px 0 0; color: var(--admin-muted); font-size: 10px; }

.admin-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(250px, .72fr);
  gap: 12px;
}
.admin-overview-main,
.admin-overview-side { display: grid; align-content: start; gap: 12px; }
.admin-panel {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(10, 26, 51, .98), rgba(6, 18, 37, .98));
}
.admin-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-panel-header h2 { margin: 0; font-size: 14px; letter-spacing: .02em; }
.admin-panel-header p { margin: 3px 0 0; color: var(--admin-muted); font-size: 10px; }
.admin-panel-header a { margin-left: auto; color: #b477ff; font-size: 10px; text-decoration: none; }
.admin-live-chip {
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid rgba(37, 223, 134, .4);
  border-radius: 999px;
  background: rgba(37, 223, 134, .08);
  color: var(--admin-green);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-operations-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-operation {
  min-width: 0;
  padding: 12px;
  border: 1px solid #1d385c;
  border-radius: 7px;
  background: rgba(6, 18, 38, .72);
}
.admin-operation > p { color: var(--admin-muted); font-size: 11px; }
.admin-operation-heading { display: flex; align-items: center; gap: 9px; min-width: 0; }
.admin-operation-heading > div { min-width: 0; }
.admin-operation-heading small,
.admin-operation-heading strong { display: block; }
.admin-operation-heading small { color: var(--admin-muted); font-size: 9px; text-transform: uppercase; }
.admin-operation-heading strong { margin-top: 2px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.admin-operation-icon { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--admin-border-strong); border-radius: 7px; color: var(--admin-muted); }
.admin-operation-icon--purple { border-color: rgba(139, 61, 255, .5); color: #b779ff; }
.admin-operation-icon--cyan { border-color: rgba(24, 214, 242, .45); color: var(--admin-cyan); }
.admin-status-badge { margin-left: auto; padding: 4px 7px; border: 1px solid currentColor; border-radius: 5px; font-size: 9px; }
.admin-status-badge--green { color: var(--admin-green); }
.admin-status-badge--cyan { color: var(--admin-cyan); }
.admin-status-badge--purple { color: #b477ff; }
.admin-status-badge--amber { color: var(--admin-amber); }
.admin-status-badge--blue { color: #65a2ff; }
.admin-status-badge--red { color: var(--admin-red); }
.admin-status-badge--muted { color: var(--admin-muted); }
.admin-operation-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.admin-operation-stats div { padding: 7px; border: 1px solid rgba(35, 63, 104, .65); border-radius: 6px; }
.admin-operation-stats dt { color: var(--admin-muted); font-size: 8px; text-transform: uppercase; }
.admin-operation-stats dd { margin: 3px 0 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-outline-button { display: block; padding: 8px 10px; border: 1px solid #5d3aa5; border-radius: 6px; color: #caaaff; font-size: 10px; text-align: center; text-decoration: none; }
.admin-action-select {
  min-width: 138px;
  min-height: 36px;
  padding: 0 30px 0 11px;
  border: 1px solid #4a6285;
  border-radius: 7px;
  background: #0a1a34;
  color: #dce8f9;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.admin-action-select:hover { border-color: #7960be; background: #0d203e; }
.admin-action-select:focus-visible { outline: 2px solid var(--admin-cyan); outline-offset: 2px; }
.admin-action-select:disabled { opacity: .55; cursor: progress; }
.admin-action-select option { background: #0a1a34; color: #dce8f9; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.admin-table th { color: var(--admin-muted); font-size: 8px; font-weight: 700; text-align: left; text-transform: uppercase; }
.admin-table th,
.admin-table td { padding: 9px 7px; border-bottom: 1px solid rgba(35, 63, 104, .55); white-space: nowrap; }
.admin-table code { color: #b8c9e3; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.admin-amount { font-weight: 800; }
.admin-amount--credit { color: var(--admin-green); }
.admin-amount--debit { color: var(--admin-red); }
.admin-amount--neutral { color: var(--admin-muted); }

.admin-state-list { margin: 0; }
.admin-state-list > div { display: flex; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(35, 63, 104, .5); }
.admin-state-list dt { display: flex; align-items: center; gap: 8px; color: #b8c5d9; font-size: 11px; }
.admin-state-list dd { margin-left: auto; font-size: 13px; font-weight: 800; }
.admin-state-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--admin-muted); }
.admin-state-dot--green { background: var(--admin-green); }
.admin-state-dot--amber { background: var(--admin-amber); }
.admin-state-dot--red { background: var(--admin-red); }
.admin-unavailable-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.admin-unavailable-list li { display: grid; gap: 3px; padding: 9px; border: 1px solid rgba(35, 63, 104, .55); border-radius: 6px; }
.admin-unavailable-list strong { font-size: 10px; }
.admin-unavailable-list span { color: var(--admin-muted); font-size: 9px; line-height: 1.4; }
.admin-empty-state { display: grid; min-height: 92px; place-items: center; align-content: center; padding: 12px; color: var(--admin-muted); text-align: center; }
.admin-empty-state strong { color: #cbd7e9; font-size: 11px; }
.admin-empty-state p { margin: 4px 0 0; font-size: 10px; }

.admin-toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; }
.admin-toast { max-width: 360px; padding: 12px 14px; border: 1px solid var(--admin-border-strong); border-radius: 7px; background: #0d203c; box-shadow: 0 16px 40px rgba(0, 0, 0, .38); }
.admin-toast--success { border-color: rgba(37, 223, 134, .55); color: #a8ffd4; }

.admin-player-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.admin-player-summary-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 80px;
  padding: 11px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(12, 29, 56, .98), rgba(7, 20, 41, .98));
}
.admin-player-summary-card--players {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr);
  grid-template-rows: 28px auto;
  gap: 2px 6px;
  padding: 8px 10px;
  border-color: rgba(139, 61, 255, .35);
}
.admin-player-summary-card--players .admin-player-summary-icon {
  grid-column: 1;
  grid-row: 1;
  width: 28px;
  height: 28px;
  font-size: 14px;
}
.admin-player-summary-card--players .admin-player-summary-content { display: contents; }
.admin-player-summary-card--players .admin-player-summary-content > small {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}
.admin-player-summary-card--players .admin-player-summary-content > strong {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  margin-top: 0;
}
.admin-player-summary-card[data-summary-tone="purple"] { border-color: rgba(139, 61, 255, .35); }
.admin-player-summary-card[data-summary-tone="green"] { border-color: rgba(37, 223, 134, .28); }
.admin-player-summary-card[data-summary-tone="cyan"] { border-color: rgba(24, 214, 242, .28); }
.admin-player-summary-icon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 7px;
  background: rgba(139, 61, 255, .09);
  color: var(--admin-purple);
  font-size: 17px;
}
.admin-player-summary-card[data-summary-tone="green"] .admin-player-summary-icon { color: var(--admin-green); }
.admin-player-summary-card[data-summary-tone="cyan"] .admin-player-summary-icon { color: var(--admin-cyan); }
.admin-player-summary-content { min-width: 0; }
.admin-player-summary-content > small,
.admin-player-summary-content > strong,
.admin-player-summary-content > p { display: block; }
.admin-player-summary-content > small { color: #9fb1ca; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.admin-player-summary-content > strong { margin-top: 3px; font-size: clamp(18px, 1.5vw, 24px); line-height: 1.05; }
.admin-player-summary-content > strong em { color: var(--admin-muted); font-size: 9px; font-style: normal; }
.admin-player-summary-content > p { margin: 4px 0 0; color: var(--admin-muted); font-size: 9px; }
.admin-player-state-chips {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 4px;
  margin-top: 0;
}
.admin-player-state-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  padding: 1px 4px;
  border: 1px solid rgba(35, 63, 104, .7);
  border-radius: 999px;
  color: var(--admin-muted);
  font-size: 8px;
}
.admin-player-state-chip strong { color: #dce7f7; font-size: 9px; }
.admin-player-state-chip[data-player-state="active"] { border-color: rgba(37, 223, 134, .28); }
.admin-player-state-chip[data-player-state="suspended"] { border-color: rgba(255, 177, 41, .28); }
.admin-player-state-chip[data-player-state="banned"] { border-color: rgba(255, 91, 117, .3); }
.admin-player-panel { padding: 0; overflow: hidden; }
.admin-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(140px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 13px;
  border-bottom: 1px solid var(--admin-border);
}
.admin-field { display: grid; gap: 6px; min-width: 0; }
.admin-field > span { color: var(--admin-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  outline: 0;
  background: #07152c;
  color: var(--admin-text);
  font: inherit;
}
.admin-field textarea { min-height: 78px; resize: vertical; }
.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus { border-color: var(--admin-purple); box-shadow: 0 0 0 3px rgba(139, 61, 255, .14); }
.admin-player-table td { height: 57px; }
.admin-player-cell { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.admin-player-avatar,
.admin-profile-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(24, 214, 242, .52);
  border-radius: 50%;
  background: linear-gradient(145deg, #173861, #472271);
  color: white;
  font-weight: 900;
}
.admin-player-avatar { width: 31px; height: 31px; font-size: 10px; }
.admin-player-table .admin-status-badge { display: inline-block; margin: 0; }
.admin-outline-button--inline { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; padding: 0 12px; background: transparent; cursor: pointer; }
.admin-pagination { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 9px 13px; color: var(--admin-muted); font-size: 10px; }
.admin-pagination > div { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.admin-pagination .admin-icon-button { width: 31px; height: 31px; }
.admin-pagination button:disabled { opacity: .35; cursor: default; }
.admin-loading--compact,
.admin-error--compact { min-height: 220px; border: 0; border-radius: 0; }
.admin-empty-state--large { min-height: 220px; }

.admin-detail-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--admin-muted); font-size: 10px; }
.admin-detail-breadcrumb button { border: 0; background: transparent; color: #b477ff; cursor: pointer; }
.admin-detail-breadcrumb code { color: #afbdd2; }
.admin-player-profile-header {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr);
  gap: 12px;
  margin-bottom: 10px;
}
.admin-profile-identity,
.admin-balance-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(11, 29, 56, .98), rgba(7, 20, 41, .98));
}
.admin-profile-identity { display: flex; align-items: center; gap: 16px; }
.admin-profile-avatar { width: 80px; height: 80px; font-size: 24px; box-shadow: 0 0 28px rgba(24, 214, 242, .14); }
.admin-profile-title { display: flex; align-items: center; gap: 10px; }
.admin-profile-title h1 { margin: 0; font-size: 24px; }
.admin-profile-title .admin-status-badge { margin: 0; }
.admin-profile-identity small { display: block; margin-top: 8px; color: var(--admin-muted); font-size: 9px; text-transform: uppercase; }
.admin-profile-identity code { color: #c5d1e2; }
.admin-profile-identity p { margin: 9px 0 0; color: var(--admin-muted); font-size: 11px; }
.admin-balance-card > small { color: #b5a2e8; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.admin-balance-card > strong { display: block; margin: 7px 0 14px; font-size: 27px; }
.admin-balance-card > strong em { color: var(--admin-muted); font-size: 11px; font-style: normal; }
.admin-balance-card dl { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; }
.admin-balance-card dl div { padding: 8px 0; border-top: 1px solid var(--admin-border); }
.admin-balance-card dl div + div { padding-left: 12px; border-left: 1px solid var(--admin-border); }
.admin-balance-card dt { color: var(--admin-muted); font-size: 8px; text-transform: uppercase; }
.admin-balance-card dd { margin: 4px 0 0; color: var(--admin-cyan); font-weight: 800; }
.admin-balance-card div:last-child dd { color: var(--admin-pink); }
.admin-detail-tabs { display: flex; min-width: 0; margin-bottom: 10px; overflow-x: auto; border: 1px solid var(--admin-border); border-radius: 7px; background: rgba(7, 20, 41, .9); }
.admin-detail-tabs button { min-height: 40px; padding: 0 18px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--admin-muted); cursor: pointer; white-space: nowrap; }
.admin-detail-tabs button[aria-current="page"] { border-color: var(--admin-purple); background: rgba(139, 61, 255, .12); color: white; }
.admin-player-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 12px; }
.admin-player-detail-main { min-width: 0; }
.admin-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-detail-list { margin: 0; }
.admin-detail-list > div,
.admin-record-card dl > div { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(35, 63, 104, .5); }
.admin-detail-list dt,
.admin-record-card dt { color: var(--admin-muted); font-size: 9px; }
.admin-detail-list dd,
.admin-record-card dd { margin-left: auto; overflow-wrap: anywhere; color: #cbd7e8; font-size: 10px; text-align: right; }
.admin-player-actions { display: grid; align-content: start; gap: 7px; padding: 12px; border: 1px solid var(--admin-border); border-radius: 8px; background: var(--admin-surface); }
.admin-player-actions h2 { margin: 0 0 5px; color: var(--admin-muted); font-size: 9px; text-transform: uppercase; }
.admin-action-button { min-height: 36px; border: 1px solid currentColor; border-radius: 6px; background: rgba(139, 61, 255, .07); color: #b477ff; cursor: pointer; }
.admin-action-button--cyan { color: var(--admin-cyan); }
.admin-action-button--blue { color: #65a2ff; }
.admin-action-button--amber { color: var(--admin-amber); }
.admin-action-button--green { color: var(--admin-green); }
.admin-action-button--red { color: var(--admin-red); }
.admin-card-list { display: grid; gap: 8px; }
.admin-color-clash-table { min-width: 760px; }
.admin-color-clash-table .admin-game-col--game strong,
.admin-color-clash-table .admin-game-col--game code { display: block; }
.admin-color-clash-table .admin-game-col--game code { max-width: 180px; margin-top: 3px; overflow: hidden; color: var(--admin-muted); font-size: 8px; text-overflow: ellipsis; }
.admin-color-clash-table .admin-game-col--result .admin-status-badge { display: inline-block; margin: 0; }
.admin-color-clash-table .admin-game-col--action { text-align: right; }
.admin-game-link { display: inline-flex; min-height: 30px; align-items: center; padding: 0 9px; border: 1px solid rgba(24, 214, 242, .48); border-radius: 5px; color: var(--admin-cyan); font-size: 9px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.admin-game-link:hover { border-color: var(--admin-cyan); background: rgba(24, 214, 242, .08); }
.admin-game-breadcrumb a { color: var(--admin-cyan); text-decoration: none; }
.admin-game-detail-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; padding: 16px; border: 1px solid var(--admin-border-strong); border-radius: 8px; background: var(--admin-surface); }
.admin-game-detail-header > div { min-width: 0; }
.admin-game-detail-header small { color: var(--admin-purple); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.admin-game-detail-header h1 { margin: 4px 0; font-size: 22px; }
.admin-game-detail-header code { display: block; overflow-wrap: anywhere; color: var(--admin-muted); font-size: 9px; }
.admin-game-detail-header .admin-status-badge { margin-left: auto; }
.admin-game-detail-metadata { margin-bottom: 12px; }
.admin-game-detail-metadata .admin-detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
.admin-game-participant-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 9px; }
.admin-game-participant { min-width: 0; padding: 11px; border: 1px solid rgba(35, 63, 104, .65); border-radius: 7px; background: rgba(5, 16, 34, .66); }
.admin-game-participant > header { display: flex; align-items: flex-start; gap: 8px; }
.admin-game-participant > header > div { min-width: 0; }
.admin-game-participant strong,
.admin-game-participant small { display: block; overflow-wrap: anywhere; }
.admin-game-participant small { margin-top: 3px; color: var(--admin-purple); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.admin-game-participant .admin-mode-badge { flex: 0 0 auto; margin-left: auto; color: var(--admin-cyan); }
.admin-game-participant .admin-detail-list { margin-top: 8px; }
.admin-game-unavailable .admin-outline-button { justify-self: center; text-decoration: none; }
.admin-record-card { padding: 10px; border: 1px solid rgba(35, 63, 104, .65); border-radius: 6px; background: rgba(5, 16, 34, .66); }
.admin-record-card > div { display: flex; align-items: center; gap: 8px; }
.admin-record-card .admin-status-badge { margin-left: auto; }
.admin-record-card p,
.admin-record-card small { color: var(--admin-muted); font-size: 9px; }
.admin-unavailable-inline { display: grid; gap: 4px; margin-top: 10px; padding: 11px; border: 1px dashed #345176; border-radius: 6px; color: var(--admin-muted); font-size: 10px; }
.admin-unavailable-inline strong { color: #c8d3e3; }
.admin-balance-breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.admin-balance-breakdown article { padding: 12px; border: 1px solid var(--admin-border); border-radius: 6px; background: #07162e; }
.admin-balance-breakdown small,
.admin-balance-breakdown strong { display: block; }
.admin-balance-breakdown small { color: var(--admin-muted); font-size: 8px; text-transform: uppercase; }
.admin-balance-breakdown strong { margin-top: 5px; font-size: 14px; }

.admin-modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; background: rgba(0, 4, 14, .78); backdrop-filter: blur(9px); }
.admin-modal { width: min(620px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 16px; border: 1px solid var(--admin-border-strong); border-radius: 8px; background: #08172f; box-shadow: 0 26px 80px rgba(0, 0, 0, .58); }
.admin-modal--red { border-color: rgba(255, 82, 111, .56); }
.admin-modal--amber { border-color: rgba(255, 177, 41, .5); }
.admin-modal--cyan { border-color: rgba(24, 214, 242, .5); }
.admin-modal > header { display: flex; align-items: center; gap: 10px; }
.admin-modal > header h2 { margin: 3px 0 0; font-size: 20px; }
.admin-modal > header small { color: var(--admin-muted); font-size: 8px; text-transform: uppercase; }
.admin-modal > header button { margin-left: auto; }
.admin-action-target { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; padding: 10px; border: 1px solid var(--admin-border); border-radius: 6px; background: rgba(4, 14, 31, .75); }
.admin-action-target strong,
.admin-action-target code { display: block; }
.admin-action-target code { margin-top: 3px; color: var(--admin-muted); font-size: 9px; }
.admin-action-consequence { padding: 10px; border-left: 3px solid var(--admin-amber); background: rgba(93, 62, 10, .17); color: #ead5aa; font-size: 11px; line-height: 1.5; }
.admin-modal form { display: grid; gap: 11px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-confirmation { display: flex; align-items: flex-start; gap: 8px; color: #b7c4d8; font-size: 10px; line-height: 1.45; }
.admin-confirmation input { margin-top: 1px; accent-color: var(--admin-purple); }
.admin-modal form footer { display: flex; justify-content: flex-end; gap: 9px; }
.admin-form-error { margin: 0; color: #ff8da2; font-size: 10px; }

.admin-metric-grid--lottery { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
.admin-lottery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 12px;
  align-items: start;
}
.admin-lottery-panel { min-width: 0; padding: 0; overflow: hidden; }
.admin-lottery-filters {
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(128px, 1fr)) auto;
}
.admin-lottery-table td:first-child strong,
.admin-lottery-table td:first-child code,
.admin-lottery-table td:nth-child(2) small {
  display: block;
}
.admin-lottery-table td:first-child strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.admin-lottery-table td:first-child code,
.admin-lottery-table td:nth-child(2) small { margin-top: 4px; color: var(--admin-muted); font-size: 8px; }
.admin-lottery-table .admin-status-badge { display: inline-block; margin: 0; }
.admin-mode-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
}
.admin-mode-badge--automatic { color: #b477ff; background: rgba(139, 61, 255, .1); }
.admin-mode-badge--manual { color: var(--admin-amber); background: rgba(255, 177, 41, .08); }
.admin-countdown { color: var(--admin-cyan); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.admin-live-monitor { position: sticky; top: calc(var(--admin-topbar-height) + 12px); min-width: 0; }
.admin-live-monitor > small { display: block; margin-top: 3px; color: var(--admin-muted); text-align: center; }
.admin-live-countdown {
  display: block;
  margin-top: 4px;
  color: var(--admin-pink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(25px, 3vw, 38px);
  text-align: center;
}
.admin-result-balls {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 13px 0;
  padding: 10px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: rgba(4, 13, 31, .68);
}
.admin-result-balls span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #a44dff;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #35466b, #111a31 65%);
  color: white;
  font-weight: 900;
  box-shadow: 0 0 14px rgba(139, 61, 255, .28);
}
.admin-result-balls em { color: var(--admin-muted); font-size: 9px; text-align: center; }
.admin-live-monitor .admin-outline-button { width: 100%; }
.admin-draw-detail {
  position: fixed;
  inset: var(--admin-topbar-height) 0 0 auto;
  z-index: 90;
  width: min(520px, calc(100vw - var(--admin-sidebar-width)));
  padding: 18px;
  overflow-y: auto;
  border-left: 1px solid var(--admin-border-strong);
  background: rgba(5, 15, 34, .98);
  box-shadow: -24px 0 70px rgba(0, 0, 0, .46);
  backdrop-filter: blur(18px);
}
.admin-draw-detail > header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.admin-draw-detail > header > div { min-width: 0; }
.admin-draw-detail > header small { color: var(--admin-purple-soft); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.admin-draw-detail > header h2 { margin: 4px 0; overflow-wrap: anywhere; font-size: 22px; }
.admin-draw-detail > header code { color: var(--admin-muted); font-size: 9px; overflow-wrap: anywhere; }
.admin-draw-detail > header button { flex: 0 0 auto; margin-left: auto; }
.admin-draw-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-draw-detail-grid .admin-detail-list {
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: rgba(7, 22, 46, .84);
}
.admin-lock-notice {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid rgba(255, 177, 41, .46);
  border-radius: 7px;
  background: rgba(87, 55, 5, .2);
}
.admin-lock-notice strong { color: var(--admin-amber); font-size: 10px; }
.admin-lock-notice span { color: #d9c7a5; font-size: 9px; line-height: 1.45; }
.admin-draw-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }

@media (max-width: 1180px) {
  .admin-metric-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
  .admin-player-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-filter-bar { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .admin-filter-bar .admin-field--search { grid-column: 1 / -1; }
  .admin-filter-bar .admin-button { justify-self: start; }
  .admin-identity span:last-child { display: none; }
  .admin-status strong { display: none; }
  .admin-status { width: 38px; justify-content: center; padding: 0; }
}

@media (max-width: 980px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-main { grid-column: 1; }
  .admin-sidebar {
    transform: translateX(-102%);
    box-shadow: 18px 0 50px rgba(0, 0, 0, .42);
    transition: transform .2s ease;
  }
  .admin-shell[data-menu-open="true"] .admin-sidebar { transform: translateX(0); }
  .admin-menu-button { display: grid; }
  .admin-search { width: min(520px, calc(100vw - 180px)); }
  .admin-overview-grid { grid-template-columns: 1fr; }
  .admin-lottery-layout { grid-template-columns: 1fr; }
  .admin-live-monitor { position: static; }
  .admin-player-detail-layout { grid-template-columns: 1fr; }
  .admin-player-actions { grid-template-columns: repeat(4, minmax(130px, 1fr)); overflow-x: auto; }
  .admin-player-actions h2 { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .admin-topbar { padding: 0 10px; }
  .admin-content { padding: 12px; }
  .admin-search kbd,
  .admin-topbar-actions { display: none; }
  .admin-search { width: calc(100vw - 72px); }
  .admin-metric-grid,
  .admin-operations-grid,
  .admin-player-summary { grid-template-columns: 1fr; }
  .admin-stale-warning { align-items: flex-start; flex-direction: column; }
  .admin-filter-bar,
  .admin-player-profile-header,
  .admin-detail-grid,
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-filter-bar .admin-field--search { grid-column: auto; }
  .admin-profile-identity { align-items: flex-start; }
  .admin-profile-avatar { width: 58px; height: 58px; }
  .admin-player-actions { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .admin-balance-breakdown { grid-template-columns: 1fr; }
  .admin-color-clash-table { min-width: 0; }
  .admin-color-clash-table .admin-game-col--opponents,
  .admin-color-clash-table .admin-game-col--stake,
  .admin-color-clash-table .admin-game-col--finished { display: none; }
  .admin-color-clash-table .admin-game-col--game code { max-width: 115px; }
  .admin-color-clash-table .admin-game-col--action { padding-left: 4px; }
  .admin-game-detail-metadata .admin-detail-list { grid-template-columns: 1fr; }
  .admin-game-detail-header { padding: 12px; }
  .admin-draw-detail { width: 100vw; }
  .admin-draw-detail-grid,
  .admin-draw-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Platform settings: existing controls, reference-inspired navigation and spacing. */
.admin-settings-page { --settings-muted: #b0bfd7; max-width: 1480px; margin-inline: auto; }
.admin-settings-heading { align-items: center; gap: 20px; margin-bottom: 24px; }
.admin-settings-heading h1 { font-size: 28px; letter-spacing: -.02em; }
.admin-settings-heading p { color: var(--settings-muted); font-size: 14px; line-height: 1.6; }
.admin-settings-emblem { display: grid; place-items: center; flex: 0 0 64px; height: 64px; border-radius: 14px; background: linear-gradient(140deg,#5835bd,#342373); color: #e4dbff; }
.admin-settings-emblem svg { width: 34px; height: 34px; }
.admin-settings-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.admin-settings-nav a { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 22px; border: 1px solid var(--admin-border-strong); border-radius: 10px; background: var(--admin-surface); color: #d1dbed; text-decoration: none; font-size: 13px; font-weight: 650; }
.admin-settings-nav a:hover { border-color: #a683fa; background: #251b48; color: #fff; }
.admin-settings-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; align-items: start; gap: 22px; }
.admin-settings-form,.admin-settings-fieldset { display: grid; gap: 20px; min-width: 0; margin: 0; padding: 0; border: 0; }
.admin-settings-page .admin-panel { margin: 0; padding: 24px; border-radius: 14px; background: linear-gradient(145deg,#0c192e,#0c1427); border: 1px solid #293753; }
.admin-settings-section { scroll-margin-top: 90px; }
.admin-settings-section:target { border-color: #a683fa; }
.admin-settings-page .admin-panel-header { margin-bottom: 22px; }
.admin-settings-page .admin-panel h2 { margin: 0 0 6px; color: #f4f6ff; font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.admin-settings-page .admin-panel-header p,.admin-settings-aside p { margin: 0; color: var(--settings-muted); font-size: 13px; line-height: 1.6; }
.admin-settings-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 26px; }
.admin-settings-page .admin-field { align-content: start; gap: 8px; }
.admin-settings-page .admin-field > span { font-size: 13px; font-weight: 600; text-transform: none; color: #e4eafa; }
.admin-settings-page .admin-field input { min-height: 44px; border-radius: 8px; border-color: #354362; padding: 10px 12px; background: #121e34; font-size: 14px; font-variant-numeric: tabular-nums; caret-color: #c4b0ff; color-scheme: dark; }
.admin-settings-page .admin-field input::placeholder { color: #a1aec5; }
.admin-settings-page small { color: var(--settings-muted); font-size: 12px; line-height: 1.55; }
.admin-setting-toggle { display: flex; align-items: center; gap: 16px; position: relative; min-height: 70px; padding: 12px 14px; border-radius: 9px; background: #152037; cursor: pointer; }
.admin-setting-toggle-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.admin-setting-toggle-copy strong { color: #eef2ff; font-size: 13px; font-weight: 650; }
.admin-setting-switch-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.admin-setting-switch { flex: 0 0 46px; height: 26px; border-radius: 20px; background: #566079; border: 1px solid #8795ae; position: relative; }
.admin-setting-switch::after { content: ''; position: absolute; width: 18px; height: 18px; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: transform .16s ease; }
.admin-setting-switch-input:checked + .admin-setting-switch { background: #7742ed; border-color: #ad8cf9; }
.admin-setting-switch-input:checked + .admin-setting-switch::after { transform: translateX(20px); }
.admin-setting-switch-input:focus-visible + .admin-setting-switch { outline: 3px solid #b99bff; outline-offset: 4px; }
.admin-settings-page :is(a,button):focus-visible { outline: 3px solid #b99bff; outline-offset: 3px; }
.admin-settings-fieldset:disabled .admin-setting-toggle { cursor: not-allowed; }
.admin-settings-fieldset:disabled input { opacity: .7; cursor: not-allowed; }
.admin-settings-tier-note { grid-column: 1/-1; display: grid; gap: 7px; margin: 0; padding-top: 18px; border-top: 1px solid var(--admin-border); color: #c3cfe3; font-size: 12px; line-height: 1.6; }
.admin-settings-save { position: sticky; bottom: 12px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: #15213a; border: 1px solid #394766; border-radius: 12px; }
.admin-settings-save > span { color: #c3cfe3; font-size: 12px; line-height: 1.5; }
.admin-settings-save > div { display: flex; gap: 10px; flex-shrink: 0; }
.admin-settings-save .admin-button { min-height: 44px; border-radius: 8px; font-size: 13px; }
.admin-settings-save .admin-settings-reset { background: #111b30; border-color: #455577; color: #e2e9f7; }
.admin-settings-save button:disabled { opacity: .55; cursor: not-allowed; }
.admin-settings-save button:not(:disabled):hover { filter: brightness(1.12); }
.admin-settings-aside { display: grid; gap: 18px; }
.admin-settings-aside .admin-panel { padding: 22px; }
.admin-settings-aside .admin-panel h2 { font-size: 16px; margin-bottom: 10px; }
.admin-settings-callout { margin-top: 18px; padding: 14px; border: 1px solid #806943; border-radius: 8px; background: #312b23; color: #ffdfa4; }
.admin-settings-callout strong { font-size: 13px; }
.admin-settings-callout p { color: #f0d6aa; margin-top: 6px; font-size: 12px; }
.admin-settings-summary { margin: 18px 0 0; }
.admin-settings-summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #2a3750; font-size: 12px; }
.admin-settings-summary dt { color: var(--settings-muted); }
.admin-settings-summary dd { margin: 0; color: #eef2ff; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.admin-settings-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.admin-settings-page .admin-form-error { margin-bottom: 18px; padding: 14px; border: 1px solid #824553; border-radius: 8px; font-size: 13px; line-height: 1.5; background: #321c2a; }
@media (max-width: 1200px) { .admin-settings-layout { grid-template-columns: minmax(0,1fr); } .admin-settings-aside { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 700px) { .admin-settings-heading { gap: 12px; flex-wrap: wrap; } .admin-settings-emblem { flex-basis: 48px; height: 48px; } .admin-settings-heading h1 { font-size: 23px; } .admin-settings-heading > div:nth-child(2) { flex: 1; min-width: 180px; } .admin-settings-heading .admin-page-meta { margin-left: 60px; } .admin-settings-fields,.admin-settings-aside { grid-template-columns: 1fr; } .admin-settings-page .admin-panel { padding: 18px; } .admin-settings-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); } .admin-settings-nav a { padding-inline: 8px; font-size: 12px; } .admin-settings-save { flex-direction: column; align-items: stretch; bottom: 6px; padding: 12px; } .admin-settings-save > div > button { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .admin-setting-switch::after { transition: none; } }
