/* Panel de Mérito. Colores y tipos del manual de marca. */
@font-face { font-family: "Titular"; src: url(ArchivoCondensed-BlackItalic.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 400; src: url(Inter_400Regular.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 500; src: url(Inter_500Medium.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 600; src: url(Inter_600SemiBold.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 700; src: url(Inter_700Bold.woff2) format("woff2"); font-display: swap; }

:root {
  --tinta: #0A1422; --tinta-2: #14223A; --tinta-3: #2A3A50;
  --pelota: #D8F23A; --blindex: #1D4ED8; --blindex-suave: #E4EBFF;
  --coral: #FF6B4A; --coral-suave: #FFE6DF; --lila: #C9B8FF; --lila-suave: #EFEAFF;
  --cal: #EEF1EC; --blanco: #fff; --polvo: #9A3412; --polvo-suave: #FDE7D3;
  --suave: #4B5868; --niebla: #8A96A6; --linea: #E2E6E0; --borde: #C9D0C8;
  --verde: #2F7D32; --verde-suave: #E2F3D9;
  --r-ctrl: 14px; --r-card: 22px; --r-pill: 999px;
  --sombra: 0 1px 0 rgba(10,20,34,.04), 0 10px 30px -18px rgba(10,20,34,.25);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 Inter, system-ui, sans-serif; color: var(--tinta); background: var(--cal);
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1, "cv11" 1; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
.titular { font-family: Titular, Inter, sans-serif; text-transform: uppercase; letter-spacing: .005em;
  line-height: .9; font-weight: 400; }

/* estructura */
.marco { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh;
  background: linear-gradient(90deg, var(--tinta) 232px, var(--cal) 232px); }
.lateral { background: var(--tinta); color: #fff; padding: 26px 16px 18px; position: sticky; top: 0;
  height: 100vh; display: flex; flex-direction: column; gap: 22px; }
.lateral .logo { text-decoration: none; padding: 0 10px; display: flex; align-items: baseline; gap: 10px; }
.lateral .logo small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--pelota); font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px;
  text-decoration: none; color: #B9C3D0; font-weight: 500; }
.nav a:hover { background: var(--tinta-2); color: #fff; }
.nav a.activo { background: var(--pelota); color: var(--tinta); font-weight: 600; }
.nav a svg { width: 17px; height: 17px; flex: none; }
.nav .grupo { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #5D6B7E;
  padding: 14px 12px 6px; font-weight: 600; }
.lateral .pie { margin-top: auto; border-top: 1px solid var(--tinta-2); padding: 14px 10px 0;
  display: flex; align-items: center; gap: 10px; }
.lateral .pie .quien { flex: 1; min-width: 0; }
.lateral .pie .quien b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lateral .pie .quien span { color: #7E8A9A; font-size: 12px; }
.lateral .pie button { background: none; border: 0; color: #7E8A9A; cursor: pointer; padding: 6px; border-radius: 8px; }
.lateral .pie button:hover { color: #fff; background: var(--tinta-2); }

.contenido { padding: 30px 36px 60px; min-width: 0; max-width: 1360px; }
.cabeza { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.cabeza h1 { font-size: 46px; }
.cabeza .bajada { color: var(--suave); margin-top: 8px; font-size: 14.5px; }
.cabeza .acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.miga { font-size: 12.5px; color: var(--suave); margin-bottom: 10px; display: flex; gap: 6px; }
.miga a { text-decoration: none; color: var(--suave); } .miga a:hover { color: var(--tinta); }

/* tarjetas */
.tarjeta { background: #fff; border-radius: var(--r-card); box-shadow: var(--sombra); padding: 22px; }
.tarjeta > h2, .seccion-titulo { font-size: 13px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--suave); margin-bottom: 14px; display: flex;
  justify-content: space-between; align-items: center; gap: 10px; }
.tarjeta > h2 a { font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--blindex); text-decoration: none; font-weight: 600; }
.tarjeta.plana { box-shadow: none; border: 1px solid var(--linea); }
.tarjeta.oscura { background: var(--tinta); color: #fff; }
.rejilla { display: grid; gap: 16px; }
.r2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.r3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.r4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.r-ficha { grid-template-columns: 340px minmax(0,1fr); align-items: start; }
.r-21 { grid-template-columns: minmax(0,2fr) minmax(0,1fr); align-items: start; }
.pila { display: flex; flex-direction: column; gap: 16px; }
.mt { margin-top: 16px; } .mt2 { margin-top: 28px; }

/* números grandes */
.kpi { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.kpi .etiqueta { font-size: 12.5px; color: var(--suave); font-weight: 500; }
.kpi .valor { font-family: Titular, Inter; font-size: 44px; line-height: .9; }
.kpi .nota { font-size: 12.5px; color: var(--suave); }
.kpi .nota b { color: var(--verde); font-weight: 600; }
.kpi.destacado { background: var(--tinta); color: #fff; }
.kpi.destacado .etiqueta, .kpi.destacado .nota { color: #9AA6B6; }
.kpi.destacado .valor { color: var(--pelota); }

/* tablas */
.tabla-caja { background: #fff; border-radius: var(--r-card); box-shadow: var(--sombra); overflow: hidden; }
.tabla-caja .tabla-cabeza { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--linea); gap: 12px; flex-wrap: wrap; }
.tabla-caja .tabla-cabeza .total { color: var(--suave); font-size: 13px; }
.desplaza { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--suave); text-transform: uppercase; letter-spacing: .06em; padding: 10px 14px; background: #FAFBF9; border-bottom: 1px solid var(--linea); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.clic { cursor: pointer; } tbody tr.clic:hover td { background: #F7F9F5; }
td.num, th.num { text-align: right; white-space: nowrap; }
td .sub { display: block; color: var(--suave); font-size: 12.5px; }
.tabla-mini td, .tabla-mini th { padding: 8px 0; background: none; }
.tabla-mini th { border-bottom: 1px solid var(--linea); }
.vacio { padding: 40px 20px; text-align: center; color: var(--suave); }
.vacio .titular { font-size: 26px; color: var(--tinta); display: block; margin-bottom: 6px; }

/* persona */
.persona { display: flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.persona b { font-weight: 600; display: block; white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 600 12.5px Inter; letter-spacing: .02em; }
.avatar.grande { width: 76px; height: 76px; font-size: 26px; }
.av0 { background: var(--coral); color: var(--tinta); } .av1 { background: var(--blindex); color: #fff; }
.av2 { background: var(--lila); color: var(--tinta); } .av3 { background: var(--tinta); color: var(--pelota); }
.av4 { background: var(--pelota); color: var(--tinta); }

/* etiquetas */
.cat { display: inline-flex; align-items: baseline; gap: 5px; background: var(--tinta); color: #fff;
  padding: 3px 10px 4px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.cat i { font-style: normal; color: var(--pelota); font-weight: 500; font-size: 11.5px; }
.cat.clara { background: var(--cal); color: var(--tinta); } .cat.clara i { color: var(--suave); }
.pill { display: inline-block; padding: 3px 10px 4px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--cal); color: var(--suave); }
.pill.verde { background: var(--verde-suave); color: var(--verde); }
.pill.azul { background: var(--blindex-suave); color: var(--blindex); }
.pill.coral { background: var(--coral-suave); color: #B3361C; }
.pill.lila { background: var(--lila-suave); color: #5A3FB8; }
.pill.ambar { background: var(--polvo-suave); color: var(--polvo); }
.pill.tinta { background: var(--tinta); color: var(--pelota); }
.punto { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: currentColor; }
.marcador { font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.marcador .g { color: var(--tinta); } .marcador .p { color: var(--niebla); }
.mas { color: var(--verde); font-weight: 600; } .menos { color: #B3361C; font-weight: 600; }

/* formularios */
.filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input[type=text], input[type=email], input[type=search], input[type=date], input[type=number], select, textarea {
  font: inherit; color: var(--tinta); background: #fff; border: 1px solid var(--borde); border-radius: var(--r-ctrl);
  padding: 9px 12px; min-height: 40px; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 90px; resize: vertical; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--tinta); box-shadow: 0 0 0 3px rgba(216,242,58,.55); }
select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%230A1422' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.filtros input[type=search] { min-width: 320px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > span { font-size: 12.5px; font-weight: 600; color: var(--suave); }
.campo .ayuda { font-size: 12px; color: var(--niebla); font-weight: 400; }
.form { display: grid; gap: 14px; }
.form .fila { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.form input, .form select { width: 100%; }
.chequeos { display: flex; flex-wrap: wrap; gap: 6px; }
.chequeos label { cursor: pointer; }
.chequeos input { position: absolute; opacity: 0; pointer-events: none; }
.chequeos span { display: inline-block; padding: 7px 13px; border-radius: var(--r-pill); border: 1px solid var(--borde); font-weight: 600; font-size: 13px; background: #fff; user-select: none; }
.chequeos input:checked + span { background: var(--tinta); color: var(--pelota); border-color: var(--tinta); }
.chequeos input:focus-visible + span { box-shadow: 0 0 0 3px rgba(216,242,58,.55); }
.interruptor { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.interruptor input { width: 18px; height: 18px; accent-color: var(--tinta); }

.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px Inter;
  border-radius: var(--r-pill); padding: 10px 18px; min-height: 40px; border: 1px solid transparent;
  background: var(--tinta); color: #fff; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s, background .15s; }
.boton:hover { background: var(--tinta-3); } .boton:active { transform: translateY(1px); }
.boton.pelota { background: var(--pelota); color: var(--tinta); } .boton.pelota:hover { background: #CBE62C; }
.boton.claro { background: #fff; color: var(--tinta); border-color: var(--borde); } .boton.claro:hover { border-color: var(--tinta); background: #fff; }
.boton.peligro { background: #fff; color: #B3361C; border-color: #F3C2B6; } .boton.peligro:hover { background: var(--coral-suave); }
.boton.chico { padding: 6px 12px; min-height: 32px; font-size: 13px; }
.boton svg { width: 16px; height: 16px; }
.enlace { color: var(--blindex); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.enlace:hover { text-decoration: underline; }

/* avisos */
.aviso { position: fixed; right: 24px; bottom: 24px; z-index: 30; background: var(--tinta); color: #fff;
  border-radius: 16px; padding: 14px 18px; display: flex; gap: 12px; align-items: center; box-shadow: 0 20px 40px -20px rgba(0,0,0,.5);
  animation: entra .25s ease-out; max-width: 420px; }
.aviso::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pelota); flex: none; }
.aviso.error::before { background: var(--coral); }
@keyframes entra { from { transform: translateY(12px); opacity: 0; } }
.alerta { border-radius: 16px; padding: 12px 16px; background: var(--polvo-suave); color: var(--polvo); font-weight: 500; }
.alerta.azul { background: var(--blindex-suave); color: var(--blindex); }

/* gráficos */
.grafico { width: 100%; height: auto; display: block; overflow: visible; }
.grafico text { font: 500 11px Inter; fill: var(--niebla); }
.leyenda { display: flex; gap: 16px; font-size: 12.5px; color: var(--suave); }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.barra-h { height: 8px; border-radius: 8px; background: var(--cal); overflow: hidden; display: flex; }
.barra-h span { display: block; height: 100%; }

/* listas */
.lista { display: flex; flex-direction: column; }
.lista > * { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--linea); text-decoration: none; }
.lista > *:last-child { border-bottom: 0; }
.lista a:hover b { text-decoration: underline; }
.dato { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--linea); }
.dato:last-child { border-bottom: 0; }
.dato span { color: var(--suave); }
.dato b { font-weight: 600; text-align: right; }

/* ficha */
.heroe-ficha { background: var(--tinta); color: #fff; border-radius: 28px; padding: 26px; position: relative; overflow: hidden; }
.heroe-ficha::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; border: 26px solid rgba(216,242,58,.09); }
.heroe-ficha h1 { font-size: 40px; margin-top: 16px; }
.heroe-ficha .mail { color: #9AA6B6; margin-top: 6px; word-break: break-all; }
.heroe-ficha .catgrande { display: flex; align-items: baseline; gap: 10px; margin-top: 20px; }
.heroe-ficha .catgrande .titular { font-size: 64px; color: var(--pelota); }
.heroe-ficha .catgrande span { color: #C5CEDA; font-weight: 500; }
.heroe-ficha .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.heroe-ficha .chips .pill { background: var(--tinta-2); color: #C5CEDA; }
.pestanas { display: flex; gap: 4px; background: #fff; border-radius: var(--r-pill); padding: 4px; box-shadow: var(--sombra); width: fit-content; margin-bottom: 16px; flex-wrap: wrap; }
.pestanas a { padding: 8px 16px; border-radius: var(--r-pill); text-decoration: none; font-weight: 600; color: var(--suave); }
.pestanas a.activo { background: var(--tinta); color: #fff; }
details.accion { border-top: 1px solid var(--linea); }
details.accion summary { list-style: none; cursor: pointer; padding: 13px 0; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
details.accion summary::-webkit-details-marker { display: none; }
details.accion summary::after { content: "+"; font-size: 18px; color: var(--suave); }
details.accion[open] summary::after { content: "–"; }
details.accion .form { padding-bottom: 16px; }
.nota-interna { background: #FFFBEA; border-radius: 14px; padding: 12px 14px; }
.nota-interna small { color: var(--suave); display: block; margin-top: 6px; }

/* buscador de jugadores */
.buscador { position: relative; }
.buscador .opciones { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(10,20,34,.35); border: 1px solid var(--linea); overflow: hidden; display: none; }
.buscador .opciones.abiertas { display: block; }
.buscador .opciones button { display: flex; width: 100%; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 0; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.buscador .opciones button:hover, .buscador .opciones button.foco { background: var(--cal); }
.buscador .opciones small { color: var(--suave); }
.buscador.elegido input { border-color: var(--tinta); background: #FBFDF2; font-weight: 600; }

/* paginación */
.paginas { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--linea); color: var(--suave); font-size: 13px; }

/* ingreso */
.ingreso { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.ingreso .arte { background: var(--tinta) url(fondo.jpg) center/cover; position: relative; color: #fff; padding: 44px; display: flex; flex-direction: column; justify-content: space-between; }
.ingreso .arte::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,20,34,.2), rgba(10,20,34,.85)); }
.ingreso .arte > * { position: relative; }
.ingreso .arte h1 { font-size: clamp(54px, 7vw, 104px); }
.ingreso .arte h1 em { color: var(--pelota); font-style: normal; }
.ingreso .caja { display: flex; align-items: center; justify-content: center; padding: 40px; }
.ingreso form { width: 100%; max-width: 380px; display: grid; gap: 16px; }
.ingreso form h2 { font-size: 40px; }
.ingreso form p { color: var(--suave); margin: 0; }
.ingreso input { width: 100%; min-height: 50px; font-size: 16px; }
.ingreso input.codigo { font-size: 28px; letter-spacing: .4em; text-align: center; font-weight: 600; }
.ingreso .boton { min-height: 50px; font-size: 15px; }
.ingreso .error { color: #B3361C; font-weight: 500; }

@media (max-width: 1100px) {
  .r4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .r-ficha, .r-21, .r3 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .marco { grid-template-columns: 1fr; background: var(--cal); }
  .lateral { position: sticky; top: 0; z-index: 10; height: auto; padding: 12px 12px 10px; gap: 10px;
    display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .lateral .nav { grid-column: 1 / -1; grid-row: 2; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .lateral .nav .grupo { display: none; }
  .lateral .nav a { white-space: nowrap; padding: 7px 12px; }
  .lateral .logo { grid-column: 1; grid-row: 1; }
  .lateral .pie { margin: 0; border: 0; padding: 0; grid-row: 1; grid-column: 2; }
  .lateral .pie .quien { display: none; }
  .contenido { padding: 22px 16px 60px; }
  .r2 { grid-template-columns: 1fr; }
  .ingreso { grid-template-columns: 1fr; } .ingreso .arte { min-height: 260px; }
}
