/* LISS · Gestor: menú lateral en computadora, cajón + barra inferior en celular. */
.layout { display: block; }
.sidebar { position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: 290px; max-width: 86vw; background: var(--card); border-right: 1px solid var(--line);
  overflow-y: auto; padding: calc(70px + env(safe-area-inset-top)) 10px 90px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 8px 0 30px rgba(0,0,0,.15); }
body.menu-open .sidebar { transform: none; }
body.menu-open::after { content: ''; position: fixed; inset: 0; background: rgba(8,20,30,.45); z-index: 50; }
.side-user { display: flex; gap: 10px; align-items: center; padding: 8px 6px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.side-user .who { min-width: 0; } .side-user .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .side-user .who span { font-size: .82rem; color: var(--muted); }
.side-group { margin: 6px 0; }
.side-group > button { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 40px; border: 0; background: transparent; color: var(--muted);
  font: 700 .78rem var(--body); text-transform: uppercase; letter-spacing: .06em; padding: 0 8px; cursor: pointer; }
.side-group a { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.side-group a:hover { background: var(--soft); }
.side-group a[aria-current="page"] { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .side-group a[aria-current="page"] { background: var(--mint); color: var(--navy); }
.side-group a .badge { margin-left: auto; background: var(--orange); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 8px; }
.side-group.collapsed .links { display: none; }
@media (min-width: 1000px) {
  .gestor .menu-btn { display: none; }
  .layout { display: grid; grid-template-columns: 270px 1fr; }
  .sidebar { position: sticky; top: 63px; height: calc(100vh - 63px); transform: none; box-shadow: none; padding-top: 12px; width: auto; max-width: none; z-index: 1; }
  body.menu-open::after { display: none; }
  .gestor main { padding-bottom: 40px; max-width: 1100px; width: 100%; }
  .g-nav { display: none !important; }
}
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.toolbar .btn { flex: 0 1 auto; }
@media (max-width: 560px) { .toolbar .btn { flex: 1 1 140px; } }
.mini { font-size: .82rem; color: var(--muted); }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.dtable { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dtable th, .dtable td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.dtable th { background: var(--soft); font-size: .82rem; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; }
.dtable th[aria-sort="ascending"]::after { content: ' ▲'; } .dtable th[aria-sort="descending"]::after { content: ' ▼'; }
.dtable td.num-c, .dtable th.num-c { text-align: right; font-variant-numeric: tabular-nums; }
/* En celular las tablas se convierten en tarjetas */
@media (max-width: 720px) {
  .dtable, .dtable tbody, .dtable tr, .dtable td { display: block; width: 100%; }
  .dtable thead { display: none; }
  .dtable { border: 0; background: transparent; }
  .dtable tr { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; padding: 6px 4px; }
  .dtable td { border: 0; padding: 4px 10px; display: flex; justify-content: space-between; gap: 10px; text-align: right; }
  .dtable td::before { content: attr(data-l); font-weight: 700; color: var(--muted); text-align: left; font-size: .85rem; }
  .dtable td.num-c { text-align: right; }
  .dtable td.actions { justify-content: flex-end; }
  .dtable td.actions::before { content: none; }
}
.perm-grid { display: grid; gap: 8px; }
.perm-row { display: grid; grid-template-columns: 1fr; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
@media (min-width: 560px) { .perm-row { grid-template-columns: 1fr 260px; } }
.perm-row .seg { margin: 0; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 92%; padding: 10px 14px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); }
.bubble.me { align-self: flex-end; background: var(--navy); color: #fff; border-color: var(--navy); }
.conflict { border-left: 5px solid var(--bad); }
.preview-list { max-height: 50vh; overflow-y: auto; }
.status-ok { color: var(--ok); font-weight: 700; } .status-bad { color: var(--bad); font-weight: 700; }
.login-demo .btn { justify-content: flex-start; }
.copy-box { font-family: ui-monospace, monospace; font-size: .85rem; background: var(--soft); border: 1px dashed var(--line); border-radius: 10px; padding: 10px; word-break: break-all; }
.g-nav { z-index: 45; }

/* Gestor: página web normal (sin barra inferior en celular) */
.g-nav { display: none !important; }
.gestor main { padding-bottom: 40px; }
.side-group a .ico-svg { width: 18px; height: 18px; color: var(--muted); }
.side-group a[aria-current="page"] .ico-svg { color: inherit; }
.side-group > button .ico-svg { width: 14px; height: 14px; }
.side-group a { border-radius: 8px; font-weight: 500; }
.avatar { background: var(--navy); }
.sidebar { background: #fbfbfa; }

/* ---------- Pantalla de acceso (pantalla completa) ---------- */
body.auth .app-header, body.auth #demo { display: none; }
body.auth .layout { display: block; }
body.auth main { padding: 0 !important; max-width: none; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: #fff; }
@media (min-width: 960px) { .auth-wrap { grid-template-columns: minmax(420px, 1.05fr) 1fr; } }
.auth-side { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.auth-side::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 0 48%, rgba(159,217,189,.07) 48% 57%, transparent 57% 61%, rgba(159,217,189,.05) 61% 69%, transparent 69%),
              radial-gradient(800px 500px at 90% 10%, rgba(30,106,76,.35), transparent 60%); }
.auth-side-in { position: relative; height: 100%; display: flex; flex-direction: column; gap: 28px; padding: 28px 24px 32px; }
@media (min-width: 960px) { .auth-side-in { padding: 44px 56px; justify-content: space-between; } }
.auth-brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.auth-brand img { width: 40px; height: 64px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px; }
.auth-brand strong { display: block; font: 700 1.6rem var(--head); letter-spacing: .14em; }
.auth-brand small { color: #a8b6c3; font-size: .8rem; }
.auth-copy h1 { font: 800 clamp(2.4rem, 6vw, 4.4rem)/.95 var(--head); text-transform: uppercase; margin: 0 0 18px; }
.auth-copy h1 em { color: var(--mint); font-style: italic; }
.auth-copy p { color: #c3ced8; font-size: 1.05rem; max-width: 460px; }
.auth-side .eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 .74rem var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--mint); margin-bottom: 16px; }
.auth-side .eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.auth-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.auth-points li { display: flex; gap: 14px; align-items: center; color: #dbe3ea; }
.auth-points .ico-svg { width: 22px; height: 22px; color: var(--mint); }
.auth-foot { color: #7f91a1; font-size: .78rem; letter-spacing: .04em; margin: 0; }
@media (max-width: 959px) { .auth-points, .auth-foot, .auth-copy p { display: none; } .auth-copy h1 { font-size: 2.4rem; margin: 0; } }
.auth-main { display: flex; flex-direction: column; padding: 20px 24px 40px; }
@media (min-width: 960px) { .auth-main { padding: 36px 64px; } }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-top a { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); text-decoration: none; font: 600 .78rem var(--body); letter-spacing: .1em; text-transform: uppercase; }
.lang-mini { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lang-mini button { border: 0; background: #fff; min-height: 38px; min-width: 44px; font: 600 .78rem var(--body); letter-spacing: .08em; color: var(--muted); cursor: pointer; }
.lang-mini button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.auth-card { width: 100%; max-width: 460px; margin: auto; }
@media (min-width: 960px) { .auth-card { margin: auto 0 auto 0; } }
.auth-card h2 { font: 800 2.3rem/1 var(--head); text-transform: uppercase; margin: 0 0 8px; }
.auth-card > .muted { margin-bottom: 26px; }
.auth-card .form { gap: 18px; }
.auth-card input { min-height: 54px; font-size: 1rem; background: #fff; }
.auth-card .btn.big { min-height: 56px; }
.auth-links { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 18px; color: var(--muted); flex-wrap: wrap; }
.linkish { background: none; border: 0; color: var(--navy); font: 600 .92rem var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.auth-demo { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.col-label { display: block; font: 600 .72rem var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.demo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.demo-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; min-height: 84px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft);
  font: 600 .82rem var(--body); color: var(--text); cursor: pointer; text-align: center; }
.demo-btn:hover { border-color: var(--navy); background: #fff; }
.demo-btn .ico-svg { width: 22px; height: 22px; color: var(--green); }
.auth-ref { margin-top: 26px; font-size: .86rem; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; }
.auth-demo-note { position: fixed; bottom: 0; left: 0; right: 0; background: #f3efe4; color: #6a5a32; font-size: .8rem; text-align: center; padding: 6px 12px; border-top: 1px solid #e6dcc3; }
body.menu-open .app-header { z-index: 70; }
.rf-card { padding: 6px 14px; }
.rf-row { display: grid; grid-template-columns: 1fr 70px 90px 44px; align-items: center; gap: 8px; min-height: 52px; border-bottom: 1px solid var(--line); }
.rf-row:last-child { border-bottom: 0; }
.rf-row > span:not(:first-child) { text-align: center; }
.rf-row.rf-head { min-height: 40px; font: 600 .7rem var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rf-row.fixed { color: var(--muted); }
.rf-row.fixed .ico-svg { color: #9aa6b0; }
.rf-sw { display: flex; justify-content: center; }
.rf-sw input { width: 24px; height: 24px; min-height: 0; accent-color: var(--green); cursor: pointer; }
.rf-edit{min-width:32px;min-height:32px;font-size:.9rem;vertical-align:middle;color:var(--muted)}
.gestor main > .strip { border-radius: 10px; margin-bottom: 14px; }
.layout > main { min-width: 0; }
.auth-brand img { background: transparent; padding: 0; width: 44px; height: 68px; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.auth-dev { display: inline-flex; align-items: center; gap: 10px; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; }
.auth-dev img { height: 28px; width: auto; opacity: .85; }
@media (max-width: 959px) { .auth-foot { display: flex; margin-top: 4px; } .auth-dev img { height: 22px; } }

/* ---------- Atletas: listado y ficha ---------- */
.atl-kpis .kpi.warn b { color: #b23c17; }
.atl-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.atl-cats .chip { cursor: pointer; font-size: .8rem; padding: 5px 12px; }
.atl-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; align-items: end; }
.atl-filters .field { margin: 0; }
.atl-name { font-weight: 700; text-align: left; }
.atl-team { gap: 8px; align-items: center; flex-wrap: nowrap; }
.atl-team .crest { width: 26px; height: 26px; flex: none; }
.profile-head { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 14px; color: #fff;
  background: linear-gradient(120deg, var(--navy, #0c1a2b) 0%, var(--navy, #0c1a2b) 55%, color-mix(in srgb, var(--c) 70%, #0c1a2b) 100%); flex-wrap: wrap; }
.profile-head h2 { margin: 0; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .02em; color: #fff; }
.profile-head p { margin: 2px 0 0; color: #c9d6e0; }
.profile-head .profile-meta { font-size: .85rem; color: #9fb2c2; }
.profile-av { position: relative; width: 84px; height: 84px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 0 0 4px rgba(255,255,255,.15); }
.profile-av .crest { width: 62px; height: 62px; }
.profile-ini { position: absolute; right: -6px; bottom: -4px; background: #9fd9bd; color: #0c1a2b; font-weight: 800; font-size: .78rem; border-radius: 999px; padding: 3px 7px; border: 2px solid var(--navy, #0c1a2b); }
.profile-num { font: 800 1.05rem/1 "Barlow Condensed", Inter, sans-serif; color: #9fd9bd; letter-spacing: .06em; }
.profile-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 14px 0; }
.profile-stats div { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px; text-align: center; }
.profile-stats b { display: block; font: 800 1.6rem/1 "Barlow Condensed", Inter, sans-serif; color: var(--navy, #0c1a2b); }
.profile-stats span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.profile-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.profile-info div { border-bottom: 1px solid var(--line); padding: 6px 0; }
.profile-info span { display: block; font-size: .75rem; color: var(--muted); }
.atl-date { min-width: 74px; }
.atl-ev { display: inline-flex; gap: 6px; align-items: center; }
.atl-ev small { font-size: .7rem; color: var(--muted); margin-left: 2px; }
.atl-ev svg { width: 16px; height: 16px; }
@media (max-width: 640px) { .profile-stats { grid-template-columns: repeat(3, 1fr); } .profile-head h2 { font-size: 1.2rem; } }
.atl-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.atl-kpis .kpi { padding: 12px 14px; min-height: 0; }
.atl-kpis .kpi b { font-size: 1.7rem; }
.atl-filters #aQ { min-width: 0; }
.atl-filters .field:first-child { grid-column: span 2; }
@media (max-width: 700px) {
  .atl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .atl-kpis .kpi { padding: 10px; } .atl-kpis .kpi b { font-size: 1.35rem; } .atl-kpis .kpi span { font-size: .72rem; }
  .atl-filters { grid-template-columns: 1fr 1fr; }
}
