/**
 * ESTILOS GLOBALES Y CONFIGURACIÓN BASE
 * Definición de tipografía, colores corporativos y reseteo básico.
 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f0f2f5;
    color: #333;
}

/* --- HEADER Y NAVEGACIÓN PRINCIPAL --- */
header {
    background: #1a2a3a;
    color: #00d4ff;
    padding: 20px;
    border-bottom: 4px solid #005f73;
}
header .header-container a.logo h1 {
    text-decoration: none;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}


nav a {
    color: #fff;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    color: #00d4ff;
}


/* --- CONTENEDOR PRINCIPAL (LAYOUT) --- */
main {
    background: #fff;
    padding: 30px;
    max-width: 1000px;
    margin: 30px auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* --- SECCIÓN DE TARJETAS (CARDS) --- */
.cards {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.card {
    border: 1px solid #e1e4e8;
    padding: 20px;
    text-decoration: none;
    color: #1a2a3a;
    flex: 1;
    border-radius: 8px;
    transition: transform 0.2s;
    background: #fff;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #00d4ff;
}

/* --- TABLAS DE DATOS --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th {
    background: #f8f9fa;
    color: #1a2a3a;
    padding: 12px;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

/* --- COMPONENTES DE INTERACCIÓN (BOTONES) --- */
button {
    background: #005f73;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background: #0a9396;
}

/* --- PIE DE PÁGINA --- */
footer {
    background: #1a2a3a;
    color: #888;
    text-align: center;
    padding: 20px;
    bottom: 0;
    width: 100%;
    font-size: 0.8rem;
}

/* --- ESTRUCTURA DEL HEADER CONTENEDOR ---
   Controla la distribución espacial entre el logo/título y el menú.
*/
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
}

/* Alineación del menú de navegación a la derecha */
.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

/* --- MENÚ DESPLEGABLE DE USUARIO (CSS-ONLY) ---
   Implementación basada en el "Checkbox Hack" para evitar uso de JS.
*/
.menu-checkbox {
    display: none; /* Input oculto que controla el estado del menú */
}

.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-name {
    color: white;
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
    user-select: none;
}

/* Contenedor del menú desplegable oculto por defecto */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #1a252f;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.5);
    border-radius: 4px;
    z-index: 9999;
}

/* Disparador de visibilidad al activar el checkbox */
.menu-checkbox:checked ~ .dropdown-content {
    display: block;
}

/* Elementos internos del menú desplegable */
.dropdown-content span,
.dropdown-content a {
    color: white !important;
    padding: 12px 16px;
    display: block;
    text-decoration: none;
    font-size: 14px;
}

.user-email {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff !important;
}

.dropdown-content a:hover {
    background-color: #2c3e50;
}

/* --- COMPONENTES DE NOTIFICACIÓN ---
   Estilos para alertas de inventario o sistema.
*/
.alert-stock {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
    color: #856404;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
    font-family: Arial, sans-serif;
}

.btn-leer {
    background: #856404;
    color: white;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85em;
}

.btn-leer:hover {
    background: #533f03;
}

/* --- BANNER DE CONSENTIMIENTO DE COOKIES ---
   Posicionamiento fijo para cumplimiento legal (GDPR/LFPDPPP).
*/
.cookie-banner-php {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #002d36;
    color: white;
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.3);
    border-top: 3px solid #005f73;
}

.cookie-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-cookie-accept {
    background: #005f73;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-cookie-accept:hover {
    background: #0a9396;
}

.cookie-link {
    color: #94d2bd;
    text-decoration: underline;
    font-size: 0.9em;
}




/**
 * COMPONENTES DEL DASHBOARD PRINCIPAL
 */

/* Contenedor principal del Hero */
.main-dashboard {
    text-align: center;
    padding: 60px 0;
}

/* Espaciado para los contenedores de botones de acción */
.action-container {
    margin-top: 40px;
}

/**
 * BOTÓN PRINCIPAL (Call to Action)
 * Estilo unificado para las acciones del panel central.
 */
.button-main {
    background: #005f73;
    color: white;
    padding: 22px 45px;
    text-decoration: none;
    font-size: 1.4rem;
    border-radius: 12px;
    display: inline-block;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

/* Efectos de interacción */
.button-main:hover {
    background: #0a9396;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.button-main:active {
    transform: scale(0.98);
