/* css/styles.css - DISEÑO "SOFT LUXURY" */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
    /* Paleta Mejorada */
    --fondo: #fdfbfd;
    --rosa-pastel: #ffcbd7; /* Un poco más saturado */
    --morado-pastel: #e4dff7;
    --dorado-suave: #d4af37; /* Nuevo: Para bordes elegantes */
    --oro-rosa: #e6b8a2;
    --blanco: #ffffff;
    --texto: #5a4a5c; /* Gris con tono morado/café */
    --sombra-suave: 0 10px 30px rgba(230, 184, 162, 0.15); /* Sombra con color */
    --sombra-fuerte: 0 15px 40px rgba(90, 74, 92, 0.1);
}

/* css/styles.css */

/* --- CORRECCIÓN DEL SALTO DE PANTALLA --- */
html {
    /* Esto obliga a que el carril de scroll siempre esté visible 
       (aunque esté deshabilitado), evitando que el contenido salte */
    overflow-y: scroll; 
    
    /* Opción moderna (si prefieres que no se vea la barra gris vacía):
       scrollbar-gutter: stable; 
       (Puedes usar una u otra, overflow-y: scroll es la más compatible)
    */
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }

/* --- FONDO CON ESTILO (La magia visual) --- */
body {
    color: var(--texto);
    background-color: var(--fondo);
    /* Patrón de fondo sutil (Ondas suaves) */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 209, 220, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(224, 219, 245, 0.4) 0%, transparent 40%);
    background-attachment: fixed; /* El fondo se queda quieto al bajar */
    min-height: 100vh;
}

/* --- BARRA DE NAVEGACIÓN --- */
nav {
    background-color: rgba(255, 255, 255, 0.95) !important; /* Semi-transparente */
    backdrop-filter: blur(10px); /* Efecto vidrio */
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1); /* Línea dorada sutil */
}

.brand { display: flex; align-items: center; gap: 12px; }
.links { display: flex; gap: 1.5rem; align-items: center; }

.nav-link {
    text-decoration: none; color: #776a79; font-weight: 500; font-size: 0.95rem;
    padding: 8px 18px; border-radius: 25px; transition: all 0.3s ease;
    display: flex; align-items: center; gap: 8px;
    border: 1px solid transparent;
}

.nav-link:hover, .nav-link.activo {
    background-color: #fff0f3; /* Rosa muy pálido */
    color: #b05d76 !important; /* Texto rosa oscuro */
    border-color: var(--rosa-pastel);
    transform: translateY(-1px);
}

