@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Estilos globais padrão para as páginas do quiz e formulários de login/etc. que NÃO têm o cabeçalho fixo do portal */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f8f8; /* Um cinza muito claro, quase branco */
    margin: 0;
    line-height: 1.6;
    color: #333; /* Texto principal preto */
    display: flex; /* Centraliza o conteúdo */
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding-top: 50px; /* Espaço para a barra de progresso do quiz */
}

/* --- Barra de Progresso do Questionário --- */
.container-progresso {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #e0f2f7;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 0 15px;
    box-sizing: border-box;
}

.barra-progresso {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #28a745;
    width: 0%;
    transition: width 0.5s ease-in-out;
    z-index: 999;
}

.texto-progresso {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 600;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
    z-index: 1001;
}

.seta-voltar {
    position: relative;
    color: #555;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1002;
    transition: color 0.2s ease;
    padding: 0 10px;
    display: flex;
    align-items: center;
    height: 100%;
}

.seta-voltar:hover {
    color: #333;
}


/* --- Container centralizado padrão para as páginas do quiz e formulários --- */
.container { 
    background-color: #ffffff;
    padding: 45px 35px; 
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 650px; 
    width: 90%;
    box-sizing: border-box;
    margin-top: 20px; /* Margem padrão para o container */
    margin-bottom: 20px;
}

/* --- Estilos comuns para títulos e textos dentro dos containers do quiz --- */
h1 {
    color: #28a745;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 2.2em;
}

h2 {
    color: #218838;
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 500;
    font-size: 1.5em;
}

h3 { 
    color: #28a745;
    font-weight: 600;
    font-size: 1.3em;
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 1px dashed #d4edda;
    padding-bottom: 8px;
}

p {
    margin-bottom: 20px;
    font-size: 1.05em;
    color: #555;
}

.texto-pequeno {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.mensagem-erro {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.mensagem-sucesso {
    color: #28a745;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

/* --- Botões Gerais (fluxo do questionário) --- */
.botao-iniciar,
button:not(.botao-copiar) { 
    background-color: #28a745;
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.2);
}

.botao-iniciar:hover,
button[type="submit"]:hover {
    background-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.3);
}

/* --- Estilos para Opções de Seleção (Radio, Checkbox) --- */
.container-opcoes {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 30px auto;
}

.container-opcoes label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8fcfc;
    padding: 18px 25px;
    margin-bottom: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid #e0f2f7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.container-opcoes label:hover {
    background-color: #e6f7fa;
    border-color: #b3e0ed;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.container-opcoes input[type="radio"],
.container-opcoes input[type="checkbox"] {
    margin-left: 15px;
    transform: scale(1.4);
    accent-color: #28a745;
}

.container-opcoes input[type="radio"]:checked + span,
.container-opcoes input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #28a745;
}

/* --- Estilos para Gênero (Passo 01) --- */
.selecao-genero {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.selecao-genero label {
    flex-direction: column;
    padding: 25px 35px;
    background-color: #f8fcfc;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.selecao-genero label:hover {
    background-color: #e6f7fa;
    border-color: #b3e0ed;
}

.selecao-genero input[type="radio"] {
    display: none;
}

.selecao-genero input[type="radio"]:checked + img {
    border: 4px solid #007bff;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.4);
}

.selecao-genero img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    transition: all 0.25s ease;
}

.selecao-genero span {
    font-size: 1.15em;
    font-weight: 500;
    color: #444;
}

/* --- Estilos para Zonas Alvo (Passo 03) --- */
.container-zonas-alvo {
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
}

