:root {
  --laranja: #F7941D; --laranja-esc: #E07F10; --amarelo: #F7B733; --laranja-claro: #FFF4E3;
  --grad: linear-gradient(135deg, #F7941D 0%, #F7B733 100%);
  --escuro: #181818; --escuro-2: #242424; --texto: #1E1E1E; --muted: #6F6F6F; --borda: #E3E3E3; --fundo: #F3F3F3;
  --branco: #fff; --verde: #2E9E5B; --vermelho: #D64545; --azul: #2F7DD1; --nota: #FFF7D1;
  --raio: 10px; font-size: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: var(--texto); background: var(--fundo); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.erro { color: var(--vermelho); min-height: 18px; font-size: 13px; }
a { color: var(--azul); }

/* botões e campos */
.btn { border: 1px solid var(--borda); background: var(--branco); color: var(--texto); padding: 8px 14px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; }
.btn:hover { background: #EFEFEF; }
.btn.primario { background: var(--grad); border-color: var(--laranja); color: var(--escuro); }
.btn.primario:hover { background: linear-gradient(135deg, #E8850F, #F2A91E); }
.btn.perigo { color: var(--vermelho); border-color: #f0c9c9; }
.btn.verde { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn.peq { padding: 5px 10px; font-size: 12.5px; }
.btn.largo { width: 100%; padding: 11px; }
.btn:disabled { opacity: .55; cursor: default; }
.icone { border: 0; background: none; cursor: pointer; font-size: 18px; padding: 6px 8px; border-radius: 8px; }
.icone:hover { background: #EDEDED; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--borda); border-radius: 8px; background: #fff; width: 100%; color: var(--texto); }
input:focus, select:focus, textarea:focus { outline: 2px solid #FBD28C; border-color: var(--laranja); }
label { display: block; font-weight: 600; font-size: 12.5px; color: #555555; margin-bottom: 10px; }
label > input, label > select, label > textarea { margin-top: 4px; font-weight: 400; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: auto; }

/* login */
.login { height: 100%; display: grid; place-items: center; position: relative; overflow: hidden; background: var(--escuro); }
.login::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -120px; background: var(--grad); clip-path: polygon(0 0, 100% 0, 100% 100%); opacity: .95; }
.login::after { content: ""; position: absolute; width: 260px; height: 260px; left: -90px; bottom: -90px; border-radius: 50%; background: var(--grad); opacity: .9; }
.login-box { position: relative; z-index: 1; }
.logo-login { width: 230px; height: auto; display: block; margin: 4px auto 6px; }
.sub-login { margin: 0 0 20px; letter-spacing: .3px; }
.login-box { width: 360px; background: #fff; padding: 32px; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.18); text-align: center; }
.login-box h1 { margin: 12px 0 2px; font-size: 20px; }
.login-box label { text-align: left; }
.logo { width: 52px; height: 52px; margin: 0 auto; border-radius: 14px; background: var(--grad); display: grid; place-items: center; color: var(--escuro); font-weight: 800; font-size: 26px; }
.logo.pequeno { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; margin-bottom: 14px; }

/* estrutura */
.app { display: flex; flex-direction: column; height: 100%; }
.nav { height: 64px; flex: 0 0 64px; background: var(--escuro); display: flex; flex-direction: row; align-items: center; padding: 0 14px; gap: 10px; border-bottom: 3px solid transparent; border-image: var(--grad) 1; }
.nav-itens { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-itens::-webkit-scrollbar { display: none; }
.nav button { position: relative; min-width: 74px; height: 58px; border: 0; background: none; color: #A9A9A9; cursor: pointer; padding: 5px 6px 4px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: inherit; transition: background .15s, color .15s; flex: 0 0 auto; }
.nav button i { font-style: normal; }
/* Ícones no padrão iOS: "squircle" com degradê suave e símbolo branco preenchido */
.ic { --c: #8E8E93; width: 32px; height: 32px; border-radius: 7.4px; display: grid; place-items: center; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 78%, #fff) 0%, var(--c) 100%); box-shadow: 0 1px 2px rgba(0,0,0,.35), inset 0 0.5px 0 rgba(255,255,255,.35); transition: transform .15s; }
.ic svg { width: 21px; height: 21px; fill: #fff; stroke: none; }
.ic .ink { fill: var(--c); }
.ic .ink-s { fill: none; stroke: var(--c); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.c-verde { --c: #34C759; } .c-azul { --c: #007AFF; } .c-roxo { --c: #5856D6; } .c-ciano { --c: #32ADE6; }
.c-indigo { --c: #AF52DE; } .c-laranja { --c: #FF9500; } .c-rosa { --c: #FF2D55; } .c-cinza { --c: #8E8E93; }
.c-perfil { --c: #FFB340; } .c-sair { --c: #FF3B30; }
.nav button:hover .ic { transform: scale(1.06); }
.marca-nav { width: 38px; height: auto; flex: 0 0 auto; margin-right: 6px; }
.nav button b { font-size: 10.5px; font-weight: 600; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav button:hover { background: #222; color: #fff; }
.nav button.ativo { background: #2A2A2A; color: #fff; }
.nav button.ativo::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -3px; height: 3px; border-radius: 3px 3px 0 0; background: #fff; }
.nav button.ativo .ic { box-shadow: 0 0 0 2px var(--amarelo), 0 3px 10px rgba(247,148,29,.45); }
.nav-fim { display: flex; flex-direction: row; align-items: center; gap: 2px; flex: 0 0 auto; }
.sock { width: 10px; height: 10px; border-radius: 50%; background: var(--vermelho); margin: 0 8px; }
.sock.on { background: #4cd07d; }
.badge { position: absolute; top: 1px; right: 12px; background: #FF3B30; color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; box-shadow: 0 0 0 2px var(--escuro); }
.view { flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.pagina { height: 100%; overflow: auto; padding: 24px 28px; }
.pagina h2 { margin: 0 0 16px; font-size: 20px; }
.barra { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.barra .cresce { flex: 1; }

/* atendimentos: 3 colunas */
.atd { display: flex; height: 100%; }
.lista { width: 510px; border-right: 1px solid var(--borda); background: #fff; display: flex; flex-direction: column; }
.lista-topo { padding: 12px; border-bottom: 1px solid var(--borda); display: flex; flex-direction: column; gap: 8px; }
.lista-topo .linha { display: flex; gap: 6px; }
.abas { display: flex; border-bottom: 1px solid var(--borda); overflow-x: auto; scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.abas button { flex: 1 0 auto; border: 0; background: none; padding: 11px 3px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.abas button.ativo { color: var(--laranja-esc); border-bottom-color: var(--laranja); }
.abas button span { display: inline-block; background: #EAEAEA; color: #555; border-radius: 9px; padding: 0 6px; margin: 0; font-size: 11px; line-height: 17px; min-width: 18px; text-align: center; }
.abas button.ativo span { background: var(--grad); color: var(--escuro); }
.itens { flex: 1; overflow: auto; }
.item { display: flex; gap: 10px; padding: 11px 12px; border-bottom: 1px solid #EEEEEE; cursor: pointer; }
.item:hover { background: #F8F8F8; }
.item.sel { background: var(--laranja-claro); }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #E5E5E5; color: #666666; display: grid; place-items: center; font-weight: 700; }
.item .meio { flex: 1; min-width: 0; }
.item .l1 { display: flex; justify-content: space-between; gap: 6px; }
.item .nome { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .hora { font-size: 11.5px; color: var(--muted); flex: none; }
.item .prev { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.item .l3 { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.tag { font-size: 10.5px; padding: 1px 7px; border-radius: 9px; font-weight: 600; color: #fff; white-space: nowrap; }
.tag.cinza { background: #E8E8E8; color: #555555; }
.naolidas { margin-left: auto; background: var(--verde); color: #fff; font-size: 11px; font-weight: 700; border-radius: 9px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; }
.espera { font-size: 11px; color: var(--vermelho); font-weight: 600; }
.vazio { padding: 40px 20px; text-align: center; color: var(--muted); }

.chat { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #ECECEC; }
.chat-topo { background: #fff; padding: 10px 16px; border-bottom: 1px solid var(--borda); display: flex; align-items: center; gap: 12px; }
.chat-topo .info { flex: 1; min-width: 0; }
.chat-topo .info b { display: block; font-size: 15px; }
.chat-topo .info small { color: var(--muted); }
.msgs { flex: 1; overflow: auto; padding: 16px 6%; display: flex; flex-direction: column; gap: 4px; }
.dia { align-self: center; background: #fff; color: var(--muted); font-size: 11.5px; padding: 3px 12px; border-radius: 8px; margin: 10px 0 6px; box-shadow: 0 1px 1px rgba(0,0,0,.05); }
.msg { max-width: 68%; padding: 7px 10px 5px; border-radius: 10px; box-shadow: 0 1px 1px rgba(0,0,0,.08); word-wrap: break-word; white-space: normal; position: relative; }
.msg.entrada { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.msg.saida { align-self: flex-end; background: #FFE9C7; border-top-right-radius: 2px; }
.msg .autor { font-size: 11.5px; font-weight: 700; color: var(--laranja-esc); margin-bottom: 2px; }
.msg .rodape { font-size: 10.5px; color: #888888; text-align: right; margin-top: 2px; }
.msg .rodape .lida { color: var(--azul); }
.msg img.midia, .msg video.midia { max-width: 320px; max-height: 320px; border-radius: 6px; display: block; cursor: pointer; }
.msg audio { width: 260px; display: block; }
.msg .doc { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.05); padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--texto); }
.msg code { background: rgba(0,0,0,.06); padding: 1px 4px; border-radius: 4px; }
.sistema { align-self: center; background: #E3EEF9; color: #3b5772; font-size: 12px; padding: 4px 12px; border-radius: 8px; margin: 4px 0; text-align: center; max-width: 80%; }
.nota { align-self: center; width: 70%; background: var(--nota); border: 1px dashed #e3c860; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.nota .autor { font-size: 11.5px; font-weight: 700; color: #8a6d00; }
.mais { align-self: center; }

.compositor { background: #fff; border-top: 1px solid var(--borda); padding: 8px 12px; position: relative; }
.compositor .modo { display: flex; gap: 4px; margin-bottom: 6px; }
.compositor .modo button { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 10px; border-radius: 12px; cursor: pointer; }
.compositor .modo button.ativo { background: var(--laranja-claro); color: var(--laranja-esc); }
.compositor .modo button.ativo.n { background: var(--nota); color: #8a6d00; }
.compositor .linha { display: flex; align-items: flex-end; gap: 6px; }
.compositor textarea { resize: none; min-height: 42px; max-height: 160px; }
.compositor.nota-on textarea { background: var(--nota); }
.aviso { background: #fff; border-top: 1px solid var(--borda); padding: 14px; display: flex; gap: 12px; align-items: center; justify-content: center; }
.gravando { color: var(--vermelho); font-weight: 600; display: flex; gap: 10px; align-items: center; flex: 1; }
.rapidas { position: absolute; bottom: 100%; left: 12px; right: 12px; background: #fff; border: 1px solid var(--borda); border-radius: 10px; box-shadow: 0 -6px 20px rgba(0,0,0,.1); max-height: 260px; overflow: auto; }
.rapidas div { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #F1F1F1; }
.rapidas div.sel, .rapidas div:hover { background: var(--laranja-claro); }
.rapidas b { color: var(--laranja-esc); }
.rapidas small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.detalhe { width: 300px; background: #fff; border-left: 1px solid var(--borda); overflow: auto; padding: 16px; }
.detalhe h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.hist { font-size: 12.5px; padding: 7px 8px; border-radius: 6px; cursor: pointer; border: 1px solid #EDEDED; margin-bottom: 5px; }
.hist:hover { background: #F8F8F8; }
.sem-chat { flex: 1; display: grid; place-items: center; color: var(--muted); text-align: center; }

/* tabelas e cartões */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--raio); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #EEEEEE; }
th { background: #F8F8F8; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr.clicavel { cursor: pointer; } tr.clicavel:hover td { background: #FAFAFA; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 24px; }
.card { background: #fff; border-radius: var(--raio); padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06); border-top: 4px solid var(--laranja); }
.card h4 { margin: 0 0 4px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.card .num { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.card .num div { background: var(--fundo); border-radius: 8px; padding: 8px; }
.card .num strong { display: block; font-size: 20px; }
.card .num span { font-size: 11.5px; color: var(--muted); }
.card .acoes { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.st { font-size: 11px; padding: 2px 8px; border-radius: 9px; font-weight: 700; }
.st.conectado { background: #DDF3E6; color: #1f7a45; }
.st.desconectado { background: #FBE3E3; color: #a83232; }
.st.conectando { background: #FFF1D6; color: #9a6400; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ccc; margin-right: 6px; }
.dot.on { background: #4cd07d; }
.sub-abas { display: flex; gap: 6px; margin-bottom: 18px; }

/* modal e toast */
.modal { position: fixed; inset: 0; background: rgba(30,25,20,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal-box { background: #fff; border-radius: 14px; padding: 22px; width: 480px; max-width: 100%; max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-box h3 { margin: 0 0 16px; }
.modal-box .acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.grade2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.qr { text-align: center; }
.qr img { width: 280px; height: 280px; border: 1px solid var(--borda); border-radius: 10px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--escuro); color: #fff; padding: 11px 18px; border-radius: 10px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 90vw; }
.toast.erro { background: var(--vermelho); }
.zoom { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 70; cursor: zoom-out; }
.zoom img { max-width: 92vw; max-height: 92vh; }

@media (max-width: 1100px) { .detalhe { display: none; } .detalhe.forcar { display: block; position: absolute; right: 0; top: 0; bottom: 0; z-index: 5; box-shadow: -8px 0 20px rgba(0,0,0,.1); } .atd { position: relative; } }
@media (max-width: 760px) { .lista { width: 100%; } .atd.com-chat .lista { display: none; } .atd:not(.com-chat) .chat { display: none; } .nav { padding: 0 8px; } .nav button { min-width: 48px; } .nav button b { display: none; } .marca-nav { width: 30px; } }

/* ===== Fase 1 ===== */

.tagchip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; color: #fff; white-space: nowrap; }
.tagchip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; font-size: 12px; line-height: 1; opacity: .8; }
.tagsbar { background: #fff; border-bottom: 1px solid var(--borda); padding: 6px 16px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 36px; }
.tagsbar select { width: auto; padding: 3px 8px; font-size: 12px; }
.proto { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: var(--muted); }
.st.pausado { background: #EDE7FB; color: #5b3cc4; }
.st.aguardando { background: #FFF1D6; color: #9a6400; }
.st.em_atendimento { background: #DDF3E6; color: #1f7a45; }
.st.finalizado { background: #EAEAEA; color: #555555; }
.filtros { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; background: #fff; padding: 14px; border-radius: var(--raio); margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.filtros label { margin: 0; }
.paginacao { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.interno { display: flex; height: 100%; }
.interno .pessoas { width: 280px; background: #fff; border-right: 1px solid var(--borda); overflow: auto; }
.interno .pessoa { padding: 11px 14px; border-bottom: 1px solid #EEEEEE; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.interno .pessoa.sel { background: var(--laranja-claro); }
.interno .conversa { flex: 1; display: flex; flex-direction: column; background: #ECECEC; }
.horario td input { width: 110px; }
.estrelas { color: #E3A008; letter-spacing: 1px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: #fff; border-radius: var(--raio); padding: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.kpi strong { display: block; font-size: 24px; }
.kpi span { font-size: 12px; color: var(--muted); }

/* Canal Grupos */
.barra-grupos { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--borda); background: #FAFAFA; font-size: 12.5px; }
.avatar.grupo { background: linear-gradient(180deg, #5AC8FA, #32ADE6); color: #fff; font-size: 18px; }
.msg .autor.grupo-autor { color: #0A84FF; }

/* ===== Modo escuro ===== */
.c-tema { --c: #5E5CE6; }
.ic .sol { display: none; }
html[data-tema="escuro"] .ic .lua { display: none; }
html[data-tema="escuro"] .ic .sol { display: inline; }
html[data-tema="escuro"] .c-tema { --c: #FF9F0A; }
html[data-tema="escuro"] {
  color-scheme: dark;
  --texto: #E8E8E8; --muted: #9A9A9A; --borda: #333; --fundo: #121212; --branco: #1E1E1E;
  --laranja-claro: #3A2A14; --nota: #3A3418; --azul: #5AA9F5;
}
html[data-tema="escuro"] .btn:hover, html[data-tema="escuro"] .icone:hover { background: #2A2A2A; }
html[data-tema="escuro"] .btn.primario:hover { background: linear-gradient(135deg, #E8850F, #F2A91E); }
html[data-tema="escuro"] .btn.perigo { border-color: #5a2a2a; }
html[data-tema="escuro"] input, html[data-tema="escuro"] select, html[data-tema="escuro"] textarea { background: #1A1A1A; }
html[data-tema="escuro"] input:focus, html[data-tema="escuro"] select:focus, html[data-tema="escuro"] textarea:focus { outline-color: #7a5410; }
html[data-tema="escuro"] label { color: #B5B5B5; }
html[data-tema="escuro"] .nav { background: #0B0B0B; }
html[data-tema="escuro"] .lista, html[data-tema="escuro"] .chat-topo, html[data-tema="escuro"] .compositor,
html[data-tema="escuro"] .aviso, html[data-tema="escuro"] .detalhe, html[data-tema="escuro"] table,
html[data-tema="escuro"] .card, html[data-tema="escuro"] .modal-box, html[data-tema="escuro"] .tagsbar,
html[data-tema="escuro"] .filtros, html[data-tema="escuro"] .interno .pessoas, html[data-tema="escuro"] .kpi,
html[data-tema="escuro"] .rapidas { background: #1E1E1E; }
html[data-tema="escuro"] .card .num div { background: #262626; }
html[data-tema="escuro"] .abas button span, html[data-tema="escuro"] .tag.cinza, html[data-tema="escuro"] .st.finalizado { background: #333; color: #C8C8C8; }
html[data-tema="escuro"] .abas button.ativo span { background: var(--grad); color: var(--escuro); }
html[data-tema="escuro"] .abas button.ativo { color: var(--amarelo); }
html[data-tema="escuro"] .item, html[data-tema="escuro"] th, html[data-tema="escuro"] td,
html[data-tema="escuro"] .interno .pessoa, html[data-tema="escuro"] .rapidas div { border-color: #2C2C2C; }
html[data-tema="escuro"] .item:hover, html[data-tema="escuro"] .hist:hover, html[data-tema="escuro"] tr.clicavel:hover td { background: #262626; }
html[data-tema="escuro"] th { background: #242424; }
html[data-tema="escuro"] .hist { border-color: #333; }
html[data-tema="escuro"] .avatar { background: #333; color: #CFCFCF; }
html[data-tema="escuro"] .avatar.grupo { background: linear-gradient(180deg, #5AC8FA, #32ADE6); color: #fff; }
html[data-tema="escuro"] .chat, html[data-tema="escuro"] .interno .conversa { background: #0F0F0F; }
html[data-tema="escuro"] .msg.entrada, html[data-tema="escuro"] .dia { background: #242424; }
html[data-tema="escuro"] .msg.saida { background: #5A3A0E; }
html[data-tema="escuro"] .msg .autor { color: var(--amarelo); }
html[data-tema="escuro"] .msg .autor.grupo-autor { color: #64B5FF; }
html[data-tema="escuro"] .msg .rodape { color: #A8A8A8; }
html[data-tema="escuro"] .msg .doc, html[data-tema="escuro"] .msg code { background: rgba(255,255,255,.08); }
html[data-tema="escuro"] .sistema { background: #1D2B3A; color: #A9C6E3; }
html[data-tema="escuro"] .nota { border-color: #7a6a20; }
html[data-tema="escuro"] .nota .autor, html[data-tema="escuro"] .compositor .modo button.ativo.n { color: #E3C860; }
html[data-tema="escuro"] .compositor .modo button.ativo { color: var(--amarelo); }
html[data-tema="escuro"] .barra-grupos { background: #191919; }
html[data-tema="escuro"] .st.conectado, html[data-tema="escuro"] .st.em_atendimento { background: #173a26; color: #6fdc9b; }
html[data-tema="escuro"] .st.desconectado { background: #3d1c1c; color: #f08a8a; }
html[data-tema="escuro"] .st.conectando, html[data-tema="escuro"] .st.aguardando { background: #3a2c10; color: #f2c46b; }
html[data-tema="escuro"] .st.pausado { background: #2a2245; color: #b9a6f5; }
html[data-tema="escuro"] .modal { background: rgba(0,0,0,.6); }
html[data-tema="escuro"] .toast { background: #2C2C2C; }
html[data-tema="escuro"] .login-box { background: #1E1E1E; }
html[data-tema="escuro"] .logo-login { background: #fff; border-radius: 12px; padding: 8px 12px; }

/* Busca de contato no "Iniciar conversa" */
.busca-contato { position: relative; }
.sugestoes { position: absolute; left: 0; right: 0; top: calc(100% - 6px); z-index: 5; background: #fff; border: 1px solid var(--borda); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.15); max-height: 280px; overflow: auto; }
.sugestoes div { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #F1F1F1; }
.sugestoes div:hover { background: var(--laranja-claro); }
.sugestoes small { display: block; color: var(--muted); }
.sugestoes p { margin: 0; padding: 10px 12px; }
html[data-tema="escuro"] .sugestoes { background: #242424; }
html[data-tema="escuro"] .sugestoes div { border-color: #2f2f2f; }
