/* CRM Hauser Imóveis — estilos */
@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url(../fonts/montserrat-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url(../fonts/montserrat-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url(../fonts/montserrat-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url(../fonts/montserrat-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url(../fonts/inter-latin-700-normal.woff2) format('woff2'); }

:root {
  --marca: #5E5F55; --marca-esc: #3F4038; --marca-esc2: #2E2F29; --marca-clara: #EDECE6;
  --fundo: #F5F4F0; --sup: #FFFFFF; --sup2: #FAF9F6; --borda: #E8E6DF; --borda2: #D9D6CC;
  --texto: #1F201A; --texto2: #5C5D53; --texto3: #8F9085;
  --destaque: #B08D57; --destaque-claro: #F6EFE2;
  --ok: #1F7A4A; --ok-claro: #E4F3EA; --alerta: #A0650E; --alerta-claro: #FCF1DD;
  --perigo: #B23A2A; --perigo-claro: #FBE8E4; --info: #2F6A94; --info-claro: #E6F0F8;
  --dado1: #1F8A70; --dado2: #C9792A;
  --raio: 14px; --raio-p: 10px;
  --sombra: 0 1px 2px rgba(31, 32, 26, .04), 0 2px 8px rgba(31, 32, 26, .03);
  --sombra-g: 0 20px 50px rgba(31, 32, 26, .18), 0 4px 12px rgba(31, 32, 26, .08);
  --fonte: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fonte-titulo: 'Montserrat', var(--fonte);
  --lateral: 252px;
  --h-ctl: 38px; --h-ctl-p: 32px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--fonte); font-size: 14px; line-height: 1.45; color: var(--texto); background: var(--fundo); -webkit-font-smoothing: antialiased; }
a { color: var(--marca-esc); }
h1, h2, h3, h4 { font-family: var(--fonte-titulo); margin: 0; color: var(--texto); letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--texto2); }
.sutil { color: var(--texto3); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* ---------- Carregamento ---------- */
.carregando { display: grid; place-items: center; min-height: 160px; color: var(--texto3); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--borda); border-top-color: var(--marca); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-marca { background: var(--marca); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; position: relative; overflow: hidden; }
.login-marca img { width: min(340px, 80%); }
.login-marca .frase { font-family: var(--fonte-titulo); font-size: 26px; font-weight: 500; line-height: 1.3; max-width: 420px; opacity: .95; }
.login-marca .frase small { display: block; font-family: var(--fonte); font-size: 14px; font-weight: 400; opacity: .75; margin-top: 12px; }
.login-marca::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border: 2px solid rgba(255,255,255,.08); border-radius: 50%; }
.login-form { display: grid; place-items: center; padding: 32px; }
.login-form form { width: 100%; max-width: 360px; }
.login-form h1 { font-size: 24px; margin-bottom: 6px; }
.login-form p.muted { margin: 0 0 28px; }
.login-form .campo { margin-bottom: 16px; }
.login-form .btn { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.login-rodape { margin-top: 28px; font-size: 12px; color: var(--texto3); text-align: center; }
@media (max-width: 820px) {
  .login { grid-template-columns: 1fr; }
  .login-marca { padding: 28px 24px; min-height: 0; }
  .login-marca img { width: 220px; }
  .login-marca .frase { display: none; }
}

/* ---------- Estrutura ---------- */
.app { display: flex; min-height: 100vh; }
.lateral { width: var(--lateral); background: var(--marca); color: #fff; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; }
.lateral .logo { padding: 26px 22px 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.lateral .logo img { width: 168px; display: block; }
.lateral nav { padding: 14px 10px; flex: 1; overflow-y: auto; }
.lateral nav .grupo { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; opacity: .55; padding: 14px 12px 6px; font-weight: 600; }
.lateral nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: rgba(255,255,255,.82); text-decoration: none; font-weight: 500; margin-bottom: 2px; }
.lateral nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.lateral nav a.ativo { background: rgba(255,255,255,.15); color: #fff; }
.lateral nav a svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.lateral nav a .contador { margin-left: auto; background: var(--perigo); color: #fff; font-size: 11px; font-weight: 600; border-radius: 10px; padding: 1px 7px; }
.lateral .usuario { border-top: 1px solid rgba(255,255,255,.1); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.lateral .usuario .info { flex: 1; min-width: 0; }
.lateral .usuario .nome { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lateral .usuario .papel { font-size: 11.5px; opacity: .65; }
.lateral .usuario button { background: none; border: 0; color: rgba(255,255,255,.75); cursor: pointer; padding: 6px; border-radius: 6px; }
.lateral .usuario button:hover { background: rgba(255,255,255,.1); color: #fff; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12.5px; background: rgba(255,255,255,.18); color: #fff; flex: none; }
.avatar.p { width: 24px; height: 24px; font-size: 10px; background: var(--marca-clara); color: var(--marca-esc); }
.principal { margin-left: var(--lateral); flex: 1; min-width: 0; }
.topo-movel { display: none; }
.conteudo { padding: 28px 32px 48px; max-width: 1440px; }
.cabecalho { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.cabecalho h1 { margin-right: auto; }
.cabecalho .sub { width: 100%; margin-top: -6px; color: var(--texto2); }
.voltar { display: inline-flex; align-items: center; gap: 6px; color: var(--texto2); text-decoration: none; font-size: 13px; margin-bottom: 10px; }
.voltar:hover { color: var(--texto); }
.fundo-escuro { display: none; }

@media (max-width: 960px) {
  .lateral { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--sombra-g); }
  body.menu-aberto .lateral { transform: none; }
  body.menu-aberto .fundo-escuro { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
  .principal { margin-left: 0; }
  .topo-movel { display: flex; align-items: center; gap: 12px; background: var(--marca); color: #fff; padding: 10px 14px; position: sticky; top: 0; z-index: 30; }
  .topo-movel img { height: 26px; }
  .topo-movel button { background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
  .conteudo { padding: 18px 14px 40px; }
}

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--raio-p); border: 1px solid var(--borda2); background: var(--sup); color: var(--texto); font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.3; }
.btn:hover { background: var(--sup2); border-color: var(--texto3); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primario { background: var(--marca-esc); border-color: var(--marca-esc); color: #fff; }
.btn.primario:hover { background: var(--marca-esc2); }
.btn.perigo { color: var(--perigo); }
.btn.perigo:hover { background: var(--perigo-claro); border-color: var(--perigo); }
.btn.perigo.cheio { background: var(--perigo); border-color: var(--perigo); color: #fff; }
.btn.whats { background: #1E9E57; border-color: #1E9E57; color: #fff; }
.btn.whats:hover { background: #17864A; }
.btn.fantasma { border-color: transparent; background: transparent; }
.btn.fantasma:hover { background: var(--marca-clara); }
.btn.p { padding: 5px 10px; font-size: 13px; }
.btn.icone { padding: 7px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- Formulários ---------- */
.campo { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.campo label, .rotulo { font-size: 12.5px; font-weight: 500; color: var(--texto2); }
.campo .ajuda { font-size: 12px; color: var(--texto3); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--borda2); border-radius: var(--raio-p); background: var(--sup); min-height: 37px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(100,100,90,.35); outline-offset: 0; border-color: var(--marca); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; }
.grade { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); }
.c12 { grid-column: span 12; } .c8 { grid-column: span 8; } .c6 { grid-column: span 6; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; } .c2 { grid-column: span 2; }
@media (max-width: 720px) { .c8, .c6, .c4, .c3 { grid-column: span 12; } .c2 { grid-column: span 6; } }
.secao-form { grid-column: span 12; font-family: var(--fonte-titulo); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--texto3); font-weight: 600; padding-top: 8px; border-top: 1px solid var(--borda); margin-top: 4px; }
.secao-form:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--marca-esc); }
.erro-form { background: var(--perigo-claro); color: var(--perigo); border-radius: var(--raio-p); padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filtros input, .filtros select { width: auto; min-width: 150px; }
.filtros input[type=search] { min-width: 240px; flex: 1; max-width: 360px; }
@media (max-width: 720px) { .filtros input, .filtros select, .filtros input[type=search] { min-width: 0; flex: 1 1 140px; max-width: none; } }

/* ---------- Cartões ---------- */
.cartao { background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); }
.cartao > .topo { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--borda); }
.cartao > .topo h2 { font-size: 14.5px; margin-right: auto; }
.cartao > .corpo { padding: 16px 18px; }
.cartao > .corpo.sem-pad { padding: 0; }
.vazio { text-align: center; color: var(--texto3); padding: 28px 16px; }
.vazio svg { width: 34px; height: 34px; opacity: .5; display: block; margin: 0 auto 8px; }
.colunas { display: grid; gap: 18px; grid-template-columns: repeat(12, 1fr); align-items: start; }
.colunas > * { grid-column: span 12; min-width: 0; }
@media (min-width: 1100px) { .colunas .l8 { grid-column: span 8; } .colunas .l4 { grid-column: span 4; } .colunas .l6 { grid-column: span 6; } .colunas .l7 { grid-column: span 7; } .colunas .l5 { grid-column: span 5; } }
@media (min-width: 760px) and (max-width: 1099px) { .colunas .m6 { grid-column: span 6; } }

/* ---------- Indicadores ---------- */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); margin-bottom: 18px; }
.kpi { background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); padding: 16px 18px; box-shadow: var(--sombra); }
.kpi .rot { font-size: 12.5px; color: var(--texto2); font-weight: 500; }
.kpi .val { font-family: var(--fonte-titulo); font-size: 26px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .det { font-size: 12.5px; color: var(--texto3); margin-top: 2px; }
.kpi .det .sobe { color: var(--ok); font-weight: 600; } .kpi .det .desce { color: var(--perigo); font-weight: 600; }
.kpi.alerta { border-color: #EBC9C2; background: #FFFBFA; } .kpi.alerta .val { color: var(--perigo); }

/* ---------- Etiquetas ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; border-radius: 20px; padding: 2px 9px; background: var(--marca-clara); color: var(--marca-esc); white-space: nowrap; }
.tag.ok { background: var(--ok-claro); color: var(--ok); } .tag.alerta { background: var(--alerta-claro); color: var(--alerta); }
.tag.perigo { background: var(--perigo-claro); color: var(--perigo); } .tag.info { background: var(--info-claro); color: var(--info); }
.tag.destaque { background: var(--destaque-claro); color: #85663E; }
.tag.contorno { background: transparent; border: 1px solid var(--borda2); color: var(--texto2); }
.temp { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.temp.quente { background: #D2452B; } .temp.morno { background: #D69A27; } .temp.frio { background: #5B8DB8; }

/* ---------- Tabelas ---------- */
.tabela-wrap { overflow-x: auto; }
table.tabela { width: 100%; border-collapse: collapse; }
.tabela th { text-align: left; font-size: 12px; font-weight: 600; color: var(--texto2); padding: 10px 14px; border-bottom: 1px solid var(--borda); background: var(--sup2); white-space: nowrap; }
.tabela td { padding: 11px 14px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tr.clicavel { cursor: pointer; } .tabela tr.clicavel:hover td { background: var(--sup2); }
.tabela .dir { text-align: right; }
.tabela .forte { font-weight: 600; }
.paginacao { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--borda); color: var(--texto2); font-size: 13px; }

/* ---------- Listas ---------- */
.lista { list-style: none; margin: 0; padding: 0; }
.lista > li { display: flex; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--borda); }
.lista > li:last-child { border-bottom: 0; }
.lista > li .meio { flex: 1; min-width: 0; }
.lista > li .tit { font-weight: 500; }
.lista > li .sub { font-size: 12.5px; color: var(--texto2); }
.lista > li.clicavel { cursor: pointer; } .lista > li.clicavel:hover { background: var(--sup2); }
.icone-tipo { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--marca-clara); color: var(--marca-esc); }
.icone-tipo svg { width: 16px; height: 16px; }
.icone-tipo.visita { background: var(--destaque-claro); color: #85663E; }
.icone-tipo.ligacao, .icone-tipo.whatsapp { background: var(--ok-claro); color: var(--ok); }
.icone-tipo.atrasada { background: var(--perigo-claro); color: var(--perigo); }

/* ---------- Barras simples (gráficos) ---------- */
.barras { display: flex; flex-direction: column; gap: 10px; }
.barra-linha { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.barra-linha .nome { color: var(--texto2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-linha .trilho { height: 14px; background: var(--fundo); border-radius: 4px; overflow: hidden; }
.barra-linha .preench { height: 100%; background: var(--dado1); border-radius: 0 4px 4px 0; min-width: 2px; }
.barra-linha .valor { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 28px; text-align: right; }
.grafico-colunas { position: relative; }
.grafico-colunas svg { width: 100%; height: auto; display: block; overflow: visible; }
.legenda { display: flex; gap: 16px; font-size: 12.5px; color: var(--texto2); margin-bottom: 8px; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dica { position: absolute; pointer-events: none; background: var(--texto); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: var(--sombra-g); }

/* ---------- Funil (kanban) ---------- */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: calc(100vh - 220px); }
.coluna { flex: 0 0 256px; background: #ECEBE5; border-radius: var(--raio); display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
.coluna.ganho { background: #E4EFE7; } .coluna.perdido { background: #F3E7E4; }
.coluna > header { padding: 12px 12px 8px; }
.coluna > header .nome { font-family: var(--fonte-titulo); font-weight: 600; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.coluna > header .nome .qtd { background: rgba(0,0,0,.07); border-radius: 10px; padding: 0 7px; font-size: 11.5px; font-family: var(--fonte); }
.coluna > header .soma { font-size: 12px; color: var(--texto2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.coluna .cartoes { padding: 4px 8px 10px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.coluna.sobre { outline: 2px dashed var(--marca); outline-offset: -3px; }
.card-neg { background: var(--sup); border-radius: 8px; padding: 10px 11px; box-shadow: 0 1px 2px rgba(0,0,0,.08); cursor: pointer; border: 1px solid transparent; }
.card-neg:hover { border-color: var(--borda2); }
.card-neg.arrastando { opacity: .4; }
.card-neg .l1 { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.card-neg .l1 .n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-neg .imv { font-size: 12.5px; color: var(--texto2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-neg .valor { font-weight: 600; font-size: 13px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.card-neg .l3 { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11.5px; color: var(--texto3); flex-wrap: wrap; }
.card-neg .l3 .tag { font-size: 10.5px; padding: 1px 7px; }
.card-neg .l3 .avatar { margin-left: auto; }

/* ---------- Painel lateral (gaveta) e modal ---------- */
.sobreposicao { position: fixed; inset: 0; background: rgba(30, 30, 24, .42); z-index: 60; display: flex; animation: aparece .15s ease; }
@keyframes aparece { from { opacity: 0; } }
.modal { background: var(--sup); border-radius: 14px; box-shadow: var(--sombra-g); margin: auto; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: sobe .18s ease; }
.modal.grande { width: min(900px, calc(100vw - 24px)); }
@keyframes sobe { from { transform: translateY(10px); opacity: .6; } }
.modal > header, .gaveta > header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--borda); }
.modal > header h2, .gaveta > header h2 { margin-right: auto; font-size: 16px; }
.modal > .corpo { padding: 18px 20px; overflow-y: auto; }
.modal > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--borda); background: var(--sup2); border-radius: 0 0 14px 14px; }
.fechar { background: none; border: 0; cursor: pointer; color: var(--texto2); padding: 6px; border-radius: 6px; display: grid; }
.fechar:hover { background: var(--fundo); }
.fechar svg { width: 18px; height: 18px; }
.sobreposicao.lado { justify-content: flex-end; }
.gaveta { background: var(--fundo); width: min(720px, 100vw); height: 100%; display: flex; flex-direction: column; box-shadow: var(--sombra-g); animation: entra .2s ease; }
@keyframes entra { from { transform: translateX(30px); opacity: .5; } }
.gaveta > header { background: var(--sup); }
.gaveta > .corpo { overflow-y: auto; padding: 18px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.gaveta > .corpo > * { flex-shrink: 0; }
.etapas { display: flex; gap: 4px; overflow-x: auto; }
.etapas button { flex: 1; min-width: 92px; border: 0; background: var(--marca-clara); color: var(--texto2); font-size: 11.5px; font-weight: 600; padding: 8px 6px; cursor: pointer; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%); line-height: 1.2; }
.etapas button:first-child { clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); border-radius: 6px 0 0 6px; }
.etapas button.feita { background: #CFCDC2; color: var(--texto); }
.etapas button.atual { background: var(--marca-esc); color: #fff; }
.etapas button.ganho.atual { background: var(--ok); } .etapas button.perdido.atual { background: var(--perigo); }
.etapas button:hover:not(.atual) { background: var(--borda2); }

/* ---------- Linha do tempo ---------- */
.tempo { list-style: none; margin: 0; padding: 0; }
.tempo li { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.tempo li:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 44px; bottom: -4px; width: 1px; background: var(--borda); }
.tempo .desc { white-space: pre-wrap; word-break: break-word; }
.tempo .quando { font-size: 12px; color: var(--texto3); }
.tempo li.sistema .desc { color: var(--texto2); font-size: 13px; }
.nova-ativ { display: flex; flex-direction: column; gap: 8px; }
.nova-ativ .tipos { display: flex; gap: 6px; flex-wrap: wrap; }
.nova-ativ .tipos button { border: 1px solid var(--borda2); background: var(--sup); border-radius: 20px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; }
.nova-ativ .tipos button.sel { background: var(--marca-esc); color: #fff; border-color: var(--marca-esc); }

/* ---------- Imóveis ---------- */
.grade-imoveis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card-imovel { background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden; cursor: pointer; box-shadow: var(--sombra); display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease; }
.card-imovel:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(30,30,20,.1); }
.card-imovel .foto { aspect-ratio: 4 / 3; background: var(--marca-clara) center / cover no-repeat; position: relative; display: grid; place-items: center; color: var(--texto3); }
.card-imovel .foto svg { width: 46px; height: 46px; opacity: .45; }
.card-imovel .foto .selos { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.card-imovel .foto .selos .tag { box-shadow: 0 1px 3px rgba(0,0,0,.15); background: rgba(255,255,255,.95); }
.card-imovel .foto .selos .tag.ok { background: var(--ok-claro); } .card-imovel .foto .selos .tag.alerta { background: var(--alerta-claro); }
.card-imovel .foto .selos .tag.perigo { background: var(--perigo-claro); } .card-imovel .foto .selos .tag.info { background: var(--info-claro); }
.card-imovel .info-card { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-imovel .cod { font-size: 11.5px; color: var(--texto3); font-weight: 600; letter-spacing: .04em; }
.card-imovel .tit { font-weight: 600; line-height: 1.3; }
.card-imovel .local { font-size: 12.5px; color: var(--texto2); }
.card-imovel .preco { font-family: var(--fonte-titulo); font-weight: 600; font-size: 16.5px; margin-top: 4px; }
.card-imovel .preco small { font-family: var(--fonte); font-weight: 500; font-size: 12px; color: var(--texto2); }
.carac { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--texto2); margin-top: 6px; }
.carac span { display: inline-flex; align-items: center; gap: 4px; }
.carac svg { width: 14px; height: 14px; opacity: .7; }
.galeria { display: flex; flex-direction: column; gap: 8px; }
.galeria .principal-foto { aspect-ratio: 16 / 10; background: var(--marca-clara) center / cover no-repeat; border-radius: var(--raio); display: grid; place-items: center; color: var(--texto3); }
.galeria .principal-foto svg { width: 60px; height: 60px; opacity: .4; }
.galeria .miniaturas { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.galeria .mini { flex: 0 0 92px; aspect-ratio: 4/3; border-radius: 6px; background: center / cover no-repeat; cursor: pointer; border: 2px solid transparent; position: relative; }
.galeria .mini.sel { border-color: var(--marca-esc); }
.galeria .mini .acoes-foto { position: absolute; right: 3px; top: 3px; display: none; gap: 3px; }
.galeria .mini:hover .acoes-foto { display: flex; }
.galeria .mini .acoes-foto button { border: 0; background: rgba(0,0,0,.65); color: #fff; border-radius: 4px; font-size: 10px; padding: 2px 5px; cursor: pointer; }
.dados-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 18px; }
.dados-lista .rot { font-size: 12px; color: var(--texto3); }
.dados-lista .v { font-weight: 500; word-break: break-word; }

/* ---------- Abas ---------- */
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--borda); margin-bottom: 18px; overflow-x: auto; }
.abas a, .abas button { padding: 10px 14px; text-decoration: none; color: var(--texto2); font-weight: 500; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.abas a.ativo, .abas button.ativo { color: var(--texto); border-bottom-color: var(--marca-esc); }
.pilulas { display: inline-flex; background: var(--marca-clara); padding: 3px; border-radius: 8px; gap: 2px; flex-wrap: wrap; }
.pilulas button { border: 0; background: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; color: var(--texto2); font-size: 13px; }
.pilulas button.ativo { background: var(--sup); color: var(--texto); box-shadow: var(--sombra); }
.pilulas button .n { font-size: 11px; background: var(--perigo); color: #fff; border-radius: 9px; padding: 0 6px; margin-left: 4px; }

/* ---------- Busca com sugestões ---------- */
.autocomp { position: relative; }
.autocomp .sugestoes { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--sup); border: 1px solid var(--borda2); border-radius: var(--raio-p); box-shadow: var(--sombra-g); z-index: 5; max-height: 260px; overflow-y: auto; }
.autocomp .sugestoes div { padding: 8px 11px; cursor: pointer; border-bottom: 1px solid var(--borda); }
.autocomp .sugestoes div:last-child { border-bottom: 0; }
.autocomp .sugestoes div:hover, .autocomp .sugestoes div.foco { background: var(--sup2); }
.autocomp .sugestoes small { display: block; color: var(--texto3); }
.escolhido { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--borda2); border-radius: var(--raio-p); background: var(--sup2); min-height: 37px; }
.escolhido .n { flex: 1; font-weight: 500; }

/* ---------- Avisos ---------- */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--texto); color: #fff; padding: 11px 16px; border-radius: 8px; box-shadow: var(--sombra-g); max-width: 380px; animation: sobe .2s ease; }
.toast.erro { background: var(--perigo); } .toast.ok { background: var(--ok); }
.aviso { padding: 11px 14px; border-radius: var(--raio-p); background: var(--info-claro); color: var(--info); font-size: 13px; }
.aviso.alerta { background: var(--alerta-claro); color: var(--alerta); }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sep { height: 1px; background: var(--borda); margin: 4px 0; }
.texto-pre { white-space: pre-wrap; }

@media (max-width: 600px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .val { font-size: 22px; }
  .cabecalho h1 { width: 100%; }
  .gaveta > .corpo { padding: 14px 12px 40px; }
}

/* ---------- Documentação ---------- */
.progresso { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.progresso .trilho { flex: 1; height: 8px; background: var(--fundo); border-radius: 4px; overflow: hidden; min-width: 60px; }
.progresso .preench { height: 100%; background: var(--dado1); border-radius: 4px; }
.grupo-doc { border-bottom: 1px solid var(--borda); }
.grupo-tit { font-family: var(--fonte-titulo); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--texto3); font-weight: 600; padding: 12px 18px 4px; }
.item-doc { display: grid; grid-template-columns: 138px 1fr auto auto; gap: 12px; align-items: center; padding: 9px 18px; border-left: 3px solid transparent; }
.item-doc + .item-doc { border-top: 1px dashed var(--borda); }
.item-doc .nome { font-weight: 500; }
.item-doc.st-dispensado .nome { color: var(--texto3); text-decoration: line-through; }
.item-doc .sub { font-size: 12.5px; color: var(--texto2); }
.item-doc.st-recebido { border-left-color: var(--info); }
.item-doc.st-aprovado { border-left-color: var(--ok); }
.item-doc.st-reprovado { border-left-color: var(--perigo); background: #FFFBFA; }
.item-doc.st-solicitado { border-left-color: var(--alerta); }
.sel-status { font-size: 12.5px; font-weight: 600; padding: 5px 8px; min-height: 0; border-radius: 20px; }
.st-pendente .sel-status { background: var(--sup2); color: var(--texto2); }
.st-solicitado .sel-status { background: var(--alerta-claro); color: var(--alerta); border-color: #EBD3A8; }
.st-recebido .sel-status { background: var(--info-claro); color: var(--info); border-color: #BED3E3; }
.st-aprovado .sel-status { background: var(--ok-claro); color: var(--ok); border-color: #BCDCC7; }
.st-reprovado .sel-status { background: var(--perigo-claro); color: var(--perigo); border-color: #EBC9C2; }
.st-dispensado .sel-status { color: var(--texto3); }
.validade { display: flex; flex-direction: column; font-size: 10.5px; color: var(--texto3); }
.validade input { min-height: 0; padding: 3px 6px; font-size: 12px; width: 128px; }
.acoes-item { display: flex; gap: 2px; }
.acoes-item .btn svg { width: 15px; height: 15px; }
.arquivos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.arquivo { display: inline-flex; align-items: center; gap: 2px; background: var(--fundo); border: 1px solid var(--borda); border-radius: 6px; font-size: 12px; max-width: 100%; }
.arquivo a { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 8px; text-decoration: none; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.arquivo a:hover { text-decoration: underline; }
.arquivo .x { border: 0; background: none; color: var(--texto3); cursor: pointer; padding: 3px 7px; font-size: 11px; }
.arquivo .x:hover { color: var(--perigo); }
.novo-item { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--borda); flex-wrap: wrap; }
.novo-item input { flex: 1 1 240px; }
.novo-item select { width: auto; flex: 0 1 220px; }
.grade-adv { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.cartao.inativo { opacity: .65; }
@media (max-width: 720px) {
  .item-doc { grid-template-columns: 1fr auto; }
  .item-doc .sel-status { grid-column: 1 / -1; justify-self: start; }
  .item-doc .validade { grid-column: 1; }
}
.copiavel { display: flex; gap: 8px; align-items: center; background: var(--fundo); border: 1px solid var(--borda); border-radius: var(--raio-p); padding: 6px 6px 6px 10px; }
.copiavel code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.mov-cnj { list-style: none; margin: 0; padding: 0; }
.mov-cnj li { display: grid; grid-template-columns: 88px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--borda); font-size: 13px; }
.mov-cnj li:last-child { border-bottom: 0; }
.mov-cnj .dt { color: var(--texto3); font-variant-numeric: tabular-nums; }

/* ---------- Instagram ---------- */
.ig-direct { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 18px; align-items: start; }
.ig-lista .corpo { max-height: 68vh; overflow-y: auto; }
.ig-lista li.sel { background: var(--marca-clara); }
.ig-previa { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-chat { display: flex; flex-direction: column; min-height: 420px; }
.ig-chat > .topo { flex-wrap: wrap; gap: 10px; }
.ig-resp { padding: 10px 18px 0; max-width: 320px; }
.ig-resp .campo { margin: 0; }
.ig-msgs { flex: 1; overflow-y: auto; max-height: 56vh; min-height: 240px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; background: var(--sup2); }
.ig-msg { display: flex; flex-direction: column; max-width: 78%; }
.ig-msg.entrada { align-self: flex-start; }
.ig-msg.saida { align-self: flex-end; align-items: flex-end; }
.ig-msg .balao { padding: 8px 12px; border-radius: 16px; white-space: pre-wrap; word-break: break-word; background: var(--sup); border: 1px solid var(--borda); }
.ig-msg.saida .balao { background: var(--marca-esc); color: #fff; border-color: var(--marca-esc); }
.ig-msg.saida .balao a { color: #fff; }
.ig-msg .anexo { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 2px; }
.ig-msg .anexo svg { width: 15px; height: 15px; }
.ig-msg .sutil { margin-top: 2px; font-size: 11px; }
.ig-enviar { display: flex; gap: 10px; align-items: flex-end; padding: 12px 18px; border-top: 1px solid var(--borda); }
.ig-enviar textarea { flex: 1; resize: vertical; min-height: 44px; padding: 9px 11px; border: 1px solid var(--borda2); border-radius: var(--raio-p); background: var(--sup); }
.ig-com { align-items: flex-start !important; }
.ig-texto { margin: 3px 0; white-space: pre-wrap; }
.ig-resp-com { margin-top: 8px; }
.ig-resp-com textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--borda2); border-radius: var(--raio-p); margin-bottom: 6px; }
.ig-posts > li { align-items: flex-start; flex-wrap: wrap; }
.ig-thumb { width: 56px; height: 56px; border-radius: 8px; background: var(--marca-clara) center/cover; position: relative; flex-shrink: 0; }
.ig-thumb span { position: absolute; right: 4px; top: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; font-weight: 600; border-radius: 10px; padding: 0 6px; }
.ig-pub-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ig-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-top: 6px; }
.ig-foto { aspect-ratio: 1; border-radius: 8px; border: 2px solid transparent; background: var(--marca-clara) center/cover; cursor: pointer; position: relative; opacity: .55; padding: 0; }
.ig-foto.sel { opacity: 1; border-color: var(--marca-esc); }
.ig-foto span { position: absolute; top: 4px; left: 4px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--marca-esc); color: #fff; font-size: 11.5px; font-weight: 700; display: none; align-items: center; justify-content: center; }
.ig-foto.sel span { display: flex; }
.ig-publicar textarea { width: 100%; font-size: 13.5px; line-height: 1.5; }
.ig-publicar .campo label.check { display: inline-flex; margin-right: 16px; }
.dados-lista .v.perigo { color: var(--perigo); }
@media (max-width: 900px) {
  .ig-direct, .ig-pub-grade { grid-template-columns: 1fr; }
  .ig-lista .corpo { max-height: 40vh; }
  .ig-msg { max-width: 92%; }
}
.ig-publicar .campo { margin-bottom: 12px; }


/* =====================================================================
   Visual moderno: controles com altura única, alinhamento e acabamento
   ===================================================================== */
body { font-size: 14px; letter-spacing: -.003em; }
h1 { font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
h2 { font-weight: 600; letter-spacing: -.01em; }
::selection { background: #E3DCCB; }

/* Lateral */
.lateral { background: linear-gradient(180deg, #45463D 0%, #34352E 100%); box-shadow: 1px 0 0 rgba(0,0,0,.08); }
.lateral .logo { padding: 26px 24px 22px; border-bottom-color: rgba(255,255,255,.07); }
.lateral nav { padding: 12px 12px; }
.lateral nav .grupo { font-size: 10.5px; letter-spacing: .16em; opacity: .45; padding: 16px 12px 6px; }
.lateral nav a { height: 40px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; position: relative; color: rgba(255,255,255,.78); transition: background .15s, color .15s; }
.lateral nav a.ativo { background: rgba(255,255,255,.12); color: #fff; }
.lateral nav a.ativo::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--destaque); }
.lateral nav a .contador { min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; border-radius: 10px; font-size: 11px; }
.lateral .usuario { padding: 14px 16px; border-top-color: rgba(255,255,255,.07); }
.lateral .usuario .avatar { background: rgba(255,255,255,.14); }
.lateral .usuario button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 9px; }

/* Conteúdo e cabeçalho das telas */
.conteudo { padding: 32px 36px 56px; max-width: 1480px; }
.cabecalho { gap: 10px; margin-bottom: 24px; min-height: var(--h-ctl); }
.cabecalho h1 { line-height: 1.2; }
.cabecalho .sub { margin-top: -2px; font-size: 13.5px; }
.cabecalho .sub .tag { vertical-align: 1px; }
.voltar { height: 28px; margin-bottom: 6px; font-weight: 500; }

/* Botões: todos com a mesma altura e conteúdo centralizado */
.btn { box-sizing: border-box; height: var(--h-ctl); padding: 0 15px; gap: 7px; justify-content: center; border-radius: var(--raio-p); font-size: 13.5px; line-height: 1;
  font-weight: 550; transition: background .15s, border-color .15s, box-shadow .15s, color .15s; box-shadow: 0 1px 1px rgba(31,32,26,.04); vertical-align: middle; }
.btn:hover { background: var(--sup2); border-color: #C9C5B9; }
.btn:active { transform: translateY(.5px); }
.btn.primario { background: var(--marca-esc); border-color: var(--marca-esc); box-shadow: 0 1px 2px rgba(31,32,26,.18), inset 0 1px 0 rgba(255,255,255,.08); }
.btn.primario:hover { background: var(--marca-esc2); border-color: var(--marca-esc2); }
.btn.whats { background: #1F9D57; border-color: #1F9D57; box-shadow: 0 1px 2px rgba(31,157,87,.25); }
.btn.whats:hover { background: #188549; border-color: #188549; }
.btn.fantasma { box-shadow: none; color: var(--texto2); }
.btn.fantasma:hover { background: var(--marca-clara); color: var(--texto); border-color: transparent; }
.btn.fantasma.perigo, .btn.perigo { color: var(--perigo); }
.btn.p { height: var(--h-ctl-p); padding: 0 11px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn.p svg { width: 15px; height: 15px; }
.btn.icone { width: var(--h-ctl); padding: 0; }
.btn.p.icone { width: var(--h-ctl-p); padding: 0; }
.btn[disabled] { opacity: .5; }
.login-form .btn { height: 44px; padding: 0 16px; }
.acoes { gap: 8px; }
.acoes > .sutil, .acoes > .muted { line-height: 1.35; }

/* Campos */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=datetime-local], input[type=search], select {
  box-sizing: border-box; height: var(--h-ctl); min-height: var(--h-ctl); padding: 0 12px; border-radius: var(--raio-p); border-color: var(--borda2); transition: border-color .15s, box-shadow .15s; }
textarea { border-radius: var(--raio-p); border-color: var(--borda2); padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background: var(--sup) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235C5D53' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
input:hover, select:hover, textarea:hover { border-color: #C9C5B9; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--marca); box-shadow: 0 0 0 3px rgba(94,95,85,.16); }
input::placeholder, textarea::placeholder { color: #A3A398; }
.campo { gap: 6px; }
.campo label, .rotulo { font-size: 12.5px; font-weight: 550; color: var(--texto2); }
.grade { gap: 16px; }
.secao-form { font-size: 11.5px; letter-spacing: .12em; padding-top: 14px; margin-top: 6px; }
.check { min-height: 24px; }
.escolhido { box-sizing: border-box; min-height: var(--h-ctl); padding: 3px 4px 3px 12px; border-radius: var(--raio-p); }
.filtros { gap: 10px; margin-bottom: 20px; }
.filtros input, .filtros select { min-width: 170px; }
.filtros input[type=search] { padding-left: 36px;
  background: var(--sup) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238F9085' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center; }

/* Cartões */
.cartao { border-color: var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); }
.cartao > .topo { min-height: 58px; padding: 10px 20px; box-sizing: border-box; }
.cartao > .topo h2 { font-size: 15px; }
.cartao > .topo .btn.fantasma { margin-right: -8px; }
.cartao > .corpo { padding: 18px 20px; }
.colunas { gap: 20px; }
.l5 > *, .l7 > * { min-width: 0; }

/* Indicadores */
.kpis { gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 20px; }
.kpi { border-radius: var(--raio); padding: 18px 20px; display: flex; flex-direction: column; }
.kpi .rot { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--texto3); }
.kpi .val { font-size: 30px; margin-top: 8px; line-height: 1.1; }
.kpi .det { margin-top: 6px; }
.kpi.alerta { border-color: #F0CFC8; background: linear-gradient(180deg, #FFF9F7, #FFFFFF); }

/* Etiquetas */
.tag { height: 22px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; box-sizing: border-box; line-height: 1; }
.tag.contorno { border-color: var(--borda2); }

/* Listas e tabelas */
.lista > li { padding: 13px 20px; gap: 14px; min-height: 60px; box-sizing: border-box; }
.lista > li .tit { font-weight: 550; }
.lista > li .sub { margin-top: 1px; }
.lista > li > .acoes, .lista > li > .btn, .lista > li > a.btn { flex-shrink: 0; }
.lista > li > .acoes { flex-wrap: nowrap; }
.icone-tipo { width: 36px; height: 36px; border-radius: 10px; }
.tabela th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--texto3); padding: 12px 16px; background: var(--sup2); }
.tabela td { padding: 13px 16px; }
.tabela td .acoes { flex-wrap: nowrap; justify-content: flex-end; }
.tabela tr:hover td { background: #FCFBF9; }
.avatar.p { width: 28px; height: 28px; font-size: 10.5px; }

/* Abas e pílulas */
.abas { gap: 6px; margin-bottom: 22px; }
.abas a, .abas button { height: 42px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; font-weight: 550; }
.abas a:hover { color: var(--texto); }
.abas .tag { height: 20px; padding: 0 7px; }
.pilulas { height: var(--h-ctl); box-sizing: border-box; align-items: center; padding: 3px; border-radius: var(--raio-p); flex-wrap: nowrap; }
.pilulas button { height: 30px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center; white-space: nowrap; }
.pilulas button .n { height: 17px; min-width: 17px; display: inline-grid; place-items: center; padding: 0 5px; box-sizing: border-box; }

/* Funil */
.coluna { background: #EDECE7; border-radius: 16px; flex-basis: 268px; }
.coluna > header { padding: 14px 14px 8px; }
.coluna .cartoes { padding: 4px 10px 12px; gap: 10px; }
.card-neg { border-radius: 12px; padding: 12px 13px; box-shadow: 0 1px 2px rgba(31,32,26,.06), 0 2px 6px rgba(31,32,26,.04); transition: box-shadow .15s, border-color .15s; }
.card-neg:hover { border-color: var(--borda2); box-shadow: 0 4px 14px rgba(31,32,26,.08); }
.card-neg .l3 .tag { height: 20px; }

/* Etapas do negócio */
.etapas { gap: 3px; }
.etapas button { min-height: 44px; font-size: 11.5px; padding: 6px 10px 6px 14px; }

/* Modal e gaveta */
.sobreposicao { background: rgba(28, 29, 24, .45); backdrop-filter: blur(2px); }
.modal { border-radius: 18px; }
.modal > header, .gaveta > header { min-height: 62px; box-sizing: border-box; padding: 12px 18px 12px 22px; }
.modal > .corpo { padding: 20px 22px; }
.modal > footer { padding: 14px 22px; border-radius: 0 0 18px 18px; }
.fechar { width: 36px; height: 36px; place-items: center; padding: 0; border-radius: 10px; }
.gaveta > .corpo { padding: 20px 22px 40px; }

/* Imóveis */
.grade-imoveis { gap: 18px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.card-imovel { border-radius: 16px; }
.card-imovel:hover { box-shadow: 0 12px 32px rgba(31,32,26,.10); }
.card-imovel .info-card { padding: 14px 16px 16px; }
.galeria .principal-foto { border-radius: 12px; }
.galeria .mini { border-radius: 8px; }
.dados-lista .rot { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.dados-lista .v { margin-top: 2px; }

/* Cartões com ações no rodapé (advogados) */
.grade-adv { gap: 20px; }
.grade-adv > .cartao { display: flex; flex-direction: column; }
.grade-adv > .cartao > .corpo { flex: 1; display: flex; flex-direction: column; }
.rodape-card { margin-top: auto; padding-top: 16px; }

/* Documentação */
.item-doc { padding: 10px 20px; gap: 14px; }
.sel-status { height: 30px; min-height: 30px; padding: 0 28px 0 12px; border-radius: 999px; background-position: right 10px center; }
.validade input { height: 30px; min-height: 30px; padding: 0 8px; border-radius: 8px; }
.acoes-item { gap: 4px; }
.novo-item { padding: 16px 20px; }
.grupo-tit { padding: 14px 20px 6px; }

/* Avisos e diversos */
.aviso { border-radius: var(--raio-p); padding: 12px 14px; }
.toast { border-radius: 12px; padding: 12px 16px; font-weight: 500; }
.copiavel { border-radius: var(--raio-p); padding: 4px 4px 4px 12px; min-height: var(--h-ctl); box-sizing: border-box; }
.vazio { padding: 32px 16px; }

/* Instagram */
.ig-posts > li { flex-wrap: wrap; }
.ig-posts > li > .meio { flex: 1 1 200px; }
.ig-posts > li > .acoes { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.ig-msg .balao { border-radius: 18px; padding: 9px 14px; }
.ig-msg.entrada .balao { border-bottom-left-radius: 6px; }
.ig-msg.saida .balao { border-bottom-right-radius: 6px; }
.ig-enviar { align-items: center; padding: 14px 20px; }
.ig-enviar textarea { border-radius: 12px; }
.ig-resp { padding: 12px 20px 0; }

/* Login */
.login-marca { background: radial-gradient(120% 90% at 0% 0%, #5A5B51 0%, #3B3C34 60%, #2F302A 100%); }
.login-form form { max-width: 380px; }
.login-form h1 { font-size: 28px; }

@media (max-width: 960px) {
  .conteudo { padding: 20px 16px 48px; }
  .topo-movel { background: #3B3C34; height: 56px; box-sizing: border-box; }
}
@media (max-width: 600px) {
  .cabecalho { gap: 8px; }
  .cabecalho .btn { flex: 1 1 auto; }
  .kpi .val { font-size: 24px; }
  .lista > li { padding: 12px 16px; }
  .lista > li > .acoes { flex-wrap: wrap; }
  .cartao > .topo, .cartao > .corpo { padding-left: 16px; padding-right: 16px; }
}
.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.kpi { padding: 16px 18px; }
.kpi .rot { font-size: 11px; letter-spacing: .07em; line-height: 1.35; }
.kpi .val { font-size: 28px; }
[data-insta] .ig-posts > li > .acoes { flex-basis: 100%; padding-left: 70px; justify-content: flex-start; margin-left: 0; }
.tabela td .sub, .tabela td .sutil { white-space: nowrap; }
.filtros select { flex: 0 1 auto; min-width: 140px; }
.filtros input[type=search] { min-width: 220px; }
.etapas button { font-size: 11px; padding: 6px 6px 6px 13px; min-width: 96px; }
@media (min-width: 721px) {
  .filtros select { flex: 1 1 130px; min-width: 0; max-width: 240px; }
  .filtros input[type=search] { flex: 2 1 240px; max-width: 380px; }
}
@media (max-width: 600px) {
  .lista > li { flex-wrap: wrap; }
  .lista > li > .meio { flex: 1 1 160px; }
  .lista > li > .acoes { flex-basis: 100%; padding-left: 50px; }
}
@media (min-width: 721px) {
  .filtros select { flex: 0 0 auto; width: auto; min-width: 0; max-width: none; }
  .filtros input[type=search] { flex: 1 1 200px; min-width: 180px; max-width: 420px; }
}

/* ---------- Bate-papo interno ---------- */
.chat { display: flex; flex-direction: column; min-height: 0; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; background: var(--sup2); min-height: 260px; max-height: calc(100vh - 330px); }
.chat.compacta .chat-msgs { min-height: 180px; max-height: 380px; padding: 14px 16px; }
.chat-dia { display: flex; justify-content: center; margin: 12px 0 8px; }
.chat-dia span { font-size: 11.5px; font-weight: 600; color: var(--texto3); background: var(--sup); border: 1px solid var(--borda); border-radius: 999px; padding: 3px 10px; }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; margin-top: 8px; }
.chat-msg.seguida { margin-top: 2px; }
.chat-msg.minha { align-self: flex-end; align-items: flex-end; }
.chat-autor { font-size: 12px; font-weight: 600; color: var(--texto2); margin: 0 0 3px 12px; }
.chat-autor span { font-weight: 500; color: var(--texto3); }
.chat-msg .balao { position: relative; background: var(--sup); border: 1px solid var(--borda); border-radius: 16px; padding: 8px 12px 6px; box-shadow: 0 1px 1px rgba(31,32,26,.03); min-width: 64px; }
.chat-msg:not(.minha):not(.seguida) .balao { border-top-left-radius: 6px; }
.chat-msg.minha .balao { background: var(--marca-esc); border-color: var(--marca-esc); color: #fff; }
.chat-msg.minha:not(.seguida) .balao { border-top-right-radius: 6px; }
.chat-msg .txt { white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.chat-msg.minha .txt a { color: #fff; }
.chat-msg .hora { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 10.5px; color: var(--texto3); margin-top: 2px; }
.chat-msg.minha .hora { color: rgba(255,255,255,.65); }
.chat-msg .visto { font-size: 11px; letter-spacing: -2px; margin-left: 2px; }
.chat-msg .visto.lido { color: #9BD3FF; }
.chat-arq { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 2px 0 4px; border-radius: 10px; background: var(--marca-clara); color: var(--texto); text-decoration: none; max-width: 300px; }
.chat-arq svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--marca); }
.chat-arq span { display: flex; flex-direction: column; min-width: 0; }
.chat-arq strong { font-weight: 550; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-arq small { font-size: 11px; color: var(--texto3); }
.chat-msg.minha .chat-arq { background: rgba(255,255,255,.12); color: #fff; }
.chat-msg.minha .chat-arq svg, .chat-msg.minha .chat-arq small { color: rgba(255,255,255,.75); }
.chat-enviar { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--borda); background: var(--sup); }
.chat-campo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.chat-enviar textarea { width: 100%; box-sizing: border-box; resize: none; min-height: var(--h-ctl); max-height: 160px; padding: 9px 12px; line-height: 1.4; display: block; }
.chat-anexo { display: flex; align-items: center; gap: 6px; font-size: 12.5px; background: var(--marca-clara); border-radius: 8px; padding: 5px 6px 5px 10px; }
.chat-anexo svg { width: 14px; height: 14px; }
.chat-anexo span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.chat-anexo small { color: var(--texto3); }
.chat-anexo .x { border: 0; background: none; cursor: pointer; color: var(--texto2); width: 22px; height: 22px; border-radius: 6px; }
.chat-anexo .x:hover { background: rgba(0,0,0,.06); }
.chat-nota { font-size: 11px; color: var(--texto3); padding: 0 16px 10px; background: var(--sup); border-radius: 0 0 var(--raio) var(--raio); }
.chat-vazio { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--texto3); max-width: 300px; padding: 20px; font-size: 13px; }
.chat-vazio svg { width: 28px; height: 28px; opacity: .6; }
.chat-quem { display: flex; gap: 8px; align-items: flex-start; padding: 10px 16px; font-size: 12px; color: var(--texto2); border-bottom: 1px solid var(--borda); background: var(--sup); }
.chat-quem svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
.cartao-chat > .corpo { border-radius: 0 0 var(--raio) var(--raio); overflow: hidden; }

.chat-tela { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 20px; align-items: start; }
.chat-lista > .topo { padding: 10px 12px; }
.chat-lista > .topo input { width: 100%; }
.chat-lista .corpo { max-height: calc(100vh - 260px); overflow-y: auto; }
.chat-lista li.sel { background: var(--marca-clara); }
.chat-lista .avatar, .chat-topo .avatar, .lista-pessoas .avatar { width: 38px; height: 38px; font-size: 12.5px; flex-shrink: 0; }
.avatar.parc { background: var(--destaque-claro); color: #7A5A28; }
.chat-previa { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.chat-meta .sutil { font-size: 11.5px; }
.contador-chat { min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: var(--dado1); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.chat-painel { display: flex; flex-direction: column; overflow: hidden; }
.chat-topo { gap: 12px; }
.chat-topo .meio { flex: 1; min-width: 0; }
.chat-topo h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-painel .chat-msgs { min-height: 380px; }
.chat-painel .chat-nota { border-radius: 0; }
.so-movel { display: none !important; }
.lista-pessoas li[hidden] { display: none; }
.lista-pessoas > li > svg { width: 16px; height: 16px; color: var(--texto3); }
@media (max-width: 900px) {
  .chat-tela { grid-template-columns: 1fr; }
  .chat-tela.com-conversa .chat-lista { display: none; }
  .chat-tela:not(.com-conversa) .chat-painel { display: none; }
  .so-movel { display: inline-flex !important; }
  .chat-painel .chat-msgs { max-height: calc(100vh - 300px); }
  .chat-msg { max-width: 88%; }
}
.chat-lista .avatar, .chat-topo .avatar, .lista-pessoas .avatar { background: var(--marca-clara); color: var(--marca-esc); display: inline-grid; place-items: center; border-radius: 50%; font-weight: 600; }
.chat-lista .avatar.parc, .chat-topo .avatar.parc, .lista-pessoas .avatar.parc { background: var(--destaque-claro); color: #7A5A28; }
.chat-enviar { align-items: flex-end; }
.chat-enviar > .btn { flex-shrink: 0; }
@media (max-width: 900px) { .some-movel { display: none; } .chat-topo .sutil { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 900px) {
  .conteudo:has(.chat-tela.com-conversa) > .cabecalho { display: none; }
  .chat-tela.com-conversa .chat-painel .chat-msgs { max-height: calc(100dvh - 250px); min-height: 300px; }
}

/* ---------- Módulos (chave liga/desliga) ---------- */
.lista.modulos > li { min-height: 68px; }
.chave-liga { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; cursor: pointer; }
.chave-liga input { opacity: 0; width: 0; height: 0; position: absolute; }
.chave-liga span { position: absolute; inset: 0; background: #D6D3C9; border-radius: 999px; transition: background .2s; }
.chave-liga span::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.chave-liga input:checked + span { background: var(--dado1); }
.chave-liga input:checked + span::before { transform: translateX(18px); }
.chave-liga input:focus-visible + span { box-shadow: 0 0 0 3px rgba(94,95,85,.25); }
.chave-liga.off { opacity: .45; cursor: not-allowed; }

/* ---------- Área do cliente ---------- */
.portal-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.portal-card { text-decoration: none; color: inherit; transition: box-shadow .15s, border-color .15s; }
.portal-card:hover { border-color: var(--borda2); box-shadow: 0 10px 28px rgba(31,32,26,.08); }
.portal-card h2 { font-size: 17px; margin: 12px 0 4px; }
.portal-card-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.portal-card-prog { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 10px; }
.portal-passos { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0; }
.portal-passos li { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--texto3); font-weight: 550; font-size: 13.5px; position: relative; }
.portal-passos li:not(:last-child)::after { content: ''; flex: 1; height: 2px; background: var(--borda); margin: 0 12px; border-radius: 2px; }
.portal-passos li.feito:not(:last-child)::after { background: var(--dado1); }
.portal-passos .bolinha { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--marca-clara); color: var(--texto2); font-weight: 700; font-size: 13px; flex-shrink: 0; }
.portal-passos li.feito { color: var(--texto); }
.portal-passos li.feito .bolinha { background: var(--dado1); color: #fff; }
.portal-passos li.atual { color: var(--texto); }
.portal-passos li.atual .bolinha { background: var(--marca-esc); color: #fff; box-shadow: 0 0 0 4px rgba(63,64,56,.15); }
.portal-itens > li { min-height: 48px; padding-top: 10px; padding-bottom: 10px; }
.portal-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--borda2); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; box-sizing: border-box; }
.portal-check.ok { background: var(--dado1); border-color: var(--dado1); color: #fff; }
.portal-check.erro { background: var(--perigo-claro); border-color: var(--perigo); color: var(--perigo); }
.tag-cliente { cursor: pointer; }
@media (max-width: 600px) {
  .portal-passos li { font-size: 12px; gap: 6px; }
  .portal-passos li:not(:last-child)::after { margin: 0 6px; }
  .portal-grade { grid-template-columns: 1fr; }
}
[data-docs]:empty, [data-acesso-cliente]:empty { display: none; }

/* Origem do lead */
.tag.origem { font-weight: 600; }
.tag.o-site { background: #F6EFE2; color: #7A5A28; }
.tag.o-viva { background: #E4EEFB; color: #1F5FAE; }
.tag.o-zap { background: #FDEBDC; color: #B4541A; }
.tag.o-olx { background: #EFE7FA; color: #6A3BB0; }
.tag.o-insta { background: #FBE6F0; color: #B0306A; }
.tag.o-face { background: #E6ECFA; color: #2D4FA0; }
.tag.o-whats { background: #E1F5EA; color: #1A7C44; }
.tag.o-guide { background: #E3F4F3; color: #1E7A73; }
.tag.o-outro { background: var(--marca-clara); color: var(--texto2); }
