/* Layout flutuante da Central (27/10/2026), igual ao do ERP e válido para os três temas (claro, escuro e Glass):
   a sidebar (.atendimento-side) e a barra do topo (.titulo-topo) viram painéis soltos das bordas, com cantos
   arredondados, borda fina e sombra, e o item da tela atual vira uma "pílula". Ocupa a mesma faixa de 220px/78px
   da sidebar normal e os mesmos 70px do topo, então o conteúdo não se move.
   Só desktop (acima de 800px, o mesmo ponto da gaveta do celular em central-infinityuser.css): no celular nada muda.
   Carregado por último (Views/Shared/_MetaCentral.cshtml). As cores do Glass ficam em tema-glass.css. */

@media (min-width: 801px) {
    html body.atendimento-body .atendimento-side {
        inset: 10px auto 10px 10px;
        width: 202px;
        padding: 12px 8px;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, .10);
        box-shadow: 0 10px 34px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .06);
    }
    html body.atendimento-body.central-sidebar-collapsed .atendimento-side { width: 60px !important; padding: 12px 4px; }

    /* Barra do topo: solta das bordas, alinhada à sidebar. O invólucro sticky ganha 10px em cima e a barra 6px embaixo
       (10 + 54 + 6 = 70px, a altura de antes). O display:flow-root impede a margem de vazar para fora do invólucro. */
    html body.atendimento-body .atendimento-main > .topo-atendimento { display: flow-root; padding-top: 10px; }
    html body.atendimento-body .atendimento-main .titulo-topo {
        height: 54px;
        margin: 0 10px 6px 2px;
        padding-left: 62px;
        padding-right: 12px;
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, .10);
        box-shadow: 0 10px 34px rgba(0, 0, 0, .22);
    }

    /* Botão de recolher o menu: centralizado na barra nova (top 10 + 27 de meio - 21 de meio do botão = 16). */
    html body.atendimento-body .central-sidebar-toggle { top: 16px; left: 232px; }
    html body.atendimento-body.central-sidebar-collapsed .central-sidebar-toggle { left: 90px; }
}

