/* app/static/css/styles.css */

/* --- Cores do tema --- */
:root {
    --azul-padrao: #222d32;
    --azul-selecao: #0056b3; /* CORREÇÃO: Azul escurecido para Acessibilidade (Contraste 100) */
    --amarelo-padrão: #ffd230;
    --branco-padrão: #ece8e7;
    --azul-link: #007185;
    --verde-padrão: #2E7D32; /* CORREÇÃO: Verde escurecido para Acessibilidade (Contraste) */
    --vermelho-padrão: #B12704;
    --hover-botao: #f0c14b;
    --preco-vermelho: #B12704;
    --cinza-claro: #eaeaea;
    --cinza-botão: linear-gradient(0deg, rgba(246,246,246,1) 20%, rgba(255,255,255,1) 70%);
    --ouro: linear-gradient(0deg, rgba(240,193,75,1) 20%, rgba(244,216,145,1) 100%);
}

/* Remove margin e padding padrão */
body, html {
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    background-color: #f0f0f0;
}

/* Compensa cabeçalho fixado */
main {
    padding-top: 60px !important;
}

/* Reset e estilos gerais */
/* CORREÇÃO: Removido font-family do * para não quebrar ícones FontAwesome */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
}

li {
    list-style-type: none;
}

span, a, p, h1, h2, h3, h4, h5, label {
    text-decoration: none;
    color: #222d32;
}

/* --- Estilos de cabeçalho --- */
h1 {
    font-size: 22px;
    width: 100%;
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 18px;
}

a {
    font-size: 14px;
    border: none;
    text-decoration: none;
}

img {
    border: none;
    max-width: 100%;
    height: auto; /* Trava de proporção global para evitar distorções no PageSpeed */
}

/* Header principal público */
body > header.site-header-principal,
body > header.site-header-fluxo-editorial {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    justify-items: center;
    z-index: 1000;
}

/* --- Estilos de botões --- */
button,
#btnSelecionarImagem,
.btn,
.btn-adicionar,
.btn-excluir,
.btn-editar,
.btn-selecionar,
.btn-upload,
.btn-salvar,
.btn-voltar,
.btn-proximo,
.btn-login,
.btn-logout,
.btn-admin,
.btn-painel,
.btn-add-painel-conteudo,
.btn-conferir-agora,
.btn-finalizar-leitura,
.btn-remove-item,
.btn-abrir-painel-conteudo,
.btn-acompanhar-registro {
    display: inline-flex;
    text-decoration: none;
    background-color: transparent;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    white-space: nowrap;
    border: none;
}

button:hover,
.btn:hover,
.btn-adicionar:hover,
.btn-excluir:hover,
.btn-editar:hover,
.btn-selecionar:hover,
.btn-upload:hover,
.btn-salvar:hover,
.btn-voltar:hover,
.btn-proximo:hover,
.btn-login:hover,
.btn-logout:hover,
.btn-admin:hover,
.btn-painel:hover,
.btn-add-painel-conteudo:hover,
.btn-conferir-agora:hover,
.btn-finalizar-leitura:hover,
.btn-remove-item:hover,
.btn-abrir-painel-conteudo:hover,
.btn-acompanhar-registro:hover {
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0.90;
}

/* Botão Adicionar */
.btn-adicionar {
    background-color: var(--verde-padrão);
    color: white;
    border: 1px solid var(--verde-padrão);
}

.btn-adicionar:hover {
    background-color: darkgreen;
}

/* Botão Conferir Agora */
.btn-conferir-agora {
    background-color: var(--azul-selecao);
    color: white;
}

/* Botão Adicionar ao Painel de conteúdo */
.btn-add-painel-conteudo {
    background-color: #4189E626;
    color: var(--azul-selecao);
}

/* Botão Editar */
.btn-editar {
    background-color: var(--azul-padrao);
    color: white;
}

.btn-editar:hover {
    background-color: darkblue;
}

/* Botão Excluir */
.btn-excluir {
    background-color: var(--vermelho-padrão);
    color: white;
    border: 1px solid var(--vermelho-padrão);
}

.btn-excluir:hover {
    background-color: darkred;
}

/* Botão Selecionar */
.btn-selecionar, #btnSelecionarImagem {
    background-color: var(--verde-padrão);
    color: white;
    border: 1px solid var(--verde-padrão);
}

.btn-selecionar:hover {
    transform: scale(1.02);
}

/* Botão Upload */
.btn-upload {
    background-color: var(--azul-link);
    color: white;
    border: 1px solid var(--azul-link);
}

