html { scroll-behavior: smooth; }
body { background-color: #131313; color: #ffffff; overflow-x: hidden;}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #131313; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #ff8800; }

.text-gradient-brand {
    background: linear-gradient(to right, #ffbb00, #ff8800);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.text-gradient-silver {
    background: linear-gradient(to bottom, #ffffff, #b5b5b5);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Nav & Glass */
.nav-scrolled { background: rgba(19, 19, 19, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.05); }
/* Quando a Navbar estiver sobre um fundo de imagem CLARO e no topo da página */
#navbar.nav-theme-light:not(.nav-scrolled) #desktop-nav {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

/* Cor dos itens não-ativos sobre fundo claro */
#navbar.nav-theme-light:not(.nav-scrolled) .nav-item:not(.active-nav) {
    color: #333333 !important;
}

/* Cor da ilha (pílula ativa) e do texto dentro dela sobre fundo claro */
#navbar.nav-theme-light:not(.nav-scrolled) #nav-island {
    background: #131313;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}
#navbar.nav-theme-light:not(.nav-scrolled) .nav-item.active-nav {
    color: #ffffff !important;
}

/* Botão Área do Cliente no topo sobre fundo claro */
#navbar.nav-theme-light:not(.nav-scrolled) a[href*="portal"] {
    color: #131313;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Botão Menu Mobile no topo sobre fundo claro */
#navbar.nav-theme-light:not(.nav-scrolled) button {
    color: #131313 !important;
}

/* Utilitário para esconder scrollbar no mobile */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Animação para troca de abas no mobile */
@keyframes fadeInTab { 
    from { opacity: 0; transform: translateY(10px) scale(0.98); } 
    to { opacity: 1; transform: translateY(0) scale(1); } 
}
.tab-animate { animation: fadeInTab 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* Modals & Overlays */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
    z-index: 3000; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.3s ease; padding: 1rem;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-box {
    background: #111; border: 1px solid rgba(255, 187, 0, 0.3); border-radius: 24px;
    width: 100%; max-width: 650px; max-height: 90vh; overflow-y: auto; padding: 2.5rem;
    transform: scale(0.95); transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75); position: relative;
}
.modal-overlay.active .modal-box { transform: scale(1); }

/* Drawer */
.drawer {
    position: fixed; top: 0; right: -100%; width: 100%; max-width: 480px; height: 100vh;
    background: rgba(19, 19, 19, 0.95); backdrop-filter: blur(20px); border-left: 1px solid rgba(255,255,255,0.1);
    z-index: 3001; display: flex; flex-direction: column; transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.8);
}
.drawer.active { right: 0; }

/* AI Chat Area Styles */
.ai-response-area {
    background: rgba(255, 187, 0, 0.05); border-left: 4px solid #ffbb00;
    padding: 1.5rem; border-radius: 0 12px 12px 0; font-family: 'Inter', sans-serif;
    font-size: 0.95rem; line-height: 1.6; max-height: 40vh; overflow-y: auto; display: none;
}
.ai-response-area b { color: #ffbb00; font-family: 'Poppins', sans-serif; }
.ai-response-area ul { margin-top: 0.75rem; margin-bottom: 0.75rem; padding-left: 1.5rem; }
.ai-response-area li { margin-bottom: 0.25rem; }

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Sobrescrita do Widget Pipe.run - Alinhamento
   ========================================================================== */

/* 1. O Botão (Bolinha Amarela) */
#pipe-chat-button-container {
    position: fixed !important;
    bottom: 4rem !important; 
    right: 0rem !important; 
    z-index: 40 !important;
}

/* 2. O Balão de Boas-Vindas */
#pipe-chat-agent-balloon-box {
    position: fixed !important;
    z-index: 40 !important;
    bottom: 4.5rem !important; 
    right: 9rem !important; 
}