/* v224 — closes the remaining legacy light islands inside product modules. */
#app-shell{
  --module-bg:#0d1a23;
  --module-bg-2:#101f29;
  --module-bg-3:#09151d;
  --module-line:#293c48;
  --module-text:#f4f8fa;
  --module-muted:#8ea1ad;
}

/* Readiness / performance */
#app-shell #tab-readiness .fr-card,
#app-shell #tab-readiness .fr-chart,
#app-shell #tab-readiness .fr-table-wrap{
  color:var(--module-text)!important;
  background:var(--module-bg)!important;
  border:1px solid var(--module-line)!important;
  border-radius:16px!important;
  box-shadow:0 16px 42px rgba(0,0,0,.2)!important;
}
#app-shell #tab-readiness .fr-card{padding:20px!important}
#app-shell #tab-readiness .fr-select{color:#edf3f6!important;background:#09161e!important;border:1px solid #304550!important}
#app-shell #tab-readiness .fr-card-title{color:#fff!important;border-color:#3d5260!important}
#app-shell #tab-readiness .fr-card-sub{color:var(--module-muted)!important}
#app-shell #tab-readiness .fr-chart{min-height:310px!important;background:var(--module-bg-3)!important;box-shadow:none!important}
#app-shell #tab-readiness .fr-legend{gap:8px!important}
#app-shell #tab-readiness .fr-legend-item{color:#aebec7!important;background:var(--module-bg-2)!important;border:1px solid #2c404d!important;border-radius:10px!important}
#app-shell #tab-readiness .fr-legend-item strong{color:#fff!important}
#app-shell #tab-readiness .fr-table{background:transparent!important}
#app-shell #tab-readiness #fr-signal>*,#app-shell #tab-readiness #fr-events>*{color:#b8c7cf!important;background:var(--module-bg-2)!important;border-color:#304550!important}

/* Wellness remote capture */
#app-shell #tab-wellness .wl-panel{color:var(--module-text)!important;background:var(--module-bg)!important;border:1px solid var(--module-line)!important;border-radius:17px!important;box-shadow:0 18px 46px rgba(0,0,0,.22)!important}
#app-shell #tab-wellness .wl-head{padding:19px 21px!important;background:linear-gradient(130deg,#142c3c,#0c1b25)!important;border-color:#304550!important}
#app-shell #tab-wellness .wl-head h3,#app-shell #tab-wellness .wl-player-tools strong,#app-shell #tab-wellness .wl-statusbar strong{color:#fff!important}
#app-shell #tab-wellness .wl-head p,#app-shell #tab-wellness .wl-actions small,#app-shell #tab-wellness .wl-invite small{color:var(--module-muted)!important}
#app-shell #tab-wellness .wl-eyebrow{color:#83b2ff!important}
#app-shell #tab-wellness .wl-badge{color:#b9d4ff!important;background:#163454!important}
#app-shell #tab-wellness .wl-field span{color:#8297a5!important}
#app-shell #tab-wellness .wl-field input,#app-shell #tab-wellness .wl-field select{color:#edf3f6!important;background:#09161e!important;border-color:#304550!important}
#app-shell #tab-wellness .wl-player,#app-shell #tab-wellness .wl-invite,#app-shell #tab-wellness .wl-empty{color:#cbd7de!important;background:#101f29!important;border-color:#304550!important}
#app-shell #tab-wellness .wl-results{border-color:#304550!important}
#app-shell #tab-wellness .wl-filter button,#app-shell #tab-wellness .wl-invite-actions button{color:#9fb1bd!important;background:#0b1820!important;border-color:#304550!important}
#app-shell #tab-wellness .wl-filter button.active{color:#fff!important;background:#225da8!important;border-color:#4f91ff!important}
#app-shell #tab-wellness .wl-primary{color:#fff!important;background:linear-gradient(135deg,#4f91ff,#246bdc)!important;box-shadow:0 9px 22px rgba(36,107,220,.25)!important}