.btn-upload:hover {
    background-color: #005f6b;
}

/* Botão Salvar */
.btn-salvar {
    background-color: var(--verde-padrão);
    color: white;
    border: 1px solid var(--verde-padrão);
}

/* Botão Voltar e Próximo */
.btn-voltar, .btn-proximo {
    background-color: var(--azul-link);
    color: white;
    border: 1px solid var(--azul-link);
}

/* Botão Login */
.btn-login {
    background: var(--ouro);
}

.btn-login:hover {
    color: var(--branco-padrão);
}

/* Botão Logout (Genérico) */
.btn-logout {
    background-color: white;
    color: #FF6F61;
    border: 1px solid #FF6F61;
    padding: 10px 15px;
}

.btn-logout:hover {
    background-color: #e65c50;
    color: white;
}

/* Botão Admin */
.btn-admin {
    background-color: #4A90E2;
    color: white;
    border: 1px solid #4A90E2;
}

.btn-admin:hover {
    background-color: #3a7ab8;
}

/* Botão Painel */
.btn-painel {
    background-color: var(--azul-padrao);
    color: white;
    border: 1px solid var(--azul-padrao);
}

.btn-painel:hover {
    background-color: darkblue;
}

/* Botão remover dropdown painel-conteudo */
.btn-remove-item {
    color: var(--vermelho-padrão);
    background-color: white;
    font-size: 14px;
}

/* Botão Abrir Painel de conteúdo */
.btn-abrir-painel-conteudo, .btn-finalizar-leitura {
    background-color: var(--verde-padrão);
    color: white;
}

/* Acompanhar registro recebido */
.btn-acompanhar-registro {
    background: var(--ouro);
    color: white;
}

/* --- NOVOS BOTÕES PARA O ADMIN (Migrados do dashboard) --- */
.btn-notificacao {
    background-color: #333;
    color: white;
}

.btn-notificacao:hover {
    background-color: #1a1a1a;
}

.btn-cupom {
    background-color: #28a745;
    color: white;
}

.btn-cupom:hover {
    background-color: #218838;
}

.btn-banner {
    background-color: #17a2b8;
    color: white;
}

.btn-banner:hover {
    background-color: #138496;
}

.btn-testar {
    background-color: #17a2b8;
    color: white;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}
.btn-testar:hover {
    background-color: #138496;
}

.btn-disparar {
    background-color: var(--verde-padrão);
    color: white;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}
.btn-disparar:hover {
    background-color: darkgreen;
}

.btn-cancelar {
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
}
.btn-cancelar:hover {
    background-color: #5a6268;
}

/* Ajuste de ícones em botões globais */
.btn i {
    margin-right: 10px;
}

/* Estilo para os centavos */
.centavos {
    font-size: 0.70em;
    vertical-align: super;
}

.old-centavos {
    font-size: 0.70em;
    vertical-align: super;
    text-decoration: line-through;
    color: #555;
}

