/* =======================================================
   CONFIGURACIÓN GLOBAL 
   ======================================================= */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Forzamos que el contenedor de la App no intente poner todo en una fila */
.container {
    display: block !important; 
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: 0;
    margin-left: 0;
}

/* =======================================================
    LOGIN
   ======================================================= */
.body-login {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('../img/bg-catering.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    height: 100vh; 
    width: 100vw;
    overflow: hidden;
}

.login-card {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(15px); 
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 2rem 1.5rem;
    width: 90%;
    max-width: 380px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.brand-title {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

/* Cajas de texto en Blanco Translúcido para máxima visibilidad */
.body-login .form-control {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: #1a1a1a !important;
    border-radius: 12px !important;
    height: 55px !important;
}

/* Color de las etiquetas (Email / Contraseña) en reposo */
.body-login .form-floating > label {
    color: #555555 !important;
}

/* Comportamiento táctil activo al escribir */
.body-login .form-control:focus {
    background-color: #ffffff !important;
    border-color: #2e7d32 !important;
    box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.25) !important;
    color: #000000 !important;
}

/* La etiqueta flotante pasa a color verde corporativo al activarse */
.body-login .form-floating > .form-control:focus ~ label,
.body-login .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #2e7d32 !important;
}

/* Alerta de Error de Acceso Premium */
.alert-login-error {
    background-color: rgba(220, 53, 69, 0.8) !important;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    color: #ffffff !important;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Forzamos que el icono herede el blanco puro y destaque */
.alert-login-error .bi-exclamation-triangle-fill {
    color: #ffffff !important;
}


/* =======================================================
   PLATOS
   ======================================================= */

.body-dashboard {
    display: block; 
    background-color: #f4f7f6; 
    min-height: 100vh;
    height: auto;
}

.card-dashboard {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.seccion-titulo {
    display: block;
    width: 100%;
    color: #2e7d32;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 1.5rem 0 0.8rem 0;
}

/* =======================================================
    CALENDARIO 
   ======================================================= */
.bg-white.p-3.rounded-4.shadow-sm {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.input-fecha-grande {
    border: none;
    background: #f1f8f1;
    color: #1a1a1a;
    font-weight: 800;
    font-size: 1.1rem; /* Compactado */
    padding: 4px 10px; /* Reducido */
    border-radius: 10px;
    text-align: center;
    outline: none;
    width: 142px;
    height: auto;
}

.text-center.flex-grow-1 label {
    margin-bottom: 2px !important;
}

.text-center.flex-grow-1 .text-success {
    margin-top: 2px !important;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* =======================================================
    BURBUJAS DE FILTRO DE MENÚS 
   ======================================================= */

.mb-4 {
    margin-top: 1.2rem !important;
    margin-bottom: 1rem !important;
    display: block;
    width: 100%;
}

/* Contenedor del scroll lateral táctil */
.d-flex.overflow-auto {
    display: flex !important;
    flex-wrap: nowrap !important;       /*  Prohíbe que la 3ª burbuja salte abajo */
    overflow-x: auto !important;        /* Activa el deslizamiento con el dedo horizontal */
    overflow-y: visible !important;     /* Evita que se recorten los bordes circulares */
    padding-top: 8px !important;        /* Espacio superior de respiro */
    padding-bottom: 12px !important;    /* Espacio inferior de respiro */
    gap: 10px !important;               /* Separación entre pompas */
    -webkit-overflow-scrolling: touch;  /* Suaviza el arrastre en pantallas de móviles */
}

/* Evita que los botones se deformen o se encojan */
.btn-menu-filtro {
    flex: 0 0 auto !important;          /*  Impide que los botones se aplasten */
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
    font-weight: 600;
    border-width: 1px;
    border-radius: 50px !important;     /* Forma de píldora idéntica a tu imagen */
    white-space: nowrap !important;     /* Evita que el texto interno salte de línea */
}

/* Oculta la barra física de scroll horizontal para estética de App limpia */
.d-flex.overflow-auto::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}



/* =======================================================
    SECCIÓN DE INGESTAS Y PLATOS (APP SELECT)
   ======================================================= */
.card-ingesta {
    border: 1px solid #eef2ee;
    transition: transform 0.2s ease;
}

.selector-plato-app {
    border: none !important;
    background-color: #f4f6f4 !important;
    color: #0d2310;
    padding: 12px 15px !important;
    border-radius: 12px !important;
    font-size: 0.95rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}

.selector-plato-app:focus {
    background-color: #e8f5e9 !important;
    box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.15) !important;
}

/* =======================================================
    DISEÑO DE TARJETAS TÁCTILES ORIGINALES
   ======================================================= */
.plato-card {
    display: block;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    padding: 0 10px; 
}

.plato-card input {
    display: none;
}

.plato-content {
    background: #ffffff;
    border: 2px solid #ffffff; 
    border-radius: 18px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.plato-nombre {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.plato-tag {
    display: block;
    font-size: 0.75rem;
    color: #95a5a6;
}

.plato-check {
    color: #2e7d32;
    font-size: 1.4rem;
    display: none;
}

.plato-card input:checked + .plato-content {
    border-color: #2e7d32;
    background-color: #f1fcf1;
    transform: translateY(-1px);
}

.plato-card input:checked + .plato-content .plato-check {
    display: block;
}

.plato-card:active .plato-content {
    transform: scale(0.97);
}

/* =======================================================
   ELEMENTOS DE CONTROL Y INTERACCIÓN
   ======================================================= */
.btn-catering {
    background-color: #2e7d32 !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 1rem !important;
    width: 100%;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    margin-top: 10px;
}

.btn-outline-success:active {
    background-color: #f1fcf1 !important;
    transform: scale(0.9);
}

.espacio {
   width: 28px; 
}
.separador {
   letter-spacing: 1px;
}
.anchoMax-principal {
    max-width: 600px;
}
.dia-semana{
    letter-spacing: 1px; font-size: 0.75rem;
}
.redondeado-alerta{
    border-radius: 12px;
}
.redondeado-tarjeta {
    border-radius: 16px;
}
.txt-burbuja {
    font-size: 0.75rem;
}
.txt-confirm{
    background-color: #2e7d32; border: none; font-size: 0.9.rem;
}
.dv-ingesta{
    width: 32px; height: 32px;
}
.slt-txt {
    font-size: 0.9rem;
}
.z-idx {
    z-index: 1020;
}
.hist-txt{
    font-size: 0.8rem;
}
.item-perfil {
    width: 60px; height: 60px; 
}
.btn-guardar {
    background-color: #2e7d32; border: none;
}

/* =======================================================
   SOPORTE Y OPTIMIZACIONES DE RECUPERACIÓN (WEBVIEW)
   ======================================================= */

/* Inhabilitar la selección de texto e interfaz en la app */
.webview-app-lock {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Enlace secundario recuperar */
.link-recuperar-secundario {
    display: inline-block;
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

/* Efecto al pasar el cursor o pulsar en la pantalla táctil */
.link-recuperar-secundario:hover, 
.link-recuperar-secundario:active, 
.link-recuperar-secundario:focus {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* Alerta de notificación de éxito translúcida verde corporativa */
.alert-login-success {
    background-color: rgba(46, 125, 50, 0.85) !important;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    color: #ffffff !important;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Forzar que el icono de éxito herede el blanco puro */
.alert-login-success .bi-info-circle-fill,
.alert-login-success .bi-check-circle-fill {
    color: #ffffff !important;
}



/* ==========================================================================
   ESTILOS EXCLUSIVOS PARA LA PÁGINA DE PRIVACIDAD / TEXTOS LEGALES
   ========================================================================== */

.body-privacidad {
    display: block !important;
    /* CORRECCIÓN DE RUTA: Subimos un nivel para salir de assets/css/ e ir a assets/img/ */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('assets/img/bg-catering.jpg') repeat-y center top #2b2b2b !important;
    background-size: 100% auto !important;
    background-attachment: scroll !important;
    min-height: 100vh !important;
    height: auto !important;
    width: 100vw;
    margin: 0 !important;
    padding: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

.tabs-container {
    border-bottom: 2px solid #dee2e6 !important;
    margin-bottom: 25px !important;
    padding: 0 !important;
    display: table !important;
    width: 100% !important;
    height: 46px !important;
    box-sizing: border-box !important;
    table-layout: fixed !important;
}

.tab-button-custom {
    display: table-cell !important;
    width: 50% !important;
    box-sizing: border-box !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-bottom: none !important;
    padding: 12px 5px !important;
    font-weight: bold !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    color: #6c757d !important;
    text-decoration: none !important;
    text-align: center !important;
    cursor: pointer !important;
    vertical-align: middle !important;
    height: 44px !important;
}

.tab-button-custom.active-legal {
    background: #ffffff !important;
    color: #212529 !important;
    border: 2px solid #dee2e6 !important;
    border-bottom: 3px solid #ffffff !important;
    position: relative !important;
    z-index: 2 !important;
}

.btn-catering-custom {
    background-color: #cca43b !important;
    color: #ffffff !important;
    border: none !important;
    display: grid !important;
    width: 100% !important;
    text-align: center !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    padding: 12px !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    margin-bottom: 20px !important;
}

.legal-pane-custom {
    display: none;
}
.legal-pane-custom.pane-visible {
    display: block !important;
}









/*  COMPORTAMIENTO PARA móviles y PCs */
@media (max-width: 576px) {
    .menu-movil-ajustado {
        width: 75% !important;
    }
}
    

@media (min-width: 577px) {
    .menu-movil-ajustado {
        width: 300px !important;
    }
}