/* RESET PARA PEGAR BARRAS AL BORDE */
html, body {
    font-family:'Segoe UI', Arial, sans-serif;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    background-color: #f0f2f5;
    overflow-x: hidden;
}

.main-wrapper {
    padding: 90px 0 40px 0 !important;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Animación fadeInUp */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    } to {
        opacity: 1; 
        transform: translateY(0); 
    }
}

.card-container {
    background: white;
    width: 96%; /* Incrementado de 90% a 95% para aprovechar mejor la pantalla */
    max-width: 1500px; /* Incrementado para dar más amplitud a la tabla */
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    animation: fadeInUp 0.7s ease-out forwards;
}

.retraso { 
    animation-delay: 0.2s; 
    opacity: 0; 
    animation-fill-mode: forwards; 
}

h2, h3 { 
    text-align: center; 
    color: #2c5d9e; 
    margin-bottom: 25px; 
    font-family: sans-serif; 
    font-weight: bold; 
}

/* Formulario Grid */
.grid-form { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
}

.full-width { 
    grid-column: span 3;
}

.grupo { 
    display: flex; 
    flex-direction: column; 
}

label { 
    font-size: 0.9rem; 
    font-weight: 600; 
    color: #555; 
    margin-bottom: 5px; 
}

input, select { 
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 8px;
    outline: none; 
    transition: 0.3s; 
}

input:focus { 
    border-color: #4096EE; 
}
    
/* Botón Principal Azul */
.btn-enviar {
    grid-column: span 3;
    justify-self: center; 
    width: 100%;
    max-width: 250px; 
    background: #4096EE; 
    color: white; 
    border: none; 
    padding: 15px;
    border-radius: 10px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: 0.3s;
    font-size: 1rem;
}

.btn-enviar:hover {
    background: #2c5d9e; 
    transform: translateY(-2px); 
}

/* Tabla - Ajustes de Expansión Completos */
.tabla-scroll {
    overflow-x: auto;
    width: 100%;
    background-color: white; 
    border-radius: 8px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

table { 
    width: 100%; /* Obliga a la tabla a ocupar el 100% del ancho disponible */
    border-collapse: collapse; 
    margin-top: 10px; 
    table-layout: auto; /* Permite una distribución más orgánica según el contenido */
}

th, td { 
    padding: 15px 10px; /* Reducción leve del padding horizontal para optimizar el espacio */
    text-align: left; 
    border-bottom: 1px solid #eee; 
    font-size: 0.9rem; 
    vertical-align: middle; 
    background-color: white; 
}

th { 
    background-color: #f8fafc; 
    color: #2c5d9e; 
    text-transform: uppercase; 
}

.img-mini { 
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 1px solid #eee; 
}

.btn-edit { 
    background: #2ecc71; 
    color: white !important; 
    text-decoration: none; 
    padding: 8px 15px; 
    border-radius: 6px; 
    font-size: 0.85rem;
    font-weight: bold; 
    display: inline-block; 
    transition: 0.3s;
    margin-right: 5px; 
}

.btn-edit:hover { 
    background: #27ae60; 
}
    
.btn-delete { 
    margin-right: 5px;
    background: #e74c3c; 
    color: white !important; 
    text-decoration: none; 
    padding: 8px 15px; 
    border-radius: 6px; 
    font-size: 0.85rem; 
    font-weight: bold; 
    display: inline-block; 
    transition: 0.3s; 
}
.btn-delete:hover { 
    background: #c0392b; 
}

table td:last-child {
    display: flex;           
    gap: 8px;                
    justify-content: flex-start; 
    align-items: center;     
    white-space: nowrap;     
    min-width: 160px;        
}

/* =======================================================
   ESTILOS PARA LA ALERTA DE CONFIRMACIÓN CENTRAL (MODAL)
   ======================================================= */
.modal-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-confirm-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-confirm-box {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-confirm-overlay.show .modal-confirm-box {
    transform: scale(1);
}

.modal-confirm-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.modal-confirm-box h3 {
    margin: 0 0 10px 0;
    color: #2c5d9e;
    font-size: 1.3rem;
}

.modal-confirm-box p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.modal-confirm-botones {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-modal-cancelar {
    background-color: #e0e0e0;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.btn-modal-cancelar:hover {
    background-color: #d5d5d5;
}

.btn-modal-eliminar {
    background-color: #e74c3c;
    color: white !important;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.btn-modal-eliminar:hover {
    background-color: #c0392b;
}
/*modificacion*/
/* Contenedor que agrupa las tarjetas en fila */
.contenedor-grados { 
    display: flex;
    justify-content: center; /* Centra las tarjetas en el medio */
    gap: 30px;               /* Espacio entre las tarjetas */
    flex-wrap: wrap;         /* Permite que bajen si la pantalla es estrecha */
    margin: 40px 0;
}

/* Cada tarjeta individual */
.tarjeta {
    width: 280px;            /* Ancho fijo para cada tarjeta */
    text-align: center;
}

.titulo-grado {
    padding: 15px;
    border-radius: 15px 15px 0 0; /* Bordes redondeados solo arriba */
    border: 1px solid #ccc;
    font-weight: bold;
}

.caja-foto {
    border: 1px solid #ccc;
    border-top: none;        /* Une la caja con el título */
    border-radius: 0 0 15px 15px; /* Bordes redondeados solo abajo */
    padding: 30px;
    background-color: white;
    min-height: 150px;
}
/*codigo*/
  /* Contenedor que organiza las tarjetas en fila */
.contenedor-grados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px auto;
    padding: 20px;
    max-width: 1000px;
}

/* Estilo de cada tarjeta de año escolar */
.tarjeta-grado {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 4px solid #007bff; /* Color institucional azul */
}