/* ============================================================
   Master League — Components
   Mobile-first. Editorial direction.
   ============================================================ */

/* ====================  CARD  ==================== */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}
@media (min-width: 768px) {
    .card { padding: var(--space-5); }
}

.card-flush { padding: 0; overflow: hidden; }
.card-elevated { box-shadow: var(--shadow-md); }
.card-interactive {
    transition: border-color var(--transition-base), background var(--transition-base);
    cursor: pointer;
}
.card-interactive:hover {
    border-color: var(--color-border-strong);
    background: var(--color-surface-hover);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}
.card-header h2,
.card-header h3 { margin: 0; }


/* ====================  SECTION HEADER  ==================== */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.section-head .eyebrow {
    display: block;
    text-transform: uppercase;
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wider);
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}
.section-head h2 {
    font-size: var(--text-xl);
    margin: 0;
}
.section-head .section-link {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    white-space: nowrap;
}
.section-head .section-link:hover { color: var(--color-accent); }


/* ====================  KPI  ==================== */
.kpi {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}
.kpi-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--color-text-muted);
    font-weight: var(--weight-medium);
}
.kpi-value {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-black);
    color: var(--color-text-strong);
    line-height: 1;
    letter-spacing: var(--tracking-tight);
    font-variant-numeric: tabular-nums;
}
.kpi-value.is-positive { color: var(--color-success); }
.kpi-value.is-negative { color: var(--color-danger); }
.kpi-meta {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}


/* ====================  BUTTON  ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: var(--tap-target);
    padding: 0 var(--space-5);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text-strong);
}

.btn-primary {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}
.btn-primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: white;
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--color-text-muted);
}
.btn-ghost:hover {
    background: var(--color-surface-2);
    color: var(--color-text-strong);
}

.btn-danger {
    background: var(--color-danger-soft);
    border-color: transparent;
    color: var(--color-danger);
}
.btn-danger:hover {
    background: var(--color-danger);
    color: white;
}

.btn-sm { min-height: 36px; padding: 0 var(--space-3); font-size: var(--text-xs); }
.btn-lg { min-height: 52px; padding: 0 var(--space-6); font-size: var(--text-base); }
.btn-block { width: 100%; }
.btn[disabled],
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* === Btn legacy aliases (Bootstrap-like, usados en páginas pre-design-system) === */
.btn-success {
    background: var(--color-success-soft);
    border-color: transparent;
    color: var(--color-success);
}
.btn-success:hover {
    background: var(--color-success);
    color: white;
}
.btn-info {
    background: var(--color-accent-soft);
    border-color: transparent;
    color: var(--color-accent);
}
.btn-info:hover {
    background: var(--color-accent);
    color: white;
}
.btn-secondary {
    background: var(--color-surface-2);
    border-color: var(--color-border);
    color: var(--color-text);
}
.btn-secondary:hover {
    background: var(--color-surface-2-hover, var(--color-surface));
    border-color: var(--color-border-strong);
}
.btn-warning {
    background: var(--color-warning-soft);
    border-color: transparent;
    color: var(--color-warning);
}
.btn-warning:hover {
    background: var(--color-warning);
    color: white;
}


/* ====================  BADGE / TAG  ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    border-radius: var(--radius-sm);
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    line-height: 1.5;
}
.badge-accent { background: var(--color-accent-soft); color: var(--color-accent); }
.badge-success { background: var(--color-success-soft); color: var(--color-success); }
.badge-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-soft); color: var(--color-danger); }


/* ====================  ALERT (Atención) ==================== */
.alert-list { display: flex; flex-direction: column; gap: var(--space-2); }

.alert-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left-width: 3px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.alert-item:hover { background: var(--color-surface-hover); color: var(--color-text); }
.alert-item.is-danger { border-left-color: var(--color-danger); }
.alert-item.is-warning { border-left-color: var(--color-warning); }
.alert-item.is-info { border-left-color: var(--color-accent); }
.alert-item.is-success { border-left-color: var(--color-success); }

.alert-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
    color: var(--color-text-muted);
}
.alert-item.is-danger .alert-icon { background: var(--color-danger-soft); color: var(--color-danger); }
.alert-item.is-warning .alert-icon { background: var(--color-warning-soft); color: var(--color-warning); }
.alert-item.is-info .alert-icon { background: var(--color-accent-soft); color: var(--color-accent); }
.alert-item.is-success .alert-icon { background: var(--color-success-soft); color: var(--color-success); }

.alert-body { flex: 1; min-width: 0; }
.alert-title {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text-strong);
    margin: 0 0 2px;
}
.alert-desc {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin: 0;
}
.alert-arrow {
    flex-shrink: 0;
    color: var(--color-text-subtle);
    font-size: var(--text-xs);
}


/* ====================  FIXTURE (próximo partido) ==================== */
.fixture {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-3);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}
@media (min-width: 480px) {
    .fixture { gap: var(--space-3); padding: var(--space-5) var(--space-4); }
}
@media (min-width: 768px) {
    .fixture { padding: var(--space-6); gap: var(--space-5); }
}

.fixture-team {
    text-align: center;
    min-width: 0;
    overflow: hidden;
}

.fixture-logo {
    display: block;
    width: clamp(40px, 14vw, 56px);
    height: clamp(40px, 14vw, 56px);
    max-width: 100%;
    object-fit: contain;
    margin-inline: auto;
    margin-bottom: var(--space-2);
}
@media (min-width: 768px) {
    .fixture-logo { width: 80px; height: 80px; }
}

.fixture-name {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--color-text-strong);
    line-height: var(--leading-tight);
    overflow-wrap: anywhere;
    word-break: break-word;
    margin: 0;
}
@media (min-width: 480px) {
    .fixture-name { font-size: var(--text-base); }
}
@media (min-width: 768px) {
    .fixture-name { font-size: var(--text-lg); }
}

.fixture-elo {
    margin: var(--space-1) 0 0;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}

.fixture-vs {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    padding-inline: var(--space-1);
}
@media (min-width: 480px) {
    .fixture-vs { font-size: var(--text-xl); padding-inline: var(--space-2); }
}
@media (min-width: 768px) {
    .fixture-vs { font-size: var(--text-2xl); }
}

.fixture-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    padding-top: var(--space-3);
    margin-top: var(--space-2);
    border-top: 1px solid var(--color-border);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* En la fila del fixture, los pips W/D/L se reducen ligeramente en móvil */
.fixture-team .form-row { justify-content: center; flex-wrap: wrap; }
.fixture-team .form-pip {
    width: 16px;
    height: 16px;
    font-size: 9px;
}
@media (min-width: 480px) {
    .fixture-team .form-pip { width: 18px; height: 18px; font-size: 10px; }
}
@media (min-width: 768px) {
    .fixture-team .form-pip { width: 20px; height: 20px; font-size: 10px; }
}


/* ====================  FORM INDICATORS (W/D/L) ==================== */
.form-row {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.form-pip {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: var(--weight-bold);
    color: white;
    font-family: var(--font-display);
}
.form-pip.win { background: var(--color-success); }
.form-pip.draw { background: var(--color-warning); }
.form-pip.loss { background: var(--color-danger); }
.form-pip.empty { background: var(--color-surface-2); color: var(--color-text-subtle); }
.form-pip.susp { background: var(--color-text-muted); color: #fff; font-style: italic; }


/* ====================  PROGRESS  ==================== */
.progress {
    display: block;
    width: 100%;
    height: 6px;
    background: var(--color-surface-2);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-bar {
    display: block;
    height: 100%;
    background: var(--color-accent);
    border-radius: inherit;
    transition: width var(--transition-slow);
}
.progress-bar.is-success { background: var(--color-success); }
.progress-bar.is-warning { background: var(--color-warning); }
.progress-bar.is-danger { background: var(--color-danger); }


/* ====================  SPLIT METER (probabilidad ELO) ==================== */
.split-meter {
    display: flex;
    height: 8px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--color-surface-2);
}
.split-meter > span {
    display: block;
    height: 100%;
    transition: width var(--transition-slow);
}
.split-meter > span.you { background: var(--color-accent); }
.split-meter > span.draw { background: var(--color-warning); }
.split-meter > span.rival { background: var(--color-text-subtle); }

.split-legend {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}


/* ====================  EMPTY STATE  ==================== */
.empty {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}
.empty .empty-icon {
    font-size: var(--text-2xl);
    color: var(--color-text-subtle);
    margin-bottom: var(--space-2);
}


/* ====================  TABLE (ligera, mobile-first) ==================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}
.modern-table th,
.modern-table td {
    padding: var(--space-3) var(--space-2);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    font-variant-numeric: tabular-nums;
}
.modern-table th {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-text-muted);
    font-weight: var(--weight-semibold);
    background: var(--color-surface);
}
.modern-table tbody tr:hover { background: var(--color-surface-hover); }


/* ====================  HEADER NAV  ==================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: var(--bg-header);
    border-bottom: 1px solid var(--color-border);
    /* IMPORTANTE: NO usar backdrop-filter acá — crea un containing block
       que rompe el position:fixed del .site-nav (drawer móvil). */
}
/* Blur solo en desktop, donde el nav NO es un drawer fixed */
@media (min-width: 1024px) {
    .site-header {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    height: var(--header-height);
    max-width: var(--container-max);
    margin-inline: auto;
}

.site-header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
    max-width: 60%;
    overflow: hidden;
}
.site-header__logo img {
    height: 36px;
    width: auto;
    max-height: 36px;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.site-header__user {
    display: none;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-right: var(--space-2);
}
@media (min-width: 768px) {
    .site-header__user { display: inline; }
}

/* Hamburger / nav toggle */
.nav-toggle {
    width: var(--tap-target);
    height: var(--tap-target);
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    color: var(--color-text);
    background: transparent;
    border: 1px solid transparent;
}
.nav-toggle:hover { background: var(--color-surface-2); }
@media (min-width: 1024px) {
    .nav-toggle { display: none; }
}

/* Drawer / Mobile nav */
.site-nav {
    position: fixed;
    top: var(--header-height);
    inset-inline: 0;
    bottom: 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--transition-base);
    visibility: hidden;
    z-index: var(--z-drawer);
}
.site-nav.is-open {
    transform: translateX(0);
    visibility: visible;
}

.site-nav__list {
    list-style: none;
    margin: 0;
    padding: var(--space-2);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-nav__link,
.site-nav__group-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    min-height: var(--tap-target);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--color-text);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-base), color var(--transition-base);
}
.site-nav__link {
    justify-content: flex-start;
}
.site-nav__group-trigger {
    justify-content: space-between;
}
.site-nav__link:hover,
.site-nav__group-trigger:hover {
    background: var(--color-surface);
    color: var(--color-text-strong);
}
.site-nav__link.is-active {
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

/* Íconos dentro de nav links: tamaño + ancho fijos para alineamiento limpio */
.site-nav__link i:not(.chev),
.site-nav__group-trigger > i:not(.chev) {
    width: 1.1em;
    text-align: center;
    font-size: 0.95em;
    flex-shrink: 0;
    opacity: 0.85;
}

/* Admin: link destacado en accent */
.site-nav__admin {
    color: var(--color-accent) !important;
    font-weight: var(--weight-semibold);
}
.site-nav__admin:hover {
    background: var(--color-accent-soft) !important;
    color: var(--color-accent-strong, var(--color-accent)) !important;
}
.site-nav__admin.is-active {
    background: var(--color-accent-soft);
}

.site-nav__sub {
    list-style: none;
    margin: 0;
    padding: 0 0 var(--space-2) var(--space-4);
    display: none;
}
.site-nav__group.is-expanded .site-nav__sub { display: block; }
.site-nav__group.is-expanded .site-nav__group-trigger .chev { transform: rotate(180deg); }

.site-nav__group-trigger .chev {
    transition: transform var(--transition-base);
    color: var(--color-text-subtle);
    font-size: var(--text-xs);
}

.site-nav__sub .site-nav__link {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    padding-block: var(--space-2);
    min-height: 36px;
}
.site-nav__sub .site-nav__link:hover {
    color: var(--color-text);
}

/* Desktop nav: horizontal, sin drawer */
@media (min-width: 1024px) {
    .site-nav {
        position: static;
        inset: auto;
        background: transparent;
        border: none;
        overflow: visible;
        transform: none;
        visibility: visible;
        flex: 1;
    }
    .site-nav__list {
        flex-direction: row;
        align-items: center;
        gap: 2px;
        padding: 0;
    }
    .site-nav__group { position: relative; }
    .site-nav__link,
    .site-nav__group-trigger {
        min-height: 0;
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-sm);
        color: var(--color-text-muted);
    }
    .site-nav__link:hover,
    .site-nav__group-trigger:hover {
        color: var(--color-text-strong);
        background: var(--color-surface);
    }
    .site-nav__link.is-active {
        color: var(--color-accent);
        background: var(--color-accent-soft);
    }
    .site-nav__sub {
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        min-width: 220px;
        padding: var(--space-2);
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        z-index: var(--z-dropdown);
        opacity: 0;
        transform: translateY(-4px);
        pointer-events: none;
        transition: opacity var(--transition-base), transform var(--transition-base);
    }
    .site-nav__group.is-expanded .site-nav__sub,
    .site-nav__group:hover .site-nav__sub,
    .site-nav__group:focus-within .site-nav__sub {
        display: block;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .site-nav__group:hover .site-nav__group-trigger .chev,
    .site-nav__group:focus-within .site-nav__group-trigger .chev {
        transform: rotate(180deg);
    }
    .site-nav__sub::before {
        /* puente invisible para que no se cierre al pasar del trigger al menú */
        content: '';
        position: absolute;
        top: -8px;
        left: 0;
        right: 0;
        height: 8px;
    }
    .site-nav__sub .site-nav__link {
        padding: var(--space-2) var(--space-3);
        border-radius: var(--radius-sm);
    }
    .site-nav__sub .site-nav__link:hover {
        background: var(--color-surface-2);
        color: var(--color-text);
    }
    .site-nav__group-trigger .chev { display: none; }
}

/* Drawer backdrop */
.nav-backdrop {
    position: fixed;
    inset: 0;
    top: var(--header-height);
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-drawer) - 1);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base);
}
.nav-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}
@media (min-width: 1024px) {
    .nav-backdrop { display: none; }
}