/* Botón Staff */
.btn-staff {
    text-decoration: none; font-size: 0.85rem; padding: 6px 16px;
    border: 1px solid var(--morado-pastel); border-radius: 20px; color: #776a79;
    transition: all 0.3s; display: flex; align-items: center; gap: 6px; margin-left: 10px !important;
    background: white;
}
.btn-staff:hover { background-color: var(--morado-pastel); color: #5a4a5c; }
.nav-link svg, .btn-staff svg { width: 18px; height: 18px; stroke-width: 2; }

/* --- CONTENEDORES --- */
.container { 
    max-width: 1200px; 
    width: 90%; /* Asegura que siempre ocupe el 90% centrado */
    margin: 2rem auto; 
    padding: 0 1.5rem; 
}

/* --- HERO BANNER (Más elegante) --- */
.hero-banner {
    /* Degradado más rico y elegante */
    background: linear-gradient(135deg, #fdfbfd 0%, #f3e5f5 50%, #fff0f5 100%);
    padding: 5rem 2rem; 
    text-align: center; 
    border-radius: 0 0 50% 50% / 3rem; 
    margin-bottom: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(228, 223, 247, 0.4);
}
.hero-banner h2 { 
    font-size: 3rem; 
    color: #5a4a5c; 
    margin-bottom: 1rem; 
    font-weight: 400; /* Letra más fina */
    letter-spacing: -1px;
}
.hero-banner p { color: #887a8a; font-size: 1.2rem; max-width: 600px; margin: 0 auto; line-height: 1.6; }

/* --- FILTROS --- */
.filtros-container { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; }
.filtro-btn {
    background: white; 
    border: 1px solid var(--rosa-pastel); 
    padding: 0.8rem 2rem;
    border-radius: 50px; 
    cursor: pointer; 
    color: #776a79; 
    transition: all 0.3s ease; 
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.filtro-btn:hover, .filtro-btn.activo {
    background: linear-gradient(45deg, var(--rosa-pastel), #ffe0e9);
    color: #5a4a5c; 
    border-color: transparent;
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(255, 203, 215, 0.6);
}

/* --- TARJETAS DE PRODUCTO (Glassmorphism) --- */
.productos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2.5rem; }

.producto-card { 
    background: rgba(255, 255, 255, 0.8); /* Semi transparente */
    border-radius: 20px; 
    overflow: hidden; 
    box-shadow: var(--sombra-suave); 
    border: 1px solid rgba(255, 255, 255, 0.6); /* Borde de vidrio */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Rebote suave */
}

.producto-card:hover { 
    transform: translateY(-10px); 
    box-shadow: var(--sombra-fuerte);
    border-color: var(--rosa-pastel);
}

.img-placeholder { 
    width: 100%; height: 240px; 
    background: linear-gradient(to top, #fff0f5, #ffffff); /* Fondo degradado suave en la foto */
    display: flex; align-items: center; justify-content: center; color: #999; 
}
.info-producto { padding: 1.5rem; text-align: center; }

.precio { 
    color: #8e44ad; /* Morado elegante */
    font-family: 'Georgia', serif;
    font-weight: bold; font-size: 1.4rem; margin-top: 0.8rem; 
}

.btn-whatsapp {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 1.2rem;
    padding: 10px; background-color: #25D366; color: white; text-decoration: none; border-radius: 50px; 
    font-weight: bold; font-size: 0.95rem; transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover { opacity: 1; transform: scale(1.02); box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4); }

/* --- LOGIN & FORMS --- */
.login-container { 
    height: 100vh; display: flex; justify-content: center; align-items: center; 
    background: radial-gradient(circle at 50% 50%, #fdfbfd 0%, #e0dbf5 100%);
}
.login-card, .form-container-card { 
    background: rgba(255, 255, 255, 0.9); 
    padding: 2.5rem; border-radius: 24px; 
    box-shadow: 0 20px 60px rgba(90, 74, 92, 0.1); 
    width: 100%; max-width: 450px; 
    border: 1px solid white;
    margin: 0 auto;
}
.form-container-card { max-width: 800px; } /* Más ancho para agregar productos */

.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 600; color: #776a79; }
.form-group input, .form-group select, .form-group textarea { 
    width: 100%; padding: 12px; 
    border: 2px solid #f0f0f0; border-radius: 12px; outline: none; 
    background: #fafafa; transition: all 0.3s; 
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { 
    border-color: var(--rosa-pastel); background: white; box-shadow: 0 0 0 4px rgba(255, 209, 220, 0.2);
}

.btn-login, .btn-guardar { 
    width: 100%; padding: 12px; 
    background: linear-gradient(45deg, #ffcbd7, #f3e5f5); /* Botón degradado */
    border: none; border-radius: 12px; 
    color: #5a4a5c; font-weight: bold; cursor: pointer; font-size: 1rem;
    box-shadow: 0 4px 15px rgba(255, 203, 215, 0.5);
    transition: transform 0.2s;
}
.btn-guardar { width: auto; padding: 10px 30px; }
.btn-login:hover, .btn-guardar:hover { transform: translateY(-2px); filter: brightness(0.98); }

.error-msg { color: #e74c3c; font-size: 0.85rem; margin-top: 1rem; display: none; text-align: center;}

/* --- DASHBOARD CEO --- */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.stat-card { 
    background: white; padding: 1.5rem; border-radius: 16px; 
    box-shadow: var(--sombra-suave); 
    display: flex; align-items: center; gap: 1rem;
    border: 1px solid rgba(0,0,0,0.02);
}

/* --- ADMIN TOOLBAR & TABLE --- */
.admin-toolbar { 
    display: flex; gap: 1rem; margin-bottom: 2rem; 
    background: white; padding: 1.2rem; border-radius: 16px; 
    box-shadow: var(--sombra-suave); flex-wrap: wrap; 
}
.search-box { flex: 2; position: relative; display: flex; align-items: center; }
.search-box input { width: 100%; padding: 12px 12px 12px 45px; border: 1px solid #eee; border-radius: 12px; outline: none; transition: border 0.3s; }
.search-box input:focus { border-color: var(--rosa-pastel); }
.search-icon { position: absolute; left: 15px; color: #bbb; width: 20px; height: 20px; }
.filter-select { flex: 1; padding: 12px; border: 1px solid #eee; border-radius: 12px; background: white; color: #555; cursor: pointer; outline: none; }

.tabla-contenedor { 
    background: white; padding: 0; /* Sin padding interno */
    border-radius: 16px; box-shadow: var(--sombra-suave); overflow: hidden; /* Bordes redondos en tabla */
}
.tabla-inventario { width: 100%; border-collapse: collapse; }
.tabla-inventario th { 
    background-color: #fafafa; color: #776a79; text-align: left; 
    padding: 1.2rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 1px solid #eee;
}
.tabla-inventario td { padding: 1.2rem; border-bottom: 1px solid #f9f9f9; color: var(--texto); vertical-align: middle; }
.tabla-inventario tr:last-child td { border-bottom: none; }
.tabla-inventario tr:hover { background-color: #fffcfd; }

/* Estados */
.estado-stock { padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; display: inline-block; }
.en-stock { background-color: #e8f8f5; color: #27ae60; border: 1px solid #d1f2eb; }
.bajo-stock { background-color: #fef9e7; color: #f39c12; border: 1px solid #fdebd0; }
.agotado { background-color: #fdedec; color: #c0392b; border: 1px solid #fadbd8; }

.acciones-btn { display: flex; gap: 12px; }
.btn-icon { 
    background: #f5f5f5; border: none; cursor: pointer; color: #888; 
    width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.btn-icon:hover { background: var(--rosa-pastel); color: white; transform: scale(1.1); }

/* --- UPLOAD BOX --- */
.upload-box {
    border: 2px dashed #e0dbf5; border-radius: 16px; padding: 2rem;
    text-align: center; cursor: pointer; background-color: #fdfbfd;
    transition: all 0.3s ease; min-height: 200px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    position: relative; overflow: hidden;
}
.upload-box:hover { border-color: var(--rosa-pastel); background-color: #fff0f5; }
.upload-box input[type="file"] { display: none; }
.upload-icon { width: 40px; height: 40px; margin-bottom: 10px; color: #d1c4e9; }
.img-preview { max-width: 100%; max-height: 100%; border-radius: 8px; display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; background: white; padding: 10px; }
.btn-remove-img { position: absolute; top: 10px; right: 10px; background: white; border: 1px solid #eee; color: #e74c3c; border-radius: 50%; width: 30px; height: 30px; display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* --- BADGES (Etiquetas) --- */
.badge-producto { position: absolute; top: 15px; left: 15px; padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; z-index: 10; box-shadow: 0 4px 10px rgba(0,0,0,0.1); text-transform: uppercase; letter-spacing: 0.5px; }
.badge-producto.agotado { background-color: white; color: #c0392b; border: 1px solid #fadbd8; }
.badge-producto.poco-stock { background-color: white; color: #f39c12; border: 1px solid #fdebd0; }
.badge-producto.oferta { background: linear-gradient(45deg, #2ecc71, #27ae60); color: white; border: none; }
.badge-producto.nuevo { background: linear-gradient(45deg, var(--morado-pastel), #d1c4e9); color: #5a2d82; border: none; }

/* --- BOTÓN VOLVER --- */
.btn-volver-atras { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #888; font-size: 0.95rem; font-weight: 500; margin-bottom: 1.5rem; transition: all 0.2s ease; padding: 8px 15px; background: white; border-radius: 30px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.btn-volver-atras:hover { color: var(--texto); transform: translateX(-3px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

/* --- TOASTS --- */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: white; padding: 15px 20px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-left: 5px solid; display: flex; align-items: center; gap: 12px; min-width: 300px; transform: translateX(120%); animation: slideIn 0.3s forwards; font-size: 0.95rem; font-weight: 500; }
.toast.success { border-color: #27ae60; color: #1e8449; }
.toast.error { border-color: #c0392b; color: #922b21; }
.toast-icon { width: 20px; height: 20px; }
@keyframes slideIn { to { transform: translateX(0); } }
@keyframes slideOut { to { transform: translateX(120%); opacity: 0; } }

/* --- MODAL (CORREGIDO PARA TEXTOS LARGOS) --- */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(90, 74, 92, 0.4); backdrop-filter: blur(8px); 
    display: none; justify-content: center; align-items: center; 
    z-index: 2000; opacity: 0; transition: opacity 0.3s ease; 
}

.modal-content { 
    background: white; width: 90%; max-width: 900px; 
    border-radius: 24px; overflow: hidden; 
    box-shadow: 0 25px 80px rgba(0,0,0,0.2); 
    display: flex; flex-direction: column; 
    position: relative; 
    transform: translateY(30px); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    max-height: 90vh; /* Altura máxima del 90% de la pantalla */
    overflow-y: auto; /* Scroll general en celulares */
}

@media (min-width: 768px) { 
    .modal-content { 
        flex-direction: row; 
        height: 600px; /* Altura fija en PC */
        overflow-y: hidden; /* Quitamos scroll general en PC */
    } 
}

.modal-img-container { 
    flex: 1.2; 
    background: radial-gradient(circle, #fff0f5 0%, #fdfbfd 100%); 
    display: flex; align-items: center; justify-content: center; 
    padding: 30px; position: relative; 
    min-height: 300px; /* Altura mínima para la foto en móvil */
}

.modal-img-container img { 
    max-width: 90%; max-height: 90%; 
    object-fit: contain; z-index: 1; 
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)); 
}

.modal-info { 
    flex: 1; 
    padding: 2.5rem; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start; /* IMPORTANTE: Alinea todo arriba, no al centro */
    position: relative;
    overflow-y: auto; /* IMPORTANTE: Scroll solo en el texto si es muy largo */
}

/* Espaciado para el título y precio */
#modal-title { margin-top: 10px; line-height: 1.2; }
#modal-price { margin-bottom: 20px; color: var(--rosa-pastel); font-weight: bold; font-size: 1.5rem; }

/* Descripción con espacio */
#modal-desc { 
    color: #666; 
    line-height: 1.6; 
    margin-bottom: 30px; 
    font-size: 0.95rem; 
}

/* Botón WhatsApp con espacio de seguridad */
.btn-whatsapp { 
    margin-top: auto; /* Empuja el botón al final si hay espacio */
    margin-bottom: 10px; /* Margen de seguridad abajo */
    flex-shrink: 0; /* Evita que el botón se aplaste */
}

/* Botón Cerrar (X) */
.btn-cerrar-modal { 
    position: absolute; top: 15px; right: 15px; 
    background: white; border-radius: 50%; width: 40px; height: 40px; 
    border: 1px solid #eee; font-size: 1.2rem; color: #555; 
    cursor: pointer; z-index: 20; 
    display: flex; align-items: center; justify-content: center; 
    transition: all 0.2s; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.btn-cerrar-modal:hover { background: #fdfbfd; transform: rotate(90deg); }

/* Animación de apertura */
.modal-overlay.modal-open { display: flex; opacity: 1; }
.modal-overlay.modal-open .modal-content { transform: translateY(0); }

/* Footer */
footer { text-align: center; padding: 3rem; background: linear-gradient(to top, #f3e5f5, white); margin-top: 6rem; color: #776a79; font-size: 0.9rem; border-top: 1px solid #fdfbfd; }

/* --- ARREGLOS VISUALES PERFIL CEO --- */

/* 1. Layout lado a lado (Grid) */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr; /* En celular, una debajo de otra */
    gap: 2rem;
    align-items: start; /* Alineadas arriba */
}

/* En pantallas grandes (PC), se ponen lado a lado */
@media (min-width: 992px) {
    .profile-layout {
        grid-template-columns: repeat(2, 1fr); /* Dos columnas iguales */
    }
}

/* Ajuste para las tarjetas dentro del perfil */
.card-perfil-ajuste {
    margin: 0 !important; /* Quitamos el margen automático que las centraba */
    width: 100% !important; /* Que ocupen todo su espacio en la grilla */
    max-width: none !important; /* Quitamos la restricción de ancho */
    height: fit-content; /* Que se ajusten a su contenido */
}

/* 2. Nuevo Botón "+ Crear Usuario" (Estilo Verde Moderno) */
.btn-crear-usuario {
    width: 100%;
    padding: 12px;
    /* Degradado verde suave y elegante */
    background: linear-gradient(45deg, #81c784, #a5d6a7);
    color: white;
    border: none;
    border-radius: 12px; /* Bordes redondeados */
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    /* Sombra verde suave */
    box-shadow: 0 4px 15px rgba(129, 199, 132, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Animación suave */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Animación al pasar el mouse (Hover) */
.btn-crear-usuario:hover {
    transform: translateY(-3px); /* Se eleva */
    box-shadow: 0 8px 25px rgba(129, 199, 132, 0.6); /* Sombra más intensa */
    filter: brightness(1.05); /* Un poco más brillante */
}

/* Ajuste para la lista de admins */
#lista-admins li {
    border: 1px solid rgba(0,0,0,0.05) !important; /* Borde más sutil */
    background: rgba(255,255,255,0.5) !important; /* Fondo semi-transparente */
    transition: all 0.2s;
}
#lista-admins li:hover {
    background: white !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transform: translateX(2px);
}

/* --- BOTONES DE ACCIÓN (Alineación Perfecta) --- */
.form-actions {
    display: flex;
    justify-content: space-between; /* <--- ESTO ES LA CLAVE: Separa izquierda y derecha */
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
    flex-wrap: wrap; /* Para que se adapte en celulares */
}

/* Grupo de botones a la derecha (Cancelar + Guardar) */
.botones-derecha {
    display: flex;
    gap: 10px;
}

/* Estilo botón eliminar (Rojo suave) */
.btn-eliminar {
    background-color: #fff5f5;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.btn-eliminar:hover {
    background-color: #ffebee;
    border-color: #e57373;
    transform: translateY(-1px);
}

/* --- BOTÓN VOLVER (Corrección Minimalista) --- */
.btn-volver-atras {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent !important; /* Quitamos el fondo gris/blanco */
    border: none !important;            /* Quitamos el borde */
    padding: 0 !important;              /* Quitamos el relleno */
    color: #887a8a;                     /* Gris suave */
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 2rem;
    box-shadow: none !important;        /* Quitamos la sombra */
    transition: all 0.3s ease;
    width: auto !important;             /* Que no ocupe todo el ancho */
}

.btn-volver-atras:hover {
    color: var(--rosa-pastel);          /* Color rosa al pasar el mouse */
    transform: translateX(-5px);        /* Pequeño movimiento a la izquierda */
    background: transparent;
}

.btn-volver-atras svg {
    width: 20px; 
    height: 20px; 
    stroke-width: 2.5;
}

/* --- BOTÓN CANCELAR (Estilo Redondo) --- */
.btn-cancelar {
    padding: 10px 25px;
    background-color: white;
    border: 1px solid #e0dbf5;          /* Borde lila muy suave */
    border-radius: 50px;                /* COMPLETAMENTE REDONDO */
    color: #776a79;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.btn-cancelar:hover {
    background-color: #fdfbfd;
    border-color: var(--rosa-pastel);   /* Borde rosa al pasar mouse */
    color: #5a4a5c;
    transform: translateY(-2px);
}

.form-actions {
    display: flex;
    justify-content: space-between; /* Eliminar a la izq, el resto a la der */
    align-items: center;
    margin-top: 3rem;               /* Un poco más de aire arriba */
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;  /* Línea sutil separadora */
}

/* --- OPTIMIZACIÓN PARA CELULARES (RESPONSIVE) --- */
@media (max-width: 768px) {
    
    /* 1. Barra de Navegación (Estilo App) */
    nav {
        flex-direction: column; /* Logo arriba, links abajo */
        padding: 10px;
        gap: 15px;
    }
    
    .brand {
        width: 100%;
        justify-content: center; /* Logo centrado */
    }

    .links {
        width: 100%;
        justify-content: flex-start; /* Alineados al inicio */
        overflow-x: auto; /* Scroll Horizontal */
        padding-bottom: 5px; /* Espacio para el dedo */
        gap: 10px;
        /* Ocultar barra de scroll fea pero permitir deslizar */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; 
    }
    .links::-webkit-scrollbar { display: none; }

    .nav-link {
        white-space: nowrap; /* Que el texto no se parta */
        font-size: 0.85rem;
        padding: 8px 12px;
        background-color: #f9f9f9; /* Fondo suave para que parezcan botones */
    }

    /* 2. Filtros del Cliente (Deslizables) */
    .filtros-container {
        justify-content: flex-start; /* Empezar desde la izq */
        flex-wrap: nowrap; /* ¡NO bajar de línea! */
        overflow-x: auto; /* Deslizar lateralmente */
        padding: 10px 5px; /* Espacio interno */
        gap: 10px;
    }
    
    .filtro-btn {
        flex-shrink: 0; /* Evita que los botones se aplasten */
        font-size: 0.85rem;
        padding: 8px 15px;
    }

    /* 3. Hero Banner (Más compacto) */
    .hero-banner {
        padding: 3rem 1rem;
        border-radius: 0 0 30px 30px;
    }
    .hero-banner h2 { font-size: 2rem; }

    /* 4. Formularios del CEO (Una columna) */
    .form-grid {
        grid-template-columns: 1fr; /* Todo en una columna vertical */
        gap: 1rem;
    }
    
    .profile-layout {
        grid-template-columns: 1fr; /* Perfil uno debajo de otro */
    }

    /* 5. Tabla de Inventario (Scroll seguro) */
    .tabla-contenedor {
        overflow-x: auto; /* Permite mover la tabla si es muy ancha */
    }
    .tabla-inventario th, .tabla-inventario td {
        white-space: nowrap; /* Evita que el texto se rompa raro */
        padding: 10px;
    }

    /* 6. Botones de Acción (Apilados para más espacio) */
    .form-actions {
        flex-direction: column-reverse; /* Guardar arriba, Cancelar abajo */
        gap: 10px;
    }
    .botones-derecha {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .btn-guardar, .btn-cancelar, .btn-eliminar {
        width: 100%; /* Botones anchos fáciles de tocar con el dedo */
        justify-content: center;
    }
    
    /* Toolbar del Admin (Buscador arriba, filtro abajo) */
    .admin-toolbar {
        flex-direction: column;
    }
    .search-box, .filter-select {
        width: 100%;
        flex: none;
    }

    /* Dentro de @media (max-width: 768px) { ... } */

    /* Corrección: Login con aire a los lados */
    .login-card {
        width: 90% !important; /* Que ocupe el 90% de la pantalla, no todo */
        margin: 0 auto; /* Centrado */
        padding: 2rem 1.5rem; /* Un poco menos de relleno interno */
    }
}

/* --- CORRECCIONES FINALES UI --- */

/* 1. Separar más el botón Staff en PC para diferenciarlo */
.btn-staff {
    margin-left: 40px !important; /* Mucho más espacio a la izquierda */
    border-color: var(--rosa-pastel) !important; /* Que se note el borde sutil */
}

/* 2. Arreglos para Celular (Login y Espacios) */
@media (max-width: 768px) {
    
    /* Login que respira a los lados */
    .login-card {
        width: 90% !important;
        max-width: 400px;
        margin: 0 auto;
    }

    .login-container {
        padding: 20px; /* Margen de seguridad para el contenedor */
    }

    /* En celular, el botón staff no necesita tanto margen lateral, sino arriba/abajo */
    .btn-staff {
        margin-left: 0 !important;
        margin-top: 10px;
        background-color: #fff0f5; /* Un fondo suave para destacarlo en móvil */
        width: fit-content;
    }
}

/* --- CORRECCIÓN BARRA DE NAVEGACIÓN --- */

.links {
    display: flex;
    align-items: center; /* Centrado vertical perfecto */
    gap: 0; /* Quitamos gap general para controlar por grupos */
}

/* Grupo Inicio/Contacto */
.menu-grupo {
    display: flex;
    align-items: center;
    gap: 10px; /* Espacio entre Inicio y Contacto */
}

/* El Separador Vertical */
.separador-vertical {
    width: 1px;
    height: 24px;
    background-color: #e0dbf5; /* Color lila suave */
    margin: 0 25px; /* Espacio amplio a los lados */
}

/* Botón Staff */
.btn-staff {
    margin-left: 0 !important; /* Reseteamos márgenes raros */
    display: flex;
    align-items: center;
    height: 40px; /* Misma altura que los otros botones */
    padding: 0 20px;
    background-color: white;
    border: 1px solid var(--morado-pastel);
    border-radius: 50px;
    color: #776a79;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-staff:hover {
    background-color: #f3e5f5;
    color: #5a4a5c;
    border-color: #d1c4e9;
}

/* Asegurar que los nav-link tengan la misma altura */
.nav-link {
    height: 40px; 
    display: flex; 
    align-items: center;
    padding: 0 18px;
    border-radius: 50px;
}

/* --- AJUSTE PARA MÓVIL (Importante) --- */
@media (max-width: 768px) {
    .links {
        gap: 10px; /* Volvemos al gap simple en móvil */
        width: 100%;
        overflow-x: auto;
    }
    .separador-vertical {
        display: none; /* Ocultamos el separador en celular */
    }
    .menu-grupo, .menu-staff {
        display: flex;
        gap: 10px;
    }
}

/* --- CORRECCIÓN ALINEACIÓN LOGIN --- */
.login-card {
    text-align: center !important; /* Fuerza el centrado del texto y el logo */
}

.login-card h2, .login-card p {
    text-align: center; /* Asegura que los títulos también se centren */
}