
:root {
    --lm-primary: #18B7E8;
    --lm-primary-dark: #119FD0;
    --lm-secondary: #2F4F6F;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    background: radial-gradient(circle at top, #dfe8ff 0%, #f3f4f6 70%);
}

/* ---------------------------------------------- */
/*                SIDEBAR BASE                    */
/* ---------------------------------------------- */

.sidebar {
    background: linear-gradient(180deg, #111827 0%, #020617 100%);
    width: 240px;
    min-height: 100vh;
    border-right: 1px solid rgba(255,255,255,0.06);
}

    /* Links del sidebar */
    .sidebar .nav-link {
        color: #e2e8f0 !important;
        border-radius: .375rem;
    }

        .sidebar .nav-link i {
            margin-right: 6px;
        }

        .sidebar .nav-link.active {
            background-color: #0d6efd !important;
            color: #fff !important;
        }

        .sidebar .nav-link:hover {
            background-color: rgba(255,255,255,0.06);
        }

    .sidebar .navbar-brand {
        font-size: 0.95rem;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #f1f5f9 !important;
        font-weight: 700;
    }

/* Títulos de secciones del sidebar */
.sidebar-section-title {
    width: 100%;
    background: transparent;
    border: 0;
    padding: .25rem 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #94a3b8 !important;
    margin-bottom: .25rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s, background-color 0.2s;
    margin-left: 4px;
}

    .sidebar-section-title:hover {
        color: #e5e7eb;
        background-color: #334155; /* un gris azulado */
        border-radius: 6px;
    }

.sidebar-logo-img {
    max-width: 90px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

    .sidebar-logo-img:hover {
        transform: scale(1.03);
        transition: transform .15s ease-in-out;
    }

.sidebar .nav-link:not(.active):hover {
    background-color: rgba(255,255,255,0.08);
}

/* ---------------------------------------------- */
/*            COMPORTAMIENTO RESPONSIVE           */
/* ---------------------------------------------- */

/* Escritorio */
@media (min-width: 768px) {

    .sidebar {
        position: relative;
        flex: 0 0 240px; /* item del flex con ancho 240 */
        transform: translateX(0);
        transition: transform 0.2s ease-in-out, width 0.2s ease-in-out, flex-basis 0.2s ease-in-out;
    }

        .sidebar.sidebar-collapsed {
            transform: translateX(-100%); /* se mueve a la izquierda */
            width: 0; /* deja de ocupar ancho */
            flex-basis: 0; /* el contenedor principal se corre */
            overflow: hidden; /* oculta el contenido interno */
        }
}

/* Móviles: sidebar oculto por defecto, visible con .sidebar-open */
@media (max-width: 767.98px) {

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1040;
        width: 240px;
        transform: translateX(-100%);
        transition: transform 0.2s ease-in-out;
    }

        .sidebar.sidebar-open {
            transform: translateX(0);
        }
}

/* ---------------------------------------------- */
/*                 SIDEBAR OVERLAY                */
/* ---------------------------------------------- */

.sidebar-overlay {
    position: fixed;
    inset: 0; /* equivale a top:0; right:0; bottom:0; left:0 */
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1030; /* debajo del sidebar (1040) pero encima del contenido */
    opacity: 0;
    pointer-events: none; /* no bloquea clics cuando está oculto */
    transition: opacity 0.2s ease-in-out;
}

    /* Cuando está visible */
    .sidebar-overlay.visible {
        opacity: 1;
        pointer-events: auto; /* ahora sí captura clics para cerrar el menú */
    }

/* Flechita (chevron) que rota al colapsar */
.sidebar-section-chevron {
    transition: transform 0.2s ease-in-out;
    display: inline-block;
}

.sidebar-section-title[aria-expanded="true"] .sidebar-section-chevron {
    transform: rotate(180deg);
}

/* ------------------------------ */
/*        DASHBOARD CARDS         */
/* ------------------------------ */

.card-dashboard {
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    background-color: #ffffff;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out, background-color 0.18s ease-out;
}

    .card-dashboard:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 35px rgba(15, 23, 42, 0.16);
        background-color: #f9fafb;
        border-color: #dbeafe;
    }

    .card-dashboard .card-title {
        font-weight: 600;
    }

    .card-dashboard .card-text {
        font-size: .9rem;
    }

/* Header del dashboard */
.dashboard-header h1 {
    font-weight: 600;
}

.dashboard-chip {
    font-size: 0.8rem;
}

/* Icono circular en las cards del panel */
.card-dashboard-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eff6ff; /* azul muy suave */
    color: #0d6efd;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, background-color 0.18s ease-out;
}

