/* ============================= */
/* BASE GENERAL                  */
/* ============================= */
body {
    font-family: Arial, sans-serif;
    background: #eef2f3;
    margin: 0;
    padding: 0;
    position: relative;
}

/* ============================= */
/* ENCABEZADO INSTITUCIONAL      */
/* ============================= */
.header {
    position: relative;
    text-align: center;
    padding: 30px;
    background: #004aad;
    color: white;
}

.header h1 {
    margin: 0;
    font-size: 40px;
}

.header p {
    margin: 6px 0 0;
}

.header-alumno {
    margin-top: 5px;
    font-size: 15px;
    opacity: 0.9;
}

/* ============================= */
/* BOTÓN VOLVER GLOBAL (HEADER)  */
/* ============================= */
.btn-volver-global {
    position: absolute;
    top: 34px;
    right: 20px;
    width: 110px;
    padding: 16px 0;
    background: #ffffff;
    color: #004aad;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    border-radius: 10px;
}

.btn-volver-global:hover {
    background: #e6ecff;
}

@media (max-width: 600px) {
    .btn-volver-global {
        top: 24px;
        right: 10px;
        width: 95px;
        font-size: 14px;
        padding: 14px 0;
    }
}

/* ============================= */
/* CONTENEDORES GENERALES        */
/* ============================= */
.contenedor {
    width: 100%;
    padding: 0 30px;
    box-sizing: border-box;
}

.contenedor-principal {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 40px;
    flex-wrap: wrap;
}

