/* Definição de Cores (Paleta Violeta Suave) */
:root {
    --violeta-principal: #9b59b6;
    /* Violeta equilibrado */
    --violeta-claro: #EDE3D3;
    /* Fundo muito suave */
    --violeta-medio: #dcd0ff;
    /* Lavanda para destaques */
    --violeta-escuro: #4a148c;
    /* Para textos importantes */
    --branco-puro: #ffffff;
    --cinza-texto: #333333;



    --beige: #F5EFE4;
    --beige-mid: #EDE3D3;
    --beige-dark: #D9C9B0;
    --gold: #C9A96E;
    --gold-light: #E8D5A3;
    --gold-dark: #A07840;
    --violet-pale: #C4B5D8;
    --violet: #8B6BAE;
    --violet-deep: #5C3D8A;
    --violet-dark: #2E1A55;
    --ink: #1A1025;
    --muted: #7A6D85;
    --white: #FFFCF7;
    --radius: 18px;
    --shadow: 0 4px 24px rgba(46, 26, 85, 0.10);
}

/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Criamos um degradê que vai do violeta claro para o branco */
    background: linear-gradient(180deg, var(--violeta-claro) 0%, var(--branco-puro) 100%);
    /* background-image: url('../img/perfis/mapa-inicial.PNG'); */
    /* Importante: garante que o fundo cubra toda a altura do ecrã */
    min-height: 100vh;
    background-attachment: fixed;
    /* O fundo fica parado enquanto faz scroll */

    font-family: 'Segoe UI', sans-serif;
    color: var(--cinza-texto);
}



/* Estilos de Tipografia */
h1,
h2,
h3 {
    color: var(--violeta-escuro);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.2rem;
}

/* Links e Botões */
a {
    color: var(--violeta-principal);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: var(--violeta-escuro);
    text-decoration: underline;
}

.btn-terapia {
    background-color: var(--violeta-principal);
    color: white;
    padding: 10px 25px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.btn-terapia:hover {
    background-color: var(--violeta-escuro);
}


/* Ajuste adicional para o container principal */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centra os cards filhos */
}

.card {
    background: whitesmoke;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(26, 58, 90, 0.1);
    margin-bottom: 25px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    text-align: center;
}

.hidden {
    display: none !important;
}

.card-header {
    border-bottom: 2px solid var(--bg-light);
    margin-bottom: 20px;
    padding-bottom: 10px;
}

h1 {
    color: var(--accent);
    font-size: 32px;
    margin: 0;
}

h2 {
    color: var(--accent);
    font-size: 20px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    background: #fdfdfd;
    font-family: inherit;
}

.btn-acao {
    width: 100%;
    background: var(--accent);
    color: white;
    padding: 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: 0.3s;
}

.btn-acao:hover {
    background: #122a42;
    transform: translateY(-2px);
}



.btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

/* Estilo Teclado PIN */
.pin-dots {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.pin-dots span {
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary);
    border-radius: 50%;
}

.pin-dots span.filled {
    background: var(--primary);
}

/* Estilo para o Cartão de Terapia */
.card-terapia {
    background-color: var(--branco-puro);
    /* Fundo branco para contrastar com o fundo do site */
    border-radius: 15px;
    /* Cantos arredondados para um ar mais acolhedor */
    padding: 25px;
    max-width: 420px;
    margin: 20px auto;

    /* Sombra suave (Box Shadow) em tom de violeta escuro, mas muito transparente */
    box-shadow: 0 10px 20px rgba(74, 20, 140, 0.1);

    border: 1px solid var(--violeta-medio);
    /* Uma borda fininha para definir o limite */
    text-align: center;
    transition: transform 0.3s ease;
    /* Efeito suave ao passar o rato */
}


.card-terapia:hover {
    transform: translateY(-5px);
    /* O cartão "levanta" ligeiramente no hover */
    box-shadow: 0 15px 30px rgba(74, 20, 140, 0.15);
}