.card-dashboard:hover .card-dashboard-icon {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
    background-color: #e0edff;
}

.card-dashboard-primary:hover {
    border-color: #2563eb; /* azul */
}

.card-dashboard-admin:hover {
    border-color: #16a34a; /* verde */
}

.card-dashboard-secondary:hover {
    border-color: #0ea5e9; /* celeste */
}

/* Variante para administración */
.card-dashboard-icon-admin {
    background-color: #ecfdf3; /* verde muy suave */
    color: #16a34a;
}

/* Acentos en la parte superior de las cards */
.card-dashboard-primary {
    border-top: 3px solid #0d6efd;
}

.card-dashboard-admin {
    border-top: 3px solid #16a34a;
}

.home-hero {
    max-width: 1100px;
    margin: 0 auto; /* centrado */
    border-radius: 1rem;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, #eef5ff 0%, #ecfdf3 100%);
    backdrop-filter: blur(2px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.home-hero-inner {
    max-width: 960px;
    margin: 0 auto; /* centra el contenido dentro del hero */
}

.page-header {
    font-size: .85rem;
    letter-spacing: .02em;
    color: #6b7280;
}

/* Borde superior para la card de Catálogos */
.card-dashboard-secondary {
    border-top: 3px solid #0ea5e9; /* celeste */
}

/* Solo cambia color del icono, conservando el estilo circular base */
.card-dashboard-icon-secondary {
    background-color: #e0f2fe; /* azul claro */
    color: #0284c7; /* azul más intenso */
}

/* ---------------------------------------------- */
/*                 LOGIN STYLES                   */
/* ---------------------------------------------- */

.login-card {
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    padding: 2rem 2.25rem;
    background-color: #ffffff;
}

@media (max-width: 576px) {
    .login-card {
        padding: 1.5rem;
    }
}

.login-card-header {
    margin-bottom: 1.5rem;
}

    .login-card-header img {
        margin-bottom: 6px;
    }

.login-logo {
    height: 80px;
}

.login-brand-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

    .login-brand-name span {
        color: inherit;
        font-weight: inherit;
    }

.login-brand-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

.login-card .form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #374151;
}

.login-card .input-group-text {
    background-color: #f9fafb;
    border-color: #e5e7eb;
}

/* Inputs del login más modernos */
.login-card .form-control {
    border-radius: 10px;
    border: 1px solid #d1d5db;
}

    .login-card .form-control:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    }

/* Texto pequeño debajo del botón */
.login-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

/* ------------------------------ */
/*        LOGIN FULL DARK         */
/* ------------------------------ */

.login-card--dark {
    border-radius: 16px;
    background: linear-gradient(180deg, #111827 0%, #020617 100%);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.30);
    border: 1px solid rgba(255,255,255,0.08);
}

    /* Header */
    .login-card--dark .login-card-header {
        margin-bottom: 1.4rem;
    }

    /* Logo */
    .login-card--dark .login-logo {
        height: 56px;
        width: auto;
        margin-bottom: .35rem;
    }

    /* Wordmark */
    .login-card--dark .login-brand-name {
        font-size: 1.25rem;
        font-weight: 300;
        letter-spacing: 0.02em;
        color: #e5e7eb;
        white-space: nowrap;
        line-height: 1.15;
    }

    /* Colores wordmark */
    .login-card--dark .brand-league {
        color: #7dd3fc;
        font-weight: 500;
    }

    .login-card--dark .brand-master {
        color: #e5e7eb;
        font-weight: 500;
    }

    .login-card--dark .brand-g,
    .login-card--dark .brand-t {
        color: #38bdf8;
        font-weight: 600;
    }

    /* Subtítulo */
    .login-card--dark .login-brand-subtitle {
        font-size: 0.78rem;
        color: #9ca3af;
        margin-top: .35rem;
    }

    /* Títulos y textos */
    .login-card--dark h5 {
        color: #e5e7eb;
    }

    .login-card--dark .login-label,
    .login-card--dark .form-label {
        color: #cbd5e1;
    }

.login-muted {
    color: #9ca3af !important;
}

/* ------------------------------ */
/* Inputs dark (equilibrados)     */
/* ------------------------------ */

.login-card--dark .input-group-text {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.14);
    color: #cbd5e1;
}

.login-card--dark .form-control {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.14);
    color: #e5e7eb;
}

    .login-card--dark .form-control::placeholder {
        color: rgba(229,231,235,0.55);
    }

    .login-card--dark .form-control:focus {
        background: rgba(255,255,255,0.08);
        border-color: rgba(56,189,248,0.55);
        box-shadow: 0 0 0 3px rgba(56,189,248,0.20);
        color: #ffffff;
    }

