/* =====================================================
   ESTRUCTURA GENERAL
===================================================== */

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;

    display: flex;
    flex-direction: column;
}

.contenido-principal {
    min-height: calc(100vh - 145px);
    flex: 1 0 auto;
}


/* =====================================================
   NAVBAR
===================================================== */

.navbar {
    min-height: 72px;
}

.navbar-brand {
    font-size: 20px;
    white-space: nowrap;
}

.navbar .nav-link {
    transition: 0.2s ease;
}

.navbar .nav-link:hover {
    opacity: 1;
}

.usuario-navbar {
    white-space: nowrap;
}

.cerrar-sesion {
    color: #ffc107 !important;
    font-weight: 500;
}

.cerrar-sesion:hover {
    color: #ffca2c !important;
}


/* =====================================================
   FOOTER
===================================================== */

.footer-sistema {
    width: 100%;

    margin-top: auto;
    padding: 18px 0;

    flex-shrink: 0;

    background: #212529 !important;
    background-color: #212529 !important;

    color: #ffffff !important;
}

.footer-contenido {
    color: #ffffff !important;
    font-size: 13px;
}

.footer-autor {
    margin-top: 3px;

    color: #adb5bd !important;
    font-size: 12px;
}

.footer-autor strong {
    color: #ffffff !important;
}


/* =====================================================
   MENÚ RESPONSIVE
===================================================== */

@media (max-width: 991.98px) {

    .navbar {
        min-height: auto;

        padding-top: 12px;
        padding-bottom: 12px;
    }

    .navbar-collapse {
        margin-top: 15px;
        padding-top: 12px;

        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar-nav .nav-link {
        padding: 10px 5px;
    }

    .usuario-navbar {
        display: block;
        padding: 10px 5px;
    }

    .cerrar-sesion {
        display: block;
        padding: 10px 5px !important;
    }

}


/* =====================================================
   PANTALLAS MUY PEQUEÑAS
===================================================== */

@media (max-width: 575.98px) {

    .navbar-brand {
        font-size: 17px;
    }

    .contenido-principal {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

}


/* =====================================================
   VISTA DE IMPRESIÓN DEL EXPEDIENTE
===================================================== */

.vista-impresion {
    background: #f3f4f6;
    color: #111111;
}

.contenedor-impresion {
    max-width: 1000px;

    margin: 30px auto;
    padding: 35px 40px;

    background: #ffffff;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.encabezado-impresion {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 30px;
}

.titulo-expediente {
    margin: 25px 0;
}

.seccion-impresion {
    margin-top: 28px;
}

.seccion-impresion h5 {
    margin-bottom: 12px;
    padding-bottom: 6px;

    border-bottom: 2px solid #212529;

    font-weight: 700;
}

.tabla-impresion {
    width: 100%;

    border-collapse: collapse;
}

.tabla-impresion td,
.tabla-impresion th {
    padding: 8px 10px;

    border: 1px solid #cfd4da;

    vertical-align: top;
}

.tabla-impresion th {
    background: #f1f3f5;

    font-weight: 700;
}

.tabla-impresion .etiqueta {
    width: 18%;

    background: #f8f9fa;

    font-weight: 600;
}

.bloque-texto {
    min-height: 60px;

    padding: 12px;

    border: 1px solid #d8dce0;
}

.firmas-impresion {
    display: flex;
    justify-content: space-between;

    gap: 50px;

    margin-top: 70px;

    text-align: center;
}

.firmas-impresion > div {
    width: 45%;
}

.pie-impresion {
    margin-top: 40px;
    padding-top: 10px;

    border-top: 1px solid #bbbbbb;

    color: #666666;

    font-size: 11px;
    text-align: center;
}

.botones-impresion {
    max-width: 1000px;

    margin: 0 auto 30px;

    text-align: center;
}


/* =====================================================
   IMPRESIÓN EN PAPEL
===================================================== */

@media print {

    @page {
        size: A4;
        margin: 15mm;
    }


    /* OCULTAR ELEMENTOS NO NECESARIOS */
    .imprimir-ocultar {
        display: none !important;
    }


    /* CONTENIDO GENERAL */
    .contenido-principal {
        margin: 0 !important;
        padding: 0 !important;
    }


    /* CUERPO DE IMPRESIÓN */
    body.vista-impresion {
        background: #ffffff;
    }


    /* CONTENEDOR DEL EXPEDIENTE */
    .contenedor-impresion {
        max-width: none;

        margin: 0;
        padding: 0;

        box-shadow: none;
    }


    /* BOTONES */
    .botones-impresion {
        display: none !important;
    }


    /* EVITAR CORTES INCORRECTOS */
    .seccion-impresion {
        break-inside: avoid;
    }

    .tabla-seguimientos tr {
        break-inside: avoid;
    }

    .firmas-impresion {
        break-inside: avoid;
    }

}