/* ============================================================
   Congás / NGC — identidade do Painel ZAP (só neste cliente)
   Paleta oficial: vermelho #D4000F · azul #044AA6 (site congascongonhas.com.br)
   - Base: tinta azul (escala "slate" remapeada no tailwind.config via brand.json)
   - Ação (botões, foco, item ativo): azul NGC
   - Vermelho NGC: só marca (placa/lacre) e urgência — nunca botão comum
   - Verde continua só como significado: online, conectado, sucesso, não lidas
   - A logo NUNCA recebe filtro de cor: vai sobre placa branca
   ============================================================ */

/* Fundo SÓ do login e do criar-senha (as únicas páginas com .bg-overlay; o painel não pega): foto da central (logo e atendente à direita) com véu azul-marinho por cima.
   "html body" vence o estilo do login.php, que vem depois e zera o background-image. */
html body.brand-on:has(> .bg-overlay) {
    background: #070F1F url(login-bg.webp) 68% center / cover no-repeat fixed;
}
html body.brand-on .bg-overlay {
    background:
        linear-gradient(90deg, rgba(7, 15, 31, .82) 0%, rgba(7, 15, 31, .55) 45%, rgba(7, 15, 31, .30) 100%),
        linear-gradient(0deg, rgba(7, 15, 31, .45), rgba(7, 15, 31, .10));
}
@media (max-width: 640px) {
    html body.brand-on:has(> .bg-overlay) { background-attachment: scroll; }
    html body.brand-on .bg-overlay { background: rgba(7, 15, 31, .62); }
}

.brand-on {
    --ngc-red: #D4000F;
    --ngc-blue: #044AA6;
    --act: #0B55C0;          /* azul de ação sobre fundo escuro */
    --act-hover: #1463D6;
    --act-soft: rgba(11, 85, 192, .16);
    --act-line: rgba(66, 124, 218, .45);
    --act-text: #8DB4F2;
    --ink-1: #070F1F;
    --ink-2: #0E1A30;
    --ink-3: #1A2944;
}

/* ── Tipografia: Sora nos títulos (mesma do site), Inter no corpo ── */
.brand-on h1, .brand-on h2, .brand-on .font-display {
    font-family: 'Sora', 'Inter', sans-serif;
    letter-spacing: -.012em;
}
.brand-on h1 { font-weight: 700; }
.brand-on h2 { font-weight: 600; }

/* ── Placa-lacre: logo original sobre branco + faixa da chama (vermelho → azul) ── */
.brand-plate {
    display: block;
    margin: 14px 12px 0;
    padding: 14px 16px 17px;
    background: #fff;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}
.brand-plate img { display: block; width: 100%; height: auto; max-height: 58px; object-fit: contain; }
.brand-plate::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
    background: linear-gradient(90deg, #D4000F 0%, #D4000F 42%, #044AA6 58%, #044AA6 100%);
}
.brand-plate:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -8px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08); }
.brand-plate:focus-visible { outline: 2px solid var(--act-text); outline-offset: 3px; }
.brand-caption {
    font-family: 'Sora', 'Inter', sans-serif;
    font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
    color: #7A8DAE;
    padding: 10px 16px 12px;
    text-align: center;
    border-bottom: 1px solid var(--ink-3);
}

/* ── Menu lateral: item ativo com o "lacre" vermelho ── */
.brand-on .sidebar-item.active {
    background: linear-gradient(90deg, rgba(4, 74, 166, .30), rgba(4, 74, 166, .10));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--ngc-red);
}
.brand-on .sidebar-item.active svg { color: var(--act-text); }
.brand-on .sidebar-item:focus-visible { outline: 2px solid var(--act-text); outline-offset: -2px; }

/* ── Botões de ação: verde → azul NGC ── */
.brand-on .bg-green-600,
.brand-on .bg-green-700 { background-color: var(--act); }
.brand-on .hover\:bg-green-500:hover,
.brand-on .hover\:bg-green-600:hover { background-color: var(--act-hover); }
.brand-on .file\:bg-green-600::file-selector-button { background-color: var(--act); }
.brand-on .shadow-green-900\/25 { --tw-shadow-color: rgba(4, 74, 166, .35); --tw-shadow: var(--tw-shadow-colored); }

/* ── Foco dos campos ── */
.brand-on .focus\:ring-green-500:focus,
.brand-on .focus\:ring-green-500\/25:focus,
.brand-on .focus\:ring-green-500\/30:focus { --tw-ring-color: rgba(66, 124, 218, .55); }
.brand-on .focus\:border-green-500:focus,
.brand-on .focus\:border-green-500\/40:focus { border-color: #427CDA; }
.brand-on .accent-green-500 { accent-color: var(--act); }
.brand-on :where(a, button, input, select, textarea):focus-visible { outline-color: var(--act-text); }

/* ── Scrollbar ── */
.brand-on ::-webkit-scrollbar-thumb { background: #2B3B59; }
.brand-on ::-webkit-scrollbar-thumb:hover { background: #405274; }

/* ══ Atendimento ══ */
.brand-on .conv-card.active { background: rgba(4, 74, 166, .18); border-left-color: #427CDA; }
.brand-on .f-btn.active { background: rgba(66, 124, 218, .14); border-color: rgba(66, 124, 218, .38); }

/* Balões: loja (humano) = azul NGC sólido · IA = contornado · cliente = tinta */
.brand-on .msg-customer { background: #16253F; color: #E3E9F3; }
.brand-on .msg-ai {
    background: #0D1A31;
    color: #DCE7FA;
    box-shadow: inset 0 0 0 1px rgba(127, 170, 240, .38), 0 1px 2px rgba(0, 0, 0, .25);
}
.brand-on .msg-human { background: linear-gradient(135deg, #0B55C0 0%, #044AA6 100%); color: #fff; }
.brand-on .msg-human .text-green-200,
.brand-on .msg-human .text-green-50 { color: #D5E4F8; }
.brand-on .msg-ai .text-blue-200 { color: #8DB4F2; }

.brand-on .store-picker.open .store-picker-btn { border-color: var(--act-line); background: var(--act-soft); }
.brand-on .store-opt.active { background: rgba(4, 74, 166, .22); }
.brand-on .store-opt.active .store-opt-name { color: #A6C4EF; }

/* ══ Equipe / Respostas rápidas ══ */
.brand-on .tm-chip.on { background: var(--act-soft); border-color: var(--act-line); }
.brand-on .qr-bubble { background: linear-gradient(135deg, #0B55C0 0%, #044AA6 100%); color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .brand-plate, .brand-plate:hover { transition: none; transform: none; }
}