/* ------------------------------ */
/* Checkbox dark                  */
/* ------------------------------ */

.login-card--dark .form-check-label {
    color: #cbd5e1;
}

.login-card--dark .form-check-input {
    background-color: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.22);
}

    .login-card--dark .form-check-input:checked {
        background-color: #0d6efd;
        border-color: #0d6efd;
    }

/* ------------------------------ */
/* Botón                          */
/* ------------------------------ */

.login-card--dark .btn-primary {
    box-shadow: 0 8px 22px rgba(13,110,253,.35);
}

    .login-card--dark .btn-primary:hover {
        box-shadow: 0 12px 28px rgba(13,110,253,.45);
    }

/* ------------------------------ */
/* Fondo auth                     */
/* ------------------------------ */

body.auth-bg {
    background: radial-gradient( circle at top, rgba(56,189,248,.14) 0%, rgba(2,6,23,0) 45% ), linear-gradient( 180deg, #eef2ff 0%, #f8fafc 60%, #f8fafc 100% ) !important;
}

/* ------------------------------ */
/* Mobile tweaks                  */
/* ------------------------------ */

@media (max-width: 576px) {

    .login-card--dark {
        border-radius: 14px;
    }

        .login-card--dark .login-logo {
            height: 50px;
        }

        .login-card--dark .login-brand-name {
            font-size: 1.15rem;
        }
}

/* ---------------------------------------------- */
/*        LOGIN – ANIMACIÓN DE ENTRADA            */
/* ---------------------------------------------- */

@keyframes loginEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card--dark {
    animation: loginEnter .45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Respeta accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .login-card--dark {
        animation: none;
    }
}

/* ---------------------------------------------- */
/*          BRAND (Landing / Login Dark)          */
/* ---------------------------------------------- */

.lm-brand-logo-vertical {
    width: min(230px, 70%);
    height: auto;
    display: block;
    margin: 0 auto 18px auto;
    filter: drop-shadow(0 14px 28px rgba(0,0,0,0.30));
}

/* Desktop grande */
@media (min-width: 1200px) {
    .lm-brand-logo-vertical {
        width: 250px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .lm-brand-logo-vertical {
        width: min(180px, 72%);
    }
}

.btn-primary {
    background: linear-gradient( 135deg, var(--lm-primary-dark), var(--lm-primary) );
    border: none;
    box-shadow: 0 6px 18px rgba(24, 183, 232, 0.35);
}

    .btn-primary:hover {
        filter: brightness(1.08);
        transform: translateY(-1px);
    }

.lm-landing-admin-btn {
    border: 1px solid var(--lm-primary);
    color: #ffffff;
    background: transparent;
}

    .lm-landing-admin-btn:hover {
        background: linear-gradient( 135deg, var(--lm-primary-dark), var(--lm-primary) );
        color: #0b1c2f;
    }

/* ---------------------------------------------- */
/*                 APP HEADER                     */
/* ---------------------------------------------- */

.app-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(10px);
}

    .app-header .d-flex.align-items-center.gap-3 {
        gap: 1.2rem !important;
    }

.app-header-toggle {
    border-radius: 999px;
    padding-inline: 0.75rem;
}

.app-header-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: #0f172a;
    margin-top: 2px; /* nuevo */
}

    .app-header-title span {
        color: #0d6efd;
    }

.app-header-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: 3px; /* corrige alineación */
}

/* Usuario en header */

.app-user-pill {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

    .app-user-pill:hover {
        background-color: #f1f5f9;
        border-color: #cbd5e1;
        cursor: pointer;
    }

.app-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f172a, #0d6efd);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.app-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
}

.app-user-meta {
    font-size: 0.7rem;
    color: #9ca3af;
}

.app-logout-btn {
    border-radius: 999px;
}

/* ---------------------------------------------- */
/*                 APP FOOTER                     */
/* ---------------------------------------------- */

.app-footer {
    border-top: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #020617 0%, #020617 100%);
    opacity: 0.95;
    font-size: 0.78rem;
    text-align: center;
}

    .app-footer .container {
        max-width: 100%;
    }

.app-footer-text {
    color: #9ca3af !important;
}

.app-footer-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-footer-link {
    color: #9ca3af !important;
}

    .app-footer-link:hover {
        color: #0d6efd;
    }

/* ---------------------------------------------- */
/*                 JUGADORES                      */
/* ---------------------------------------------- */

.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.player-avatar-btn {
    border: 0;
    padding: 0;
    background: transparent;
    border-radius: 999px;
    line-height: 0;
}

    .player-avatar-btn:focus {
        outline: none;
    }

    .player-avatar-btn:hover .player-avatar {
        transform: scale(1.04);
        transition: transform .12s ease-in-out;
    }

