/* ===========================================================================
   rfs.corder.pro — hoja única (sitio público + panel)
   ---------------------------------------------------------------------------
   Sin build: es CSS plano, igual que el resto del proyecto. El orden es
   tokens → base → componentes compartidos → sitio → panel.

   Tema claro fijo desde el 2026-09-17. Antes seguía el tema del sistema, y con
   el móvil en oscuro la rifa se veía azul navy entera, que no es el lenguaje
   de una rifa.

   Ninguna regla consulta el tema: todo el color sale de los tokens de :root.
   Recuperar el modo oscuro sería volver a añadir un bloque que los redefina,
   sin tocar una sola regla de abajo.
   ======================================================================== */

:root {
  /* --bg es el suelo (lo más lejano al lector) y --surface lo más cercano.
     Esa diferencia de luminosidad es lo único que hace flotar una tarjeta, así
     que no son intercambiables: para hundir algo se usa --bg, nunca --surface-2. */
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --text: #0f172a;
  --muted: #64748b;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-ink: #ffffff;
  --primary-soft: #eff6ff;

  --success: #15803d;
  --success-soft: #dcfce7;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;

  --whatsapp: #25d366;

  --radius: 12px;
  --radius-lg: 18px;
  --wrap: 68rem;

  --shadow-sm: 0 1px 2px rgb(15 23 42 / .06);
  --shadow: 0 4px 16px rgb(15 23 42 / .08);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Tema claro fijo, no "light dark".
     Este declarado no es decorativo: es lo que obliga al navegador a pintar en
     claro los controles que él dibuja —inputs, selects, casillas y las barras
     de scroll—. Si dijera "light dark", un visitante con el móvil en modo
     oscuro vería la página blanca pero los campos del formulario en gris
     oscuro, que es peor que cualquiera de los dos temas completos. */
  color-scheme: light;
}

/* No hay bloque @media (prefers-color-scheme: dark) a propósito: la rifa se ve
   igual para todos. Si alguna vez se quiere recuperar el modo oscuro, se
   redefinen aquí los tokens de :root y NO se toca ninguna otra regla — ninguna
   de las de abajo consulta el tema. */

/* ---------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------ */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 1.1rem + .8vw, 1.5rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; height: auto; display: block; }

.mono { font-family: var(--mono); font-size: .9375em; }
.muted { color: var(--muted); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--surface); color: var(--text);
  padding: .75rem 1rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.section { padding-block: clamp(2rem, 1.2rem + 3vw, 3.5rem); }

.section__head { margin-bottom: 1.5rem; max-width: 42rem; }
.section__head p { color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------------------
   Botones
   ------------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: scale(.97); }

.btn--primary { background: var(--primary); color: var(--primary-ink); }
.btn--primary:hover { background: var(--primary-hover); color: var(--primary-ink); }

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(1.1); color: #fff; }

.btn--lg { padding: .9rem 1.75rem; font-size: 1.0625rem; }
.btn--sm { padding: .35rem .75rem; font-size: .875rem; }
.btn--block { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}

/* ---------------------------------------------------------------------------
   Formularios
   ------------------------------------------------------------------------ */

.field { display: block; margin-bottom: 1rem; }
.field__label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: .35rem; }
.field__optional { font-weight: 400; color: var(--muted); }
.field__help { display: block; font-size: .875rem; color: var(--muted); margin-top: .35rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="number"], input[type="password"], input[type="search"],
input[type="datetime-local"], input[type="file"], select, textarea {
  width: 100%;
  padding: .7rem .9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; min-height: 6rem; }
textarea.mono { font-family: var(--mono); font-size: .875rem; line-height: 1.5; }

input:disabled, input[readonly], select:disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}

input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }

.fields { display: grid; gap: 0; }
@media (min-width: 40rem) {
  .fields { grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .fields .field:first-child { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------------------
   Avisos y estados
   ------------------------------------------------------------------------ */

.alert {
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  margin: 1rem 0;
  font-size: .9375rem;
}
.alert--error { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.alert--success { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.alert--warning { background: var(--warning-soft); border-color: var(--warning); color: var(--warning); }
.alert a { color: inherit; }

.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-neutral { background: var(--surface-2); color: var(--muted); }

.tag {
  display: inline-block;
  margin: 0 0 .75rem;
  padding: .25rem .75rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tag--live { background: var(--success-soft); color: var(--success); }
.tag--done { background: var(--warning-soft); color: var(--warning); }

.notice, .panel, .help {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.notice h1, .notice h2, .panel h2, .help h2 { margin-top: 0; }

.empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.back-link { margin-top: 1.5rem; }

.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .35rem; }

/* ---------------------------------------------------------------------------
   Cabecera y pie del sitio público
   ------------------------------------------------------------------------ */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
}
.site-header__brand {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-header__nav { display: flex; gap: 1.25rem; flex-shrink: 0; }
.site-header__nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .9375rem;
}
.site-header__nav a:hover { color: var(--text); }

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-block: 2rem;
}
.site-footer__name { font-weight: 700; margin-bottom: .75rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.site-footer__links a { color: var(--muted); font-size: .9375rem; }
.site-footer__credit { font-size: .875rem; color: var(--muted); margin: 0; }

.wa-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.1rem;
  border-radius: 999px;
  background: var(--whatsapp);
  color: #052e16;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.wa-float svg { width: 1.375rem; height: 1.375rem; }
.wa-float:hover { color: #052e16; filter: brightness(1.05); }

@media (max-width: 30rem) {
  .wa-float span { display: none; }
  .wa-float { padding: .85rem; }
}

/* ---------------------------------------------------------------------------
   Portada: premio y progreso
   ------------------------------------------------------------------------ */

.hero { padding-block: clamp(1.5rem, 1rem + 2.5vw, 3rem); }
.hero__inner { display: grid; gap: 2rem; }

@media (min-width: 52rem) {
  .hero__inner { grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; }
}

.hero__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.hero__media-empty {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  color: var(--border-strong);
  background: var(--surface-2);
}
.hero__media-empty svg { width: 25%; height: auto; }

.hero__title { margin-bottom: .75rem; }
.hero__text { color: var(--muted); margin-bottom: 1.5rem; }

.hero__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 1rem 0;
  border-block: 1px solid var(--border);
}
.hero__facts dt { font-size: .8125rem; color: var(--muted); margin-bottom: .15rem; }
.hero__facts dd { margin: 0; font-weight: 600; }
.hero__price { font-size: 1.25rem; }

.progress { margin-bottom: 1.5rem; }
.progress__bar {
  height: .625rem;
  border-radius: 999px;
  /* Hundido: --bg, el suelo, que es el más lejano en los dos temas.
     Con --surface-2 el riel se invertiría al cambiar de tema. */
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.progress__bar span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width .4s ease;
}
.progress__legend { font-size: .875rem; color: var(--muted); margin: .5rem 0 0; }

@media (prefers-reduced-motion: reduce) {
  .progress__bar span { transition: none; }
}

.winner {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
}
.winner__label {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .5rem;
}
.winner__number {
  font-family: var(--mono);
  font-size: clamp(2.5rem, 2rem + 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: .5rem;
}
.winner__name { font-size: 1.125rem; font-weight: 600; margin: 0; }

/* ---------------------------------------------------------------------------
   Compra
   ------------------------------------------------------------------------ */

.buy {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  box-shadow: var(--shadow-sm);
}

.buy__block {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
  padding: 1.5rem 0 0;
}
.buy__block:first-of-type { border-top: 0; padding-top: 0; }

.buy__legend {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-weight: 700;
  font-size: 1.0625rem;
  margin-bottom: 1rem;
  padding: 0;
}
.buy__step {
  display: inline-grid;
  place-items: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .875rem;
  flex-shrink: 0;
}

.qty { display: grid; gap: 1rem; }
@media (min-width: 34rem) {
  .qty { grid-template-columns: auto 1fr; align-items: end; }
}

.qty__presets { display: flex; flex-wrap: wrap; gap: .5rem; }
.qty__preset {
  min-width: 3rem;
  padding: .7rem .9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.qty__preset:hover { border-color: var(--primary); color: var(--primary); }
.qty__preset.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

.field--inline { margin-bottom: 0; }

.buy__total {
  margin: 1.25rem 0 0;
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.buy__total strong { font-size: 1.25rem; }

.buy__submit { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.buy__legal { margin: .75rem 0 0; font-size: .875rem; color: var(--muted); }

/* Selector de números ----------------------------------------------------- */

.picker { padding-bottom: .5rem; }
.picker > summary { cursor: pointer; list-style: none; }
.picker > summary::-webkit-details-marker { display: none; }
.picker > summary::after {
  content: "▾";
  margin-left: auto;
  color: var(--muted);
  transition: transform .2s;
}
.picker[open] > summary::after { transform: rotate(180deg); }

.picker__hint {
  margin-left: .25rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--muted);
}
.picker__note, .picker__count { font-size: .875rem; color: var(--muted); }
.picker__count strong { color: var(--primary); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.25rem, 1fr));
  gap: .375rem;
  max-height: 22rem;
  overflow-y: auto;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /* Hundido respecto a la tarjeta: --bg, nunca --surface-2. */
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}

.grid__cell {
  position: relative;
  display: grid;
  place-items: center;
  padding: .45rem .25rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: .8125rem;
  cursor: pointer;
  user-select: none;
}
.grid__cell input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.grid__cell:hover { border-color: var(--primary); }
.grid__cell:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
  font-weight: 700;
}
.grid__cell:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

.grid__cell.is-taken {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Libre, pero bloqueado porque ya se llegó al tope por pedido. Se distingue
   del agotado: sin tachar, sólo apagado. */
.grid__cell.is-disabled { opacity: .45; cursor: not-allowed; }
.grid__cell.is-disabled:hover { border-color: var(--border-strong); }

/* Métodos de pago --------------------------------------------------------- */

.methods { display: grid; gap: .75rem; }

.method {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.method:hover { border-color: var(--primary); }
.method:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.method:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.method input { margin-top: .3rem; flex-shrink: 0; accent-color: var(--primary); }
.method__body { display: block; }
.method__name { display: block; font-weight: 600; }
.method__text { display: block; font-size: .875rem; color: var(--muted); }

/* ---------------------------------------------------------------------------
   Pedido, folio y números
   ------------------------------------------------------------------------ */

.folio {
  text-align: center;
  padding: 1.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.folio__label {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: .25rem;
}
.folio__code {
  font-family: var(--mono);
  font-size: clamp(1.75rem, 1.4rem + 2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: .05em;
  margin-bottom: .5rem;
}
.folio__status { margin-bottom: .5rem; }
.folio__hint { font-size: .875rem; color: var(--muted); margin: 0; }

.numbers {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}
.numbers__item {
  padding: .35rem .7rem;
  border-radius: 8px;
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-family: var(--mono);
  font-weight: 700;
  font-size: .9375rem;
}
.numbers__item--apartado { background: var(--warning-soft); border-color: var(--warning); color: var(--warning); }
.numbers__item--disponible { background: var(--surface-2); border-color: var(--border-strong); color: var(--muted); }

.summary { margin: 0; display: grid; gap: .5rem; }
.summary > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.summary > div:last-child { border-bottom: 0; padding-bottom: 0; }
.summary dt { color: var(--muted); font-size: .9375rem; }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.summary__total { font-size: 1.125rem; color: var(--primary); }

.bank { margin: 0 0 1.25rem; display: grid; gap: .625rem; }
.bank > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: .625rem .875rem;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.bank dt { color: var(--muted); font-size: .875rem; }
.bank dd {
  margin: 0;
  font-weight: 700;
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: .625rem;
  flex-wrap: wrap;
}
.bank__copyable button { font-family: var(--font); }

.upload { margin-top: 1rem; }

.done { text-align: center; margin-bottom: 1.5rem; }
.done__icon { width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem; color: var(--success); }

.search { display: grid; gap: .75rem; margin-bottom: 2rem; }
@media (min-width: 34rem) {
  .search { grid-template-columns: 1fr auto; align-items: end; }
  .search .field { margin-bottom: 0; }
}

.results__count { color: var(--muted); font-size: .9375rem; }

.result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.result__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .5rem;
}
.result__folio { font-family: var(--mono); font-weight: 700; font-size: 1.125rem; margin: 0; }
.result__meta { font-size: .875rem; color: var(--muted); margin-bottom: 1rem; }
.result__action { margin: 0; font-size: .9375rem; }

.error-page { text-align: center; max-width: 34rem; margin-inline: auto; padding-block: 2rem; }
.error-page__code {
  font-family: var(--mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--border-strong);
  line-height: 1;
  margin-bottom: .5rem;
}
.error-page__text { color: var(--muted); margin-bottom: 1.5rem; }
.error-page__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ---------------------------------------------------------------------------
   Login
   ------------------------------------------------------------------------ */

body.is-centered { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.centered-main { width: min(100%, 24rem); }

.login {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.login__title { font-size: 1.375rem; text-align: center; margin-bottom: 1.5rem; }
.login__form .field:last-of-type { margin-bottom: 1.5rem; }
.login__back { text-align: center; margin: 1.25rem 0 0; font-size: .875rem; }

/* ---------------------------------------------------------------------------
   Panel
   ------------------------------------------------------------------------ */

.admin-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-bar__inner {
  width: min(100% - 2rem, 80rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: 3.5rem;
  padding-block: .5rem;
}
.admin-bar__brand { font-weight: 700; color: var(--text); text-decoration: none; }

.admin-bar__nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.admin-bar__nav a {
  padding: .4rem .75rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .9375rem;
}
.admin-bar__nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-bar__nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }

.admin-bar__user { display: flex; align-items: center; gap: .75rem; font-size: .875rem; }
.admin-bar__name { color: var(--muted); }
.admin-bar__site { color: var(--muted); text-decoration: none; }
.admin-bar__site:hover { color: var(--text); }

@media (max-width: 40rem) {
  .admin-bar__name, .admin-bar__site { display: none; }
}

.admin-main { padding-block: 2rem 4rem; }
.admin-wrap { width: min(100% - 2rem, 80rem); margin-inline: auto; }

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.admin-head h1 { margin-bottom: .25rem; }
.admin-head__sub { color: var(--muted); font-size: .9375rem; margin: 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.stat__label { font-size: .8125rem; color: var(--muted); margin-bottom: .35rem; }
.stat__value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; margin-bottom: .25rem; }
.stat__note { font-size: .8125rem; color: var(--muted); margin: 0; }

.progress--admin { margin-bottom: 2rem; }

.admin-section { margin-top: 2rem; }
.admin-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.admin-section__head h2 { margin: 0; }

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.admin-card h2 { margin-top: 0; }
.admin-card__note { color: var(--muted); font-size: .9375rem; }
.admin-card--danger { border-color: var(--danger); }
.admin-card--danger h2 { color: var(--danger); }

.admin-cols { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { .admin-cols { grid-template-columns: 1fr 1fr; } }

.admin-form__row { display: grid; gap: 0; }
@media (min-width: 40rem) {
  .admin-form__row { grid-template-columns: 1fr 1fr; gap: 0 1rem; }
}
.admin-form__actions {
  position: sticky;
  bottom: 0;
  padding: 1rem 0;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}
.admin-form__thumb {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: .75rem;
}
.admin-form__counts { font-size: .875rem; color: var(--muted); margin: 0; }
.admin-form__winner { margin: 0; }
.admin-form__inline { margin-top: 1rem; }
@media (min-width: 40rem) {
  .admin-form__inline { display: flex; gap: .75rem; align-items: end; }
  .admin-form__inline .field { margin-bottom: 0; flex: 1; }
}

.admin-note {
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: .9375rem;
}

.proof {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.filters__item {
  padding: .4rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
}
.filters__item:hover { color: var(--text); }
.filters__item.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

.search--inline { margin-bottom: 1.25rem; }
@media (min-width: 34rem) {
  .search--inline { grid-template-columns: 1fr auto auto; }
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th, .table td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table th {
  background: var(--surface-2);
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }

.inline-form { display: flex; gap: .5rem; align-items: center; }
.inline-form select { width: auto; padding: .35rem .5rem; font-size: .875rem; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
  font-size: .9375rem;
  color: var(--muted);
}
