/* Importar fuentes desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Reset básico y estilos globales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif;
    background-color: #f2f2f2;
    color: #666666;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


/* Header */
.site-header {
    background-color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.container {
    margin: 0 auto;
    padding: 0 20px;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 120px;
}

.logo {
    height: 50px;
    flex-shrink: 0;
    vertical-align: middle;
}

.site-header h1 {
    font-size: 1.7rem;
    font-weight: 300;
    color: #027087;
    margin: 0;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #027087;
    cursor: pointer;
    padding: 5px;
}

.text-footer {
    margin-top: 7px;
}

/* Layout principal */
.admin-wrapper {
    display: flex;
    flex: 1;
    flex-direction: column;
}

/* Sidebar */
.sidebar {
    background-color: #334e68;
    color: #fff;
    padding: 20px 0;
    transition: transform 0.3s ease;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background-color: #027087;
}

.sidebar ul ul.submenu {
    display: none;
    background-color: #406080;
}

.sidebar ul ul.submenu li a {
    padding: 12px 40px;
    font-size: 0.9rem;
    color: #f1f1f1;
    display: block;
}

.sidebar ul li.open>ul.submenu {
    display: block;
}

.sidebar ul ul.submenu li a:hover {
    background-color: #025f70;
}

.sidebar ul li.has-submenu>a::after {
    content: "▸";
    float: right;
    transition: transform 0.3s;
}

.sidebar ul li.open>a::after {
    transform: rotate(90deg);
}

.admin-content {
    flex: 1;
    padding: 30px 0px 0px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
}

.admin-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.admin-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.admin-section h2 {
    font-size: 1.8rem;
    color: #007188;
    border-bottom: 2px solid #eee;
}

/* Componentes comunes */
.form-instrucciones {
    background-color: #e6f4f7;
    border-left: 6px solid #027087;
    padding: 20px 30px;
    margin-bottom: 30px;
    border-radius: 6px;
    color: #444;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.form-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Formularios */
input,
select,
textarea,
button {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
    font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

button {
    background-color: #027087;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 500;
}

button:hover {
    background-color: #025f70;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #027087;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

tr:nth-child(even) {
    background-color: #f2faff;
}

tr:hover {
    background-color: #e6f4f7;
}

.action-buttons button {
    display: inline-block;
    width: auto;
    margin: 0 5px 0 0;
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: 5px;
}

/* Dashboard cards */
.dashboard-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.dashboard-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(33% - 20px);
    min-width: 200px;
}

.dashboard-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.dashboard-card p {
    font-size: 2.5rem;
    font-weight: 600;
}

.site-footer {
    background-color: #027087;
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
}

.site-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


.site-footer a {
    color: white;
    text-decoration: none;
}

.site-footer p {
    margin-bottom: 10px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.visible {
    display: flex;
}

.modal-contenido {
    background-color: #fff;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-contenido h2 {
    color: #027087;
    margin-bottom: 20px;
}

.modal-botones {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.acciones-personal-fila {
    visibility: hidden;
}

#acciones {
    display: flex;
    gap: 10px;
    align-items: center;
}

#acciones input,
#acciones button,
#acciones div {
    flex: 1;
}

button:disabled {
    opacity: 0.6;
    background-color: #e0e0e0;
    color: #9D9C9C;
    cursor: not-allowed;
}

.tabla-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabla-wrapper table {
    min-width: 800px;
}


/* Responsive Design */
@media (min-width: 769px) {
    .admin-wrapper {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        position: sticky;
        top: 80px;
        height: calc(100vh - 80px);
        overflow-y: auto;
    }

    section {
        padding: 30px;
    }

    .menu-toggle {
        display: none;
    }

}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        max-width: 300px;
        height: calc(100vh - 80px);
        z-index: 999;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);

    }

    section {
        padding: 30px;
    }

    .sidebar.active {
        display: block;
    }

    .dashboard-card {
        flex: 1 1 100%;
    }

    .tabla-wrapper {
        overflow-x: auto;
    }

    #acciones {
        flex-direction: column;
        /* apila los elementos */
        align-items: stretch;
        /* hace que ocupen todo el ancho */
    }

    #acciones button,
    #acciones input {
        width: 100%;
        /* asegúrate de que cada uno use el ancho completo */
    }

    table {
        font-size: 14px;
    }

    th,
    td {
        padding: 8px 10px;
    }
}

/* Estilos específicos para selects múltiples */
select[multiple] {
    min-height: 120px;
}

select[multiple] option {
    padding: 8px 12px;
}

