@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700;800&family=Commissioner:FLAR,wght@0,400;0,500;0,600;0,700;0,800;100,400;100,500;100,600;100,700;100,800&display=swap');
:root {
    --font-body: "Commissioner", sans-serif;
    --font-display: "Barlow Condensed", sans-serif;
    --font-body-variation: "FLAR" 100, "VOLM" 0;
}
html,
body,
input,
button,
select,
textarea {
    font-family: var(--font-body);
    font-variation-settings: var(--font-body-variation);
}
h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.modal-title,
.custom-tab,
.sidebar-link,
.sidebar .nav-link,
.sumario-resumen-rank-title,
.sumario-resumen-focus-title {
    font-family: var(--font-display);
    font-variation-settings: normal;
    letter-spacing: 0.01em;
}
.page-title {
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: clamp(1.85rem, 1.35rem + 1vw, 2.35rem);
    line-height: 1.02;
    text-wrap: balance;
}
/* ========== Mejorar dropdown Dash ========== */
.Select-menu-outer, .VirtualizedSelectOption, .Select-option, .Select-menu, .Select-control, .Select-placeholder {
    font-size: 14px !important;
}
.Select-option, .VirtualizedSelectOption {
    min-height: 38px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
}
.Select-control, .Select-placeholder {
    min-height: 40px !important;
    font-size: 15px !important;
}
/* Para Dash manteniendo compatibilidad con dcc.Dropdown */
div[class*="Dropdown-menu"], div[class*="Dropdown-option"] {
    font-size: 14px !important;
    min-height: 38px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
}


/* ================= Global ================= */
body {
    margin: 0;
    font-family: var(--font-body);
    font-variation-settings: var(--font-body-variation);
    background-image: url("/assets/login_bg_filtro.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
}

/* Login mode (pantalla de login) */
body.login-mode {
    background-image: url("/assets/login_bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
    background-color: #0d3b66;
}

/* ================= Dashboard wrapper ================= */
/* Contenedor principal que agrupa sidebar + contenido */
.dashboard-wrapper {
    display: flex;         /* convierte en flex container */
    flex-wrap: nowrap;     /* nunca permite wrapping */
    min-height: 100vh;
    background-image: url("/assets/login_bg_filtro.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
}

/* ================= Sidebar ================= */
.sidebar {
    flex: 0 0 250px;       /* ancho fijo dentro de flex */
    max-width: 250px;
    background-color: #0d3b66;
    color: white;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: fixed;      /* para que quede fija al hacer scroll */
    top: 0;
    z-index: 1000;
    min-height: 100vh;     /* aseguramos altura completa */
}

.sidebar-link {
    display: block;
    color: white;
    padding: 12px 0;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.2s ease-in-out;
}
.sidebar-link:hover {
    background-color: #144e8c;
    padding-left: 10px;
}

/* ======= Sidebar: resalto de enlace activo (dbc.NavLink con active) ======= */
.sidebar .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
    border-left: 4px solid #ffc107;
    border-radius: 0 6px 6px 0;
    font-weight: 700;
}

.sidebar .btn-link {
    font-family: var(--font-display);
    font-variation-settings: normal;
    letter-spacing: 0.01em;
    transition: padding-left 0.15s ease, background-color 0.15s ease;
}

.sidebar .btn-link,
.sidebar .nav-link:not(.ps-4) {
    font-size: 0.98rem !important;
    line-height: 1.15;
    white-space: nowrap;
}

.sidebar .nav-link.ps-4 {
    font-size: 0.88rem !important;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.sidebar .btn-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

/* Hover sutil en enlaces de la barra */
.sidebar .nav .nav-link {
    transition: padding-left 0.15s ease, background-color 0.15s ease;
}
.sidebar .nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* ======= Sidebar: resalto de cabecera de grupo activa ======= */
.sidebar .active-group {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-left: 4px solid #17a2b8;
    border-radius: 0 6px 6px 0;
}

.sidebar .btn-link.active-group {
    color: #fff !important;
}

/* ================= Contenido del Dashboard ================= */
/* El div que envuelve cada subpágina (tabs + page-wrapper) */
.dashboard-content {
    flex: 1;                       /* ocupa el resto del espacio */
    display: flex;                 /* convierte en flex-column para centrar */
    flex-direction: column;
    align-items: center;           /* centra horizontalmente el wrapper interno */
    padding: 20px;                 /* espacio alrededor */
    overflow-x: auto; 
    margin-left: 250px             /* si no cabe, scroll horizontal */
}


/* Wrapper uniforme para el contenido de cada página */
.page-wrapper {
    width: 100%;
    max-width: 1200px;
    padding: 40px;
    background: rgba(255,255,255,0.96);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    font-family: var(--font-body);
    font-variation-settings: var(--font-body-variation);
    /* Nota: ya no margin:auto; .dashboard-content se encarga de centrar */
}


/* Ajuste de padding en móvil */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 20px;
    }
}

/* ================= Pestañas ================= */
.custom-tabs {
    border-bottom: 2px solid #eee;
    background-color: transparent;
    display: flex;
    justify-content: center;
}

.custom-tab {
    padding: 14px 40px;
    border: none;
    background-color: transparent;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-display);
    color: #0d3b66;
    cursor: pointer;
    transition: border 0.2s ease-in-out;
    border-bottom: 3px solid transparent;
}
.custom-tab:hover {
    border-bottom: 3px solid #ccc;
}
.custom-tab--selected {
    border-bottom: 3px solid #0d3b66;
    color: #0d3b66;
}

