﻿body {
    font-family: 'Segoe UI', Tahoma;
    margin: 0;
    background-color: #f4f6f9;
}

/* 🔝 HEADER */
/* HEADER */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e3a5f;
    color: white;
    padding: 12px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* IZQUIERDA */
.header-izq {
    font-size: 20px;
    font-weight: bold;
}

/* DERECHA */
.header-der {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* USUARIO */
.usuario-nombre {
    font-weight: bold;
}

.usuario-nombre::before {
        content: "👤 ";
}

.usuario-tipo {
    opacity: 0.8;
    font-size: 13px;
}

/* BOTÓN SALIR */
.btn-salir {
    background: #e63946;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: 0.3s;
}

    .btn-salir:hover {
        background: #c1121f;
    }

.titulo {
    font-size: 20px;
    font-weight: bold;
}

.usuario {
    font-size: 14px;
}

/* 📋 MENÚ */
.menu {
    background-color: #2c5d8a;
    padding: 10px;
}

    .menu a {
        color: white;
        margin-right: 15px;
        text-decoration: none;
        font-weight: bold;
    }

        .menu a:hover {
            text-decoration: underline;
        }

/* 🧩 CONTENIDO */
.contenido {
    padding: 20px;
}

h2 {
    color: #1e3a5f;
}

/* 📊 GRIDVIEW */
.grid {
    /*width: 100%;*/
    margin: 20px auto; /* lo centra */
    border-collapse: collapse;
    background-color: white;
    min-width: 800px;
}

    /* Header */
    .grid th {
        background-color: #1e3a5f;
        color: white;
        padding: 10px;
        text-align: left;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    /* Filas */
    .grid td {
        padding: 8px;
        border-bottom: 1px solid #ddd;
    }

    /* Alternar filas */
    .grid tr:nth-child(even) {
        background-color: #f2f2f2;
    }

    /* Hover */
    .grid tr:hover {
        background-color: #dbe9f4;
    }

/* Bordes redondeados visuales */
.grid {
    border-radius: 5px;
    overflow: hidden;
}

/* 📦 FIELDSET BONITO */
fieldset {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.1);
}

    /* 🏷 LEGEND ESTILO */
    fieldset legend {
        font-weight: bold;
        padding: 5px 15px;
        background-color: #1e3a5f;
        color: white;
        border-radius: 5px;
        border: 1px solid #1e3a5f;
        box-shadow: 0px 2px 5px rgba(0,0,0,0.2);
    }
/* 📦 CONTENEDOR DE GRUPOS */
.contenedor-grupos {
    max-width: 1400px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 🏆 CADA GRUPO */
.grupo-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.1);
}

/* 🟦 TITULO */
.grupo-titulo {
    background-color: #1e3a5f;
    color: white;
    padding: 10px;
    font-weight: bold;
    text-align: center;
}

/* ⚽ FILAS */
.fila-seleccion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

    /* Hover bonito */
    .fila-seleccion:hover {
        background-color: #f2f6fa;
    }
/* 🔐 LOGIN */
.login-fondo {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5d8a 50%, #1e3a5f 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.login-header {
    background-color: #1e3a5f;
    padding: 30px 20px;
    text-align: center;
    color: white;
}

    .login-header .icono {
        font-size: 48px;
        display: block;
        margin-bottom: 8px;
    }

    .login-header h1 {
        margin: 0;
        font-size: 22px;
        font-weight: bold;
        letter-spacing: 1px;
        color: white;
    }

    .login-header p {
        margin: 5px 0 0;
        font-size: 13px;
        opacity: 0.8;
    }

.login-body {
    padding: 35px 30px;
}

.login-campo {
    margin-bottom: 20px;
}

    .login-campo label {
        display: block;
        font-weight: bold;
        color: #1e3a5f;
        margin-bottom: 6px;
        font-size: 14px;
    }

    .login-campo input {
        width: 100%;
        padding: 10px 14px;
        border: 1px solid #ccc;
        border-radius: 8px;
        font-size: 15px;
        box-sizing: border-box;
        transition: border-color 0.2s;
        font-family: 'Segoe UI', Tahoma;
    }

        .login-campo input:focus {
            border-color: #2c5d8a;
            outline: none;
            box-shadow: 0 0 0 3px rgba(44, 93, 138, 0.15);
        }

.login-error {
    color: #c0392b;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: #1e3a5f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background-color 0.2s;
    font-family: 'Segoe UI', Tahoma;
}

    .btn-login:hover {
        background-color: #2c5d8a;
    }