/* Efecto overlay cuando el menú está abierto */
.overlay {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.overlay.active {
    display: block;
}

#asignar-roles .grupo-rol {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

#asignar-roles select {
    margin-right: 6px;
}

.btn-eliminar-select {
    color: white;
    border: none;
    font-size: 10px;
    width: 18px;
    cursor: pointer;
    border-radius: 3px;
    padding: 0;
    text-align: center;
    line-height: 16px;
    margin-left: 5px;
}

.grupo-contrasena {
    display: flex;
    gap: 5px;
    width: 100%;
}

.grupo-contrasena input {
    flex: 3;
}

.grupo-contrasena .btn-generar {
    flex: 1;
    color: white;
    border: none;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
}

.grupo-contrasena .btn-generar:hover {
    background-color: #2980b9;
}

tr.seleccionada {
    background-color: #cce5ff;
}

tr:hover {
    background-color: #f1f1f1;
    cursor: pointer;
}

.ciclo-actual {
    font-family: 'Poppins', sans-serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ciclo-actual:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.periodo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 10px;
}

.contenido {
    display: flex;
    flex-direction: column;
    width: 90%;
}

.btn-activar {
    width: 10%;
    background: #027087;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    min-width: 60px;
    text-align: center;
}

.btn-editar:hover {
    background: #027090;
}

/* --- Indicadores de estado y tiempo --- */
.badge-estado {
    margin-left: .5rem;
    padding: .1rem .5rem;
    border-radius: .5rem;
    font-size: .8rem;
    background: #e5e7eb;
    /* gris */
}

.badge-estado.activo {
    background: #d1fae5;
}

/* verde claro */
.badge-estado.cerrado {
    background: #fee2e2;
}

/* rojo claro */
.badge-estado.prep {
    background: #e0e7ff;
}

/* azul claro */

.indicador-tiempo {
    margin-left: .5rem;
    font-size: .8rem;
    color: #6b7280;
    /* gris-500 */
}

/* --- Layout por periodo --- */
.acciones-periodo {
    display: flex;
    gap: .5rem;
    margin-top: .25rem;
}

.periodo {
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: .5rem .75rem;
    margin-bottom: .5rem;
}

.periodo.cerrado .btn-activar {
    display: none;
}

#contenedor-planes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.programa-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s;
}

.programa-card:hover {
    transform: scale(1.02);
}

.programa-info h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.programa-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.programa-actions button {
    border: none;
    border-radius: 5px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-editar {
    background-color: #1976d2;
    color: #fff;
}

.btn-eliminar {
    background-color: #d32f2f;
    color: #fff;
}

.mensaje-vacio {
    text-align: center;
    color: #666;
    font-style: italic;
    width: 100%;
}

/* ================================
   CONTENEDOR GENERAL
================================ */
#contenedor-programas {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
    width: 100%;
}

.programa-card.programa-inactivo {
    opacity: 0.72;
    background: #f3f4f6;
}

.estado-programa {
    display: inline-block;
    margin: 0 0 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.estado-programa.activo {
    color: #166534;
    background: #dcfce7;
}

.estado-programa.inactivo {
    color: #991b1b;
    background: #fee2e2;
}

.programa-actions .btn-estado-programa {
    width: auto;
    padding: 6px 10px;
    font-size: 12px;
}

.selector-vista {
    display: inline-flex;
    gap: 0.25rem;
    margin: 0.75rem 0 0;
    padding: 0.25rem;
    background: #f1f3f5;
    border: 1px solid #e1e4e8;
    border-radius: 9px;
}

.selector-vista .btn-vista {
    padding: 0.45rem 0.8rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #555;
    cursor: pointer;
    font-weight: 600;
}

.selector-vista .btn-vista.active {
    background: #fff;
    color: #222;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

#contenedor-programas.vista-cuadricula {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ================================
   CARD DE PROGRAMA (FILA COMPLETA)
================================ */
.programa-card {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease, transform 0.2s ease;
}

.programa-card:hover {
    background-color: #fafafa;
    transform: translateY(-2px);
}

/* ================================
   INFORMACIÓN DEL PROGRAMA
================================ */
.programa-info {
    display: flex;
    flex-direction: column;
}

.programa-info h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.programa-info p {
    text-align: center;
    margin: 0.2rem 0 0 0;
    font-size: 0.9rem;
    color: #555;
}

/* ================================
   ACCIONES (BOTONES)
================================ */
.programa-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.programa-actions button {
    background: none;
    border: none;
    color: #444;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.programa-actions button:hover {
    background-color: #f0f0f0;
}

/* Íconos descriptivos */
.btn-editar::before {
    content: "✏️";
}

.btn-eliminar::before {
    content: "🗑️";
}

/* ================================
   MENSAJE DE VACÍO
================================ */
.mensaje-vacio {
    text-align: center;
    color: #777;
    font-style: italic;
    font-size: 0.95rem;
    width: 100%;
    margin-top: 1rem;
}

#contenedor-materias .programa-card {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 8px;
}

#encabezado-materias {
    background: #f8f8f8;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 16px;
}

