
:root{
  --rc-blue:#123766;
  --rc-ink:#182235;
  --rc-muted:#6d7889;
  --rc-line:#dfe5ed;
  --rc-bg:#f4f6f9;
  --rc-card:#fff;
}
*{box-sizing:border-box}
body{margin:0;background:var(--rc-bg);color:var(--rc-ink);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}
.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}

.roster-changes-shell{width:min(1540px,calc(100% - 28px));margin:16px auto 46px}

/* Introducción manual: deliberadamente compacta */
.roster-changes-intro{
  margin-bottom:12px;
  padding:16px 18px;
  background:#fff;
  border:1px solid var(--rc-line);
  border-radius:14px;
  box-shadow:0 4px 16px rgba(15,23,42,.04);
  color:#3d4a5f;
  font-size:.9rem;
  line-height:1.55;
  overflow:hidden;
}
.roster-changes-intro h1,
.roster-changes-intro h2,
.roster-changes-intro h3{
  margin:0 0 10px;
  color:#29476f;
  font-size:1.02rem !important;
  line-height:1.2;
  letter-spacing:.01em;
}
.roster-changes-intro p{margin:0 0 9px}
.roster-changes-intro p:last-child{margin-bottom:0}
.roster-changes-intro img{
  max-width:240px !important;
  max-height:300px !important;
  width:auto !important;
  height:auto !important;
  object-fit:contain;
}
/* Si el HTML manual usa una imagen a la izquierda, compactarla sin obligar estructura */
.roster-changes-intro table{width:100%;border-collapse:collapse}
.roster-changes-intro td{vertical-align:top;padding:0 12px 0 0}
.roster-changes-intro td:first-child{width:250px}
.roster-changes-intro td:last-child{padding-right:0}
.roster-changes-intro .intro-grid{
  display:grid;
  grid-template-columns:minmax(180px,240px) 1fr;
  gap:20px;
  align-items:start;
}
.roster-changes-intro .intro-copy{min-width:0}

.roster-summary{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,220px));
  gap:10px;
  margin-bottom:12px;
}
.summary-card{
  background:#fff;
  border:1px solid var(--rc-line);
  border-radius:12px;
  padding:12px 15px;
  box-shadow:0 4px 14px rgba(15,23,42,.04);
}
.summary-card span{
  display:block;
  margin-bottom:4px;
  font-size:.67rem;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--rc-muted);
  font-weight:850;
}
.summary-card strong{
  display:block;
  color:var(--rc-blue);
  font-size:1.35rem;
  line-height:1;
}

