/* ==========================================================================
   ESTILOS GENERALES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f6; /* Fondo gris muy clarito y moderno */
    color: #333;
}

/* ==========================================================================
   ENCABEZADO Y MENÚ DE NAVEGACIÓN
   ========================================================================== */
header {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: #2c3e50;
}

.logo span {
    color: #2980b9;
}

header button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    background-color: #34495e;
    color: white;
    transition: background 0.3s, transform 0.2s;
}

header button:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
}

.navegacion-modulos {
    display: flex;
    justify-content: center;
    gap: 15px;
    background: white;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    border: 2px solid transparent;
    background: #ecf0f1;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: #7f8c8d;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.tab-btn:hover {
    background: #e0e6ed;
}

.tab-btn.active {
    background: white;
    border-color: #2980b9;
    color: #2980b9;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL Y PESTAÑAS
   ========================================================================== */
main {
    padding: 20px;
    max-width: 1500px;
    margin: 0 auto;
}

.modulo-contenido {
    display: none;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.modulo-contenido.activo {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MATRIZ GENERAL Y TABLA
   ========================================================================== */
.acciones {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.acciones input {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 250px;
    outline: none;
    font-size: 14px;
}

.acciones input:focus {
    border-color: #2980b9;
    box-shadow: 0 0 5px rgba(41, 128, 185, 0.3);
}

.acciones button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    background-color: #27ae60;
    color: white;
    transition: opacity 0.2s;
    font-size: 13px;
}

.acciones button:hover {
    opacity: 0.8;
}

.contenedor-tabla {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    max-height: 65vh; /* Hace que la tabla tenga scroll interno si es muy larga */
}

table {
    width: 100%;
    border-collapse: separate; /* Necesario para que el sticky header no pierda el borde */
    border-spacing: 0;
    background: white;
    text-align: left;
    font-size: 13px;
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid #ecf0f1;
    border-right: 1px solid #ecf0f1;
}

th {
    background-color: #2980b9;
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
    border-top: 1px solid #2980b9;
}

tr:hover td {
    background-color: #f8f9fa;
}

/* ==========================================================================
   ESTILOS DE CELDAS E INDICADORES (SEMAFOROS)
   ========================================================================== */
.estado {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.verde { background-color: #2ecc71; box-shadow: 0 0 5px #2ecc71; }
.amarillo { background-color: #f1c40f; box-shadow: 0 0 5px #f1c40f; }
.rojo { background-color: #e74c3c; box-shadow: 0 0 5px #e74c3c; }

.miniInfo {
    font-size: 0.85em;
    color: #555;
    margin-top: 5px;
    line-height: 1.4;
    background: #fdfdfd;
    padding: 4px;
    border-radius: 4px;
    border: 1px dashed #eee;
}

.badge-area {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.area-mda { background-color: #8e44ad; }
.area-cr { background-color: #2980b9; }
.area-vacia { background-color: #95a5a6; }

/* ==========================================================================
   AGENDA DE REQUERIMIENTOS (TARJETAS)
   ========================================================================== */
.card-sesion {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border: 1px solid #e0e6ed;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s;
}

.card-sesion:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.card-sesion-header {
    background-color: #607d8b;
    color: white;
    padding: 15px;
    position: relative;
}

.badge-tipo {
    background: rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 15px;
    border: 1px solid rgba(255,255,255,0.5);
}

.card-sesion-header h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    padding-right: 40px;
}

.entrenador {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
    font-weight: 500;
}

.card-sesion-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.info-fechas p {
    margin: 2px 0;
    font-size: 13px;
    color: #34495e;
}

.divisor {
    border: 0;
    border-top: 1px dashed #bdc3c7;
    margin: 15px 0;
}

.titulo-asistencia {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

.lista-asistencia {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    max-height: 200px;
    overflow-y: auto;
}

.lista-asistencia li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 5px;
    border-bottom: 1px solid #f4f6f6;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.select-asistencia {
    padding: 4px;
    border-radius: 4px;
    border: 1px solid #bdc3c7;
    font-size: 12px;
    outline: none;
    cursor: pointer;
    font-weight: bold;
}

/* ==========================================================================
   BARRAS DE DESPLAZAMIENTO (SCROLLBARS LINDAS)
   ========================================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}