#encabezado-materias h3 {
    font-weight: 600;
}

#total-creditos {
    color: #333;
}

.controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

#input-programa {
    flex: 1;
    padding: 8px 10px;
}

.programa-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.programa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.programa-header h3 {
    margin: 0;
    color: #2b3a55;
}

.btn-eliminar-todo {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.semestre-bloque {
    margin-top: 8px;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.semestre-titulo {
    font-weight: 600;
    margin: 8px 0;
    color: #444;
}

.grupo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 6px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.grupo-item:hover {
    background: #fafafa;
}


/* Anchura completa */
#contenedor-grupos-programas .programa-card {
    width: 100%;
}

#contenedor-becas {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.beca-card {
    margin-bottom: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.beca-info h3 {
    margin: 0;
    color: #2b3a55;
}

.beca-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    margin-left: 8px;
}

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}

.autocomplete-list div {
    padding: 6px 10px;
    cursor: pointer;
}

.autocomplete-list div:hover {
    background: #eee;
}

.autocomplete-list.visible {
    display: block;
}

#contenedor-tipos-programa {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.tipo-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.tipo-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.tipo-info p {
    margin: 2px 0;
    color: #555;
}

.tipo-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    margin-left: 10px;
}

#contenedor-cuotas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.cuota-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.cuota-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.cuota-info p {
    margin: 2px 0;
    color: #555;
}

.cuota-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    margin-left: 10px;
}

.busqueda-asignacion,
.busqueda-estudiantes {
    /* display: flex; */
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.lista-sugerenciasAS {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 100;
}

.lista-sugerenciasAS.visible {
    display: block;
}

.lista-sugerencias li {
    padding: 5px 10px;
    cursor: pointer;
}

.lista-sugerencias li:hover {
    background-color: #f0f0f0;
}

.card-pago {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.card-pago.debe {
    border-color: #d93025;
}

/* rojo para quien debe */
.tag {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 6px;
    background: #eee;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    place-items: center;
}

.modal-overlay.visible {
    display: grid;
}

.modal-contenido {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    width: min(560px, 92vw);
}

.pago-item {
    padding: 6px 10px;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pago-item button.btn-eliminar-pago {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.pago-item button.btn-eliminar-pago:hover {
    background: #a71d2a;
}

.programa-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 30px;
    background-color: #fafafa;
}

.programa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ddd;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.programa-header h3 {
    color: #0b3c5d;
    font-weight: bold;
}

.grupo-seccion {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 10px;
}

.grupo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.btn-obtener-horario {
    background: #00796b;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-obtener-horario:hover {
    background: #004d40;
}

.grupo-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px;
    margin: 20px 0;
    background: #fafafa
}

.grupo-header-global {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
    margin-bottom: 10px
}

.btn-horario {
    background: #00796b;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer
}

.btn-horario:hover {
    background: #005f54
}

.grupo-materias details {
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    margin: 8px 0;
    padding: 8px
}

.grupo-materias summary {
    font-weight: 600;
    cursor: pointer
}

.falta-docente {
    border: 2px solid #d32f2f;
    border-radius: 8px;
    padding: 6px;
    background-color: #ffeaea;
}

#calificaciones {
    margin-top: 20px;
}

.autocomplete-wrapper {
    position: relative;
}

.lista-sugerencias {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    width: 100%;
    max-height: 180px;
    overflow-y: auto;
    z-index: 10;
    list-style: none;
    padding: 0;
    margin: 0;
}

.lista-sugerencias li {
    padding: 8px;
    cursor: pointer;
}

.lista-sugerencias li:hover {
    background: #f0f0f0;
}

.acciones-calificaciones {
    margin: 15px 0;
}

/* .tabla-calificaciones {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.tabla-calificaciones th,
.tabla-calificaciones td {
    border: 1px solid #ccc;
    padding: 6px;
    text-align: left;
}

.tabla-calificaciones th {
    background: #f4f4f4;
}

.input-calif {
    width: 70px;
    text-align: center;
    padding: 4px;
} */

/* Resalta las calificaciones sin asignar */
.sin-calificacion {
    background-color: #ffe5e5;
    color: #b71c1c;
    text-align: center;
}

/* Puedes integrarlo a tu CSS global */
#kardex .lista-sugerencias {
    list-style: none;
    margin: 4px 0 0 0;
    padding: 0;
    border: 1px solid #ccc;
    max-height: 220px;
    overflow: auto;
    display: none;
    background: #fff;
}

