/* ===== V50: página inicial com os módulos em blocos ===== */
.ini { max-width: 1080px; margin: 0 auto; padding: 8px 0 32px; }
.ini-cab { text-align: center; margin: 12px 0 28px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ini-data { margin: 0; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.ini-cab h1 { margin: 0; font-family: var(--font-display); font-size: 34px; font-weight: 600; color: var(--ink); }
.ini-emp { margin: 0; color: var(--ink-muted); font-size: 14px; }
.ini-emp strong { color: var(--ink); font-weight: 600; }
.ini-lic { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); font-size: 12px; }
.ini-lic-ativa { color: var(--green); border-color: var(--green); }
.ini-lic-teste { color: var(--gold-bright); border-color: var(--gold); }
.ini-lic-bloq { color: var(--red); border-color: var(--red); }
.ini-pend { margin-top: 6px; background: rgba(201,162,76,.1); border: 1px solid var(--gold); color: var(--gold-bright); border-radius: 999px; padding: 7px 16px; font: inherit; font-size: 13px; cursor: pointer; }
.ini-pend:hover { background: rgba(201,162,76,.2); }
.ini-setores { display: flex; flex-direction: column; gap: 26px; }
.ini-setor h2 { margin: 0 0 12px; text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); display: flex; align-items: center; gap: 12px; }
.ini-setor h2::before, .ini-setor h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.ini-grade { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.ini-tile { --t1: #d8b35c; --t2: #9c7a2e; --tx: #1c1506; position: relative; width: 168px; min-height: 156px; padding: 18px 12px 14px; border: none; border-radius: 22px; cursor: pointer; font: inherit; color: var(--tx);
  background: linear-gradient(150deg, var(--t1), var(--t2)); box-shadow: 0 10px 24px -14px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.18);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; transition: transform .15s ease, box-shadow .15s ease; }
