:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #f4f6f7;
    --text-color: #2c3e50;
    --card-shadow: 0 15px 35px rgba(50, 50, 93, .1), 0 5px 15px rgba(0, 0, 0, .07);
    --hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #e0e6eb 0%, #f4f6f7 100%);
    color: var(--text-color);
    line-height: 1.6;
    padding: 30px;
}

h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* Paginación */

div:first-of-type {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

#btnAnterior,
#btnSiguiente {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#btnAnterior:hover,
#btnSiguiente:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
}

#btnAnterior:disabled,
#btnSiguiente:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#paginaActual {
    font-weight: 600;
    color: var(--primary-color);
}


/* Tabla */

#tablaEmpresas {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

#tablaEmpresas thead {
    background: var(--primary-color);
    color: white;
}

#tablaEmpresas th,
#tablaEmpresas td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

#tablaEmpresas tbody tr {
    transition: all 0.3s ease;
}

#tablaEmpresas tbody tr:hover {
    background: #f1f3f5;
    transform: scale(1.01);
    box-shadow: var(--hover-shadow);
}


/* Logos */

.logo-empresa {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.logo-empresa:hover {
    transform: scale(1.2) rotate(5deg);
}


/* Estados de Empresa */

.fecha-vencido {
    color: #e74c3c;
    font-weight: 600;
}

.fecha-proximo-vencimiento {
    color: #f39c12;
    font-weight: 600;
}


/* Modal Logo */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-contenido {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 15px;
    max-width: 600px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: modalAppear 0.3s ease;
}

.cerrar {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.cerrar:hover {
    color: black;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* Responsividad */

@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    #tablaEmpresas {
        font-size: 12px;
    }
    #tablaEmpresas th,
    #tablaEmpresas td {
        padding: 10px;
    }
    .logo-empresa {
        width: 40px;
        height: 40px;
    }
}

.btn-volver {
    background: #c0392b;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-volver:hover {
    background: #27ae60;
    transform: translateY(-3px);
}