.login-mensaje-error {
    margin-top: 15px;
    padding: 10px 14px;
    background-color: #fdecea;
    border-left: 4px solid #c0392b;
    border-radius: 6px;
    color: #c0392b;
    font-size: 14px;
    text-align: center;
}

.login-footer {
    text-align: center;
    padding: 14px;
    background-color: #f4f6f9;
    color: #888;
    font-size: 12px;
    border-top: 1px solid #eee;
}

/* LAYOUT GENERAL */
.main-layout {
    display: flex;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background: #0f3d2e; /* 🔥 verde oscuro */
    min-height: calc(100vh - 60px);
}

/* CONTENIDO */
.contenido {
    flex: 1;
    padding: 20px;
}

/* MENÚ */
.menu-item {
    color: white;
}

/* CONTENEDOR LINK */
.menu-link {
    padding: 12px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

    .menu-link:hover {
        background: #145c42;
    }

/* FLECHA */
.menu-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

    /* FLECHA ABIERTA */
    .menu-arrow.open {
        transform: rotate(90deg); /* ▶ → ▼ */
    }

/* SUBMENU */
.submenu-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

    .submenu-wrapper.open {
        max-height: 500px;
    }

.submenu-wrapper.open {
    max-height: 500px;
}

    /* CUANDO ABRE */
    .submenu-wrapper.open {
        max-height: 500px; /* suficiente para contenido */
    }

/* LINKS */
.submenu-link {
    display: block;
    padding: 8px 25px;
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
}

    .submenu-link:hover {
        background: #145c42;
        color: white;
    }

/* LOGOUT */
.logout-item {
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 10px;
}

/* LINK */
.logout-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    color: #ffb3b3;
    text-decoration: none;
    font-weight: bold;
}

    /* HOVER */
    .logout-link:hover {
        background: #7a1f1f;
        color: white;
    }

/* LAYOUT PRINCIPAL */
.main-layout {
    display: flex;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
}

/* CONTENIDO */
.contenido {
    flex: 1;
    padding: 20px;
}

/* OPCIÓN ACTIVA */
.submenu-link.active {
    background: #1b7f5a;
    color: white;
    font-weight: bold;
    border-left: 4px solid #00ffae;
}
.password-wrapper {
    position: relative;
}

.input-password {
    width: 100%;
    padding-right: 35px;
}

/* OJO */
.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    user-select: none;
}

.icon-fa {
    font-size: 20px;
    color: #2c7a7b;
    cursor: pointer;
}

    .icon-fa:hover {
        color: #1b7f5a;
    }
.lblTitulo2 {
    font-weight: bold;
    background-color: transparent;
    font-family: 'Segoe UI',Arial, Helvetica, sans-serif;
    font-size: 20px;
    vertical-align: middle;
}
.legend-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.legend-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: 0.2s ease;
}

    .icon-btn:hover {
        transform: scale(1.08);
        opacity: 0.85;
    }

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.contenedor-partidos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.partido-card {
    width: 350px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    text-align: center;
    transition: transform 0.2s ease;
    transition: 0.2s;
}