.ini-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -14px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.22); }
.ini-tile:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; }
.ini-icone { width: 58px; height: 58px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.16); margin-bottom: 4px; }
.ini-icone svg { width: 34px; height: 34px; }
.ini-rot { font-size: 15.5px; font-weight: 700; line-height: 1.2; }
.ini-sub { font-size: 11.5px; line-height: 1.3; opacity: .85; }
.ini-badge { position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--bg); color: var(--gold-bright); border: 1px solid rgba(255,255,255,.25); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ini-ouro .ini-tile { --t1: #dcb963; --t2: #9a772b; --tx: #1c1506; }
.ini-ouro .ini-icone { background: rgba(28,21,6,.12); }
.ini-cobre .ini-tile { --t1: #c77a4c; --t2: #7e4224; --tx: #fff6ea; }
.ini-verde .ini-tile { --t1: #5f9c73; --t2: #2f5e40; --tx: #f2fbf4; }
.ini-rosa .ini-tile { --t1: #b8627f; --t2: #6e3049; --tx: #fff2f6; }
.ini-violeta .ini-tile { --t1: #8374c9; --t2: #463a86; --tx: #f5f2ff; }
.ini-grafite .ini-tile { --t1: #2b272e; --t2: #1a181c; --tx: var(--gold-bright); box-shadow: 0 10px 24px -14px rgba(0,0,0,.9), inset 0 0 0 1px var(--gold); }
.ini-grafite .ini-icone { background: rgba(201,162,76,.12); }
.ini-grafite .ini-sub { color: var(--ink-muted); opacity: 1; }
@media (max-width: 640px) {
  .ini-cab h1 { font-size: 26px; }
  .ini-grade { gap: 12px; }
  .ini-tile { width: calc(50% - 6px); min-height: 138px; border-radius: 18px; }
  .ini-icone { width: 50px; height: 50px; }
  .ini-icone svg { width: 30px; height: 30px; }
}
/* setores lado a lado, como um painel de aplicativos */
.ini-setores { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 26px 34px; }
.ini-setor { flex: 0 1 auto; display: flex; flex-direction: column; align-items: center; }
.ini-setor h2 { gap: 8px; margin-bottom: 12px; }
.ini-setor h2::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--gold)); }
.ini-setor h2::after { content: none; }
.ini-ouro { --dot: #dcb963; } .ini-cobre { --dot: #c77a4c; } .ini-verde { --dot: #5f9c73; } .ini-rosa { --dot: #b8627f; } .ini-violeta { --dot: #8374c9; } .ini-grafite { --dot: var(--gold); }
@media (max-width: 640px) { .ini-setor { flex-basis: 100%; } }
@media (max-width: 640px) { .ini-setor { width: 100%; } .ini-setor .ini-grade { width: 100%; } }
.parc-sel { background: rgba(201,162,76,.08); }
.parc-det { display: flex; flex-direction: column; gap: 4px; }

  /* V52 — pente fino: campos de formulário nunca empurram o modal/tela para fora da largura (celular e modais estreitos) */
  .modal-grid-2 > *, .modal-grid-3 > *, .modal label, .filtro-field { min-width: 0; }
  .modal input, .modal select, .modal textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
  .filtro-field select, .filtro-field input { max-width: 100%; min-width: 0; }
  .modal .lancamentos-table { display: block; overflow-x: auto; }
  @media (max-width: 900px) { .com-pdv { grid-template-columns: minmax(0, 1fr); } }

  /* V53 — CRM (prospecção ativa) */
  .crm-filtros { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin: 10px 0 12px; }
  .crm-filtros .filtro-field { min-width: 0; }
  .crm-filtros-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; flex-basis: 100%; }
  .crm-massa { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--gold); border-radius: var(--radius); background: rgba(201, 162, 76, 0.08); }
  .crm-score { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 999px; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; border: 1px solid transparent; }
  .crm-score-alto { background: rgba(124, 191, 143, 0.16); color: var(--green); border-color: rgba(124, 191, 143, 0.4); }
  .crm-score-medio { background: rgba(201, 162, 76, 0.14); color: var(--gold-bright); border-color: rgba(201, 162, 76, 0.4); }
  .crm-score-baixo { background: var(--surface-2); color: var(--ink-muted); border-color: var(--border); }
  .crm-mini { padding: 4px 9px; font-size: 12px; line-height: 1.3; text-decoration: none; display: inline-block; }
  .crm-contatos { white-space: nowrap; }
  .crm-tabela tr.crm-nc td { opacity: 0.6; }
  .crm-paginacao { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
  .crm-funil { display: grid; grid-template-columns: repeat(6, minmax(168px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
  .crm-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  .crm-col > header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 2px solid var(--border); padding-bottom: 6px; font-size: 13px; }
  .crm-col > header span { color: var(--ink-muted); font-size: 12px; }
  .crm-col-contato > header { border-bottom-color: rgba(201, 162, 76, 0.5); }
  .crm-col-qualificado > header, .crm-col-proposta > header { border-bottom-color: var(--gold); }
  .crm-col-ganho > header { border-bottom-color: var(--green); }
  .crm-col-perdido > header { border-bottom-color: var(--red); }
  .crm-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .crm-card-nome { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
  .crm-card-nome:hover, .crm-card-nome:focus-visible { color: var(--gold-bright); text-decoration: underline; }
  .crm-card-acoes { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; font-size: 12px; }
  .crm-agenda, .crm-dash-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .crm-lista li { gap: 6px 10px; }
  .crm-ld-contato { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .crm-nc-aviso { margin: 0; padding: 8px 10px; border: 1px solid rgba(226, 102, 74, 0.5); border-radius: 8px; background: rgba(226, 102, 74, 0.08); font-size: 13px; }
  .crm-hist { max-height: 260px; overflow: auto; }
  .crm-imp-mapa { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; }
  .crm-cfg-nichos input { width: 100%; box-sizing: border-box; }
  .crm-mais { flex-basis: 100%; }
  .crm-mais > summary { cursor: pointer; color: var(--gold-bright); font-size: 13px; margin: 2px 0 8px; }
  .crm-mais-corpo { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
  @media (max-width: 900px) {
    .crm-agenda, .crm-dash-grade { grid-template-columns: minmax(0, 1fr); }
    .crm-funil { grid-template-columns: repeat(6, minmax(78vw, 1fr)); scroll-snap-type: x mandatory; }
    .crm-col { scroll-snap-align: start; }
    .crm-filtros .filtro-field { flex: 1 1 140px; }
  }

  /* V54 — chat interno e suporte */
  .content-topbar { align-items: center; gap: 12px; flex-wrap: wrap; }
  .topbar-acoes { display: flex; gap: 8px; margin-right: auto; }
  .topbar-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
  .topbar-btn svg { width: 17px; height: 17px; }
  .topbar-btn:hover, .topbar-btn:focus-visible, .topbar-btn[aria-expanded="true"] { border-color: var(--gold); color: var(--gold-bright); }
  .topbar-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
  .chat-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); z-index: 900; display: grid; grid-template-columns: 260px minmax(0, 1fr); background: var(--surface); border-left: 1px solid var(--border); box-shadow: -18px 0 40px rgba(0, 0, 0, 0.45); }
  .chat-drawer[hidden] { display: none; }
  .chat-col-lista { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
  .chat-col-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
  .chat-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); min-height: 56px; box-sizing: border-box; }
  .chat-cab-tit { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .chat-cab-tit strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-cab-tit .muted { font-size: 12px; }
  .chat-x { background: none; border: 1px solid var(--border); color: var(--ink); border-radius: 8px; width: 30px; height: 30px; font-size: 18px; cursor: pointer; }
  .chat-x:hover { border-color: var(--gold); }
  .chat-voltar { display: none; font-size: 18px; text-decoration: none; }
  .chat-lista { overflow-y: auto; flex: 1; }
  .chat-nova { border-bottom: 1px solid var(--border); max-height: 40%; overflow-y: auto; }
  .chat-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
  .chat-item:hover, .chat-item:focus-visible { background: var(--surface-2); }
  .chat-item.ativo { background: rgba(201, 162, 76, 0.22); box-shadow: inset 4px 0 0 var(--gold); }
  .chat-item-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .chat-item-txt strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-item-txt span { font-size: 12px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-item.nao-lida .chat-item-txt strong, .chat-item.nao-lida .chat-item-txt span { color: var(--ink); font-weight: 600; }
  .chat-av { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; background: var(--surface-2); color: var(--gold-bright); border: 1px solid var(--border); }
  .chat-av-escritorio { color: var(--green); }
  .chat-badge { min-width: 20px; height: 20px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
  .chat-hora { font-size: 11px; color: var(--ink-muted); }
  .chat-msgs { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
  .chat-vazio { margin: auto; text-align: center; max-width: 340px; font-size: 13px; }
  .chat-dia, .chat-novas { display: flex; justify-content: center; margin: 10px 0 6px; }
  .chat-dia span { font-size: 11.5px; color: var(--ink-muted); background: var(--surface-2); padding: 2px 10px; border-radius: 999px; }
  .chat-novas span { font-size: 11.5px; color: var(--red); border: 1px solid rgba(226, 102, 74, 0.5); padding: 1px 10px; border-radius: 999px; }
  .chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; margin-top: 8px; }
  .chat-msg.agrupa { margin-top: 2px; }
  .chat-msg.meu { align-self: flex-end; align-items: flex-end; }
  .chat-autor { font-size: 11.5px; color: var(--gold-bright); margin: 0 0 2px 4px; }
  .chat-bolha { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px 12px 12px 4px; padding: 7px 10px; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
  .chat-msg.meu .chat-bolha { background: rgba(201, 162, 76, 0.16); border-color: rgba(201, 162, 76, 0.4); border-radius: 12px 12px 4px 12px; }
  .chat-bolha a { color: var(--gold-bright); }
  .chat-meta { display: block; text-align: right; font-size: 10.5px; color: var(--ink-muted); margin-top: 2px; }
  .chat-meta .btn-link { font-size: 10.5px; }
  .chat-msg .chat-acao { display: none; }
  .chat-msg:hover .chat-acao, .chat-msg.sel .chat-acao, .chat-msg:focus-within .chat-acao { display: inline; }
  .chat-visto { font-weight: 600; letter-spacing: -1px; cursor: default; }
  .chat-visto.sim { color: #1d7fd6; }
  .chat-anexos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
  .chat-anexo { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 12.5px; max-width: 100%; }
  .chat-anexo img { max-width: 180px; max-height: 140px; border-radius: 6px; display: block; }
  .chat-composer { border-top: 1px solid var(--border); padding: 10px 12px; }
  .chat-composer-linha { display: flex; gap: 8px; align-items: flex-end; }
  .chat-composer textarea { flex: 1; resize: none; min-height: 38px; max-height: 140px; box-sizing: border-box; font: inherit; font-size: 13.5px; }
  .chat-clip { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; color: var(--ink-muted); flex: 0 0 38px; }
  .chat-clip:hover, .chat-clip:focus-within { border-color: var(--gold); color: var(--gold-bright); }
  .chat-clip svg { width: 18px; height: 18px; }
  .chat-tremer { background: none; padding: 0; font: inherit; }
  .chat-tremer:hover, .chat-tremer:focus-visible { border-color: var(--gold); color: var(--gold-bright); }
  .chat-tremer:disabled { opacity: .45; cursor: not-allowed; }
  .chat-col-thread { position: relative; }
  .chat-cita { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; margin: 0 0 5px; padding: 5px 8px; border: 0; border-left: 3px solid var(--gold); border-radius: 6px; background: rgba(0,0,0,.18); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; min-width: 140px; }
  .chat-cita strong { color: var(--gold-bright); font-size: 11.5px; }
  .chat-cita span { color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .chat-resp { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 6px 8px 6px 10px; border-left: 3px solid var(--gold); border-radius: 8px; background: var(--surface-2); }
  .chat-resp-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: 12.5px; }
  .chat-resp-txt strong { color: var(--gold-bright); font-size: 12px; }
  .chat-resp-txt span { color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-resp-x { background: none; border: 0; color: var(--ink-muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
  @keyframes chatDestaque { 0%, 60% { background: rgba(201,162,76,.28); } 100% { background: transparent; } }
  .chat-msg.chat-destaque { animation: chatDestaque 1.6s ease; border-radius: 12px; }
  .chat-som { font-size: 14px; }
  .chat-col-thread.soltando::after { content: 'Solte para anexar'; position: absolute; inset: 8px; border: 2px dashed var(--gold); border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.35); color: var(--ink); font-weight: 600; pointer-events: none; z-index: 5; }
  .chat-anexo-w { position: relative; display: inline-flex; }
  .chat-anexo.img { padding: 3px; }
  .chat-anexo img { max-width: 240px; max-height: 200px; }
  .chat-fig-salvar { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
  .chat-anexo-w:hover .chat-fig-salvar, .chat-fig-salvar:focus-visible { opacity: 1; }
  @media (hover: none) { .chat-fig-salvar { opacity: .85; } }
  .chat-msg-fig .chat-fig { width: 150px; height: 150px; object-fit: contain; display: block; }
  .chat-anexo-sel { display: inline-flex; align-items: center; gap: 5px; }
  .chat-anexo-sel img { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }
  .chat-fig-painel { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; padding: 6px; }
  .chat-fig-abas { display: flex; gap: 4px; margin-bottom: 6px; }
  .chat-fig-abas button { background: none; border: 1px solid transparent; color: var(--ink-muted); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
  .chat-fig-abas button[aria-selected="true"] { border-color: var(--gold); color: var(--ink); }
  #chatFigCorpo { max-height: 210px; overflow: auto; }
  .chat-emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 2px; }
  .chat-emojis button { font-size: 21px; line-height: 1; padding: 6px 0; background: none; border: 0; border-radius: 8px; cursor: pointer; }
  .chat-emojis button:hover, .chat-emojis button:focus-visible { background: rgba(201,162,76,.18); }
  .chat-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
  .chat-fig-it { position: relative; }
  .chat-fig-it > button:first-child { width: 100%; aspect-ratio: 1; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
  .chat-fig-it > button:first-child:hover, .chat-fig-it > button:first-child:focus-visible { border-color: var(--gold); }
  .chat-fig-it img { width: 100%; height: 100%; object-fit: contain; display: block; }
  .chat-fig-x { position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--ink-muted); font-size: 12px; line-height: 1; cursor: pointer; }
  .chat-fig-add { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border: 1px dashed var(--border); border-radius: 10px; font-size: 26px; color: var(--ink-muted); cursor: pointer; }
  .chat-fig-add:hover { border-color: var(--gold); color: var(--gold-bright); }
  .chat-pops { position: fixed; right: 16px; bottom: 16px; z-index: 1200; display: flex; flex-direction: column; gap: 8px; width: min(300px, calc(100vw - 32px)); }
  .chat-pop { background: var(--surface); border: 1px solid rgba(201,162,76,.55); border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.4); overflow: hidden; animation: chatPopSobe .35s cubic-bezier(.2,.9,.3,1.15); }
  .chat-pop.saindo { animation: chatPopDesce .25s ease forwards; }
  .chat-pop-barra { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 4px 10px; font-size: 11.5px; color: #1a1208; background: linear-gradient(180deg, #ecd08f, #bd9240); }
  .chat-pop-x { background: none; border: 0; color: #1a1208; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; }
  .chat-pop-corpo { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; color: var(--ink); padding: 10px 12px 12px; cursor: pointer; font: inherit; }
  .chat-pop-txt { display: flex; flex-direction: column; gap: 2px; font-size: 13px; min-width: 0; }
  .chat-pop-quem { font-weight: 400; }
  .chat-pop-txt > span { color: var(--ink-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
  @keyframes chatPopSobe { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes chatPopDesce { to { transform: translateY(40%); opacity: 0; } }
  @media (prefers-reduced-motion: reduce) { .chat-pop, .chat-pop.saindo { animation: none; } }
  .chat-tremida { display: flex; justify-content: center; margin: 8px 0; }
  .chat-tremida > span { font-size: 12.5px; padding: 5px 12px; border-radius: 999px; border: 1px dashed var(--gold); color: var(--ink); }
  .chat-tremida .chat-meta { display: inline; margin: 0 0 0 8px; float: none; }
  @keyframes abacoTremer { 0%,100% { transform: translate(0,0); } 10%,50%,90% { transform: translate(-9px,2px); } 30%,70% { transform: translate(9px,-2px); } 20%,60% { transform: translate(-6px,-3px); } 40%,80% { transform: translate(6px,3px); } }
  body.abaco-tremendo { animation: abacoTremer .7s linear 1; }
  @media (prefers-reduced-motion: reduce) { body.abaco-tremendo { animation: none; box-shadow: inset 0 0 0 4px var(--gold); } }
  .chat-clip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
  .chat-anexos-sel { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
  .chat-anexo-sel { font-size: 12px; border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
  .sup-abas { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 12px 0; flex-wrap: wrap; }
  .sup-abas button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--ink-muted); font: inherit; font-size: 13.5px; padding: 8px 12px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
  .sup-abas button.ativo { color: var(--on-gold); background: var(--gold); border-radius: 8px 8px 0 0; border-bottom-color: var(--gold-bright); font-weight: 600; }
  .sup-thread { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; margin: 10px 0; padding-right: 4px; }
  .sup-msg { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--surface); font-size: 13.5px; overflow-wrap: anywhere; }
  .sup-msg.equipe { border-color: rgba(201, 162, 76, 0.45); background: rgba(201, 162, 76, 0.07); }
  .sup-msg.interno { border-style: dashed; background: var(--surface-2); }
  .sup-msg-cab { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; margin-bottom: 4px; font-size: 12.5px; }
  .sup-msg a { color: var(--gold-bright); }
  .sup-novidade td, li.sup-novidade { box-shadow: inset 3px 0 0 var(--gold); }
  .sup-prior { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
  .sup-prior-urgente { color: #fff; background: var(--red); border-color: var(--red); }
  .sup-prior-alta { color: var(--red); border-color: rgba(226, 102, 74, 0.6); }
  .sup-prior-normal { color: var(--gold-bright); }
  .sup-prior-baixa { color: var(--ink-muted); }
  @media (max-width: 760px) {
    .topbar-btn span:not(.topbar-badge) { display: none; }
    .chat-drawer { grid-template-columns: minmax(0, 1fr); width: 100vw; }
    .chat-drawer .chat-col-thread { display: none; }
    .chat-drawer.mostra-thread .chat-col-lista { display: none; }
    .chat-drawer.mostra-thread .chat-col-thread { display: flex; }
    .chat-voltar { display: inline-block; }
  }
  .chat-composer textarea { background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; outline: none; }
  .chat-composer textarea:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201, 162, 76, 0.25); }
  .chat-composer textarea::placeholder { color: var(--ink-muted); }
  /* V55 — NC a partir do atendimento */
  .chat-nc-tag { color: var(--gold-bright); font-weight: 600; }
  .sup-at-ncs { margin: 0 0 8px; padding: 6px 10px; border: 1px solid rgba(201, 162, 76, 0.45); border-radius: 8px; font-size: 13px; }
  /* V56 — importações */
  tr.impg-erro td { background: rgba(226, 102, 74, 0.07); }
  tr.impg-ja td { opacity: 0.55; }
  .impg-erros { margin-top: 8px; font-size: 13px; }
  .impg-erros summary { cursor: pointer; color: var(--red); }
  .impg-erros ul { max-height: 180px; overflow-y: auto; margin: 6px 0 0; padding-left: 18px; }
  .ofx-acao { display: flex; gap: 6px; flex-wrap: wrap; }
  .ofx-acao select { max-width: 320px; }
  /* Notas fiscais e boletos (V57) */
  .fis-pront { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
  .fis-pront strong { margin-right: 6px; }
  .fis-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border); }
  .fis-chip.ok { color: var(--green); border-color: currentColor; }
  .fis-chip.falta { color: var(--red); border-color: currentColor; }
  .fis-massa { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--gold); border-radius: var(--radius); background: rgba(201, 162, 76, 0.08); font-size: 13px; }
  .fis-semnota { margin-left: 4px; }
  .fis-emitir { padding: 6px 12px; font-size: 13px; }
  .fis-dados { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px 16px; font-size: 13.5px; }
  .fis-dados > div { min-width: 0; overflow-wrap: anywhere; }
  .fis-dados .k { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); margin-bottom: 2px; }
  .fis-cats { display: flex; flex-wrap: wrap; gap: 6px 14px; }
  .fis-conf { margin-top: 8px; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
  .fis-hist { margin: 10px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-muted); }
  .fis-cfg summary { cursor: pointer; padding: 6px 0; }
  .fis-cfg-form { margin-top: 8px; }
  #bolLinha { font-family: ui-monospace, monospace; }
  .fis-cert { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--surface-2); }
  .fis-cert-status { margin: 8px 0 0; font-size: 13px; font-weight: 600; }
  .fis-cert-ok { color: var(--green); } .fis-cert-alerta { color: var(--gold-bright); } .fis-cert-venc { color: var(--red, #e5484d); } .fis-cert-vazio { color: var(--ink-muted); font-weight: 500; }
.lim-bloco{border:1px solid var(--border);border-radius:10px;padding:14px 16px;margin-bottom:12px;background:var(--surface-2);}
.lim-bloco h3{margin:0 0 4px;font-size:15px;}
.lim-bloco .lim-linha{display:flex;justify-content:space-between;gap:10px;font-size:13px;margin:4px 0;flex-wrap:wrap;}
.lim-bar{height:10px;border-radius:6px;background:rgba(128,128,128,.25);overflow:hidden;margin:6px 0 4px;}
.lim-bar i{display:block;height:100%;background:#4c8a5a;}
.lim-bar.aviso i{background:#d59a1f;}
.lim-bar.perigo i{background:#c0392b;}
.lim-msg{width:100%;min-height:110px;font-size:13px;background:var(--surface-2);color:var(--ink);border:1px solid var(--border);border-radius:8px;padding:8px;font-family:var(--font-body);}

/* Locadora e Imobiliária: formulário dinâmico */
.fd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; margin-top: 10px; }
.fd-grid > label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fd-grid > label.fd-2 { grid-column: span 2; }
.fd-grid > label.fd-3 { grid-column: 1 / -1; }
.fd-grid > h4.fd-sec { grid-column: 1 / -1; margin: 8px 0 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); border-top: 1px solid var(--border); padding-top: 10px; }
@media (max-width: 640px) { .fd-grid { grid-template-columns: 1fr; } .fd-grid > label.fd-2, .fd-grid > label.fd-3 { grid-column: auto; } }
.fd-nota { font-size: 13px; color: var(--ink-muted); margin: 6px 0; }
.fd-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; margin: 8px 0 12px; }
.fd-kv > div > span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-muted); }
.fd-kv > div > b { font-size: 15px; }
.fd-lista { list-style: none; margin: 6px 0; padding: 0; }
.fd-lista li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.fd-lista li > span:first-child { flex: 1; }
.fd-alerta-linha { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; cursor: pointer; }
.fd-alerta-linha b { font-weight: 600; }


/* v199 — Caixa de conversas do WhatsApp (Assistente WhatsApp › Conversas). Reaproveita as classes do chat interno
   (.chat-*) dentro de .wac-grade; aqui só o que é próprio da página. Cores do Ábaco (preto e dourado). */
.wac-topo { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin: 0 0 12px; }
.wac-topo .wac-info { font-size: 13px; flex: 1; min-width: 220px; align-self: center; }
.wac-cfg { margin: 0 0 12px; }
.wac-pessoas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 14px; }
.wac-grade { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 230px); min-height: 440px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.wac-busca { padding: 10px; border-bottom: 1px solid var(--border); }
.wac-busca input { width: 100%; box-sizing: border-box; background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; }
.wac-busca input:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201, 162, 76, 0.25); }
.wac-grade .chat-av { width: 40px; height: 40px; flex-basis: 40px; font-size: 14px; }
.wac-item-lado { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.wac-grade .chat-item.nao-lida .chat-hora { color: var(--gold-bright); font-weight: 600; }
.wac-grade .chat-badge { background: var(--gold); color: #111; }
.wac-vazio { padding: 16px; font-size: 13px; }
.wac-mais { display: block; margin: 8px auto; }
.wac-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.wac-acoes .btn-secondary { padding: 5px 10px; font-size: 12.5px; }
.wac-grade .chat-msgs { background: var(--bg); }
.wac-grade .chat-bolha { max-width: 100%; }
.wac-txt { white-space: pre-wrap; display: block; }
.wac-grade .chat-visto.sim { color: var(--gold-bright); }
.wac-erro { color: var(--red); font-weight: 600; }
.wac-foto { display: block; max-width: min(260px, 100%); max-height: 260px; border-radius: 8px; margin: 2px 0 4px; object-fit: cover; background: var(--surface-2); }
.wac-doc { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.18); border: 1px solid var(--border); margin: 2px 0 4px; min-width: 200px; }
.wac-doc-ico { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: #111; background: var(--gold); border-radius: 4px; padding: 6px 5px; }
.wac-doc-txt { display: flex; flex-direction: column; min-width: 0; }
.wac-doc-txt strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wac-baixar { font-size: 12px; display: inline-block; margin-bottom: 2px; }
.wac-grade .chat-composer textarea:disabled, .wac-grade .chat-composer button:disabled { opacity: 0.6; cursor: not-allowed; }
@media (max-width: 760px) {
  .wac-grade { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 200px); min-height: 380px; }
  .wac-grade .chat-col-lista { border-right: 0; }
  .wac-grade .chat-col-thread { display: none; }
  /* ao tocar numa conversa, ela abre em tela cheia (como no aplicativo) */
  .wac-grade.mostra-thread .chat-col-thread { display: flex; position: fixed; inset: 0; z-index: 1100; background: var(--surface); } /* acima da barra de baixo do app (.mob-nav 960) */
  .wac-grade .chat-voltar { display: inline-block; padding: 4px 6px; color: var(--gold-bright); }
  .wac-grade .chat-cab { flex-wrap: wrap; padding: 8px 10px; }
  .wac-grade .chat-cab-tit { min-width: 0; flex: 1 1 0; }
  .wac-acoes { flex: 1 0 100%; }
  .wac-acoes .btn-secondary { flex: 1; padding: 6px 8px; font-size: 12.5px; }
  .wac-grade .chat-msg { max-width: 90%; }
}