/* Bell */
.notif { position: relative; }
.notif-bell {
    width: var(--tap-target);
    height: var(--tap-target);
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    background: transparent;
    border: 1px solid transparent;
    position: relative;
}
.notif-bell:hover { background: var(--color-surface-2); color: var(--color-text); }
.notif-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--color-danger);
    color: white;
    font-size: 10px;
    font-weight: var(--weight-bold);
    border-radius: var(--radius-full);
    display: grid;
    place-items: center;
    border: 2px solid var(--color-bg);
}
.notif-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    width: min(320px, calc(100vw - var(--space-4) * 2));
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: none;
    z-index: var(--z-dropdown);
}
.notif-dropdown.is-open { display: block; }
.notif-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
}
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-row {
    display: block;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
}
.notif-row:hover { background: var(--color-surface-hover); }
.notif-row.unread { border-left: 3px solid var(--color-accent); }
.notif-row__title { font-size: var(--text-sm); font-weight: var(--weight-semibold); margin: 0 0 2px; }
.notif-row__desc { font-size: var(--text-xs); color: var(--color-text-muted); margin: 0; }
.notif-empty { padding: var(--space-6); text-align: center; color: var(--color-text-muted); font-size: var(--text-sm); }


/* ====================  FOOTER  ==================== */
.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding-block: var(--space-6);
    margin-top: var(--space-8);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}
@media (min-width: 768px) {
    .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; gap: var(--space-6); }
}
.site-footer h4 {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-text-strong);
    margin: 0 0 var(--space-3);
}
.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.site-footer a { color: var(--color-text-muted); }
.site-footer a:hover { color: var(--color-accent); }
.site-footer__bottom {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--color-text-subtle);
}
.site-footer__social {
    display: flex;
    gap: var(--space-2);
}
.site-footer__social a {
    width: var(--tap-target);
    height: var(--tap-target);
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
    color: var(--color-text-muted);
}
.site-footer__social a:hover { background: var(--color-accent-soft); color: var(--color-accent); }


/* ====================  HERO COMPACT (mi club) ==================== */
.club-hero {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
}
.club-hero__logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .club-hero__logo { width: 96px; height: 96px; }
}
.club-hero__body { flex: 1; min-width: 0; }
.club-hero__name {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-black);
    color: var(--color-text-strong);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin: 0;
    overflow-wrap: break-word;
}
@media (min-width: 768px) {
    .club-hero__name { font-size: var(--text-3xl); }
}
.club-hero__meta {
    margin-top: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}


/* ====================  STAT GRID (KPI bar) ==================== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}
@media (min-width: 640px) {
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-grid .card { padding: var(--space-3) var(--space-4); }


/* ====================  DIVIDER ==================== */
.divider {
    height: 1px;
    background: var(--color-border);
    margin-block: var(--space-5);
}


/* ====================  PILL  ==================== */
.pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px var(--space-2);
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
}


/* ====================  AVATAR ==================== */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
}
.avatar-sm { width: 24px; height: 24px; }
.avatar-lg { width: 48px; height: 48px; }


/* ====================  FORM CONTROLS  ==================== */
.form-control,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="tel"],
input[type="url"],
select,
textarea {
    display: block;
    width: 100%;
    min-height: var(--tap-target);
    padding: 0 var(--space-3);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-text);
    background-color: var(--color-surface);
    background-clip: padding-box;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

textarea {
    min-height: 96px;
    padding: var(--space-2) var(--space-3);
    line-height: var(--leading-relaxed);
    resize: vertical;
}

.form-control:hover,
input:hover,
select:hover,
textarea:hover {
    border-color: var(--color-text-subtle);
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: var(--shadow-focus);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--color-text-subtle);
    opacity: 1;
}

/* Select arrow custom (chevron blanco) */
select,
select.form-control {
    padding-right: var(--space-8);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M3 5l3 3 3-3' stroke='%239ca3af' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    background-size: 12px;
    cursor: pointer;
}

/* Las opciones del select usan colores del SO; forzamos legibilidad */
select option {
    background-color: var(--color-surface);
    color: var(--color-text);
}

/* Tamaños */
.form-control-sm,
input.form-control-sm,
select.form-control-sm {
    min-height: 36px;
    font-size: var(--text-xs);
    padding: 0 var(--space-2);
}
select.form-control-sm { padding-right: var(--space-6); }

/* Inline form */
.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

/* Label */
label,
.form-label {
    display: inline-block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text);
}

/* Checkbox / radio */
input[type="checkbox"],
input[type="radio"] {
    width: 1.1em;
    height: 1.1em;
    min-height: 0;
    accent-color: var(--color-accent);
    margin-right: var(--space-2);
    vertical-align: middle;
}


/* ====================  TREND (flecha de cambio) ==================== */
.trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    font-variant-numeric: tabular-nums;
}
.trend.is-up { color: var(--color-success); }
.trend.is-down { color: var(--color-danger); }
.trend.is-flat { color: var(--color-text-muted); }


/* ====================  METRIC GRID (PJ G E P GF GC DG Pts) ==================== */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
@media (min-width: 480px) {
    .metric-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
.metric-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-1);
    background: var(--color-surface);
    text-align: center;
    min-height: 56px;
}
.metric-cell .metric-label {
    font-size: 10px;
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-text-muted);
    margin-bottom: 2px;
}
.metric-cell .metric-value {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    color: var(--color-text-strong);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.metric-cell.is-highlight .metric-value { color: var(--color-accent); font-size: var(--text-lg); }
.metric-cell.is-positive .metric-value { color: var(--color-success); }
.metric-cell.is-negative .metric-value { color: var(--color-danger); }


/* ====================  POSITION CIRCLE (gran posición) ==================== */
.position-display {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}
.position-display .position-number {
    font-family: var(--font-display);
    font-size: var(--text-display);
    font-weight: var(--weight-black);
    color: var(--color-text-strong);
    line-height: 0.85;
    letter-spacing: var(--tracking-tight);
    font-variant-numeric: tabular-nums;
}
.position-display .position-suffix {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    color: var(--color-text-muted);
}
.position-display .position-of {
    font-size: var(--text-xs);
    color: var(--color-text-subtle);
    margin-left: var(--space-1);
}


/* ====================  SPARKLINE  ==================== */
.sparkline {
    width: 100%;
    height: 56px;
    display: block;
}
.sparkline-bg { fill: none; stroke: var(--color-border-strong); stroke-width: 1; stroke-dasharray: 2 4; opacity: 0.5; }
.sparkline-line { fill: none; stroke: var(--color-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sparkline-area { fill: var(--color-accent-soft); stroke: none; }
.sparkline-dot { fill: var(--color-accent); stroke: var(--color-bg); stroke-width: 2; }
.sparkline-dot.last { r: 4; fill: var(--color-text-strong); stroke: var(--color-accent); }
.sparkline-axis-label {
    font-size: 10px;
    fill: var(--color-text-subtle);
    font-family: var(--font-body);
}


/* ====================  COMPARE (vs temporada pasada) ==================== */
.compare-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--color-surface-2);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}
.compare-row .compare-label { color: var(--color-text-muted); }
.compare-row .compare-value {
    font-weight: var(--weight-semibold);
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}


/* ====================  TIER BAR (distribución S/A/B/C) ==================== */
.tier-bar {
    display: flex;
    width: 100%;
    height: 28px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
}
.tier-bar__seg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    font-size: var(--text-xs);
    color: white;
    transition: filter var(--transition-fast);
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}
.tier-bar__seg:hover { filter: brightness(1.1); }
.tier-bar__seg.tier-S { background: #0ea5e9; }
.tier-bar__seg.tier-A { background: #22c55e; }
.tier-bar__seg.tier-B { background: #eab308; color: #1a2030; }
.tier-bar__seg.tier-C { background: #ef4444; }
.tier-bar__seg.tier-OTR { background: var(--color-text-subtle); }

.tier-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}
.tier-legend__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: var(--radius-sm);
    margin-right: 4px;
    vertical-align: middle;
}
.tier-legend__dot.tier-S { background: #0ea5e9; }
.tier-legend__dot.tier-A { background: #22c55e; }
.tier-legend__dot.tier-B { background: #eab308; }
.tier-legend__dot.tier-C { background: #ef4444; }


/* ====================  LINE GRID (POR/DEF/MED/DEL) ==================== */
.line-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}
@media (min-width: 768px) {
    .line-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.line-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    border-top: 3px solid var(--color-border-strong);
}
.line-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}
.line-card__name {
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-text-strong);
    margin: 0;
}
.line-card__icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
    font-size: var(--text-sm);
}
.line-card__count {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-black);
    color: var(--color-text-strong);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.line-card__count-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}
.line-card__stats {
    display: flex;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-2);
    font-variant-numeric: tabular-nums;
}
.line-card__stats strong { color: var(--color-text-strong); font-weight: var(--weight-semibold); }
.line-card__top {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2);
    background: var(--color-surface-2);
    border-radius: var(--radius-sm);
}
.line-card__top-name {
    flex: 1;
    min-width: 0;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.line-card__top-ca {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
}
.line-card__top-foto {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}


/* ====================  STAR ROSTER (top 3 estrellas) ==================== */
.star-roster {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
}

.star-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-2);
    text-align: center;
    text-decoration: none;
    color: var(--color-text);
    transition: border-color var(--transition-fast), background var(--transition-fast);
    position: relative;
    overflow: hidden;
}
.star-card:hover {
    border-color: var(--color-border-strong);
    background: var(--color-surface-hover);
    color: var(--color-text);
}
.star-card.rank-1 { border-top: 3px solid #facc15; }
.star-card.rank-2 { border-top: 3px solid #cbd5e1; }
.star-card.rank-3 { border-top: 3px solid #b45309; }

.star-card__rank {
    position: absolute;
    top: 6px;
    right: 8px;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    color: var(--color-text-subtle);
}
.star-card__foto {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--color-surface-2);
    border: 2px solid var(--color-border);
    margin: 0 auto var(--space-2);
}
.star-card__name {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text-strong);
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.star-card__pos {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-text-muted);
    margin: 0 0 var(--space-2);
}
.star-card__ca {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-black);
    color: var(--color-accent);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.star-card__ca-label {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-text-subtle);
    font-weight: var(--weight-semibold);
    margin-top: 2px;
}


/* ====================  STANDINGS TABLE (clasificación)  ==================== */
.standings-table th,
.standings-table td {
    padding: var(--space-3) var(--space-2);
    vertical-align: middle;
}

.position-circle {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--color-surface-2);
    color: var(--color-text-strong);
    font-weight: var(--weight-bold);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
}
.position-circle.is-champion { background: rgba(250, 204, 21, 0.15); color: #facc15; }
.position-circle.is-relegated { background: var(--color-danger-soft); color: var(--color-danger); }

.team-cell {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: var(--color-text);
    min-width: 0;
}
.team-cell:hover { color: var(--color-accent); }
.team-cell__logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}
.team-cell__name {
    font-weight: var(--weight-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive: en móvil esconder algunas columnas y compactar nombre */
@media (max-width: 639px) {
    .standings-table .col-g,
    .standings-table .col-e,
    .standings-table .col-p,
    .standings-table .col-gf,
    .standings-table .col-gc,
    .standings-table .col-form { display: none; }
    .standings-table th,
    .standings-table td { padding: var(--space-3) var(--space-1); }
    .team-cell__name {
        font-size: var(--text-sm);
        max-width: 120px;
    }
}


/* ====================  PARTIDOS LIST (partidos.php)  ==================== */
.jornada-block { margin-bottom: var(--space-3); }
.jornada-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-strong);
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    font-size: var(--text-base);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.jornada-toggle:hover { background: var(--color-surface-hover); }
.jornada-toggle .chev { transition: transform var(--transition-base); color: var(--color-text-muted); font-size: var(--text-xs); }
.jornada-block.is-open .jornada-toggle { border-radius: var(--radius-md) var(--radius-md) 0 0; border-bottom: 0; }
.jornada-block.is-open .jornada-toggle .chev { transform: rotate(180deg); }
.jornada-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-weight: var(--weight-regular);
    text-transform: none;
    letter-spacing: 0;
}