.partido-fecha {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.partido-equipos {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.equipo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 120px;
    font-weight: 600;
}

.vs {
    font-size: 22px;
    font-weight: bold;
    color: #999;
}

.partido-sede {
    margin-top: 15px;
    color: #444;
    font-size: 14px;
}

.partido-card-link {
    text-decoration: none;
    color: inherit;
}

    .partido-card {
    transition: transform 0.2s ease;
}

.partido-card-link:hover .partido-card {
    transform: scale(1.02);
    cursor: pointer;
}
.resultado-container {
    width: 100%;
    max-width: 700px;
    margin: auto;
    padding: 20px;
}

.resultado-fila {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 25px;
}

.resultado-equipo-horizontal {
    display: flex;
    align-items: center;
    gap: 20px;
    width:320px;
}

.lblSeleccionHorizontal {
    font-size: 32px;
    font-weight: bold;
}

.txt-goles {
    width: 70px;
    height: 55px;
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    border-radius: 12px;
    /*border: 1px solid #ccc;
    margin-right:15px;*/
}

.legend-linea1 {
    font-size: 24px;
    font-weight: bold;
}

.legend-linea2 {
    font-size: 16px;
    color: #9fb3d9;
    margin-left: 8px;
    font-weight: 500;
}

.panel-ganador {
    margin-top: 30px;
    padding: 25px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff8dc, #ffe082);
    border: 2px solid #fbc02d;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
    animation: aparecerPanel 0.3s ease-in-out;
}
.titulo-ganador {
    font-size: 26px;
    font-weight: bold;
    color: #8a6d00;
    margin-bottom: 20px;
}

.radio-ganador {
    display: flex;
    justify-content: center;
    gap: 40px;
    font-size: 22px;
    font-weight: 600;
}
    .radio-ganador input[type=radio] {
        transform: scale(1.4);
        margin-right: 10px;
    }
@keyframes aparecerPanel {

    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mensaje-info {
    display: block;
    padding: 18px;
    margin: 20px 0;
    border-radius: 12px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.resultado-info {
    margin-top: 25px;
    text-align: center;
    font-size: 18px;
    line-height: 1.8;
}

.partido-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.partido-grupo-box {
    width: 90px;
    min-height: 180px;
    background: #f4f6f9;
    color: #9aa0a6;
    border: 2px solid #dbe4f0;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-weight: bold;
    padding: 15px;
    font-size: 1rem;
}
.partido-card-link {
    display: flex;
    flex: 1;
    text-decoration: none;
}

.contador-partido {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 18px;
    border-radius: 12px;
    background: #fff3cd;
    color: #856404;
    font-weight: bold;
    font-size: 1rem;
}
.barra-contenedor {
    width: 100%;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    height: 22px;
}

.barra {
    height: 22px;
    line-height: 22px;
    color: white;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
}

.barra-verde {
    background: #28a745;
}

.barra-amarilla {
    background: #ffc107;
    color: #333;
}

.barra-roja {
    background: #dc3545;
}
.usuario-actual {
    background: #e8f2ff !important;
    font-weight: bold;
    border-left: 5px solid #1f3b68;
}

.tabla-puntajes {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

    .tabla-puntajes th {
        background: #1f3b68;
        color: white;
        padding: 14px;
        text-align: center;
        font-size: 16px;
    }

    .tabla-puntajes td {
        padding: 14px;
        border-bottom: 1px solid #eaeaea;
        text-align: center;
        font-size: 15px;
    }

    .tabla-puntajes tr:hover {
        background: #f5f8fc;
    }

.top1 {
    background: #fff8dc !important;
    font-weight: bold;
}

.top2 {
    background: #f2f2f2 !important;
    font-weight: bold;
}

.top3 {
    background: #fce5cd !important;
    font-weight: bold;
}
.topbar-login {
    width: 100%;
    height: 60px;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 35px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.topbar-logo {
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.topbar-links {
    display: flex;
    gap: 25px;
}

    .topbar-links a {
        color: white;
        text-decoration: none;
        font-size: 15px;
        transition: 0.2s ease;
    }

        .topbar-links a:hover {
            color: #38bdf8;
        }
.login-wrapper {
    padding-top: 80px;
}
.filtro-fechas {
    display: flex;
    align-items: end;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
}

.filtro-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .filtro-item label {
        font-size: 14px;
        font-weight: 600;
        color: #1f2937;
    }

.input-fecha {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 15px;
    min-width: 180px;
    background: white;
}

    .input-fecha:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
    }

.filtro-boton {
    display: flex;
    align-items: end;
}

.btn-consultar {
    background: #1d4ed8;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 11px 22px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s ease;
}

    .btn-consultar:hover {
        background: #1e40af;
        transform: translateY(-1px);
    }

.contenedor-guardar {
    margin-top: 35px;
    text-align: center;
}

.btn-guardar-pronostico {
    background: linear-gradient(135deg, #198754, #157347);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

    .btn-guardar-pronostico:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(0,0,0,0.22);
        background: linear-gradient(135deg, #157347, #146c43);
    }
.mensaje-sin-partidos {
    display: block;
    margin: 0 auto 25px auto;
    max-width: 700px;
    background: #eafaf1;
    border: 1px solid #b7ebc6;
    color: #1f7a45;
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
}
.resultado-marcador {
    font-size: 32px;
    font-weight: bold;
    color: #0b5ed7;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
}

.resultado-auditoria {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.resultado-fase {
    text-align: center;
    margin-bottom: 15px;
}

.fase-linea {
    display: block;
    font-size: 18px;
    font-weight: normal;
    color: #495057;
}

.grupo-linea {
    display: block;
    font-size: 18px;
    color: #495057;
}
.resultado-seccion {
    margin-top: 15px;
}

    .resultado-seccion h4 {
        color: #0b5ed7;
        margin-bottom: 10px;
        text-align: center;
    }

.puntaje-box {
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    background: #e8f5e9;
    font-weight: 600;
    text-align: center;
}

.pendiente-box {
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    background: #fff3cd;
    color: #856404;
    font-weight: 600;
    text-align: center;
}

/* ==========================================================================
   📱 RESPONSIVE DESIGN: ADAPTACIÓN PARA PANTALLAS MÓVILES (Menores a 768px)
   ========================================================================== */
@media (max-width: 767px) {

    /* 1. LAYOUT GENERAL: El menú (sidebar) y el contenido pasan a formato vertical */
    .main-layout {
        display: flex;
        flex-direction: column;
    }

    /* Ajuste de los anchos para que ocupen el 100% del celular */
    .sidebar {
        width: 100% !important;
        min-height: auto !important;
        border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    }

    .contenido {
        width: 100% !important;
        padding: 12px !important;
        box-sizing: border-box;
    }

    /* 2. HEADER: Se acomodan los elementos para que no choquen */
    .header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px;
    }

    .header-der {
        font-size: 14px;
        gap: 10px;
    }

    /* 3. GRIDVIEWS Y TABLAS: Forzar a que no midan 800px y activen scroll lateral limpio */
    .grid {
        min-width: 100% !important; /* Rompe el mínimo de 800px en celulares */
    }

    /* Envolvemos las tablas en el contenedor responsive */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
        margin-bottom: 15px;
    }

    /* 4. CONTENEDOR DE GRUPOS DEL MUNDIAL: Pasa de 4 columnas a 1 sola */
    .contenedor-grupos {
        grid-template-columns: 1fr !important; /* Se apilan verticalmente */
        gap: 15px;
        padding: 0 10px;
    }

    /* 5. TARJETAS DE PARTIDOS (CARD): Se ajustan al ancho de la pantalla móvil */
    .partido-wrapper {
        flex-direction: column; /* El indicador del grupo se mueve arriba de la tarjeta */
        align-items: stretch;
    }

    .partido-grupo-box {
        width: 100%;
        min-height: auto;
        padding: 6px;
        border-radius: 8px;
    }

    .partido-card {
        width: 100% !important; /* Ya no se queda fija en 350px */
        box-sizing: border-box;
    }

    .equipo {
        width: 95px; /* Reduce un poco el espacio de los nombres de los equipos */
        font-size: 14px;
    }

    .vs {
        font-size: 18px;
    }

    /* 6. MARCADORES Y FORMULARIO DE PRONÓSTICOS (Para ingresar los goles) */
    .resultado-fila {
        flex-direction: column; /* Pasa de horizontal a vertical */
        gap: 15px;
    }

    .resultado-equipo-horizontal {
        width: 100% !important; /* Rompe los 320px fijos */
        justify-content: center;
        flex-direction: column; /* Escudo/Nombre arriba, input abajo si es necesario */
        text-align: center;
        gap: 8px;
    }

    .lblSeleccionHorizontal {
        font-size: 24px; /* Texto de país más adecuado para celular */
    }

    .txt-goles {
        width: 80px;
        height: 50px;
        font-size: 24px;
    }

    .radio-ganador {
        gap: 20px;
        font-size: 16px;
    }

    /* 7. CONTENEDORES DE FILTROS Y BOTONES */
    .filtro-fechas {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .input-fecha {
        width: 100%;
    }

    .btn-consultar, .btn-guardar-pronostico {
        width: 100%; /* Botones grandes y fáciles de presionar con el dedo */
        box-sizing: border-box;
    }

    /* FIELDSET */
    fieldset {
        width: 100% !important;
        box-sizing: border-box;
        padding: 15px 10px;
    }
    /* Ajustes específicos para el área de Login en Celulares */

    .topbar-login {
        position: relative; /* Deja de ser fija para que no tape el formulario */
        height: auto; /* El alto se adapta a los elementos */
        flex-direction: column; /* El logo arriba, los links abajo */
        padding: 15px;
        gap: 12px;
        text-align: center;
    }

    .topbar-links {
        display: flex;
        flex-wrap: wrap; /* Si no caben en una fila, bajan ordenadamente */
        justify-content: center;
        gap: 12px 15px; /* Separación horizontal y vertical entre links */
    }

        .topbar-links a {
            font-size: 14px; /* Letra ligeramente más cómoda para pantallas chicas */
        }

    .login-wrapper {
        padding-top: 20px; /* Como la barra ya no es fija, reducimos el espacio superior */
        box-sizing: border-box;
    }

    .login-card {
        border-radius: 12px; /* Suaviza un poco las esquinas en móvil */
    }

    .login-body {
        padding: 25px 20px; /* Compacta un poco los márgenes del formulario */
    }
}