.tab-button {
    font-family: var(--font-display) !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    line-height: 1.1;
}

.subtab-button {
    font-family: var(--font-display) !important;
    font-size: 0.94rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    line-height: 1.1;
}

/* ================= Botón de descarga ================= */
#boton-descargar:hover img {
    opacity: 1 !important;
    transform: scale(1.05);
    transition: 0.2s ease-in-out;
}

/* ================= Modales de Comentarios ================= */
.modal-body-custom {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

/* Listas estilizadas con iconos según tipo */
ul.estilizado {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

ul.estilizado li {
    padding: 8px 0;
    display: flex;
    align-items: start;
    gap: 8px;
}

ul.estilizado li::before {
    content: '✅';
    color: #28a745;
    font-weight: bold;
    font-size: 18px;
}

/* Versión roja para 'A mejorar' */
ul.estilizado.red li::before {
    content: '⚠️';
    color: #dc3545;
}

/* Cabecera modal visualmente limpia */
.modal-header {
    background-color: #f5f7fa;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    font-family: var(--font-display);
    color: #0d3b66;
    font-weight: 600;
    font-size: 20px;
}

.bloque-comentario {
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 15px;
    line-height: 1.6;
    font-family: var(--font-body);
    font-variation-settings: var(--font-body-variation);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.bloque-verde {
    background-color: #f0faee;
    color: #2e7d32;
    border-left: 6px solid #66bb6a;
}

.bloque-rojo {
    background-color: #fff2f2;
    color: #b71c1c;
    border-left: 6px solid #ef5350;
}

.bloque-comentario ul {
    margin: 0;
    padding-left: 20px;
}

.bloque-comentario li {
    margin-bottom: 10px;
}

.botonera-comentarios {
    text-align: right;
    margin-top: 8px;
}

.botonera-comentarios .btn {
    margin-left: 6px;
}

/* ================= Home - Hero & Callout ================= */
.home-hero {
    background: linear-gradient(135deg, rgba(13,59,102,0.92), rgba(13,59,102,0.7));
    color: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(13,59,102,0.15);
    position: relative;
    overflow: hidden;
}

.home-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.25), rgba(255,255,255,0) 60%);
    transform: rotate(15deg);
}

.home-hero h2 { color: #fff; font-weight: 700; }
.home-hero p { color: rgba(255,255,255,0.95); }

.home-hero .badge {
    background: rgba(255,255,255,0.18) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.3);
    font-weight: 600;
}

.home-callout {
    border-left: 6px solid #0d3b66;
    background: #f5f9ff;
    color: #0d3b66;
}

/* ================= Animations (subtle) ================= */
.fade-in { opacity: 0; animation: fadeIn 0.55s ease forwards; }
.fade-in-2 { opacity: 0; animation: fadeIn 0.55s ease 0.1s forwards; }
.fade-in-3 { opacity: 0; animation: fadeIn 0.55s ease 0.2s forwards; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ================= Contextos de Partidos - Match Cards ================= */
.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* Scrollbar personalizado para celdas de contexto */
.context-cell-content::-webkit-scrollbar {
    width: 6px;
}

.context-cell-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.context-cell-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.context-cell-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Sumario de Rendimiento */
.sumario-semaforo-wrapper #semaforo-titulo {
    display: none !important;
}

