
.history-page-shell{
  width:min(1440px,calc(100% - 28px));
  margin:26px auto 64px
}
.history-hero{margin-bottom:18px}
.history-title{
  font-size:28px;
  margin:0 0 4px;
  color:#0b1f3a;
  font-weight:900
}
.history-subtitle{margin:0;color:#687589}

.history-controls{
  margin-bottom:18px;
  border:1px solid #dce4ed;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 28px rgba(15,23,42,.06)
}
.history-filters{
  display:grid;
  grid-template-columns:repeat(3,minmax(180px,1fr));
  gap:12px
}
.history-filters label{display:grid;gap:6px}
.history-filters span{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.05em;
  font-weight:900;
  color:#687589
}
.history-filters select{
  width:100%;
  border:1px solid #d9e1ea;
  border-radius:12px;
  background:#fff;
  padding:10px 12px;
  color:#172033;
  font-weight:800
}
.history-meta{
  margin:8px 0 0;
  color:#6b7788;
  font-size:12px
}

.history-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:0 0 18px
}
.history-card{
  background:#fff;
  border:1px solid #dde4ed;
  border-radius:16px;
  padding:16px;
  box-shadow:0 6px 20px rgba(15,23,42,.05)
}
.history-card span{
  display:block;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#788596;
  font-weight:900
}
.history-card strong{
  display:block;
  margin-top:4px;
  font-size:19px;
  color:#0b1f3a
}
.history-card div{
  margin-top:3px;
  color:#174a7e;
  font-weight:900
}

.history-table-wrap{
  overflow:auto;
  border:1px solid #dde4ed;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 28px rgba(15,23,42,.07)
}
.history-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  white-space:nowrap;
  font-size:13px
}
.history-table th,
.history-table td{
  padding:11px 12px;
  border-bottom:1px solid #edf0f4;
  text-align:right;
  vertical-align:middle
}
.history-table th{
  background:#eef3f8;
  color:#526071;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:900
}
.history-table th:first-child{
  background:#0b1f3a;
  color:#fff
}
.history-table th:first-child,
.history-table td:first-child{text-align:left}
.history-table tbody tr:hover td{background:#f8fbff}

.history-team-link{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:#172033;
  text-decoration:none;
  font-weight:850
}
.history-team-link img{
  width:34px;
  height:34px;
  object-fit:contain
}

.history-sort{
  border:0;
  background:none;
  color:inherit;
  font:inherit;
  font-weight:900;
  cursor:pointer;
  padding:0;
  white-space:nowrap
}
.history-sort:hover,
.history-sort.is-active{color:#174a7e}
.history-table th:first-child .history-sort{
  color:#fff
}

/* Head-to-Head: tabla compacta, no ocupa todo el ancho */
.head-to-head-page .history-table-wrap{
  width:max-content;
  max-width:100%
}
.head-to-head-page .history-table{
  width:auto;
  min-width:560px
}
.head-to-head-page .history-table th,
.head-to-head-page .history-table td{
  padding:10px 14px
}
.head-to-head-page .history-table th:first-child,
.head-to-head-page .history-table td:first-child{
  min-width:210px;
  max-width:260px
}
.head-to-head-page .history-table th:not(:first-child),
.head-to-head-page .history-table td:not(:first-child){
  min-width:72px;
  max-width:92px
}

/* Team Performance */
.team-performance-page .history-table th:nth-child(2),
.team-performance-page .history-table td:nth-child(2){
  text-align:left;
  min-width:210px
}
.team-performance-page .history-table th:first-child,
.team-performance-page .history-table td:first-child{
  width:46px;
  min-width:46px;
  max-width:46px;
  text-align:center
}
.team-performance-page .history-table th:nth-child(2){
  background:#0b1f3a;
  color:#fff
}
.team-performance-page .history-table th:nth-child(2) .history-sort{
  color:#fff
}

@media(max-width:850px){
  .history-filters{grid-template-columns:1fr 1fr}
  .history-summary-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
  .history-page-shell{
    width:calc(100% - 16px);
    margin-top:10px
  }
  .history-filters{grid-template-columns:1fr}
  .history-table th,.history-table td{padding:10px 9px}
  .head-to-head-page .history-table{
    min-width:500px
  }
  .head-to-head-page .history-table th:first-child,
  .head-to-head-page .history-table td:first-child{
    min-width:175px;
    max-width:205px
  }
}
