/* ============================================================
   PORTAL BI GRUPOGC + CAMPANHA — ESTILOS COMPARTILHADOS
   ============================================================ */
:root {
    --azul-noite: #001a33;
    --azul-escuro: #002244;
    --azul: #003366;
    --azul-hover: #004b87;
    --azul-link: #0056b3;
    --ouro-claro: #fff8e6;
    --cinza-borda: #d1d5db;
}

/* ============================================================
   PÁGINAS DE ENTRADA (escolha, seleção de corretora, login)
   ============================================================ */
body.pagina-login {
    font-family: 'Inter', Tahoma, sans-serif;
    background: radial-gradient(circle at 50% 0%, #004b87 0%, #001a33 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
    padding: 20px;
    box-sizing: border-box;
}

.split-card {
    display: flex;
    background: white;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 1050px;
    min-height: 600px;
}

.left-panel {
    flex: 1.2;
    background-color: var(--azul-escuro);
    position: relative;
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
    border-radius: 20px 0 0 20px;
}

.shape-1 {
    position: absolute; width: 500px; height: 500px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.4) 0%, transparent 70%);
    top: -150px; left: -150px; z-index: 1;
}
.shape-2 {
    position: absolute; width: 600px; height: 600px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.15) 0%, transparent 60%);
    bottom: -200px; right: -100px; z-index: 1;
}
.shape-3 {
    position: absolute; width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 75, 135, 0.6) 0%, transparent 60%);
    top: 40%; right: -50px; z-index: 1;
}

.text-content { position: relative; z-index: 2; max-width: 450px; }

.left-panel h1 {
    font-size: 42px; font-weight: 800; margin: 0 0 20px 0;
    line-height: 1.1; letter-spacing: -1px; min-height: 94px;
}