.jornada-list {
    display: none;
    border: 1px solid var(--color-border);
    border-top: 0;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
}
.jornada-block.is-open .jornada-list { display: block; }

.match-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    transition: background var(--transition-fast);
}
.match-row:last-child { border-bottom: 0; }
.match-row:hover { background: var(--color-surface-hover); }

.match-row__team {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 1 1 0;
    min-width: 0;
    text-decoration: none;
    color: var(--color-text);
}
.match-row__team:hover { color: var(--color-accent); }
.match-row__team.local { justify-content: flex-end; text-align: right; }
.match-row__team.visit { justify-content: flex-start; text-align: left; }
.match-row__name {
    font-weight: var(--weight-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.match-row__logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}
.match-row__score {
    flex: 0 0 auto;
    min-width: 64px;
    text-align: center;
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    font-size: var(--text-base);
    color: var(--color-text-strong);
    padding: 4px 12px;
    background: var(--color-surface-2);
    border-radius: var(--radius-sm);
    font-variant-numeric: tabular-nums;
    text-decoration: none;
}
.match-row__score:hover { background: var(--color-accent-soft); color: var(--color-accent); }
.match-row__score.is-pending {
    color: var(--color-text-subtle);
    background: transparent;
    font-family: var(--font-body);
    font-weight: var(--weight-medium);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}
.match-row__status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 0 0 auto;
}
.match-row__status .status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    white-space: nowrap;
}
.match-row__status .status-pill.played { background: var(--color-success-soft); color: var(--color-success); }
.match-row__status .status-pill.pending { background: var(--color-accent-soft); color: var(--color-accent); }
.match-row__status .status-pill.suspended { background: var(--color-danger-soft); color: var(--color-danger); }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    background: transparent;
    border: 1px solid transparent;
    transition: background var(--transition-fast), color var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
    font-size: var(--text-sm);
}
.icon-btn:hover { background: var(--color-surface-2); color: var(--color-text-strong); }

@media (max-width: 560px) {
    .match-row { flex-wrap: wrap; padding: var(--space-3) var(--space-2); }
    .match-row__team { flex: 1 1 calc(50% - var(--space-3) - 32px); }
    .match-row__status {
        order: 5;
        flex: 1 1 100%;
        justify-content: center;
        padding-top: var(--space-2);
        margin-top: var(--space-2);
        border-top: 1px dashed var(--color-border);
    }
    .match-row__name { font-size: var(--text-sm); }
}


/* ====================  PARTIDO DETALLE (hero + eventos)  ==================== */
.match-hero {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-4);
    margin-bottom: var(--space-5);
    text-align: center;
}
.match-hero__teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-3);
    margin-block: var(--space-4);
}
.match-hero__team { text-align: center; min-width: 0; }
.match-hero__logo {
    width: clamp(56px, 18vw, 100px);
    height: clamp(56px, 18vw, 100px);
    object-fit: contain;
    margin-inline: auto;
    margin-bottom: var(--space-2);
}
.match-hero__name {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    color: var(--color-text-strong);
    line-height: var(--leading-tight);
    overflow-wrap: anywhere;
    margin: 0;
}
@media (min-width: 768px) {
    .match-hero__name { font-size: var(--text-xl); }
    .match-hero { padding: var(--space-6); }
}
.score-display {
    font-family: var(--font-display);
    font-weight: var(--weight-black);
    font-size: clamp(2.5rem, 12vw, 5rem);
    color: var(--color-text-strong);
    line-height: 1;
    letter-spacing: var(--tracking-wide);
    font-variant-numeric: tabular-nums;
    padding: var(--space-2) var(--space-4);
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    display: inline-block;
}
.score-display.is-pending {
    font-size: var(--text-2xl);
    font-weight: var(--weight-medium);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

.events-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.events-list li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}
.events-list li:last-child { border-bottom: 0; }
.event-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    flex-shrink: 0;
}
.event-icon.is-goal { background: var(--color-success-soft); color: var(--color-success); }
.event-icon.is-assist { background: var(--color-accent-soft); color: var(--color-accent); }
.event-icon.is-yellow { background: var(--color-warning-soft); color: var(--color-warning); }
.event-icon.is-red { background: var(--color-danger-soft); color: var(--color-danger); }
.event-icon.is-mvp { background: rgba(250, 204, 21, 0.15); color: #facc15; }
.event-body { flex: 1; min-width: 0; }
.event-name {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text-strong);
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.event-name:hover { color: var(--color-accent); }
.event-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-text-muted);
}


/* ====================  TIER BADGE (jugador) ==================== */
.tier-badge {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: var(--weight-black);
    font-size: var(--text-xs);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.tier-badge.tier-S { background: #0ea5e9; }
.tier-badge.tier-A { background: #22c55e; }
.tier-badge.tier-B { background: #eab308; color: #1a2030; text-shadow: none; }
.tier-badge.tier-C { background: #ef4444; }
.tier-badge.tier-OTR { background: var(--color-text-subtle); }

/* Tier pill — insignia legible para tiers "Tier 1".."Tier 6" */
.tier-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-weight: var(--weight-black);
    font-size: 0.62rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1.5;
    white-space: nowrap;
    color: #fff;
    vertical-align: middle;
}
.tier-pill.tier-1 { background: #eab308; color: #1a2030; }
.tier-pill.tier-2 { background: #0ea5e9; }
.tier-pill.tier-3 { background: #22c55e; }
.tier-pill.tier-4 { background: #64748b; }
.tier-pill.tier-5 { background: #f97316; }
.tier-pill.tier-6 { background: #ef4444; }
.tier-pill.tier-S { background: #0ea5e9; }
.tier-pill.tier-A { background: #22c55e; }
.tier-pill.tier-B { background: #eab308; color: #1a2030; }
.tier-pill.tier-C { background: #ef4444; }
.tier-pill.tier-na { background: var(--color-text-subtle); }


/* ====================  PLAYER HERO  ==================== */
.player-hero {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-5);
    position: relative;
    overflow: hidden;
}
@media (min-width: 768px) {
    .player-hero { flex-direction: row; align-items: center; gap: var(--space-6); padding: var(--space-6); }
}
.player-hero__avatar-wrap {
    position: relative;
    flex-shrink: 0;
    align-self: center;
}
.player-hero__avatar {
    width: clamp(100px, 30vw, 140px);
    height: clamp(100px, 30vw, 140px);
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--color-surface-2);
    border: 3px solid var(--color-accent);
}
.player-hero__club {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    padding: 4px;
    border: 1px solid var(--color-border);
    object-fit: contain;
}
.player-hero__body {
    flex: 1;
    min-width: 0;
    text-align: center;
}
@media (min-width: 768px) {
    .player-hero__body { text-align: left; }
}
.player-hero__name {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-black);
    color: var(--color-text-strong);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin: 0;
    overflow-wrap: break-word;
}
.player-hero__meta {
    margin-top: var(--space-2);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
@media (min-width: 768px) {
    .player-hero__meta { justify-content: flex-start; }
}
.player-hero__capa {
    display: flex;
    gap: var(--space-3);
    align-self: center;
}
.player-hero__capa-stat {
    text-align: center;
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface-2);
    border-radius: var(--radius-lg);
    min-width: 76px;
}
.player-hero__capa-value {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-black);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.player-hero__capa-stat.is-ca .player-hero__capa-value { color: var(--color-success); }
.player-hero__capa-stat.is-pa .player-hero__capa-value { color: var(--color-accent); }
.player-hero__capa-label {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-text-muted);
    font-weight: var(--weight-semibold);
}


/* ====================  ATRIBUTOS (jugador detalle)  ==================== */
.attr-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2);
}
@media (min-width: 480px) {
    .attr-grid { grid-template-columns: repeat(2, 1fr); }
}
.attr-row {
    display: grid;
    grid-template-columns: 1fr auto 28px;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--color-surface-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
}
.attr-row__name {
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.attr-row__bar {
    width: 80px;
    height: 4px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.attr-row__bar > span {
    display: block;
    height: 100%;
    background: var(--color-accent);
}
.attr-row.is-high .attr-row__bar > span { background: var(--color-success); }
.attr-row.is-mid .attr-row__bar > span { background: var(--color-warning); }
.attr-row.is-low .attr-row__bar > span { background: var(--color-text-subtle); }
.attr-row__value {
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--color-text-strong);
}
.attr-row.is-high .attr-row__value { color: var(--color-success); }
.attr-row.is-mid .attr-row__value { color: var(--color-warning); }
.attr-row.is-low .attr-row__value { color: var(--color-text-muted); }


/* ====================  PITCH (posición en el campo)  ==================== */
.pitch {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 2 / 3.2;
    background:
        linear-gradient(0deg, rgba(0,0,0,0.18) 50%, transparent 50%) 0 0 / 100% 50% no-repeat,
        #153227;
    margin: 0 auto;
    border: 1px solid var(--color-border);
    position: relative;
    border-radius: var(--radius-md);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}
.pitch__line {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.pitch__mid { top: 50%; left: 0; right: 0; height: 0; }
.pitch__circle {
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.pitch__box-top {
    top: 0;
    left: 50%;
    width: 100px;
    height: 45px;
    transform: translateX(-50%);
    border-top: 0;
}
.pitch__box-bot {
    bottom: 0;
    left: 50%;
    width: 100px;
    height: 45px;
    transform: translateX(-50%);
    border-bottom: 0;
}
.pitch__dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform var(--transition-base), background var(--transition-base);
    z-index: 2;
}
.pitch__dot.is-active {
    background: var(--color-success);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.7);
    transform: translate(-50%, -50%) scale(1.6);
    border: 2px solid white;
    z-index: 3;
}
.pitch__label {
    position: absolute;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.25);
    font-weight: var(--weight-bold);
    transform: translate(-50%, 8px);
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    z-index: 1;
}
.pitch__dot.is-active + .pitch__label {
    color: white;
    font-size: 11px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}


/* ====================  TRANSFER TYPE (mercado / ofertas)  ==================== */
.transfer-type {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    white-space: nowrap;
}
.transfer-type.money    { background: var(--color-accent-soft); color: var(--color-accent); }
.transfer-type.player   { background: rgba(168, 85, 247, 0.15); color: #a78bfa; }
.transfer-type.loan     { background: var(--color-warning-soft); color: var(--color-warning); }
.transfer-type.embargo  { background: var(--color-danger-soft); color: var(--color-danger); }
.transfer-type.pago     { background: var(--color-success-soft); color: var(--color-success); }
.transfer-type.infra    { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.transfer-type.clausula { background: rgba(250, 204, 21, 0.12); color: #facc15; }


/* ====================  CLAUSE TAG  ==================== */
.clause-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px var(--space-2);
    background: rgba(250, 204, 21, 0.12);
    color: #facc15;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}


/* ====================  OFFER BLOCK (ofertas)  ==================== */
.offer-block {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-3);
}
.offer-block.is-incoming { border-left: 3px solid var(--color-warning); }
.offer-block.is-outgoing { border-left: 3px solid var(--color-accent); }
.offer-block.is-confirmed { border-left: 3px solid var(--color-success); }

.offer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
}
.offer-head__title {
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    color: var(--color-text-strong);
    font-size: var(--text-base);
    margin: 0;
}
.offer-head__meta {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-weight: var(--weight-regular);
    margin-bottom: 2px;
    text-transform: none;
    letter-spacing: 0;
}
.offer-head__actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.offer-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-sm);
}
.offer-detail:last-child { border-bottom: 0; }
.offer-detail__flow {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    flex: 1;
    min-width: 200px;
}
.offer-detail__team {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--color-text);
}
.offer-detail__team img { width: 18px; height: 18px; object-fit: contain; }
.offer-detail__arrow { color: var(--color-text-subtle); }
.offer-detail__payload {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.offer-detail__payload img.face {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    object-fit: cover;
}
.offer-detail__period {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    background: var(--color-surface-2);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
}

.offer-clauses {
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface-2);
    border-top: 1px solid var(--color-border);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}
.offer-clauses h6 {
    margin: 0 0 var(--space-1);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-text-muted);
}

.offer-actions {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    flex-wrap: wrap;
}


/* ====================  FILA TRANSFERENCIA (editar/hacer oferta)  ==================== */
.fila-transferencia {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-3);
    align-items: end;
    position: relative;
}

.btn-remove {
    background: var(--color-danger);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: grid;
    place-items: center;
    position: absolute;
    top: -10px;
    right: -10px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}
.btn-remove:hover { filter: brightness(1.1); }


/* ====================  STAT BADGE (transferibles)  ==================== */
.stat-badge {
    display: inline-block;
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-bold);
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
    background: var(--color-surface-2);
    color: var(--color-text-muted);
}
.stat-badge.bg-master { background: var(--color-accent-soft); color: var(--color-accent); }
.stat-badge.bg-wonder { background: rgba(236, 72, 153, 0.15); color: #f472b6; }


/* ====================  DATATABLES OVERRIDES  ==================== */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text);
    padding: 6px var(--space-3);
    border-radius: var(--radius-md);
    margin-left: var(--space-2);
    min-height: 36px;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: var(--shadow-focus);
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin-top: var(--space-3);
    color: var(--color-text-muted) !important;
    font-size: var(--text-xs);
}
.dataTables_paginate .paginate_button {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    color: var(--color-text) !important;
    border-radius: var(--radius-sm) !important;
    padding: 4px 10px !important;
    margin: 0 2px;
}
.dataTables_paginate .paginate_button:hover {
    background: var(--color-surface-hover) !important;
    border-color: var(--color-border-strong) !important;
    color: var(--color-text-strong) !important;
}
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
    background: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
    color: white !important;
}
.dataTables_paginate .paginate_button.disabled,
.dataTables_paginate .paginate_button.disabled:hover {
    background: transparent !important;
    color: var(--color-text-subtle) !important;
    border-color: transparent !important;
}
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc { background-image: none !important; padding-right: var(--space-3) !important; }
table.dataTable thead .sorting_asc::after { content: ' ↑'; color: var(--color-accent); }
table.dataTable thead .sorting_desc::after { content: ' ↓'; color: var(--color-accent); }


/* ====================  CALCULATOR RESULT  ==================== */
.tier-result {
    text-align: center;
    padding-block: var(--space-4);
}
.tier-result__name {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: var(--weight-black);
    line-height: 1;
    margin: var(--space-2) 0;
    letter-spacing: var(--tracking-tight);
}


/* ====================  POSITION BADGES (medalla por puesto)  ==================== */
.pos-badge {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}
.pos-badge.is-1   { background: rgba(250, 204, 21, 0.18); color: #facc15; }
.pos-badge.is-2   { background: rgba(203, 213, 225, 0.18); color: #cbd5e1; }
.pos-badge.is-3   { background: rgba(180, 83, 9, 0.18); color: #f59e0b; }
.pos-badge.is-low { color: var(--color-text-subtle); opacity: 0.6; }


/* ====================  VIEW TOGGLE (Tabla/Gráfico)  ==================== */
.view-toggle {
    display: inline-flex;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
}
.view-toggle button {
    padding: 6px var(--space-3);
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    transition: background var(--transition-fast), color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}
.view-toggle button:hover { color: var(--color-text); }
.view-toggle button.is-active {
    background: var(--color-accent);
    color: white;
}


/* ====================  TROPHY CARD (palmarés)  ==================== */
.trophy-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    position: relative;
    overflow: hidden;
    border-top: 3px solid var(--color-accent);
}
.trophy-card.is-wonder { border-top-color: var(--color-warning); }
.trophy-card__head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}
.trophy-card__logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}
.trophy-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.trophy-list li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.trophy-list li:last-child { border-bottom: 0; }
.trophy-list li i { color: #facc15; }


/* ====================  HEAT TABLE (estadísticas_posiciones)  ==================== */
.heat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-xs);
}
.heat-table th, .heat-table td {
    padding: var(--space-2);
    border: 1px solid var(--color-border);
    text-align: center;
    vertical-align: middle;
}
.heat-table th { background: var(--color-surface); color: var(--color-text-muted); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.heat-table td.cell-team {
    text-align: left;
    background: var(--color-bg);
    position: sticky;
    left: 0;
    z-index: 2;
    border-right: 2px solid var(--color-accent);
    min-width: 140px;
    max-width: 140px;
}
.heat-table thead th.cell-team {
    background: var(--color-surface);
    z-index: 3;
    border-bottom: 2px solid var(--color-accent);
}
.heat-table .cell-pts {
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-weight: var(--weight-bold);
}


/* ====================  VS FORM (comparador equipos)  ==================== */
.vs-form {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    padding: var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}
.vs-form__select { flex: 1 1 220px; min-width: 0; }
.vs-form__badge {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-black);
    color: var(--color-accent);
    align-self: center;
}


