/* ==========================================================================
   FoodCheck (ComerClaro) - Hoja de Estilos Principal (Material Horizon)
   ========================================================================== */

/* --- VARIABLES DE DISEÑO --- */
:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a; /* Ligeramente más oscuro para mejor contraste */
    --muted: #64748b;
    --accent: #10b981; /* Verde esmeralda */
    --accent-dark: #059669;
    --border: #e2e8f0;
    --radius: 16px; /* Más redondeado, estilo Horizon */
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05); /* Sombra más difusa */
    --container-w: 1280px; /* Alineado con el max-w-7xl de Tailwind */
    --success: #10b981; 
    --warning: #f59e0b; 
    --danger:  #ef4444; 
    --info:    #3b82f6; 
}

/* Variables Modo Oscuro */
html.dark :root, html.dark body {
    --bg: #09090b; /* Zinc 950, encaja perfecto con el header de Tailwind */
    --card: #18181b; /* Zinc 900 */
    --text: #f8fafc;
    --muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08); /* Borde sutil transparente */
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

/* --- ESTILOS BASE --- */
* { 
    box-sizing: border-box; 
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    /* Transición suave al cambiar entre modo oscuro y claro */
    transition: background-color 0.3s ease, color 0.3s ease; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Contenedor Principal (Para todo lo que no es Tailwind) */
.container {
    width: 100%;
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 20px; /* Padding interno consistente en móviles */
}

main.container {
    flex-grow: 1; /* Empuja el footer hacia abajo */
    display: flex;
    flex-direction: column;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* --- RESET HEADER PARA TAILWIND --- */
/* Estas clases ya no se usan gracias a Tailwind, 
   pero las vaciamos por si algún archivo antiguo las llama */
.site-header, .header-container, .logo, .nav-links, .menu-toggle, .user-profile-btn, .user-dropdown-wrapper {
    /* Vaciado intencional */
}

/* --- COMPONENTES GLOBALES --- */
.panel {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel:hover {
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.08);
}

html.dark .panel:hover {
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.4);
}

/* Alertas de Base de Datos */
.db-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

html.dark .db-warning {
    background: rgba(180, 83, 9, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}
