 :root {
 color-scheme: light;
 --page:#f4f6fa; --paper:#ffffff; --ink:#172033; --muted:#5a6478; --line:#e1e6ef;
 --blue:#365da8; --blue-soft:#edf2fc; --red:#d92d20; --red-soft:#fdecea;
 --green:#1d7a46; --green-soft:#e6f4ec; --amber:#a15c00; --amber-soft:#fff4dc;
 --violet:#5b45c4; --violet-soft:#efecfb; --f:"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
 --raio:12px; --raio-pilula:999px;
 --bs-body-bg:var(--page); --bs-body-color:var(--ink); --bs-body-font-family:var(--f);
 --bs-secondary-color:var(--muted); --bs-border-color:var(--line);
 --mt-surface:var(--paper); --mt-verde:var(--blue); --mt-text:var(--ink); --mt-muted:var(--muted); --mt-border:var(--line); --mt-amber:var(--amber);
}
body{font:400 16px/1.55 var(--f);background:var(--page);color:var(--ink);margin:0}
*{box-sizing:border-box}a{color:var(--blue)}:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.app-main{padding:16px;min-width:0;max-width:100%}.com-menu{padding-bottom:100px}.appbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px;font-size:20px;font-weight:700}
.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--raio)}.card-header{background:var(--paper)}
.icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.btn{border-radius:8px;min-height:44px}.btn-primary,.btn.pri{background:var(--blue);border-color:var(--blue);color:white}.btn-primary:hover{background:#1649b4;border-color:#1649b4}
.form-control,.form-select{min-height:44px}.form-check-input{width:22px;height:22px}.form-check-label{padding:8px}.text-muted,.mt-muted{color:var(--muted)!important}.mt-amber{color:var(--amber)!important}
.badge{background:var(--blue);color:white}.badge.pri{background:var(--red)}.mt-badge-paid,.p-ok{background:var(--green-soft);color:var(--green)}.mt-badge-pending,.p-base{background:var(--amber-soft);color:var(--amber)}.mt-badge-refunded,.mt-badge-neutral{background:var(--page);color:var(--muted)}.pill{border-radius:var(--raio-pilula);padding:4px 12px;display:inline-block}.p-new{background:var(--blue-soft);color:var(--blue)}
.sidebar{display:none}.bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:1030;display:flex;justify-content:space-around;background:var(--paper);border-top:1px solid var(--line);padding:8px 4px max(8px,env(safe-area-inset-bottom))}.bottom-nav a,.bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:11px;color:var(--muted);text-decoration:none;min-width:44px;min-height:44px;border:0}.bottom-nav [aria-current]{color:var(--blue)}
.offcanvas.offcanvas-bottom{height:70vh}.menu-completo{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.menu-completo a{display:flex;gap:8px;align-items:center;min-height:44px;text-decoration:none}.skip-link{position:fixed;top:-100px;z-index:1100}.skip-link:focus{top:8px;background:white;padding:12px}
.em-construcao{max-width:760px;margin:24px auto}.em-construcao h1{font-size:28px;margin-top:16px}h1,h2,p,td{overflow-wrap:anywhere}.table-responsive{max-width:100%}.table{min-width:560px;--bs-table-bg:var(--paper);--bs-table-color:var(--ink)}.search{border-radius:var(--raio-pilula);background:var(--page);padding:8px 16px}.seg{border-radius:var(--raio-pilula)}.seg .active{background:var(--ink);color:white}
.thread{display:grid;grid-template-columns:4px 40px minmax(0,1fr) auto;gap:8px}.thread:before{content:"";background:var(--violet)}.thread.humano:before{background:var(--green)}.thread.aguardando:before{background:var(--amber)}.thread.prioridade:before{background:var(--red)}.thread .preview{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.msg{background:var(--paper);border:1px solid var(--line);padding:12px;border-radius:12px;margin-right:auto}.msg.bot{background:var(--violet-soft);margin-left:auto;margin-right:0}.msg.you{background:var(--green-soft);margin-left:auto;margin-right:0}.msg.note{width:100%;background:var(--amber-soft);border:1px dashed #e6b54a}.composer{display:flex;align-items:center;gap:8px}.profile dl{margin:0}
@media(min-width:940px){.sidebar{display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;width:64px;background:var(--ink);padding:8px;overflow-y:auto;gap:4px;z-index:1040}.sidebar a{min-height:44px;display:flex;align-items:center;justify-content:center;color:white;border-radius:8px;position:relative}.sidebar a[aria-current]{background:var(--blue)}.sidebar span{position:fixed;left:68px;background:var(--ink);padding:8px;border-radius:8px;display:none}.sidebar a:focus span,.sidebar a:hover span{display:block}.com-menu{margin-left:64px;padding:24px}.bottom-nav{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Telas de Conversas (Lote L5) */
.conversas-layout{display:grid;grid-template-columns:1fr;gap:16px;height:calc(100vh - 120px);min-height:550px}
.conversas-lista{display:flex;flex-direction:column;gap:12px;height:100%;overflow-y:auto;background:var(--paper);border:1px solid var(--line);border-radius:var(--raio);padding:12px}
.conversas-painel{display:flex;flex-direction:column;height:100%;background:var(--paper);border:1px solid var(--line);border-radius:var(--raio);overflow:hidden}
.conversa-perfil{display:none;height:100%;overflow-y:auto;background:var(--paper);border:1px solid var(--line);border-radius:var(--raio);padding:16px}

@media(min-width:768px){
  .conversas-layout{grid-template-columns:280px 1fr}
}
@media(min-width:940px){
  .conversas-layout{grid-template-columns:280px 1fr 230px}
  .conversa-perfil{display:flex;flex-direction:column;gap:16px}
}

.legenda-cores{display:flex;gap:12px;font-size:12px;color:var(--muted);margin-bottom:8px;flex-wrap:wrap}
.legenda-item{display:flex;align-items:center;gap:4px}
.legenda-dot{width:8px;height:8px;border-radius:50%}
.legenda-dot.violet{background:var(--violet)}
.legenda-dot.green{background:var(--green)}
.legenda-dot.amber{background:var(--amber)}
.legenda-dot.red{background:var(--red)}

.thread{display:grid;grid-template-columns:4px 40px minmax(0,1fr) auto;gap:10px;padding:10px;background:var(--paper);border:1px solid var(--line);border-radius:var(--raio);text-decoration:none;color:inherit;align-items:center;transition:background 0.15s;position:relative}
.thread:hover{background:var(--page)}
.thread.ativa{background:var(--blue-soft);border-color:var(--blue)}
.thread-avatar{width:40px;height:40px;border-radius:50%;background:var(--line);display:flex;align-items:center;justify-content:center;font-weight:600;font-size:14px;color:var(--ink);flex-shrink:0}
.thread-info{min-width:0;display:flex;flex-direction:column;gap:2px}
.thread-topo{display:flex;justify-content:space-between;align-items:center;gap:4px}
.thread-nome{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thread-hora{font-size:11px;color:var(--muted);flex-shrink:0}
.thread-corpo{display:flex;justify-content:space-between;align-items:center;gap:8px}

.faixa-atendimento{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 16px;border-bottom:1px solid var(--line);font-size:13px;font-weight:500}
.faixa-atendimento.hermes{background:var(--violet-soft);color:var(--violet)}
.faixa-atendimento.humano{background:var(--green-soft);color:var(--green)}
.faixa-atendimento.aguardando{background:var(--amber-soft);color:var(--amber)}

.chat-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--line);background:var(--paper)}
.chat-mensagens{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;background:var(--page)}
.msg{max-width:75%;padding:10px 14px;border-radius:12px;position:relative;font-size:14px;line-height:1.45;word-break:break-word}
.msg.cliente{background:var(--paper);border:1px solid var(--line);margin-right:auto;margin-left:0}
.msg.bot{background:var(--violet-soft);margin-left:auto;margin-right:0;border:1px solid rgba(91,69,196,0.15)}
.msg.you{background:var(--green-soft);margin-left:auto;margin-right:0;border:1px solid rgba(29,122,70,0.15)}
.msg.celular{background:var(--paper);border:1px dashed var(--muted);margin-left:auto;margin-right:0}
.msg.sistema{background:var(--page);border:1px solid var(--line);margin:0 auto;text-align:center;font-size:12px;color:var(--muted);max-width:90%}
.msg.note{max-width:100%;width:100%;background:var(--amber-soft);border:1px dashed #e6b54a;color:var(--ink);margin:4px 0}
.msg-meta{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted);margin-top:4px}
.msg.bot .msg-meta,.msg.you .msg-meta{justify-content:flex-end}
.msg-erro{color:var(--red);font-size:12px;margin-top:4px;display:flex;align-items:center;gap:4px}

.composer-container{padding:12px;background:var(--paper);border-top:1px solid var(--line)}
.composer{display:flex;align-items:center;gap:8px}
.btn-send{width:38px;height:38px;min-height:38px;min-width:38px;background:var(--blue);color:white;border:0;border-radius:8px;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0}
.btn-send:hover{background:#1649b4}
.btn-send:disabled{opacity:0.5;cursor:not-allowed}
.composer textarea.form-control{min-height:38px;height:38px;max-height:120px;resize:none;padding:8px 12px;border-radius:8px}

.fora-janela-banner{background:var(--amber-soft);border:1px solid #e6b54a;border-radius:8px;padding:8px 12px;font-size:13px;color:var(--amber);margin-bottom:8px;display:flex;align-items:center;gap:8px}

.respostas-prontas-popover{position:absolute;bottom:60px;left:12px;background:var(--paper);border:1px solid var(--line);border-radius:var(--raio);box-shadow:0 4px 16px rgba(0,0,0,0.08);max-height:220px;width:300px;overflow-y:auto;z-index:100;display:none}
.resposta-item{padding:8px 12px;cursor:pointer;border-bottom:1px solid var(--line);font-size:13px}
.resposta-item:hover{background:var(--page)}
.resposta-atalho{font-weight:600;color:var(--blue)}


/* L11: documentos públicos, navegação e atendimento acessível. */
.public-notice{text-align:center;padding:10px 16px;background:var(--blue-soft);color:var(--ink);font-size:14px}
.public-header{max-width:1080px;margin:auto;padding:24px;display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}
.public-brand{font-size:24px;font-weight:700;color:var(--ink);text-decoration:none}.public-brand span{display:block;font-size:14px;font-weight:400;color:var(--muted)}
.public-header nav{display:flex;gap:8px;flex-wrap:wrap}.public-header nav a{display:flex;align-items:center;min-height:44px;padding:8px 12px;border-radius:8px;text-decoration:none}.public-header [aria-current]{background:var(--blue-soft);font-weight:600}
.public-document{max-width:820px;margin:12px auto 40px;padding:32px;background:var(--paper);border:1px solid var(--line);border-radius:16px}.public-document h1{font-size:clamp(28px,5vw,40px);line-height:1.2}.public-document h2{font-size:22px;margin:32px 0 12px}.public-document p{margin:0 0 16px}.public-eyebrow,.public-updated{color:var(--muted);font-size:14px}.public-footer{text-align:center;padding:20px;overflow-wrap:anywhere}.public-document code{overflow-wrap:anywhere}
.conversas-layout{min-height:0;height:calc(100dvh - 190px);grid-template-columns:minmax(0,1fr)}
.conversas-layout[data-conversa-id]{height:calc(100dvh - 160px)}
.conversas-painel,.conversas-lista,.conversa-perfil{min-width:0;min-height:0}.chat-mensagens{min-height:120px;overscroll-behavior:contain}.chat-header{gap:12px;flex-wrap:wrap}.chat-header>div{min-width:0}.chat-header .fw-bold,.profile{overflow-wrap:anywhere}.chat-header form{flex-shrink:0}
.chat-back{display:inline-flex;align-items:center;gap:8px;min-width:44px;min-height:44px}.thread-nome{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}.thread:before{align-self:stretch;border-radius:4px}.msg{font-size:16px;line-height:1.55;max-width:85%;flex-shrink:0}.msg.cliente{background:#f1f3f7}.msg-author{font-size:13px;font-weight:600;margin-bottom:4px}.msg-erro{color:var(--amber)}.msg-status-label{font-size:12px}.msg-meta{flex-wrap:wrap}
.faixa-atendimento{flex-wrap:wrap;border-left:4px solid #f59e0b}.faixa-atendimento.hermes{border-left-color:#8b5cf6}.faixa-atendimento.humano{border-left-color:#10b981}.faixa-atendimento.prioridade{border-left-color:#ef4444;background:var(--red-soft);color:#9b2118}
.composer-container{position:relative;flex-shrink:0}.composer{align-items:flex-end}.composer textarea.form-control{min-width:0;min-height:44px;height:72px;flex:1}.composer .btn,.btn-send{min-width:44px;min-height:44px;width:44px;height:44px;flex-shrink:0}.composer-modes{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}.composer-modes .active{background:var(--blue-soft);color:var(--blue);border-color:var(--blue)}.composer-help{font-size:13px;color:var(--muted);margin-bottom:8px}.respostas-prontas-popover{width:min(320px,calc(100% - 24px));bottom:100%;max-height:240px}.resposta-item{display:block;width:100%;text-align:left;background:var(--paper);color:var(--ink);border:0;border-bottom:1px solid var(--line);min-height:44px}.resposta-item:focus-visible{outline-offset:-3px}.profile button,.profile a{min-height:44px}.profile select{min-width:0}.profile .badge{background:var(--blue-soft)!important;color:var(--ink);white-space:normal}.profile .badge button{min-width:44px;color:var(--ink)!important}.profile .badge form{display:inline-block!important}
.bottom-nav>*{flex:1;min-width:0}.com-menu{padding-bottom:calc(92px + env(safe-area-inset-bottom))}.sidebar-toggle{border:0;background:transparent;color:white;min-height:44px;display:flex;align-items:center;justify-content:center;border-radius:8px;flex-shrink:0}.sidebar-toggle:hover{background:#29364f}
@media(max-width:939px){.conversas-layout[data-conversa-id]>.conversas-lista{display:none!important}.conversas-layout:not([data-conversa-id])>.conversas-painel{display:none!important}.conversa-perfil{display:none}.chat-header{padding:12px}.faixa-atendimento{padding:10px 12px}.chat-mensagens{padding:12px}.msg{max-width:94%}.public-document{margin:8px 12px 24px;padding:24px}.chat-header>div:last-child{flex-wrap:wrap}.conversas-layout[data-conversa-id]{height:auto;min-height:calc(100dvh - 170px)}.conversas-layout[data-conversa-id] .conversas-painel{height:calc(100dvh - 170px);min-height:480px}}
@media(min-width:940px){.sidebar{width:64px;transition:width .2s ease}.sidebar a{flex-shrink:0;gap:12px}.sidebar .menu-label{display:none;position:static;background:transparent;padding:0;white-space:nowrap}.sidebar a:hover .menu-label,.sidebar a:focus .menu-label{display:none}.sidebar .badge-recados{display:block;position:absolute;left:auto;padding:2px 5px}.sidebar-expanded .sidebar{width:220px}.sidebar-expanded .sidebar a,.sidebar-expanded .sidebar-toggle{justify-content:flex-start;padding:0 12px}.sidebar-expanded .sidebar .menu-label{display:inline}.app-main.com-menu{margin-left:64px;transition:margin-left .2s ease;padding-bottom:24px}.sidebar-expanded .app-main.com-menu{margin-left:220px}.conversas-layout{grid-template-columns:250px minmax(0,1fr);height:calc(100dvh - 190px)}.conversas-layout[data-conversa-id]{grid-template-columns:250px minmax(0,1fr);height:calc(100dvh - 125px)}.conversa-perfil{display:none}.chat-back{display:none}}
@media(min-width:1200px){.conversas-layout[data-conversa-id]{grid-template-columns:250px minmax(0,1fr) 210px}.conversa-perfil{display:flex}.sidebar-expanded .conversas-layout[data-conversa-id]{grid-template-columns:230px minmax(0,1fr)}.sidebar-expanded .conversa-perfil{display:none}}
@media(min-width:1400px){.sidebar-expanded .conversas-layout[data-conversa-id]{grid-template-columns:250px minmax(0,1fr) 210px}.sidebar-expanded .conversa-perfil{display:flex}}
@media(max-width:539px){.composer{display:grid;grid-template-columns:44px 44px minmax(0,1fr) 44px}.composer textarea.form-control{grid-column:1 / -1;grid-row:1;width:100%;height:60px}.composer .btn-send{grid-column:4}.composer-modes{gap:4px}.composer-modes .btn{font-size:14px;padding:8px}.composer-help{margin-bottom:4px}.composer-container{padding:10px}}
#composer-arquivo{display:none}
/* Fase 4 — catálogo, pós-venda, campanhas, arquivos */
.grade-produtos{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
.produto-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--raio);overflow:hidden;color:var(--ink);text-decoration:none;display:flex;flex-direction:column}
.produto-card:hover,.produto-card:focus-visible{border-color:var(--blue)}
.produto-foto{aspect-ratio:1/1;background:var(--page);display:flex;align-items:center;justify-content:center;overflow:hidden}
.produto-foto img{width:100%;height:100%;object-fit:cover}
.produto-info{padding:10px 12px;display:flex;flex-direction:column;gap:4px}
.produto-nome{font-weight:600;font-size:14px;line-height:1.3}
.produto-preco{font-weight:700}
.miniaturas{display:flex;flex-wrap:wrap;gap:8px}
.miniaturas img{width:88px;height:88px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}
.passos{display:flex;gap:8px;flex-wrap:wrap;padding:0;margin:0 0 12px;list-style:none}
.passos li{padding:6px 12px;border-radius:var(--raio-pilula);background:var(--page);color:var(--muted);font-size:14px}
.passos li.atual{background:var(--ink);color:#fff}
.custo-destaque{background:var(--blue-soft);border:1px solid var(--blue);border-radius:var(--raio);padding:12px 16px}
.tabela-quadro{overflow-x:auto}
.p-erro{background:var(--amber-soft);color:var(--amber)}

/* Refinamento visual: tipografia nativa, navegação clara e controles estáveis. */
body { font-family: var(--f); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: var(--f); }
a { text-underline-offset: 3px; }
.appbar { min-height: 48px; margin-bottom: 24px; font-size: 18px; letter-spacing: -.025em; }
.appbar .btn { color: var(--muted); font-size: 14px; font-weight: 500; }
h1.h4 { font-size: 24px; letter-spacing: -.035em; }
.app-alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border: 1px solid #eadbb9; border-radius: 12px; background: #fff9ed; color: #795318; font-size: 14px; }
.app-alert .icon { margin-top: 2px; }
.app-alert p { margin: 0; flex: 1; }
.btn { font-weight: 500; text-decoration: none; }
.btn:hover, .btn:focus-visible { text-decoration: none; }
.btn-light { --bs-btn-hover-bg: #edf2f8; --bs-btn-hover-color: var(--ink); }
.form-control, .form-select { border-color: #dce3ed; background-color: #fff; }
.search { border-radius: 10px; font-size: 14px; background: #f8fafc; }
.conversas-lista { padding: 16px; gap: 16px; }
.inbox-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.inbox-filters a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 8px; border: 1px solid transparent; border-radius: 9px; color: #566277; background: #f5f7fb; font-size: 13px; font-weight: 500; line-height: 1.3; text-decoration: none; }
.inbox-filters a:last-child { grid-column: 1 / -1; }
.inbox-filters a:hover { background: #eaf0f9; color: #2c4979; }
.inbox-filters a[aria-current] { color: #2f5293; background: var(--blue-soft); border-color: #cbdaf4; font-weight: 600; }
.legenda-cores { gap: 8px 16px; padding-top: 8px; font-size: 12px; }
.conversas-painel > .text-center { max-width: 360px; font-size: 15px; line-height: 1.7; }
.bottom-nav a, .bottom-nav button { border-radius: 10px; }
.bottom-nav [aria-current] { background: var(--blue-soft); color: var(--blue); }
.sidebar-toggle { color: #637086; font-size: 13px; gap: 10px; }
.sidebar-toggle:hover { background: #edf2f8; color: #294a7f; }
@media (min-width: 940px) {
  .sidebar { background: #fbfcfe; border-right: 1px solid var(--line); padding: 12px 8px; gap: 5px; }
  .sidebar a { color: #556176; text-decoration: none; font-size: 14px; font-weight: 500; min-height: 44px; }
  .sidebar a:hover, .sidebar a:focus-visible { background: #eef3fa; color: #345487; text-decoration: none; }
  .sidebar a[aria-current] { background: #e8effb; color: #294f94; font-weight: 600; box-shadow: inset 3px 0 #557dc0; }
  .sidebar .menu-label { color: inherit; }
  .sidebar-expanded .sidebar a:is(:hover,:focus-visible) .menu-label { display: inline; }
  .sidebar .badge-recados { position: absolute!important; top: 6px!important; right: 4px!important; left: auto; transform: none!important; min-width: 18px; min-height: 18px; display: flex; align-items: center; justify-content: center; border: 2px solid #fbfcfe; font-size: 10px; padding: 1px 4px; border-radius: 999px; }
  .sidebar-expanded .sidebar .badge-recados { top: 50%!important; right: 10px!important; transform: translateY(-50%)!important; }
  .sidebar-expanded .sidebar a { padding-right: 32px; }
  .sidebar-toggle { margin-bottom: 10px; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; padding-bottom: 8px; min-height: 48px; }
  .sidebar-expanded .sidebar-toggle { padding-left: 12px; }
}
/* Funil: popover na camada superior, sem recorte pelo scroll do Kanban. */
.kanban-quadro { scrollbar-width: thin; scrollbar-color: #c7d1e0 transparent; }
.kanban-coluna { width: 290px; background: #eef2f7!important; border-color: #e0e6ee!important; border-radius: 14px!important; }
.kanban-coluna-header { padding: 16px!important; background: transparent!important; border-bottom: 0!important; }
.kanban-coluna-header > span:first-child { font-size: 13px; text-transform: none!important; color: #4f6078!important; }
.coluna-contador { color: #53647a!important; background: #dde5ef!important; font-size: 12px; }
.kanban-coluna-corpo { padding: 0 10px 12px!important; }
.kanban-card { padding: 16px!important; border: 1px solid #dce4ed!important; box-shadow: 0 2px 5px #1e355008!important; border-radius: 12px; }
.kanban-card:hover { border-color: #b8c9e2!important; }
.lead-name { min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; color: var(--ink); }
.lead-summary { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 12px 0; }
.lead-value { font-size: 13px; font-weight: 600; }
.lead-temperature { padding: 5px 8px; font-size: 11px; border-radius: 6px; font-weight: 600; background: #edf2fb; color: #425e8e; }
.lead-temperature.quente { background: #fff0da; color: #875315; }
.lead-temperature.morno { background: #f5f0df; color: #776127; }
.lead-actions-trigger, .lead-history { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: #67778f; flex-shrink: 0; }
.lead-actions-trigger:hover, .lead-history:hover { background: #edf2fa; color: #31568c; }
.lead-actions-trigger[aria-expanded=true] { background: #e7effc; color: #31568c; }
.lead-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 12px; min-height: 44px; }
.lead-footer a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 13px; text-decoration: none; }
.lead-popup { position: fixed; inset: auto; margin: 0; padding: 0; width: min(340px,calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; border: 1px solid #d9e2ef; border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 14px 48px #20385c24; font-family: var(--f); }
.lead-popup::backdrop { background: transparent; }
.lead-popup-header { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.lead-popup-header p { margin: 0 0 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lead-popup-header h2 { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 600; }
.lead-popup-body { padding: 16px 20px; }
.lead-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; font-size: 13px; }
.lead-facts div { min-width: 0; }
.lead-facts dt { color: #6a778b; font-weight: 400; font-size: 12px; margin-bottom: 4px; }
.lead-facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.lead-popup .lead-summary { padding: 12px; background: #f7f9fc; border-radius: 9px; margin: 0 0 16px; }
.lead-popup form { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.lead-popup label { font-size: 12px; font-weight: 600; color: #5e6d82; }
.lead-popup .form-select { font-size: 14px; }
.lead-popup .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; font-size: 13px; }
.lead-popup-links { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.lead-popup-links .btn { justify-content: flex-start; color: #425c86; background: #f4f7fb; }
.lead-popup-links .btn:hover { background: #e9f0fb; color: #2e4f88; }
.lead-empty { margin: 4px 0; padding: 24px 12px; border: 1px dashed #d4ddea; border-radius: 10px; text-align: center; font-size: 13px; color: #718096; }
.recados-page { padding: 0!important; }
.recados-page .nav { background: #f0f3f8!important; border: 0!important; gap: 4px; }
.recados-page .nav-link { display: flex; align-items: center; min-height: 44px; border-radius: 9px; font-size: 13px; color: var(--muted); }
.recados-page .nav-link.active { background: white; color: var(--blue); box-shadow: 0 1px 4px #2237520d!important; }
.recado-card { border-color: #e0e6ef!important; box-shadow: none!important; }
.recado-card h2 { line-height: 1.6; }
.recado-card .card-body > div:first-child > div:first-child { flex-wrap: wrap; }
.recado-card .card-body > div:first-child { gap: 12px!important; }
.recado-card .card-body > div:first-child > div:last-child { flex-wrap: wrap; }
@media (max-width: 539px) { .app-main { padding: 16px 12px; } .inbox-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } .kanban-coluna { width: min(290px,calc(100vw - 40px))!important; } }

.lead-popup.popover-fallback { z-index: 1060; }
#historico-timeline:not([hidden]) { display: flex; }
.app-logo { display: block; width: 144px; height: auto; max-width: 55%; object-fit: contain; }
.public-logo { display: block; width: 220px; height: auto; max-width: 100%; object-fit: contain; margin-bottom: 8px; }
.arquivos-grade .produto-foto img { object-fit: contain; padding: 8px; }
.sidebar-brand { display: flex; align-items: center; justify-content: center; min-height: 64px; flex-shrink: 0; }
.sidebar-logo { display: none; width: 164px; height: auto; }
.sidebar-mark { display: block; width: 44px; height: 44px; object-fit: cover; }
@media (min-width: 940px) {
  .sidebar-expanded .sidebar-logo { display: block; }
  .sidebar-expanded .sidebar-mark { display: none; }
  .appbar-authenticated { display: none; }
  .sidebar-logout { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); flex-shrink: 0; }
  .sidebar-logout .btn { width: 100%; min-height: 44px; color: var(--muted); font-size: 13px; }
}

/* Login: estilos isolados do restante do painel. */
.login-page { background: #eef1f5; }
.login-page .app-main { padding: 0; min-height: 100vh; min-height: 100svh; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
.login-brand { background: #17212c; color: #fff; padding: clamp(32px, 5vw, 80px); display: flex; flex-direction: column; justify-content: space-between; gap: 64px; position: relative; overflow: hidden; border-top: 4px solid #c6ab68; }
.login-brand::after { content: ''; position: absolute; width: 480px; height: 480px; border: 1px solid #ffffff0d; transform: rotate(35deg); right: -310px; bottom: -180px; box-shadow: 0 0 0 48px #ffffff03, 0 0 0 96px #ffffff03; pointer-events: none; }
.login-brand-logo { background: #fff; border-radius: 12px; padding: 14px 20px; width: 220px; max-width: 100%; }
.login-brand-logo img { width: 100%; height: auto; display: block; }
.login-brand-copy { max-width: 460px; position: relative; z-index: 1; }
.login-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .16em; color: #75602f; }
.login-brand .login-eyebrow { color: #d3bb80; }
.login-brand h2 { margin: 20px 0; font-size: clamp(34px, 3.5vw, 54px); line-height: 1.12; font-weight: 650; letter-spacing: -.035em; }
.login-brand-copy p { color: #c0c9d3; font-size: 17px; max-width: 370px; margin: 0; }
.login-brand-rule { width: 48px; height: 3px; background: #c6ab68; margin: 32px 0 20px; }
.login-brand-caption { color: #c0c9d3; font-size: 13px; }
.login-brand-footer { color: #a9b5c3; font-size: 10px; letter-spacing: .2em; }
.login-access { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 24px; padding: 48px 32px; }
.login-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid #e1e6ef; border-radius: 20px; padding: 40px; box-shadow: 0 16px 48px #17203308; }
.login-card h1 { font-size: 28px; letter-spacing: -.035em; line-height: 1.2; margin: 12px 0; font-weight: 650; }
.login-intro { font-size: 14px; color: var(--muted); margin: 0 0 32px; }
.login-field { margin-bottom: 20px; }
.login-field .form-label { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.login-field .form-control { height: 50px; background: #fafbfc; border-radius: 9px; font-size: 15px; padding: 12px 14px; }
.login-field .form-control:focus { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px #365da81a; }
.login-field .form-control::placeholder { color: #737e8f; }
.login-password { position: relative; }
.login-password .form-control { padding-right: 90px; }
.login-toggle { position: absolute; right: 5px; top: 3px; height: 44px; padding: 0 10px; background: transparent; border: 0; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--blue); }
.login-toggle:hover { background: var(--blue-soft); }
.login-submit { width: 100%; display: flex; align-items: center; justify-content: space-between; background: #365da8; border: 1px solid #365da8; color: #fff; min-height: 50px; padding: 12px 18px; font-weight: 600; }
.login-submit:hover, .login-submit:focus-visible { background: #294a89; border-color: #294a89; color: #fff; }
.login-submit span { font-size: 20px; line-height: 1; }
.login-help { border-top: 1px solid var(--line); padding-top: 24px; margin: 28px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.login-access-footer { font-size: 11px; color: var(--muted); margin: 0; }
.login-error { font-size: 14px; }
@media (max-width: 800px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-brand { padding: 24px; gap: 0; }
  .login-brand-logo { width: 170px; padding: 10px 14px; }
  .login-brand-copy { margin-top: 24px; }
  .login-brand h2 { font-size: 30px; margin: 12px 0 0; }
  .login-brand h2 br { display: none; }
  .login-brand-copy p, .login-brand-rule, .login-brand-caption, .login-brand-footer { display: none; }
  .login-access { padding: 32px 20px; }
  .login-card { padding: 28px; }
}
@media (max-width: 380px) { .login-card { padding: 24px 20px; } .login-card h1 { font-size: 25px; } }
