/* El "Cuadro Emergente" o Banner Superior */
.header-banner {
    background-color: white;
    width: 100%;
    height: 120px; /* Altura fija para el banner */
    padding: 0 50px; /* Espacio a los lados */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between; /* Un logo a cada orilla, título en medio */
    align-items: center; /* Centra todo verticalmente */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

/* --- 1. RESET Y CONFIGURACIÓN GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

body {
    background-color: #0128675f;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 150px; 
    padding-bottom: 40px;
}

/* --- 2. LOGOS E IDENTIDAD --- */
.Logo-TecNM {
    width: auto; 
    height: 70px; 
    max-width: 300px;
}

.LOGO-Guasave {
    width: 80px;
    height: auto;
}

.header-banner h1 {
    color: #003a98; /* Azul institucional */
    font-family: Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0; /* Quitamos márgenes por defecto */
    text-align: center;
    flex-grow: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 50px; /* Aumenta este número (de 20px a 50px o más) para alejarlos */
}

/* --- 3. CONTENEDOR DEL CALENDARIO --- */
.calendario-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(15, 91, 212, 0.4);
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
}

/* Estilos internos de FullCalendar */
.fc { color: #1B396A; }

.fc-toolbar-title {
    color: #003a98;
    font-weight: bold;
    text-transform: capitalize;
}

.fc-button-primary {
    background-color: #1B396A !important;
    border-color: #1B396A !important;
}

.fc-button-primary:hover {
    background-color: #00b3ff !important;
}

/* --- 4. EVENTOS DENTRO DEL CALENDARIO --- */
.fc-custom-event {
    padding: 4px;
    overflow: hidden;
    cursor: pointer;
}

.fc-event-location-top {
    font-size: 0.75em;
    text-transform: uppercase;
    opacity: 0.8;
}

.fc-custom-event hr {
    margin: 3px 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.fc-event-title-bold {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-event-time-sub {
    font-size: 0.8em;
}

/* --- 5. TOOLTIP (LETRERO AZUL FLOTANTE) --- */
.fc-hoverable-event {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background-color: #003366;
    color: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    min-width: 200px;
}

.tooltip-title {
    display: block;
    font-size: 1.1em;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.tooltip-info {
    font-size: 0.9em;
    margin-top: 4px;
}

/* --- 6. MODAL Y OVERLAY --- */
#modalOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1500;
}

.custom-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    width: 380px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border-top: 8px solid #1B396A; /* Detalle estético superior */
}

.custom-modal h2 {
    color: #1B396A;
    margin-bottom: 20px;
    font-size: 1.4rem;
    text-align: center;
}

.input-group { 
    margin-bottom: 15px; 
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
}

.input-group input, 
.input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.btn-primary {
    background: #1B396A;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-right: 40px;
}

.btn-secondary {
    background: #eee;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-primary:hover { 
    background: #00b3ff; 
    color: white; 
}

/* Estilo para las cajas de texto con animación de span */
.input-box {
    position: relative;
    margin: 25px 0;
}

.input-box input {
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    border-bottom: 2px solid #1B396A;
    outline: none;
    font-size: 16px;
    color: #333;
}

.input-box span {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #1B396A;
    pointer-events: none;
    transition: 0.3s;
}

/* El truco para que la palabra suba al hacer clic */
.input-box input:focus + span,
.input-box input:valid + span {
    top: -10px;
    font-size: 12px;
    color: #00b3ff;
}

#loginModal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border-top: 5px solid #1B396A; /* Detalle elegante */
}

/* Estilo del botón azul degradado */
.submit-btn {
    width: 100%; 
    background: linear-gradient(90deg, #00b3ff, #1B396A);
    border: none;
    padding: 12px;
    border-radius: 25px;
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
    transition: 0.4s;
    margin-top: 20px;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(27, 57, 106, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(90deg, #1B396A, #00b3ff);
    box-shadow: 0 6px 15px rgba(27, 57, 106, 0.5);
    transform: translateY(-2px); /* Un pequeño salto al pasar el mouse */
}

.submit-btn:active {
    transform: scale(0.98); 
}

.fc-day-past {
    background-color: #f0f0f0 !important; /* Gris claro */
}

.header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    flex-wrap: nowrap; 
}
/* Contenedor del Modal */
.custom-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 3000;
    width: 90%;
    max-width: 400px;
    font-family: 'Inter', sans-serif;
}

/* Título */
.modal-header {
    color: #1B396A;
    margin: 0 0 20px 0;
    font-size: 22px;
    text-align: center;
}

/* Badge de Administrador */
.admin-badge {
    background: #f0f7ff;
    border: 1px solid #c2d9ff;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.admin-badge span { font-size: 12px; color: #666; }
.admin-badge strong { color: #1B396A; font-size: 15px; }

/* Grupos de Input */
.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

/* Estilo de Inputs y Selects */
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box; /* Evita que el padding ensanche el input */
}
.form-control:focus {
    border-color: #1B396A;
    outline: none;
    box-shadow: 0 0 0 3px rgba(27, 57, 106, 0.1);
}

/* Botones */
.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}
.btn-cancel, .btn-save {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-cancel { background: #eee; color: #444; }
.btn-cancel:hover { background: #e0e0e0; }

.btn-save { background: #1B396A; color: white; }
.btn-save:hover { background: #142a4f; }

/* Opción especial admin */
.opt-admin {
    background-color: #eef6ff;
    font-weight: bold;
    color: #003366;
}

/* Contenedor principal de usuario */
.user-zone {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* El "Badge" o burbuja donde aparece el nombre de Raúl */
.user-profile-badge {
    background: #f0f7ff;
    padding: 6px 16px;
    border-radius: 25px;
    border: 1px solid #c2d9ff;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.user-icon {
    font-size: 16px;
}

.user-name {
    color: #1B396A;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

/* Botón de salir ajustado */
.btn-logout {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background-color: #ff4d4d;
    color: white;
    border-color: #ff4d4d;
}

/* Overlay (Fondo oscuro) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2500;
}

/* Contenedor del Modal de Login */
.login-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3000;
    width: 350px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
}

.login-modal h2 {
    color: #1B396A;
    margin-bottom: 20px;
    font-size: 24px;
}

.login-container-internal h3 {
    color: #003a98;
    margin-bottom: 25px;
    font-weight: 400;
}

/* Estilo de los Inputs con efecto moderno */
.input-box {
    position: relative;
    margin-bottom: 25px;
    text-align: left;
}

.input-box input {
    width: 100%;
    padding: 10px 5px;
    font-size: 16px;
    border: none;
    border-bottom: 2px solid #ccc;
    outline: none;
    background: transparent;
    transition: 0.3s;
}

.input-box span {
    position: absolute;
    left: 5px;
    top: 10px;
    color: #999;
    pointer-events: none;
    transition: 0.3s;
}

/* Animación: Cuando el input tiene foco o contenido */
.input-box input:focus ~ span,
.input-box input:valid ~ span {
    top: -15px;
    font-size: 12px;
    color: #1B396A;
    font-weight: bold;
}

.input-box input:focus {
    border-bottom: 2px solid #1B396A;
}

/* Botones del Login */
.submit-btn {
    width: 100%;
    padding: 12px;
    background: #1B396A;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #003a98;
}

.btn-cancel-login {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: #f1f1f1;
    color: #555;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.header-banner {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Distribuye: Izquierda - Centro - Derecha */
    padding: 10px 40px;
    background-color: #ffffff; /* O el color que estés usando */
    min-height: 80px;
}

/* 1. Espacio para el logo de la izquierda */
.header-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

/* 2. El título: Siempre al centro */
.header-center {
    flex: 2; /* Le damos más espacio al centro */
    text-align: center;
}

.header-center h1 {
    margin: 0;
    color: #1B396A;
    font-size: 28px;
    font-weight: bold;
}

/* 3. Espacio para la zona de usuario a la derecha */
.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* --- MODAL DE REGISTRO ESTILO EMERGENTE --- */
#modalRegistro.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 5000; /* Por encima de todo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Fondo oscuro */
    backdrop-filter: blur(3px); /* Efecto de desenfoque opcional */
}

#modalRegistro .modal-content {
    background-color: #fff;
    margin: 5% auto; /* Centrado vertical/horizontal */
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border-top: 8px solid #1B396A;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Botón de cerrar (X) */
.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover { color: #333; }

.btn-full {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
}

/* Contenedor de botones en el header */
.auth-buttons-container {
    display: flex; /* Alinea los elementos en fila */
    gap: 10px;    /* Espacio exacto entre botones */
    align-items: center; /* Centra verticalmente uno respecto al otro */
}

/* Estilo unificado para los botones del header */
.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    white-space: nowrap; /* Evita que el texto se parta en dos renglones */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px; /* Asegura que ambos tengan el mismo ancho mínimo */
}

/* Ajuste específico para el botón de Registrarse (el gris) */
.btn-register {
    background-color: #e9ecef;
    color: #1B396A;
    text-decoration: none;
}

.btn-register:hover {
    background-color: #dee2e6;
}