.imagem-zonas-corpo {
    max-width: 280px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* --- Estilos para Campos de Entrada de Texto/Número/Email e SELECT --- */
.container-campo-entrada input[type="text"],
.container-campo-entrada input[type="number"],
.container-campo-entrada input[type="email"],
.container-campo-entrada select,
.formulario-login input[type="text"], /* Para formulário de login no estilo quiz */
.formulario-login input[type="password"], /* Para formulário de login no estilo quiz */
.formulario-login input[type="email"] /* Para formulário de login no estilo quiz */ {
    width: calc(100% - 50px);
    padding: 15px 25px;
    margin-bottom: 15px;
    border: 1px solid #cce7ed;
    border-radius: 8px;
    font-size: 1.05em;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%2C116.8L154.2%2C249.6c-4.4%2C4.4-10.8%2C4.4-15.2%2C0L5.4%2C116.8c-4.4-4.4-4.4-10.8%2C0-15.2h0c4.4-4.4%2C10.8-4.4%2C15.2%2C0l126.8%2C126.8L271.8%2C101.6c4.4-4.4%2C10.8-4.4%2C15.2%2C0h0C291.4%2C106%2C291.4%2C112.4%2C287%2C116.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    cursor: pointer;
}

.container-campo-entrada input[type="text"]:focus,
.container-campo-entrada input[type="number"]:focus,
.container-campo-entrada input[type="email"]:focus,
.container-campo-entrada select:focus,
.formulario-login input[type="text"]:focus,
.formulario-login input[type="password"]:focus,
.formulario-login input[type="email"]:focus {
    border-color: #80bdff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.container-campo-entrada {
    margin-bottom: 25px;
}

/* --- Estilos para Seleção de Produtos (Passo 19) --- */
.container-selecao-produto {
    text-align: left;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 18px;
    margin-bottom: 25px;
    border: 1px solid #e0f2f7;
    border-radius: 10px;
    background-color: #fcfdfe;
}

.container-selecao-produto::-webkit-scrollbar {
    width: 8px;
}
.container-selecao-produto::-webkit-scrollbar-track {
    background: #f1f8f9;
    border-radius: 10px;
}
.container-selecao-produto::-webkit-scrollbar-thumb {
    background: #a8dadc;
    border-radius: 10px;
}
.container-selecao-produto::-webkit-scrollbar-thumb:hover {
    background: #89b8bb;
}


.grupo-opcoes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 25px;
    margin-bottom: 25px;
    padding: 0 10px;
}

.grupo-opcoes label {
    justify-content: flex-start;
    background-color: #f8fcfc;
    padding: 18px 25px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid #e0f2f7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.grupo-opcoes label:hover {
    background-color: #e6f7fa;
    border-color: #b3e0ed;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.item-produto {
    margin-right: 12px;
    transform: scale(1.2);
}

.rotulo-selecionar-tudo {
    background-color: #e0ffe0;
    padding: 18px 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 1.1em;
    font-weight: 600;
    color: #218838;
    border: 2px solid #a8e6a8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rotulo-selecionar-tudo:hover {
    background-color: #c9f5c9;
}

/* --- Estilos para Páginas de Resultado e Pagamento --- */
.img-qrcode {
    max-width: 280px;
    height: auto;
    border: 5px solid #ffffff;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
}
.codigo-copia-cola {
    background-color: #f0f0f0;
    padding: 18px;
    border-radius: 10px;
    font-size: 1.05em;
    word-break: break-all;
    margin-bottom: 20px;
    position: relative;
    color: #444;
    font-weight: 500;
    border: 1px dashed #ddd;
}
.botao-copiar {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95em;
    margin-top: 10px;
    transition: background-color 0.2s, transform 0.2s;
    font-weight: 500;
}
.botao-copiar:hover {
    background-color: #1a1a1a;
    transform: translateY(-1px);
}
.botao-verificar-pagamento {
    background-color: #4CAF50;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.2);
}
.botao-verificar-pagamento:hover {
    background-color: #388E3C;
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
}

/* --- Responsividade Geral --- */
@media (max-width: 768px) {
    body {
        padding-top: 40px; 
    }
    .container-progresso {
        height: 40px;
        padding: 0 10px;
    }
    .texto-progresso {
        font-size: 0.9em;
    }
    .seta-voltar {
        font-size: 1.2em;
        padding: 0 8px;
    }
    .container {
        padding: 30px 20px;
        width: 95%;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    h1 {
        font-size: 1.8em;
    }
    h2 {
        font-size: 1.3em;
    }
    .container-opcoes label {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
    }
    .container-opcoes input {
        margin-right: 0;
        margin-bottom: 10px;
        align-self: flex-end;
    }
    .selecao-genero label {
        padding: 20px;
    }
    .selecao-genero img {
        width: 80px;
        height: 80px;
    }
    .container-selecao-produto {
        padding-right: 5px;
    }
    .grupo-opcoes label {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: unset;
    }
    .cabecalho-admin {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    .cabecalho-admin p, .controles-admin {
        margin-top: 10px;
        width: 100%;
        text-align: left;
    }
    .controles-admin a {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
    .tabela-admin {
        min-width: unset;
    }
    .tabela-admin th, .tabela-admin td {
        padding: 8px;
        font-size: 0.8em;
    }
}