:root {
  --admin-bg: #080b0c;
  --admin-panel: #0d1315;
  --admin-panel-2: #111a1c;
  --admin-line: #334047;
  --admin-amber: #ffb400;
  --admin-green: #38e000;
  --admin-red: #f04b3f;
  --admin-text: #edf2ed;
  --admin-muted: #9ca7a8;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body.admin-body { margin: 0; min-height: 100vh; color: var(--admin-text); background: var(--admin-bg); font-family: "Chakra Petch", sans-serif; }
.admin-shell { width: min(1500px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 56px; }
.admin-header, .admin-section__title, .admin-card__title, .admin-identity, .admin-payout__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .admin-tab, .admin-button, th { font-family: "Press Start 2P", monospace; text-transform: uppercase; letter-spacing: .03em; }
h1 { margin-bottom: 0; color: var(--admin-amber); font-size: clamp(20px, 3vw, 34px); }
h2 { margin-bottom: 0; font-size: 18px; }
h3 { margin-bottom: 0; font-size: 13px; }
.admin-kicker { margin-bottom: 9px; color: var(--admin-muted); font: 700 11px/1.4 "Press Start 2P", monospace; text-transform: uppercase; }
.admin-header { padding: 22px; border: 1px solid var(--admin-line); border-top: 4px solid var(--admin-amber); background: var(--admin-panel); }
.admin-identity { color: var(--admin-muted); font-size: 13px; }
.admin-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 16px 0; }
.admin-tab, .admin-button { border: 1px solid var(--admin-line); color: var(--admin-text); background: #162023; cursor: pointer; text-decoration: none; text-align: center; }
.admin-tab { min-height: 52px; padding: 12px 8px; font-size: 11px; }
.admin-tab:hover, .admin-tab:focus-visible { border-color: var(--admin-amber); }
.admin-tab.is-active { border-color: var(--admin-amber); color: #101300; background: var(--admin-amber); }
.admin-button { display: inline-flex; min-height: 40px; padding: 10px 14px; align-items: center; justify-content: center; font-size: 9px; line-height: 1.4; }
.admin-button:hover, .admin-button:focus-visible { filter: brightness(1.15); border-color: var(--admin-amber); box-shadow: inset 0 0 0 1px var(--admin-amber); outline: none; }
.admin-button--primary { color: #071000; border-color: var(--admin-green); background: var(--admin-green); }
.admin-button--secondary { color: #151000; border-color: var(--admin-amber); background: var(--admin-amber); }
.admin-button--back, .admin-button--danger { border-color: var(--admin-red); background: #34110f; }
.admin-button--quiet { background: transparent; }
.admin-section { min-height: 400px; padding: 22px; border: 1px solid var(--admin-line); background: var(--admin-panel); }
.admin-section__title { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--admin-line); }
.admin-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-metric { min-height: 125px; padding: 18px; border: 1px solid var(--admin-line); border-left: 4px solid var(--admin-amber); background: var(--admin-panel-2); }
.admin-metric span { display: block; margin-bottom: 20px; color: var(--admin-muted); font: 700 9px/1.4 "Press Start 2P", monospace; text-transform: uppercase; }
.admin-metric strong { color: var(--admin-green); font: 700 clamp(24px, 4vw, 38px)/1 "Press Start 2P", monospace; }
.admin-metric--link { cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease; }
.admin-metric--link:hover { border-color: var(--admin-green); background: var(--admin-panel); }
.admin-metric--link:focus-visible { border-color: var(--admin-amber); box-shadow: inset 0 0 0 1px var(--admin-amber); outline: none; }
.admin-button--replay { min-height: 30px; padding: 6px 10px; color: var(--admin-green); border-color: var(--admin-line); background: transparent; white-space: nowrap; }

.admin-button--watch { color: var(--admin-green); border-color: var(--admin-green); background: rgba(63, 222, 248, .10); }

.admin-button--disabled, .admin-button--disabled:hover, .admin-button--disabled:focus-visible { color: #6b7a7f; border-color: var(--admin-line); background: transparent; cursor: not-allowed; filter: none; outline: none; }
.admin-filters, .admin-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-filters { margin-bottom: 16px; }
label { display: grid; gap: 8px; color: var(--admin-muted); font: 700 9px/1.4 "Press Start 2P", monospace; text-transform: uppercase; }
input, select, textarea { width: 100%; border: 1px solid var(--admin-line); border-radius: 0; padding: 11px; color: var(--admin-text); background: #070b0c; font: 14px "Chakra Petch", sans-serif; }
input:focus, select:focus, textarea:focus { border-color: var(--admin-amber); box-shadow: inset 0 0 0 1px var(--admin-amber); outline: none; }
input[type="date"] { display: inline-flex; align-items: center; color-scheme: dark; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 1; transform: scale(1.25); transform-origin: right center; }
.admin-date-clear { min-height: 30px; padding: 6px 10px; align-self: end; color: var(--admin-muted); border-color: var(--admin-line); background: transparent; white-space: nowrap; }
.admin-date-clear:hover, .admin-date-clear:focus-visible { color: var(--admin-red); border-color: var(--admin-red); }
.admin-search { max-width: 650px; margin-bottom: 16px; }
.admin-search > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.admin-player-bar { display: flex; align-items: flex-end; gap: 10px; }
.admin-player-bar label { min-width: 0; }
.admin-player-bar label + label { flex: 1; }
.admin-player-bar input { min-width: 0; }
.admin-player-bar .admin-date-clear { align-self: auto; }
.admin-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--admin-line); }
.admin-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.admin-pagination span { color: var(--admin-muted); font: 700 9px/1.4 "Press Start 2P", monospace; text-transform: uppercase; }
table { width: 100%; min-width: 850px; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid #273136; text-align: left; vertical-align: top; }
th { color: var(--admin-amber); background: #070b0c; font-size: 8px; }
td { font-size: 12px; line-height: 1.45; }
.admin-subtext { display: block; margin-top: 4px; color: var(--admin-muted); font-size: 11px; }
.admin-player-link { color: var(--admin-green); font-weight: 700; text-decoration: none; }
.admin-player-link:hover, .admin-player-link:focus-visible { color: var(--admin-amber); text-decoration: underline; }
.admin-status { display: inline-block; padding: 5px 7px; border: 1px solid var(--admin-line); color: var(--admin-muted); font: 700 8px "Press Start 2P", monospace; text-transform: uppercase; }
.admin-status--live, .admin-status--ready { color: var(--admin-green); border-color: var(--admin-green); }
.admin-status--ended, .admin-status--completed, .admin-status--closed { color: var(--admin-muted); }
.admin-message { position: sticky; top: 8px; z-index: 5; padding: 12px; border: 1px solid var(--admin-amber); color: var(--admin-amber); background: #171407; }
.admin-message.is-error { color: #fff; border-color: var(--admin-red); background: #35100f; }
.admin-gate { max-width: 700px; min-height: 360px; margin: 12vh auto 0; padding: 42px; border: 1px solid var(--admin-line); border-top: 4px solid var(--admin-amber); background: var(--admin-panel); text-align: center; }
.admin-gate .admin-button { margin: 10px 4px 0; }
.admin-loader { display: block; width: 42px; height: 42px; margin: 70px auto 24px; border: 4px solid var(--admin-line); border-top-color: var(--admin-amber); animation: admin-spin .8s linear infinite; }
@keyframes admin-spin { to { transform: rotate(360deg); } }
*:focus-visible { outline: none; }
.admin-button--back:focus-visible, .admin-button--danger:focus-visible { border-color: var(--admin-red); box-shadow: inset 0 0 0 1px var(--admin-red); }
.admin-button:disabled { opacity: .55; cursor: not-allowed; }
.admin-identity { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .admin-loader { animation: none; } .admin-metric--link { transition: none; } }
.admin-card { padding: 16px; border: 1px solid var(--admin-line); background: var(--admin-panel-2); }
.admin-runtime-control { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.admin-runtime-control h3 { margin: 5px 0; color: var(--admin-text); }
.admin-runtime-control p:not(.admin-kicker) { margin: 0; color: var(--admin-muted); font-size: 11px; }
.admin-notification-layout { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(240px, .55fr); gap: 14px; align-items: start; }
.admin-notification-count { margin: 0; color: var(--admin-muted); font-size: 12px; }
.admin-notification-count strong { color: var(--admin-green); font: 700 26px/1 "Press Start 2P", monospace; }
.admin-notification-summary { min-height: 180px; }
.admin-notification-summary h3 { margin: 7px 0 14px; color: var(--admin-amber); }
.admin-notification-summary p:not(.admin-kicker) { margin: 0; color: var(--admin-muted); font-size: 12px; line-height: 1.6; }
.admin-form { display: grid; gap: 13px; }
.admin-form__optional { color: var(--admin-muted); font-size: .8em; font-weight: 400; text-transform: none; }
.admin-empty { padding: 20px; color: var(--admin-muted); text-align: center; }

@media (max-width: 900px) {
  .admin-shell { width: min(100% - 18px, 1500px); padding-top: 9px; }
  .admin-header, .admin-section__title, .admin-identity { align-items: stretch; flex-direction: column; }
  .admin-tabs { grid-template-columns: repeat(6, minmax(118px, 1fr)); overflow-x: auto; }
  .admin-metrics { grid-template-columns: repeat(2, 1fr); }
  .admin-notification-layout { grid-template-columns: 1fr; }
  .admin-runtime-control { align-items: stretch; flex-direction: column; }
}

@media (max-width: 560px) {
  .admin-section, .admin-header, .admin-gate { padding: 16px; }
  .admin-metrics, .admin-filters, .admin-form__grid { grid-template-columns: 1fr; }
  .admin-tab { min-height: 48px; font-size: 8px; }
  .admin-search > div { grid-template-columns: 1fr; }
  .admin-player-bar { flex-wrap: wrap; }
  .admin-player-bar label { flex: 1 1 100%; }
}

.admin-identity > span { max-width: 420px; overflow-wrap: anywhere; }