@media (min-width: 801px) {
/* Itens do menu e item da tela atual: pílula clara com borda fina (no lugar do marcador verde lateral). */
html body.atendimento-body .atendimento-side a { border: 1px solid transparent; border-radius: 10px; }
html body.atendimento-body .atendimento-side a.active {
    background: rgba(255, 255, 255, .14) !important;
    border-color: rgba(255, 255, 255, .20);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
}
html body.atendimento-body .marca-suporte { border-radius: 12px; }
html body.atendimento-body .marca-suporte a { border-radius: 12px; }

/* ---------- Modo claro: sidebar e barra do topo em branco, texto escuro de alto contraste ----------
   (o Glass e o escuro usam data-bs-theme="dark" e não entram aqui). */
html[data-bs-theme="light"] body.atendimento-body .atendimento-side,
html[data-bs-theme="light"] body.atendimento-body .titulo-topo {
    background: linear-gradient(180deg, #ffffff, #f7f9fb) !important;
    color: #111827;
    border: 1px solid #e2e7ed;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .08), 0 1px 2px rgba(17, 24, 39, .06);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
html[data-bs-theme="light"] body.atendimento-body .atendimento-side a { color: #1f2937; text-shadow: none; }
html[data-bs-theme="light"] body.atendimento-body .atendimento-side a:hover { background: #eef2f6; color: #0f172a; text-shadow: none; }
html[data-bs-theme="light"] body.atendimento-body .atendimento-side a.active {
    background: #e7f6f0 !important; border-color: #a9dcc9; color: #0b5e45; box-shadow: none;
}
html[data-bs-theme="light"] body.atendimento-body .marca-suporte a:hover { box-shadow: inset 0 0 0 2px rgba(17, 24, 39, .12) !important; }

/* Botão de recolher o menu (fica sobre a barra branca). */
html[data-bs-theme="light"] .central-sidebar-toggle { color: #1f2937; background: #f3f5f8; border-color: #e2e7ed; }
html[data-bs-theme="light"] .central-sidebar-toggle:hover,
html[data-bs-theme="light"] .central-sidebar-toggle:focus-visible { background: #e8ecf1; }

/* Controles da barra: tema, sino, perfil e (no chat) o botão de recolher antigo. */
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .controle-alerta,
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .notificacoes-central,
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .botao-minimizar { color: #1f2937; text-shadow: none; box-shadow: none; }
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .controle-alerta:hover,
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .notificacoes-central:hover,
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .botao-minimizar:hover { background: #eef2f6; color: #0f172a; text-shadow: none; box-shadow: none; }
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .controle-alerta:active,
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .notificacoes-central:active { background: #e4e9ef; color: #0f172a; text-shadow: none; box-shadow: none; }
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .menu-perfil-central summary { color: #1f2937; }
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .menu-perfil-central summary:hover,
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .menu-perfil-central[open] summary { background: #eef2f6; }
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .avatar-central { border-color: #d5dbe3; box-shadow: 0 0 0 2px rgba(17, 24, 39, .06); }
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .usuario-central { background: #f3f5f8; }
html[data-bs-theme="light"] body.atendimento-body .titulo-topo .usuario-central small { color: #6b7280; }

/* Faixa sticky ao redor da barra flutuante: mesma cor do fundo da página, para o conteúdo que rola não aparecer nas folgas. */
    html[data-bs-theme="light"] body.atendimento-body .atendimento-main > .topo-atendimento { background: #fcfcfc; }
    html[data-bs-theme="dark"]:not([data-tema="glass"]) body.atendimento-body .atendimento-main > .topo-atendimento { background: var(--su-surface); }
}

/* ---------- Botões em pílula com "chip" de ícone (igual aos su-glass-button do ERP) ----------
   Mesma lista de classes do bloco "liquid glass" de central-infinityuser.css; o primeiro ícone vai para um chip de vidro. */
.atendimento-main :is(.config-cabecalho,.dashboard-cabecalho,.historico-cabecalho,.ibpt-header) :is(a,button),
.atendimento-main :is(.crm-busca button,.cliente-crm-cabecalho button,.nova-resposta button,.modulos-cliente button,.ibpt-card form button,
    .dashboard-acao,.parceiro-acao,.ibpt-upload-button,.ibpt-history-button,.ibpt-api-button,.fechar-painel,.excluir-resposta,
    .leads-btn,.leads-nav a,.acoes button,.acoes-modulo button,.link-modulo button) {
    border-radius: 999px !important;
    padding: 6px 16px 6px 7px !important;
}
.atendimento-main :is(.config-cabecalho,.dashboard-cabecalho,.historico-cabecalho,.ibpt-header) :is(a,button) > i:first-child,
.atendimento-main :is(.config-cabecalho,.dashboard-cabecalho,.historico-cabecalho,.ibpt-header) :is(a,button) > span:first-child > i:only-child,
.atendimento-main :is(.crm-busca button,.cliente-crm-cabecalho button,.nova-resposta button,.modulos-cliente button,.ibpt-card form button,
    .dashboard-acao,.parceiro-acao,.ibpt-upload-button,.ibpt-history-button,.ibpt-api-button,.fechar-painel,.excluir-resposta,
    .leads-btn,.leads-nav a,.acoes button,.acoes-modulo button,.link-modulo button) > i:first-child,
.atendimento-main :is(.crm-busca button,.cliente-crm-cabecalho button,.nova-resposta button,.modulos-cliente button,.ibpt-card form button,
    .dashboard-acao,.parceiro-acao,.ibpt-upload-button,.ibpt-history-button,.ibpt-api-button,.fechar-painel,.excluir-resposta,
    .leads-btn,.leads-nav a,.acoes button,.acoes-modulo button,.link-modulo button) > span:first-child > i:only-child {
    display: inline-grid; place-items: center; flex: 0 0 auto; width: 27px; height: 27px; margin: 0 !important; border-radius: 9px;
    background: rgba(255, 255, 255, .55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 2px rgba(30, 45, 58, .12);
    font-size: .85rem; line-height: 1;
}
/* Sem ícone no começo: volta ao respiro simétrico. */
.atendimento-main :is(.config-cabecalho,.dashboard-cabecalho,.historico-cabecalho,.ibpt-header) :is(a,button):not(:has(> i:first-child, > span:first-child > i:only-child)),
.atendimento-main :is(.crm-busca button,.cliente-crm-cabecalho button,.nova-resposta button,.modulos-cliente button,.ibpt-card form button,
    .dashboard-acao,.parceiro-acao,.ibpt-upload-button,.ibpt-history-button,.ibpt-api-button,.fechar-painel,.excluir-resposta,
    .leads-btn,.leads-nav a,.acoes button,.acoes-modulo button,.link-modulo button):not(:has(> i:first-child, > span:first-child > i:only-child)) {
    padding: 9px 18px !important;
}
/* Botões pequenos: chip menor para caber nos 34px. */
.atendimento-main .leads-btn.pequeno { padding: 4px 14px 4px 5px !important; }
.atendimento-main .leads-btn.pequeno:not(:has(> i:first-child)) { padding: 7px 14px !important; }
.atendimento-main .leads-btn.pequeno > i:first-child { width: 23px; height: 23px; border-radius: 8px; font-size: .78rem; }
[data-bs-theme="dark"] .atendimento-main :is(.config-cabecalho,.dashboard-cabecalho,.historico-cabecalho,.ibpt-header) :is(a,button) > i:first-child,
[data-bs-theme="dark"] .atendimento-main :is(.config-cabecalho,.dashboard-cabecalho,.historico-cabecalho,.ibpt-header) :is(a,button) > span:first-child > i:only-child,
[data-bs-theme="dark"] .atendimento-main :is(.crm-busca button,.cliente-crm-cabecalho button,.nova-resposta button,.modulos-cliente button,.ibpt-card form button,
    .dashboard-acao,.parceiro-acao,.ibpt-upload-button,.ibpt-history-button,.ibpt-api-button,.fechar-painel,.excluir-resposta,
    .leads-btn,.leads-nav a,.acoes button,.acoes-modulo button,.link-modulo button) > i:first-child,
[data-bs-theme="dark"] .atendimento-main :is(.crm-busca button,.cliente-crm-cabecalho button,.nova-resposta button,.modulos-cliente button,.ibpt-card form button,
    .dashboard-acao,.parceiro-acao,.ibpt-upload-button,.ibpt-history-button,.ibpt-api-button,.fechar-painel,.excluir-resposta,
    .leads-btn,.leads-nav a,.acoes button,.acoes-modulo button,.link-modulo button) > span:first-child > i:only-child {
    background: rgba(255, 255, 255, .13); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15);
}

/* ---------- Campo de arquivo em pílula (27/10/2026) ----------
   Mesma altura dos botões e o "Escolher arquivo" nativo vira um chip verde, em vez do cinza padrão do navegador. */
.atendimento-main input[type="file"],
.modal-atendimento input[type="file"] {
    min-height: 41px; padding: 4px 14px 4px 4px !important; border-radius: 999px !important; font-size: .82rem; line-height: 31px;
}
.atendimento-main input[type="file"]::file-selector-button,
.modal-atendimento input[type="file"]::file-selector-button {
    height: 31px; margin: 0 10px 0 0; padding: 0 14px; border: 1px solid #a9dcc9; border-radius: 999px;
    background: linear-gradient(145deg, #e4f7f0, #c6eadc); color: #075a43; font-weight: 700; font-size: .76rem; cursor: pointer; transition: background .2s ease;
}
.atendimento-main input[type="file"]:hover::file-selector-button,
.modal-atendimento input[type="file"]:hover::file-selector-button { background: linear-gradient(145deg, #d1f2e6, #a8dcc8); }
[data-bs-theme="dark"] .atendimento-main input[type="file"]::file-selector-button,
[data-bs-theme="dark"] .modal-atendimento input[type="file"]::file-selector-button {
    border-color: rgba(58, 196, 154, .34); background: linear-gradient(145deg, rgba(35, 91, 74, .74), rgba(20, 55, 46, .62)); color: #9aead1;
}
[data-bs-theme="dark"] .atendimento-main input[type="file"]:hover::file-selector-button,
[data-bs-theme="dark"] .modal-atendimento input[type="file"]:hover::file-selector-button { background: linear-gradient(145deg, rgba(45, 115, 93, .8), rgba(25, 70, 58, .7)); }