/* --- Mensagens flash --- */
.flash-messages {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.flash-messages li {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9em;
    text-align: center;
}

.flash-messages li.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-messages li.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-messages li.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Etiqueta preta para tipos de notificação */
.badge-tipo {
    background: #333;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* --- REFATORAÇÃO DE AVATARES (GLOBAL) --- */
.perfil-avatar,
.perfil-avatar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

/* --- PADRONIZAÇÃO GLOBAL: BOTÃO SAIR (Sidebar) --- */
/* Estilo unificado para Admin e Cliente */
.btn-logout-padrao {
    display: flex;
    align-items: center; /* Garante alinhamento vertical */
    justify-content: flex-start; /* Alinha ícone e texto à esquerda */
    padding: 12px 15px;

    /* Visual do Botão */
    background-color: white;
    color: #dc3545 !important;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);

    /* Texto */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    line-height: 1; /* Ajuda no alinhamento vertical */

    /* Layout */
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
    margin-top: 15px;
}

.btn-logout-padrao:hover {
    background-color: #fff5f5;
    color: #c82333 !important;
    border-color: #f5c2c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-logout-padrao i,
.btn-logout-padrao .icon-menu {
    width: 20px;
    text-align: center;
    margin-right: 12px;
    font-size: 1.1em;
    color: inherit;
    display: inline-block; /* Garante comportamento do ícone */
}
/* Padronização final de botões públicos - Vida Elite */
:root {
    --vida-action-blue: #0056b3;
    --vida-action-blue-hover: #004a9c;
    --vida-action-blue-soft: #e7f1ff;
    --vida-action-green: #15803d;
    --vida-action-green-hover: #116c34;
}

.btn-conferir-agora,
.btn-abrir-painel-conteudo,
.btn-login,
.auth-submit,
.btn-primary {
    background: var(--vida-action-blue) !important;
    color: #ffffff !important;
    border-color: var(--vida-action-blue) !important;
}

.btn-conferir-agora:hover,
.btn-abrir-painel-conteudo:hover,
.btn-login:hover,
.auth-submit:hover,
.btn-primary:hover {
    background: var(--vida-action-blue-hover) !important;
    color: #ffffff !important;
    opacity: 1;
}

.btn-add-painel-conteudo {
    background: var(--vida-action-blue-soft) !important;
    color: var(--vida-action-blue) !important;
    border-color: transparent !important;
}

.btn-add-painel-conteudo:hover {
    background: #d8eaff !important;
    color: var(--vida-action-blue) !important;
    opacity: 1;
}

.btn-finalizar-leitura,
.btn-salvar,
.btn-adicionar,
.btn-selecionar {
    background: var(--vida-action-green) !important;
    color: #ffffff !important;
    border-color: var(--vida-action-green) !important;
}

.btn-finalizar-leitura:hover,
.btn-salvar:hover,
.btn-adicionar:hover,
.btn-selecionar:hover {
    background: var(--vida-action-green-hover) !important;
    color: #ffffff !important;
    opacity: 1;
}

/* Vida Elite - faixa editorial leve da home */
.home-editorial-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;width:min(1180px,calc(100% - 32px));margin:18px auto 22px}
.home-editorial-strip article{min-height:96px;padding:18px;border:1px solid #e3e7eb;border-radius:18px;background:#fff;box-shadow:0 10px 24px rgba(16,24,40,.045);display:flex;align-items:flex-start;gap:14px}
.home-editorial-icon{width:42px;height:42px;min-width:42px;border-radius:14px;display:inline-flex!important;align-items:center;justify-content:center;background:#eef6ff;color:#0056b3;box-shadow:inset 0 0 0 1px rgba(0,86,179,.08)}
.home-editorial-icon svg{width:21px;height:21px;display:block}
.home-editorial-icon--achado{background:#fff7e6;color:#a86b00}
.home-editorial-icon--seguro{background:#ecfdf3;color:#087443}
.home-editorial-strip strong{display:block;margin:0 0 6px;color:#16202a;font-size:1rem;font-weight:850}
.home-editorial-strip article>div>span{display:block;color:#53616d;font-size:.94rem;line-height:1.45}
@media(max-width:768px){.home-editorial-strip{grid-template-columns:1fr;width:min(100% - 20px,1180px);gap:10px;margin-top:12px}.home-editorial-strip article{min-height:auto;padding:15px;border-radius:14px}.home-editorial-icon{width:38px;height:38px;min-width:38px}}

/* Vida Elite v5 - cards de confiança da home */
.home-editorial-strip article{
    align-items:center;
    min-height:84px;
    padding:16px 18px;
    border-color:#dfe8ef;
}
.home-editorial-strip strong{margin-bottom:3px;font-size:.98rem;}
.home-editorial-strip article>div>span{font-size:.88rem;line-height:1.35;}
.home-editorial-icon{box-shadow:0 8px 18px rgba(16,24,40,.08), inset 0 0 0 1px rgba(0,86,179,.08);}


/* Vida Elite v13 - faixa de confiança da loja */
.home-editorial-strip article {
    min-height: 76px;
    padding: 13px 16px;
    gap: 12px;
}
.home-editorial-strip strong {
    margin-bottom: 2px;
    font-size: .96rem;
    line-height: 1.2;
}
.home-editorial-strip article > div > span {
    font-size: .82rem;
    line-height: 1.25;
}
.home-editorial-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 12px;
}
.home-editorial-icon svg {
    width: 20px;
    height: 20px;
}
.home-editorial-icon--protegida {
    background: #eef6ff;
    color: #0056b3;
}
.home-editorial-icon--envio {
    background: #fff7e6;
    color: #9a6500;
}
.home-editorial-icon--seguro {
    background: #ecfdf3;
    color: #087443;
}
@media (max-width: 768px) {
    .home-editorial-strip article {
        min-height: 68px;
        padding: 11px 13px;
        gap: 10px;
    }
    .home-editorial-strip strong { font-size: .92rem; }
    .home-editorial-strip article > div > span { font-size: .78rem; }
    .home-editorial-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 10px;
    }
    .home-editorial-icon svg { width: 18px; height: 18px; }
}