.card-titulo {
    color: var(--violeta-principal);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

/* Estilo para o cabeçalho fora do painel */
.header-portal-externo {
    position: fixed !important;
    width: 100%;
    background: var(--violeta-luxo);
    border-bottom: 1px solid var(--dourado);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    left: 0;
    z-index: 99999;
}


/* Empurra o conteúdo para baixo do header */
body {
    padding-top: 140px;
    /* ou ajustar para o tamanho do teu header */
}


.logo-principal {
    width: 110px;
    height: 110px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 8px var(--dourado));
}

.subtitulo-portal {
    font-size: 0.9rem;
    color: var(--dourado-claro);
    margin-top: 5px;
    letter-spacing: 4px;
    opacity: 0.8;
    text-transform: uppercase;
}

.badge-ametista {
    background: linear-gradient(135deg, #9b59b6 0%, #4a148c 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
}



/* Estilo do link "Oferecer" */
.link-oferta-discreto {
    color: #ffd700;
    /* Dourado para destacar no roxo */
    font-size: 0.85rem;
    text-decoration: none;
    font-style: italic;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 10px;
}

.link-oferta-discreto:hover {
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    transform: scale(1.02);
}

/* Garante que o formulário apareça suavemente */
#form-oferta.hidden {
    display: none;
}

#form-oferta:not(.hidden) {
    display: block;
}

.chave-roxa {
    display: inline-block;
    filter: hue-rotate(240deg) brightness(0.8) saturate(1.5);
    /* hue-rotate(240deg) empurra o amarelo para o espectro do roxo/violeta */
}

.action-icon-wrapper {
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    color: white;
    font-family: 'Montserrat', sans-serif;
    transition: 0.3s;
}



.action-icon-wrapper:hover {
    transform: scale(1.1);
}

/* Garante que o título não fique muito grande em telemóveis */
@media (max-width: 400px) {
    .card-titulo {
        font-size: 1.2rem !important;
    }
}

.badge-notificacao {
    display: none;
    /* Começa escondido */
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    /* Uma cor vermelha bonita */
    color: white;
    border-radius: 50%;
    padding: 3px 6px;
    /* Ajusta o padding para o número ficar centralizado */
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 10;
    min-width: 18px;
    /* Garante que o círculo não se deforma com números de 2 dígitos */
    height: 18px;
    align-items: center;
    justify-content: center;
}

/* Um brilho suave para o ícone de perfil */
.action-icon-wrapper div {
    box-shadow: 0 0 10px rgba(255, 188, 0, 0.2);
}

/* Modal Estilizado */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.modal.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: linear-gradient(135deg, #1a0033 0%, #2d0055 100%);
    border: 1px solid var(--dourado);
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Corpo do modal com scroll */
.modal-body {
    overflow-y: auto;
    padding-right: 5px;
}

/* Personaliza a barra de scroll */
.modal-body::-webkit-scrollbar {
    width: 5px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--dourado);
    border-radius: 10px;
}