/* ====================  ANIMATIONS  ==================== */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fade-in-up 320ms ease both; }
.animate-fade-in { animation: fade-in-up 320ms ease both; }   /* alias legacy */

/* ============================================================
   SKIN v2 · Premier League — overrides
   El header es púrpura sólido → texto e íconos en claro.
   ============================================================ */

/* Header púrpura con línea rosa */
.site-header {
    background: var(--pl-purple);
    border-bottom: 2px solid var(--pl-pink);
}

/* Nav desktop sobre el header púrpura */
@media (min-width: 1024px) {
    .site-nav__link,
    .site-nav__group-trigger {
        color: rgba(255, 255, 255, 0.78);
    }
    .site-nav__link:hover,
    .site-nav__group-trigger:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.12);
    }
    .site-nav__link.is-active {
        color: #ffffff;
        background: var(--color-accent);
    }
}
.site-nav__group-trigger .chev { color: rgba(255, 255, 255, 0.6); }

/* Botón hamburguesa, usuario y campana en claro */
.nav-toggle { color: #ffffff; }
.nav-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.site-header__user { color: rgba(255, 255, 255, 0.85); }
.notif-bell { color: #ffffff; }

/* Botones ghost dentro del header (logout, toggle de skin) */
.site-header__actions .btn-ghost {
    color: rgba(255, 255, 255, 0.85);
}
.site-header__actions .btn-ghost:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

/* Link Admin: pill rosa para destacar sobre el púrpura */
.site-nav__admin {
    color: #ffffff !important;
    background: var(--color-accent);
    border-radius: var(--radius-full);
}
.site-nav__admin:hover {
    background: var(--color-accent-hover) !important;
    color: #ffffff !important;
}

/* Footer púrpura */
.site-footer {
    background: var(--pl-purple);
    color: rgba(255, 255, 255, 0.7);
    border-top: 2px solid var(--pl-pink);
}
.site-footer h4 { color: #ffffff; }
.site-footer a { color: rgba(255, 255, 255, 0.75); }
.site-footer a:hover { color: #ffffff; }
.site-footer__social a {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.site-footer__social a:hover { background: var(--color-accent); }

/* Drawer móvil: panel claro, links púrpura (legibles) */
@media (max-width: 1023px) {
    .site-nav { background: var(--color-surface); }
}

/* Hero de club con el gradiente de marca PL */
.club-hero {
    background: var(--pl-gradient);
    border: none;
    color: #ffffff;
}
.club-hero__name { color: #ffffff; }
.club-hero__meta { color: rgba(255, 255, 255, 0.85); }
.club-hero .pill {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.club-hero .badge-accent {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ============================================================
   SKIN v2 · Premier League — identidad tipográfica broadcast
   Mayúsculas, pesos altos, tracking marcado.
   ============================================================ */

/* Botones: mayúscula, peso fuerte (estilo "VOTE NOW") */
.btn {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.045em;
}
.btn-lg { letter-spacing: 0.06em; }

/* Eyebrow: etiqueta chica, peso alto, bien espaciada */
.eyebrow {
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

/* Nombre de club en el hero: mayúscula, peso máximo */
.club-hero__name {
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: -0.03em;
}

/* Badges compactas en mayúscula */
.badge {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Headers de sección y de card con peso de display */
.section-head h2,
.card-header h3 {
    font-family: var(--font-display);
}

/* Cabeceras de tabla: mayúscula marcada */
.modern-table thead th,
.pivot-table thead th,
.matrix-table thead th {
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.06em;
}

/* Números de KPI / resultados: peso display máximo */
.kpi-value {
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: -0.02em;
}

/* Pills tipo broadcast */
.pill {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: var(--text-xs);
}

/* ============================================================
   SKIN v2 · Premier League — pase de componentes broadcast
   ============================================================ */

/* Eyebrow de sección como chip PL */
.section-head .eyebrow {
    display: inline-block;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    padding: 4px 11px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    line-height: 1;
    margin-bottom: var(--space-2);
}

/* Section head con barra de acento (gradiente PL a la izquierda) */
.section-head {
    position: relative;
    padding-left: var(--space-4);
}
.section-head::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 5px;
    border-radius: 3px;
    background: var(--pl-gradient);
}

/* Tablas: cabecera con línea de acento + hover marcado */
.modern-table thead th,
.matrix-table thead th {
    border-bottom: 2px solid var(--color-accent);
}
.modern-table tbody tr:hover {
    background: var(--color-accent-soft);
}

/* Logo del club sobre tile blanco (estilo gráfica PL) */
.club-hero__logo {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 6px;
    box-shadow: var(--shadow-sm);
}

/* Botón primario con profundidad */
.btn-primary {
    box-shadow: 0 4px 14px rgba(233, 0, 82, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(233, 0, 82, 0.4);
}

/* Badges de estado más definidas sobre tema claro */
.badge-success { background: var(--color-success-soft); color: var(--color-success); }
.badge-danger  { background: var(--color-danger-soft);  color: var(--color-danger); }
.badge-warning { background: var(--color-warning-soft); color: var(--color-warning); }

/* ============================================================
   SKIN v2 · Premier League — decoraciones broadcast por página
   (clasificación · estadísticas · perfil de equipo)
   Las marcas bc-* sólo existen aquí; en v1 son inertes.
   ============================================================ */

/* --- Contraste de peso en nombres (primer-nombre fino + apellido black) --- */
.bc-name { display: inline; }
.bc-name__first {
    font-weight: var(--weight-regular);
    color: var(--color-text-muted);
}
.bc-name__last {
    font-weight: 900;
    color: var(--color-text-strong);
    letter-spacing: -0.015em;
}

/* --- Números de ranking gigantes translúcidos (estilo dorsal) --- */
.bc-rank-cell { white-space: nowrap; }
.bc-rank {
    display: inline-block;
    min-width: 1.3em;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 900;
    font-style: italic;
    font-size: 1.85rem;
    line-height: 1;
    color: var(--color-text-strong);
    opacity: 0.42;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
}
.bc-rank.is-champion,
.bc-rank.is-1 { color: #e0a200; opacity: 1; }
.bc-rank.is-2 { color: #8b94a3; opacity: 1; }
.bc-rank.is-3 { color: #c87d33; opacity: 1; }

@media (max-width: 639px) {
    .bc-rank { font-size: 1.4rem; }
}

/* --- Etiqueta de sección vertical (lateral, sólo desktop) --- */
@media (min-width: 768px) {
    .section-head--bc { padding-left: 2.75rem; }
    .section-head--bc::before { left: 22px; }
    .section-head--bc::after {
        content: attr(data-bc-label);
        position: absolute;
        left: -1px;
        top: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        font-family: var(--font-display);
        font-weight: 900;
        font-size: 0.7rem;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        color: var(--color-text-subtle);
        opacity: 0.7;
        white-space: nowrap;
        pointer-events: none;
    }
}

/* --- Marca de agua gigante (monograma del club) en el hero --- */
.club-hero { position: relative; overflow: hidden; }
.bc-hero-watermark {
    position: absolute;
    right: 0.02em;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-weight: 900;
    font-style: italic;
    font-size: clamp(8rem, 24vw, 17rem);
    line-height: 0.78;
    color: #ffffff;
    opacity: 0.08;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}
.club-hero__logo,
.club-hero__body { position: relative; z-index: 1; }

/* ====================  STANDINGS — POPUP DE RIVALES  ==================== */
.has-pop { cursor: help; }
.standings-table td.has-pop:hover { background: var(--color-surface-2); }

.std-tip {
    position: fixed;
    z-index: 9999;
    min-width: 190px;
    max-width: 260px;
    padding: var(--space-2);
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    font-size: var(--text-xs);
}
.cell-pop__title {
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.62rem;
    color: var(--color-text-muted);
    padding: 2px 4px 6px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--color-border);
}
.cell-pop__row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 4px;
}
.cell-pop__row img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}
.cell-pop__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text);
}
.cell-pop__n {
    font-weight: var(--weight-bold);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-display);
    color: var(--color-text-strong);
}

/* ====================  HERO STATS — broadcast PL  ==================== */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-3);
}
.hero-stat {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    position: relative;
    overflow: hidden;
}
.hero-stat::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--pl-gradient);
    opacity: 0.85;
}
.hero-stat__label {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    color: var(--color-accent);
}
.hero-stat__value {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: var(--text-2xl);
    line-height: 1.05;
    color: var(--color-text-strong);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
}
.hero-stat__value.pos { color: var(--color-success); }
.hero-stat__value.neg { color: var(--color-danger); }
.hero-stat__sub  { color: var(--color-text-muted); font-size: 0.55em; font-weight: 700; }
.hero-stat__meta { font-size: 0.72rem; color: var(--color-text-muted); margin-top: 2px; }
.hero-stat__match { margin-top: 6px; }
.hero-stat--match { background: linear-gradient(135deg, var(--color-surface) 0%, rgba(233,0,82,0.06) 100%); }

/* ====================  MATCH SCORE — broadcast PL  ==================== */
.match-score {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: inherit;
}
a.match-score:hover .match-score__num { color: var(--color-accent); }
.match-score__team {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.match-score__team--local   { justify-content: flex-end;   text-align: right; }
.match-score__team--visitor { justify-content: flex-start; text-align: left; }
.match-score__logo {
    width: 30px; height: 30px;
    object-fit: contain;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 4px;
    padding: 2px;
    box-shadow: var(--shadow-sm);
}
.match-score__name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.match-score__result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.match-score__nums {
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1;
}
.match-score__num {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: var(--text-2xl);
    line-height: 1;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
    padding: 0 4px;
    letter-spacing: -0.02em;
}
.match-score__sep { color: var(--color-text-muted); font-weight: 800; }
.match-score__vs {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.match-score__date { font-size: 0.7rem; color: var(--color-text-muted); }
.match-score--lg .match-score__num  { font-size: var(--text-4xl); font-weight: 900; }
.match-score--lg .match-score__logo { width: 52px; height: 52px; padding: 4px; }
.match-score--lg .match-score__name { font-size: 1.25rem; }
.match-score--sm .match-score__num  { font-size: 1.1rem; }
.match-score--sm .match-score__logo { width: 22px; height: 22px; padding: 1px; }
.match-score--sm .match-score__name { font-size: 0.8rem; }
.match-score--sm .match-score__vs   { font-size: 0.85rem; }
.match-score--compact { gap: 6px; }
.match-score--compact .match-score__num  { font-size: 1rem; }
.match-score--compact .match-score__logo { width: 18px; height: 18px; padding: 1px; }
.match-score--compact .match-score__name { font-size: 0.78rem; letter-spacing: 0; }

/* ====================  ZONAS DE LA CLASIFICACIÓN  ==================== */
.standings-table tr.zone-champ td:first-child { box-shadow: inset 4px 0 0 #e0a200; }
.standings-table tr.zone-uefa  td:first-child { box-shadow: inset 4px 0 0 var(--color-success); }
.standings-table tr.zone-conf  td:first-child { box-shadow: inset 4px 0 0 var(--color-accent); }
.standings-table tr.zone-releg td:first-child { box-shadow: inset 4px 0 0 var(--color-danger); }
.standings-table tr.zone-champ { background: linear-gradient(90deg, rgba(224,162,0,0.06) 0%, transparent 30%); }
.standings-table tr.zone-uefa  { background: linear-gradient(90deg, rgba(0,168,98,0.05) 0%, transparent 30%); }
.standings-table tr.zone-releg { background: linear-gradient(90deg, rgba(227,0,15,0.06) 0%, transparent 30%); }

/* Form guide visible en mobile */
@media (max-width: 639px) {
    .standings-table .col-form { display: table-cell !important; }
    .standings-table .col-form .form-pip { width: 13px; height: 13px; font-size: 8px; border-radius: 3px; }
    .standings-table .col-form .form-row { gap: 2px; }
}

/* ============================================================
   SKIN v2 · HEADER REDISEÑADO (broadcast PL)
   - Fondo púrpura con gradiente + cinta cereza arriba
   - Logo sobre tile blanco con sombra (como gráfico de TV)
   - Nav uppercase Archivo con subrayado cereza en hover/active
   - Drawer móvil también en púrpura
   ============================================================ */
.site-header {
    background: linear-gradient(135deg, #1c001f 0%, #37003c 55%, #4a0050 100%);
    border-bottom: 0;
    box-shadow:
        inset 0 -1px 0 rgba(255,255,255,0.06),
        0 4px 18px rgba(0,0,0,0.22);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}
/* Cinta de acento arriba (cerise → orange) */
.site-header::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: var(--pl-gradient);
    opacity: 0.95;
    pointer-events: none;
}

/* Logo sobre tile blanco */
.site-header__logo {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 6px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: transform var(--transition-fast);
}
.site-header__logo:hover { transform: translateY(-1px); }
.site-header__logo img { height: 28px; max-height: 28px; }

/* Usuario + skin toggle + logout — color blanco */
.site-header__user {
    color: rgba(255,255,255,0.9);
    font-weight: 700;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
}
.site-header__actions .btn {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: rgba(255,255,255,0.18);
    backdrop-filter: blur(4px);
}
.site-header__actions .btn:hover {
    background: rgba(255,255,255,0.16);
    color: #fff;
    border-color: rgba(255,255,255,0.32);
}
.site-header__actions .btn-primary {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    box-shadow: 0 2px 12px rgba(233,0,82,0.4);
}
.site-header__actions .btn-primary:hover {
    background: var(--color-accent-hover);
    box-shadow: 0 4px 18px rgba(233,0,82,0.55);
}

/* Hamburguesa blanca */
.nav-toggle {
    color: #fff;
    border-color: transparent;
}
.nav-toggle:hover { background: rgba(255,255,255,0.10); }

/* Bell de notificaciones sobre fondo oscuro */
.notif-bell {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius-md);
    width: 38px; height: 38px;
    cursor: pointer;
    position: relative;
    display: inline-grid;
    place-items: center;
    transition: background var(--transition-fast);
}
.notif-bell:hover { background: rgba(255,255,255,0.16); }
.notif-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    border-radius: 999px;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border: 2px solid #37003c;
    font-family: var(--font-display);
}

/* ===== DESKTOP NAV (>=1024px) — broadcast strip ===== */
@media (min-width: 1024px) {
    .site-nav__link,
    .site-nav__group-trigger {
        color: rgba(255,255,255,0.78);
        font-family: var(--font-display);
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-size: 0.74rem;
        padding: 10px 13px;
        position: relative;
        background: transparent;
        border-radius: 0;
        transition: color var(--transition-fast);
    }
    .site-nav__link:hover,
    .site-nav__group-trigger:hover {
        color: #fff;
        background: transparent;
    }
    /* Underline en hover (slide-in) */
    .site-nav__link::after,
    .site-nav__group-trigger::after {
        content: '';
        position: absolute;
        left: 13px; right: 13px;
        bottom: -1px;
        height: 3px;
        background: var(--pl-pink);
        border-radius: 2px 2px 0 0;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform var(--transition-fast);
    }
    .site-nav__link:hover::after,
    .site-nav__group-trigger:hover::after {
        transform: scaleX(0.65);
    }
    /* Active: underline completo + texto blanco */
    .site-nav__link.is-active {
        color: #fff;
        background: transparent;
    }
    .site-nav__link.is-active::after {
        transform: scaleX(1);
        background: var(--pl-pink);
        box-shadow: 0 0 12px rgba(233,0,82,0.6);
    }
    .site-nav__group-trigger .chev {
        color: rgba(255,255,255,0.55);
        margin-left: 4px;
    }

    /* Dropdown: tarjeta blanca con sombra grande */
    .site-nav__sub {
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        box-shadow: 0 12px 32px rgba(28,0,31,0.35);
        border-radius: var(--radius-md);
        padding: 6px;
        top: calc(100% + 6px);
        overflow: visible;
    }
    /* PUENTE invisible: cubre el gap entre el trigger y el submenú para que
       el hover no se rompa al pasar entre ellos. NO tocar — es el motivo
       por el que el menú se podía cerrar a medio camino. */
    .site-nav__sub::before {
        content: '';
        position: absolute;
        top: -10px;            /* gap 6px + un poquito extra de tolerancia */
        left: 0;
        right: 0;
        height: 10px;
        background: transparent;
    }
    /* Flechita decorativa apuntando al trigger */
    .site-nav__sub::after {
        content: '';
        position: absolute;
        left: 18px; top: -5px;
        width: 9px; height: 9px;
        background: var(--color-surface);
        border-left: 1px solid var(--color-border);
        border-top: 1px solid var(--color-border);
        transform: rotate(45deg);
        z-index: 1;
    }
    /* Hover-area extra debajo del trigger para que el cursor no caiga al "vacío" */
    .site-nav__group-trigger { padding-bottom: 14px; margin-bottom: -4px; }
    .site-nav__sub .site-nav__link {
        color: var(--color-text);
        font-family: var(--font-body);
        font-weight: 600;
        text-transform: none;
        letter-spacing: 0;
        font-size: 0.85rem;
        padding: 8px 12px;
        border-radius: var(--radius-sm);
    }
    .site-nav__sub .site-nav__link:hover {
        background: var(--color-accent-soft);
        color: var(--color-accent);
    }
    .site-nav__sub .site-nav__link::after,
    .site-nav__sub .site-nav__link:hover::after { display: none; }

    /* Admin destacado */
    .site-nav__admin {
        color: #fff !important;
        background: var(--color-accent) !important;
        border-radius: var(--radius-sm);
        padding-inline: 12px;
        box-shadow: 0 2px 10px rgba(233,0,82,0.4);
    }
    .site-nav__admin:hover {
        background: var(--color-accent-hover) !important;
        color: #fff !important;
    }
    .site-nav__admin::after,
    .site-nav__admin:hover::after { display: none; }
}

/* ===== MOBILE DRAWER — fondo púrpura ===== */
@media (max-width: 1023px) {
    .site-nav {
        background: linear-gradient(160deg, #1c001f 0%, #37003c 100%);
        border-top: 1px solid rgba(255,255,255,0.08);
    }
    .site-nav__list { padding: var(--space-3); }
    .site-nav__link,
    .site-nav__group-trigger {
        color: rgba(255,255,255,0.88);
        background: transparent;
        border-radius: var(--radius-md);
        font-weight: 600;
    }
    .site-nav__link:hover,
    .site-nav__group-trigger:hover {
        background: rgba(255,255,255,0.10);
        color: #fff;
    }
    .site-nav__link.is-active {
        background: var(--color-accent);
        color: #fff;
        box-shadow: 0 2px 12px rgba(233,0,82,0.4);
    }
    .site-nav__sub {
        background: rgba(0,0,0,0.18);
        border-radius: var(--radius-md);
        margin-top: 4px;
        padding: 4px;
    }
    .site-nav__sub .site-nav__link {
        color: rgba(255,255,255,0.75);
        font-size: 0.85rem;
    }
    .site-nav__sub .site-nav__link:hover {
        background: rgba(255,255,255,0.06);
        color: #fff;
    }
    .site-nav__group-trigger .chev { color: rgba(255,255,255,0.55); }
    .site-nav__admin {
        background: var(--color-accent) !important;
        color: #fff !important;
        box-shadow: 0 2px 12px rgba(233,0,82,0.4);
    }
}

/* Backdrop más oscuro y matching */
.nav-backdrop { background: rgba(28,0,31,0.75); }

/* ============================================================
   SKIN v2 · SPLASH BUMPER (1x por sesión)
   ============================================================ */
.ml-bumper {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    place-items: center;
    pointer-events: none;
    overflow: hidden;
}
.ml-bumper.is-playing { display: grid; pointer-events: auto; }
.ml-bumper.is-leaving {
    opacity: 0;
    transition: opacity 700ms ease-out;
}
.ml-bumper__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(233,0,82,0.35) 0%, transparent 60%),
        linear-gradient(135deg, #1c001f 0%, #37003c 55%, #4a0050 100%);
    transform: scale(1.04);
    opacity: 0;
    animation: ml-bumper-bg 1.6s ease-out forwards;
}
@keyframes ml-bumper-bg {
    0%   { opacity: 0; transform: scale(1.08); }
    18%  { opacity: 1; }
    100% { opacity: 1; transform: scale(1); }
}
.ml-bumper__core {
    position: relative;
    z-index: 1;
    text-align: center;
}
.ml-bumper__logo {
    height: clamp(72px, 12vw, 120px);
    width: auto;
    filter: drop-shadow(0 10px 32px rgba(0,0,0,0.45));
    opacity: 0;
    transform: scale(0.55);
    animation: ml-bumper-logo 850ms cubic-bezier(0.18, 1.2, 0.4, 1) 200ms forwards;
}
@keyframes ml-bumper-logo {
    to { opacity: 1; transform: scale(1); }
}
.ml-bumper__title {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: clamp(8px, 1.5vw, 18px);
    flex-wrap: wrap;
}
.ml-bumper__word {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 6.5vw, 5rem);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -0.025em;
    line-height: 1;
    opacity: 0;
    transform: translateY(18px);
    animation: ml-bumper-word 650ms cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
    text-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.ml-bumper__word:first-child  { animation-delay: 600ms; }
.ml-bumper__word--accent {
    color: #ff2d77;
    animation-delay: 850ms;
}
@keyframes ml-bumper-word {
    to { opacity: 1; transform: translateY(0); }
}

/* ====================  NEWS TICKER — broadcast PL  ==================== */
.news-ticker {
    overflow: hidden;
    background: linear-gradient(90deg, rgba(233,0,82,0.07) 0%, rgba(55,0,60,0.03) 50%, rgba(233,0,82,0.07) 100%);
    border-top: 1px solid var(--color-border);
    border-bottom: 2px solid var(--color-accent);
    padding: 8px 0;
    position: relative;
}
.news-ticker::before {
    content: 'EN VIVO';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 0 14px;
    background: var(--color-accent);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: 4px 0 12px rgba(233,0,82,0.25);
}
.news-ticker__track {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
    padding-left: max(100%, 110px);
    animation: news-ticker-scroll 90s linear infinite;
    will-change: transform;
}
.news-ticker:hover .news-ticker__track { animation-play-state: paused; }
@keyframes news-ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.news-ticker__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-size: 0.82rem;
    color: var(--color-text);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.news-ticker__icon { font-size: 1.05em; }
.news-ticker__sep  { color: var(--color-accent); font-weight: 900; margin: 0 4px; }

/* ====================  EVENT CARDS (partido_detalle) — broadcast PL  ==================== */
.events-list { list-style: none; padding: var(--space-3); margin: 0; display: flex; flex-direction: column; gap: 8px; }
.event-card {
    display: grid;
    grid-template-columns: 44px auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-border-strong);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    animation: event-card-in 380ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.event-card:hover { transform: translateX(2px); box-shadow: var(--shadow-md); }
@keyframes event-card-in {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}
/* Sin imagen → cae a 2 columnas */
.event-card:not(:has(.event-face)) { grid-template-columns: 44px 1fr; }
.event-card .event-icon {
    width: 44px; height: 44px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    color: #fff;
    background: var(--color-text-subtle);
    flex-shrink: 0;
}
.event-card .event-face {
    width: 40px; height: 40px;
    border-radius: 999px;
    object-fit: cover;
    background: var(--color-surface-2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.event-card .event-body { display: flex; flex-direction: column; min-width: 0; }
.event-card .event-name {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--color-text-strong);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.event-card .event-name:hover { color: var(--color-accent); }
.event-card .event-type {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}
/* Tipos: color codificado */
.event-card.is-goal     { border-left-color: var(--color-success); }
.event-card.is-goal .event-icon  { background: var(--color-success); }
.event-card.is-goal .event-type  { color: var(--color-success); }
.event-card.is-assist   { border-left-color: var(--color-accent); }
.event-card.is-assist .event-icon{ background: var(--color-accent); }
.event-card.is-assist .event-type{ color: var(--color-accent); }
.event-card.is-yellow   { border-left-color: var(--color-warning); }
.event-card.is-yellow .event-icon{ background: var(--color-warning); }
.event-card.is-yellow .event-type{ color: var(--color-warning); }
.event-card.is-red      { border-left-color: var(--color-danger); }
.event-card.is-red .event-icon   { background: var(--color-danger); }
.event-card.is-red .event-type   { color: var(--color-danger); }
.event-card.is-mvp      { border-left-color: #fdb931; }
.event-card.is-mvp .event-icon   { background: #fdb931; color: #1a1a1a; }
.event-card.is-mvp .event-type   { color: #c08600; }

/* ====================  VIEW TOGGLE (Tabla / Cartas) — base v2  ==================== */
.view-toggle {
    display: inline-flex;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    padding: 2px;
    gap: 2px;
    box-shadow: var(--shadow-sm);
}
.view-toggle__btn {
    background: transparent;
    border: 0;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font: inherit;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}
.view-toggle__btn:hover { color: var(--color-text); }
.view-toggle__btn.is-active {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(233,0,82,0.3);
}

/* ====================  PLAYER CARDS — base + broadcast PL  ==================== */
.player-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: var(--space-3);
}
.player-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 14px 12px 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.player-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-lg);
}
.player-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(180deg, var(--card-grad, var(--color-surface-2)) 0%, transparent 100%);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}
.player-card > * { position: relative; z-index: 1; }
.player-card__top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.player-card__tier {
    display: inline-grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.9rem;
    color: #fff;
    background: var(--color-text-subtle);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.player-card__pos {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 999px;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player-card__face-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 4px 0 10px;
}
.player-card__face {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: var(--color-surface-2);
    border: 3px solid #fff;
    box-shadow: 0 6px 18px rgba(55,0,60,0.18);
}
.player-card__name {
    width: 100%;
    margin-bottom: 10px;
    line-height: 1.15;
    overflow: hidden;
}
.player-card__name-first {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    display: block;
}
.player-card__name-last {
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.015em;
    color: var(--color-text-strong);
    font-size: 1.05rem;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player-card__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
    margin-top: auto;
}
.player-card__stat {
    background: var(--color-surface-2);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.player-card__stat span {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    font-weight: 700;
}
.player-card__stat strong {
    font-family: var(--font-display);
    font-weight: 900;
    color: var(--color-accent);
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}
.player-card__flags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
    justify-content: center;
}
.player-card__flag {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 999px;
}
.player-card__flag.is-loan   { background: rgba(0,168,98,0.15);  color: var(--color-success); }
.player-card__flag.is-sale   { background: rgba(227,0,15,0.15);  color: var(--color-danger); }
.player-card__flag.is-cesion { background: rgba(255,122,0,0.15); color: var(--color-warning); }

/* Tier color en el chip + gradiente del fondo + banda inferior */
.player-card.tier-1 .player-card__tier { background: #eab308; color: #1a2030; }
.player-card.tier-2 .player-card__tier { background: #0ea5e9; }
.player-card.tier-3 .player-card__tier { background: #22c55e; }
.player-card.tier-4 .player-card__tier { background: #64748b; }
.player-card.tier-5 .player-card__tier { background: #f97316; }
.player-card.tier-6 .player-card__tier { background: #ef4444; }
.player-card.tier-S .player-card__tier { background: #0ea5e9; }
.player-card.tier-A .player-card__tier { background: #22c55e; }
.player-card.tier-B .player-card__tier { background: #eab308; color: #1a2030; }
.player-card.tier-C .player-card__tier { background: #ef4444; }

.player-card.tier-1 { --card-grad: rgba(234,179,8,0.28); }
.player-card.tier-2 { --card-grad: rgba(14,165,233,0.25); }
.player-card.tier-3 { --card-grad: rgba(34,197,94,0.22); }
.player-card.tier-4 { --card-grad: rgba(100,116,139,0.22); }
.player-card.tier-5 { --card-grad: rgba(249,115,22,0.25); }
.player-card.tier-6 { --card-grad: rgba(239,68,68,0.22); }

.player-card.tier-1::after,
.player-card.tier-2::after,
.player-card.tier-3::after,
.player-card.tier-4::after,
.player-card.tier-5::after,
.player-card.tier-6::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0; height: 4px;
}
.player-card.tier-1::after { background: #eab308; }
.player-card.tier-2::after { background: #0ea5e9; }
.player-card.tier-3::after { background: #22c55e; }
.player-card.tier-4::after { background: #64748b; }
.player-card.tier-5::after { background: #f97316; }
.player-card.tier-6::after { background: #ef4444; }

/* ============================================================
   SKIN v2 · ESTADÍSTICAS — Cards con podio top-1
   ============================================================ */
.rank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 20px;
}
.rank-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.rank-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}
.rank-card__icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.rank-card__title {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: -0.015em;
    color: var(--color-text-strong);
    margin: 0;
}
.rank-card__sub {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* Podio (top scorer destacado) */
.rank-podium {
    display: grid;
    grid-template-columns: 40px 64px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: linear-gradient(135deg, var(--color-surface-2) 0%, rgba(253, 185, 49, 0.10) 100%);
    border: 1px solid #fdb931;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 4px 14px rgba(253, 185, 49, 0.15);
}
.rank-podium:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(253, 185, 49, 0.25); }
.rank-podium__pos {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 2.8rem;
    color: #fdb931;
    text-align: center;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(253, 185, 49, 0.35);
}
.rank-podium__face {
    width: 64px; height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fdb931;
    background: var(--color-surface);
}
.rank-podium__body { min-width: 0; }
.rank-podium__name {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    color: var(--color-text-strong);
    font-size: 1.05rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rank-podium__club {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}
.rank-podium__club img { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }
.rank-podium__value {
    text-align: center;
    line-height: 1;
}
.rank-podium__value strong {
    display: block;
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 2.2rem;
    line-height: 0.9;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.rank-podium__value span {
    display: block;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    font-weight: 700;
    margin-top: 4px;
}

/* Lista del resto */
.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    max-height: 520px;
}
.rank-list li + li { border-top: 1px solid var(--color-border); }
.rank-row {
    display: grid;
    grid-template-columns: 28px 36px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    text-decoration: none;
    color: inherit;
    transition: background var(--transition-fast);
}
.rank-row:hover { background: var(--color-surface-2); }
.rank-row__pos {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-text-subtle);
    text-align: center;
    opacity: 0.7;
}
.rank-row__pos.is-2 { color: #9aa4b2; opacity: 1; }
.rank-row__pos.is-3 { color: #c87d33; opacity: 1; }
.rank-row__face {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-surface-2);
}
.rank-row__body { min-width: 0; }
.rank-row__name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}
.rank-row__club {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}
.rank-row__club img { width: 14px; height: 14px; object-fit: contain; }
.rank-row__val {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
    padding-right: 4px;
}

/* ============================================================
   SKIN v2 · PALMARÉS — Hero + leaderboard + trophy cards
   ============================================================ */
.palmares-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 42px 30px 38px;
    margin-bottom: 24px;
    color: #fff;
    isolation: isolate;
}
.palmares-hero__bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 80% 30%, rgba(253, 185, 49, 0.45) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 90%, rgba(233, 0, 82, 0.35) 0%, transparent 55%),
        linear-gradient(135deg, #1c001f 0%, #37003c 60%, #4a0050 100%);
    z-index: -2;
}
.palmares-hero__shine {
    position: absolute;
    top: -50%; left: -10%; right: -10%; bottom: -50%;
    background: radial-gradient(ellipse 50% 30% at 50% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
    transform: rotate(-12deg);
    z-index: -1;
    pointer-events: none;
}
.palmares-hero__icon {
    position: absolute;
    right: 6%;
    top: 50%;
    transform: translateY(-50%) rotate(-12deg);
    font-size: clamp(7rem, 18vw, 13rem);
    color: rgba(253, 185, 49, 0.18);
    z-index: -1;
    pointer-events: none;
}
.palmares-hero__inner { position: relative; max-width: 720px; }
.palmares-hero__eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    padding: 6px 14px;
    border-radius: 999px;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 14px;
}
.palmares-hero__title {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    line-height: 0.95;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: -0.035em;
    color: #fff;
    text-shadow: 0 4px 28px rgba(0,0,0,0.4);
}
.palmares-hero__sub {
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    margin: 0;
}

/* Tabs */
.palmares-tabs {
    display: flex;
    gap: 8px;
    background: var(--color-surface-2);
    padding: 6px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.palmares-tab {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--color-text-muted);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-fast);
    min-width: 200px;
}
.palmares-tab:hover { color: var(--color-text-strong); background: var(--color-surface); }
.palmares-tab.is-active {
    background: var(--color-surface);
    color: var(--color-text-strong);
    box-shadow: var(--shadow-md);
}
.palmares-tab.is-active i { color: #fdb931; }
.palmares-tab__count {
    background: var(--color-accent);
    color: #fff;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
}
.palmares-tab.is-active .palmares-tab__count { background: var(--color-accent); }

/* Stats strip */
.palmares-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.palmares-stat {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    position: relative;
    overflow: hidden;
}
.palmares-stat::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--pl-gradient);
}
.palmares-stat__label {
    display: block;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    font-weight: 800;
    margin-bottom: 4px;
}
.palmares-stat__value {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--color-text-strong);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.palmares-stat__value--lg {
    font-size: 1.1rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Featured trophy card (más laureado) */
.trophy-card--featured {
    position: relative;
    background: linear-gradient(135deg, #fffbeb 0%, #fff 50%);
    border: 2px solid #fdb931;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 14px 40px rgba(253, 185, 49, 0.2);
    overflow: hidden;
}
.trophy-card--featured::after {
    content: '';
    position: absolute;
    right: -50px; top: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(253, 185, 49, 0.25) 0%, transparent 70%);
    pointer-events: none;
}
.trophy-card--featured.is-wonder {
    background: linear-gradient(135deg, #f0f9ff 0%, #fff 50%);
    border-color: #0ea5e9;
    box-shadow: 0 14px 40px rgba(14, 165, 233, 0.18);
}
.trophy-card--featured.is-wonder::after {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.2) 0%, transparent 70%);
}
.trophy-card__rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fdb931 0%, #f59e0b 100%);
    color: #1a1a1a;
    padding: 6px 14px;
    border-radius: 999px;
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 18px;
    box-shadow: 0 2px 10px rgba(253, 185, 49, 0.4);
    position: relative;
    z-index: 1;
}
.trophy-card--featured.is-wonder .trophy-card__rank-badge {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
}
.trophy-card__hero {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.trophy-card__hero-logo {
    width: 110px; height: 110px;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    flex-shrink: 0;
}
.trophy-card__hero-name {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--color-text-strong);
    line-height: 1;
}
.trophy-card__hero-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.trophy-card__hero-count strong {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--color-accent);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.trophy-card__hero-count span {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* Grid de trophy cards */
.trophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.trophy-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
}
.trophy-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.trophy-card.rank-2 { border-left: 4px solid #9aa4b2; }
.trophy-card.rank-3 { border-left: 4px solid #c87d33; }
.trophy-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}
.trophy-card__rank {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 1.4rem;
    color: var(--color-text-subtle);
    opacity: 0.65;
    flex-shrink: 0;
    width: 38px;
}
.trophy-card.rank-2 .trophy-card__rank { color: #9aa4b2; opacity: 1; }
.trophy-card.rank-3 .trophy-card__rank { color: #c87d33; opacity: 1; }
.trophy-card__logo {
    width: 48px; height: 48px;
    object-fit: contain;
    background: var(--color-surface-2);
    border-radius: var(--radius-sm);
    padding: 4px;
    flex-shrink: 0;
}
.trophy-card__head-body { min-width: 0; flex: 1; }
.trophy-card__name {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.015em;
    font-size: 1rem;
    margin: 0 0 4px;
    color: var(--color-text-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.trophy-card__count {
    display: inline-block;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    padding: 2px 9px;
    border-radius: 999px;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 0.72rem;
}
.trophy-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
}
.trophy-list li {
    padding: 6px 10px;
    background: var(--color-surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.trophy-list li i { color: #fdb931; font-size: 0.85em; flex-shrink: 0; }
.trophy-card--featured .trophy-list {
    max-height: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

@media (max-width: 600px) {
    .trophy-card__hero { flex-direction: column; text-align: center; }
    .trophy-card__hero-logo { width: 90px; height: 90px; }
    .palmares-hero { padding: 32px 22px; }
}

/* ============================================================
   SKIN v2 · CLASIFICACION — Header broadcast + Tabs + Vistas
   ============================================================ */

/* Header de la página — layout limpio sin vertical-label duplicado */
.clasif-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 14px 0 18px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 22px;
}
.clasif-header__main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.clasif-header__main .eyebrow {
    align-self: flex-start;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    padding: 4px 12px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 10px;
    line-height: 1;
}
.clasif-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 5.5vw, 3.4rem);
    text-transform: uppercase;
    letter-spacing: -0.035em;
    line-height: 1;
    margin: 0;
    color: var(--color-text-strong);
    position: relative;
    padding-bottom: 12px;
}
/* Línea de acento cereza fina y nítida debajo del título */
.clasif-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 64px;
    height: 4px;
    background: var(--pl-gradient);
    border-radius: 2px;
}
.clasif-sub {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin: 8px 0 0;
}
.clasif-header__filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.clasif-header__filters select { min-width: 180px; }
@media (max-width: 720px) {
    .clasif-header__filters select { min-width: 0; flex: 1 1 140px; }
}

/* Tabs estilo "channel selector" broadcast */
.clasif-tabs {
    display: flex;
    gap: 0;
    background: transparent;
    border-bottom: 2px solid var(--color-border);
    padding: 0;
    margin-bottom: 22px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.clasif-tab {
    background: transparent;
    border: 0;
    color: var(--color-text-muted);
    padding: 12px 18px 13px;
    margin-bottom: -2px;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: color var(--transition-fast), border-color var(--transition-fast);
    position: relative;
}
.clasif-tab i { font-size: 0.95em; opacity: 0.85; }
.clasif-tab:hover {
    color: var(--color-text-strong);
    border-bottom-color: var(--color-border-strong);
}
.clasif-tab.is-active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}
.clasif-tab.is-active::after {
    content: '';
    position: absolute;
    left: 18px; right: 18px; bottom: -2px;
    height: 3px;
    background: var(--color-accent);
    box-shadow: 0 0 14px rgba(233,0,82,0.6);
    border-radius: 2px 2px 0 0;
}

/* === Matriz cruzados === */
.cruzados-wrap { padding: 14px; overflow-x: auto; }
.cruzados-table { border-collapse: collapse; min-width: 100%; }
.cruzados-table th, .cruzados-table td { border: 1px solid var(--color-border); padding: 0; text-align: center; }
.cruzados-corner {
    background: var(--color-surface-2);
    padding: 8px 12px;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    font-weight: 800;
    position: sticky; left: 0; z-index: 2;
}
.cruzados-head { background: var(--color-surface-2); padding: 6px; }
.cruzados-head img { width: 26px; height: 26px; object-fit: contain; }
.cruzados-row-head {
    background: var(--color-surface);
    padding: 6px 10px;
    text-align: left;
    font-weight: 700;
    color: var(--color-text);
    position: sticky; left: 0; z-index: 1;
    white-space: nowrap;
}
.cruzados-row-head img { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 6px; }
.cruzados-cell {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.85rem;
    width: 56px; height: 40px;
    color: var(--color-text-strong);
    font-variant-numeric: tabular-nums;
}
.cruzados-cell a { text-decoration: none; color: inherit; display: block; padding: 8px 0; }
.cruzados-cell--self    { background: repeating-linear-gradient(45deg, var(--color-surface-2), var(--color-surface-2) 4px, var(--color-surface) 4px, var(--color-surface) 8px); color: var(--color-text-subtle); }
.cruzados-cell--win     { background: rgba(0,168,98,0.18); }
.cruzados-cell--draw    { background: rgba(255,122,0,0.18); }
.cruzados-cell--loss    { background: rgba(227,0,15,0.18); }
.cruzados-cell--pending { background: var(--color-surface); color: var(--color-text-subtle); }
.cruzados-cell--susp    { background: var(--color-surface); color: var(--color-text-muted); }
.cruzados-cell--none    { background: var(--color-surface); color: var(--color-text-subtle); }

.cruzados-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 14px 4px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.legend-chip { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 5px; }
.legend-chip.win  { background: rgba(0,168,98,0.45); }
.legend-chip.draw { background: rgba(255,122,0,0.45); }
.legend-chip.loss { background: rgba(227,0,15,0.45); }
.legend-chip.pending { background: var(--color-surface-2); border: 1px solid var(--color-border); }

/* === Evolución (SVG) === */
.evolucion-wrap { padding: 8px; }
.evolucion-head { margin-bottom: 12px; }
.evolucion-head h3 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; letter-spacing: -0.015em; margin: 4px 0 4px; color: var(--color-text-strong); }
.evolucion-chart-wrap { overflow-x: auto; width: 100%; }
.evolucion-chart { display: block; min-width: 600px; }
.evolucion-chart .evo-team { transition: opacity 0.18s, filter 0.18s; cursor: pointer; }
.evolucion-chart .evo-team .evo-line { transition: stroke-width 0.15s, opacity 0.15s; }
.evolucion-chart .evo-team .evo-halo { transition: stroke-width 0.15s, r 0.15s; }
/* Cuando un equipo está siendo highlighted (hover o pinned), el resto se apaga */
.evolucion-chart.has-hover .evo-team,
.evolucion-chart.has-active .evo-team { opacity: 0.15; filter: saturate(0.4); }
/* El destacado */
.evolucion-chart .evo-team.is-hover,
.evolucion-chart .evo-team.is-active {
    opacity: 1 !important;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.28)) drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}
.evolucion-chart .evo-team.is-hover .evo-line,
.evolucion-chart .evo-team.is-active .evo-line { stroke-width: 4.5; opacity: 1; }
.evolucion-chart .evo-team.is-hover .evo-halo,
.evolucion-chart .evo-team.is-active .evo-halo { stroke-width: 4; r: 17; }

/* === Goles === */
.goles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.goles-kpi {
    background: var(--color-surface-2);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    border-left: 4px solid var(--color-accent);
}
.goles-kpi__label { display: block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); font-weight: 800; margin-bottom: 6px; }
.goles-kpi__value { font-family: var(--font-display); font-weight: 900; font-size: 2.2rem; color: var(--color-text-strong); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.goles-card {
    background: var(--color-surface-2);
    border-radius: var(--radius-md);
    padding: 16px;
    grid-column: span 2;
}
.goles-card h4 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 0.85rem; margin: 0 0 12px; color: var(--color-text-strong); letter-spacing: 0.03em; }
.goles-card--results { grid-column: span 2; }
.goles-bar-row { display: grid; grid-template-columns: 160px 1fr 36px; gap: 8px; align-items: center; padding: 4px 0; }
.goles-bar-team { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.82rem; color: var(--color-text); font-weight: 600; }
.goles-bar-team img { width: 18px; height: 18px; object-fit: contain; }
.goles-bar-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goles-bar-track { background: var(--color-surface); border-radius: 999px; height: 8px; overflow: hidden; }
.goles-bar-fill { height: 100%; border-radius: 999px; transition: width 600ms ease-out; }
.goles-bar-val { font-family: var(--font-display); font-weight: 900; color: var(--color-text-strong); text-align: right; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.goles-result-row { display: grid; grid-template-columns: 50px 1fr 50px; gap: 8px; align-items: center; padding: 4px 0; }
.goles-result-score { font-family: var(--font-display); font-weight: 900; color: var(--color-text-strong); font-size: 1rem; }
.goles-result-count { font-size: 0.82rem; color: var(--color-text-muted); text-align: right; font-weight: 700; }

@media (max-width: 720px) {
    .goles-card { grid-column: span 1; }
    .goles-bar-row { grid-template-columns: 110px 1fr 30px; }
}

/* === Goleadas (dif >= 4) === */
.goles-card--goleadas { grid-column: span 2; }
.goleadas-count {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    padding: 2px 9px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.75rem;
    margin-left: 6px;
    vertical-align: middle;
}
.goleadas-list { display: flex; flex-direction: column; gap: 6px; }
.goleada-row {
    display: grid;
    grid-template-columns: 48px 1fr 80px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.goleada-row:hover { transform: translateX(2px); border-color: var(--color-accent); }
.goleada-dif {
    background: var(--color-accent);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 900;
    text-align: center;
    border-radius: var(--radius-sm);
    padding: 4px 0;
    font-size: 0.85rem;
    letter-spacing: -0.01em;
}
.goleada-team {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text);
}
.goleada-team img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.goleada-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goleada-team.is-winner { color: var(--color-text-strong); font-weight: 800; }
.goleada-team:last-child { justify-content: flex-end; text-align: right; }
.goleada-score {
    font-family: var(--font-display);
    font-weight: 900;
    color: var(--color-accent);
    text-align: center;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}
.goleadas-more-btn {
    margin-top: 10px;
    width: 100%;
    background: var(--color-surface);
    border: 1px dashed var(--color-accent);
    color: var(--color-accent);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.goleadas-more-btn:hover { background: var(--color-accent); color: #fff; }

/* Modal de goleadas */
.goleadas-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(28, 0, 31, 0.7);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    padding: 20px;
    align-items: center;
    justify-content: center;
    animation: goleadas-fade 200ms ease-out;
}
.goleadas-modal.is-open { display: flex; }
@keyframes goleadas-fade { from { opacity: 0; } to { opacity: 1; } }
.goleadas-modal__panel {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: goleadas-slide 260ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes goleadas-slide { from { transform: translateY(20px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.goleadas-modal__head {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(180deg, rgba(233,0,82,0.05) 0%, transparent 100%);
}
.goleadas-modal__head h3 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--color-text-strong);
    margin: 0;
}
.goleadas-modal__close {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all var(--transition-fast);
}
.goleadas-modal__close:hover { background: var(--color-accent); color: #fff; border-color: var(--color-accent); transform: rotate(90deg); }
.goleadas-modal__body {
    padding: 16px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
@media (max-width: 580px) {
    .goleada-row { grid-template-columns: 40px 1fr 60px 1fr; gap: 6px; padding: 8px; font-size: 0.8rem; }
    .goleada-team img { width: 18px; height: 18px; }
}

/* ============================================================
   SKIN v2 · PARTIDOS — progreso + jornadas con 3 estados
   ============================================================ */
.fixture-progress {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.fixture-progress::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--pl-gradient);
}
.fixture-progress__top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.fixture-progress__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.4rem;
    margin: 4px 0 0;
    text-transform: uppercase;
    letter-spacing: -0.015em;
    color: var(--color-text-strong);
}
.fixture-progress__pct {
    text-align: right;
    font-family: var(--font-display);
}
.fixture-progress__pct span {
    display: block;
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.fixture-progress__pct small {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    font-weight: 700;
}
.fixture-progress__bar {
    height: 8px;
    background: var(--color-surface-2);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}
.fixture-progress__fill {
    height: 100%;
    background: var(--pl-gradient);
    border-radius: 999px;
    transition: width 600ms ease-out;
}
.fixture-progress__meta {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* Grupos de jornadas */
.jornada-group { margin-bottom: 14px; }
.jornada-group__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px 10px;
}
.jornada-group__head .eyebrow {
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* === Mega-toggle de "Jornadas cerradas" (compacta todas las jugadas) === */
.jornadas-meta-group {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    overflow: hidden;
}
.jornadas-meta-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--color-text);
    font: inherit;
    text-align: left;
}
.jornadas-meta-toggle:hover { background: var(--color-surface-2); }
.jornadas-meta-toggle__icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0,168,98,0.15);
    color: var(--color-success);
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.jornadas-meta-toggle__label {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-shrink: 0;
}
.jornadas-meta-toggle__label strong {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--color-text-strong);
    font-size: 0.95rem;
}
.jornadas-meta-toggle__sub {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}
.jornadas-meta-toggle__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    margin-left: 12px;
    max-height: 26px;
    overflow: hidden;
}
.jornada-chip {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 22px;
    padding: 0 6px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.66rem;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}
.jornadas-meta-toggle .chev {
    margin-left: 6px;
    transition: transform var(--transition-base);
    color: var(--color-text-subtle);
    flex-shrink: 0;
}
.jornadas-meta-group[data-open="true"] .chev { transform: rotate(180deg); }
.jornadas-meta-body {
    display: none;
    padding: 0 12px 12px;
}
.jornadas-meta-group[data-open="true"] .jornadas-meta-body { display: block; }
/* Cuando está abierta, los jornada-block internos van compactos */
.jornadas-meta-body .jornada-block { margin-bottom: 6px; }

@media (max-width: 720px) {
    .jornadas-meta-toggle__chips { display: none; }
    .jornadas-meta-toggle { gap: 10px; padding: 10px 12px; }
}

/* Jornada (acordeón) */
.jornada-block {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
}
.jornada-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 18px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--color-text);
    font: inherit;
    text-align: left;
}
.jornada-toggle__main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.jornada-toggle__name {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--color-text-strong);
}
.jornada-toggle__badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.jornada-toggle__badge.is-current { background: var(--color-accent); color: #fff; box-shadow: 0 2px 10px rgba(233,0,82,0.35); animation: pulse-current 2s ease-in-out infinite; }
@keyframes pulse-current { 0%, 100% { box-shadow: 0 2px 10px rgba(233,0,82,0.35); } 50% { box-shadow: 0 2px 18px rgba(233,0,82,0.65); } }
.jornada-toggle__badge.is-played  { background: rgba(0,168,98,0.15); color: var(--color-success); }
.jornada-toggle__badge.is-future  { background: var(--color-surface-2); color: var(--color-text-muted); }
.jornada-toggle__meta {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    margin-left: 12px;
    white-space: nowrap;
}
.jornada-toggle .chev {
    margin-left: 8px;
    transition: transform var(--transition-base);
    color: var(--color-text-subtle);
}
.jornada-block.is-open .chev { transform: rotate(180deg); }

.jornada-list {
    display: none;
    padding: 4px 14px 14px;
    gap: 10px;
    flex-direction: column;
}
.jornada-block.is-open .jornada-list { display: flex; }

/* === Estados === */
/* CURRENT — destacada, gradiente sutil, animación */
.jornada-block--current {
    border: 2px solid var(--color-accent);
    background: linear-gradient(180deg, rgba(233,0,82,0.04) 0%, var(--color-surface) 100%);
    box-shadow: 0 8px 30px rgba(233,0,82,0.15);
    margin: 18px 0;
}
.jornada-block--current .jornada-toggle__name { font-size: 1.35rem; }
.jornada-block--current .jornada-toggle { padding: 16px 22px; }
.jornada-block--current .fixture-card { padding: 16px 18px; }

/* PLAYED — compacta, muted */
.jornada-block--played {
    background: var(--color-surface-2);
    border-color: var(--color-border);
}
.jornada-block--played .jornada-toggle { padding: 10px 16px; }
.jornada-block--played .jornada-toggle__name { font-size: 0.95rem; }

/* FUTURE — neutral, slim */
.jornada-block--future {
    border-style: dashed;
}
.jornada-block--future .jornada-toggle { padding: 10px 16px; }
.jornada-block--future .jornada-toggle__name { font-size: 0.95rem; opacity: 0.85; }

/* Fixture card (un partido) */
.fixture-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}
.fixture-card.status-pending { border-left: 3px solid var(--color-warning); }
.fixture-card.status-played { border-left: 3px solid var(--color-success); }
.fixture-card.status-suspended { border-left: 3px solid var(--color-text-subtle); }
.fixture-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.fixture-card .match-score { min-width: 0; flex: 1; }

.status-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.status-pill.played    { background: rgba(0,168,98,0.15);  color: var(--color-success); }
.status-pill.pending   { background: rgba(255,122,0,0.15); color: var(--color-warning); }
.status-pill.suspended { background: rgba(107,114,128,0.18); color: var(--color-text-muted); }

.icon-btn {
    width: 30px; height: 30px;
    border-radius: var(--radius-sm);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    display: inline-grid;
    place-items: center;
    text-decoration: none;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.icon-btn:hover { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

@media (max-width: 640px) {
    .fixture-card { grid-template-columns: 1fr; }
    .fixture-card__meta { justify-content: flex-start; }
    .fixture-progress__pct span { font-size: 1.8rem; }
}

/* ============================================================
   SKIN v2 · HOME (index.php) — Hero broadcast + Bento layout
   ============================================================ */
.home-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: clamp(60px, 9vw, 110px) 0 clamp(50px, 7vw, 90px);
    margin-bottom: 0;
    isolation: isolate;
}
.home-hero__bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 85% 15%, rgba(255,107,0,0.35) 0%, transparent 50%),
        radial-gradient(ellipse at 15% 85%, rgba(233,0,82,0.45) 0%, transparent 55%),
        linear-gradient(135deg, #1c001f 0%, #37003c 55%, #4a0050 100%);
    z-index: -2;
}
.home-hero__grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, rgba(0,0,0,0.6) 0%, transparent 100%);
            mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, rgba(0,0,0,0.6) 0%, transparent 100%);
    z-index: -1;
    pointer-events: none;
}
.home-hero__watermark {
    position: absolute;
    right: -4%; bottom: -25%;
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(20rem, 42vw, 38rem);
    color: rgba(255,255,255,0.045);
    line-height: 0.8;
    letter-spacing: -0.06em;
    pointer-events: none;
    user-select: none;
    z-index: -1;
}
.home-hero__inner {
    position: relative;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}
.home-hero__eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.10);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    color: #fff;
    padding: 7px 16px;
    border-radius: 999px;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 22px;
    border: 1px solid rgba(255,255,255,0.22);
}
.home-hero__title {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 9vw, 7rem);
    line-height: 0.92;
    margin: 0 0 22px;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    text-shadow: 0 6px 32px rgba(0,0,0,0.35);
}
.home-hero__title-1 { color: #fff; }
.home-hero__title-2 {
    color: #ff2d77;
    margin-left: 0.18em;
    display: inline-block;
    text-shadow: 0 0 36px rgba(233,0,82,0.55);
}
.home-hero__lead {
    color: rgba(255,255,255,0.88);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.6;
}
.home-hero__ctas {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}
.home-hero__ctas .btn {
    padding: 14px 26px;
    font-size: 0.92rem;
}
.btn-ghost-on-dark {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.28);
    color: #fff;
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btn-ghost-on-dark:hover {
    background: rgba(255,255,255,0.20);
    border-color: rgba(255,255,255,0.55);
    color: #fff;
    transform: translateY(-1px);
}

.home-hero__stats {
    list-style: none;
    padding: 36px 0 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 24px;
    border-top: 1px solid rgba(255,255,255,0.14);
}
.home-hero__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
}
.home-hero__stat strong {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: clamp(1.9rem, 4.2vw, 3rem);
    line-height: 1;
    color: #ff2d77;
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.home-hero__stat span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.72);
    font-weight: 700;
}

/* --- Bento (resultados + noticias) --- */
.home-bento {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-top: 48px;
    margin-bottom: 48px;
}
@media (max-width: 900px) {
    .home-bento { grid-template-columns: 1fr; }
}
.home-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.home-card__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 8px;
}
.home-card__head .eyebrow {
    display: inline-block;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.home-card__title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -0.015em;
    color: var(--color-text-strong);
}
.home-card__title i { color: var(--color-accent); margin-right: 8px; }
.home-card__link {
    color: var(--color-accent);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.home-card__link:hover { color: var(--color-accent-hover); }
.home-card__link i { margin-left: 4px; font-size: 0.85em; }
.home-card__body { display: flex; flex-direction: column; gap: 14px; }

.home-result-row {
    position: relative;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px 18px 14px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.home-result-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.home-result-row__torneo {
    position: absolute;
    top: -9px; left: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 3px 10px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--color-accent);
}

.home-news-item {
    display: flex;
    gap: 12px;
    background: var(--color-surface-2);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-fast), background var(--transition-fast);
    border-left: 3px solid var(--color-text-subtle);
}
.home-news-item:hover {
    transform: translateX(3px);
    background: var(--color-surface);
    border-color: var(--color-accent);
}
.home-news-item--fichaje    { border-left-color: var(--color-success); }
.home-news-item--partido    { border-left-color: var(--color-accent); }
.home-news-item--comunicado { border-left-color: var(--color-warning); }
.home-news-item__icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--color-surface);
    color: var(--color-text-muted);
}
.home-news-item--fichaje .home-news-item__icon    { color: var(--color-success); }
.home-news-item--partido .home-news-item__icon    { color: var(--color-accent); }
.home-news-item--comunicado .home-news-item__icon { color: var(--color-warning); }
.home-news-item__body { flex: 1; min-width: 0; }
.home-news-item__meta {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-muted);
    font-weight: 700;
}
.home-news-item__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.98rem;
    color: var(--color-text-strong);
    margin: 4px 0 4px;
    line-height: 1.3;
}
.home-news-item__text {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
            line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Toggle de tema (sol/luna) en el header */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
    transform: rotate(20deg);
}
.theme-toggle .fa-sun  { color: #fcd34d; }
.theme-toggle .fa-moon { color: #e2e8f0; }

/* Especificidad: el bloque viejo `.view-toggle button` (selector de elemento)
   gana por specificity sobre `.view-toggle__btn`. Lo subimos a 2 clases. */
.view-toggle .view-toggle__btn {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.72rem;
    background: transparent;
    color: var(--color-text-muted);
}
.view-toggle .view-toggle__btn:hover { color: var(--color-text); background: transparent; }
.view-toggle .view-toggle__btn.is-active {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(233,0,82,0.3);
}

/* Gradiente por tier en la mitad superior */
.player-card.tier-1 { --card-grad: rgba(234,179,8,0.28); }
.player-card.tier-2 { --card-grad: rgba(14,165,233,0.25); }
.player-card.tier-3 { --card-grad: rgba(34,197,94,0.22); }
.player-card.tier-4 { --card-grad: rgba(100,116,139,0.22); }
.player-card.tier-5 { --card-grad: rgba(249,115,22,0.25); }
.player-card.tier-6 { --card-grad: rgba(239,68,68,0.22); }
.player-card.tier-1::after,
.player-card.tier-2::after,
.player-card.tier-3::after,
.player-card.tier-4::after,
.player-card.tier-5::after,
.player-card.tier-6::after {
    /* Banda de color en el borde inferior */
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0; height: 4px;
    background: currentColor;
    opacity: 0.7;
}
.player-card.tier-1::after { color: #eab308; }
.player-card.tier-2::after { color: #0ea5e9; }
.player-card.tier-3::after { color: #22c55e; }
.player-card.tier-4::after { color: #64748b; }
.player-card.tier-5::after { color: #f97316; }
.player-card.tier-6::after { color: #ef4444; }