/* ---------------------------------------------- */
/*                 EQUIPOS (MÓVIL)               */
/* ---------------------------------------------- */

.lm-team-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

    .lm-team-card .card-body {
        padding: .9rem;
    }

    .lm-team-card small {
        font-size: 0.72rem;
        letter-spacing: .02em;
    }

/* Botones de icono (desktop) */
.lm-icon-btn {
    width: 34px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------- */
/*        CONTEXTO TORNEO (ENCABEZADO)            */
/* ---------------------------------------------- */

.lm-context-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .6rem;
    font-size: .85rem;
    color: #6b7280; /* gray-500 */
}

.lm-context-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}

    .lm-context-item i {
        font-size: .9rem;
        opacity: .85;
    }

.lm-context-sep {
    opacity: .4;
}

/* Móvil: más compacto */
@media (max-width: 576px) {
    .lm-context-bar {
        font-size: .8rem;
    }
}

/* ---------------------------------------------- */
/*               JUGADORES: AVATAR                */
/* ---------------------------------------------- */

.player-avatar-btn {
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 999px;
    line-height: 0;
}

.player-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.player-avatar--lg {
    width: 36px;
    height: 36px;
}

/* Card móvil */
.lm-player-card {
    border-radius: 12px;
}

/* Si usas lm-icon-btn en otros lados, puedes mantenerlo global */
.lm-icon-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------- */
/*               EMPTY STATES                     */
/* ---------------------------------------------- */

.lm-empty-state {
    padding: 2rem 1rem;
}

    .lm-empty-state i {
        opacity: 0.6;
    }

/* ---------------------------------------------- */
/*               PARTIDOS RESPONSIVE              */
/* ---------------------------------------------- */

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.htmx-request #partidos-table {
    display: none;
}

.htmx-request #partidos-loading {
    display: block !important;
}

/* ---------------------------------------------- */
/*        BOTÓN VOLVER ARRIBA (SCROLL TOP)        */
/* ---------------------------------------------- */

.scroll-top-btn {
    position: fixed;
    right: 1rem;
    bottom: 1.25rem;
    z-index: 1050;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: linear-gradient( 135deg, var(--lm-primary-dark), var(--lm-primary) );
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 8px 22px rgba(24, 183, 232, 0.35);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

    .scroll-top-btn.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .scroll-top-btn:hover {
        filter: brightness(1.08);
        transform: translateY(-2px);
        box-shadow: 0 10px 26px rgba(24, 183, 232, 0.45);
    }

@media (max-width: 575.98px) {
    .scroll-top-btn {
        bottom: 4rem;
    }
}

/* ---------------------------------------------- */
/*        LLAVES ELIMINATORIAS (UX MÓVIL)         */
/* ---------------------------------------------- */

.lm-scroll-hint {
    display: none;
    white-space: nowrap;
    opacity: .85;
}

@media (max-width: 576px) {

    /* Preview de cruces: más aire para leer */
    .lm-preview-cruces-table td {
        padding-top: .6rem;
        padding-bottom: .6rem;
    }

        /* Resalta el número de cruce */
        .lm-preview-cruces-table td:first-child {
            font-weight: 600;
            color: #0d6efd;
        }
}

/* ---------------------------------------------- */
/*              SANCIONES (RESPONSIVE)            */
/* ---------------------------------------------- */

.lm-check-inline {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.lm-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* En móvil, que los botones no se aplasten */
@media (max-width: 576px) {
    .lm-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .lm-actions .btn {
            width: 100%;
        }
}

/* Evitar saltos raros en celdas pequeñas */
.lm-cell-nowrap {
    white-space: nowrap;
}

/* Empty state */
.lm-empty-state {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 12px;
    border: 1px dashed rgba(0,0,0,.15);
    border-radius: 12px;
    background: #fff;
}

.lm-empty-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13,110,253,.10);
    color: #0d6efd;
    font-size: 1.25rem;
}

/* Hint (lo controla JS con .show) */
.lm-scroll-hint {
    display: none;
}

    .lm-scroll-hint.show {
        display: inline-flex;
        align-items: center;
    }

/* ---------------------------------------------- */
/*    TABLA DE POSICIONES ADMIN (RESPONSIVE)      */
/* ---------------------------------------------- */

/* Leader highlight (optional) */
.table tr.table-success td {
    vertical-align: middle;
}

.card.border-success {
    border-width: 2px !important;
}