.btn-lido {
    background: transparent;
    border: 1px solid var(--dourado);
    color: var(--dourado-claro);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-lido:hover {
    background: var(--dourado);
    color: #1a0033;
}

/* Estilos do Modal */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.modal.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: linear-gradient(135deg, #9a4fe0 0%, #2d0055 100%);
    border: 1px solid var(--dourado);
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.438);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.modal-body {
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar do modal */
.modal-body::-webkit-scrollbar {
    width: 5px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--dourado);
    border-radius: 10px;
}

/* Botão WhatsApp */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

/* Cada bloco de mensagem na lista */
.mensagem-item {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 15px;
    border: 1px solid #f5f0fa;
    transition: all 0.3s ease;
    text-align: left;
}

.mensagem-item:hover {
    border-color: #d1c4e9;
    background: #5e35b1;
    transform: scale(1.01);
}

/* Título/Tipo do presente na mensagem */
.mensagem-titulo {
    color: #5e35b1;
    font-weight: 700;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 5px;
}

/* O texto da mensagem em si */
.mensagem-texto {
    color: #616161;
    font-size: 0.85rem;
    line-height: 1.6;
    font-style: italic;
    margin: 0;
}

/* A data miudinha */
.mensagem-data {
    font-size: 0.7rem;
    color: #b39ddb;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* FIX: fundo para o header fixo */
.header-portal-externo {
    background: #f0eafd !important;
    /* roxo escuro translúcido */
    backdrop-filter: blur(6px);
    /* efeito vidro elegante */
}

/* Modais SEMPRE acima do header fixo */
.modal,
.modal-overlay,
.perfil-overlay,
#wrapper-perfil-novo,
#modal-perfil,
#modalBoasVindas {
    position: fixed !important;
    /* garante camada própria */
    z-index: 100000 !important;
    /* acima do header */
    top: 0;
    left: 0;
    /* sanidade: cobre a janela */
}


.realce-compras {
    animation: pulseDourado 2s ease-in-out 1;
    border-radius: 16px;
}

@keyframes pulseDourado {
    0% {
        box-shadow: 0 0 0 rgba(212, 175, 55, 0);
    }

    30% {
        box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.35);
    }

    60% {
        box-shadow: 0 0 0 12px rgba(212, 175, 55, 0.15);
    }

    100% {
        box-shadow: 0 0 0 rgba(212, 175, 55, 0);
    }
}

.no-scroll {
    overflow: hidden !important;
    height: 100vh;
}

/* Garantir que podemos ancorar um elemento no canto da faixa de topo */
.header-portal-externo .top-brand {
    position: relative;
    /* cria contexto para o botão */
}

/* FAB minúsculo junto ao título, acima do menu */
.estrela-header-btn {
    position: absolute;
    right: 12px;
    /* encosta à direita da faixa de topo */
    top: 50%;
    transform: translateY(-50%);
    /* alinha verticalmente ao centro da faixa */

    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;

    background: linear-gradient(135deg, #4b0082, #6a0dad);
    color: #fff;
    font-size: 18px;
    /* ✨ legível mas discreto */
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 8px 20px rgba(75, 0, 130, 0.35);
    transition: transform .2s ease, box-shadow .2s ease;
    z-index: 5;
    /* acima de elementos internos da faixa */
}

.estrela-header-btn:hover {
    transform: translateY(-50%) scale(1.05);
}

.estrela-header-btn:active {
    transform: translateY(-50%) scale(0.98);
}

/* Em ecrãs pequenos, um pouco menor para não tapar o título */
@media (max-width: 480px) {
    .estrela-header-btn {
        right: 8px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

.histo-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    color: #4b0082;
    font-weight: 600;
    padding: 8px 0;
}

.histo-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(75, 0, 130, 0.25);
    border-top-color: #4b0082;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Contentor do histórico com altura fixa e scroll */
#historico-tiragens {
    max-height: 420px;
    /* escolhe a altura que melhor ficar no teu layout */
    overflow: auto;
    scrollbar-width: thin;
}

#historico-tiragens::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#historico-tiragens::-webkit-scrollbar-thumb {
    background: rgba(76, 0, 130, 0.103);
    border-radius: 6px;
}

#historico-tiragens::-webkit-scrollbar-track {
    background: rgba(75, 0, 130, .08);
}

.histo-colapsavel {
    max-height: 120px;
    /* altura “fechada” */
    overflow: hidden;
    position: relative;
}

.histo-colapsavel.is-open {
    max-height: none;
    /* abre completamente */
}

.histo-fade {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .9));
    display: block;
}

.histo-colapsavel.is-open .histo-fade {
    display: none;
}

.histo-toggle {
    color: #4b0082;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    user-select: none;
}

/* --- FAQ FAB: bolinha no canto inferior do CARTÃO --- */
.faq-card {
    position: relative;
    /* cria contexto p/ posicionar a bolinha */
}

