/* ========================================= */
/* ESTILOS GLOBALES - E&A ERP          */
/* ========================================= */

:root {
    /* --- COLORES DE MARCA (Tus definiciones) --- */
    --color-brand-primary-blue: #2A478C;    /* Confianza, Profesionalismo */
    --color-brand-accent-green: #74BD42;    /* Calidad, Éxito */
    --color-brand-accent-orange: #E88235;   /* Acción, Energía */
    --color-brand-neutral-base: #666677;    /* Estructura */

    /* --- COLORES DE UTILIDAD --- */
    --color-utility-background-white: #FFFFFF;
    --color-utility-text-black: #000000;
    --color-utility-neutral-light: #A8A8A8;
    --color-utility-text-secondary: #4C4C4C;
    
    /* --- Color de fondo general de la app (Un gris muy suave) --- */
    --bg-app: #f4f6f9; 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    /* Color base por si la imagen tarda en cargar */
    background-color: var(--bg-app);
    color: var(--color-utility-text-black);
    position: relative; /* Necesario para la marca de agua */
    min-height: 100vh;
}

/* --- MARCA DE AGUA (FONDO DE PLANOS Y MAQUINARIA) --- */
body::before {
    content: "";
    position: fixed; /* Se queda fijo aunque hagas scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Aquí llamamos a tu imagen */
    background-image: url('fondo.png'); 
    
    /* Esto hace que la imagen se repita como un tapiz */
    background-repeat: repeat; 
    
    /* Tamaño de los dibujos (ajústalo si se ven muy grandes o chicos) */
    background-size: 400px; 
    
    /* EL SECRETO: Opacidad muy baja para que sea sutil */
    opacity: 0.10; /* Juega con este número: 0.03 (más suave) a 0.10 (más fuerte) */
    
    /* Truco para que se fusione con el gris de fondo */
    mix-blend-mode: multiply; 
    z-index: -1; /* Se asegura de estar DETRÁS de todo */
    
    /* Filtro para convertir cualquier imagen a escala de grises (blanco y negro) */
    filter: grayscale(100%);
}

/* Estilos de Botones Generales */
.btn-primary {
    background-color: var(--color-brand-primary-blue);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn-primary:hover {
    /* Al pasar el mouse, usamos el naranja para "energizar" la acción o oscurecemos el azul */
    background-color: var(--color-brand-accent-orange); 
}/* --- ESTILOS DE TARJETAS DE PROYECTO --- */
.project-card {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--color-brand-primary-blue);
}
.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}
.project-card h3 {
    margin: 0 0 10px 0;
    color: var(--color-brand-primary-blue);
}
.project-info {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Badges (Etiquetas de estado) */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}
.badge-active {
    background-color: rgba(116, 189, 66, 0.15); /* Verde clarito */
    color: var(--color-brand-accent-green);
}
.badge-planning {
    background-color: rgba(232, 130, 53, 0.15); /* Naranja clarito */
    color: var(--color-brand-accent-orange);
}

/* Barra de Progreso */
.progress-bar {
    background-color: #eee;
    border-radius: 10px;
    height: 8px;
    width: 100%;
    overflow: hidden;
}
.progress-fill {
    background-color: var(--color-brand-primary-blue);
    height: 100%;
    border-radius: 10px;
}/* ========================================= */
/* ESTILOS DEL ASISTENTE VIRTUAL (&bot)      */
/* ========================================= */

.bot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    cursor: pointer;
    /* Animación de flotar */
    animation: flotar 3s ease-in-out infinite;
}

.bot-avatar {
    width: 65px;
    height: 65px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    color: var(--color-brand-primary-blue);
    border: 3px solid var(--color-brand-accent-orange);
    position: relative;
    overflow: hidden;
}

/* Si pones una imagen real luego, esto asegura que se ajuste bien */
.bot-avatar img { width: 100%; height: 100%; object-fit: cover; }

.bot-badge {
    position: absolute; top: 0; right: 0;
    background-color: #e74c3c; color: white;
    width: 20px; height: 20px; border-radius: 50%;
    font-size: 11px; display: flex; align-items: center; justify-content: center;
    border: 2px solid white; font-weight: bold;
}

@keyframes flotar {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); } /* Sube un poquito */
    100% { transform: translateY(0px); }
}

/* Ventana de Chat */
.chat-window {
    display: none; /* Oculto al inicio */
    position: fixed; bottom: 110px; right: 30px;
    width: 320px; height: 400px;
    background: white; border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.2);
    z-index: 1001; flex-direction: column; overflow: hidden;
    border: 1px solid #ddd;
    animation: aparecer 0.3s ease-out;
}

@keyframes aparecer { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.chat-header {
    background-color: var(--color-brand-primary-blue); color: white;
    padding: 15px; font-weight: bold; display: flex; justify-content: space-between; align-items: center;
}
.chat-body { flex: 1; padding: 15px; background-color: #f9f9f9; overflow-y: auto; }
.chat-input-area { padding: 10px; background: white; border-top: 1px solid #eee; display: flex; gap: 5px; }
.chat-input-area input { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 20px; outline: none; }
.chat-input-area button { 
    background: var(--color-brand-primary-blue); color: white; border: none; 
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer; 
}

/* Mensajes */
.msg-bot { background: white; padding: 10px; border-radius: 10px 10px 10px 0; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); font-size: 14px; border-left: 3px solid var(--color-brand-accent-orange); }