:root {
  --azul-900: #0f0f10; --azul-800: #17181b; --azul-700: #2b2e33; --azul-100: #eef0f2;
  --laranja: #f2a900; --laranja-esc: #a87500; --laranja-100: #fff3d1;
  --fundo: #f5f5f4; --superficie: #ffffff; --linha: #e5e5e3; --tinta: #151618; --tinta-2: #55595f; --tinta-3: #8a8e94;
  --verde: #1e9a5f; --verde-100: #e2f4ea; --verm: #d23f3f; --verm-100: #fbe6e6; --amar: #b47b00; --amar-100: #fdf1d6; --roxo: #5b54c9; --roxo-100: #ebeafb;
  --raio: 14px; --sombra: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 18px rgba(0, 0, 0, .05);
  --fonte: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--fundo); color: var(--tinta); font: 14px/1.45 var(--fonte); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--azul-700); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }

/* marca */
.marca { display: flex; align-items: center; gap: 10px; }
.marca img { width: 38px; height: 38px; }
.marca b { display: block; font-size: 18px; font-weight: 800; line-height: 1; color: #fff; }
.marca span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #ff9f72; }
.marca.grande img { width: 52px; height: 52px; }
.marca.grande b { font-size: 26px; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-marca { background: radial-gradient(1000px 520px at -10% 110%, #3a3320 0, transparent 60%), linear-gradient(160deg, var(--azul-800), var(--azul-900));
  color: #dbe8ee; padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.login-marca h1 { color: #fff; font-size: 40px; line-height: 1.1; font-weight: 800; margin-top: 30px; }
.login-marca p { max-width: 460px; font-size: 16px; margin: 0; }
.login-marca ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 10px; }
.login-marca li::before { content: '✓'; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(242, 169, 0, .18); color: #f2a900; margin-right: 10px; font-weight: 800; font-size: 12px; }
.login-form { align-self: center; justify-self: center; width: min(380px, calc(100% - 32px)); display: grid; gap: 14px; padding: 24px 0; }
.login-form h2 { font-size: 28px; font-weight: 800; }
.login-form label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; color: var(--tinta-2); }
.login-form input { height: 46px; padding: 0 14px; border: 1px solid var(--linha); border-radius: 10px; background: #fff; }
.login-form input:focus { outline: 2px solid var(--laranja); outline-offset: 0; border-color: transparent; }
.dica { background: var(--azul-100); color: var(--azul-700); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.link-vitrine { font-weight: 700; text-decoration: none; }
.erro { color: var(--verm); margin: 0; min-height: 18px; font-weight: 600; }
.sutil { color: var(--tinta-3); margin: -8px 0 6px; }

/* botões */
.btn { border: 0; border-radius: 10px; padding: 0 16px; height: 40px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; text-decoration: none; }
.btn.prim { background: var(--laranja); color: #111; box-shadow: 0 4px 12px rgba(242, 169, 0, .28); }
.btn.prim:hover { background: var(--laranja-esc); }
.btn.sec { background: var(--superficie); color: var(--azul-800); border: 1px solid var(--linha); }
.btn.sec:hover { border-color: var(--azul-700); }
.btn.perigo { background: var(--verm-100); color: var(--verm); }
.btn.verde { background: var(--verde-100); color: var(--verde); }
.btn.peq { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.largo { width: 100%; height: 46px; font-size: 15px; }

/* app */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.lateral { background: linear-gradient(180deg, var(--azul-800), var(--azul-900)); padding: 22px 14px; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh; }
.lateral .marca { padding: 0 8px; }
.lateral nav { display: grid; gap: 4px; }
.lateral nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: #c3d5de; text-decoration: none; font-weight: 600; }
.lateral nav a i { font-style: normal; width: 22px; text-align: center; font-size: 16px; opacity: .85; }
.lateral nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.lateral nav a.ativo { background: var(--laranja); color: #111; box-shadow: 0 6px 16px rgba(242, 169, 0, .25); }
.vitrine-lnk { margin-top: auto; color: #f2a900; font-weight: 700; text-decoration: none; padding: 10px 12px; border: 1px dashed rgba(242, 169, 0, .45); border-radius: 10px; text-align: center; }
.principal { min-width: 0; display: flex; flex-direction: column; }
.topo { display: flex; align-items: center; gap: 14px; padding: 18px 28px; background: var(--superficie); border-bottom: 1px solid var(--linha); position: sticky; top: 0; z-index: 5; }
.topo h1 { font-size: 21px; font-weight: 800; }
.topo-dir { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.usuario { color: var(--tinta-2); font-weight: 600; }
.menu-btn { display: none; border: 0; background: none; font-size: 22px; cursor: pointer; }
main { padding: 24px 28px 48px; }

/* barra de ferramentas */
.barra { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.barra .busca { flex: 1 1 240px; max-width: 360px; height: 40px; padding: 0 14px 0 36px; border: 1px solid var(--linha); border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238796a0' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") 12px center no-repeat; }
.barra select { height: 40px; padding: 0 10px; border: 1px solid var(--linha); border-radius: 10px; background: #fff; }
.barra .esp { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--linha); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--tinta-2); }
.chips button.ativo { background: var(--azul-800); border-color: var(--azul-800); color: #fff; }

/* cards de números */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--superficie); border-radius: var(--raio); padding: 18px; box-shadow: var(--sombra); border: 1px solid var(--linha); position: relative; overflow: hidden; }
.kpi small { color: var(--tinta-3); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.kpi b { display: block; font-size: 26px; font-weight: 800; margin: 6px 0 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--tinta-2); font-size: 13px; }
.kpi::after { content: ''; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: var(--c, var(--azul-100)); opacity: .7; }
.kpi.l { --c: var(--laranja-100); } .kpi.v { --c: var(--verde-100); } .kpi.r { --c: var(--verm-100); } .kpi.r b { color: var(--verm); }

.grade2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
.bloco { background: var(--superficie); border-radius: var(--raio); box-shadow: var(--sombra); border: 1px solid var(--linha); padding: 18px; min-width: 0; }
.bloco h3 { font-size: 15px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bloco h3 a { font-size: 12px; font-weight: 700; text-decoration: none; color: var(--laranja-esc); }
.legenda { display: flex; gap: 14px; font-size: 12px; color: var(--tinta-2); margin-top: 6px; flex-wrap: wrap; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.barra-st { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--fundo); margin: 6px 0 12px; }
.lista-st { display: grid; gap: 8px; }
.lista-st div { display: flex; justify-content: space-between; font-weight: 600; }
.lista-st i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }

/* listas simples */
.itens { display: grid; gap: 2px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; }
.item:hover { background: var(--fundo); }
.item .data { width: 48px; text-align: center; background: var(--azul-100); color: var(--azul-800); border-radius: 10px; padding: 4px 0; font-weight: 800; line-height: 1.1; flex: 0 0 48px; }
.item .data small { display: block; font-size: 10px; text-transform: uppercase; font-weight: 700; }
.item .txt { min-width: 0; flex: 1; }
.item .txt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .txt span { color: var(--tinta-3); font-size: 12.5px; }
.item .val { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vazio { color: var(--tinta-3); padding: 18px 6px; text-align: center; }

/* etiquetas */
.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--azul-100); color: var(--azul-700); }
.tag.verde { background: var(--verde-100); color: var(--verde); } .tag.verm { background: var(--verm-100); color: var(--verm); }
.tag.amar { background: var(--amar-100); color: var(--amar); } .tag.roxo { background: var(--roxo-100); color: var(--roxo); } .tag.lar { background: var(--laranja-100); color: var(--laranja-esc); }
.tag.cinza { background: #eef1f3; color: var(--tinta-2); }

/* imóveis */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.imovel { background: var(--superficie); border-radius: var(--raio); overflow: hidden; border: 1px solid var(--linha); box-shadow: var(--sombra); cursor: pointer; transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.imovel:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(10, 43, 59, .14); }
.imovel .foto { position: relative; aspect-ratio: 16 / 10; }
.imovel .foto svg { width: 100%; height: 100%; display: block; }
.imovel .foto .tag { position: absolute; top: 10px; left: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.imovel .foto .cod { position: absolute; top: 10px; right: 10px; background: rgba(10, 43, 59, .75); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.imovel .corpo { padding: 14px 16px 16px; display: grid; gap: 6px; flex: 1; }
.imovel .corpo small { color: var(--laranja-esc); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.imovel .corpo b { font-size: 15px; line-height: 1.3; }
.imovel .corpo .bairro { color: var(--tinta-3); font-size: 13px; }
.specs { display: flex; gap: 12px; color: var(--tinta-2); font-size: 12.5px; font-weight: 600; flex-wrap: wrap; }
.precos { display: flex; justify-content: space-between; align-items: end; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--linha); gap: 8px; flex-wrap: wrap; }
.precos div small { display: block; color: var(--tinta-3); font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.precos div b { font-size: 16px; color: var(--azul-800); font-variant-numeric: tabular-nums; }

/* tabelas */
.tabela-wrap { background: var(--superficie); border-radius: var(--raio); border: 1px solid var(--linha); box-shadow: var(--sombra); overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--tinta-3); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--linha); background: #fafbfc; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--linha); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; } tbody tr:hover td { background: #fafcfd; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .sub { display: block; color: var(--tinta-3); font-size: 12.5px; }
.totais { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.totais div { background: var(--superficie); border: 1px solid var(--linha); border-radius: 12px; padding: 10px 16px; }
.totais small { display: block; color: var(--tinta-3); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.totais b { font-size: 18px; font-variant-numeric: tabular-nums; }

/* modal */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(760px, calc(100% - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 30px 80px rgba(10, 43, 59, .35); color: var(--tinta); }
dialog::backdrop { background: rgba(10, 30, 40, .5); backdrop-filter: blur(2px); }
.m-cab { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--linha); position: sticky; top: 0; background: #fff; z-index: 1; }
.m-cab h2 { font-size: 18px; font-weight: 800; flex: 1; }
.m-fechar { border: 0; background: var(--fundo); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 18px; }
.m-corpo { padding: 20px 22px; }
.m-rod { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--linha); background: #fafbfc; flex-wrap: wrap; position: sticky; bottom: 0; }
.m-rod .esq { margin-right: auto; }
.form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.form label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--tinta-2); grid-column: span var(--w, 1); }
.form :is(input, select, textarea) { height: 40px; padding: 0 12px; border: 1px solid var(--linha); border-radius: 9px; background: #fff; font-weight: 500; color: var(--tinta); width: 100%; }
.form textarea { height: 80px; padding: 10px 12px; resize: vertical; }
.form :is(input, select, textarea):focus { outline: 2px solid var(--laranja); border-color: transparent; }
.det-foto { border-radius: 14px; overflow: hidden; aspect-ratio: 21 / 8; margin-bottom: 16px; }
.det-foto svg { width: 100%; height: 100%; display: block; }
.det-grade { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.det-grade div { background: var(--fundo); border-radius: 10px; padding: 10px 12px; }
.det-grade small { display: block; color: var(--tinta-3); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.det-grade b { font-variant-numeric: tabular-nums; }
.det-txt { color: var(--tinta-2); margin: 0 0 8px; }
.sec-tit { font-size: 13px; font-weight: 800; color: var(--tinta-2); text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 8px; }
.mini td, .mini th { padding: 8px 10px; font-size: 13px; }

/* agenda */
.agenda { display: grid; gap: 18px; }
.dia h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--tinta-2); }
.dia h4.hoje { color: var(--laranja-esc); }
.visita { display: flex; align-items: center; gap: 14px; background: var(--superficie); border: 1px solid var(--linha); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--sombra); flex-wrap: wrap; }
.visita .hora { font-size: 18px; font-weight: 800; color: var(--azul-800); width: 56px; }
.visita .txt { flex: 1; min-width: 200px; }
.visita .txt span { display: block; color: var(--tinta-3); font-size: 12.5px; }
.visita .acoes { display: flex; gap: 6px; }

.aviso { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 30px); background: var(--azul-900); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 600; opacity: 0; transition: .25s; pointer-events: none; z-index: 100; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.aviso.on { opacity: 1; transform: translate(-50%, 0); }
.aviso.mal { background: var(--verm); }

@media (max-width: 1100px) { .grade2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-marca { padding: 36px 24px; } .login-marca h1 { font-size: 30px; margin-top: 10px; }
  .app { grid-template-columns: 1fr; }
  .lateral { position: fixed; z-index: 20; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .lateral.aberta { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .4); }
  .menu-btn { display: block; }
  .topo { padding: 14px 16px; } main { padding: 16px; }
  .form, .det-grade { grid-template-columns: repeat(2, 1fr); }
  .form label { grid-column: span min(var(--w, 1), 2); }
  .usuario { display: none; }
}

.tabela-wrap table { min-width: 820px; }
.mini { min-width: 0 !important; }

/* ===== v2: identidade Start (preto/grafite + âmbar) e telas novas ===== */
.logo-img { display: block; height: auto; }
.lateral .logo-img { width: 150px; margin: 2px 8px 0; }
.login-marca .logo-img { width: 260px; }
.lateral { gap: 18px; overflow-y: auto; }
.lateral nav { gap: 1px; }
.lateral nav a { padding: 8px 12px; font-size: 13.5px; }
.lateral nav b { display: block; color: #6f7379; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; margin: 12px 12px 4px; }
.lateral nav a .badge { margin-left: auto; background: var(--verm); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; font-style: normal; }
.kpi.a { --c: var(--laranja-100); }
.alertas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.alerta { flex: 1 1 220px; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--superficie); border: 1px solid var(--linha); text-decoration: none; color: var(--tinta); }
.alerta i { font-style: normal; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--laranja-100); color: var(--laranja-esc); flex: 0 0 34px; }
.alerta.r i { background: var(--verm-100); color: var(--verm); } .alerta.v i { background: var(--verde-100); color: var(--verde); }
.alerta span { color: var(--tinta-3); font-size: 12.5px; display: block; }
.periodo { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.periodo input[type=date] { height: 40px; border: 1px solid var(--linha); border-radius: 10px; padding: 0 10px; background: #fff; }
.atalhos { display: flex; gap: 2px; flex-wrap: wrap; }
.atalhos button { border: 0; background: transparent; color: var(--tinta-2); font-weight: 700; font-size: 12.5px; padding: 6px 9px; border-radius: 8px; cursor: pointer; }
.atalhos button:hover { background: #ebebea; }
.dre td, .dre th { padding: 7px 10px; font-size: 12.5px; white-space: nowrap; }
.dre td:first-child, .dre th:first-child { position: sticky; left: 0; background: #fff; min-width: 270px; white-space: normal; z-index: 1; }
.dre tr.grupo td { font-weight: 800; background: #fafaf9; }
.dre tr.total td { font-weight: 800; border-top: 2px solid var(--linha); }
.dre tr.final td { font-weight: 800; background: var(--azul-800); color: #fff; }
.dre tbody tr { cursor: default; }
.neg { color: var(--verm); }
.dre tr.final .neg { color: #ffb3b3; }
.contas-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.conta-card { background: var(--superficie); border: 2px solid var(--linha); border-radius: var(--raio); padding: 16px; cursor: pointer; box-shadow: var(--sombra); }
.conta-card.ativo { border-color: var(--laranja); }
.conta-card small { color: var(--tinta-3); font-weight: 700; font-size: 11px; text-transform: uppercase; }
.conta-card b { display: block; font-size: 22px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.conta-card span { color: var(--tinta-3); font-size: 12.5px; }
.secao-tit { font-size: 15px; font-weight: 800; margin: 22px 0 10px; display: flex; align-items: center; gap: 10px; }
tfoot td { font-weight: 800; background: #fafaf9; border-top: 2px solid var(--linha); }
.inter { display: flex; align-items: center; gap: 14px; background: linear-gradient(90deg, #ff7a00, #ff9a3c); color: #fff; border-radius: var(--raio); padding: 14px 18px; margin-bottom: 16px; flex-wrap: wrap; }
.inter b { font-size: 15px; } .inter span { opacity: .95; font-size: 13px; display: block; }
.inter .btn { margin-left: auto; background: #fff; color: #c25400; box-shadow: none; }
.boleto { border: 1px solid #222; border-radius: 6px; padding: 12px; font-size: 12px; background: #fff; }
.boleto .lin1 { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid #222; padding-bottom: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.boleto .lin1 b { font-size: 16px; color: #ff7a00; }
.boleto .lin1 .cod { font-size: 15px; font-weight: 800; border-left: 2px solid #222; border-right: 2px solid #222; padding: 0 10px; }
.boleto .lin1 .ld { font-family: 'Courier New', monospace; font-weight: 700; font-size: 13px; margin-left: auto; }
.boleto .grade { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #ccc; }
.boleto .grade div { border: 1px solid #ccc; padding: 5px 7px; } .boleto .grade small { display: block; color: #666; font-size: 10px; }
.boleto .barras { margin-top: 10px; height: 54px; width: 100%; }
.pix { display: flex; gap: 14px; align-items: center; margin-top: 12px; background: var(--fundo); border-radius: 10px; padding: 10px; }
.pix code { font-size: 10.5px; word-break: break-all; color: var(--tinta-2); }
.marca-sim { display: inline-block; background: var(--amar-100); color: var(--amar); border-radius: 6px; padding: 2px 8px; font-weight: 800; font-size: 11px; }
.chat { display: grid; grid-template-columns: 320px 1fr; gap: 16px; height: calc(100vh - 150px); min-height: 460px; }
.chat-lista { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); overflow: auto; }
.chat-item { padding: 12px 14px; border-bottom: 1px solid var(--linha); cursor: pointer; display: grid; gap: 2px; }
.chat-item:hover, .chat-item.ativo { background: #fafaf6; }
.chat-item.ativo { box-shadow: inset 3px 0 0 var(--laranja); }
.chat-item span { color: var(--tinta-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .nl { justify-self: start; background: var(--verm); color: #fff; font-size: 11px; border-radius: 99px; padding: 0 7px; font-weight: 700; }
.chat-janela { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); display: flex; flex-direction: column; min-width: 0; }
.chat-cab { padding: 14px 18px; border-bottom: 1px solid var(--linha); }
.chat-cab span { display: block; color: var(--tinta-3); font-size: 12.5px; }
.chat-msgs { flex: 1; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: #fbfbfa; }
.msg { max-width: 72%; padding: 9px 13px; border-radius: 14px; background: #fff; border: 1px solid var(--linha); align-self: flex-start; }
.msg.eu { align-self: flex-end; background: var(--azul-800); color: #fff; border-color: var(--azul-800); }
.msg small { display: block; font-size: 10.5px; opacity: .6; margin-top: 3px; }
.chat-envio { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--linha); }
.chat-envio input { flex: 1; height: 42px; border: 1px solid var(--linha); border-radius: 10px; padding: 0 12px; }
.grafico-svg { width: 100%; height: auto; display: block; }
.imprimir-cab { display: none; }
.grade3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .grade3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .chat { grid-template-columns: 1fr; height: auto; } .chat-msgs { min-height: 320px; } }
@media print {
  .lateral, .topo, .barra, .no-print, .alertas { display: none !important; }
  .app { display: block; } main { padding: 0; } body { background: #fff; }
  .imprimir-cab { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 14px; }
  .imprimir-cab img { width: 150px; }
  .tabela-wrap, .bloco, .kpi { box-shadow: none; } .tabela-wrap table { min-width: 0 !important; }
  th, td { padding: 5px 7px; font-size: 11px; }
}