.faq-fab {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: linear-gradient(135deg, #4b0082, #6a0dad);
    color: #fff;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(75, 0, 130, .35);
    transition: transform .2s ease, box-shadow .2s ease, background .3s ease;
    z-index: 2;
    /* acima do conteúdo do cartão */
}

.faq-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(75, 0, 130, .45);
}

.faq-fab:active {
    transform: translateY(0);
}

/* --- Área do FAQ como colapsável com animação --- */
#faqSection {
    max-height: 0;
    /* fechado por padrão */
    overflow: hidden;
    transition: max-height .35s ease, opacity .25s ease;
    opacity: 0;
}

/* Estado aberto */
#faqSection.is-open {
    opacity: 1;
    /* Dica: ajusta conforme o tamanho típico das tuas FAQs */
    max-height: 520px;
    /* altura “alvo” quando aberto */
}

/* Scroll interno quando aberto, para textos longos */
#faqSection.is-open {
    overflow: auto;
    padding-right: 6px;
    /* espaço para a barra */
    scrollbar-width: thin;
    /* Firefox */
}

#faqSection.is-open::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#faqSection.is-open::-webkit-scrollbar-thumb {
    background: rgba(75, 0, 130, .35);
    border-radius: 4px;
}

#faqSection.is-open::-webkit-scrollbar-track {
    background: rgba(75, 0, 130, .08);
}

/* Mobile: bolinha ligeiramente menor e mais encostada */
@media (max-width: 480px) {
    .faq-fab {
        right: 10px;
        bottom: 10px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}









/* Forçar tamanho do logotipo independentemente de estilos globais */
.top-brand .brand-center img.logo-principal {
    width: 34px !important;
    /* ajusta aqui o tamanho desejado */
    height: auto !important;
    /* mantém proporção */
    max-width: none !important;
    max-height: none !important;
    flex-shrink: 0 !important;
    display: inline-block;
    object-fit: contain;
}

/* Garantir alinhamento lado a lado e centrado no ecrã */
.top-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px 12px;
}

/* Linha do logo + textos */
.brand-center {
    display: inline-flex;
    /* impede 100% a quebra */
    flex-direction: row;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    /* impede título de descer */
    gap: 10px;
}

/* Logo */
.logo-principal {
    width: 34px !important;
    height: 34px !important;
    object-fit: contain;
    /* garante que não distorce */
}


/* Textos */
.texto-header {
    display: inline-flex;
    /* linha garantida */
    flex-direction: column;
    text-align: left;
}

.card-titulo,
.subtitulo-portal {
    white-space: nowrap;
    /* impede quebrar */
    margin: 0;
}

/* ===== MASCOTE FLOTUANTE ===== */
/* --- CONFIGURAÇÃO DA MASCOTE FLUTUANTE --- */
.mascote-container {
    position: fixed;
    /* Fixa na tela, ignorando o scroll */
    bottom: 20px;
    /* Distância do fundo */
    right: 20px;
    /* Distância da direita */
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10000;
    /* Valor alto para ficar à frente de tudo */
    pointer-events: none;
    /* Evita que o bloco invisível tape cliques na página */
}

.mascote-container .balao-fala {
    background: #ffffff;
    border: 2px solid var(--violeta-medio);
    border-radius: 15px;
    padding: 8px 12px;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    color: var(--violeta-escuro);
    position: relative;
    pointer-events: auto;
    /* Permite clicar no balão */
    animation: flutuar 3s ease-in-out infinite;
    text-align: center;
    min-width: 100px;
}

/* Triângulo do balão */
.mascote-container .balao-fala::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: #ffffff transparent transparent;
}

.mascote-container .menina-estrela {
    width: 120px;
    /* Tamanho para Desktop */
    height: auto;
    cursor: pointer;
    pointer-events: auto;
    /* Permite clicar na imagem */
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
    animation: flutuar 3s ease-in-out infinite;
}