/* ---------------------------------------------- */
/*       MODULE HEADER CONTEXT (CHIPS)            */
/* ---------------------------------------------- */

.lm-context-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.lm-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,.08);
    color: #6c757d;
    font-size: .85rem;
    line-height: 1.2;
}

    .lm-pill i {
        font-size: .95rem;
        opacity: .9;
    }

    .lm-pill strong {
        color: #343a40;
        font-weight: 600;
    }

.lm-pill-primary {
    background: rgba(25, 135, 84, .10); /* Bootstrap success */
    border-color: rgba(25, 135, 84, .22);
    color: #198754;
}

    .lm-pill-primary strong {
        color: #146c43; /* success más oscuro */
    }

    .lm-pill-primary i {
        color: #198754;
    }

.lm-pill-sep {
    opacity: .6;
}

/* Opcional: un pelín más compacto en móvil */
@media (max-width: 575.98px) {
    .lm-pill {
        font-size: .82rem;
        padding: .22rem .5rem;
    }
}

/* ---------------------------------------------- */
/*              PARTIDOS RESPONSIVE               */
/* ---------------------------------------------- */

/* Hace que los hijos del container cuenten como hijos directos del .row */
.lm-row-slot {
    display: block;
    width: 100%;
}

/* ---------------------------------------------- */
/*              TORNEOS: HERO SELECT              */
/* ---------------------------------------------- */

.lm-hero-card {
    max-width: 980px;
    margin: 0 auto;
    border-radius: 16px;
}

.lm-tournaments-hero {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.lm-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13,110,253,.10);
    color: #0d6efd;
    font-size: 1.2rem;
    flex: 0 0 44px;
}

/* En móvil, un poco más compacto */
@media (max-width: 576px) {
    .lm-hero-card {
        border-radius: 14px;
    }
}

/* ---------------------------------------------- */
/*      PLATAFORMA DE INSCRIPCIONES - Wizard      */
/* ---------------------------------------------- */

/* HTMX loading state */
form.htmx-request .when-idle {
    display: none;
}

form.htmx-request .when-loading {
    display: inline-flex !important;
    align-items: center;
}

/* ---------------------------------------------- */
/*                 LANDING (MARKETING)            */
/* ---------------------------------------------- */

/* Contenedor: en móvil se comporta como container normal,
   en desktop crece para aprovechar la pantalla */
.lm-landing-container {
    width: 100%;
    max-width: 980px; /* base */
    margin: 0 auto;
}

/* Desktop: más ancho, sin verse “exagerado” */
@media (min-width: 992px) {
    .lm-landing-container {
        max-width: 1140px;
    }
}

@media (min-width: 1200px) {
    .lm-landing-container {
        max-width: 1240px;
    }
}

@media (min-width: 1400px) {
    .lm-landing-container {
        max-width: 1320px;
    }
}

/* Card landing ocupa todo el ancho del container */
.lm-landing-card {
    padding: 0; /* el card-body manda */
    width: 100%;
}

/* Padding interno del body (mantiene look tipo login, pero sirve para landing larga) */
.lm-landing-body {
    padding: 2rem 2.25rem;
}

@media (max-width: 576px) {
    .lm-landing-body {
        padding: 1.5rem;
    }
}

/* Opcional si agregaste lm-landing-main al <main> del layout:
   Glow suave para que en desktop no se sienta “vacío” */
.lm-landing-main {
    position: relative;
}

@media (min-width: 992px) {
    .lm-landing-main::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: radial-gradient(circle at 18% 22%, rgba(56,189,248,.10), transparent 40%), radial-gradient(circle at 82% 18%, rgba(147,197,253,.10), transparent 42%);
    }
}

/* ---------------------------------------------- */
/* HERO                                            */
/* ---------------------------------------------- */

.lm-hero {
    position: relative;
}

.lm-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #cbd5e1;
    font-size: .82rem;
}

    .lm-hero-badge i {
        color: #7dd3fc;
    }

.lm-hero-title {
    font-size: 1.55rem;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: 0.01em;
}

@media (min-width: 768px) {
    .lm-hero-title {
        font-size: 2.05rem;
    }
}