#kardex .lista-sugerencias.visible {
    display: block;
}

#kardex .lista-sugerencias li {
    padding: 8px 10px;
    cursor: pointer;
}

#kardex .lista-sugerencias li:hover {
    background: #f5f5f5;
}

.fiscal-card {
    border: 1px solid #ccc;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
}

.fiscal-card.rojo {
    background: #ffe5e5;
    border-color: #ff7f7f;
}

.fiscal-card.verde {
    background: #e6ffe5;
    border-color: #7fff7f;
}

.fiscal-card h3 {
    margin: 0 0 5px 0;
}

.fiscal-card p {
    margin: 0 0 8px 0;
}

/* Tarjeta general */
.card-pago {
    background: #f8f8f8;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 6px solid #999;
    cursor: pointer;
}

/* Contenido desplegable */
.card-body {
    display: none;
    margin-top: 8px;
    padding-left: 10px;
}

/* Colores según estado */
.pago-completo {
    border-color: #2e7d32;
    background: #e8f5e9;
}

.pago-pendiente {
    border-color: #fbc02d;
    background: #fffde7;
}

.pago-vencido {
    border-color: #d32f2f;
    background: #ffebee;
}

.abono-con-factura {
    border-color: #4caf50;
    background: #e8f5e9;
}

.abono-sin-factura {
    border-color: #ff9800;
    background: #fff3e0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

#filtros-container div {
    margin-bottom: 10px;
}

#btn-toggle-filtros {
    cursor: pointer;
}

.cards-grupos-docente {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.card-grupo-doc {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #027087;
}

.card-grupo-doc h3 {
    margin: 0;
    margin-bottom: 5px;
    font-size: 18px;
}

.card-grupo-doc p {
    margin: 4px 0;
    font-size: 14px;
}

.card-grupo-doc .separador {
    margin: 10px 0;
    border-top: 1px solid #ddd;
}

.btn-excel {
    margin-top: 10px;
    width: 100%;
    color: white;
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-excel:hover {
    background: #027087;
}

.copy-mini {
    font-size: 13px;
    cursor: pointer;
    margin-left: 6px;
    opacity: 0.6;
    transition: 0.2s;
}

.copy-mini:hover {
    opacity: 1;
    transform: scale(1.1);
}

.acceso-principal { align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.acceso-tarjeta { width: min(440px, 100%); }
.acceso-logo { display: block; width: min(260px, 80%); max-height: 90px; object-fit: contain; margin: 0 auto 24px; }
.acceso-tarjeta h2 { text-align: center; padding-bottom: 12px; }
.acceso-ayuda { margin: 16px 0; text-align: center; }
.acceso-tarjeta form > label:not(.recordar-correo) { display: block; margin-top: 16px; color: #334e68; font-weight: 500; }
.recordar-correo { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.recordar-correo input { width: auto; margin: 0; }
.acceso-error { margin: 16px 0; padding: 12px; border-radius: 6px; background: #fdecec; color: #9b1c1c; }
.lista-paneles { display: grid; gap: 12px; margin-top: 24px; }
.boton-panel { display: block; padding: 14px; border-radius: 6px; background: #027087; color: #fff; text-align: center; text-decoration: none; }
.boton-panel:hover { background: #025f70; }
.enlace-salir { display: block; margin-top: 24px; color: #666; text-align: center; }
.acciones-accesos-docentes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  background: #f8fafc;
}

.seleccionar-docentes,
.selector-docente {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.selector-docente { align-self: center; }

.selector-docente input,
.seleccionar-docentes input {
  width: 18px;
  height: 18px;
}

.descargas-accesos-docentes {
  margin-top: 14px;
  padding: 16px;
  border-left: 4px solid #198754;
  border-radius: 8px;
  background: #ecfdf3;
}

.botones-descarga-accesos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-descarga-acceso {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 7px;
  color: #fff;
  background: #174f7a;
  text-decoration: none;
  font-weight: 700;
}

.aviso-password-docente {
  margin: 6px 0 14px;
  color: #475569;
  font-size: 13px;
}