/* --- AJUSTE PARA MOBILE --- */
@media (max-width: 480px) {
    .mascote-container {
        bottom: 15px;
        right: 15px;
    }

    .mascote-container .menina-estrela {
        width: 120px;
        /* Menor no telemóvel para não tapar o conteúdo */
    }

    .mascote-container .balao-fala {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

.mascote-container {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
    pointer-events: none;
    /* O container em si não bloqueia a página */
}

.menina-estrela,
.modal-mascote,
.balao-fala {
    pointer-events: auto !important;
    /* Mas estes elementos podem ser clicados */
    cursor: pointer;
}

@keyframes flutuar {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
        /* Sobe 15 pixéis */
    }

    100% {
        transform: translateY(0px);
    }
}

/* Modal mais pequeno e mobile-friendly */
.modal-mascote {
    max-width: 320px;
    width: 90%;
    max-height: 50vh;
    overflow-y: auto;
    border-radius: 16px;
}

.modal-mascote .modal-body {
    max-height: calc(50vh - 120px);
    overflow-y: auto;
}

.btn-acao-assistente {
    width: 100%;
    background: linear-gradient(135deg, #D4AF37, rgba(212, 175, 55, 0.35));
    color: var(--violeta-escuro);
    font-weight: 700;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
    transition: all 0.25s ease;
}

.btn-acao-assistente-faq {
    width: 100%;
    background: var(--violeta-escuro);
    color: whitesmoke;
    font-weight: 700;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
    transition: all 0.25s ease;
}

.btn-acao-assistente:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.45);
}

.header-actions {
    /* Garante o rebordo dourado inferior em todas as páginas */
    border-bottom: 1px solid #D4AF37 !important;

    /* Adiciona um leve brilho para realçar o aspeto "portal" */
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.1);

    /* Mantém a estrutura que já tens */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 20px;
    background: rgba(46, 26, 85, 0.12) !important;
    margin-top: -15px;
}

/* Estilo para o Badge com Animação */
.badge-animado {
    background-color: #ff4444;
    /* Vermelho vivo */
    color: white;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    display: block;
    position: absolute;
    top: -2px;
    right: -2px;
    box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    animation: pulsar 1.5s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulsar {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}





/* =========================================
   CSS PARA MODAL DE VIDRO FOSCO (GLASSMORPHISM)
========================================= */

/* Fundo do Modal (a sobreposição que escurece a página) */
.custom-modal {
    display: none;
    /* Escondido por padrão */
    position: fixed;
    z-index: 10000;
    /* Garante que fica por cima de tudo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;

    /* Um fundo escuro bem suave para dar contraste */
    background-color: rgba(0, 0, 0, 0.15);

    /* A MAGIA DO VIDRO FOSCO: Desfoca o que está atrás da sobreposição */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* Suporte para Safari */

    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Transição suave na aparição */
}

/* Quando o modal estiver visível, esta classe será adicionada via JS */
.custom-modal.show {
    opacity: 1;
}

/* A Caixa do Modal (o "cartão de vidro") */
.custom-modal-content {
    /* Fundo branco semi-transparente */
    background: rgba(255, 255, 255, 0.3);

    /* Uma borda fina e clara para definir o contorno do vidro */
    border: 1px solid rgba(255, 255, 255, 0.4);

    padding: 40px 30px;
    border-radius: 24px;
    /* Bordas bem arredondadas e modernas */
    text-align: center;

    /* Sombra suave para dar profundidade e destaque */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);

    max-width: 380px;
    width: 90%;

    /* Animação suave: o modal "cresce" um pouco ao aparecer */
    transform: scale(0.9);
    transition: transform 0.3s ease-out;
}

/* Animação de entrada do conteúdo */
.custom-modal.show .custom-modal-content {
    transform: scale(1);
}

/* Estilo do Título (opcional, se usar `<h2>`) */
.custom-modal-content h2 {
    color: #fff;
    /* Título branco para contraste */
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Sombra suave no texto */
}

