html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

body {
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: white; 
}

header, footer {
    background: lightblue;
    font-weight: bold;
    padding: 1rem;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

header {
    top: 0;
    height: 70px;
    border-bottom: 1px solid lightgray;
    font-size: 1.5rem;
    justify-content: flex-start;
}

header h2 {
    flex: 1 1 auto;
    margin: 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.botones-header {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: 0;
    align-items: center;
}

.botones-header button {
    padding: 0.5rem 1rem;
    border: 1px solid lightgray;
    border-radius: 4px;
    background: lightgray;
    cursor: pointer;
    transition: background 0.2s;
}

.botones-header button:hover {
    background: lightcyan;
}

footer {
    bottom: 0;
    height: 50px;
    border-top: 1px solid lightgray;
    font-size: 1.1rem;
    justify-content: center;
}

main {
    margin-top: 90px;
    margin-bottom: 60px;
    height: calc(100vh - 90px - 60px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.contenedor-tabla {
    background: lavender;
    padding: 1rem;
    border-radius: 6px;
    margin: 0 10px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.tabla-proveedores {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: fixed;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.tabla-proveedores thead,
.tabla-proveedores tfoot {
    display: table;
    width: 100%;
    table-layout: fixed;
    flex-shrink: 0;
}

.tabla-proveedores tbody {
    display: block;
    flex: 1 1 auto;
    overflow-y: auto;
    width: 100%;
    min-height: 0;
}

.tabla-proveedores tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.tabla-proveedores th, .tabla-proveedores td {
    border: 1px solid lightgray;
    padding: 0.5rem;
    text-align: center;
}

.tabla-proveedores thead th {
    background: lightgreen;
    font-weight: bold;
    font-size: 1.1rem;
    position: sticky;
    top: 0;
    z-index: 1;
}

.tabla-proveedores tfoot td {
    background: khaki;
    font-weight: 500;
    font-size: 0.95rem;
    position: sticky;
    bottom: 0;
    z-index: 1;
}

.tabla-proveedores tbody tr:nth-child(even) {
    background: aliceblue;
}

@media (max-width: 1000px) {
    .tabla-proveedores th.certificadosCalidad,
    .tabla-proveedores td.certificadosCalidad {
        display: none;
    }
}

.contenedorActivo {
    opacity: 1;
    pointer-events: auto;
}

.contenedorPasivo {
    opacity: 0.3;
    pointer-events: none;
}

.ventanaModalApagado {
    visibility: hidden;
}

.ventanaModalPrendido {
    visibility: visible;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modalContenido {
    background: lightgray;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    min-width: 900px;
    min-height: 500px;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modalHeader {
    background: gray;
    color: black;
    font-weight: bold;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
}

.cerrarModal {
    background: transparent;
    border: none;
    color: red;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    margin-left: 20px;
}

iframe {
    flex: 1 1 auto;
    border: none;
    width: 100%;
    min-height: 500px;
    background: whitesmoke;
}