
/* ====================================================
                ESTILOS GENERALES
==================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

/* ====================================================
                LOGIN
==================================================== */
body.login-body {
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}
.login-container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
.login-container h2 {
    color: #222;
    text-align: center;
    margin-bottom: 1.5rem;
}
.login-container label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}
.login-container input[type="email"],
.login-container input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    background-color: #fff;
    color: #333;
}

.login-container input[type="email"],
.login-container input[type="password"] {
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    box-shadow: none;
    transition: border 0.2s;
}
.login-container input[type="email"]:focus,
.login-container input[type="password"]:focus {
    border: 1.5px solid #007bff;
    outline: none;
}
.login-container button {
    width: 100%;
    padding: 0.75rem;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.login-container button:hover {
    background-color: #0056b3;
}

.login-container form p,
.login-container form a {
    display: block;
    text-align: center;
    margin-top: 1rem;
}

.login-container input::placeholder {
    color: #bbb;
    opacity: 1;
}


/* ====================================================
                NAVBAR
==================================================== */
.navbar {
    margin-bottom: 20px;
}

/* ====================================================
                CONTENEDOR PRINCIPAL
==================================================== */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* ====================================================
                SECCIONES GENERALES
==================================================== */
.seccion {
    display: none;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

/* ====================================================
                FORMULARIOS
==================================================== */
form input,
form select,
form button {
    width: 100%;
    margin-bottom: 10px;
}

/* ====================================================
                TABLAS
==================================================== */
.table-responsive {
    overflow-x: auto;
}
.table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}
.table th,
.table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}
.table th {
    background-color: #007bff;
    color: white;
}

/* ====================================================
                BOTONES
==================================================== */
.btn {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 5px;
}
.btn-warning {
    background-color: #ffcc00;
    border: none;
    color: black;
}
.btn-danger {
    background-color: #dc3545;
    border: none;
    color: white;
}
.btn-success {
    background-color: #28a745;
    border: none;
    color: white;
}
.btn:hover {
    opacity: 0.9;
}

/* ====================================================
                RESPONSIVE
==================================================== */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    .navbar-nav {
        text-align: center;
    }
    .table-responsive {
        overflow-x: auto;
        display: block;
        width: 100%;
    }
    .table {
        min-width: 100%;
    }
    .table th, .table td {
        min-width: 100px;
        white-space: nowrap;
    }
    .seccion {
        padding: 15px;
        overflow-x: auto;
    }
    form input,
    form select,
    form button {
        font-size: 14px;
    }
    .btn {
        font-size: 13px;
    }
}

/* ====================================================
                CALENDARIO
==================================================== */
#calendar {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    font-size: 0.85rem;
    max-height: 80vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    #calendar {
        font-size: 0.75rem;
        padding: 5px;
    }

    .fc-toolbar-title {
        font-size: 1rem;
    }

    .fc-button {
        padding: 0.3em 0.6em;
        font-size: 0.75rem;
    }

     .fc-event {
        font-size: 0.7rem;
        padding: 4px 2px;
        line-height: 1.1;
        overflow: visible !important;
        white-space: nowrap;
        min-width: 3.5em; /* 👈 esto fuerza que al menos entre "17:38" */
    }
}

/* ====================================================
                EXTRAS
==================================================== */
.spinner-border.spinner-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}
.pago-row {
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}
.pago-row:hover {
    background-color: #f1f1f1 !important;
}

@media (max-width: 768px) {
    #modalDetalleFacturacion .modal-dialog {
        margin: 1rem;
        max-width: 100%;
    }

    #modalDetalleFacturacion .modal-content {
        padding: 10px;
        font-size: 14px;
    }

    #modalDetalleFacturacion .table-responsive {
        overflow-x: auto;
    }

    #modalDetalleFacturacion table {
        min-width: 600px;
        white-space: nowrap;
    }

    #modalDetalleFacturacion .text-end {
        text-align: center !important;
    }

    #modalDetalleFacturacion .btn {
        width: 100%;
        max-width: 250px;
        margin: 0.25rem auto;
    }

    #modalDetalleFacturacion .modal-footer {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    #modalDetalleFacturacion .btn {
        width: auto;
        flex: 1 1 auto;
    }
}


/* ====================================================
   RESPONSIVE PARA PANTALLAS MUY PEQUEÑAS (IPHONE SE)
==================================================== */
@media (max-width: 400px) {
    /* Encabezado y títulos */
    .fc-toolbar-title {
        font-size: 0.9rem;
        text-align: center;
    }

    /* Botones de navegación y vista: mejor espaciado */
    .fc-toolbar-chunk {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
    }

    .fc-button-group {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        align-items: center;
    }

    /* Botones individuales más grandes y legibles */
    .fc-button {
        font-size: 0.7rem;
        padding: 0.4em 0.6em;
    }

    /* Eventos dentro del calendario: compactos y alineados */
    .fc-daygrid-event {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0 1px;          /* menos espacio lateral */
        margin: 0;
        font-size: 0.55rem;      /* fuente más chica aún */
        gap: 2px;                /* separación entre punto y hora */
    }

    .fc-daygrid-event-dot {
    width: 1px;
    height: 1px;
    border-radius: 50%;   /* 👈 asegura que sea perfectamente redondo */
    margin-right: 2px;
    margin-left: 0;
    }


    .fc-daygrid-dot-event .fc-event-time {
        font-size: 0.70rem;      /* acompaña al punto */
        margin-left: 0;          /* que quede alineado justo al lado del punto */
    }

    .fc-daygrid-day-frame {
        padding-left: 2px;       /* para que todo comience más a la izquierda */
        padding-right: 2px;
    }


    /* Ocultar leyenda de colores */
    .fc-legend,
    .leyenda-profesores {
        display: none;
    }

    /* Ajustes generales */
    .seccion,
    #calendar {
        padding: 8px;
    }

    .container {
        padding: 8px;
    }

    h1, h2, h3 {
        font-size: 1rem;
    }

    .btn {
        font-size: 13px;
        padding: 6px 10px;
    }

    .fc-toolbar-title {
        text-transform: capitalize;
    }
    
}

/* ========================================
   CALENDARIO SCROLLABLE PARA DISPOSITIVOS MÓVILES
======================================== */
@media (max-width: 768px) {
    .contenedor-calendario-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #calendar {
        min-width: 900px; /* Fuerza a que se haga scroll lateral */
        font-size: 0.95rem;
    }

    .fc-daygrid-day-frame {
        min-height: 110px;
        padding: 10px;
    }

    .fc .fc-scrollgrid-sync-inner {
        min-width: 130px;
    }

    .fc-event {
        font-size: 0.85rem;
    }
}

/* Evitar salto de línea en la columna Fecha del modal Payment Detail */
#tablaDetallePagoProfesor th:first-child,
#tablaDetallePagoProfesor td:first-child {
    white-space: nowrap;
}


.fc .fc-toolbar-chunk {
    flex-wrap: unset !important;
    white-space: nowrap !important;
}