/* Estilo do Texto Principal (o parágrafo) */
.custom-modal-content p {
    color: rgba(255, 255, 255, 0.95);
    /* Texto quase branco */
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 400;
}

/* Destaque para o número de dias */
.custom-modal-content strong {
    color: #fff;
    font-weight: 700;
}

/* O Botão "Continuar a Brilhar" com estilo de vidro */
.custom-modal-content button {
    /* Fundo semi-transparente ligeiramente mais opaco */
    background: rgba(255, 255, 255, 0.2);

    /* Borda sutil */
    border: 1px solid rgba(255, 255, 255, 0.3);

    /* Texto em cor suave, como o original (rose gold/cobre) */
    color: #b58d7c;

    padding: 14px 30px;
    font-size: 1rem;
    border-radius: 16px;
    /* Borda arredondada mas mais retangular que o original */
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    /* Botão ocupa toda a largura */

    /* Transições suaves para hover e active */
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;

    /* Sombra suave no botão */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Efeito de Hover (passar o rato) no Botão */
.custom-modal-content button:hover {
    background: rgba(255, 255, 255, 0.3);
    /* Fica ligeiramente mais visível */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Efeito de Click (Active) no Botão */
.custom-modal-content button:active {
    transform: scale(0.98);
    /* Botão "afunda" ligeiramente */
    background: rgba(255, 255, 255, 0.15);
}

/* Estilo do ícone/emoji opcional ✨ */
.custom-modal-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: block;
}


@keyframes slideDrawer {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 2. Atualiza a classe do balão de dias para não empurrar a bolinha */
.mini-lock-badge-menu {
    position: absolute;

    background: #7a4a91;
    color: #dfbeff;
    font-size: 12px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 8px;

    /* EVITA QUE O TEXTO INTERFERE NO TAMANHO DA BOLINHA: */
    z-index: 3;
}

/* ===== NAV LABELS ===== */
.nav-label {
    font-size: 0.52rem;
    color: #2E1A55;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.3px;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}

/* ===== NAV ACTIVE STATE ===== */
.nav-painel-btn {
    transition: transform 0.2s, width 0.3s, border-radius 0.3s, box-shadow 0.3s !important;
}

.nav-painel-btn.nav-ativo {
    width: 38px !important;
    height: 38px !important;
    border-radius: 11px !important;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.75), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    border-color: #fff !important;
}

/* Label do botão ativo fica dourada */
.nav-painel-btn.nav-ativo+.nav-label,
.nav-painel-btn.nav-ativo~.nav-label {
    color: #2E1A55;
}

/* Trick: target label sibling via parent wrapper */
div:has(.nav-painel-btn.nav-ativo) .nav-label {
    color: #2E1A55;
    font-weight: 700;
}

/* ===== PAINEL NOTIFICAÇÕES ===== */
#painel-notificacoes {
    animation: slideDownNotif 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownNotif {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}



















/* PAGE HEADER */
.page-header {
    background: linear-gradient(135deg, var(--violet-dark) 0%, var(--violet-deep) 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-header-inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-header-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 400;
    color: white;
}

.page-header-title span {
    font-size: 12px;
    font-weight: 300;
    color: var(--gold-light);
    display: block;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.page-header-modulos {
    /* 1. Posicionamento inteligente */
    position: sticky;
    display: flex;
    align-items: center;

    /* 2. O truque para ignorar o elemento pai: Basear na largura do ECRÃ (Viewport Width) */
    width: 100vw !important;
    max-width: 100vw !important;

    /* 3. Força o alinhamento à esquerda absoluta do ecrã */
    left: 0;
    right: 0;

    /* 4. Altura e espaçamentos internos */
    height: 60px;
    padding: 0 20px;
    box-sizing: border-box;

    /* 5. Estilo visual idêntico ao teu padrão */
    background: linear-gradient(135deg, var(--violet-dark) 0%, var(--violet-deep) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    z-index: 99;
}

/* Garante que o conteúdo interno se espalha bem */
.page-header-modulos .page-header-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}