/* Match detail: one scoreboard workspace, with no white legacy fragments. */
#app-shell #tab-partidos-detalle .match-summary-hero,
#app-shell #tab-partidos-detalle .match-summary-card,
#app-shell #tab-partidos-detalle .match-summary-actions,
#app-shell #tab-partidos-detalle .partido-detail-section{
  color:var(--module-text)!important;background:var(--module-bg)!important;border:1px solid var(--module-line)!important;border-radius:16px!important;box-shadow:none!important;
}
#app-shell #tab-partidos-detalle .match-summary-hero{background:linear-gradient(145deg,#153247,#0a1821)!important}
#app-shell #tab-partidos-detalle .match-summary-eyebrow,#app-shell #tab-partidos-detalle .match-summary-kicker{color:#7ea8d9!important}
#app-shell #tab-partidos-detalle .match-summary-meta,#app-shell #tab-partidos-detalle .match-summary-team small,#app-shell #tab-partidos-detalle .match-summary-score span{color:var(--module-muted)!important}
#app-shell #tab-partidos-detalle .match-summary-team strong,#app-shell #tab-partidos-detalle .match-summary-score strong,#app-shell #tab-partidos-detalle .match-summary-section-head h4{color:#fff!important}
#app-shell #tab-partidos-detalle .match-summary-scoreboard{background:#07131a!important;border-color:#2b404d!important}
#app-shell #tab-partidos-detalle .match-summary-team-badge{color:#d9e8ff!important;background:#153961!important}
#app-shell #tab-partidos-detalle .match-summary-quarter-grid>*{color:#d8e3e9!important;background:#101f29!important;border-color:#304550!important}
#app-shell #tab-partidos-detalle .match-summary-empty{color:#8da0ac!important}
#app-shell #tab-partidos-detalle .match-summary-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important;padding:10px!important}
#app-shell #tab-partidos-detalle .match-summary-actions button{min-height:46px!important;padding:10px 15px!important;color:#dce7ed!important;background:#14242e!important;border:1px solid #344955!important;border-radius:10px!important;font-weight:800!important}
#app-shell #tab-partidos-detalle .match-summary-actions .match-action-primary{color:#fff!important;background:linear-gradient(135deg,#4f91ff,#246bdc)!important;border-color:#5b9cff!important}
#app-shell #tab-partidos-detalle #partido-kpis-detalle{padding:7px!important;background:#09151d!important;border:1px solid var(--module-line)!important;border-radius:16px!important}
#app-shell #tab-partidos-detalle #partido-kpis-detalle>.kpi{background:#101f29!important;border-radius:11px!important}
#app-shell #tab-partidos-detalle #partido-tabla-resumen{border-radius:14px!important;overflow:hidden!important}

