:root {
    --primary-color: #0f2b5c;
    --gradient-end: #163e7e;
    --accent-color: #ffcc00;
    --accent-text: #0f2b5c;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: #1e293b;
}

/* 🔒 ESTILIZAÇÃO DA TELA DE LOGIN */
#auth-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #091326;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.auth-logo {
    max-height: 90px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 25px;
}

.auth-card h2 {
    color: #0f2b5c;
    font-size: 22px;
    margin-bottom: 12px;
}

.auth-card p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
}

#auth-msg-erro {
    margin-top: 20px;
    font-weight: bold;
    font-size: 14px;
    display: none;
    padding: 10px;
    border-radius: 8px;
}

/* 🖼️ INTERFACE INTERNA DO PORTAL */
.top-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--gradient-end));
    color: white;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
}

#abas-menu {
    background: white;
    padding: 15px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    /* Melhora o deslize do menu no touch do celular */
    -webkit-overflow-scrolling: touch; 
}

/* Oculta a barra de rolagem horizontal padrão do menu para ficar mais limpo */
#abas-menu::-webkit-scrollbar {
    display: none;
}

.nav-btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background: #f1f5f9;
    color: #475569;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-btn.active, .nav-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.main-container {
    max-width: 1400px;
    margin: 25px auto;
    padding: 0 20px;
}

.encarte-header {
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-end));
    color: white;
    padding: 35px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

#titulo-dinamico {
    font-size: 26px;
    font-weight: 800;
}

#logo-parceiro {
    max-height: 65px;
    background: white;
    padding: 6px;
    border-radius: 8px;
    object-fit: contain;
}

/* 📸 BANNER DE FUNDO (VERSÃO DESKTOP) */
#zona-inicial-equipe {
    position: relative;
    background-image: url('https://scontent.fcpv1-1.fna.fbcdn.net/v/t39.30808-6/486600477_3983257845321119_9063207529816274225_n.jpg?stp=dst-jpg_tt6&cstp=mx851x315&ctp=s851x315&_nc_cat=111&ccb=1-7&_nc_sid=cc71e4&_nc_ohc=aoPgmFYTNmAQ7kNvwHFQltr&_nc_oc=Adoo4JvtS7dwUixMLpVw32ki-FKpmL4v0Q4q-q-x32z5ojcYUzlWtPSOB0ErOZILDRk&_nc_zt=23&_nc_ht=scontent.fcpv1-1.fna&_nc_gid=cKjfuxwa-Obx-Qxufh_uKA&_nc_ss=7a289&oh=00_AQASCc6GFbEDKUCvMixP5vaI0Q2YTg1axy8b0Ytpsnsbwg&oe=6A4F1E0E');
    background-size: cover;
    background-position: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

#zona-inicial-equipe::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 43, 92, 0.05);
}

#conteudo-banner {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
    padding: 20px;
}

/* 🔍 BUSCA */
.busca-wrapper {
    position: relative;
    margin: -25px auto 25px auto;
    max-width: 800px;
    z-index: 10;
}

#campo-busca {
    width: 100%;
    padding: 16px 20px 16px 50px;
    font-size: 16px;
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    outline: none;
}

.busca-icone {
    position: absolute;
    left: 20px; top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

/* 📊 TABELAS DE PREÇO */
.grid-tabelas {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.col-tabela {
    flex: 1;
    min-width: 320px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

th {
    background-color: var(--primary-color);
    color: white;
    padding: 14px 18px;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-align: left;
}

td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

tr:last-child td { border: none; }
tr:hover { background-color: #f8fafc; }

.prod-name {
    font-weight: 600;
    color: #334155;
}

.price-val { text-align: right; }

.price-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.price-badge {
    background-color: #22c55e;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
}

/* Alertas e Extras */
.alerta-box {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    color: #b45309;
    font-weight: 600;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.badge-validade {
    background-color: var(--accent-color);
    color: var(--accent-text);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
}

/* PopUp de Condições */
.modal-overlay {
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    background: rgba(15, 23, 42, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center; justify-content: center;
}

.modal-card {
    background: white; padding: 30px;
    border-radius: 16px; max-width: 500px; width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    text-align: center;
}

.modal-card h3 { color: #b45309; margin-bottom: 15px; }
.modal-card p { color: #475569; margin-bottom: 25px; line-height: 1.6; font-weight: 600; }
.modal-card button {
    background: var(--primary-color); color: white;
    border: none; padding: 12px 25px; font-weight: bold;
    border-radius: 8px; cursor: pointer;
}

.portal-footer {
    text-align: center; padding: 30px;
    color: #94a3b8; font-size: 12px; font-weight: bold;
}

/* 📱 RESPONSIVIDADE BLINDADA (MELHORIAS MOBILE COMPLETAS) */
@media (max-width: 768px) {
    .main-container {
        padding: 0 10px;
        margin: 15px auto;
    }

    .encarte-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        border-radius: 12px 12px 0 0;
        gap: 12px;
    }

    #titulo-dinamico {
        font-size: 20px;
    }

    #logo-parceiro {
        max-height: 50px;
        margin-top: 5px;
    }

    /* O pulo do gato: reduz a altura proporcionalmente para não cortar o banner */
    #zona-inicial-equipe {
        min-height: 150px; 
        height: 25vw; /* Escala conforme a largura da tela do celular */
        border-radius: 0 0 12px 12px;
        margin-bottom: 15px;
    }

    /* Ajuste milimétrico da barra de pesquisa flutuante */
    .busca-wrapper {
        margin: -20px auto 15px auto;
        max-width: 95%;
    }

    #campo-busca {
        padding: 12px 15px 12px 40px;
        font-size: 14px;
    }

    .busca-icone {
        left: 15px;
        font-size: 15px;
    }

    .grid-tabelas {
        flex-direction: column;
        gap: 15px;
    }

    .col-tabela {
        min-width: 100%;
    }

    /* Redução de compressão interna das tabelas para caber tudo sem amassar */
    th {
        padding: 10px 12px;
        font-size: 12px;
    }

    td {
        padding: 10px 12px;
        font-size: 12px;
    }

    .prod-name {
        font-size: 12px;
        line-height: 1.4;
    }

    .price-badge {
        padding: 3px 8px;
        font-size: 12px;
    }

    #abas-menu {
        padding: 10px;
        gap: 8px;
    }

    .nav-btn {
        padding: 8px 15px;
        font-size: 13px;
    }

    .auth-card {
        padding: 30px 20px;
    }
}