/* ===== PÁGINAS DO ERP — kit das mesas estendido =====
   Mesma gramática de shared/crm_ws.css (cabeçalho pessoal, abas com contagem,
   fila/tabela e ficha lateral). Aqui ficam as peças que as mesas não tinham:
   acento por seção, faixa-resumo que filtra, gráficos em CSS, formulários na
   ficha, telas de configuração e a releitura das primitivas antigas (.btn,
   .card, .kc, tabelas, modais) para que os fluxos internos falem a mesma língua.

   Acento = tipo de trabalho, não enfeite:
     home   navy da marca      (Principal)
     loc    verde da carteira  (operação de Locação — já definido em lc_workspace.css)
     fin    bronze de caixa    (tudo que é dinheiro)
     venda  azul               (Venda — já definido em crm_ws.css)
     cli    índigo             (Clientes)
     rec    violeta            (Corretores — já definido em crm_ws.css)
     mkt    magenta            (Marketing)
     sys    grafite            (Sistema) */

.cw.cw--home, .cw-pa.cw--home, .cw-drawer.cw--home, .cw-toast.cw--home { --cw-acc: var(--navy,#003DA5); --cw-acc-600: #002f80; --cw-acc-50: #edf2fb; --cw-acc-100: #d4e0f4; }
.cw.cw--fin, .cw-pa.cw--fin, .cw-drawer.cw--fin, .cw-toast.cw--fin { --cw-acc: #7c5214; --cw-acc-600: #654210; --cw-acc-50: #f8f2e7; --cw-acc-100: #ecdcbc; }
.cw.cw--cli, .cw-pa.cw--cli, .cw-drawer.cw--cli, .cw-toast.cw--cli { --cw-acc: #3f4fa0; --cw-acc-600: #33418a; --cw-acc-50: #eff1fa; --cw-acc-100: #d7dcf2; }
.cw.cw--mkt, .cw-pa.cw--mkt, .cw-drawer.cw--mkt, .cw-toast.cw--mkt { --cw-acc: #a1306b; --cw-acc-600: #862758; --cw-acc-50: #fbeef4; --cw-acc-100: #f3d3e3; }
.cw.cw--sys, .cw-pa.cw--sys, .cw-drawer.cw--sys, .cw-toast.cw--sys { --cw-acc: #3b4658; --cw-acc-600: #2c3544; --cw-acc-50: #f0f2f5; --cw-acc-100: #d9dee6; }
.cw-pa.cw--loc, .cw-drawer.cw--loc { --cw-acc: #0b6b4f; --cw-acc-600: #08573f; --cw-acc-50: #eaf5f0; --cw-acc-100: #cde8dc; }

.cw, .cw-drawer, .cw-pa {
  --pg-ok: #1e7a4f; --pg-ok-50: #eaf5ef; --pg-ok-100: #c7e5d4;
  --pg-warn: #8f5e12; --pg-warn-50: #faf4e8; --pg-warn-100: #efe0bf;
  --pg-late: #c01c2b; --pg-late-50: #fdf0f1; --pg-late-100: #f7d5d9;
  --pg-info: #0b47b3; --pg-info-50: #edf2fc; --pg-info-100: #d3e0f7;
}
.cw ::-webkit-scrollbar, .cw-drawer ::-webkit-scrollbar { width: 8px; height: 8px; }
.cw ::-webkit-scrollbar-thumb, .cw-drawer ::-webkit-scrollbar-thumb { background: #cdd4de; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.cw ::-webkit-scrollbar-track, .cw-drawer ::-webkit-scrollbar-track { background: transparent; }
.cw a { color: var(--cw-acc); text-underline-offset: 3px; }
.cw input, .cw select, .cw textarea, .cw-drawer input, .cw-drawer select, .cw-drawer textarea { caret-color: var(--cw-acc); accent-color: var(--cw-acc); }

/* ---------- cabeçalho: lado direito ---------- */
.pg-aside { display: flex; flex-direction: column; gap: 8px; width: 320px; flex-shrink: 0; }
.pg-aside .cw-meta-top { margin: 0; }
.pg-meter { display: flex; gap: 3px; height: 8px; }
.pg-meter i { display: block; flex: 1 1 0; min-width: 4px; border-radius: 3px; background: #e3e8ef; transition: flex-grow .4s var(--cw-ease); }
.pg-meter.is-empty { background: #e3e8ef; border-radius: 3px; }
.pg-meter .is-ok { background: var(--pg-ok); }
.pg-meter .is-late { background: var(--pg-late); }
.pg-meter .is-warn { background: #d9a64e; }
.pg-meter .is-acc { background: var(--cw-acc); }
.pg-meter .is-wait { background: #b6c0cd; }
.pg-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--cw-muted); }
.pg-leg li { display: inline-flex; align-items: center; gap: 6px; }
.pg-leg i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #b6c0cd; }
.pg-leg i.is-ok { background: var(--pg-ok); } .pg-leg i.is-late { background: var(--pg-late); } .pg-leg i.is-warn { background: #d9a64e; } .pg-leg i.is-acc { background: var(--cw-acc); }
.pg-leg b { color: var(--cw-ink); font-weight: 700; }
.pg-head-cta { display: flex; flex-wrap: wrap; gap: 8px; }

/* abas das páginas: nunca quebram linha.
   A faixa (abas + filtros) quebra linha quando os filtros não cabem: antes os
   filtros não encolhiam e as abas eram espremidas até sumir (ex.: 1024–1366px). */
.pgw .cw-nav { flex-wrap: wrap; row-gap: 0; }
.pgw .cw-tab { white-space: nowrap; }
.pgw .cw-tabs { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.pgw .cw-tabs::-webkit-scrollbar { display: none; }
.pgw .cw-tools { flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }

/* barra de filtros sem abas */
.pg-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pg-toolbar .cw-search { flex: 1 1 280px; max-width: 520px; }
.pg-toolbar .cw-search input { width: 100%; }
.pg-toolbar > .pg-toolbar-end { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* seletor de mês */
.pg-month { display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 2px; border-radius: 10px; border: 1px solid var(--cw-line); background: var(--cw-surface); }
.pg-month button { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--cw-muted); cursor: pointer; }
.pg-month button:hover { background: var(--cw-sunk); color: var(--cw-ink); }
.pg-month span { display: inline-block; min-width: 124px; padding: 0 6px; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--cw-ink); white-space: nowrap; }
.pg-month span::first-letter { text-transform: uppercase; }

/* ---------- faixa-resumo (cada célula filtra a lista) ---------- */
.pg-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(158px, 1fr); margin: 0 0 18px; overflow-x: auto; scrollbar-width: thin;
  background: var(--cw-surface); border: 1px solid var(--cw-line); border-radius: var(--cw-r-lg); overflow: hidden;
}
.pg-cell {
  position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 16px 13px;
  border: 0; border-left: 1px solid var(--cw-line-2); background: none; font: inherit; color: inherit; text-align: left;
}
.pg-cell:first-child { border-left: 0; }
button.pg-cell { cursor: pointer; transition: background .15s; }
button.pg-cell:hover { background: #fafbfc; }
.pg-cell::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2.5px; border-radius: 2px 2px 0 0; background: var(--cw-acc); transform: scaleX(0); transition: transform .22s var(--cw-ease); }
.pg-cell.is-on { background: var(--cw-acc-50); }
.pg-cell.is-on::after { transform: scaleX(1); }
.pg-cell-l { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--cw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-cell-l i { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #b6c0cd; }
.pg-cell-v { font-size: 20px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; color: var(--cw-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-cell small { font-size: 12px; color: var(--cw-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-cell--ok .pg-cell-l i { background: var(--pg-ok); }
.pg-cell--late .pg-cell-l i { background: var(--pg-late); }
.pg-cell--late .pg-cell-v { color: var(--pg-late); }
.pg-cell--warn .pg-cell-l i { background: #d9a64e; }
.pg-cell--acc .pg-cell-l i { background: var(--cw-acc); }
.pg-cell--ok.is-on::after { background: var(--pg-ok); }
.pg-cell--late.is-on { background: var(--pg-late-50); }
.pg-cell--late.is-on::after { background: var(--pg-late); }

/* ---------- pílulas de estado ---------- */
.cw-pill--ok { background: var(--pg-ok-50); color: var(--pg-ok); }
.cw-pill--warn { background: var(--pg-warn-50); color: var(--pg-warn); }
.cw-pill--late { background: var(--pg-late-50); color: var(--pg-late); }
.cw-pill--acc { background: var(--cw-acc-50); color: var(--cw-acc); }
.cw-pill--quiet { background: #f0f2f5; color: var(--cw-muted); font-weight: 500; }
.cw-pill .cw-ic { margin-right: 4px; }
.pg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #b6c0cd; flex-shrink: 0; }
.pg-dot--ok { background: var(--pg-ok); } .pg-dot--late { background: var(--pg-late); } .pg-dot--warn { background: #d9a64e; } .pg-dot--acc { background: var(--cw-acc); }

/* ---------- tabela das páginas ---------- */
.pg-tbl { min-width: 720px; }
.pg-tbl td { font-size: 13.5px; color: var(--cw-text); }
.pg-tbl td.num, .pg-tbl th.num { text-align: right; white-space: nowrap; }
.pg-tbl td.ctr, .pg-tbl th.ctr { text-align: center; }
.pg-tbl .cw-pill { white-space: nowrap; }
.pg-tbl td.act { width: 1%; white-space: nowrap; text-align: right; }
.pg-tbl .pg-main { display: block; font-weight: 700; color: var(--cw-ink); }
.pg-tbl .pg-sub { display: block; margin-top: 1px; font-size: 12.5px; color: var(--cw-faint); }
.pg-tbl .pg-money { font-weight: 700; color: var(--cw-ink); }
.pg-tbl .pg-money.is-late { color: var(--pg-late); }
.pg-tbl .pg-money.is-ok { color: var(--pg-ok); }
.pg-tbl tbody tr.is-dim td { color: var(--cw-faint); }
.pg-tbl tbody tr.is-dim .pg-main { color: var(--cw-muted); }
.pg-tbl tbody tr.is-sel { background: var(--cw-acc-50); }
.pg-tbl tbody tr:not([onclick]) { cursor: default; }
.pg-tbl tfoot td { padding: 11px 16px; border-top: 1px solid var(--cw-line); background: #fafbfc; font-weight: 700; color: var(--cw-ink); }
.pg-row-act { display: inline-flex; gap: 6px; justify-content: flex-end; }
.pg-row-act .cw-btn { height: 30px; padding: 0 11px; font-size: 12.5px; }
.pg-row-act .cw-icbtn { width: 30px; height: 30px; border-radius: 8px; }
.pg-tbl tbody tr .pg-row-act--hover { opacity: 0; transition: opacity .12s; }
.pg-tbl tbody tr:hover .pg-row-act--hover, .pg-tbl tbody tr:focus-within .pg-row-act--hover { opacity: 1; }
.pg-tbl-empty { padding: 36px 24px; text-align: center; }
.pg-tbl-empty h3 { margin: 0 0 4px; font-size: 16px; color: var(--cw-ink); }
.pg-tbl-empty p { margin: 0 auto; max-width: 48ch; font-size: 13.5px; color: var(--cw-muted); line-height: 1.5; }
.pg-tbl-empty .cw-btn { margin-top: 14px; }
.pg-count b { color: var(--cw-ink); }

/* ---------- blocos de conteúdo ---------- */
.pg-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.pg-cols--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pg-stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pg-box { background: var(--cw-surface); border: 1px solid var(--cw-line); border-radius: var(--cw-r-lg); box-shadow: var(--cw-shadow); overflow: hidden; min-width: 0; }
.pg-box-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px 12px; border-bottom: 1px solid var(--cw-line-2); }
.pg-box-h h2, .pg-box-h h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--cw-ink); }
.pg-box-h .cw-muted { font-size: 12.5px; }
.pg-box-h > .pg-box-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pg-box-b { padding: 16px 18px; }
.pg-box-b--flush { padding: 0; }
.pg-box .cw-table-wrap { margin: 0; border: 0; border-radius: 0; box-shadow: none; }

/* lista simples dentro de caixas/painéis */
.pg-list { list-style: none; margin: 0; padding: 0; }
.pg-list > li + li { border-top: 1px solid var(--cw-line-2); }
.pg-li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 11px 18px; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
button.pg-li, a.pg-li { cursor: pointer; transition: background .12s; text-decoration: none; }
button.pg-li:hover, a.pg-li:hover { background: #fafbfc; }
.pg-li-main { min-width: 0; }
.pg-li-t { display: block; font-size: 14px; font-weight: 700; color: var(--cw-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-li-s { display: block; margin-top: 1px; font-size: 12.5px; color: var(--cw-muted); line-height: 1.4; }
.pg-li-end { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cw-muted); white-space: nowrap; }
.pg-li-end b { color: var(--cw-ink); }
.pg-li .cw-av { width: 34px; height: 34px; font-size: 12px; }
.pg-ic-sq { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--cw-acc-50); color: var(--cw-acc); flex-shrink: 0; }
.pg-ic-sq--late { background: var(--pg-late-50); color: var(--pg-late); }
.pg-ic-sq--ok { background: var(--pg-ok-50); color: var(--pg-ok); }
.pg-ic-sq--warn { background: var(--pg-warn-50); color: var(--pg-warn); }
.pg-ic-sq--quiet { background: #f0f2f5; color: var(--cw-muted); }
.pg-panel-list { margin: 0 -16px -12px; }
.pg-panel-list .pg-li { padding: 9px 16px; }

/* barras horizontais */
.pg-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pg-bar { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 13px; }
.pg-bar-l { color: var(--cw-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-bar-t { height: 8px; border-radius: 4px; background: #edf0f4; overflow: hidden; }
.pg-bar-t i { display: block; height: 100%; border-radius: 4px; background: var(--cw-acc); }
.pg-bar-t i.is-ok { background: var(--pg-ok); } .pg-bar-t i.is-late { background: var(--pg-late); } .pg-bar-t i.is-warn { background: #d9a64e; } .pg-bar-t i.is-quiet { background: #b6c0cd; }
.pg-bar-v { min-width: 56px; text-align: right; font-weight: 700; color: var(--cw-ink); white-space: nowrap; }
.pg-bar-v small { margin-left: 4px; font-weight: 500; color: var(--cw-faint); }
.cw-panel .pg-bar { grid-template-columns: minmax(0, 96px) minmax(0, 1fr) auto; gap: 10px; }
button.pg-bar { width: 100%; padding: 4px 6px; margin: -4px -6px; border: 0; border-radius: 8px; background: none; font: inherit; text-align: left; cursor: pointer; box-sizing: content-box; }
button.pg-bar:hover { background: var(--cw-sunk); }

/* colunas por mês (duas séries) */
.pg-chart { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
.pg-chart-y { position: relative; display: flex; flex-direction: column; justify-content: space-between; height: 180px; margin-top: -7px; margin-bottom: -7px; font-size: 11.5px; color: var(--cw-faint); text-align: right; white-space: nowrap; }
.pg-chart-plot { position: relative; height: 180px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; border-bottom: 1px solid var(--cw-line); background: repeating-linear-gradient(to top, transparent 0 44px, var(--cw-line-2) 44px 45px); }
.pg-chart-g { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 100%; position: relative; }
.pg-chart-g i { display: block; width: min(16px, 40%); border-radius: 4px 4px 0 0; background: var(--cw-acc); min-height: 2px; }
.pg-chart-g i.is-b { background: #c9d1dc; }
.pg-chart-g i.is-late { background: var(--pg-late); }
.pg-chart-g i.is-ok { background: var(--pg-ok); }
.pg-chart-g.is-cur i:not(.is-b) { box-shadow: 0 0 0 2px var(--cw-acc-100); }
.pg-chart-x { grid-column: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; font-size: 11.5px; color: var(--cw-faint); text-align: center; text-transform: capitalize; }
.pg-chart-x .is-cur { color: var(--cw-ink); font-weight: 700; }
.pg-chart-g[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 3;
  padding: 6px 9px; border-radius: 8px; background: var(--cw-ink); color: #fff; font-size: 12px; font-weight: 600; white-space: pre; pointer-events: none;
}

/* ---------- linha do tempo ---------- */
.pg-tl { list-style: none; margin: 0; padding: 0; }
.pg-tl-day { padding: 14px 18px 4px; font-size: 12.5px; font-weight: 700; color: var(--cw-muted); }
.pg-tl-day::first-letter { text-transform: uppercase; }
.pg-tl-it { position: relative; display: grid; grid-template-columns: 52px 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 18px; }
.pg-tl-it + .pg-tl-it::before { content: ""; position: absolute; left: calc(18px + 52px + 10px + 8.5px); top: -8px; height: 16px; width: 1px; background: var(--cw-line); }
.pg-tl-h { font-size: 12.5px; color: var(--cw-faint); padding-top: 1px; font-variant-numeric: tabular-nums; }
.pg-tl-dot { width: 18px; height: 18px; display: grid; place-items: center; }
.pg-tl-dot i { width: 9px; height: 9px; border-radius: 50%; background: #b6c0cd; box-shadow: 0 0 0 3px #fff; }
.pg-tl-dot i.is-acc { background: var(--cw-acc); } .pg-tl-dot i.is-late { background: var(--pg-late); } .pg-tl-dot i.is-ok { background: var(--pg-ok); } .pg-tl-dot i.is-warn { background: #d9a64e; }
.pg-tl-b { min-width: 0; font-size: 13.5px; color: var(--cw-text); line-height: 1.45; }
.pg-tl-b b { color: var(--cw-ink); }
.pg-tl-b small { display: block; font-size: 12.5px; color: var(--cw-faint); }

/* ---------- entidades em grade (pessoas, imóveis) ---------- */
.pg-ents { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pg-ent {
  display: flex; flex-direction: column; min-width: 0; background: var(--cw-surface); border: 1px solid var(--cw-line); border-radius: var(--cw-r-lg);
  overflow: hidden; cursor: pointer; text-align: left; font: inherit; color: inherit; padding: 0;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pg-ent:hover { border-color: #cdd5df; box-shadow: 0 10px 24px -16px rgba(13, 24, 41, .35); transform: translateY(-1px); }
.pg-ent.is-off { opacity: .62; }
.pg-ent-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; }
.pg-ent-top .cw-av { width: 44px; height: 44px; font-size: 14px; }
.pg-ent-id { min-width: 0; }
.pg-ent-id b { display: block; font-size: 15px; color: var(--cw-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-ent-id span { display: block; font-size: 12.5px; color: var(--cw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-ent-body { padding: 0 16px 12px; font-size: 13px; color: var(--cw-muted); line-height: 1.45; }
.pg-ent-foot { margin-top: auto; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 1px solid var(--cw-line-2); }
.pg-ent-foot > span { padding: 9px 12px; font-size: 12px; color: var(--cw-faint); }
.pg-ent-foot > span + span { border-left: 1px solid var(--cw-line-2); }
.pg-ent-foot b { display: block; font-size: 14.5px; color: var(--cw-ink); }
.pg-ent-photo { position: relative; aspect-ratio: 16 / 10; background: #eef1f5; color: var(--cw-faint); display: grid; place-items: center; }
.pg-ent-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pg-ent-photo .cw-pill { position: absolute; left: 10px; top: 10px; }

/* ---------- avisos ---------- */
.pg-note { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--cw-line); background: var(--cw-sunk); font-size: 13.5px; color: var(--cw-text); line-height: 1.45; }
.pg-note > .cw-ic { color: var(--cw-muted); }
.pg-note b { color: var(--cw-ink); }
.pg-note--late { background: var(--pg-late-50); border-color: var(--pg-late-100); }
.pg-note--late > .cw-ic, .pg-note--late b { color: var(--pg-late); }
.pg-note--warn { background: var(--pg-warn-50); border-color: var(--pg-warn-100); }
.pg-note--warn > .cw-ic { color: var(--pg-warn); }
.pg-note--ok { background: var(--pg-ok-50); border-color: var(--pg-ok-100); }
.pg-note--ok > .cw-ic { color: var(--pg-ok); }
.pg-note--acc { background: var(--cw-acc-50); border-color: var(--cw-acc-100); }
.pg-note--acc > .cw-ic { color: var(--cw-acc); }
.pg-note .cw-btn { height: 32px; }
.pg-gap { margin-bottom: 18px; }

/* ---------- dados em pares ---------- */
.pg-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 0; }
.pg-kv > div { min-width: 0; }
.pg-kv dt { font-size: 12.5px; color: var(--cw-faint); margin-bottom: 2px; }
.pg-kv dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--cw-ink); overflow-wrap: anywhere; }
.pg-kv--1 { grid-template-columns: minmax(0, 1fr); }
.pg-kv--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- formulários (ficha lateral e páginas) ---------- */
.pg-form { display: flex; flex-direction: column; gap: 14px; }
.pg-f { display: block; min-width: 0; }
.pg-f > span { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--cw-muted); }
.pg-f > span small { font-weight: 400; color: var(--cw-faint); }
.pg-f input, .pg-f select, .pg-f textarea {
  width: 100%; min-height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--cw-line); background: var(--cw-surface);
  font: 14px var(--font-sans), sans-serif; color: var(--cw-ink); transition: border-color .15s, box-shadow .15s;
}
.pg-f textarea { min-height: 88px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.pg-f select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2356647a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.pg-f input:focus, .pg-f select:focus, .pg-f textarea:focus { outline: none; border-color: var(--cw-acc); box-shadow: 0 0 0 3px var(--cw-acc-50); }
.pg-f input[aria-invalid="true"], .pg-f select[aria-invalid="true"] { border-color: var(--pg-late); box-shadow: 0 0 0 3px var(--pg-late-50); }
.pg-f input::placeholder, .pg-f textarea::placeholder { color: var(--cw-faint); }
.pg-f-hint { display: block; margin-top: 5px; font-size: 12.5px; color: var(--cw-faint); line-height: 1.4; }
.pg-f-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pg-f-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-f-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.pg-f-foot .cw-btn { height: 40px; padding: 0 18px; font-size: 14px; }
.pg-f-foot .is-left { margin-right: auto; }
.pg-choice { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-choice button { height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--cw-line); background: var(--cw-surface); font: 600 13px var(--font-sans), sans-serif; color: var(--cw-text); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.pg-choice button:hover { border-color: var(--cw-acc); }
.pg-choice button.is-on { background: var(--cw-acc); border-color: var(--cw-acc); color: #fff; }
/* position:relative ancora o checkbox invisível no próprio rótulo: sem isso ele
   ia para o fim da página e o clique rolava o <html>, deixando a tela em branco. */
.pg-toggle { position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.pg-toggle input { position: absolute; top: 0; left: 0; opacity: 0; width: 1px; height: 1px; }
.pg-toggle-sw { position: relative; flex-shrink: 0; width: 38px; height: 22px; margin-top: 1px; border-radius: 999px; background: #cfd6e0; transition: background .18s; }
.pg-toggle-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(13, 24, 41, .25); transition: transform .18s var(--cw-ease); }
.pg-toggle input:checked + .pg-toggle-sw { background: var(--cw-acc); }
.pg-toggle input:checked + .pg-toggle-sw::after { transform: translateX(16px); }
.pg-toggle input:focus-visible + .pg-toggle-sw { outline: 2px solid var(--cw-acc); outline-offset: 2px; }
.pg-toggle-t b { display: block; font-size: 14px; color: var(--cw-ink); }
.pg-toggle-t small { display: block; font-size: 12.5px; color: var(--cw-muted); line-height: 1.4; }

/* ---------- telas de configuração ---------- */
.pg-set { background: var(--cw-surface); border: 1px solid var(--cw-line); border-radius: var(--cw-r-lg); box-shadow: var(--cw-shadow); }
.pg-set-sec { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 28px; padding: 22px 24px; }
.pg-set-sec + .pg-set-sec { border-top: 1px solid var(--cw-line-2); }
.pg-set-h h2 { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--cw-ink); }
.pg-set-h p { margin: 5px 0 0; font-size: 13px; color: var(--cw-muted); line-height: 1.5; }
.pg-set-b { min-width: 0; }

/* ---------- ficha lateral: pedaços ---------- */
.pg-dr-sec + .pg-dr-sec { margin-top: 0; }
.pg-dr-foot { position: sticky; bottom: -40px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin: 4px -22px -40px; padding: 14px 22px 18px; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--cw-line-2); }
.pg-dr-foot .cw-btn { height: 40px; padding: 0 16px; font-size: 14px; }
.pg-dr-foot .is-left { margin-right: auto; }
.pg-danger { color: var(--pg-late) !important; }
.cw-btn--danger { background: var(--cw-surface); color: var(--pg-late); border-color: var(--pg-late-100); }
.cw-btn--danger:hover { background: var(--pg-late-50); }
.cw-btn--ok { background: var(--pg-ok); color: #fff; }
.cw-btn--ok:hover { background: #17633f; }
.cw-btn--sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.pg-btn-wa { --cw-surface: #fff; --cw-text: #1f2a3d; --cw-line: #e1e6ee; --cw-sunk: #f5f7fa; }
.pg-btn-wa .cw-ic { color: #11804a; }

/* passos numerados (como funciona) */
.pg-steps { margin: 0; padding: 0; list-style: none; counter-reset: pgs; }
.pg-steps li { position: relative; display: grid; gap: 1px; padding: 0 0 10px 26px; counter-increment: pgs; }
.pg-steps li::before { content: counter(pgs); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--cw-acc-50); color: var(--cw-acc); font-size: 11px; font-weight: 700; }
.pg-steps li:not(:last-child)::after { content: ""; position: absolute; left: 8.5px; top: 22px; bottom: 2px; width: 1px; background: var(--cw-line); }
.pg-steps b { font-size: 13.5px; color: var(--cw-ink); }
.pg-steps span { font-size: 12.5px; color: var(--cw-muted); line-height: 1.4; }

/* ---------- Extrato do Proprietário: rubricas por imóvel ---------- */
.ex-imvs { display: flex; flex-direction: column; gap: 8px; }
.ex-imv { border: 1px solid var(--cw-line); border-radius: 12px; background: var(--cw-surface); overflow: hidden; }
.ex-imv > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.ex-imv > summary::-webkit-details-marker { display: none; }
.ex-imv > summary:hover { background: #fafbfc; }
.ex-imv-end { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.ex-imv-end b { font-size: 14px; color: var(--cw-ink); }
.ex-imv-end > .cw-ic:last-child { color: var(--cw-faint); transition: transform .2s var(--cw-ease); }
.ex-imv[open] .ex-imv-end > .cw-ic:last-child { transform: rotate(180deg); }
.ex-imv-b { padding: 4px 14px 14px; border-top: 1px solid var(--cw-line-2); }
.ex-bd { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 10px; }
.ex-bd h4 { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: var(--cw-muted); }
.ex-bd ul { list-style: none; margin: 0; padding: 0; }
.ex-l { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--cw-line-2); font-size: 13px; }
.ex-l:first-child { border-top: 0; }
.ex-l.is-empty { color: var(--cw-faint); }
.ex-l-t { min-width: 0; color: var(--cw-text); }
.ex-l-t small { display: block; font-size: 12px; color: var(--cw-faint); }
.ex-l-v { white-space: nowrap; color: var(--cw-ink); }
.ex-l-v.is-in { color: var(--pg-ok); }
.ex-l-v.is-out, .ex-l-v.is-highlight { color: var(--pg-late); }
.ex-bd-tot { display: flex; justify-content: space-between; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--cw-acc-50); font-size: 13.5px; color: var(--cw-ink); }
.ex-bd-tot b { color: var(--cw-acc); }
@media (max-width: 760px) { .ex-bd { grid-template-columns: minmax(0, 1fr); } .ex-imv > summary { grid-template-columns: auto minmax(0, 1fr); } .ex-imv-end { grid-column: 1 / -1; justify-content: space-between; } }

/* ---------- Repasses: grade mensal e selos herdados ---------- */
.rp-grade th.rp-mes-th, .rp-grade td.rp-mes-td { width: 40px; min-width: 40px; padding: 8px 2px; text-align: center; }
.pgw .rp-mes, .rp-leg .rp-mes {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 8px; border: 1px solid transparent;
  font: 700 12px var(--font-sans), sans-serif; cursor: pointer; transition: transform .12s var(--cw-ease), box-shadow .12s;
}
.pgw .rp-mes:hover { transform: translateY(-1px); box-shadow: 0 4px 10px -6px rgba(13, 24, 41, .35); }
.pgw .rp-mes:focus-visible { outline: 2px solid var(--cw-acc); outline-offset: 2px; }
.pgw .rp-mes.rR, .pgw .rp-mes.rT, .rp-leg .rp-mes.rR, .rp-leg .rp-mes.rT { background: var(--pg-ok-50); color: var(--pg-ok); border-color: var(--pg-ok-100); }
.pgw .rp-mes.rA, .rp-leg .rp-mes.rA { background: var(--cw-acc); color: #fff; border-color: var(--cw-acc); }
.pgw .rp-mes.rN, .rp-leg .rp-mes.rN { background: #fff; color: #b6c0cd; border-color: var(--cw-line); }
.pgw .rp-mes.rP, .rp-leg .rp-mes.rP { background: var(--pg-warn-50); color: var(--pg-warn); border-color: var(--pg-warn-100); }
.pgw .rp-mes.rI, .rp-leg .rp-mes.rI { background: #f0f2f5; color: var(--cw-muted); border-color: var(--cw-line); }
.pgw .rp-mes.rB, .rp-leg .rp-mes.rB { background: var(--pg-late-50); color: var(--pg-late); border-color: var(--pg-late-100); }
.pgw .rp-mes.rX, .rp-leg .rp-mes.rX { background: transparent; color: #c3cbd6; border-color: transparent; }
#rp-search-count:empty { display: none; }
.rp-leg { gap: 6px 16px; }
.rp-leg li { gap: 7px; }
.rp-leg .rp-mes { width: 22px; height: 22px; border-radius: 6px; cursor: default; font-size: 11px; }
.rp-status { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.rp-status.ok { background: #eaf5ef; color: #1e7a4f; }
.rp-status.pend { background: #faf4e8; color: #8f5e12; }
.rp-status.ready { background: #f8f2e7; color: #7c5214; }
.rp-status.block { background: #f0f2f5; color: #56647a; }

/* ---------- Central de notificações ---------- */
.nt-list { padding-bottom: 6px; }
.nt-it { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 18px; border-top: 1px solid var(--cw-line-2); }
.nt-list .pg-tl-day + .nt-it { border-top: 0; }
.nt-it.is-lida { background: transparent; }
.nt-it:not(.is-lida) { background: color-mix(in srgb, var(--cw-acc-50) 55%, #fff); }
.nt-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--cw-acc-50); color: var(--cw-acc); }
.nt-ic svg { width: 18px; height: 18px; }
.nt-it.is-lida .nt-ic { background: #f0f2f5; color: var(--cw-muted); }
.nt-it.is-alta .nt-ic { background: var(--pg-late-50); color: var(--pg-late); }
.nt-b { min-width: 0; }
.nt-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nt-top b { font-size: 14px; color: var(--cw-ink); }
.nt-it.is-lida .nt-top b { font-weight: 600; color: var(--cw-text); }
.nt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cw-acc); display: inline-block; }
.nt-h { margin-left: auto; font-size: 12px; color: var(--cw-faint); }
.nt-b p { margin: 3px 0 0; font-size: 13.5px; color: var(--cw-text); line-height: 1.45; overflow-wrap: anywhere; }
.nt-b small { display: block; margin-top: 3px; font-size: 12px; color: var(--cw-faint); }
.nt-act { display: flex; gap: 6px; align-items: center; }
@container cw (max-width: 560px) { .nt-it { grid-template-columns: 32px minmax(0, 1fr); } .nt-act { grid-column: 2; } }

.vis-hr { display: grid; place-items: center; height: 36px; border-radius: 10px; background: var(--cw-acc-50); color: var(--cw-acc); font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nt-it.is-lida .vis-hr { background: #f0f2f5; color: var(--cw-muted); }

/* skeleton */
.pg-sk { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #eef1f5 0%, #f6f8fa 50%, #eef1f5 100%); background-size: 200% 100%; animation: pg-sk 1.2s ease-in-out infinite; }
@keyframes pg-sk { to { background-position: -200% 0; } }

/* ---------- responsivo ---------- */
@container cw (max-width: 1000px) {
  .pg-cols { grid-template-columns: minmax(0, 1fr); }
  .pg-cols > .cw-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; align-items: start; }
}
@container cw (min-width: 1001px) and (max-width: 1180px) {
  .pg-cols { grid-template-columns: minmax(0, 1fr) 290px; }
}
@container cw (max-width: 880px) {
  .pg-aside { width: 100%; }
  .pg-strip { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
  .pg-cell { border-top: 1px solid var(--cw-line-2); margin-top: -1px; }
  .pg-cols--even { grid-template-columns: minmax(0, 1fr); }
  .pg-set-sec { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px; }
  .pg-kv--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container cw (max-width: 560px) {
  .pg-strip { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-cell { border-left: 0; border-top: 1px solid var(--cw-line-2); }
  .pg-cell:nth-child(-n+2) { border-top: 0; }
  .pg-cell:nth-child(even) { border-left: 1px solid var(--cw-line-2); }
  .pg-cell-v { font-size: 17px; }
  .pg-bar { grid-template-columns: minmax(0, 96px) minmax(0, 1fr) auto; }
  .pg-ents { grid-template-columns: minmax(0, 1fr); }
}
/* tabelas viram lista empilhada no celular (grades mensais continuam rolando de lado) */
@container cw (max-width: 640px) {
  .pg-tbl:not(.rp-grade) { min-width: 0 !important; }
  .pg-tbl:not(.rp-grade) thead { display: none; }
  .pg-tbl:not(.rp-grade), .pg-tbl:not(.rp-grade) > tbody, .pg-tbl:not(.rp-grade) > tbody > tr, .pg-tbl:not(.rp-grade) > tbody > tr > td { display: block; width: 100%; }
  .pg-tbl:not(.rp-grade) > tbody > tr { padding: 12px 16px; border-top: 1px solid var(--cw-line-2); }
  .pg-tbl:not(.rp-grade) > tbody > tr:first-child { border-top: 0; }
  .pg-tbl:not(.rp-grade) > tbody > tr > td { padding: 3px 0; border: 0; text-align: left; }
  .pg-tbl:not(.rp-grade) > tbody > tr > td:empty { display: none; }
  .pg-tbl:not(.rp-grade) td.num { text-align: left; }
  .pg-tbl:not(.rp-grade) > tbody > tr > td.ctr[data-label],
  .pg-tbl:not(.rp-grade) > tbody > tr > td.num[data-label]:not(:has(.pg-sub)) { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .pg-tbl:not(.rp-grade) > tbody > tr > td.ctr[data-label]::before,
  .pg-tbl:not(.rp-grade) > tbody > tr > td.num[data-label]:not(:has(.pg-sub))::before { content: attr(data-label); color: var(--cw-muted); font-size: 12.5px; font-weight: 500; }
  .pg-tbl:not(.rp-grade) > tbody > tr > td.ctr[data-label] { align-items: center; }
  .pg-tbl:not(.rp-grade) td.act { width: 100%; margin-top: 8px; }
  .pg-tbl:not(.rp-grade) .pg-row-act { justify-content: flex-start; flex-wrap: wrap; }
  .pg-tbl:not(.rp-grade) .pg-row-act--hover { opacity: 1; }
  .pg-tbl:not(.rp-grade) > tfoot, .pg-tbl:not(.rp-grade) > tfoot > tr { display: flex; width: 100%; justify-content: space-between; }
  .pg-tbl:not(.rp-grade) > tfoot > tr > td:empty { display: none; }
  .cw-table-tools { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .pg-f-row, .pg-f-row--3, .pg-kv { grid-template-columns: minmax(0, 1fr); }
  .pg-dr-foot { margin: 4px -14px -32px; padding: 12px 14px 16px; bottom: -32px; }
  .pg-dr-foot .cw-btn { flex: 1 1 auto; }
  .pg-tbl tbody tr .pg-row-act--hover { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-sk { animation: none; }
}

/* ===== primitivas antigas relidas no kit =====
   Modais, formulários e telas internas que ainda montam .btn/.card/.kc/.fg
   passam a falar a mesma língua das mesas, sem tocar no JS delas. */
.ca { background: #f3f5f8; }
.ph { box-shadow: none; border-bottom: 1px solid #e1e6ee; }
.pt { font-size: 15px; color: #0d1829; letter-spacing: -.01em; }

.btn {
  min-height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid #e1e6ee; background: #fff; color: #1f2a3d;
  font-size: 13px; font-weight: 600; letter-spacing: .005em; gap: 6px; justify-content: center;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:hover { background: #f5f7fa; border-color: #cfd6e0; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid #0b47b3; outline-offset: 2px; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn-red { background: #c01c2b; border-color: #c01c2b; color: #fff; box-shadow: 0 1px 2px rgba(192, 28, 43, .25); }
.btn-red:hover { background: #a31724; border-color: #a31724; box-shadow: 0 1px 2px rgba(192, 28, 43, .25); }
.btn-green { background: #1e7a4f; border-color: #1e7a4f; color: #fff; box-shadow: 0 1px 2px rgba(30, 122, 79, .25); }
.btn-green:hover { background: #17633f; border-color: #17633f; }
.btn-blue { background: #0b47b3; border-color: #0b47b3; color: #fff; box-shadow: 0 1px 2px rgba(11, 71, 179, .25); }
.btn-blue:hover { background: #083a94; border-color: #083a94; }
.btn-gray { background: #56647a; border-color: #56647a; color: #fff; }
.btn-gray:hover { background: #45526a; }
.btn-sm { min-height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { min-height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }

.card { border-color: #e1e6ee; border-radius: 14px; box-shadow: 0 1px 2px rgba(13, 24, 41, .05), 0 6px 20px -12px rgba(13, 24, 41, .14); }
.chd { padding: 14px 18px 12px; border-bottom-color: #edf0f5; }
.chd h3 { font-size: 15px; color: #0d1829; letter-spacing: -.005em; }
.cbd { padding: 16px 18px; }
.kc { border-color: #e1e6ee; border-radius: 14px; box-shadow: none; padding: 14px 16px; }
.kc:hover { box-shadow: none; }
.kc-l { font-size: 12.5px; text-transform: none; letter-spacing: 0; color: #56647a; }
.kc-v { font-size: 21px; letter-spacing: -.01em; color: #0d1829; font-variant-numeric: tabular-nums; }
.kc-s { font-size: 12px; color: #667386; }
.kc.red .kc-v { color: #c01c2b; } .kc.green .kc-v { color: #1e7a4f; } .kc.blue .kc-v { color: #0b47b3; } .kc.gold .kc-v { color: #87621f; } .kc.warn .kc-v { color: #8f5e12; }

table { font-size: 13px; font-variant-numeric: tabular-nums; }
th { font-size: 12.5px; text-transform: none; letter-spacing: 0; color: #56647a; background: #fafbfc; border-bottom: 1px solid #e1e6ee; }
td { border-bottom-color: #edf0f5; color: #1f2a3d; }
tr:hover td { background: #fafbfc; }
.sum-row td { background: #fafbfc; color: #0d1829; border-top: 1px solid #e1e6ee; }

.badge { border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.bg { background: #eaf5ef; color: #1e7a4f; } .br { background: #fdf0f1; color: #c01c2b; } .by { background: #faf4e8; color: #8f5e12; }
.bb { background: #edf2fc; color: #0b47b3; } .bgr { background: #f0f2f5; color: #56647a; } .bt { background: #e8f4f5; color: #0b6874; }

.fg label { font-size: 13px; text-transform: none; letter-spacing: 0; color: #56647a; }
.fg input, .fg select, .fg textarea { min-height: 40px; border-color: #e1e6ee; border-radius: 9px; font-size: 14px; color: #0d1829; }
.fg textarea { min-height: 72px; line-height: 1.5; }
.fg input:focus, .fg select:focus, .fg textarea:focus { border-color: #0b47b3; box-shadow: 0 0 0 3px #edf2fc; }
.fg-err { font-size: 12.5px; color: #c01c2b; }

.mov { background: rgba(13, 24, 41, .34); backdrop-filter: none; }
.modal { border-radius: 16px; box-shadow: 0 24px 60px -24px rgba(13, 24, 41, .5), 0 2px 6px rgba(13, 24, 41, .06); scrollbar-width: thin; scrollbar-color: #cdd4de transparent; }
.mhd { padding: 18px 22px 14px; border-bottom-color: #edf0f5; border-radius: 16px 16px 0 0; }
.mhd h3 { font-size: 17px; color: #0d1829; letter-spacing: -.01em; }
.mbd { padding: 20px 22px; }
.mft { padding: 14px 22px; border-top-color: #edf0f5; }
.mft .btn { min-height: 40px; padding: 0 18px; font-size: 14px; }

.ui-dlg { background: rgba(13, 24, 41, .38); backdrop-filter: none; }
.ui-dlg-card { border-radius: 16px; }
.ui-dlg-accent { display: none; }
.ui-dlg-title { font-size: 16px; color: #0d1829; }
.ui-dlg-msg { font-size: 14px; color: #3b475a; }

.fbar { background: #fafbfc; border-bottom-color: #edf0f5; }
.chip { height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; border-color: #e1e6ee; font-size: 12.5px; color: #56647a; }
.chip:hover { border-color: #cfd6e0; color: #0d1829; }
.chip.on { background: #0d1829; border-color: #0d1829; color: #fff; box-shadow: none; }
.sinp { border-radius: 9px; }
::selection { background: #d3e0f7; color: #0d1829; }

/* ---------- Score de risco ---------- */
.sr-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.sr-dots i, .sr-leg i, .sr-hist i { width: 9px; height: 14px; border-radius: 3px; background: #e6eaf0; flex: none; display: inline-block; }
.sr-dots i.is-ok, .sr-leg i.is-ok, .sr-hist i.is-ok { background: var(--pg-ok); }
.sr-dots i.is-tarde, .sr-leg i.is-tarde, .sr-hist i.is-tarde { background: var(--pg-warn); }
.sr-dots i.is-aberto, .sr-leg i.is-aberto, .sr-hist i.is-aberto { background: var(--pg-late); }
.sr-dots i.is-parcial, .sr-leg i.is-parcial, .sr-hist i.is-parcial { background: repeating-linear-gradient(135deg, var(--pg-late) 0 3px, var(--pg-late-100) 3px 6px); }
.sr-dots i.is-futuro, .sr-leg i.is-futuro, .sr-hist i.is-futuro { background: #fff; box-shadow: inset 0 0 0 1.5px #cdd4de; }
.sr-dots i.is-x, .sr-leg i.is-x, .sr-hist i.is-x { background: #f3f5f8; }
.sr-score { display: inline-flex; align-items: center; gap: 10px; }
.sr-score b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 28px; letter-spacing: -.02em; }
.sr-score--late b { color: var(--pg-late); } .sr-score--warn b { color: var(--pg-warn); } .sr-score--ok b { color: var(--pg-ok); }
.sr-leg { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 13px; color: #56647a; }
.sr-leg li, .sr-hist li { display: flex; align-items: center; gap: 8px; }
.sr-fat { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sr-fat li { display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 10px; font-size: 14px; color: #0d1829; }
.sr-fat-pts { font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; border-radius: 8px; padding: 3px 0; font-size: 13px; background: #f0f2f5; color: #56647a; }
.sr-fat-pts.is-late { background: var(--pg-late-50); color: var(--pg-late); }
.sr-fat-pts.is-warn { background: var(--pg-warn-50); color: var(--pg-warn); }
.sr-fat-pts.is-ok { background: var(--pg-ok-50); color: var(--pg-ok); }
.sr-hist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: #3b475a; }
.pg-f input[readonly] { background: #f5f7fa; color: #56647a; cursor: default; }

/* ---------- Ranking ---------- */
.rk2-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; align-items: end; }
.rk2-pod { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px 16px; border: 1px solid var(--cw-line, #e1e6ee); border-radius: 14px; background: var(--cw-surface, #fff); cursor: pointer; font: inherit; color: inherit; text-align: center; transition: border-color .15s, transform .15s var(--cw-ease); }
.rk2-pod:hover { border-color: var(--cw-acc); transform: translateY(-1px); }
.rk2-pod:focus-visible { outline: 2px solid var(--cw-acc); outline-offset: 2px; }
.rk2-pod b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk2-pod small { font-size: 12.5px; color: var(--cw-muted); }
.rk2-pod-pts { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rk2-pod-pts small { font-size: 13px; font-weight: 600; }
.rk2-pod-pos { font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 2px 10px; border-radius: 999px; background: #f0f2f5; color: #56647a; }
.rk2-pod--1 { order: 2; padding-top: 26px; padding-bottom: 22px; border-color: #e3c77a; background: linear-gradient(180deg, #fdf8ea, var(--cw-surface, #fff) 60%); }
.rk2-pod--1 .rk2-pod-pos { background: #f3e2b0; color: #7a5a0c; }
.rk2-pod--2 { order: 1; } .rk2-pod--2 .rk2-pod-pos { background: #e6eaf0; color: #3b4658; }
.rk2-pod--3 { order: 3; } .rk2-pod--3 .rk2-pod-pos { background: #f3e1d2; color: #8a4b1c; }
.rk2-pos { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: 13px; color: #56647a; background: #f3f5f8; font-variant-numeric: tabular-nums; }
.rk2-pos--1 { background: #f3e2b0; color: #7a5a0c; } .rk2-pos--2 { background: #e6eaf0; color: #3b4658; } .rk2-pos--3 { background: #f3e1d2; color: #8a4b1c; }
.rk2-pts { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rk2-meta { display: block; height: 6px; border-radius: 3px; background: #e6eaf0; overflow: hidden; min-width: 90px; }
.rk2-meta i { display: block; height: 100%; border-radius: 3px; background: var(--cw-acc); }
.rk2-meta i.is-ok { background: var(--pg-ok); } .rk2-meta i.is-warn { background: #d9a64e; }
.pg-tbl tr.is-me td { background: color-mix(in srgb, var(--cw-acc) 6%, transparent); }
.rk2-mini td, .rk2-mini th { padding: 9px 10px; }
@media (max-width: 640px) {
  .rk2-podium { grid-template-columns: minmax(0, 1fr); }
  .rk2-pod--1, .rk2-pod--2, .rk2-pod--3 { order: 0; flex-direction: row; justify-content: flex-start; text-align: left; padding: 12px 14px; flex-wrap: wrap; }
}

/* ---------- Operação da equipe ---------- */
.oe2-funis { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.oe2-busy { position: fixed; right: 24px; bottom: 24px; padding: 10px 16px; border-radius: 12px; background: var(--cw-surface, #fff); box-shadow: 0 10px 30px -12px rgba(13, 24, 41, .35); z-index: 40; }

/* ---------- Marketing: biblioteca de artes ---------- */
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.mk-card { display: flex; flex-direction: column; border: 1px solid var(--cw-line, #e1e6ee); border-radius: 14px; background: var(--cw-surface, #fff); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.mk-card:hover { border-color: var(--cw-acc-100); box-shadow: 0 10px 24px -18px rgba(13, 24, 41, .4); }
.mk-prev { position: relative; height: 150px; display: grid; place-items: center; background: linear-gradient(160deg, var(--cw-acc-50), #f6f7fa); }
.mk-frame { height: 112px; max-width: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; background: var(--cw-surface, #fff); color: var(--cw-acc); box-shadow: 0 1px 0 rgba(13, 24, 41, .04), 0 8px 18px -12px rgba(13, 24, 41, .35); }
.mk-frame small { font-size: 11px; font-weight: 600; color: var(--cw-muted); letter-spacing: .01em; }
.mk-card.is-pending .mk-frame { color: #9aa5b5; }
.mk-flag { position: absolute; top: 10px; right: 10px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--pg-warn-50); color: var(--pg-warn); }
.mk-body { padding: 14px 16px 6px; flex: 1; }
.mk-cat { font-size: 12px; font-weight: 600; color: var(--cw-acc); }
.mk-body h3 { margin: 4px 0 6px; font-size: 15px; line-height: 1.3; color: var(--cw-text); }
.mk-body p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--cw-muted); }
.mk-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px 16px; }
.mk-foot .cw-btn { flex: 1; justify-content: center; }
.pg-note + .mk-grid { margin-top: 14px; }

/* ---------- Leads de campanha: rodízio ---------- */
.lc2-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.lc2-sw { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 32px; }
.lc2-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lc2-sw input:checked + .pg-toggle-sw { background: var(--cw-acc); }
.lc2-sw input:checked + .pg-toggle-sw::after { transform: translateX(16px); }
.lc2-sw input:focus-visible + .pg-toggle-sw { outline: 2px solid var(--cw-acc); outline-offset: 2px; }
.lc2-sw small { min-width: 22px; font-size: 12px; font-weight: 700; color: var(--cw-acc); font-variant-numeric: tabular-nums; text-align: left; }
.pg-tbl td.ctr .lc2-sw { justify-content: center; }

/* ---------- Auditoria ---------- */
.aud-det { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 460px; color: var(--cw-text); font-size: 13px; line-height: 1.45; }
.aud-det-full { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.55; color: var(--cw-text); }

/* ---------- Usuários ---------- */
.usr2-role { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--cw-text); }
.usr2-role::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--usr-role, #56647a); }
.usr2-pres { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--cw-muted); }
.usr2-pres i { width: 8px; height: 8px; border-radius: 50%; background: #c3cad5; }
.usr2-pres[data-presenca="online"] { color: var(--pg-ok); } .usr2-pres[data-presenca="online"] i { background: var(--pg-ok); box-shadow: 0 0 0 3px var(--pg-ok-50); }
.usr2-pres[data-presenca="ausente"] i, .usr2-pres[data-presenca="fila"] i { background: #d9a64e; }
.usr2-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.usr2-pend { display: grid; gap: 14px; max-width: 820px; }

/* ---------- Permissões ---------- */
.prm2 { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.prm2-list { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 260px); overflow: auto; padding: 6px; border: 1px solid var(--cw-line, #e1e6ee); border-radius: 14px; background: var(--cw-surface, #fff); position: sticky; top: 12px; }
.prm2-user { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.prm2-user:hover { background: #f5f7fa; }
.prm2-user.is-on { background: var(--cw-acc-50); box-shadow: inset 3px 0 0 var(--cw-acc); }
.prm2-user:focus-visible { outline: 2px solid var(--cw-acc); outline-offset: 1px; }
.prm2-user-txt { display: flex; flex-direction: column; min-width: 0; }
.prm2-user-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prm2-user-txt > span { font-size: 12.5px; color: var(--cw-muted); }
.prm2-bar { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: #e6eaf0; overflow: hidden; }
.prm2-bar i { display: block; height: 100%; background: var(--cw-acc); border-radius: 2px; }
.prm2-pct { font-size: 12.5px; font-weight: 600; color: var(--cw-muted); font-variant-numeric: tabular-nums; }
.prm2-panel { min-width: 0; border: 1px solid var(--cw-line, #e1e6ee); border-radius: 14px; background: var(--cw-surface, #fff); padding: 18px 20px; }
.pgw .prm-panel-head { border-bottom: 1px solid var(--cw-line-2, #edf0f5); padding: 0 0 14px; margin: 0 0 14px; }
.pgw .ac-toolbar { border-radius: 10px; }
@container cw (max-width: 880px) {
  .prm2 { grid-template-columns: minmax(0, 1fr); }
  .prm2-list { position: static; max-height: 280px; }
}

/* Configurações: orientação junto da ação, detalhes técnicos sob demanda. */
.int-status, .int-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.int-next { margin: 20px 0 8px; color: var(--cw-ink); font-size: 18px; line-height: 1.35; }
.int-help { margin: 0 0 16px; color: var(--cw-muted); font-size: 14px; line-height: 1.6; max-width: 70ch; overflow-wrap: anywhere; }
.int-tech { margin-top: 20px; border-top: 1px solid var(--cw-line); padding-top: 16px; overflow-wrap: anywhere; }
.int-tech summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--cw-ink); padding: 4px 0; }
.int-tech[open] summary { margin-bottom: 14px; }
.int-tech .pg-f { margin: 12px 0; }
.int-tech .pg-sub { line-height: 1.6; margin-top: 12px; }
.int-maintenance { background: var(--cw-surface); padding: 16px 20px; border-radius: 12px; border: 1px solid var(--cw-line); margin-top: 0; }
/* Setores do Inbox (Master): lista com editor de membros inline. */
#int-numeros-body:not(:empty), #int-setores-body:not(:empty) { margin-top: 20px; }
.int-setores-list { list-style: none; margin: 0; padding: 0; }
.int-setor { padding: 14px 0; }
.int-setor + .int-setor { border-top: 1px solid var(--cw-line-2); }
.int-setor-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 10px; }
.int-setor-nome { font-size: 15px; font-weight: 700; color: var(--cw-ink); overflow-wrap: anywhere; }
.int-setor-cor { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.int-setor-cor--azul { background: #2563eb; } .int-setor-cor--verde { background: #16a34a; } .int-setor-cor--laranja { background: #ea580c; }
.int-setor-cor--roxo { background: #7c3aed; } .int-setor-cor--rosa { background: #db2777; } .int-setor-cor--ciano { background: #0891b2; }
.int-setor-cor--amarelo { background: #eab308; } .int-setor-cor--cinza { background: #94a3b8; }
.int-setor-cor-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; }
.int-setor-cor-btn:hover, .int-setor-cor-btn[aria-expanded="true"] { border-color: var(--line, #cbd5e1); background: var(--surface-2, #f1f5f9); }
.int-cores { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.int-cor-op { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: transparent; cursor: pointer; }
.int-cor-op .int-setor-cor { width: 20px; height: 20px; }
.int-cor-op:hover { border-color: var(--line, #cbd5e1); }
.int-cor-op.is-on { border-color: var(--ink, #0f172a); }
.int-setor-ed { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--cw-line); border-radius: 12px; background: var(--cw-surface); }
.int-setor-membros { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 16px; max-height: 280px; overflow: auto; margin-bottom: 14px; }
.int-setor-membro { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 6px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--cw-text); }
.int-setor-membro:hover { background: var(--cw-sunk); }
.int-setor-membro input { width: 18px; height: 18px; flex-shrink: 0; }
.int-setor-membro small { color: var(--cw-muted); }
#int-wa-qr:not(:empty) { margin-top: 18px; }
#int-wa-qr img { max-width: 100%; height: auto !important; }

/* Meu perfil conserva os campos e IDs usados pelos fluxos de conta. */
.pf-kit .pf-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.pf-kit .pf-nav { background: transparent; box-shadow: none; border: 0; border-radius: 0; padding: 0; top: 12px; }
.pf-kit .pf-nav-item { font-size: 14px; padding: 12px; border-radius: 8px; color: var(--cw-muted); }
.pf-kit .pf-nav-item.on { color: var(--cw-acc); background: var(--cw-acc-50); box-shadow: none; border: 0; }
.pf-kit .pf-content { display: grid; gap: 20px; min-width: 0; }
.pf-kit .pf-panel { border: 1px solid var(--cw-line); background: var(--cw-surface); border-radius: 12px; box-shadow: none; scroll-margin-top: 18px; }
.pf-kit .pf-panel-head { padding: 20px 22px 14px; background: transparent; border-bottom: 1px solid var(--cw-line-2); }
.pf-kit .pf-panel-head h3 { font-size: 17px; color: var(--cw-ink); font-weight: 650; }
.pf-kit .pf-panel-head p { font-size: 14px; line-height: 1.55; color: var(--cw-muted); }
.pf-kit .pf-panel-body { padding: 20px 22px; }
.pf-kit .pf-field-hint, .pf-kit .pf-foto-hint, .pf-kit .pf-seg-sub { font-size: 13px; color: var(--cw-muted); line-height: 1.5; }
.pf-kit .pf-foto-block { background: transparent; padding: 0 0 20px; border-bottom: 1px solid var(--cw-line-2); margin-bottom: 20px; }
.pf-kit .pf-readonly-card { box-shadow: none; background: #f5f7fa; border: 0; }
.pf-kit .pf-cor-swatch:focus-visible, .pf-kit button:focus-visible, .int-tech summary:focus-visible { outline: 2px solid var(--cw-acc); outline-offset: 3px; }
.pf-kit .pf-shortcut { box-shadow: none; }
.pf-kit .pf-nav-item svg { flex-shrink: 0; }
.pf-kit .pf-password { position: relative; display: flex; width: 100%; }
.pf-kit .pf-password input { width: 100%; padding-right: 44px; }
.pf-kit .pf-password .cw-icbtn { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; }
.pf-kit .btn-red { background: var(--cw-acc); border-color: var(--cw-acc); box-shadow: none; }
.pf-kit .btn-red:hover { background: var(--cw-acc-600); border-color: var(--cw-acc-600); }
@container cw (max-width: 880px) {
  .pf-kit .pf-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pf-kit .pf-nav { position: static; display: flex; flex-direction: row; overflow-x: auto; gap: 4px; }
  .pf-kit .pf-nav-item { width: auto; flex: 0 0 auto; white-space: nowrap; }
  .pf-kit .pf-field-grid { grid-template-columns: minmax(0, 1fr); }
}
@container cw (max-width: 560px) {
  .pf-kit .pf-panel-head, .pf-kit .pf-panel-body { padding: 16px; }
  .pf-kit .pf-foto-block { flex-wrap: wrap; }
  .pf-kit input, .pf-kit select, .pf-kit textarea, #int-root input { font-size: 16px; }
  .int-actions .cw-btn { min-height: 44px; flex: 1 1 auto; justify-content: center; }
}

@container cw (max-width: 560px) {
  .pg-cell-l, .pg-cell-v, .pg-cell small { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .cw-panel .cw-btn { max-width: 100%; height: auto; min-height: 40px; white-space: normal; text-align: left; }
  .cw-panel .cw-btn > span { min-width: 0; overflow-wrap: anywhere; }
  .cw-panel .cw-btn > svg { flex-shrink: 0; }
}
@container cw (max-width: 320px) {
  .pg-strip { grid-template-columns: minmax(0, 1fr); }
  .pg-cell:nth-child(even) { border-left: 0; }
  .pg-cell:nth-child(-n+2) { border-top: 1px solid var(--cw-line-2); }
  .pg-cell:first-child { border-top: 0; }
}

/* Contas a pagar — calendário de vencimentos */
.cp-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cp-cal-h { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cw-faint); text-align: center; padding-bottom: 4px; }
.cp-cal-v { min-height: 64px; }
.cp-cal-d { min-height: 64px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 8px; border: 1px solid var(--cw-line-2); border-radius: 8px; background: var(--cw-surface); color: var(--cw-text); font: inherit; text-align: left; cursor: default; min-width: 0; }
.cp-cal-d b { font-size: 12px; color: var(--cw-muted); }
.cp-cal-d span { font-size: 12px; font-weight: 700; color: var(--cw-ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-cal-d small { font-size: 11px; color: var(--cw-faint); }
.cp-cal-d.has { cursor: pointer; background: var(--cw-acc-50); border-color: var(--cw-acc-100); }
.cp-cal-d.has:hover, .cp-cal-d.has:focus-visible { border-color: var(--cw-acc); }
.cp-cal-d.is-late { background: var(--pg-late-50); border-color: var(--pg-late-100); }
.cp-cal-d.is-late span { color: var(--pg-late); }
.cp-cal-d.is-ok { background: var(--pg-ok-50); border-color: var(--pg-ok-100); }
.cp-cal-d.is-hoje { box-shadow: inset 0 0 0 2px var(--pg-warn); }
@container cw (max-width: 560px) {
  .cp-cal { gap: 3px; }
  .cp-cal-d { padding: 4px; min-height: 52px; }
  .cp-cal-d small { display: none; }
}

/* ===== Vínculo de anúncio (Campanhas → Anúncios e imóveis) ===== */
.cpa-form { gap: 18px; }
.cpa-sec { display: flex; flex-direction: column; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--cw-line-2); }
.cpa-sec h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--cw-ink); }
.cpa-sec h3 small { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--cw-faint); }
.cpa-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cpa-obj { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.cpa-obj-op { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--cw-line); border-radius: 10px; background: var(--cw-surface); cursor: pointer; transition: border-color .15s, background .15s; }
.cpa-obj-op:hover { border-color: var(--cw-acc-100); }
.cpa-obj-op input { position: absolute; opacity: 0; pointer-events: none; }
.cpa-obj-op:focus-within { box-shadow: 0 0 0 3px var(--cw-acc-50); }
.cpa-obj-op.is-on { border-color: var(--cw-acc); background: var(--cw-acc-50); }
.cpa-obj-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--cw-acc-50); color: var(--cw-acc); }
.cpa-obj-op.is-on .cpa-obj-ic { background: var(--cw-acc); color: #fff; }
.cpa-obj-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cpa-obj-tx b { font-size: 13px; color: var(--cw-ink); }
.cpa-obj-tx small { font-size: 12px; line-height: 1.4; color: var(--cw-muted); }
.cpa-busca { display: flex; flex-direction: column; gap: 10px; }
.cpa-input { position: relative; display: flex; align-items: center; }
.cpa-input > .cw-ic { position: absolute; left: 12px; color: var(--cw-muted); pointer-events: none; }
.cpa-input input { width: 100%; height: 42px; padding: 0 12px 0 36px; border: 1px solid var(--cw-line); border-radius: 8px; font: inherit; font-size: 14px; color: var(--cw-ink); background: var(--cw-surface); }
.cpa-input input:focus { outline: none; border-color: var(--cw-acc); box-shadow: 0 0 0 3px var(--cw-acc-50); }
.cpa-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cpa-chip { height: 28px; padding: 0 10px; border: 1px solid var(--cw-line); border-radius: 999px; background: var(--cw-surface); font: inherit; font-size: 12px; color: var(--cw-muted); cursor: pointer; }
.cpa-chip:hover { border-color: var(--cw-acc-100); color: var(--cw-ink); }
.cpa-chip.is-on { border-color: var(--cw-acc); background: var(--cw-acc-50); color: var(--cw-acc-600); font-weight: 600; }
.cpa-ind { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; font-size: 12px; color: var(--cw-muted); cursor: pointer; }
.cpa-cont { font-size: 12px; color: var(--cw-muted); }
.cpa-res { list-style: none; margin: 0; padding: 4px; max-height: 340px; overflow: auto; border: 1px solid var(--cw-line); border-radius: 10px; background: var(--cw-surface); }
.cpa-opt { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 8px; cursor: pointer; }
.cpa-opt + .cpa-opt { margin-top: 2px; }
.cpa-opt:hover, .cpa-opt.is-active { background: var(--cw-acc-50); }
.cpa-opt.is-active { box-shadow: inset 3px 0 0 var(--cw-acc); }
.cpa-cod { display: inline-block; padding: 3px 8px; border-radius: 6px; background: var(--cw-line-2); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--cw-ink); white-space: nowrap; }
.cpa-opt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cpa-opt-t { font-size: 13px; font-weight: 600; color: var(--cw-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpa-opt-m { font-size: 12px; color: var(--cw-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpa-opt-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.cpa-opt-end b { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--cw-ink); white-space: nowrap; }
.cpa-opt-end small { font-weight: 400; color: var(--cw-muted); }
.cpa-vazio { margin: 0; padding: 14px; border: 1px dashed var(--cw-line); border-radius: 10px; font-size: 13px; color: var(--cw-muted); }
.cpa-sel { padding: 14px; border: 1px solid var(--cw-acc-100); border-radius: 10px; background: var(--cw-acc-50); }
.cpa-sel-top { display: flex; gap: 8px; align-items: center; }
.cpa-sel-t { margin-top: 8px; font-size: 15px; font-weight: 700; color: var(--cw-ink); }
.cpa-sel-m { display: flex; gap: 4px; align-items: center; margin-top: 4px; font-size: 13px; color: var(--cw-muted); }
.cpa-sel-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.cpa-sel-foot b { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--cw-ink); }
.cpa-fluxo { padding: 14px; border-radius: 10px; background: var(--cw-line-2); }
.cpa-fluxo-h { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; color: var(--cw-ink); }
.cpa-fluxo ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; padding: 0; list-style: none; counter-reset: cpa; }
.cpa-fluxo li { counter-increment: cpa; display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 999px; background: var(--cw-surface); font-size: 12px; color: var(--cw-ink); }
.cpa-fluxo li::before { content: counter(cpa); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--cw-acc); color: #fff; font-size: 11px; font-weight: 700; }
.cpa-fluxo small { font-size: 12px; color: var(--cw-muted); }
.cpa-acoes { display: flex; gap: 8px; }
@media (max-width: 640px) {
  .cpa-2 { grid-template-columns: 1fr; }
  .cpa-opt { grid-template-columns: 1fr auto; }
  .cpa-opt .cpa-cod { grid-column: 1 / -1; justify-self: start; }
  .cpa-ind { margin-left: 0; }
}

/* Aba "Portais" da tela de Integrações */
.pt-topo { margin-bottom: 10px; }
.pt-config { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin-bottom: 12px; }
.pt-campo { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #475569; font-weight: 600; }
.pt-campo select, .pt-campo input { min-height: 36px; padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; }
.pt-resumo { font-size: 13px; color: #334155; margin: 0 0 10px; }
.pt-link { border-top: 1px solid #e2e8f0; padding: 10px 0; }
.pt-requisitos ul { margin: 0 0 10px; padding-left: 18px; font-size: 12px; color: #475569; line-height: 1.5; }
.pt-passos { margin: 0 0 10px; padding-left: 20px; font-size: 13px; color: #334155; line-height: 1.7; }
.pt-passo--ok { color: #15803d; }
.pt-passo-ok { font-size: 11px; font-weight: 700; margin-left: 4px; }
/* Página Portais (portais-pagina.js): mesa dos anúncios */
.prt-col-chk { width: 44px; }
.pg-tbl td.prt-col-chk, .pg-tbl th.prt-col-chk { padding-right: 0; }
.prt-chk { width: 18px; height: 18px; margin: 0; accent-color: var(--cw-acc); cursor: pointer; vertical-align: middle; }
.prt-chk:disabled { cursor: not-allowed; opacity: .4; }
.pg-tbl tr.is-sel td { background: var(--cw-acc-50); }
.prt-imovel { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.prt-foto { width: 64px; height: 48px; flex: none; border-radius: 6px; object-fit: cover; background: #e9edf2; display: grid; place-items: center; color: #94a3b8; }
.prt-imovel-t { min-width: 0; }
.prt-imovel-t .pg-main { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.prt-cod { font-variant-numeric: tabular-nums; color: var(--cw-acc-600); margin-right: 2px; }
.prt-faltas { margin: 0; padding-left: 16px; font-size: 12.5px; line-height: 1.5; color: #7a4b08; }
.prt-faltas li + li { margin-top: 2px; }
.prt-estrela { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #a3aebd; cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.prt-estrela:hover:not(:disabled) { background: #fff8e6; color: #b7791f; }
.prt-estrela.is-on { color: #b7791f; background: #fff3d6; border-color: #f3d9a0; }
.prt-estrela.is-on svg { fill: currentColor; }
.prt-estrela:disabled { cursor: not-allowed; opacity: .45; }
.prt-estrela:focus-visible { outline: 2px solid var(--cw-acc); outline-offset: 2px; }
.prt-lote { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-height: 44px; margin: 0 0 10px; padding: 6px 4px; }
.prt-lote.is-ativo { padding: 6px 12px; border: 1px solid var(--cw-acc-100); border-radius: 10px; background: var(--cw-acc-50); position: sticky; top: 0; z-index: 2; }
.prt-todos { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--cw-ink, #172033); cursor: pointer; }
.prt-lote-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.prt-lote-aviso { font-size: 12.5px; font-weight: 600; color: #a35a00; }
.prt-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 12px 0 0; }
.prt-form .pg-f:has(textarea) { grid-column: 1 / -1; }
.prt-form-acoes { display: flex; justify-content: flex-end; margin: 12px 0 4px; }
.prt-canais { display: grid; gap: 8px; }
.prt-canal { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.prt-canal:hover { border-color: var(--cw-acc-100); }
.prt-canal:has(input:checked) { border-color: var(--cw-acc); background: var(--cw-acc-50); }
.prt-canal .prt-chk { margin-top: 2px; }
.prt-canal-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prt-canal-t b { font-size: 14px; color: var(--cw-ink, #172033); }
.prt-canal-t small { font-size: 12.5px; color: #5b6b7f; line-height: 1.45; }
.prt-canal-t .prt-canal-nota { color: #8a5300; }
.prt-posts { display: grid; gap: 14px; }
.prt-post { border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; background: #fff; }
.prt-post-h { font-size: 14px; margin: 0 0 10px; color: var(--cw-ink, #172033); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prt-post-fotos { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin: 0 0 10px; scroll-snap-type: x mandatory; }
.prt-post-fotos img { flex: none; width: 96px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; background: #e9edf2; scroll-snap-align: start; }
.prt-post textarea { font: 13px/1.5 inherit; }
.prt-post-acoes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.prt-guia { counter-reset: passo; list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 12px; }
.prt-guia li { counter-increment: passo; position: relative; padding-left: 40px; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; color: #334155; line-height: 1.5; }
.prt-guia li::before { content: counter(passo); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--cw-acc-50); color: var(--cw-acc-600); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.prt-guia li b { color: var(--cw-ink, #172033); font-size: 14px; }
.prt-guia-acao { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.prt-guia-acao a.cw-btn { text-decoration: none; }
.prt-guia-acao code { padding: 4px 8px; border-radius: 6px; background: #f1f5f9; font-size: 12.5px; color: #0f172a; }
.prt-guia-estado { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed #cbd5e1; border-radius: 10px; font-size: 13px; color: #475569; }
.prt-guia-estado .cw-loading { margin: 0; }
.prt-dr-foto { display: block; width: 100% !important; max-width: none !important; height: 180px; object-fit: cover; border-radius: 10px; margin: 4px 0 14px; background: #e9edf2; }
@media (max-width: 760px) {
  .prt-imovel { min-width: 0; }
  .prt-imovel-t .pg-main { white-space: normal; max-width: none; }
  .prt-lote-acoes { margin-left: 0; width: 100%; }
}
.pt-ajuda { font-size: 12px; color: #64748b; line-height: 1.5; margin: 0 0 8px; }
.pt-link-novo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.pt-link-novo input { flex: 1 1 320px; min-height: 36px; padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 12px; background: #f8fafc; }
.pt-aviso { flex-basis: 100%; margin: 0; font-size: 12px; font-weight: 700; color: #b45309; }

/* Perguntas do Mercado Livre */
.pp-abas { margin-bottom: 10px; display: flex; gap: 4px; flex-wrap: wrap; }
.pp-item { border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #fff; }
.pp-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.pp-data { font-size: 11px; color: #64748b; }
.pp-texto { margin: 0 0 8px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.pp-item textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; resize: vertical; }
.pp-acoes { margin-top: 8px; display: flex; justify-content: flex-end; }
.pp-resposta, .pp-ajuda { margin: 0; font-size: 13px; color: #334155; line-height: 1.5; white-space: pre-wrap; }
.pp-vazio { color: #64748b; font-size: 13px; text-align: center; padding: 18px 0; }

/* Cartão do Mercado Livre */
.pt-recusados { margin: 8px 0 0 18px; padding: 0; font-size: 12px; color: #b45309; }
.pt-conta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }

/* Painel de desempenho dos portais */
.pn-periodo { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: #475569; font-weight: 600; margin-bottom: 10px; }
.pn-periodo select { min-height: 32px; padding: 4px 8px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; }
.pn-tabela { overflow-x: auto; }
.pn-tabela table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pn-tabela th, .pn-tabela td { padding: 8px 10px; text-align: right; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.pn-tabela th:first-child, .pn-tabela td:first-child { text-align: left; }
.pn-tabela thead th { font-size: 11px; color: #64748b; text-transform: uppercase; }
.pn-bloqueados ul, .pn-revisar ul { margin: 4px 0 10px 18px; padding: 0; font-size: 12px; color: #334155; line-height: 1.6; }