/* Actual match-detail mount lives inside #tab-partidos. */
#app-shell #tab-partidos #partido-resumen-inteligente{display:grid!important;grid-template-columns:minmax(250px,.85fr) minmax(350px,1.25fr) minmax(270px,1fr)!important;gap:10px!important;align-items:stretch!important}
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-hero,
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-card,
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-actions{
  color:var(--module-text)!important;background:var(--module-bg)!important;border:1px solid var(--module-line)!important;border-radius:16px!important;box-shadow:none!important;
}
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-hero{background:linear-gradient(145deg,#153247,#0a1821)!important}
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-scoreboard{color:#fff!important;background:#07131a!important;border-color:#2b404d!important}
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-eyebrow,
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-kicker{color:#7ea8d9!important}
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-meta,
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-team small,
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-score span{color:var(--module-muted)!important}
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-team strong,
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-score strong,
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-section-head h4{color:#fff!important}
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-team-badge{color:#d9e8ff!important;background:#153961!important}
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-quarter-grid>*{color:#d8e3e9!important;background:#101f29!important;border-color:#304550!important}
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-empty{color:#8da0ac!important}
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-actions{grid-column:1/-1!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important;padding:10px!important}
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-actions button{min-height:46px!important;padding:10px 15px!important;color:#dce7ed!important;background:#14242e!important;border:1px solid #344955!important;border-radius:10px!important;font-weight:800!important}
#app-shell #tab-partidos #partido-resumen-inteligente .match-summary-actions .match-action-primary{color:#fff!important;background:linear-gradient(135deg,#4f91ff,#246bdc)!important;border-color:#5b9cff!important}

/* Catch remaining module-local legacy cards and blank states. */
#app-shell .tab-panel .empty-state,#app-shell .tab-panel [class$="-empty"]{color:#91a5b2!important;background:#0d1a23!important;border-color:#3a505e!important}
#app-shell .tab-panel .empty-state strong,#app-shell .tab-panel [class$="-empty"] strong{color:#fff!important}

/* v225 — definitive surface reset for the modules that still inherited the old light skin. */
#app-shell #tab-readiness,
#app-shell #tab-wellness,
#app-shell #tab-partidos{
  color:var(--module-text)!important;
  background:#050d12!important;
}

/* Readiness: KPIs, the interpretation column and data tables were still painted white
   by product-facing-v149, v205 and tables-v169. */
#app-shell #tab-readiness .fr-hero{color:var(--module-text)!important;background:transparent!important}
#app-shell #tab-readiness .fr-title,
#app-shell #tab-readiness .fr-card-title,
#app-shell #tab-readiness .fr-kpi strong,
#app-shell #tab-readiness .fr-signal-head{color:#f7fafc!important}
#app-shell #tab-readiness .fr-subtitle,
#app-shell #tab-readiness .fr-kpi span,
#app-shell #tab-readiness .fr-signal-text{color:#8fa6b5!important}
#app-shell #tab-readiness .fr-kpi{
  color:var(--module-text)!important;background:#101f29!important;
  border:1px solid #2b404d!important;border-radius:14px!important;
  box-shadow:none!important;
}
#app-shell #tab-readiness .fr-grid>.fr-card:last-child{background:#0d1a23!important;border:1px solid #293c48!important}
#app-shell #tab-readiness .fr-signal{color:#cbd8df!important;background:#101f29!important;border-color:#304550!important}
#app-shell #tab-readiness .fr-table-wrap{background:#09151d!important}
#app-shell #tab-readiness .fr-table thead th{color:#8fa6b5!important;background:#0b1820!important;border-color:#293c48!important}
#app-shell #tab-readiness .fr-table tbody tr,
#app-shell #tab-readiness .fr-table tbody tr:nth-child(odd),
#app-shell #tab-readiness .fr-table tbody tr:nth-child(even){background:#101f29!important}
#app-shell #tab-readiness .fr-table tbody tr:hover{background:#152934!important}
#app-shell #tab-readiness .fr-table td{color:#d7e2e8!important;border-color:#293c48!important}
#app-shell #tab-readiness .fr-table td strong{color:#fff!important}

/* Wellness: both the remote-capture panel and the ordinary dashboard cards use one skin. */
#app-shell #tab-wellness>.card,
#app-shell #tab-wellness .card,
#app-shell #tab-wellness .wellness-chart-grid,
#app-shell #tab-wellness .table-wrap{
  color:var(--module-text)!important;background:#0d1a23!important;
  border:1px solid #293c48!important;border-radius:16px!important;box-shadow:none!important;
}
#app-shell #tab-wellness .card-title,#app-shell #tab-wellness label{color:#f4f8fa!important}
#app-shell #tab-wellness .text-muted,#app-shell #tab-wellness .muted{color:#8fa6b5!important}
#app-shell #tab-wellness select,#app-shell #tab-wellness input,#app-shell #tab-wellness textarea{
  color:#edf4f7!important;background:#09161e!important;border-color:#304550!important;
}
#app-shell #tab-wellness table thead th{color:#8fa6b5!important;background:#0b1820!important;border-color:#293c48!important}
#app-shell #tab-wellness table tbody tr,
#app-shell #tab-wellness table tbody tr:nth-child(odd),
#app-shell #tab-wellness table tbody tr:nth-child(even){background:#101f29!important}
#app-shell #tab-wellness table tbody tr:hover{background:#152934!important}
#app-shell #tab-wellness table td{color:#d7e2e8!important;border-color:#293c48!important}
#app-shell #tab-wellness table td strong{color:#fff!important}

/* Match centre: remove the remaining light shell around the redesigned scoreboard. */
#app-shell #tab-partidos>.card,
#app-shell #tab-partidos .card,
#app-shell #tab-partidos .table-wrap,
#app-shell #tab-partidos .subtab-content,
#app-shell #tab-partidos #partido-detalle-card,
#app-shell #tab-partidos #partido-workflow-card{
  color:var(--module-text)!important;background:#0d1a23!important;
  border-color:#293c48!important;box-shadow:none!important;
}
#app-shell #tab-partidos .card-title,#app-shell #tab-partidos label{color:#f4f8fa!important}
#app-shell #tab-partidos .muted,#app-shell #tab-partidos .text-muted{color:#8fa6b5!important}
#app-shell #tab-partidos select,#app-shell #tab-partidos input,#app-shell #tab-partidos textarea{
  color:#edf4f7!important;background:#09161e!important;border-color:#304550!important;
}
#app-shell #tab-partidos table thead th{color:#8fa6b5!important;background:#0b1820!important;border-color:#293c48!important}
#app-shell #tab-partidos table tbody tr,
#app-shell #tab-partidos table tbody tr:nth-child(odd),
#app-shell #tab-partidos table tbody tr:nth-child(even){background:#101f29!important}
#app-shell #tab-partidos table tbody tr:hover{background:#152934!important}
#app-shell #tab-partidos table td{color:#d7e2e8!important;border-color:#293c48!important}
#app-shell #tab-partidos table td strong{color:#fff!important}
#app-shell #tab-partidos .match-summary-player{color:#dce7ed!important;background:#101f29!important;border-color:#304550!important}
#app-shell #tab-partidos .match-summary-avatar{color:#d9e8ff!important;background:#153961!important}

@media(max-width:760px){
  #app-shell #tab-readiness .fr-card{padding:14px!important}
  #app-shell #tab-readiness .fr-chart{min-height:240px!important}
  #app-shell #tab-wellness .wl-head,#app-shell #tab-wellness .wl-body{padding:15px!important}
  #app-shell #tab-partidos-detalle .match-summary-actions{grid-template-columns:1fr!important}
  #app-shell #tab-partidos #partido-resumen-inteligente .match-summary-actions{grid-template-columns:1fr!important}
}
@media(min-width:761px) and (max-width:1050px){
  #app-shell #tab-partidos #partido-resumen-inteligente{grid-template-columns:1fr 1fr!important}
  #app-shell #tab-partidos #partido-resumen-inteligente .match-summary-hero{grid-column:1/-1!important}
  #app-shell #tab-partidos #partido-resumen-inteligente .match-summary-actions{grid-column:1/-1!important}
}
@media(max-width:760px){
  #app-shell #tab-partidos #partido-resumen-inteligente{grid-template-columns:1fr!important}
  #app-shell #tab-partidos #partido-resumen-inteligente>*{grid-column:1!important}
}
