/* ==========================================================================
   1. CONFIGURAÇÕES GERAIS E VARIÁVEIS
   ========================================================================== */
:root {
    --primary: #004d73;
    --primary-dark: #003652;
    --accent: #16a34a;
    --accent-hover: #117a36;
    --text-main: #2d3748;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: #ffffff;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

p {
    font-size: 1.15rem;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

h1 { font-size: 2.3rem; color: var(--primary); }
h2 { font-size: 2rem; color: var(--primary); }
td { vertical-align: top; }

/* ==========================================================================
   2. ELEMENTOS DE AUTENTICAÇÃO E USUÁRIO
   ========================================================================== */
#user-display {
    color: #64748b; /* Mesma cor do botão início */
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0 4px;
}
/* Se estiver vazio, não ocupa espaço */
#user-display:empty {
    display: none;
}

.auth-right-container {
    position: absolute; 
    right: 10px; 
    top: 10px; 
    z-index: 100; 
    display: flex;             
    align-items: center;       
    justify-content: flex-end; 
    gap: 10px;                 
    width: auto;               
}

.btn-auth-google {
    display: inline-flex;      
    align-items: center;       
    justify-content: center;  
    gap: 8px;                  
    background: #ffffff;
    color: #334155;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.btn-auth-google:hover {
    background-color: #f8fafc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-auth-google svg {
    display: block; 
}

#btn-logout, #btn-homepage {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

#btn-logout {
    border: 1px solid #fca5a5;
    color: #ef4444;
    padding: 8px 16px;
}

#btn-logout:hover {
    background: #fef2f2;
}

#btn-minhas-analises {
    background: #f0f7fa;
    border: none;
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

/* ==========================================================================
   3. BOTÕES GERAIS E SEÇÕES DO SITE
   ========================================================================== */
.btn {
    display: inline-block;
    background-color: var(--accent);
    color: #ffffff;
    text-decoration: none;
    padding: 16px 36px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
    transition: all 0.2s ease;
    text-align: center;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.hero {
    padding: 50px 0;
    background: linear-gradient(135deg, #f0f7fa 0%, #ffffff 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-grid { grid-template-columns: 1.2fr 1fr; }
}

.hero-content h1 span { color: #0298e0; }
.hero-image-wrapper { text-align: center; }
.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.problema {
    padding: 80px 0;
    text-align: center;
    background-color: var(--bg-light);
}

.problema p {
    max-width: 750px;
    margin: 0 auto 15px auto;
    font-size: 1.1rem;
    color: #4a5568;
}

/* Preview do Relatório */
.preview-section { padding: 80px 0; }
.preview-header { text-align: center; margin-bottom: 40px; }
.preview-header p { max-width: 600px; margin: 0 auto; }

.report-mockup {
    position: relative;
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.05);
    overflow: hidden;
    max-height: 500px;
    max-width: 800px;
    margin: 0 auto;
}

.report-title .name { color: #0298e0; font-size: 1.6rem; font-weight: bold; }
.report-title .code { color: var(--text-muted); font-size: 1.2rem; margin-left: 6px; }
.report-category {
    color: var(--primary);
    font-size: 1.25rem;
    margin: 25px 0 12px 0;
    border-bottom: solid 1px #e0e6ed;
    padding-bottom: 6px;
    font-weight: 600;
}

.report-text { color: #4a5568; font-size: 0.95rem; margin-bottom: 15px; }

.fade-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 240px;
    background: linear-gradient(rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 55%, rgba(255,255,255,1) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 25px;
}

.lock-icon {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 50%;
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.oferta {
    padding: 80px 0;
    background-color: var(--primary);
    color: #ffffff;
    text-align: center;
}

.preco-box { font-size: 3rem; font-weight: bold; margin-bottom: 10px; color: #fff; }
.preco-box span { font-size: 1.2rem; font-weight: normal; opacity: 0.8; }
.oferta .btn { background-color: #ffffff; color: var(--primary); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.oferta .btn:hover { background-color: #f1f5f9; }

/* ==========================================================================
   4. SELETORES E ÁREA DE ANÁLISE
   ========================================================================= */
#select-analises {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--text-main);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    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%23555%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

#select-analises:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(0,77,115,0.08);
}

#drop-zone {
    border: 2px dashed #cbd5e1;
    padding: 35px 20px;
    border-radius: 10px;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.3s ease;
}

#drop-zone.highlight {
    border-color: var(--primary) !important;
    background-color: #f0f7fa !important;
    border-style: solid;
}

/* ==========================================================================
   5. MODAIS E OVERLAYS (PAGAMENTO E CONFIRMAÇÃO)
   ========================================================================== */
.modal-pagamento, .modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); /* Backdrop mais moderno e suave */
    backdrop-filter: blur(4px); /* Suaviza o fundo */
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal-pagamento-content, #container-confirmacao {
    background: white;
    padding: 35px 25px;
    border-radius: 16px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-pagamento-content h3 { color: var(--primary); margin-bottom: 8px; font-size: 1.4rem; }
.modal-pagamento-content p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; }

.btn-gerar-pix, .btn-confirma {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.2s;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

.btn-gerar-pix:hover, .btn-confirma:hover { background: var(--accent-hover); }
.btn-gerar-pix:disabled { background: #cbd5e1; cursor: not-allowed; box-shadow: none; }

.btn-fechar-pagamento, #fechaModalAnalise {
    position: absolute;
    top: 15px; right: 15px;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}
.btn-fechar-pagamento:hover { color: #ef4444; }

#fechaModalAnalise {
    position: static;
    font-size: 0.95rem;
    margin-top: 20px;
    color: var(--text-muted);
    text-decoration: underline;
}

.area-qr-code {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.area-qr-code img { max-width: 180px; margin: 15px 0; }

.btn-copia-cola {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    padding: 12px;
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    transition: background 0.2s;
}
.btn-copia-cola:hover { background: #e2e8f0; }

#campo-pix-copia-cola {
    width: 100%;
    height: 60px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.85rem;
    resize: none;
    margin-bottom: 10px;
}

/* Spinner de loading animado */
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}