.roster-toolbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:10px;
  padding:11px 13px;
  background:#fff;
  border:1px solid var(--rc-line);
  border-radius:13px;
  box-shadow:0 4px 16px rgba(15,23,42,.045);
}
.roster-filters{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
.roster-filters label{
  display:grid;
  gap:4px;
  min-width:185px;
  color:var(--rc-muted);
  font-size:.67rem;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.roster-filters select{
  min-height:37px;
  padding:6px 32px 6px 9px;
  border:1px solid #ccd6e2;
  border-radius:8px;
  background:#fff;
  color:#26344a;
  font:inherit;
  font-size:.82rem;
  font-weight:750;
  text-transform:none;
  letter-spacing:0;
}
.balance-legend{display:flex;align-items:center;justify-content:flex-end;gap:4px;flex-wrap:wrap}
.legend-item{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 6px;
  border:1px solid #dbe2eb;
  border-radius:7px;
  background:#f8fafc;
  color:#56657a;
  font-size:.64rem;
  font-weight:750;
  white-space:nowrap;
}
.legend-grade{font-weight:900}

.roster-status{margin:8px 3px;color:var(--rc-muted);font-size:.76rem}
.roster-status.is-error{color:#a12828;font-weight:750}

.roster-table-card{
  overflow:hidden;
  background:#fff;
  border:1px solid var(--rc-line);
  border-radius:14px;
  box-shadow:0 6px 22px rgba(15,23,42,.05);
}
.roster-table-wrap{overflow:auto}
.roster-table{
  width:100%;
  min-width:1130px;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  font-size:.8rem;
}
.roster-table th{
  position:sticky;
  top:0;
  z-index:3;
  padding:11px 13px;
  background:#0b1f3a;
  color:#fff;
  text-align:left;
  font-size:.66rem;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.roster-table th.team-col{width:225px}
.roster-table th.balance-col{width:92px;text-align:center}
.roster-table th:nth-child(2){width:215px}
.roster-table th:nth-child(3){width:235px}
.roster-table th:nth-child(4){width:300px}
.roster-table td{
  padding:11px 13px;
  border-bottom:1px solid #edf0f4;
  vertical-align:top;
  color:#334155;
  background:#fff;
}
.roster-table tbody tr:last-child td{border-bottom:0}
.roster-table tbody tr.team-row:hover td{background:#fbfcfe}

.group-row td{
  padding:8px 13px;
  background:#edf3fa !important;
  color:#29476f;
  border-bottom:1px solid #dbe5f0;
  font-size:.7rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.055em;
}
.group-row .group-division{
  margin-left:8px;
  color:#75849a;
  font-weight:800;
}

.team-cell{display:flex;align-items:center;gap:10px}
.team-cell img{
  width:42px;
  height:42px;
  object-fit:contain;
  flex:0 0 42px;
}
.team-cell a{
  color:var(--rc-ink);
  text-decoration:none;
  font-weight:850;
  line-height:1.2;
}
.team-cell a:hover{text-decoration:underline}
.team-cell small{
  display:block;
  margin-top:3px;
  color:#8792a2;
  font-size:.66rem;
  font-weight:700;
}

.change-list,.lineup-list{list-style:none;padding:0;margin:0}
.change-list li,.lineup-list li{padding:2px 0;line-height:1.3}
.change-list li::before{display:inline-block;width:15px;font-weight:900}
.change-list--arrivals li::before{content:"+";color:#1b7f4b}
.change-list--departures li::before{content:"−";color:#b23a3a}
.change-list a,.lineup-list a{color:#274f84;text-decoration:none;font-weight:750}
.change-list a:hover,.lineup-list a:hover{text-decoration:underline}
.empty-list{color:#9aa4b2;font-style:italic}
.lineup-list strong{
  display:inline-block;
  width:29px;
  color:#7b8798;
  font-size:.68rem;
}

.balance-box{display:flex;align-items:center;justify-content:center}
.balance-grade{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:11px;
  color:#fff;
  font-size:1.32rem;
  font-weight:950;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.08);
}
.grade-A{background:#177245}
.grade-B{background:#3d8b55}
.grade-C{background:#77a94d}
.grade-D{background:#788596}
.grade-E{background:#c8942e}
.grade-F{background:#ca6a35}
.grade-G{background:#b64343}

.roster-empty{padding:38px 20px;text-align:center;color:#68778b;background:#fff}

@media(max-width:980px){
  .roster-toolbar{align-items:flex-start;flex-direction:column}
  .balance-legend{justify-content:flex-start}
}
@media(max-width:760px){
  .roster-changes-shell{width:min(100% - 16px,1540px);margin-top:8px}
  .roster-changes-intro{font-size:.84rem;padding:13px}
  .roster-changes-intro .intro-grid{grid-template-columns:1fr}
  .roster-changes-intro img{max-width:180px !important;max-height:220px !important;margin:0 auto 10px;display:block}
  .roster-changes-intro table,.roster-changes-intro tbody,.roster-changes-intro tr,.roster-changes-intro td{display:block;width:100%!important}
  .roster-summary{grid-template-columns:1fr 1fr}
  .roster-toolbar{padding:10px}
  .roster-filters{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .roster-filters label{min-width:0}
  .balance-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  .legend-item{white-space:normal}
}