.sumario-resumen-overview {
    display: grid;
    grid-template-columns: 220px 220px minmax(320px, 1fr) minmax(320px, 1fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 22px;
}

.sumario-resumen-rank-card,
.sumario-resumen-focus-card {
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.sumario-resumen-rank-card {
    padding: 16px 16px 14px;
    color: #fff;
}

.sumario-resumen-rank-card-identidad {
    background: linear-gradient(160deg, #173b67, #3f73a5 70%, #8db8d8);
}

.sumario-resumen-rank-card-rendimiento {
    background: linear-gradient(160deg, #0f5b3d, #2d8b5c 70%, #78c693);
}

.sumario-resumen-rank-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.92;
}

.sumario-resumen-rank-value {
    margin-top: 10px;
    font-size: 42px;
    line-height: 1;
    font-weight: 800;
}

.sumario-resumen-rank-metrics {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.96;
}

.sumario-resumen-meter {
    display: flex;
    align-items: stretch;
    gap: 4px;
    margin-top: 14px;
}

.sumario-resumen-meter-segment {
    min-height: 30px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
}

.sumario-resumen-meter-count {
    padding: 0 6px;
}

.sumario-resumen-focus-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 16px;
}

.sumario-resumen-focus-card-strength {
    border-top: 5px solid #17804c;
}

.sumario-resumen-focus-card-weakness {
    border-top: 5px solid #c0392b;
}

.sumario-resumen-focus-header {
    margin-bottom: 14px;
}

.sumario-resumen-focus-title {
    color: #102a43;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
}

.sumario-resumen-focus-subtitle {
    margin-top: 5px;
    color: #52606d;
    font-size: 12px;
    line-height: 1.35;
}

.sumario-resumen-focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 10px;
}

.sumario-resumen-focus-chip {
    border-radius: 12px;
    padding: 10px 10px 9px;
    border: 1px solid transparent;
    min-height: 92px;
}

.sumario-resumen-focus-group {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.82;
}

.sumario-resumen-focus-name {
    margin-top: 7px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.sumario-resumen-focus-meta {
    margin-top: 10px;
    font-size: 11px;
    font-weight: 700;
}

.sumario-resumen-focus-empty {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    color: #64748b;
    font-size: 12px;
}

.sumario-resumen-table-wrap {
    overflow-x: auto;
    border: 1px solid #d7dde6;
    border-radius: 16px;
    background: #fff;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.sumario-resumen-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    table-layout: fixed;
}

.sumario-resumen-table th,
.sumario-resumen-table td {
    border: 1px solid #d7dde6;
    vertical-align: top;
}

.sumario-resumen-section-cell {
    width: 36%;
    background: linear-gradient(135deg, #09131d, #17324d);
    color: #fff;
    padding: 11px 14px;
}

.sumario-resumen-section-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.sumario-resumen-section-meta {
    margin-top: 4px;
    font-size: 10px;
    opacity: 0.84;
}

.sumario-resumen-column-cell {
    color: #fff;
    text-align: center;
    padding: 9px 7px 8px;
}

.sumario-resumen-column-title {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
}

.sumario-resumen-column-count {
    margin-top: 7px;
    font-size: 22px;
    line-height: 1;
    font-weight: 800;
}

.sumario-resumen-column-meta {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.15;
    font-weight: 600;
    opacity: 0.96;
}

.sumario-resumen-group-cell {
    background: #5a5d63;
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.sumario-resumen-group-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sumario-resumen-group-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.sumario-resumen-description-cell {
    width: 36%;
    background: #f5f6f8;
    padding: 10px 12px;
}

.sumario-resumen-description-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sumario-resumen-description-block + .sumario-resumen-description-block {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #d7dde6;
}

.sumario-resumen-description-text {
    color: #1f2933;
    font-size: 12px;
    line-height: 1.35;
}

.sumario-resumen-pending {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 8px;
    background: #fff5cf;
    color: #7c5d00;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.sumario-resumen-metrics-cell {
    padding: 6px;
}

.sumario-resumen-cell-bg-identity-0 { background: #e3edf8; }
.sumario-resumen-cell-bg-identity-1 { background: #edf4fb; }
.sumario-resumen-cell-bg-identity-2 { background: #f4f8fc; }
.sumario-resumen-cell-bg-identity-3 { background: #f7f9fc; }
.sumario-resumen-cell-bg-identity-4 { background: #fbfcfe; }

.sumario-resumen-cell-bg-performance-0 { background: #eef9f2; }
.sumario-resumen-cell-bg-performance-1 { background: #f4fbf6; }
.sumario-resumen-cell-bg-performance-2 { background: #fff8e2; }
.sumario-resumen-cell-bg-performance-3 { background: #fff0eb; }
.sumario-resumen-cell-bg-performance-4 { background: #ffe8e6; }

.sumario-resumen-cell-stack {
    min-height: 54px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sumario-resumen-chip {
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.15;
    border: 1px solid transparent;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sumario-resumen-chip-name {
    font-weight: 700;
    font-size: 10px;
    line-height: 1.05;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sumario-resumen-chip-footer {
    margin-top: auto;
    padding-top: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sumario-resumen-chip-rank,
.sumario-resumen-chip-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    min-width: 20px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.sumario-resumen-chip-arrow {
    font-size: 11px;
    min-width: 24px;
}

.sumario-resumen-tone-identity-0 {
    background: #d5e4f5;
    border-color: #9cb9d9;
    color: #163a63;
}

.sumario-resumen-tone-identity-1 {
    background: #e2ecf8;
    border-color: #b4c8e1;
    color: #315884;
}

.sumario-resumen-tone-identity-2 {
    background: #edf3fa;
    border-color: #c8d5e7;
    color: #4d6785;
}

.sumario-resumen-tone-identity-3 {
    background: #f3f7fb;
    border-color: #d5dfec;
    color: #687d96;
}

.sumario-resumen-tone-identity-4 {
    background: #f8fafc;
    border-color: #e0e7f0;
    color: #8190a5;
}

.sumario-resumen-tone-performance-0 {
    background: #d9f2e1;
    border-color: #93d0a7;
    color: #0f5132;
}

.sumario-resumen-tone-performance-1 {
    background: #eaf7ef;
    border-color: #b6ddb9;
    color: #1d6b42;
}

.sumario-resumen-tone-performance-2 {
    background: #fff4c9;
    border-color: #ecd88b;
    color: #7b5c00;
}

.sumario-resumen-tone-performance-3 {
    background: #ffe2d9;
    border-color: #f3b9a5;
    color: #9c3f24;
}

.sumario-resumen-tone-performance-4 {
    background: #ffd8d3;
    border-color: #ef9a90;
    color: #9b1c1c;
}

.sumario-resumen-empty {
    display: block;
    min-height: 22px;
}

.sumario-resumen-footnote {
    background: #fff8e1;
    border: 1px solid #f1d48b;
    border-radius: 12px;
    padding: 11px 13px;
    color: #775200;
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 1200px) {
    .sumario-resumen-overview {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .sumario-resumen-overview {
        grid-template-columns: 1fr;
    }
}

/* Informes / Utilidades */
.informes-metadata-grid {
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
}

.informes-workspace {
    grid-template-columns: minmax(0, 1fr);
}

.informes-match-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(245px, 300px);
    gap: 12px;
    align-items: stretch;
    margin-top: 12px;
}

.informes-completion-summary {
    min-width: 0;
    padding: 10px;
    border: 1px solid #dbe5ee;
    border-radius: 10px;
    background: #fff;
}

/* La biblioteca de comentarios forma parte del flujo del documento. El menú
   ocupa espacio real y tiene su propio scroll para que ningún contenedor de
   sección lo recorte al abrirse cerca del final de la página. */
.informes-line-comment-polarity,
.informes-line-comment-library {
    position: relative;
    overflow: visible !important;
}

.informes-line-comment-library[open] {
    z-index: 80;
}

.informes-line-comment-library-dropdown .Select-menu-outer {
    position: relative !important;
    top: auto !important;
    z-index: 90 !important;
    max-height: 260px !important;
    overflow-y: auto !important;
    border-top: 1px solid #dbe5ee !important;
}

.informes-line-comment-library-dropdown .Select-menu,
.informes-line-comment-library-dropdown .VirtualizedSelectFocusedOption,
.informes-line-comment-library-dropdown .VirtualizedSelectOption {
    max-height: 250px !important;
}

/* Barrera visual entre partidos: el selector y la cabecera siguen activos,
   pero ningún dato del informe anterior queda visible mientras se valida la
   nueva clave de partido. */
.informes-workspace--stale {
    min-height: 150px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe5ee;
    border-radius: 10px;
    background: #f8fbfd;
}

.informes-workspace--stale > * {
    display: none !important;
}

.informes-workspace--stale::before {
    content: "Actualizando el partido seleccionado…";
    color: #1e3d59;
    font-size: 13px;
    font-weight: 800;
}

.informes-jornada-selector {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    justify-content: space-between;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 5px;
}

.informes-jornada-selector button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 61, 89, 0.16);
}

.informes-lineup-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.informes-lineup-title {
    margin: 0;
    color: #1e3d59;
    font-size: 19px;
    font-weight: 800;
}

.informes-lineup-subtitle {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 13px;
}

.informes-lineup-quick-help {
    margin-top: 8px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.informes-lineup-save-panel {
    display: flex;
    min-width: 260px;
    align-items: flex-end;
    flex-direction: column;
    gap: 4px;
}

.informes-lineup-progress-state {
    color: #475569;
    font-size: 10px;
    font-weight: 800;
}

.informes-lineup-save-feedback {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
}

.informes-lineup-save-feedback.is-pending {
    background: #fff7ed;
    color: #b45309;
}

.informes-lineup-save-feedback.is-saved {
    background: #dcfce7;
    color: #15803d;
}

.informes-lineup-save-feedback.is-error {
    background: #fee2e2;
    color: #b91c1c;
}

.informes-lineup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.informes-lineup-card {
    overflow: hidden;
    border: 1px solid #d9e2ec;
    border-top: 3px solid #1e3d59;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 41, 64, 0.06);
}

.informes-lineup-card.is-rival {
    border-top-color: #b53a48;
}

.informes-lineup-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 62px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
}

.informes-lineup-team {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.informes-lineup-shield {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    object-fit: contain;
}

.informes-lineup-kicker,
.informes-lineup-label {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.informes-lineup-team-name {
    overflow: hidden;
    margin: 2px 0 0;
    color: #1e3d59;
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.informes-lineup-count {
    padding: 4px 7px;
    border-radius: 999px;
    background: #e8eef4;
    color: #1e3d59;
    font-size: 10px;
    font-weight: 800;
}

.informes-lineup-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.informes-lineup-formation {
    width: 112px;
    font-size: 11px;
}

.informes-lineup-formation .Select-control {
    border-color: #cad6e1;
    height: 32px;
    min-height: 32px;
}

.informes-lineup-formation .Select-value,
.informes-lineup-formation .Select-placeholder,
.informes-lineup-formation .Select-input {
    height: 30px !important;
    line-height: 30px !important;
}

.informes-lineup-pitch {
    position: relative;
    width: calc(100% - 20px);
    max-width: 440px;
    aspect-ratio: 944 / 1464;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 7px;
    background: #063b70 url('/assets/campo.png') center / 100% 100% no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.informes-lineup-slot {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border: 0;
    color: #fff;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.informes-lineup-slot:hover:not(:disabled) {
    z-index: 4;
    transform: translate(-50%, -50%) scale(1.06);
}

.informes-lineup-slot.is-empty {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255,255,255,.9);
    border-radius: 50%;
    background: rgba(7, 36, 68, .78);
    box-shadow: 0 3px 10px rgba(0,0,0,.25);
    font-size: 12px;
}

.informes-lineup-slot.is-assigned {
    width: 96px;
    min-height: 54px;
    padding: 5px 7px;
    flex-direction: column;
    gap: 2px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 8px;
    background: rgba(17, 36, 58, .92);
    box-shadow: 0 4px 12px rgba(0,0,0,.32);
}

.informes-lineup-card.is-rival .informes-lineup-slot.is-assigned {
    background: rgba(126, 31, 45, .94);
}

.informes-lineup-number {
    display: inline-flex;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #1e3d59;
    font-size: 11px;
    font-weight: 900;
}

.informes-lineup-name {
    display: block;
    width: 100%;
    overflow: visible;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1.08;
    text-align: center;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.informes-lineup-event-minute {
    position: absolute;
    z-index: 5;
    top: -8px;
    right: -8px;
    display: inline-flex;
    min-width: 28px;
    height: 21px;
    padding: 0 5px;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .28);
}

.informes-lineup-event-minute.is-out {
    background: #dc2626;
}

.informes-lineup-event-card {
    position: absolute;
    z-index: 5;
    top: -7px;
    left: -7px;
    display: inline-flex;
    width: 12px;
    height: 17px;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff;
    border-radius: 2px;
    font-size: 7px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .24);
}

.informes-lineup-event-card.is-yellow {
    background: #facc15;
    color: #713f12;
}

.informes-lineup-event-card.is-red {
    left: 8px;
    background: #dc2626;
    color: #fff;
}

.informes-lineup-event-goal {
    position: absolute;
    z-index: 5;
    right: -7px;
    bottom: -8px;
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    padding: 0 3px;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .28);
}

.informes-post-lineup-body {
    display: grid;
    gap: 9px;
    align-items: stretch;
    padding: 0 10px 12px;
}

.informes-post-lineup-body.is-own {
    grid-template-columns: 138px minmax(0, 1fr);
}

.informes-post-lineup-body.is-rival {
    grid-template-columns: minmax(0, 1fr) 138px;
}

.informes-post-lineup-body .informes-lineup-pitch {
    width: 100%;
    max-width: none;
    margin: 0;
}

.informes-post-bench {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #d9e2ec;
    border-radius: 7px;
    background: #f8fafc;
}

.informes-post-bench-title {
    padding: 8px 5px;
    background: #1e3d59;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    text-align: center;
}

.informes-lineup-card.is-rival .informes-post-bench-title {
    background: #b53a48;
}

.informes-post-bench-list {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
}

.informes-post-bench-row {
    position: relative;
    display: flex;
    min-height: 41px;
    padding: 5px 5px;
    flex: 1 1 0;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.informes-post-bench-row:last-child {
    border-bottom: 0;
}

.informes-post-bench-row.is-unused {
    background: #f8fafc;
}

.informes-post-bench-player {
    display: grid;
    min-width: 0;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 4px;
    align-items: center;
}

.informes-post-bench-number {
    color: #1e3d59;
    font-size: 9px;
    font-weight: 900;
    text-align: center;
}

.informes-post-bench-name {
    overflow: hidden;
    color: #334155;
    font-size: 8.5px;
    font-weight: 800;
    line-height: 1.05;
    text-overflow: ellipsis;
}

.informes-post-bench-minute {
    position: absolute;
    z-index: 2;
    top: 2px;
    right: 2px;
    display: inline-flex;
    min-width: 26px;
    height: 18px;
    padding: 0 4px;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff;
    border-radius: 999px;
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .2);
}

.informes-post-bench-minute.is-in {
    background: #16a34a;
}

.informes-post-bench-card {
    position: absolute;
    z-index: 2;
    right: 3px;
    bottom: 2px;
    display: inline-flex;
    width: 9px;
    height: 13px;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
    border-radius: 2px;
    font-size: 6px;
    font-weight: 900;
    line-height: 1;
}

.informes-post-bench-card.is-yellow {
    background: #facc15;
    color: #713f12;
}

.informes-post-bench-card.is-red {
    right: 14px;
    background: #dc2626;
    color: #fff;
}

.informes-post-bench-goal {
    position: absolute;
    z-index: 2;
    left: 3px;
    bottom: 2px;
    display: inline-flex;
    min-width: 17px;
    height: 17px;
    padding: 0 2px;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .2);
}

.informes-post-bench-empty {
    padding: 10px 6px;
    color: #64748b;
    font-size: 9px;
    text-align: center;
}

.informes-lineup-card > .informes-lineup-label {
    display: block;
    margin: 9px 12px 5px;
}

.informes-lineup-notes-wrap > .informes-lineup-label {
    display: block;
    margin: 9px 12px 5px;
}

.informes-lineup-notes {
    width: calc(100% - 24px);
    margin: 0 12px 12px;
    border-color: #cad6e1;
    font-size: 12px;
    line-height: 1.4;
    resize: vertical;
}

.informes-post-roster {
    margin: 10px 12px 12px;
    overflow: hidden;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
}

.informes-post-roster-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border-bottom: 1px solid #d9e2ec;
    background: #eef3f7;
}

.informes-post-roster-title,
.informes-post-roster-label {
    color: #1e3d59;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.informes-post-roster-source {
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
}

.informes-post-roster-section {
    display: grid;
    gap: 5px;
    padding: 8px 9px;
    border-bottom: 1px solid #e2e8f0;
}

.informes-post-roster-section:last-child {
    border-bottom: 0;
}

.informes-post-roster-change {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 7px;
    align-items: start;
}

.informes-post-roster-minute {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #1e3d59;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}

.informes-post-roster-change-names {
    display: grid;
    gap: 3px;
    color: #334155;
    font-size: 10px;
    line-height: 1.25;
}

.informes-post-roster-change-names span {
    display: inline-block;
    min-width: 40px;
    margin-right: 4px;
    color: #64748b;
    font-size: 8px;
    font-weight: 900;
}

.informes-post-roster-text,
.informes-post-roster-empty {
    color: #475569;
    font-size: 10px;
    line-height: 1.35;
}

.informes-post-roster > .informes-post-roster-title,
.informes-post-roster > .informes-post-roster-empty {
    padding: 8px 9px;
}

.informes-post-roster-booking {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #334155;
    font-size: 10px;
}

.informes-post-roster-booking > div {
    display: flex;
    gap: 4px;
}

.informes-post-roster-card {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 8px;
    font-weight: 900;
}

.informes-post-roster-card.is-yellow {
    background: #fef3c7;
    color: #92400e;
}

.informes-post-roster-card.is-red {
    background: #fee2e2;
    color: #991b1b;
}

.informes-lineup-modal-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 8px;
    align-items: center;
}

.informes-lineup-player-picker {
    min-width: 0;
}

.informes-lineup-number-input {
    height: 38px;
    font-size: 12px;
}

/* Las confirmaciones globales no deben ocupar espacio dentro del documento:
   al aparecer sobre los editores desplazaban el scroll varias secciones. */
.informes-save-toast {
    position: fixed;
    top: 76px;
    right: 22px;
    z-index: 2100;
    width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}

.informes-save-toast .alert {
    margin: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.2);
    pointer-events: auto;
}

.informes-save-toast .alert-success,
.informes-save-toast .alert-secondary {
    animation: informes-toast-autoclose 5s ease forwards;
}

/* Verificación pre/post: el resultado es el acceso al contexto, sin controles
   auxiliares que compitan visualmente con la puntuación. */
.informes-verification-post-details {
    position: relative;
    display: inline-block;
}

.informes-verification-post-details[open] {
    z-index: 80;
}

.informes-verification-post-details > summary {
    list-style: none;
}

.informes-verification-post-details > summary::-webkit-details-marker {
    display: none;
}

.informes-verification-post-card {
    --post-color: #475467;
    --post-soft: #f2f4f7;
    --post-border: #d0d5dd;
    position: relative;
    display: inline-flex;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 1px solid var(--post-border);
    border-radius: 8px;
    background: var(--post-soft);
    color: var(--post-color);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
    cursor: pointer;
    line-height: 1;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.informes-verification-post-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(16, 24, 40, .13);
}

.informes-verification-post-card.is-static {
    padding: 0;
    cursor: default;
}

.informes-verification-post-card.is-static:hover {
    transform: none;
}

.informes-verification-post-card.is-danger {
    --post-color: #b42318;
    --post-soft: #fff1f0;
    --post-border: #f6b8b2;
}

.informes-verification-post-card.is-success {
    --post-color: #067647;
    --post-soft: #ecfdf3;
    --post-border: #a6f4c5;
}

.informes-verification-post-value {
    font-size: 18px;
    font-weight: 950;
}

.informes-verification-post-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 90;
    width: min(900px, calc(100vw - 48px));
    max-height: 540px;
    overflow-y: auto;
    padding: 14px;
    text-align: left;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .22);
    transform: translateX(-43%);
}

.informes-quintile-breakdown + .informes-quintile-breakdown {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e4e7ec;
}

.informes-quintile-result-explanation {
    margin-bottom: 14px;
    padding: 13px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef4f8 100%);
    border: 1px solid #dbe5ee;
    border-radius: 11px;
}

.informes-quintile-result-title {
    color: #101828;
    font-size: 16px;
    font-weight: 900;
}

.informes-quintile-result-copy {
    max-width: 720px;
    margin-top: 3px;
    color: #475467;
    font-size: 9px;
    line-height: 1.45;
}

.informes-quintile-formula-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 6px;
    margin-top: 10px;
}

.informes-quintile-formula-metric {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 6px;
    padding: 6px;
    align-items: center;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}

.informes-quintile-formula-chip {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #175c82;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 900;
}

.informes-quintile-formula-label {
    overflow: hidden;
    color: #344054;
    font-size: 8px;
    font-weight: 750;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.informes-quintile-formula {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
    justify-content: flex-end;
}

.informes-quintile-formula-operation,
.informes-quintile-formula-average {
    padding: 6px 8px;
    color: #344054;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 850;
}

.informes-quintile-formula-arrow {
    color: #98a2b3;
    font-size: 9px;
}

.informes-quintile-formula-result {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #175c82;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 950;
}

.informes-quintile-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.informes-quintile-eyebrow {
    margin-bottom: 3px;
    color: #667085;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .09em;
}

.informes-quintile-title {
    color: #101828;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}

.informes-quintile-current {
    display: flex;
    min-width: 58px;
    padding: 6px 8px;
    align-items: center;
    flex-direction: column;
    color: var(--quintile-color);
    background: var(--quintile-soft);
    border-radius: 9px;
}

.informes-quintile-current-score {
    font-size: 17px;
    font-weight: 950;
    line-height: 1;
}

.informes-quintile-current-caption {
    margin-top: 2px;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
}

.informes-quintile-scale-row {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    gap: 8px;
    align-items: center;
    margin: 11px 0 9px;
}

.informes-quintile-direction {
    color: #667085;
    font-size: 8px;
    font-weight: 800;
    text-align: center;
}

.informes-quintile-scale {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

.informes-quintile-scale-segment {
    height: 6px;
    border-radius: 999px;
    background: var(--segment-color);
    opacity: .42;
}

.informes-quintile-scale-segment.is-current {
    height: 10px;
    opacity: 1;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--segment-color) 17%, transparent);
}

.informes-quintile-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
}

.informes-quintile-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--quintile-border);
    border-radius: 10px;
}

.informes-quintile-card-current {
    background: var(--quintile-soft);
    box-shadow: inset 0 0 0 1px var(--quintile-color);
}

.informes-quintile-card-header {
    display: flex;
    min-height: 38px;
    padding: 7px;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    color: var(--quintile-color);
    background: var(--quintile-soft);
    border-bottom: 1px solid var(--quintile-border);
}

.informes-quintile-label {
    font-size: 13px;
    font-weight: 950;
}

.informes-quintile-range {
    font-size: 8px;
    font-weight: 800;
    text-align: right;
}

.informes-quintile-matches {
    padding: 5px;
}

.informes-quintile-match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    padding: 5px 3px;
    align-items: center;
    border-bottom: 1px solid #f2f4f7;
    font-size: 8px;
    line-height: 1.2;
}

.informes-quintile-match:last-child {
    border-bottom: 0;
}

.informes-quintile-match.is-current {
    margin: 1px 0;
    padding: 5px;
    background: var(--quintile-soft);
    border: 1px solid var(--quintile-border);
    border-radius: 6px;
}

.informes-quintile-match.is-current .informes-quintile-match-name::after {
    content: " · este partido";
    color: var(--quintile-color);
    font-weight: 900;
}

.informes-quintile-match-name {
    overflow: hidden;
    color: #344054;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.informes-quintile-match-value {
    color: #101828;
    font-weight: 900;
}

.informes-quintile-empty {
    padding: 10px 4px;
    color: #98a2b3;
    font-size: 8px;
    font-style: italic;
    text-align: center;
}

.informes-quintile-footnote {
    margin-top: 8px;
    color: #667085;
    font-size: 8px;
}

@keyframes informes-toast-autoclose {
    0%, 82% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

@media (max-width: 1180px) {
    .informes-metadata-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .informes-workspace {
        grid-template-columns: 1fr;
    }

    .informes-lineup-grid {
        grid-template-columns: 1fr;
    }

    .informes-lineup-pitch {
        max-width: 520px;
    }
}

@media (max-width: 720px) {
    .informes-save-toast {
        top: 64px;
        right: 12px;
        width: calc(100vw - 24px);
    }

    .informes-metadata-grid {
        grid-template-columns: 1fr;
    }

    .informes-match-overview-grid {
        grid-template-columns: 1fr;
    }

    .informes-lineup-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .informes-lineup-slot.is-assigned {
        width: 84px;
        min-height: 48px;
    }

    .informes-lineup-name {
        font-size: 8.5px;
    }

    .informes-lineup-card-header {
        align-items: flex-start;
    }

    .informes-lineup-card-actions {
        align-items: flex-end;
        flex-direction: column;
    }

    .informes-verification-post-popover {
        left: -160px;
        width: calc(100vw - 32px);
        transform: none;
    }

    .informes-quintile-grid {
        grid-template-columns: 1fr;
    }
}