.cursor {
    display: inline-block; width: 3px; background-color: white;
    margin-left: 4px; animation: blink 0.8s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.left-panel p.subtitle-left {
    font-size: 18px; color: rgba(255, 255, 255, 0.85); line-height: 1.6;
    margin: 0; opacity: 0; transform: translateY(15px);
    transition: opacity 1s ease, transform 1s ease;
}

.right-panel {
    flex: 1; padding: 60px 50px; display: flex; flex-direction: column;
    justify-content: center; background: #ffffff;
    border-radius: 0 20px 20px 0; position: relative; overflow: visible;
}

.logo-img {
    max-width: 240px; height: auto; margin-bottom: 50px;
    display: block; margin-left: auto; margin-right: auto;
}

.right-panel p.subtitle-right {
    margin-top: 0; margin-bottom: 30px; color: #777; font-size: 14px; text-align: center;
}

/* ---------- Cartões de escolha (index.php) ---------- */
.opcoes { display: flex; flex-direction: column; gap: 14px; }

.opcao-card {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--cinza-borda);
    border-radius: 12px;
    text-decoration: none;
    color: #1a202c;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.opcao-card:hover,
.opcao-card:focus-visible {
    border-color: var(--azul-link);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.12);
    transform: translateY(-2px);
    outline: none;
}
.opcao-icone {
    flex-shrink: 0;
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: #e8f0f9; color: var(--azul);
}
.opcao-texto { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.opcao-texto strong { font-size: 16px; font-weight: 700; }
.opcao-texto span { font-size: 13.5px; color: #666; line-height: 1.4; }
.opcao-seta { color: #a0aec0; flex-shrink: 0; transition: transform 0.2s, color 0.2s; }
.opcao-card:hover .opcao-seta { transform: translateX(4px); color: var(--azul-link); }

/* Cartão da campanha: mesmo formato do BI; ícone com fundo grafite suave (transparente) */
.opcao-card.opcao-campanha .opcao-icone { background: rgba(22, 22, 22, 0.08); }
.opcao-card.opcao-campanha .opcao-icone img { width: 26px; height: 26px; object-fit: contain; display: block; }
.opcao-card.opcao-campanha .opcao-texto strong {
    font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    font-size: 21px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
}
.opcao-card.opcao-campanha:hover,
.opcao-card.opcao-campanha:focus-visible {
    border-color: #AB8760;
    box-shadow: 0 8px 22px rgba(171, 135, 96, 0.22);
}
.opcao-card.opcao-campanha:hover .opcao-seta { color: #AB8760; }

/* ---------- Formulários ---------- */
.form-group { margin-bottom: 22px; text-align: left; width: 100%; }
.form-group label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: #444; }

.input-texto {
    width: 100%;
    height: 54px;
    padding: 0 15px;
    border: 1px solid var(--cinza-borda);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #111;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.input-texto:focus {
    outline: none;
    border-color: var(--azul-link);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.campo-senha { position: relative; }
.campo-senha .input-texto { padding-right: 50px; }
.btn-ver-senha {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    border: none; background: transparent; color: #718096;
    cursor: pointer; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
}
.btn-ver-senha:hover { color: var(--azul); background: #f1f5f9; }
.btn-ver-senha:focus-visible { outline: 2px solid var(--azul-link); }

.check-lembrar {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; color: #444; cursor: pointer;
    margin: -4px 0 24px 0; user-select: none;
}
.check-lembrar input {
    width: 18px; height: 18px; margin: 0;
    accent-color: var(--azul);
    cursor: pointer;
}

.btn-primario {
    width: 100%; padding: 18px; background-color: var(--azul); color: white;
    border: none; border-radius: 8px; font-size: 16px; font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer; transition: all 0.3s ease;
    display: flex; justify-content: center; align-items: center; gap: 10px;
}
.btn-primario:hover { background-color: var(--azul-hover); transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0, 51, 102, 0.2); }
.btn-primario:active { transform: translateY(0); box-shadow: none; }
.btn-primario:focus-visible { outline: 3px solid rgba(0, 86, 179, 0.4); outline-offset: 2px; }
.btn-primario:disabled { background-color: #a9b4bf; cursor: not-allowed; transform: none; box-shadow: none; }

.links-footer { display: flex; flex-direction: column; align-items: center; gap: 15px; margin-top: 30px; }

.action-link {
    font-size: 14px; color: var(--azul-link); text-decoration: none;
    font-weight: 500; transition: color 0.3s; cursor: pointer;
    background: none; border: none; padding: 0; font-family: inherit;
}
.action-link:hover { color: var(--azul-escuro); text-decoration: underline; }
.action-link.discreto { color: #718096; }

.error {
    color: #d9534f; background: #fdf7f7; border: 1px solid #d9534f;
    padding: 12px; border-radius: 8px; margin-bottom: 25px; font-size: 14px; font-weight: 500;
}
.sucesso {
    color: #276749; background: #f0fff4; border: 1px solid #68d391;
    padding: 12px; border-radius: 8px; margin-bottom: 25px; font-size: 14px; font-weight: 500;
}

.maintenance-banner {
    display: flex; align-items: flex-start; gap: 12px;
    color: #92610a; background: var(--ouro-claro);
    border: 1px solid #f2c94c; border-radius: 10px;
    padding: 16px; margin-bottom: 25px;
    font-size: 14px; line-height: 1.5; text-align: left;
}
.maintenance-banner svg { flex-shrink: 0; margin-top: 2px; }
.maintenance-banner strong { display: block; margin-bottom: 4px; font-size: 14.5px; color: #6b4a05; }

@media (max-width: 768px) {
    .split-card { flex-direction: column; min-height: auto; }
    .left-panel { padding: 40px 30px; border-radius: 20px 20px 0 0; }
    .left-panel h1 { font-size: 32px; min-height: auto; }
    .shape-1, .shape-2, .shape-3 { display: none; }
    .right-panel { padding: 40px 30px; border-radius: 0 0 20px 20px; }
    .logo-img { margin-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .left-panel p.subtitle-left { opacity: 1; transform: none; }
}

/* ============================================================
   PÁGINAS DE PAINEL (BI e Campanha com iframe)
   ============================================================ */
html:has(body.pagina-painel), body.pagina-painel {
    margin: 0; padding: 0; height: 100%; width: 100%;
    font-family: 'Inter', sans-serif;
}

.iframe-container { width: 100%; height: 100vh; overflow: hidden; position: relative; transition: filter 0.3s ease; }
.iframe-container iframe { width: 100%; height: calc(100% + 37px); border: none; display: block; }

.painel-vazio {
    height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 30px; box-sizing: border-box;
    color: #4a5568; font-size: 15px; line-height: 1.6; background: #f7fafc;
}

.blur-effect { filter: blur(8px); pointer-events: none; }

/* ---------- Menu flutuante (?) ---------- */
.fab-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    pointer-events: none;   /* a área do menu fechado não bloqueia cliques no BI */
    z-index: 999999;
    display: none; /* exibido via JS */
    flex-direction: column-reverse;
    align-items: flex-start;
}

.fab-main-btn { pointer-events: auto; }
.fab-main-btn {
    width: 50px; height: 50px; border-radius: 50%;
    background-color: var(--azul); color: #ffffff;
    border: none; font-size: 22px; font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none; position: relative; z-index: 2;
}
.fab-main-btn:hover {
    background-color: var(--azul-hover);
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.fab-main-btn:focus-visible { outline: 3px solid #ffd966; outline-offset: 2px; }

.fab-options {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    padding-bottom: 12px;
    opacity: 0; visibility: hidden; transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none; position: relative; z-index: 1;
}

/* Abre no hover (desktop) ou no clique/toque (classe .aberto) */
.fab-main-btn:hover + .fab-options,
.fab-options:hover,
.fab-container.aberto .fab-options,
.fab-container:focus-within .fab-options {
    opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}

.btn-floating-action {
    color: white; border: none; border-radius: 50px;
    padding: 10px 18px; font-size: 13px; font-weight: 600;
    font-family: 'Inter', sans-serif; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    white-space: nowrap; transition: all 0.2s ease;
}
.btn-floating-action:hover { transform: translateX(5px); box-shadow: 0 6px 20px rgba(0,0,0,0.35); }
.btn-floating-action:active { transform: translateX(2px); }
.btn-floating-action:focus-visible { outline: 3px solid #ffd966; outline-offset: 2px; }

.btn-emoji-icon { font-size: 15px; line-height: 1; }

.btn-novidades-toggle { background-color: var(--azul); }
.btn-novidades-toggle:hover { background-color: var(--azul-hover); }

.btn-sugestoes-toggle { background-color: #2d3748; }
.btn-sugestoes-toggle:hover { background-color: #4a5568; }

/* Atalho para a campanha: leva as cores da SuperStar X */
.btn-campanha-toggle { background-color: #1C1C1C; color: #D9BF9A; border: 1px solid #AB8760; }
.btn-campanha-toggle:hover { background-color: #2A2219; }

.btn-sair-toggle { background-color: #ffffff; color: #9b2c2c; }
.btn-sair-toggle:hover { background-color: #fff5f5; }

.fab-usuario {
    background: #ffffff; color: #2d3748;
    border-radius: 50px; padding: 8px 16px;
    font-size: 12.5px; font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    white-space: nowrap; max-width: 280px;
    overflow: hidden; text-overflow: ellipsis;
}
.fab-usuario strong { font-weight: 700; }
