/* Tablero del Reto en adminland con el diseño de la V2 (Alberca): mismos tokens y clases de
   dry_v2.css; aquí solo lo que una pantalla ancha agrega. Medidas en px: Pico escala la raíz. */
/* Sin tocar el relleno de .v2-screen: ahí vive el espacio del header de vidrio de la app nativa (--snt-nav-*). */
.v2-screen.v2-admin { max-width: 1180px; }
main:has(.v2-admin) { padding: 0; max-width: none; }
body:has(.v2-admin) > header.sticky { background: rgba(6, 16, 26, 0.72); border-color: var(--v2-line); }
/* En la app el header de adminland quedaría bajo el vidrio nativo; volver sigue en .v2-back. */
html[data-snt-native] body:has(.v2-admin) > header.sticky { display: none; }
/* El sprite mide 0, pero como elemento en línea abriría un renglón arriba de la pantalla. */
.v2-koi-sprite { position: absolute; }
.v2-admin .v2-body { max-width: none; gap: 24px; }
.v2-admin a { color: inherit; }
.v2-admin p, .v2-admin h2 { margin: 0; }
.v2-admin .v2-card { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); background: var(--v2-glass); }
.v2-admin .v2-card :is(.v2-muted, .v2-text, .v2-eyebrow, .v2-title) { text-shadow: none; }
.v2-admin .v2-card.v2-muted { text-shadow: none; }
.v2-admin .v2-muted a { color: var(--v2-muted); text-underline-offset: 3px; }
.v2-admin a:focus-visible, .v2-admin button:focus-visible { outline: 2px solid var(--v2-gold-hi); outline-offset: 2px; box-shadow: none; }

/* Arriba: volver y generación. */
.v2-admin-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 44px; }
.v2-admin .v2-back { color: var(--v2-gold-hi); }
.v2-admin-filter { display: flex; gap: 8px; margin: 0; }
.v2-admin .v2-admin-filter .v2-pill { color: var(--v2-muted); font-size: 15px; }
.v2-admin .v2-admin-filter .v2-pill.is-on { color: var(--v2-gold-hi); border-color: var(--v2-gold); box-shadow: inset 0 0 0 1px var(--v2-gold); }

/* KPIs: dos columnas en el teléfono, en fila en escritorio. */
.v2-admin-kpis-wrap { display: flex; flex-direction: column; gap: 12px; }
.v2-admin-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.v2-admin-kpis > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.v2-kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px; }
.v2-kpi-value { font-size: 24px; line-height: 1.15; font-weight: 700; overflow-wrap: anywhere; }
.v2-kpi .v2-muted { font-size: 15px; overflow-wrap: anywhere; }
.v2-admin-notice { padding: 10px 14px; border-radius: 14px; border: 1px solid var(--v2-gold); color: var(--v2-gold-hi); font-size: 15px; background: var(--v2-glass); }