.lm-gradient-text {
    background: linear-gradient( 90deg, var(--lm-primary), #3ed3ff );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lm-hero-sub {
    font-size: .95rem;
}

@media (min-width: 768px) {
    .lm-hero-sub {
        font-size: 1.02rem;
    }
}

/* Presencia extra en desktop (opcional, sutil) */
@media (min-width: 992px) {
    .lm-hero {
        padding-top: .25rem;
    }

    .lm-hero-title {
        letter-spacing: 0.005em;
    }
}

/* ---------------------------------------------- */
/* PANELS (CTA)                                    */
/* ---------------------------------------------- */

.lm-landing-panel {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    padding: 1rem 1rem;
    position: relative;
}

@media (min-width: 992px) {
    .lm-landing-panel {
        padding: 1.1rem 1.2rem;
    }
}

.lm-landing-panel--admin {
    background: rgba(255,255,255,0.03);
}

.lm-landing-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(56,189,248,0.18);
    border: 1px solid rgba(56,189,248,0.22);
    color: #7dd3fc;
    font-size: 1.2rem;
    flex: 0 0 44px;
}

.lm-landing-icon--admin {
    background: rgba(13,110,253,0.14);
    border-color: rgba(13,110,253,0.22);
    color: #93c5fd;
}

.lm-landing-panel-title {
    color: #e5e7eb;
    font-weight: 600;
    line-height: 1.2;
}

.lm-landing-panel-sub {
    font-size: 0.82rem;
}

.lm-kbd {
    display: inline-block;
    padding: .08rem .35rem;
    border-radius: .45rem;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(2,6,23,0.35);
    color: #e5e7eb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: .8rem;
}

.lm-landing-input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.14);
    color: #e5e7eb;
    border-radius: 10px;
}

    .lm-landing-input::placeholder {
        color: rgba(229,231,235,0.55);
    }

    .lm-landing-input:focus {
        background: rgba(255,255,255,0.08);
        border-color: rgba(56,189,248,0.55);
        box-shadow: 0 0 0 3px rgba(56,189,248,0.20);
        color: #ffffff;
    }

.lm-landing-cta {
    border-radius: 10px;
}

.lm-landing-admin-btn {
    border-radius: 10px;
    border-color: rgba(255,255,255,0.22);
}

.lm-landing-help {
    line-height: 1.35;
}

/* Glows sobre panels */
.lm-landing-panel--glow::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    background: radial-gradient(circle at 20% 10%, rgba(125,211,252,.18), transparent 55%);
    pointer-events: none;
}

.lm-landing-panel--glow-admin::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    background: radial-gradient(circle at 80% 15%, rgba(147,197,253,.14), transparent 55%);
    pointer-events: none;
}

/* ---------------------------------------------- */
/* METRICS                                         */
/* ---------------------------------------------- */

.lm-hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
}

@media (max-width: 576px) {
    .lm-hero-metrics {
        grid-template-columns: 1fr;
    }
}

.lm-metric {
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
    padding: .65rem .75rem;
}

.lm-metric-value {
    color: #e5e7eb;
    font-weight: 600;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

    .lm-metric-value i {
        color: #7dd3fc;
    }

.lm-metric-sub {
    font-size: .78rem;
    margin-top: .12rem;
}

/* ---------------------------------------------- */
/* QUICKLINKS                                      */
/* ---------------------------------------------- */

.lm-quicklinks {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
}

.lm-quicklink {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.02);
    color: #cbd5e1;
    font-size: .82rem;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}

    .lm-quicklink:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,0.04);
        border-color: rgba(255,255,255,0.16);
        color: #e5e7eb;
    }

    .lm-quicklink i {
        color: #7dd3fc;
    }

/* ---------------------------------------------- */
/* FEATURES GRID (resumen)                         */
/* ---------------------------------------------- */

.lm-landing-feature {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
    padding: .85rem .95rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

    .lm-landing-feature i {
        font-size: 1.1rem;
        color: #7dd3fc;
        opacity: .95;
        margin-top: 1px;
    }

.lm-landing-feature-title {
    color: #e5e7eb;
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.15;
}

.lm-landing-feature-sub {
    font-size: .8rem;
    margin-top: .15rem;
}

.lm-landing-hr {
    border-color: rgba(255,255,255,0.10);
}

/* ---------------------------------------------- */
/* SECCIONES                                       */
/* ---------------------------------------------- */

.lm-section {
    scroll-margin-top: 14px;
}

.lm-section-header {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.lm-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.02);
    color: #cbd5e1;
    font-size: .8rem;
}

    .lm-section-kicker i {
        color: #7dd3fc;
    }

.lm-section-title {
    font-size: 1.25rem;
    font-weight: 650;
    margin-top: .7rem;
    margin-bottom: .5rem;
}

@media (min-width: 768px) {
    .lm-section-title {
        font-size: 1.55rem;
    }
}

/* Bullet cards */
.lm-bullet-card {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
    padding: 1rem 1rem;
}

.lm-bullet-card--admin {
    background: rgba(255,255,255,0.025);
}

.lm-bullet-title {
    font-weight: 650;
    display: flex;
    align-items: center;
    gap: .55rem;
}

    .lm-bullet-title i {
        color: #7dd3fc;
    }

