/*
  SPARK · estilo «noche de estadio» (concepto en C:\i4ds\Spark\Conceptos).
  La marca de cada academia llega desde _Layout como --brand-primary y --brand-secondary;
  todo lo demás es de SPARK.
*/
:root {
    --brand-primary: #22418f;
    --brand-secondary: #3a67d6;
    --bg: #040c1a;
    --panel: rgba(9, 27, 54, .78);
    --panel-2: rgba(13, 38, 74, .72);
    --line: rgba(86, 196, 255, .16);
    --line-2: rgba(86, 214, 255, .42);
    --text: #eaf4ff;
    --text-2: #b7cbe3;
    --muted: #7f99b8;
    --cyan: #3fd0ff;
    --cyan-2: #8fe3ff;
    --orange: #ff6a00;
    --orange-2: #ff8f33;
    --green: #22d39a;
    --red: #ff5d6c;
    --amber: #ffb62e;
    --glow: 0 0 0 1px var(--line), 0 18px 50px rgba(0, 0, 0, .35);
    --glow-hover: 0 0 0 1px var(--line-2), 0 0 32px rgba(63, 208, 255, .16), 0 18px 50px rgba(0, 0, 0, .4);
    --radius: 18px;
    --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
    --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
    margin: 0;
    font: 14px/1.45 var(--sans);
    color: var(--text);
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(34, 120, 255, .18), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(255, 106, 0, .08), transparent 60%),
        var(--bg);
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; color: inherit; }
svg.i { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ───────── Estructura con sesión ───────── */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; gap: 6px; padding: 22px 14px 16px;
    background: linear-gradient(180deg, rgba(6, 20, 44, .96), rgba(3, 11, 25, .98));
    border-right: 1px solid var(--line);
}
.club { display: flex; align-items: center; gap: 12px; padding: 0 8px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.club img { width: 54px; height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5)); }
.club-name { display: block; font: 800 20px/1.05 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.club small { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }

/* Escudo de respaldo cuando la academia aún no sube su logo */
.crest {
    width: 50px; height: 56px; flex: none; display: grid; place-items: center;
    font: 800 18px/1 var(--display); color: #fff;
    background: linear-gradient(150deg, var(--brand-secondary), var(--brand-primary) 60%, #0b1b44);
    clip-path: polygon(50% 0, 100% 14%, 94% 70%, 50% 100%, 6% 70%, 0 14%);
}
.crest.lg { width: 96px; height: 108px; font-size: 36px; }

.nav-label { margin: 14px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; color: #5f7fa3; text-transform: uppercase; }
.nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 11px; color: var(--text-2); font-weight: 500;
    transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(63, 208, 255, .07); color: var(--text); text-decoration: none; }
.nav a.active { color: #fff; background: linear-gradient(90deg, rgba(255, 106, 0, .22), rgba(63, 208, 255, .06)); box-shadow: inset 0 0 0 1px rgba(255, 143, 51, .35); }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--orange); box-shadow: 0 0 14px var(--orange); }

.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; }
.av { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: linear-gradient(135deg, var(--orange), #ff9d4d); box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.me b { display: block; font-size: 13.5px; }
.me small { color: var(--muted); font-size: 12px; }
.side-foot img { width: 118px; opacity: .75; }
.link { background: none; border: 0; padding: 0; color: var(--text-2); cursor: pointer; font-size: 12.5px; }
.link:hover { color: var(--text); text-decoration: underline; }
.side-link { display: inline-flex; align-items: center; gap: 6px; }
.side-link svg.i { width: 15px; height: 15px; }
.side-link.active { color: var(--cyan); }

.content { min-width: 0; padding: 22px 28px 40px; }
.menu-toggle { display: none; }

/* ───────── Hero ───────── */
.hero {
    position: relative; overflow: hidden; border-radius: 22px; padding: 28px 30px; margin-bottom: 18px;
    background:
        linear-gradient(90deg, #06142c 0%, rgba(6, 20, 44, .94) 42%, rgba(6, 20, 44, .25) 75%, rgba(6, 20, 44, 0)),
        url("/img/estadio.jpg") right 40% / 55% auto no-repeat, #06142c;
    box-shadow: var(--glow);
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background: linear-gradient(90deg, var(--orange), var(--cyan) 45%, transparent); }
.eyebrow { font: 700 12px/1.3 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--orange-2); }
.hero h1, .page-title { margin: 10px 0 6px; font: 800 46px/1 var(--display); letter-spacing: .01em; text-transform: uppercase; }
.hero h1 em, .page-title em { font-style: normal; color: var(--cyan); }
.hero p { margin: 0; color: var(--text-2); max-width: 600px; }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.page-head { margin-bottom: 18px; }
.page-head p { margin: 0; color: var(--text-2); }
.page-title { font-size: 40px; }

/* ───────── Botones y formularios ───────── */
button, .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px; border: 0; border-radius: 12px; cursor: pointer;
    font-weight: 700; color: #fff; background: linear-gradient(90deg, var(--orange), var(--orange-2));
    box-shadow: 0 8px 24px rgba(255, 106, 0, .3);
}
button:hover, .btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn-ghost, button.btn-ghost { color: var(--text); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
button.link { height: auto; box-shadow: none; background: none; font-weight: 500; }

form.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.field {
    display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 16px; border-radius: 12px;
    border: 1px solid #5a7ea3; background: rgba(2, 18, 35, .45); transition: border-color .15s, box-shadow .15s;
}
.field:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(63, 208, 255, .15); }
.field svg.i { color: #b9d3ea; }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: #fff; font-size: 15px; }
.field input::placeholder { color: #8fb0cc; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); margin: 0; }
input[type=text].inline { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid #5a7ea3; background: rgba(2, 18, 35, .45); color: #fff; }
.error { color: var(--red); font-size: 13px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 13.5px; }
.alert.error { color: #ffc2c8; background: rgba(255, 93, 108, .12); box-shadow: inset 0 0 0 1px rgba(255, 93, 108, .4); }
.alert.ok { color: #c4f5e3; background: rgba(34, 211, 154, .1); box-shadow: inset 0 0 0 1px rgba(34, 211, 154, .35); }
.notice { color: var(--muted); }

/* ───────── Tarjetas ───────── */
.grid { display: grid; gap: 16px; }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
    position: relative; border-radius: var(--radius); padding: 20px 22px;
    background: linear-gradient(160deg, var(--panel-2), var(--panel)); box-shadow: var(--glow);
    transition: box-shadow .2s, transform .2s;
}
a.card { display: block; color: inherit; }
a.card:hover { box-shadow: var(--glow-hover); transform: translateY(-2px); text-decoration: none; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h2 { margin: 0; font: 700 21px/1.1 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.card-h small { display: block; margin-top: 3px; color: var(--muted); font: 400 12.5px/1.3 var(--sans); text-transform: none; letter-spacing: 0; }
.tile-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 14px; background: rgba(63, 208, 255, .1); box-shadow: inset 0 0 0 1px var(--line); color: var(--cyan); }
.tile-ico.o { background: rgba(255, 106, 0, .12); color: var(--orange-2); }
.card b.t { display: block; font: 700 22px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.card p { margin: 6px 0 0; color: var(--text-2); }
.soon { opacity: .55; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.chip.green { color: var(--green); background: rgba(34, 211, 154, .12); box-shadow: inset 0 0 0 1px rgba(34, 211, 154, .3); }
.chip.cyan { color: var(--cyan); background: rgba(63, 208, 255, .1); box-shadow: inset 0 0 0 1px rgba(63, 208, 255, .3); }
.chip.gray { color: var(--text-2); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }

/* Tablas: sobrias y legibles */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { padding: 10px 12px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(63, 208, 255, .04); }
td form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
td form button { height: 38px; padding: 0 14px; font-size: 13px; box-shadow: none; }

/* Mis academias */
.academies { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.academy { display: flex; align-items: center; gap: 14px; }
.academy img { width: 50px; }
.academy .grow { flex: 1; min-width: 0; }
.academy b { display: block; font: 800 22px/1.05 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.academy small { color: var(--muted); font-size: 12px; }
.academy.here { box-shadow: 0 0 0 1px rgba(255, 143, 51, .5), 0 18px 50px rgba(0, 0, 0, .35); }
.academy form button { height: 38px; padding: 0 14px; }

/* ───────── Atletas, categorías y grupos (concepto: categoria.html, atleta.html) ───────── */
.crumbs { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.crumbs a { color: var(--cyan); }
.page-head.with-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.mt { margin-top: 16px; }
.card-h a { color: var(--cyan); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip.orange { color: var(--orange-2); background: rgba(255, 106, 0, .12); box-shadow: inset 0 0 0 1px rgba(255, 143, 51, .35); }
.chip.red { color: var(--red); background: rgba(255, 93, 108, .12); box-shadow: inset 0 0 0 1px rgba(255, 93, 108, .3); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn svg.i, button svg.i { width: 17px; height: 17px; stroke-width: 2; }
.btn.sm, button.sm { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; box-shadow: none; }

/* Campos de formularios largos: los mismos del renombrado de sedes */
input[type=text], input[type=search], input[type=date], input[type=time], input[type=number], input[type=tel], input[type=email], select, textarea {
    height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid #5a7ea3; background: rgba(2, 18, 35, .45); color: #fff; font: inherit; min-width: 0;
}
textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
select option, select optgroup { background: #071631; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(63, 208, 255, .15); }
.input-validation-error { border-color: var(--red) !important; }
.field-validation-error, .field-error { display: block; color: #ff9aa4; font-size: 12.5px; font-weight: 500; }
.field-validation-valid { display: none; }
.hint { color: var(--muted); font-size: 12px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: 1 / -1; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.pos-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-picks label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; font-weight: 600; background: rgba(4, 12, 26, .45); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.pos-picks input { accent-color: var(--orange); margin: 0; }
.pos-picks label:has(input:checked) { color: #fff; box-shadow: inset 0 0 0 1px var(--cyan); background: rgba(63, 208, 255, .1); }
.guardian { padding: 16px; border-radius: 14px; background: rgba(4, 12, 26, .45); box-shadow: inset 0 0 0 1px var(--line); }
.guardian + .guardian { margin-top: 12px; }
.guardian-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.guardian-head b { font: 700 16px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.guardian-flags { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.category-preview { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 13px; color: var(--text-2); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }

/* Filtros y búsqueda en vivo */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { flex: 1; min-width: 220px; max-width: 420px; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 12px; background: rgba(4, 12, 26, .55); border: 1px solid var(--line-2); color: var(--muted); }
.search:focus-within { border-color: var(--cyan); }
.search input { flex: 1; height: 100%; padding: 0; border: 0; background: transparent; }
.search input:focus { box-shadow: none; }
.result-count { color: var(--muted); font-size: 12.5px; margin: 0 0 8px; }

/* Jugador: iniciales con la posición en la esquina (en el concepto, el dorsal; aquí no hay dorsal) */
.pav { position: relative; width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font: 800 16px/1 var(--display); color: #fff;
    background: linear-gradient(145deg, var(--brand-secondary), var(--brand-primary)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.pav em { position: absolute; right: -8px; bottom: -7px; min-width: 22px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 6px; font: 800 10.5px/1 var(--display); font-style: normal; letter-spacing: .02em; background: var(--orange); color: #fff; }
.who { display: flex; align-items: center; gap: 14px; color: inherit; }
.who:hover { text-decoration: none; }
.who b { display: block; font-weight: 600; }
.who small { color: var(--muted); font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap; }
tr.muted td { color: var(--muted); }

/* Categorías como «tarjeta de equipo» */
.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.team {
    position: relative; overflow: hidden; display: block; padding: 16px 16px 14px; border-radius: 14px; color: inherit;
    background: linear-gradient(150deg, rgba(34, 65, 143, .55), rgba(9, 27, 54, .9)); box-shadow: inset 0 0 0 1px var(--line);
    transition: box-shadow .2s, transform .2s;
}
.team:hover { box-shadow: inset 0 0 0 1px var(--line-2), 0 0 24px rgba(63, 208, 255, .15); transform: translateY(-2px); text-decoration: none; }
.team::after { content: ""; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, rgba(63, 208, 255, .18), transparent 70%); }
.team b { font: 800 30px/1 var(--display); }
.team small { display: block; color: var(--text-2); font-size: 12px; margin-top: 4px; }
.team-stats { display: flex; gap: 14px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.team-stats b { display: block; font: 800 20px/1 var(--display); color: var(--text); }

.cat-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; }
.cat-year {
    width: 132px; height: 148px; display: grid; place-items: center; flex: none;
    font: 800 50px/1 var(--display); color: #fff;
    background: linear-gradient(150deg, var(--brand-secondary), var(--brand-primary) 60%, #0b1b44);
    clip-path: polygon(50% 0, 100% 14%, 94% 70%, 50% 100%, 6% 70%, 0 14%);
    filter: drop-shadow(0 10px 30px rgba(58, 103, 214, .45));
}
.scoreboard { position: relative; display: flex; gap: 10px; }
.scoreboard div { min-width: 84px; padding: 12px 14px; text-align: center; border-radius: 14px; background: rgba(4, 12, 26, .72); box-shadow: inset 0 0 0 1px var(--line); }
.scoreboard b { display: block; font: 800 40px/1 var(--display); color: var(--cyan); text-shadow: 0 0 18px rgba(63, 208, 255, .35); }
.scoreboard small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.squad { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.squad a { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; color: inherit; background: rgba(4, 12, 26, .45); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s, background .15s; }
.squad a:hover { background: rgba(63, 208, 255, .06); box-shadow: inset 0 0 0 1px var(--line-2); text-decoration: none; }
.squad a.other { box-shadow: inset 0 0 0 1px rgba(255, 143, 51, .45); }
.squad b { display: block; font-weight: 600; }
.squad small { color: var(--muted); font-size: 12px; }
.squad .gen { color: var(--orange-2); font-weight: 700; }

.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; padding-top: 2px; }
.row .grow { flex: 1; min-width: 0; }
.row b { display: block; font-weight: 600; }
.row small { color: var(--muted); font-size: 12px; }
.row form { display: flex; gap: 8px; align-items: center; }
.add-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.add-form select { flex: 1; min-width: 200px; }

/* Perfil del atleta: cromo sin índices ni niveles, que aún no existen (§1, principio 7) */
.athlete { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.cromo {
    position: relative; overflow: hidden; padding: 20px 20px 22px; border-radius: 22px; text-align: center;
    background:
        radial-gradient(260px 200px at 50% 38%, rgba(63, 208, 255, .28), transparent 70%),
        linear-gradient(165deg, var(--brand-secondary) 0%, var(--brand-primary) 45%, #0a1735 100%);
    box-shadow: 0 0 0 1px rgba(143, 227, 255, .45), 0 0 40px rgba(58, 103, 214, .35), 0 24px 60px rgba(0, 0, 0, .5);
}
.cromo::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 14px); pointer-events: none; }
.cromo .tag { position: absolute; left: 20px; top: 18px; text-align: left; }
.cromo .tag b { display: block; font: 800 30px/.9 var(--display); color: var(--cyan-2); text-shadow: 0 0 20px rgba(143, 227, 255, .6); }
.cromo .tag small { font: 700 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.cromo .club-mini { position: absolute; right: 18px; top: 18px; width: 44px; }
.cromo .crest.club-mini { width: 40px; height: 45px; font-size: 14px; }
.cromo .face {
    position: relative; width: 150px; height: 150px; margin: 34px auto 6px; border-radius: 50%; display: grid; place-items: center;
    font: 800 64px/1 var(--display); color: rgba(255, 255, 255, .92);
    background: radial-gradient(circle at 35% 30%, #5f8cf0, #1b3474 70%);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .2), 0 0 0 9px rgba(63, 208, 255, .12), 0 14px 30px rgba(0, 0, 0, .45);
}
.cromo h2 { position: relative; margin: 12px 0 2px; font: 800 32px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.cromo .role { position: relative; color: var(--cyan-2); font-weight: 600; font-size: 13px; }
.cromo .enroll { position: relative; display: inline-flex; margin-top: 14px; padding: 6px 14px; border-radius: 99px; font: 800 14px/1 var(--display); letter-spacing: .12em; background: rgba(4, 12, 26, .55); box-shadow: inset 0 0 0 1px rgba(143, 227, 255, .45); }
.bio { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bio div { padding: 2px 16px; border-left: 1px solid var(--line); }
.bio div:first-child { border-left: 0; padding-left: 0; }
.bio small { display: block; color: var(--muted); font-size: 11.5px; }
.bio b { display: block; margin-top: 6px; font: 800 24px/1.05 var(--display); }
.bio b span { font-size: 14px; color: var(--text-2); }
.bio b.enrollment { font-size: 19px; letter-spacing: .01em; }

/* Cancha de posiciones (M08): principal naranja, secundarias con aro, y leyenda en texto */
.pitch { position: relative; aspect-ratio: 68 / 100; width: 100%; max-width: 260px; margin: 0 auto; border-radius: 12px; overflow: hidden;
    background: repeating-linear-gradient(180deg, #0f5a3a 0 10%, #0c4f33 10% 20%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 12px 30px rgba(0, 0, 0, .4); }
.pitch svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pos { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 800 13px/1 var(--display); }
.pos.main { background: var(--orange); color: #fff; box-shadow: 0 0 0 4px rgba(255, 106, 0, .3), 0 0 24px var(--orange); }
.pos.alt { background: rgba(4, 12, 26, .75); color: var(--cyan); box-shadow: inset 0 0 0 2px var(--cyan); }
.legend { display: flex; gap: 14px; justify-content: center; margin-top: 12px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.soon-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.soon-list .chip { white-space: normal; }

/* ───────── Pantallas sin sesión (ingreso, raíz, estados) ───────── */
.gate {
    position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, 36vw); align-items: center;
    background: #03182e url("/img/login-bg.jpg") 45% center / cover;
    overflow: hidden;
}
.gate::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 52%, rgba(2, 15, 32, .55) 72%, rgba(2, 15, 32, .82)); }
.gate-side { position: relative; grid-column: 2; justify-self: center; width: min(100% - 5vw, 500px); margin-right: 5vw; padding: 32px 0; display: grid; gap: 22px; justify-items: center; }
.gate-logo { width: min(360px, 100%); height: auto; }
.gate-panel {
    width: 100%; padding: 36px 40px; border-radius: 24px; border: 1px solid #2cd4ff;
    background: linear-gradient(155deg, rgba(4, 34, 61, .92), rgba(1, 19, 38, .97)); box-shadow: 0 0 60px rgba(24, 166, 219, .18);
}
.gate-academy { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.gate-academy img { width: 64px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5)); }
.gate-panel h1 { margin: 0; font: 800 34px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.gate-panel .sub { margin: 4px 0 0; color: #4dd9ff; font-size: 15px; }
.gate-panel > p { color: var(--text-2); }
.gate-note { font-size: 14px; line-height: 1.5; }
.qr-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.qr { width: 180px; height: 180px; padding: 8px; background: #fff; border-radius: 12px; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-box .key { font-size: 16px; letter-spacing: .06em; margin: 4px 0 0; word-break: break-all; }
ol.tf-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); }
ul.plain { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--text-2); }
.recovery-codes .codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; margin: 12px 0 0; padding-left: 22px; font-size: 16px; }
.gate-note a { color: var(--cyan); }
.gate-panel button[type=submit] { width: 100%; height: 56px; font-size: 16px; font-weight: 800; letter-spacing: .02em; }
.gate-foot { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #3e6585; color: var(--text-2); font-size: 12px; }
.gate-foot img { width: 110px; opacity: .85; }
.gate-foot svg.i { width: 26px; height: 26px; color: #4dd9ff; }
.gate-center { grid-template-columns: 1fr; }
.gate-center::before { background: rgba(2, 15, 32, .72); }
.gate-center .gate-side { grid-column: 1; margin: 0 auto; }

@media (max-height: 820px) {
    .gate-side { gap: 14px; padding: 18px 0; }
    .gate-logo { width: min(280px, 100%); }
    .gate-panel { padding: 26px 32px; }
    .field { height: 48px; }
    .gate-panel button[type=submit] { height: 50px; }
}
@media (max-width: 1050px) {
    .gate { grid-template-columns: 1fr; }
    .gate::before { background: rgba(2, 15, 32, .8); }
    .gate-side { grid-column: 1; margin: 0 auto; width: min(480px, 92vw); }
}
@media (max-width: 1280px) {
    .athlete { grid-template-columns: minmax(0, 1fr); }
    /* Apilado: el cromo y la cancha lado a lado, para no dejar media pantalla vacía. */
    .athlete > .grid { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: stretch; }
    .bio { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
    .bio div:nth-child(3n+1) { border-left: 0; padding-left: 0; }
}
@media (max-width: 1024px) {
    .g-2, .g-main { grid-template-columns: minmax(0, 1fr); }
    .cat-hero { grid-template-columns: 1fr; }
    .cat-year { width: 96px; height: 108px; font-size: 38px; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; z-index: 20; left: 0; width: 256px; transform: translateX(-100%); transition: transform .2s; }
    .shell.open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .6); }
    .menu-toggle { display: inline-flex; margin-bottom: 14px; }
    .g-3 { grid-template-columns: minmax(0, 1fr); }
    .content { padding: 14px 16px 32px; }
}
@media (max-width: 640px) {
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-grid .span-2 { grid-column: auto; }
    .bio { grid-template-columns: repeat(2, 1fr); }
    .bio div, .bio div:nth-child(3n+1) { border-left: 0; padding-left: 0; }
    .athlete > .grid { grid-template-columns: minmax(0, 1fr); }
    .scoreboard div { min-width: 0; flex: 1; }
    .teams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search { max-width: none; }
    .hero { padding: 22px 18px; }
    .hero h1, .page-title { font-size: 34px; }
    .gate-panel { padding: 24px 22px; }
}

/* Encabezados que ordenan (lista de atletas) */
th.sortable a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
th.sortable a:hover { color: var(--text); }
th.sortable.sorted a { color: var(--cyan); }
.sort-mark { font-size: 10px; color: var(--orange-2); }
.sort-mark sup { margin-left: 1px; font-size: 9px; color: var(--text-2); }
.result-count a { margin-left: 4px; }

/* ───────── Entrenamientos: hoy, calendario, sesión (concepto: dashboard-admin.html, coach-app.html) ───────── */
.gate-panel h2 { margin: 6px 0 8px; font: 800 28px/1.05 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.time { width: 62px; flex: none; text-align: center; font: 800 20px/1 var(--display); }
.time small { display: block; margin-top: 3px; font: 600 10.5px/1.1 var(--sans); letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.badge-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; color: var(--cyan); background: rgba(63, 208, 255, .1); box-shadow: inset 0 0 0 1px var(--line); }
.badge-ico.o { color: var(--orange-2); background: rgba(255, 106, 0, .12); }
a.row-link { color: inherit; border-radius: 12px; transition: background .15s; }
a.row-link:hover { text-decoration: none; background: rgba(63, 208, 255, .05); }
.row.cancelled b, .row.cancelled .time { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 93, 108, .7); }
.empty-state { display: flex; gap: 16px; align-items: center; padding: 6px 0; }
.empty-state b { display: block; font-weight: 600; }
.empty-state p { margin: 2px 0 0; color: var(--text-2); }
.today-card { margin-bottom: 18px; }

.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-nav .btn.sm { height: 36px; padding: 0 10px; }
.cal-title { margin: 0 0 0 8px; font: 800 26px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.seg-links { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(4, 12, 26, .55); box-shadow: inset 0 0 0 1px var(--line); }
.seg-links a { padding: 7px 14px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 13px; }
.seg-links a:hover { text-decoration: none; color: var(--text); }
.seg-links a.on { color: #fff; background: linear-gradient(90deg, rgba(255, 106, 0, .35), rgba(63, 208, 255, .12)); box-shadow: inset 0 0 0 1px rgba(255, 143, 51, .45); }
.cal .filters select { min-width: 170px; }
.cal-count { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.cal-window { margin: -4px 0 12px; font-size: 12.5px; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { min-width: 0; min-height: 180px; padding: 8px; border-radius: 14px; background: rgba(4, 12, 26, .4); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 8px; }
.day.today { box-shadow: inset 0 0 0 1px rgba(255, 143, 51, .55), 0 0 22px rgba(255, 106, 0, .1); }
.day header { display: flex; align-items: baseline; gap: 6px; padding: 2px 4px 6px; border-bottom: 1px solid var(--line); }
.day header b { font: 700 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.day header span { font: 800 22px/1 var(--display); }
.day header em { margin-left: auto; font: 700 10.5px/1 var(--sans); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-2); }
.day .none { margin: 4px; color: #5f7fa3; font-size: 12px; }
.sess { display: grid; gap: 3px; padding: 9px 10px; border-radius: 11px; color: inherit; background: linear-gradient(160deg, rgba(34, 65, 143, .45), rgba(9, 27, 54, .85)); box-shadow: inset 3px 0 0 var(--cyan), inset 0 0 0 1px var(--line); transition: box-shadow .15s, transform .15s; }
.sess:hover { text-decoration: none; transform: translateY(-1px); box-shadow: inset 3px 0 0 var(--cyan), inset 0 0 0 1px var(--line-2), 0 0 18px rgba(63, 208, 255, .12); }
.sess-time { font-size: 11.5px; color: var(--cyan-2); font-weight: 600; }
.sess b { font: 700 16px/1.1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.sess small { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.sess .chip { padding: 2px 7px; font-size: 9.5px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.sess.cancelled { background: rgba(255, 93, 108, .06); box-shadow: inset 3px 0 0 var(--red), inset 0 0 0 1px rgba(255, 93, 108, .25); }
.sess.cancelled b, .sess.cancelled .sess-time { text-decoration: line-through; text-decoration-color: rgba(255, 93, 108, .8); color: var(--text-2); }
.sess .why { color: #ffb3ba; font-style: italic; }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month-head { padding: 0 6px 4px; font: 700 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.month-day { min-height: 104px; min-width: 0; padding: 6px; border-radius: 10px; background: rgba(4, 12, 26, .4); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 3px; }
.month-day.out { opacity: .45; }
.month-day.today { box-shadow: inset 0 0 0 1px rgba(255, 143, 51, .6); }
.month-num { align-self: flex-start; font: 800 17px/1 var(--display); color: var(--text); padding: 2px 4px; }
.mini { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 2px 6px; border-radius: 6px; font-size: 11.5px; color: var(--text); background: rgba(63, 208, 255, .1); }
.mini:hover { text-decoration: none; background: rgba(63, 208, 255, .2); }
.mini.cancelled { color: var(--muted); text-decoration: line-through; background: rgba(255, 93, 108, .08); }
.mini.more { background: none; color: var(--cyan); }

.session-head .chips { margin-top: 10px; }
.facts { margin: 0; display: grid; gap: 0; }
.facts > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.facts dt svg.i { width: 16px; height: 16px; color: var(--cyan); }
.facts dd { margin: 0; }
.coach-tag { display: inline-flex; align-items: baseline; gap: 6px; margin: 0 10px 2px 0; font-weight: 600; }
.coach-tag small { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.objective { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; color: var(--text); background: rgba(255, 106, 0, .08); box-shadow: inset 3px 0 0 var(--orange); }
.exercises { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.exercises li { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; background: rgba(4, 12, 26, .45); box-shadow: inset 0 0 0 1px var(--line); }
.exercises b { display: block; font-weight: 600; }
.exercises small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.exercises .grow { flex: 1; min-width: 0; }
.ex-n { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; font: 800 16px/1 var(--display); color: var(--orange-2); background: rgba(255, 106, 0, .12); }
.ex-min { font: 800 20px/1 var(--display); color: var(--cyan); }
.ex-head, .ex-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 76px minmax(0, 1.4fr) auto; gap: 8px; align-items: center; }
.ex-head { margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ex-rows { display: grid; gap: 8px; }
.ex-tools { display: flex; gap: 4px; }
.ex-tools .btn-ghost.sm { width: 34px; padding: 0; }

.tally { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.tally div { padding: 10px 8px; text-align: center; border-radius: 12px; background: rgba(4, 12, 26, .55); box-shadow: inset 0 0 0 1px var(--line); }
.tally b { display: block; font: 800 28px/1 var(--display); }
.tally small { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tally .ok b { color: var(--green); }
.tally .warn b { color: var(--amber); }
.tally .bad b { color: var(--red); }
.tally .pending b { color: var(--orange-2); }
table.roll td { vertical-align: middle; }
table.roll .note { display: block; margin-top: 4px; color: var(--text-2); font-size: 12px; }
table.roll select { min-width: 140px; }
table.roll input[type=text] { width: 100%; min-width: 140px; }
.history summary, details.action summary { cursor: pointer; color: var(--cyan); font-weight: 600; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
details.action { margin-top: 10px; }
details.action + details.action { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
details.action summary svg.i { width: 16px; height: 16px; }
.history ol { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 8px; color: var(--text-2); font-size: 13px; }
.history small { display: block; color: var(--muted); }
.close-form { padding-top: 14px; border-top: 1px solid var(--line); }
button.danger, .btn.danger { color: #ffc2c8; box-shadow: inset 0 0 0 1px rgba(255, 93, 108, .5); }
.schedule-row { align-items: flex-start; }
.schedule-row form { align-self: center; }
.schedule-new { display: grid; }
.status-card { max-width: 640px; }
.group-notes { margin-top: 10px !important; padding: 10px 14px; border-left: 3px solid var(--cyan); background: rgba(255, 255, 255, .03); border-radius: 0 10px 10px 0; white-space: pre-line; max-width: 72ch; }

@media (max-width: 1100px) {
    .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    /* En teléfono, una lista por día: los días vacíos se encogen a un renglón. */
    .week { grid-template-columns: minmax(0, 1fr); }
    .day { min-height: 0; }
    .day.empty { flex-direction: row; align-items: center; }
    .day.empty header { border: 0; padding-bottom: 2px; }
    .day.empty .none { margin: 0 0 0 auto; }
    .month { gap: 3px; }
    .month-day { min-height: 64px; padding: 4px; }
    .mini { font-size: 0; height: 6px; padding: 0; border-radius: 3px; }
    .mini.more { display: none; }
    .cal-count { margin-left: 0; width: 100%; }
    .cal .filters select { flex: 1; min-width: 0; }
    .tally { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .facts > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .ex-head { display: none; }
    .ex-row { grid-template-columns: minmax(0, 1fr) 70px; padding: 10px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
    .ex-row input[name$=".Description"] { grid-column: 1 / -1; }
    .ex-tools { grid-column: 1 / -1; justify-content: flex-end; }
    .row .time { width: 54px; }
}

/* ───────── Revisión de cancha y dispositivos (concepto: dashboard-admin.html, «Requiere tu atención») ───────── */
.nav-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; font: 700 11px/1 var(--sans); color: #fff; background: var(--orange); box-shadow: 0 0 12px rgba(255, 106, 0, .45); }
.alert.warn { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; color: #ffe2c2; background: rgba(255, 106, 0, .1); box-shadow: inset 0 0 0 1px rgba(255, 143, 51, .45); }
.alert.warn svg.i { color: var(--orange-2); margin-top: 1px; }
.alert.warn a { font-weight: 600; white-space: nowrap; }
.home-top { margin-bottom: 18px; align-items: start; }
.home-top .today-card { margin-bottom: 0; }
.home-top > .card.mt { margin-top: 0; }

.review-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.attention-card .row small { display: block; }
#review .cal-bar .seg-links { max-width: 100%; overflow-x: auto; }
.review-case.pending { box-shadow: inset 3px 0 0 var(--orange), var(--glow); }
.rc-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.rc-head .grow { flex: 1; min-width: 0; }
.rc-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-title b { font: 700 19px/1.1 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.rc-summary { margin: 4px 0 2px; color: var(--text); }
.rc-head small { color: var(--muted); font-size: 12.5px; }
.evidence { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.ev { padding: 12px 14px; border-radius: 12px; background: rgba(4, 12, 26, .5); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.ev h3 { margin: 0 0 8px; font: 700 12px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.ev p { margin: 0 0 6px; }
.ev-note { color: var(--text-2); font-size: 13px; font-style: italic; }
.ev-facts { margin: 6px 0 0; display: grid; gap: 2px; font-size: 12.5px; }
.ev-facts > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
.ev-facts dt { color: var(--muted); }
.ev-facts dd { margin: 0; }
.ev-list { margin: 8px 0 0; padding-left: 16px; display: grid; gap: 3px; color: var(--text-2); font-size: 12.5px; }
.rc-form { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.rc-form .notice { margin: 0; font-size: 13px; }
.rc-form select { max-width: 360px; }
.rc-decision { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(34, 211, 154, .07); box-shadow: inset 3px 0 0 var(--green); }
.rc-decision.dismissed { background: rgba(255, 255, 255, .04); box-shadow: inset 3px 0 0 var(--muted); }
.rc-decision b { display: block; }
.rc-decision small { color: var(--muted); font-size: 12px; }
.rc-decision p { margin: 6px 0 0; color: var(--text-2); }
.rc-foot { margin-top: 12px; color: var(--muted); font-size: 11.5px; }

.row.device { flex-wrap: wrap; align-items: flex-start; }
.row.device .grow small { display: block; }
.row.device .chip { margin-top: 2px; }
.row.device.revoked b { color: var(--text-2); }
.device-revoked { color: #ffb3ba !important; }
details.revoke { margin: 0; }
details.revoke[open] { flex-basis: 100%; padding: 12px 14px; border-radius: 12px; background: rgba(255, 93, 108, .05); box-shadow: inset 0 0 0 1px rgba(255, 93, 108, .3); }
.revoke-warning b { display: block; margin-bottom: 6px; }
.revoke-warning ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--text-2); font-size: 13px; }

@media (max-width: 760px) {
    .rc-head { flex-wrap: wrap; }
    .rc-head .badge-ico { display: none; }
    .rc-form select { max-width: none; }
    .alert.warn { flex-direction: column; }
}

/* ───────── Configuración: academia, personas y bitácora ───────── */
/* Los campos con icono (entrada, activar, restablecer) no llevan el borde de los formularios largos. */
.field input[type=email], .field input[type=text], .field input[type=password] { height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.field input[readonly] { color: var(--text-2); }
.settings-grid { align-items: start; }
input[type=file] { color: var(--text-2); font-size: 13px; max-width: 100%; }
input[type=file]::file-selector-button { margin-right: 12px; height: 36px; padding: 0 14px; border: 0; border-radius: 10px; cursor: pointer;
    font: 600 13px var(--sans); color: var(--text); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.sidebar { overflow-y: auto; }
/* Lo que va fuera de la vista (.sr-only) se ubica respecto a la tabla y no ensancha la página. */
.table-wrap { position: relative; }
details.invite .form-grid label { align-content: start; }
.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; }
.block { display: block; margin-top: 4px; font-size: 12px; }
.av.sm { width: 34px; height: 34px; font-size: 12px; }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.login-row a { color: #4dd9ff; font-weight: 600; }
.gate-link { margin: 16px 0 0; font-size: 13px; }

details.invite > summary { font-size: 15px; }
.role-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.role-pick { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; font-weight: 500;
    background: rgba(4, 12, 26, .45); box-shadow: inset 0 0 0 1px var(--line); }
.role-pick input { margin: 3px 0 0; width: 17px; height: 17px; accent-color: var(--orange); flex: none; }
.role-pick b { display: block; color: var(--text); }
.role-pick small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.role-pick:has(input:checked) { box-shadow: inset 0 0 0 1px var(--cyan); background: rgba(63, 208, 255, .08); }
.role-checks { display: grid; gap: 6px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; align-items: start; }
.role-card { padding: 14px 16px; border-radius: 14px; background: rgba(4, 12, 26, .45); box-shadow: inset 0 0 0 1px var(--line); }
.role-card summary { cursor: pointer; list-style: none; display: grid; gap: 4px; }
.role-card summary::-webkit-details-marker { display: none; }
.role-card summary b { font: 700 17px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.role-card summary b::after { content: " +"; color: var(--cyan); }
.role-card[open] summary b::after { content: " −"; }
.role-card summary span { color: var(--text-2); font-size: 13px; }
.role-card ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 4px; color: var(--text-2); font-size: 12.5px; }

table.people td { vertical-align: top; }
table.people .who b { font-weight: 600; }
.row-actions { display: grid; gap: 8px; justify-items: start; min-width: 190px; }
.row-actions form { margin: 0; }
.row-actions details.action { margin: 0; }
.row-actions details.action + details.action { margin: 0; padding: 0; border: 0; }
.row-actions details[open] { min-width: 260px; }
.row-actions .alert { margin: 0; }
table.audit td:first-child { white-space: nowrap; color: var(--text-2); }

.color-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.color-pick { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(4, 12, 26, .45); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.color-pick input[type=color] { width: 44px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.color-pick b { display: block; color: var(--text); font-weight: 600; }
.color-pick small { color: var(--muted); font-size: 12px; }
.code-input { max-width: 140px; text-transform: uppercase; font: 800 20px/1 var(--display) !important; letter-spacing: .12em; }
.code-input[readonly] { opacity: .75; cursor: not-allowed; }

.brand-preview { display: grid; grid-template-columns: 140px minmax(0, 1fr); min-height: 150px; border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.bp-side { display: grid; place-items: center; align-content: center; gap: 8px; padding: 14px 10px; text-align: center; background: linear-gradient(180deg, rgba(6, 20, 44, .96), rgba(3, 11, 25, .98)); }
.bp-side img { width: 52px; }
.bp-side b { font: 800 15px/1.05 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.bp-crest { width: 46px; height: 52px; display: grid; place-items: center; font: 800 17px/1 var(--display); color: #fff;
    background: linear-gradient(150deg, var(--s), var(--p) 60%, #0b1b44); clip-path: polygon(50% 0, 100% 14%, 94% 70%, 50% 100%, 6% 70%, 0 14%); }
.bp-body { display: grid; align-content: center; gap: 12px; padding: 16px; background: rgba(4, 12, 26, .4); }
.bp-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; font-size: 12.5px; color: var(--text-2);
    background: linear-gradient(165deg, var(--s) 0%, var(--p) 55%, #0a1735 100%); }
.bp-av { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font: 800 14px/1 var(--display); color: #fff;
    background: linear-gradient(145deg, var(--s), var(--p)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.bp-bar { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--p), var(--s)); }
.logo-now { display: flex; align-items: center; gap: 16px; min-height: 90px; }
.logo-now img { max-width: 120px; max-height: 120px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5)); }
.logo-now .notice { margin: 0; font-size: 13px; }

@media (max-width: 760px) {
    .brand-preview { grid-template-columns: minmax(0, 1fr); }
    .row-actions { min-width: 0; }
    .row-actions details[open] { min-width: 0; }
}

/* ───────── Torneos y partidos (§6.2, §8.4, M09, M10). Piezas del concepto (concepto.css): récord,
   forma, líderes, tarjeta de partido; y las propias: marcador, línea de tiempo y alineación. ───────── */
.scoreboard .w b { color: var(--green); text-shadow: 0 0 18px rgba(34, 211, 154, .35); }
.scoreboard .d b { color: var(--text-2); text-shadow: none; }
.scoreboard .l b { color: var(--red); text-shadow: 0 0 18px rgba(255, 93, 108, .3); }
.split { display: flex; height: 30px; border-radius: 10px; overflow: hidden; font: 700 12px/30px var(--sans); text-align: center; background: rgba(255, 255, 255, .06); }
.split span { color: #04121f; white-space: nowrap; overflow: hidden; }
.split .w { background: linear-gradient(90deg, #13b985, #36e3ad); }
.split .d { background: #8ea3bd; }
.split .l { background: linear-gradient(90deg, #ff5d6c, #ff8a95); }
.form-strip { display: flex; gap: 6px; }
.form-strip i, .result-dot { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 8px; font: 800 13px/1 var(--display); font-style: normal; flex: none; }
.form-strip .w, .result-dot.w { background: rgba(34, 211, 154, .18); color: var(--green); box-shadow: inset 0 0 0 1px rgba(34, 211, 154, .4); }
.form-strip .d, .result-dot.d { background: rgba(255, 255, 255, .08); color: var(--text-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.form-strip .l, .result-dot.l { background: rgba(255, 93, 108, .16); color: var(--red); box-shadow: inset 0 0 0 1px rgba(255, 93, 108, .4); }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--b1, var(--cyan)), var(--b2, var(--cyan-2))); }
.leader { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 7px 0; color: inherit; }
.leader:hover { text-decoration: none; }
.leader .pos-n { font: 800 16px/1 var(--display); color: var(--muted); }
.leader:first-child .pos-n { color: var(--orange-2); }
.leader b { font-weight: 600; }
.leader .bar { margin-top: 6px; height: 6px; }
.leader .num { font: 800 24px/1 var(--display); }
.match-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: 18px; border-radius: 14px; background: rgba(4, 12, 26, .6); box-shadow: inset 0 0 0 1px var(--line); }
.match-card .t { text-align: center; min-width: 0; }
.match-card .t img, .match-card .t .crest-x { width: 58px; height: 64px; margin: 0 auto 8px; display: grid; place-items: center; }
.match-card .t .crest-x { font: 800 20px/1 var(--display); color: #fff; background: linear-gradient(150deg, #d9a400, #7a5200); clip-path: polygon(50% 0, 100% 14%, 94% 70%, 50% 100%, 6% 70%, 0 14%); }
.match-card .t .crest-x.ours { background: linear-gradient(150deg, var(--brand-secondary), var(--brand-primary) 60%, #0b1b44); }
.match-card .t b { display: block; font-weight: 700; overflow-wrap: anywhere; }
.match-card .vs { text-align: center; font: 800 30px/1 var(--display); color: var(--orange-2); }
.match-card .vs small { display: block; margin-top: 6px; font: 600 11.5px/1.35 var(--sans); color: var(--text-2); }
.match-card .vs .score { font-size: 46px; color: var(--text); letter-spacing: .04em; }
table.stats td, table.stats th { white-space: nowrap; }
table.stats .n { text-align: right; font-variant-numeric: tabular-nums; }
table.stats tr.friendly td { color: var(--text-2); background: rgba(255, 255, 255, .02); }
table.stats tr.total td { font-weight: 700; border-top: 1px solid var(--line-2); }
.scope-links { margin-left: auto; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.timeline li { display: grid; grid-template-columns: 54px 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 10px; }
.timeline li:nth-child(odd) { background: rgba(4, 12, 26, .35); }
.timeline .min { font: 800 17px/1 var(--display); color: var(--cyan-2); text-align: right; }
.timeline .ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font: 800 13px/1 var(--display); background: rgba(255, 255, 255, .06); }
.timeline .ico.goal { background: rgba(34, 211, 154, .16); color: var(--green); }
.timeline .ico.against { background: rgba(255, 93, 108, .14); color: var(--red); }
.timeline .ico.yellow { background: #f5c518; color: #1f1400; }
.timeline .ico.red { background: #e2283b; color: #fff; }
.timeline .ico.sub { color: var(--cyan); }
.timeline .ico.period { color: var(--orange-2); }
.timeline small { display: block; color: var(--muted); font-size: 11.5px; }
.timeline li.voided .what { text-decoration: line-through; color: var(--muted); }
.timeline li.period-row { background: rgba(255, 106, 0, .06); }
/* Cambio de posición: una línea discreta (no cambia minutos ni marcador). */
.timeline li.minor { padding-block: 4px; }
.timeline li.minor .what { font-size: 13px; color: var(--muted); }
.timeline li.minor .ico { width: 22px; height: 22px; justify-self: center; }
.timeline .ico.pos { color: var(--muted); background: transparent; }
.lineup-pitch { position: relative; aspect-ratio: 68 / 100; width: 100%; max-width: 340px; margin: 0 auto; border-radius: 12px; overflow: hidden;
    background: repeating-linear-gradient(180deg, #0f5a3a 0 10%, #0c4f33 10% 20%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.lineup-pitch svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lineup-pitch .spot { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 3px; width: 76px; text-align: center; }
.lineup-pitch .spot b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font: 800 15px/1 var(--display); color: #fff;
    background: var(--brand-primary); box-shadow: 0 0 0 2px rgba(255, 255, 255, .8); }
.lineup-pitch .spot.gk b { background: var(--orange); }
.lineup-pitch .spot small { font-size: 10.5px; line-height: 1.1; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.recorder-box { display: grid; gap: 8px; }
.sess.match-sess { background: linear-gradient(160deg, rgba(255, 106, 0, .28), rgba(40, 18, 6, .85)); box-shadow: inset 3px 0 0 var(--orange), inset 0 0 0 1px rgba(255, 143, 51, .35); }
.sess.match-sess:hover { box-shadow: inset 3px 0 0 var(--orange-2), inset 0 0 0 1px rgba(255, 143, 51, .6), 0 0 18px rgba(255, 106, 0, .15); }
.sess.match-sess .sess-time { color: var(--orange-2); }
.mini.match-mini { background: rgba(255, 106, 0, .16); }
.mini.match-mini:hover { background: rgba(255, 106, 0, .3); }
.cal-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin: -4px 0 12px; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.row .score-mini { font: 800 22px/1 var(--display); white-space: nowrap; }
.elig-bad { color: var(--orange-2); font-weight: 700; }
.shirt-input { width: 72px; }
@media (max-width: 760px) {
    .match-card { grid-template-columns: 1fr; }
    .timeline li { grid-template-columns: 44px 28px minmax(0, 1fr); }
    .timeline li > :last-child { grid-column: 3; }
}

/* ───────── Performance (§8.3) ───────── */
tr.voided td { text-decoration: line-through; text-decoration-color: rgba(255, 93, 108, .7); }
tr.voided td .chip, tr.voided td small { text-decoration: none; }
.perf-chart { width: 100%; max-width: 520px; display: block; }
.perf-chart .grid-line { stroke: rgba(255, 255, 255, .07); }
.perf-chart .line { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linejoin: round; }
.perf-chart .dot { fill: #040c1a; stroke: var(--cyan); stroke-width: 2.5; }
.perf-chart .dot.last { fill: var(--orange); stroke: var(--orange); }
.perf-chart text { font: 600 13px var(--sans); fill: var(--text); }
.perf-chart text.axis { font-weight: 400; fill: var(--muted); font-size: 12px; }
.delta { font-weight: 700; font-size: 13px; white-space: nowrap; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.flat { color: var(--muted); }
.provisional { color: var(--orange-2); }
.sess.eval-sess { background: linear-gradient(160deg, rgba(34, 211, 154, .2), rgba(6, 30, 24, .85)); box-shadow: inset 3px 0 0 var(--green), inset 0 0 0 1px rgba(34, 211, 154, .35); }
.sess.eval-sess .sess-time { color: var(--green); }
.mini.eval-mini { background: rgba(34, 211, 154, .14); }
.mini.eval-mini:hover { background: rgba(34, 211, 154, .26); }

/* ───────── Guía en pantalla: estados vacíos que enseñan, «Primeros pasos», «Nuevo partido» y rivales ───────── */
.empty-state.teach { align-items: flex-start; }
.empty-state .btn.sm { margin-top: 10px; }
.empty-state .hint { margin: 6px 0 0; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.next-step { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.next-step a { font-weight: 600; }

.getting-started { margin-bottom: 18px; box-shadow: inset 3px 0 0 var(--orange), var(--glow); }
.gs-bar { margin: -4px 0 14px; }
.gs-bar i { --b1: var(--orange); --b2: var(--cyan); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: step; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: 12px; }
.steps li .grow { flex: 1; min-width: 0; }
.steps li b { display: block; font-weight: 600; }
.steps li small { color: var(--muted); font-size: 12.5px; }
.steps li.next { background: rgba(255, 106, 0, .07); box-shadow: inset 0 0 0 1px rgba(255, 143, 51, .35); }
.steps li.done b { color: var(--text-2); }
.step-mark { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--cyan); background: rgba(63, 208, 255, .1); box-shadow: inset 0 0 0 1px var(--line); }
.steps li.done .step-mark { color: var(--green); background: rgba(34, 211, 154, .14); box-shadow: inset 0 0 0 1px rgba(34, 211, 154, .4); }
.steps li.next .step-mark { color: var(--orange-2); background: rgba(255, 106, 0, .14); }
.steps .step-mark svg.i { width: 17px; height: 17px; }
.steps li .hint { max-width: 230px; text-align: right; }
.gs-hide { display: flex; gap: 10px; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.wizard { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; padding: 0; }
.wizard li { padding: 7px 14px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: rgba(4, 12, 26, .5); box-shadow: inset 0 0 0 1px var(--line); }
.wizard li a { color: inherit; }
.wizard li.done { color: var(--text-2); }
.wizard li.on { color: #fff; background: linear-gradient(90deg, rgba(255, 106, 0, .35), rgba(63, 208, 255, .12)); box-shadow: inset 0 0 0 1px rgba(255, 143, 51, .45); }
.card.choice { display: grid; align-content: start; }
.card.choice .choice-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--cyan); font-weight: 600; font-size: 13px; }
.card.choice .choice-go svg.i { width: 16px; height: 16px; }
.alert.warn.inline-form { align-items: center; flex-wrap: wrap; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.pager-count { color: var(--text-2); }
.pager-links { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.pager-links a, .pager-links .current, .pager-links .gap { min-width: 34px; padding: 6px 10px; border-radius: 9px; text-align: center; }
.pager-links a { color: var(--cyan); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.pager-links a:hover { background: rgba(255, 255, 255, .05); }
.pager-links .current { background: var(--cyan); color: #04121f; font-weight: 700; }
.pager-links .gap { color: var(--muted); min-width: 0; padding: 6px 2px; }
.overlap-warning .grow { flex: 1; min-width: 0; }

.overlap-warning p { margin: 6px 0 0; }
.overlap-list { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.overlap-list small { display: block; color: var(--text-2); }

.alert.warn.inline-form .grow { flex: 1; min-width: 220px; }
.alert.warn.inline-form select { min-width: 200px; }

.opp-crest { width: 40px; height: 44px; flex: none; object-fit: contain; }
.opp-crest.crest-x { display: grid; place-items: center; font: 800 15px/1 var(--display); color: #fff; background: linear-gradient(150deg, #d9a400, #7a5200);
    clip-path: polygon(50% 0, 100% 14%, 94% 70%, 50% 100%, 6% 70%, 0 14%); }
.match-card .t img { object-fit: contain; }
.opp-row { align-items: flex-start; }
.opp-row > .btn { align-self: center; }
.day header .day-add { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--orange-2); opacity: .75; }
.day header em + .day-add { margin-left: 8px; }
.day header .day-add:hover { opacity: 1; text-decoration: none; }
@media (max-width: 760px) {
    .steps li { flex-wrap: wrap; }
    .steps li .hint { max-width: none; text-align: left; }
}
.span-all { grid-column: 1 / -1; }
.mb { margin-bottom: 16px; }

/* ───────── Finanzas: cobranza, estado de cuenta, recibo (M14) ───────── */
.chip.amber { color: var(--amber); background: rgba(255, 182, 46, .12); box-shadow: inset 0 0 0 1px rgba(255, 182, 46, .35); }
.late { color: var(--red); }
.finance-tabs { display: flex; width: fit-content; max-width: 100%; overflow-x: auto; }
.head-actions .btn svg.i { width: 17px; height: 17px; }
.inline-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.manual-notice { display: flex; align-items: center; gap: 8px; margin: 18px 2px 0; }
.manual-notice svg.i { width: 16px; height: 16px; color: var(--muted); }
.csv-link { margin: 0 0 8px; font-size: 12.5px; }
.csv-link a, .result-count a[download] { display: inline-flex; align-items: center; gap: 5px; }
.csv-link svg.i, .result-count svg.i { width: 15px; height: 15px; }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi {
    position: relative; overflow: hidden; display: block; padding: 14px 16px 13px; border-radius: 14px; color: inherit;
    background: linear-gradient(160deg, rgba(13, 38, 74, .8), rgba(6, 20, 44, .9)); box-shadow: inset 0 0 0 1px var(--line);
}
.kpi::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--cyan), transparent); opacity: .7; }
a.kpi:hover { box-shadow: inset 0 0 0 1px var(--line-2), 0 0 24px rgba(63, 208, 255, .12); text-decoration: none; }
.kpi small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpi b { display: block; margin: 6px 0 3px; font: 800 30px/1 var(--display); letter-spacing: .01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi span { font-size: 12px; color: var(--text-2); }
.kpi.bad b { color: var(--red); text-shadow: 0 0 18px rgba(255, 93, 108, .3); }
.kpi.bad::after { background: linear-gradient(90deg, var(--red), transparent); }
.kpi.ok b { color: var(--green); }
.kpi.ok::after { background: linear-gradient(90deg, var(--green), transparent); }

.aging { display: grid; gap: 6px; }
.aging-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 120px 80px; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: inherit; }
.aging-row:hover { background: rgba(63, 208, 255, .05); text-decoration: none; }
.aging-row .lbl { font-weight: 600; font-size: 13px; }
.aging-row b { text-align: right; }
.aging-row small { color: var(--muted); font-size: 12px; text-align: right; }
.aging-row .bar { height: 10px; }
.aging-row.cyan .bar i { --b1: var(--cyan); --b2: var(--cyan-2); }
.aging-row.amber .bar i { --b1: #e0a020; --b2: var(--amber); }
.aging-row.orange .bar i { --b1: var(--orange); --b2: var(--orange-2); }
.aging-row.red .bar i { --b1: #d63447; --b2: var(--red); }

.money-table th.n, .money-table td.n, th.n, td.n { text-align: right; }
.money-table td.n b { font-weight: 700; }
.money-table tr.total td { font-weight: 700; border-top: 1px solid var(--line-2); }
.row-end { text-align: right; white-space: nowrap; width: 1%; }
.row-end .btn svg.i { width: 15px; height: 15px; }
details.row-menu { position: relative; margin: 0; display: inline-block; text-align: left; }
details.row-menu summary { list-style: none; padding: 6px 8px; border-radius: 8px; }
details.row-menu summary::-webkit-details-marker { display: none; }
details.row-menu[open] summary { background: rgba(63, 208, 255, .1); }
.row-menu-body {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: min(320px, 80vw); display: grid; gap: 14px; padding: 14px;
    border-radius: 14px; background: #071631; box-shadow: 0 0 0 1px var(--line-2), 0 18px 40px rgba(0, 0, 0, .55); white-space: normal;
}
.stack-form { display: grid; gap: 8px; }
.stack-form + .stack-form { padding-top: 12px; border-top: 1px solid var(--line); }
td form.stack-form { display: grid; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.row.fee-row { align-items: flex-start; }
.row.fee-row.inactive { opacity: .62; }
.fee-amount { font: 800 22px/1 var(--display); white-space: nowrap; padding-top: 4px; }
.scholarship { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.scholarship:first-of-type { border-top: 0; padding-top: 0; }
.scholarship .grow { flex: 1; min-width: 220px; }
.scholarship details.action { flex-basis: 100%; margin-top: 0; }
.scholarship.current b { color: var(--green); }
.scholarship + details.action { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
a.row-link.voided-row b { text-decoration: line-through; text-decoration-color: rgba(255, 93, 108, .7); }
.finance-link { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.finance-link b { display: block; }
.finance-link small { color: var(--muted); font-size: 12.5px; }
.finance-link:hover { text-decoration: none; }
.apply-input { width: 120px; text-align: right; }
.apply-input[readonly] { opacity: .7; border-style: dashed; }

/* Recibo: papel sobre la noche de estadio; al imprimir, solo el papel. */
.receipt-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.receipt {
    position: relative; overflow: hidden; max-width: 760px; padding: 34px 38px 28px; border-radius: 6px;
    color: #13203a; background: #fbfaf6; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); font-size: 14px;
}
.receipt::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--orange)); }
.receipt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid #13203a; }
.receipt-brand { display: flex; align-items: center; gap: 14px; }
.receipt-brand img { width: 64px; height: auto; }
.receipt-brand b { display: block; font: 800 26px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; color: #0b1b44; }
.receipt-brand small { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #6b7a93; }
.receipt-folio { text-align: right; }
.receipt-folio small { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #6b7a93; }
.receipt-folio b { display: block; margin: 2px 0; font: 800 24px/1.1 var(--display); color: #c24d00; letter-spacing: .03em; }
.receipt-lead { margin: 22px 0 4px; color: #3c4a63; }
.receipt-amount { margin: 0 0 18px; }
.receipt-amount b { display: block; font: 800 46px/1.05 var(--display); color: #0b1b44; }
.receipt-amount span { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: #3c4a63; }
.receipt-facts { margin: 0 0 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.receipt-facts dt { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6b7a93; }
.receipt-facts dd { margin: 2px 0 0; }
.receipt-lines { width: 100%; border-collapse: collapse; color: #13203a; }
.receipt-lines th { color: #6b7a93; border-bottom: 1px solid #c8cfdb; padding: 8px 4px; }
.receipt-lines td { border-bottom: 1px dashed #d6dbe4; padding: 9px 4px; }
.receipt-lines tbody tr:hover td { background: transparent; }
.receipt-lines tfoot td { font-weight: 800; border-top: 2px solid #13203a; border-bottom: 0; padding-top: 10px; }
.receipt-lines .n { text-align: right; }
.receipt-lines small { color: #6b7a93; }
.receipt-balance, .receipt-void { margin: 16px 0 0; color: #3c4a63; }
.receipt-void { color: #b3261e; font-weight: 600; }
.receipt-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 36px; }
.receipt-foot p { max-width: 380px; margin: 0; font-size: 11px; color: #6b7a93; }
.receipt-sign { width: 240px; text-align: center; }
.receipt-sign span { display: block; height: 1px; background: #13203a; margin-bottom: 6px; }
.receipt-sign small { font-size: 11px; color: #6b7a93; }
.receipt-stamp {
    position: absolute; top: 44%; left: 50%; transform: translate(-50%, -50%) rotate(-16deg); padding: 8px 28px; border: 5px solid rgba(179, 38, 30, .55);
    border-radius: 12px; font: 800 72px/1 var(--display); letter-spacing: .12em; color: rgba(179, 38, 30, .5); pointer-events: none;
}
.receipt.is-voided .receipt-amount b { text-decoration: line-through; text-decoration-color: rgba(179, 38, 30, .7); }

@media (max-width: 1280px) {
    .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .kpis, .kpis.five, .kpis.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi b { font-size: 24px; }
    .aging-row { grid-template-columns: 96px minmax(0, 1fr) 96px; }
    .aging-row small { display: none; }
    .form-grid.two { grid-template-columns: minmax(0, 1fr); }
    .receipt { padding: 24px 18px; }
    .receipt-head, .receipt-foot { flex-direction: column; align-items: flex-start; }
    .receipt-folio { text-align: left; }
    .receipt-facts { grid-template-columns: minmax(0, 1fr); }
}
@media print {
    html, body { background: #fff !important; }
    .sidebar, .menu-toggle, .no-print, .crumbs, .alert, details.action { display: none !important; }
    .shell { display: block; }
    .content { padding: 0; }
    .receipt { max-width: none; box-shadow: none; border-radius: 0; padding: 0; }
    .receipt::before { display: none; }
}
.segment-table th, .segment-table td { padding: 10px 7px; }
.segment-table th { letter-spacing: .06em; }
.card-h .cal-nav { flex-wrap: nowrap; }

/* Reloj de prueba (solo Development): franja fija arriba, imposible de confundir con la hora real. */
.dev-clock {
  position: sticky; top: 0; z-index: 1000;
  padding: 6px 16px; text-align: center;
  background: repeating-linear-gradient(135deg, #ffcc00 0 14px, #ffb300 14px 28px);
  color: #1a1a1a; font-size: 13px; font-weight: 700; letter-spacing: .02em;
  border-bottom: 2px solid #1a1a1a;
}

/* Buzón local de desarrollo (/dev/correos). */
.dev-mailbox { max-width: 1200px; margin: 0 auto; padding: 28px 20px; }
.dev-mailbox code { color: var(--cyan-2); word-break: break-all; }
.dev-mailbox-grid { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 18px; margin-top: 16px; }
.dev-mail-list { display: flex; flex-direction: column; gap: 6px; }
.dev-mail { display: block; padding: 10px 12px; border-radius: 12px; background: var(--panel); box-shadow: var(--glow); color: var(--text); text-decoration: none; }
.dev-mail small { display: block; color: var(--muted); margin-top: 2px; }
.dev-mail.active { box-shadow: var(--glow-hover); border-left: 3px solid var(--orange); }
.dev-mail-view { min-width: 0; }
.dev-mail-head { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 12px; }
.dev-mail-head dt { color: var(--muted); }
.dev-mail-head dd { margin: 0; }
.dev-mail-links { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; word-break: break-all; }
.dev-mail-links a { color: var(--cyan); }
.dev-mail-frame { width: 100%; height: 640px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; }
.dev-mail-text { white-space: pre-wrap; color: var(--text-2); }
@media (max-width: 820px) { .dev-mailbox-grid { grid-template-columns: 1fr; } }