/* Columnas: una sola en el teléfono. */
.v2-admin-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.v2-admin-main, .v2-admin-side, .v2-admin-section { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* El tablero vivo. Quien nadó ayer, brillante; quien no, tenue. */
.v2-board { display: flex; flex-direction: column; gap: 14px; padding: 18px 12px 16px; border-radius: 20px; }
.v2-board-head { display: flex; flex-direction: column; gap: 4px; padding-inline: 4px; }
.v2-board-count { font-size: 56px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.v2-board-swam { font-size: 26px; line-height: 1.15; font-weight: 700; color: var(--v2-ink); }
.v2-board-grid { display: grid; grid-template-columns: 44px minmax(0, 96px) minmax(0, 1fr) 30px; gap: 8px; align-items: center; }
.v2-board-legend-row { padding-inline: 4px; min-height: 22px; font-family: var(--v2-mono); font-size: 15px; color: var(--v2-faint); }
.v2-board-marks { position: relative; display: block; height: 20px; }
.v2-board-marks > span { position: absolute; top: 0; transform: translateX(-50%); }
.v2-board-marks > span:nth-child(1) { left: 3.4%; }
.v2-board-marks > span:nth-child(2) { left: 50%; }
.v2-board-marks > span:nth-child(3) { left: 96.7%; }
.v2-board-rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.v2-board-rows > li { margin: 0; list-style: none; }
.v2-admin .v2-board-row { min-height: 48px; padding: 4px; border-radius: 12px; color: var(--v2-ink); text-decoration: none; transition: background-color 0.15s; }
.v2-admin .v2-board-row:hover { background: rgba(255, 255, 255, 0.06); }
.v2-board-row .v2-koi { width: 44px; height: 36px; }
.v2-board-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 17px; font-weight: 600; }
.v2-board-day { justify-self: end; font-family: var(--v2-mono); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-board-row .v2-board-day { font-size: 17px; }
.v2-board-row.is-off .v2-board-name, .v2-board-row.is-off .v2-board-day { color: var(--v2-faint); opacity: 0.72; font-weight: 500; }
.v2-board-row.is-off .v2-koi { opacity: 0.42; filter: saturate(0.6); }
.v2-board-row.is-off .v2-rail-fill { opacity: 0.4; }
.v2-board-row.is-off .v2-rail-now { fill: rgba(241, 217, 138, 0.42); filter: none; }
.v2-board-legend { font-size: 15px; padding-inline: 4px; }
.v2-cohort-share { display: flex; flex-direction: column; gap: 8px; padding: 4px 4px 0; }
.v2-cohort-share .v2-btn { margin: 0; }
/* Pico pone pointer-events: none a [aria-busy]; sin esto, "Generando…" en pointerdown se come el click. */
.v2-cohort-share .v2-btn[aria-busy="true"] { opacity: 0.75; cursor: progress; pointer-events: auto; }
.v2-cohort-share [hidden] { display: none; }

/* Carril: la línea negra, marcas de oro en 31 y 61, avance azul y punto de oro. */
.v2-rail { display: block; width: 100%; height: auto; overflow: visible; }
.v2-rail-fill { fill: var(--v2-water-text); }
.v2-rail-mark { fill: none; stroke: var(--v2-gold); stroke-width: 1.5; }
.v2-rail-now { fill: var(--v2-gold-hi); stroke: #05080c; stroke-width: 1.5; filter: drop-shadow(0 0 4px rgba(241, 217, 138, 0.8)); }

/* Listas en tarjeta: más mejora, sin actividad, tests, ventas. */
.v2-admin-list { display: flex; flex-direction: column; gap: 10px; }
.v2-admin-line { display: flex; justify-content: space-between; gap: 16px; font-size: 17px; }
.v2-admin-line .v2-admin-name { min-width: 0; overflow-wrap: anywhere; }
.v2-admin .v2-admin-name { color: var(--v2-ink); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(205, 175, 95, 0.55); text-underline-offset: 3px; }
.v2-admin-pct { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--v2-water-text); white-space: nowrap; }
.v2-admin-warn { color: var(--v2-gold-hi); font-size: 15px; }
.v2-admin-dim { color: var(--v2-muted); }
.v2-admin-entry { font-size: 17px; overflow-wrap: anywhere; }
.v2-admin-entry .v2-muted { display: inline; font-size: 15px; }
.v2-admin-sub.v2-muted { display: block; }
.v2-admin-strong { font-size: 20px; font-weight: 700; color: var(--v2-gold-hi); }

/* Tabla ordenable, con la primera columna fija. */
.v2-admin .v2-admin-table-wrap { padding: 0; overflow-x: auto; border-radius: 18px; }
.v2-admin-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: 15px; color: var(--v2-ink); }
.v2-admin-table :is(th, td) { padding: 10px 12px; background: transparent; border: 0; border-bottom: 1px solid var(--v2-line); color: inherit; font-size: 15px; font-weight: 400; text-align: left; white-space: nowrap; }
.v2-admin-table tbody tr:last-child :is(th, td) { border-bottom: 0; }
.v2-admin-table thead th { color: var(--v2-muted); font-weight: 600; }
.v2-admin-table thead th button { appearance: none; width: auto; min-height: 28px; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; color: inherit; font: inherit; cursor: pointer; }
.v2-admin-table thead th button:hover { color: var(--v2-gold-hi); }
.v2-admin-table th[aria-sort] { color: var(--v2-gold-hi); }
.v2-admin-table th[aria-sort="ascending"]::after { content: " ↑"; }
.v2-admin-table th[aria-sort="descending"]::after { content: " ↓"; }
.v2-admin-table :is(thead th:first-child, tbody th) { position: sticky; left: 0; z-index: 1; background: #0b1824; border-right: 1px solid var(--v2-line); }
.v2-admin-table tbody th { font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.v2-admin .v2-admin-table tbody th a { color: var(--v2-ink); text-decoration: underline; text-decoration-color: rgba(205, 175, 95, 0.55); text-underline-offset: 3px; }
.v2-admin-table .v2-admin-pct { font-weight: 600; color: var(--v2-water-text); }

/* Detalle: encabezado y tarjeta en vivo. */
.v2-admin .v2-hd-text { min-width: 0; overflow-wrap: anywhere; }
.v2-admin-detail .v2-hd-top .v2-koi { flex: none; width: 92px; height: 76px; }
.v2-admin-detail .v2-home-head { gap: 12px; }
.v2-admin-detail .v2-home-head .v2-lane { max-width: 520px; }
.v2-live-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px; border-radius: 20px; }
.v2-live-big { font-size: clamp(40px, 12vw, 56px); overflow-wrap: anywhere; }
.v2-live-streak { font-size: 17px; font-weight: 600; }
.v2-live-entries { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.v2-live-entries > li { display: flex; flex-wrap: wrap; gap: 0 8px; margin: 0; list-style: none; font-size: 15px; color: var(--v2-muted); }
.v2-live-entries > li.is-up { color: var(--v2-ink); }
.v2-live-mark { color: var(--v2-gold-hi); }
.v2-live-result { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--v2-water-text); }
.v2-live-chart { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.v2-live-chart figcaption { display: flex; justify-content: space-between; font-size: 15px; }
.v2-live-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.v2-live-chart-base { stroke: rgba(238, 235, 227, 0.18); stroke-width: 1; stroke-dasharray: 3 4; }
.v2-live-chart-line { fill: none; stroke: #9ec0ff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.v2-live-chart-now { fill: #e4eeff; }

/* Escritorio. */
@media (min-width: 640px) {
  .v2-board-grid { grid-template-columns: 52px minmax(0, 170px) minmax(0, 1fr) 44px; gap: 12px; }
  .v2-board-row .v2-koi { width: 52px; height: 42px; }
  .v2-board { padding: 20px 18px 18px; }
  .v2-cohort-share .v2-btn { max-width: 358px; }
}
@media (min-width: 1024px) {
  .v2-admin-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-admin-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .v2-admin-kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .v2-admin-kpis > :first-child:nth-last-child(odd) { grid-column: auto; }
  .v2-admin-columns { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
  .v2-admin-columns-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