.contenedor-form,
.card-form {
    width: 90%;
    max-width: 520px;
    margin: 30px auto;
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* ============================= */
/* TARJETAS (CARD)               */
/* ============================= */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.card-wide {
    width: 100%;
    max-width: 1250px;
    margin: 30px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* ============================= */
/* FORMULARIOS                   */
/* ============================= */
label {
    display: block;
    font-weight: bold;
    margin-top: 10px;
}

input,
select {
    width: 100%;
    padding: 9px;
    margin-top: 5px;
    margin-bottom: 14px;
    border-radius: 6px;
    border: 1px solid #aaa;
    box-sizing: border-box;
}

h3 {
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

/* ============================= */
/* BOTONES GRANDES (PANELES)     */
/* ============================= */
.boton {
    display: block;
    padding: 14px;
    color: white;
    text-decoration: none;
    border-radius: 0 0 12px 12px;
    font-size: 16px;
    font-weight: bold;
}

.boton:hover {
    opacity: 0.85;
}

.boton-alumno   { background: #28a745; }
.boton-profesor { background: #ffc107; color: #333; }
.boton-admin    { background: #007bff; }

/* ============================= */
/* OPCIONES / CARDS SIMPLES      */
/* ============================= */
.opciones {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 40px;
}

.card-simple {
    width: 200px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    text-decoration: none;
    text-align: center;
    color: #333;
    transition: 0.3s;
    font-weight: bold;
}

.card-simple:hover {
    transform: scale(1.05);
}

/* ============================= */
/* ALERTAS                       */
/* ============================= */
.alert-ok,
.alert-error {
    max-width: 520px;
    margin: 0 auto 20px auto;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
}

.alert-ok {
    background: #d4edda;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
}

/* ============================= */
/* TABLAS (ADMIN)                */
/* ============================= */
.tabla {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.tabla th,
.tabla td {
    padding: 14px 12px;
    border-bottom: 1px solid #ddd;
}

.tabla th {
    background: #0077c2;
    color: white;
}

/* ============================= */
/* BOTONES ACCIONES FORM         */
/* ============================= */
.acciones-form {
    margin-top: 35px;
    display: flex;
    gap: 20px;
}

.acciones-form.centrado {
    justify-content: center;
}

.btn {
    min-width: 180px;
    padding: 14px 0;
    font-size: 16px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    color: #fff;
}

.btn-guardar {
    background: #2e7d32;
}
.btn-guardar:hover {
    background: #1b5e20;
}

.btn-cancelar {
    background: #c62828;
}
.btn-cancelar:hover {
    background: #a91f1f;
}

/* ============================= */
/* BOTONES GENERALES (LINKS)     */
/* ============================= */
.btn-primario {
    background: #0077c2;
}
.btn-primario:hover {
    background: #005c96;
}

.btn-secundario {
    background: #5c8a00;
}
.btn-secundario:hover {
    background: #466900;
}

/* ================================================= */
/* INDEX.PHP – ESTILOS AISLADOS (NO AFECTA AL SISTEMA) */
/* ================================================= */

body.body-index {
    background: #ffffff;
}

body.body-index .header {
    background: #003366;
    padding: 40px 30px;
    text-align: center;
}

body.body-index .header h1 {
    font-size: 42px;
    margin: 0;
    color: #ffffff;
}

body.body-index .header p {
    font-size: 16px;
    margin-top: 8px;
    opacity: 0.95;
    color: #e0e0e0;
}


/* ================================================= */
/* INDEX.PHP – OVERRIDE TOTAL (FORZADO Y AISLADO)    */
/* ================================================= */

body.body-index {
    background: #ffffff !important;
}

/* HEADER */
body.body-index .header {
    background: #003366 !important;
    padding: 40px 30px !important;
    text-align: center !important;
}

body.body-index .header h1 {
    font-size: 42px !important;
    margin: 0 !important;
    color: #ffffff !important;
}

body.body-index .header p {
    font-size: 16px !important;
    margin-top: 8px !important;
    color: #e0e0e0 !important;
}

/* CONTENEDOR */
body.body-index .contenedor-principal {
    padding: 50px 20px !important;
    gap: 30px !important;
}

/* CARDS */
body.body-index .card {
    width: 300px !important;
    background: #f9f9f9 !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15) !important;
    text-align: center !important;
}

body.body-index .card h3 {
    border: none !important;
    margin-top: 10px !important;
    color: #003366 !important;
}

/* BOTONES */
body.body-index .boton {
    border-radius: 0 0 10px 10px !important;
    font-size: 15px !important;
}

/* FOOTER */
body.body-index .footer {
    background: #f1f1f1 !important;
    text-align: center !important;
    padding: 30px 20px !important;
}




/* ================================================= */
/* INDEX.PHP – IMÁGENES PROPORCIONADAS EN CARDS      */
/* ================================================= */

body.body-index .card img {
    width: 100%;
    height: 180px;          /* altura fija */
    object-fit: cover;     /* mantiene proporción */
    display: block;
}






/* ==============================
   FILTROS INLINE (ADMIN)
   ============================== */
.filtros-inline{
    display:flex;
    align-items:center;
    gap:12px;
    margin:10px 0 15px 0;
    flex-wrap: nowrap;
}

.filtros-inline select,
.filtros-inline input[type="text"]{
    width: 200px !important;
    max-width: 200px;
    padding: 6px 10px;
    font-size: 14px;
}

.filtros-inline input[type="number"]{
    width: 80px !important;
    max-width: 80px;
}

.filtros-inline button{
    height: 38px;
    padding: 0 22px;
    white-space: nowrap;
}

.card-caja {
    background: #fff4e6;
    border: 1px solid #ffd1a3;
}























.tabla-preview {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
}

.tabla-preview th {
    background: #0077c2; /* mismo azul */
    color: #fff;
    padding: 10px;
    text-align: left;
    font-weight: normal;
}

.tabla-preview td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

.tabla-preview tr:hover {
    background: #f5f9fc;
}

/* Inputs integrados */
.tabla-preview input[type="number"],
.tabla-preview input[type="date"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* Columna de importes */
.col-importe {
    width: 140px;
}

/* Columna vencimientos */
.col-fecha {
    width: 150px;
}









.alert {
    max-width: 900px;      /* ancho cómodo */
    margin: 25px auto;     /* 🔥 centra horizontalmente */
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 15px;
    text-align: center;    /* opcional: queda prolijo */
}
































/* =============================
   BOTONES - BASE GLOBAL
============================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;

    background: #0077c2;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;

    transition: background 0.2s ease, transform 0.1s ease;
}

.btn:hover {
    background: #005c96;
}

.btn:active {
    transform: scale(0.97);
}




















/* =============================
   VARIANTES DE BOTÓN
============================= */
.btn-success {
    background: #2e7d32;
}
.btn-success:hover {
    background: #1b5e20;
}

.btn-danger {
    background: #c20000;
}
.btn-danger:hover {
    background: #9a0000;
}

.btn-secondary {
    background: #777;
}
.btn-secondary:hover {
    background: #555;
}

.btn-outline {
    background: #ffffff;
    color: #0077c2;
    border: 2px solid #0077c2;
}
.btn-outline:hover {
    background: #e6f2ff;
}


















.btn-sm {
    padding: 6px 10px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 20px;
    font-size: 15px;
}











/* =============================
   BOTONES - FORZADO FINAL
   (no puede ser pisado)
============================= */

a.btn,
button.btn {
    background: #0077c2 !important;
    color: #ffffff !important;
}

a.btn:hover,
button.btn:hover {
    background: #005c96 !important;
}















a.btn.btn-success { background: #2e7d32 !important; }
a.btn.btn-success:hover { background: #1b5e20 !important; }

a.btn.btn-danger { background: #c20000 !important; }
a.btn.btn-danger:hover { background: #9a0000 !important; }

a.btn.btn-secondary { background: #777 !important; }
a.btn.btn-secondary:hover { background: #555 !important; }

a.btn.btn-warning {
    background: #e0a800 !important;
    color: #000 !important;
}
a.btn.btn-warning:hover {
    background: #c69500 !important;
}