.lm-bullets {
    margin: .75rem 0 0 0;
    padding-left: 1.1rem;
}

    .lm-bullets li {
        margin: .35rem 0;
    }

/* Divider */
.lm-divider {
    height: 1px;
    background: rgba(255,255,255,0.10);
}

/* Mini callout */
.lm-mini-callout {
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(56,189,248,0.06);
    padding: .8rem .85rem;
}

.lm-mini-callout-title {
    font-weight: 650;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .35rem;
}

    .lm-mini-callout-title i {
        color: #7dd3fc;
    }

/* Steps */
.lm-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

@media (max-width: 576px) {
    .lm-steps {
        grid-template-columns: 1fr;
    }
}

.lm-step {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
    padding: .9rem .95rem;
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}

.lm-step-num {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(125,211,252,0.14);
    border: 1px solid rgba(125,211,252,0.22);
    color: #7dd3fc;
    font-weight: 700;
    flex: 0 0 34px;
}

.lm-step-title {
    font-weight: 650;
    line-height: 1.2;
}

/* Highlight */
.lm-highlight {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: radial-gradient(circle at 15% 20%, rgba(125,211,252,.12), rgba(255,255,255,0.02) 55%);
    padding: 1rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.lm-highlight-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(56,189,248,0.16);
    border: 1px solid rgba(56,189,248,0.22);
    color: #7dd3fc;
    font-size: 1.2rem;
    flex: 0 0 44px;
}

/* Accordion dark */
.lm-accordion .accordion-item {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: .75rem;
}

.lm-accordion .accordion-button {
    background: rgba(255,255,255,0.03);
    color: #e5e7eb;
    font-weight: 600;
}

    .lm-accordion .accordion-button:focus {
        box-shadow: 0 0 0 3px rgba(56,189,248,0.18);
    }

    .lm-accordion .accordion-button::after {
        filter: invert(1);
        opacity: .9;
    }

.lm-accordion .accordion-body {
    background: rgba(255,255,255,0.02);
}

/* Final CTA */
.lm-final-cta {
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.10);
    background: radial-gradient(circle at 20% 20%, rgba(147,197,253,.14), rgba(255,255,255,0.02) 55%);
    padding: 1rem;
}

.lm-final-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ---------------------------------------------- */
/* HERO DESKTOP LAYOUT (solo visual)              */
/* ---------------------------------------------- */

@media (min-width: 992px) {
    .lm-hero > .row {
        align-items: stretch;
    }

    /* Columna izquierda (texto) respira más */
    .lm-hero .col-lg-7 {
        padding-right: 1.5rem;
    }

    /* Columna derecha (admin) un poco más compacta */
    .lm-hero .col-lg-5 {
        padding-left: 1.25rem;
    }
}

/* Más aire entre secciones en desktop */
@media (min-width: 992px) {
    .lm-section {
        margin-top: 2.5rem;
    }

    .lm-landing-hr {
        margin-top: 3rem;
        margin-bottom: 3rem;
    }
}

/* ---------------------------------------------- */
/* HERO TITLE – AJUSTE FINO MÓVIL                  */
/* ---------------------------------------------- */

@media (max-width: 576px) {
    .lm-hero-title {
        font-size: 1.35rem;
        line-height: 1.18;
        letter-spacing: 0.005em;
    }

    /* Evita que "en minutos" quede demasiado separado */
    .lm-gradient-text {
        display: inline;
        white-space: nowrap;
    }
}

@media (max-width: 576px) {
    .lm-hero-sub {
        font-size: .9rem;
        line-height: 1.35;
    }
}

.lm-hero-tags {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.lm-tag {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    font-size: .85rem;
    color: #cfe9ff;
}

.lm-divider-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem;
}

    .lm-divider-text span {
        color: rgba(229,231,235,.9);
        font-size: .82rem;
        font-weight: 650;
        padding: .25rem .65rem;
        border-radius: 999px;
        border: 1px solid rgba(255,255,255,.10);
        background: rgba(255,255,255,.03);
    }

    .lm-divider-text::before,
    .lm-divider-text::after {
        content: "";
        flex: 1;
        height: 1px;
        background: rgba(255,255,255,.12);
    }

.lm-hero-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    text-align: center;
}

/* --- RESET de wordmark dentro del divider --- */
.lm-divider-text .lm-brand-mini,
.lm-divider-text .lm-brand-mini span {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline !important;
}

/* Tamaño y alineación del wordmark mini */
.lm-brand-mini {
    font-size: .9em;
    font-weight: 600;
    white-space: nowrap;
}

/* ================================
   Programación completa (Reportes)
   ================================ */

.lm-page-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.lm-page-title {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}

    .lm-page-title > i {
        width: 42px;
        height: 42px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #eff6ff;
        color: #0d6efd;
        font-size: 1.15rem;
        margin-top: 2px;
    }

.lm-page-head__right .btn {
    border-radius: 12px;
}

@media (max-width: 576px) {
    .lm-page-head {
        flex-direction: column;
        align-items: stretch;
    }

    .lm-page-head__right .btn {
        width: 100%;
    }
}

/* Card filtros */
.lm-filters-card {
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    background-color: #ffffff;
}

/* Day card */
.lm-day-card {
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    background-color: #ffffff;
}

.lm-day-title {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    color: #0f172a;
}

    .lm-day-title i {
        color: #0d6efd;
        opacity: .95;
    }

/* Match item */
.lm-match-item {
    position: relative;
    padding: .85rem .5rem;
    border: 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    background: transparent;
}

    .lm-match-item::after {
        content: "";
        position: absolute;
        left: .75rem;
        right: .75rem;
        bottom: 0;
        height: 1px;
        background: linear-gradient( to right, transparent, rgba(15, 23, 42, 0.08), transparent );
    }

    .lm-match-item:last-child::after {
        display: none;
    }

    .lm-match-item:hover {
        background: #f9fafb;
    }

.lm-match-main {
    min-width: 0;
}

.lm-match-title {
    font-weight: 650;
    color: #111827;
    line-height: 1.2;
}

.lm-team {
    color: #0f172a;
}

.lm-vs {
    color: #94a3b8;
    font-weight: 600;
    margin: 0 .35rem;
}

.lm-match-meta {
    margin-top: .35rem;
    display: flex;
    gap: .9rem;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: .85rem;
}

.lm-meta-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}

    .lm-meta-item i {
        opacity: .9;
    }

.lm-match-time {
    flex: 0 0 auto;
    padding: .35rem .6rem;
    border-radius: 999px;
    border: 1px solid rgba(13,110,253,.15);
    background: rgba(13,110,253,.06);
    color: #0b5ed7;
    font-weight: 700;
    font-size: .9rem;
}

/* Compacto en móvil */
@media (max-width: 576px) {
    .lm-match-item {
        align-items: flex-start;
    }

    .lm-match-time {
        margin-top: .15rem;
    }
}

.lm-stage-badge {
    display: inline-flex;
    align-items: center;
    margin-left: .6rem;
    padding: .18rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
    line-height: 1;
    border: 1px solid rgba(13,110,253,.18);
    background: rgba(13,110,253,.06);
    color: #0b5ed7;
    white-space: nowrap;
}

.lm-stage-badge--groups {
    border-color: rgba(14,165,233,.22);
    background: rgba(14,165,233,.08);
    color: #0284c7;
}

.lm-stage-badge--ko {
    border-color: rgba(245,158,11,.25);
    background: rgba(245,158,11,.10);
    color: #b45309;
}

/* Card Reportes */
.card-dashboard-info {
    border-top: 3px solid #0dcaf0; /* celeste (info) */
}

    .card-dashboard-info:hover {
        border-color: #0dcaf0; /* opcional: mantiene el borde del hover en el mismo tono */
    }

.card-dashboard-icon-info {
    background-color: rgba(13, 202, 240, 0.15);
    color: #0dcaf0;
}

/* ---------------------------------------------- */
/*            BRAND MINI (inline text)            */
/* ---------------------------------------------- */

/* Solo para el wordmark dentro del divider de la landing */
.lm-divider-text .lm-brand-mini .brand-league {
    color: #6f8eac !important; /* azul institucional aclarado para fondo oscuro */
}

.lm-divider-text .lm-brand-mini .brand-master {
    color: #C9CED6 !important; /* gris claro más limpio */
}

.lm-divider-text .lm-brand-mini .brand-g,
.lm-divider-text .lm-brand-mini .brand-t {
    color: var(--lm-primary) !important; /* GT mantiene su azul brillante */
}

/* ---------------------------------------------- */
/*        LOGIN – LOGO VERTICAL OFICIAL          */
/* ---------------------------------------------- */

.login-logo-vertical-login {
    width: min(200px, 60%);
    height: auto;
    display: block;
    margin: 0 auto .75rem auto;
    filter: drop-shadow(0 12px 28px rgba(0,0,0,0.35));
}

/* Desktop grande */
@media (min-width: 1200px) {
    .login-logo-vertical-login {
        width: 220px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .login-logo-vertical-login {
        width: min(170px, 70%);
    }
}