/* Painel de gestão de chamados (pm-chamados-gestao.js). */
html.pm-cg-open, html.pm-cg-open body { overflow: hidden; }

.pm-cg {
  --cg-ink: #17202c; --cg-muted: #68717f; --cg-line: #e6e8ec; --cg-blue: #2f74c0; --cg-blue-soft: #e4eefa;
  --cg-card: #fffdfa; --cg-bg: #f6f3ee; --cg-green: #2f7d5b; --cg-orange: #d98a1f; --cg-red: #c2453c;
  --cg-ease: cubic-bezier(.32, .72, 0, 1);
  position: fixed; inset: 0; z-index: 20000; display: grid; grid-template-columns: 232px minmax(0, 1fr);
  background: var(--cg-bg); color: var(--cg-ink); font: 400 14px/1.4 Roboto, Inter, system-ui, sans-serif; text-align: left;
  opacity: 0; transform: translateY(12px) scale(.995);
  transition: opacity .38s var(--cg-ease), transform .45s var(--cg-ease);
}
.pm-cg.is-open { opacity: 1; transform: none; }
.pm-cg *, .pm-cg *::before, .pm-cg *::after { box-sizing: border-box; }
:where(.pm-cg) :where(h1, h2, h3, h4, p, ul, dl, dd) { margin: 0; padding: 0; color: inherit; }
:where(.pm-cg) :where(ul) { list-style: none; }
:where(.pm-cg) :where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(.pm-cg) :where(button) { cursor: pointer; }
.pm-cg button:disabled { cursor: default; opacity: .6; }
.pm-cg :focus-visible { outline: 2px solid var(--cg-blue); outline-offset: 2px; }
.pm-cg [hidden] { display: none !important; }
.pm-cg-ico { display: inline-flex; flex: none; }

/* Barra lateral */
@media (min-width: 1025px) {
  .pm-cg { transition: grid-template-columns .32s var(--cg-ease), opacity .38s var(--cg-ease), transform .45s var(--cg-ease); }
  .pm-cg-side { min-width: 0; transition: padding .32s var(--cg-ease); }
  .pm-cg-brand > span:last-child, .pm-cg-nav-text {
    overflow: hidden; max-width: 180px; opacity: 1; white-space: nowrap;
    transition: max-width .32s var(--cg-ease), opacity .18s ease;
  }
  .pm-cg-nav button { width: 100%; transition: width .32s var(--cg-ease), padding .32s var(--cg-ease), gap .32s var(--cg-ease); }
  .pm-cg-nav .pm-cg-count { max-width: 40px; overflow: hidden; transition: max-width .32s var(--cg-ease), opacity .18s ease; }
  .pm-cg-label--sec, .pm-cg-secs {
    max-height: 100vh; overflow: hidden; opacity: 1; visibility: visible;
    transition: max-height .32s var(--cg-ease), opacity .18s ease, visibility 0s;
  }
  .pm-cg.is-side-closed { grid-template-columns: 68px minmax(0, 1fr); }
  .pm-cg.is-side-closed .pm-cg-side { padding: 20px 12px; overflow: hidden; }
  .pm-cg.is-side-closed .pm-cg-brand { justify-content: center; margin: 0 0 18px; }
  .pm-cg.is-side-closed .pm-cg-brand > span:last-child,
  .pm-cg.is-side-closed .pm-cg-nav-text { max-width: 0; opacity: 0; }
  .pm-cg.is-side-closed .pm-cg-nav .pm-cg-count { max-width: 0; min-width: 0; padding: 0; opacity: 0; }
  .pm-cg.is-side-closed .pm-cg-label--sec,
  .pm-cg.is-side-closed .pm-cg-secs {
    max-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; visibility: hidden;
    transition: max-height .32s var(--cg-ease), opacity .18s ease, visibility 0s .32s;
  }
  .pm-cg.is-side-closed .pm-cg-nav button { justify-content: center; width: 44px; height: 44px; padding: 0; gap: 0; }
}
.pm-cg-scrim { display: none; }
.pm-cg-side { display: flex; flex-direction: column; min-height: 0; padding: 20px 14px 14px; border-right: 1px solid var(--cg-line); background: #fffdfa; overflow-y: auto; }
.pm-cg-brand { display: flex; align-items: center; gap: 10px; margin: 0 4px 18px; }
.pm-cg-brand > span:last-child { display: grid; min-width: 0; }
.pm-cg-brand strong { font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.pm-cg-brand small { color: var(--cg-muted); font-size: 11px; }
.pm-cg-brand-ico { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--cg-blue); }
.pm-cg-brand-ico img { width: 24px; height: 24px; }
.pm-cg-label { display: block; margin: 0 8px 8px; color: var(--cg-muted); font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.pm-cg-label--sec { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--cg-line); }
.pm-cg-nav { display: grid; gap: 4px; }
.pm-cg-nav button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px; background: none; font-weight: 500; }
.pm-cg-nav button:hover { background: #f1eee8; }
.pm-cg-nav button.is-active { background: var(--cg-blue-soft); color: #1f5a9c; }
.pm-cg-nav .pm-cg-count { margin-left: auto; }
.pm-cg-count { min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--cg-blue); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.pm-cg-secs { display: grid; gap: 2px; }
.pm-cg-sec { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; border: 0; border-radius: 10px; background: none; text-align: left; }
.pm-cg-sec:hover { background: #f1eee8; }
.pm-cg-sec.is-active { background: var(--cg-blue-soft); }
.pm-cg-sec > i { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.pm-cg-sec > span { display: grid; flex: 1; min-width: 0; }
.pm-cg-sec strong { font-weight: 500; }
.pm-cg-sec small { overflow: hidden; color: var(--cg-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pm-cg-sec b { font-size: 12px; font-weight: 500; }
.pm-cg-avatar { display: grid; flex: none; place-items: center; width: 38px; height: 38px; overflow: hidden; border-radius: 50%; background: var(--cg-blue); color: #fff; font-size: 13px; font-weight: 700; }
.pm-cg-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Topo */
.pm-cg-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pm-cg-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 560px) minmax(0, 1fr); align-items: center; gap: 14px; min-height: 64px; padding: 10px 22px; border-bottom: 1px solid var(--cg-line); background: #fffdfa; }
.pm-cg-head-left { display: flex; align-items: center; gap: 12px; }
.pm-cg-head-right { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.pm-cg-back { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px; border: 0; border-radius: 10px; background: none; font-weight: 500; }
.pm-cg-back:hover, .pm-cg-iconbtn:hover { background: #f1eee8; }
.pm-cg-iconbtn { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: none; }
.pm-cg-search { display: flex; align-items: center; gap: 8px; min-width: 0; height: 40px; padding: 0 12px; border-radius: 12px; background: #f1eee8; color: var(--cg-muted); }
.pm-cg-search input { width: 100%; border: 0; outline: 0; background: none; color: var(--cg-ink); }
.pm-cg-titlebar { display: flex; align-items: center; gap: 14px; padding: 10px 22px; border-bottom: 1px solid var(--cg-line); }
.pm-cg[data-view="mapa"] .pm-cg-titlebar { display: none; }
.pm-cg-title { min-width: 0; }
.pm-cg-title h1 { font-size: 19px; font-weight: 700; line-height: 1.2; }
.pm-cg-title p { overflow: hidden; color: var(--cg-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pm-cg-live { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 16px; background: #e3f2ea; color: #1f6a49; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pm-cg-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cg-green); }
.pm-cg-live.is-off { background: #fbe6e4; color: var(--cg-red); }
.pm-cg-live.is-off::before { background: var(--cg-red); }
.pm-cg-bell, .pm-cg-close { position: relative; display: grid; flex: none; place-items: center; width: 38px; height: 38px; border: 1px solid var(--cg-line); border-radius: 11px; background: #fff; }
.pm-cg-bell-badge { position: absolute; top: -5px; right: -5px; display: none; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.pm-cg-bell-badge.is-on { display: block; }
.pm-cg-erro { padding: 8px 22px; background: #fbe6e4; color: #8f2b24; font-size: 13px; }
.pm-cg-erro button { border: 0; background: none; font-weight: 700; text-decoration: underline; }

/* Áreas por visão */
.pm-cg-body { position: relative; display: grid; flex: 1; min-height: 0; }
.pm-cg-col, .pm-cg-list, .pm-cg-stage, .pm-cg-inbox-mid, .pm-cg-inbox-form, .pm-cg-page { display: none; min-height: 0; }
.pm-cg[data-view="mapa"] .pm-cg-body { grid-template-columns: 340px minmax(0, 1fr); }
.pm-cg[data-view="mapa"] .pm-cg-col, .pm-cg[data-view="caixa"] .pm-cg-col { display: flex; }
.pm-cg[data-view="mapa"] .pm-cg-stage { display: block; }
.pm-cg[data-view="lista"] .pm-cg-list { display: block; }
.pm-cg[data-view="caixa"] .pm-cg-body { grid-template-columns: 320px minmax(0, 1fr) 340px; }
.pm-cg[data-view="caixa"] .pm-cg-inbox-mid, .pm-cg[data-view="caixa"] .pm-cg-inbox-form { display: block; }
.pm-cg[data-view="detalhe"] .pm-cg-page { display: block; }

/* Coluna de chamados */
.pm-cg-col { flex-direction: column; gap: 10px; padding: 14px; border-right: 1px solid var(--cg-line); overflow: hidden; }
.pm-cg[data-view="mapa"] .pm-cg-col { position: relative; z-index: 1; box-shadow: 7px 0 18px -12px rgb(23 32 44 / 20%); }
.pm-cg-filters { display: grid; gap: 8px; }
.pm-cg-filters .pm-cg-label { margin: 0; }
.pm-cg-chips, .pm-cg-selects { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pm-cg-chip { padding: 6px 12px; border: 1px solid var(--cg-line); border-radius: 18px; background: #fff; font-size: 13px; font-weight: 500; }
.pm-cg-chip b { color: var(--cg-muted); font-weight: 400; }
.pm-cg-chip[aria-pressed="true"] { border-color: var(--cg-blue); background: var(--cg-blue); color: #fff; }
.pm-cg-chip[aria-pressed="true"] b { color: #e4eefa; }
.pm-cg-concluidos { white-space: nowrap; }
.pm-cg-filter-ico { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--cg-line); border-radius: 50%; background: #fff; }
.pm-cg-pill { max-width: 128px; height: 30px; padding: 0 6px; border: 1px solid var(--cg-line); border-radius: 16px; background: #fff; font-size: 13px; }
.pm-cg-pill.is-on { border-color: var(--cg-blue); }
.pm-cg-listhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.pm-cg-listhead strong { font-weight: 500; }
.pm-cg-link { padding: 0; border: 0; background: none; color: var(--cg-blue); font-size: 13px; font-weight: 500; text-align: left; }
.pm-cg-link:hover { text-decoration: underline; }
.pm-cg-link--danger { color: var(--cg-red); }
.pm-cg-cards { display: grid; grid-template-columns: minmax(0, 1fr); flex: 1; align-content: start; gap: 10px; min-height: 0; padding: 2px; overflow-y: auto; }
.pm-cg-card { display: flex; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--cg-line); border-radius: 14px; background: var(--cg-card); text-align: left; }
.pm-cg-card:hover { border-color: #c9cfd8; }
.pm-cg-card.is-active { border-color: var(--cg-blue); background: #eef4fc; box-shadow: 0 0 0 1px var(--cg-blue); }
.pm-cg-card-main { display: grid; grid-template-columns: minmax(0, 1fr); flex: 1; gap: 4px; min-width: 0; }
.pm-cg-card-main > small { overflow: hidden; color: var(--cg-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pm-cg-card-top { display: flex; justify-content: space-between; gap: 8px; }
.pm-cg-card-top strong { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.pm-cg-card-top small { flex: none; color: var(--cg-muted); font-size: 12px; }
.pm-cg-pin { position: relative; display: grid; flex: none; place-items: center; width: 34px; height: 34px; margin-top: 2px; border-radius: 50% 50% 50% 4px; background: var(--pin); color: #fff; transform: rotate(-45deg); }
.pm-cg-pin .pm-cg-ico { transform: rotate(45deg); }
.pm-cg-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pm-cg-tag { padding: 2px 8px; border-radius: 10px; background: #efece6; color: #4d5563; font-size: 11px; }
.pm-cg-tag--espera { background: #fdf0d9; color: #8a4b0b; }
.pm-cg-tag--apoio { background: var(--cg-blue-soft); color: #1f5a99; }
.pm-cg-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 11px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.pm-cg-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pm-cg-status--novo { background: var(--cg-blue); color: #fff; }
.pm-cg-status--atendimento { background: #fdeed8; color: #a5650d; }
.pm-cg-status--encaminhado { background: var(--cg-blue-soft); color: #1f5a9c; }
.pm-cg-status--atrasado { background: #fbe0dd; color: #a8332b; }
.pm-cg-status--concluido { background: #e3f2ea; color: #1f6a49; }
.pm-cg-status--encerrado { background: #eceef1; color: #4d5563; }
.pm-cg-empty { padding: 18px 8px; color: var(--cg-muted); font-size: 13px; text-align: center; }

/* Mapa */
.pm-cg-stage { position: relative; overflow: hidden; }
.pm-cg-map { position: absolute; inset: 0; background: #e8ecef; }
.pm-cg-stats { position: absolute; top: 14px; left: 14px; display: flex; flex-wrap: wrap; gap: 14px; padding: 8px 14px; border-radius: 18px; background: #fffffff2; box-shadow: 0 2px 10px rgb(23 32 44 / 14%); font-size: 13px; }
.pm-cg-stats span { display: inline-flex; align-items: center; gap: 5px; }
.pm-cg-stats i, .pm-cg-barlegend i, .pm-cg-cat i { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.pm-cg-mapctl { position: absolute; top: 14px; right: 14px; display: grid; gap: 8px; }
.pm-cg-mapctl > div { display: grid; overflow: hidden; border-radius: 11px; box-shadow: 0 2px 10px rgb(23 32 44 / 14%); }
.pm-cg-mapctl button { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 0; background: #fff; }
.pm-cg-mapctl > button { border-radius: 11px; box-shadow: 0 2px 10px rgb(23 32 44 / 14%); }
.pm-cg-mode { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgb(23 32 44 / 14%); }
.pm-cg-mode button { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: none; font-size: 13px; font-weight: 500; }
.pm-cg-mode button[aria-pressed="true"] { background: var(--cg-blue); color: #fff; }
.pm-cg-scale { position: absolute; right: 200px; bottom: 18px; }
.pm-cg-scale-inner { padding: 1px 6px; border: 1px solid var(--cg-muted); border-top: 0; background: #ffffffc0; color: var(--cg-ink); font-size: 11px; text-align: center; }
.pm-cg-popup { position: relative; width: 264px; padding: 14px; border-radius: 16px; background: var(--cg-card); box-shadow: 0 8px 26px rgb(23 32 44 / 22%); }
.pm-cg-popup:empty { display: none; }
.pm-cg-popup h3 { margin-top: 8px; font-size: 16px; font-weight: 700; }
.pm-cg-popup p { color: var(--cg-muted); font-size: 12px; }
.pm-cg-popup-x { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: var(--cg-muted); }
.pm-cg-popup-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 18px; }
.pm-cg-popup-top small { color: var(--cg-muted); font-size: 11px; }
.pm-cg-popup-end { display: flex; gap: 5px; margin-bottom: 10px !important; }
.pm-cg-popup-acoes { display: flex; gap: 6px; }
.pm-cg-grupo { width: 300px; }
.pm-cg-grupo .pm-cg-popup-top strong { font-size: 14px; font-weight: 700; }
.pm-cg-grupo-lista { display: grid; gap: 4px; max-height: 280px; margin: 10px 0; overflow-y: auto; }
.pm-cg-grupo-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 10px; background: #fff; text-align: left; cursor: pointer; }
.pm-cg-grupo-item:hover, .pm-cg-grupo-item:focus-visible { background: var(--cg-blue-soft); }
.pm-cg-grupo-txt { display: grid; flex: 1; min-width: 0; }
.pm-cg-grupo-txt strong { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pm-cg-grupo-txt small { color: var(--cg-muted); font-size: 11px; }
.pm-cg-grupo-zoom { width: 100%; justify-content: center; gap: 6px; }
.pm-cg-grupo.is-entrando { animation: pm-cg-rise .2s var(--cg-ease); }
.pm-cg-popup-acoes .pm-cg-btn { flex: 1; padding: 0 10px; }
.pm-cg-foto { margin: 10px 0; overflow: hidden; border-radius: 12px; background: #efece6; }
.pm-cg-foto:empty { height: 150px; background: linear-gradient(100deg, #efece6 30%, #f8f6f2 50%, #efece6 70%) 0 0 / 300% 100%; animation: pm-cg-shimmer 1.2s linear infinite; }
.pm-cg-popup .pm-cg-foto:empty { height: 110px; }
.pm-cg-foto img { display: block; width: 100%; max-height: 240px; object-fit: cover; animation: pm-cg-fade .3s ease; }
.pm-cg-popup .pm-cg-foto img { height: 110px; }
.pm-cg-foto-abrir { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: inherit; }
.pm-cg-foto-abrir img { width: 100%; }
.pm-cg-foto-visor { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: rgb(10 17 27 / 90%); }
.pm-cg-foto-visor img { display: block; max-width: min(100%, 1200px); max-height: calc(100dvh - 48px); object-fit: contain; }
.pm-cg-foto-fechar { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: #17202c; font-size: 30px !important; line-height: 1; }

.pm-cg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: 11px; background: var(--cg-blue); color: #fff !important; font-weight: 500; white-space: nowrap; }
.pm-cg-btn:hover { background: #26639f; }
.pm-cg-btn--ghost { background: none; color: var(--cg-blue) !important; }
.pm-cg-btn--ghost:hover { background: var(--cg-blue-soft); }
.pm-cg-btn--soft { border-color: var(--cg-line); background: #fff; color: var(--cg-ink) !important; }
.pm-cg-btn--soft:hover { background: #f5f3ef; }
.pm-cg-btn--danger { background: var(--cg-red); }
.pm-cg-btn--danger:hover { background: #a8332b; }
.pm-cg-btn--danger-text { color: var(--cg-red) !important; }
.pm-cg-btn--wide { width: 100%; padding: 8px 16px; white-space: normal; }

/* Lista */
.pm-cg-list { padding: 16px 22px 22px; overflow-y: auto; }
.pm-cg-listtop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pm-cg-listbtns { display: flex; gap: 8px; }
.pm-cg-box { padding: 16px; border: 1px solid var(--cg-line); border-radius: 16px; background: var(--cg-card); }
.pm-cg-box h2 { margin-top: 10px; font-size: 22px; font-weight: 700; }
.pm-cg-box h3 { font-size: 15px; font-weight: 700; }
.pm-cg-boxhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pm-cg-boxhead small, .pm-cg-muted { color: var(--cg-muted) !important; font-size: 12px; }
.pm-cg-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.pm-cg-kpi { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--cg-line); border-radius: 16px; background: var(--cg-card); }
.pm-cg-kpi > span { color: var(--cg-muted); font-size: 12px; }
.pm-cg-kpi strong { font-size: 26px; font-weight: 700; line-height: 1.1; }
.pm-cg-kpi small { color: var(--cg-muted); font-size: 11px; }
.is-alerta { color: var(--cg-red) !important; }
.pm-cg-barbox { margin-bottom: 12px; }
.pm-cg-bar { display: flex; gap: 3px; height: 8px; overflow: hidden; border-radius: 4px; }
.pm-cg-bar i { min-width: 4px; }
.pm-cg-barlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; }
.pm-cg-barlegend span, .pm-cg-cat { display: inline-flex; align-items: center; gap: 6px; }
.pm-cg-barlegend b { font-weight: 500; }
.pm-cg-tablebox { padding: 0; overflow: hidden; }
.pm-cg-tablehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.pm-cg-listtabs, .pm-cg-inboxtabs { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: #f1eee8; }
.pm-cg-listtabs button, .pm-cg-inboxtabs button { height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--cg-muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.pm-cg-listtabs button[aria-pressed="true"], .pm-cg-inboxtabs button[aria-pressed="true"] { background: #fff; color: var(--cg-ink); box-shadow: 0 1px 3px rgb(23 32 44 / 12%); }
.pm-cg-inboxtabs button { flex: 1; }
.pm-cg-table { overflow-x: auto; }
.pm-cg-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pm-cg-table th { padding: 8px 12px; background: #f6f3ee; color: var(--cg-muted); font-size: 11px; font-weight: 500; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.pm-cg-table td { padding: 10px 12px; border-top: 1px solid var(--cg-line); white-space: nowrap; }
.pm-cg-table tbody tr:hover { background: #f4f7fb; }
.pm-cg-desc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.pm-cg-cat { font-weight: 500; }
.pm-cg-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--cg-line); color: var(--cg-muted); }
.pm-cg-pager > div { display: flex; gap: 6px; align-items: center; }
.pm-cg-pager button { min-width: 30px; height: 30px; border: 1px solid var(--cg-line); border-radius: 8px; background: #fff; font-size: 13px; }
.pm-cg-pager button[aria-current="page"] { border-color: var(--cg-blue); background: var(--cg-blue); color: #fff; }

/* Caixa de entrada */
.pm-cg-novo button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: 0; border-radius: 11px; background: var(--cg-blue-soft); color: #1f5a9c; font-size: 13px; font-weight: 500; }
.pm-cg-novo b { margin-left: auto; font-weight: 500; }
.pm-cg[data-view="mapa"] .pm-cg-inboxtabs, .pm-cg[data-view="mapa"] .pm-cg-novo { display: none; }
.pm-cg-inbox-mid { padding: 16px; overflow-y: auto; }
.pm-cg-inbox-mid > * + * { margin-top: 14px; }
.pm-cg-inbox-form { display: none; padding: 16px; border-left: 1px solid var(--cg-line); background: #fffdfa; overflow-y: auto; }
.pm-cg-inbox-form:not(:empty) > * + * { margin-top: 12px; }
.pm-cg-inbox-form > h3 { font-size: 16px; font-weight: 700; }
.pm-cg-pane-empty { display: grid; place-items: center; gap: 6px; height: 100%; min-height: 240px; color: var(--cg-muted); text-align: center; align-content: center; }
.pm-cg-pane-empty strong { color: var(--cg-ink); font-weight: 500; }
.pm-cg-sugestao { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: var(--cg-blue-soft); }
.pm-cg-sugestao small { color: #1f5a9c; font-size: 10px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.pm-cg-sugestao strong { font-weight: 500; }
.pm-cg-sugestao span { color: var(--cg-muted); font-size: 12px; }
.pm-cg-inbox-form label, .pm-cg-field, .pm-cg-modal-card label { display: grid; gap: 5px; }
.pm-cg-inbox-form label > span, .pm-cg-field > span, .pm-cg-modal-card label > span { font-size: 13px; font-weight: 500; }
.pm-cg-inbox-form input[type="text"], .pm-cg-inbox-form input[type="date"], .pm-cg-inbox-form select, .pm-cg-inbox-form textarea,
.pm-cg-modal-card input[type="text"], .pm-cg-modal-card input[type="date"], .pm-cg-modal-card select, .pm-cg-modal-card textarea {
  width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--cg-line); border-radius: 10px; background: #fff;
}
.pm-cg textarea { resize: vertical; }
.pm-cg-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 10px; background: #f1eee8; }
.pm-cg-seg button { height: 32px; border: 0; border-radius: 8px; background: none; color: var(--cg-muted); font-size: 13px; }
.pm-cg-seg button[aria-checked="true"] { background: #fff; color: #a5650d; font-weight: 500; box-shadow: 0 1px 3px rgb(23 32 44 / 12%); }
.pm-cg .pm-cg-switch { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.pm-cg-switch input { position: absolute; opacity: 0; }
.pm-cg-switch i { position: relative; flex: none; width: 34px; height: 20px; border-radius: 10px; background: #c9cfd8; transition: background .15s; }
.pm-cg-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.pm-cg-switch input:checked + i { background: var(--cg-blue); }
.pm-cg-switch input:checked + i::after { transform: translateX(14px); }
.pm-cg-switch input:focus-visible + i { outline: 2px solid var(--cg-blue); outline-offset: 2px; }
.pm-cg-inbox-form .pm-cg-link { display: block; width: 100%; text-align: center; }
.pm-cg-prazo-fixo { padding: 9px 10px; border-radius: 10px; background: #f1eee8; font-size: 13px; }
.pm-cg-form-erro { color: var(--cg-red); font-size: 13px; }
.pm-cg-local { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.pm-cg-local p { display: grid; font-size: 13px; }
.pm-cg-local strong { font-weight: 500; }
.pm-cg-local small { color: var(--cg-muted); }
.pm-cg-mini { flex: none; width: 120px; height: 90px; overflow: hidden; border-radius: 12px; background: #e8ecef; }
.pm-cg-mini--lg { width: 100%; height: 160px; margin-bottom: 10px; }
.pm-cg-aviso { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px; border: 1px solid #f4dcb8; border-radius: 16px; background: #fdf1df; font-size: 13px; }
.pm-cg-aviso > strong { font-weight: 500; }
.pm-cg-dup { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: #fff; text-align: left; }
.pm-cg-dup strong { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.pm-cg-dup small { flex: none; color: var(--cg-muted); }
.pm-cg-dup-lista { display: grid; gap: 6px; max-height: 280px; overflow-y: auto; }
.pm-cg-dup-linha { display: flex; align-items: center; gap: 10px; }
.pm-cg-dup-linha .pm-cg-dup { flex: 1; min-width: 0; }
.pm-cg-dup-linha input, .pm-cg-dup-todos input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--cg-blue); }
.pm-cg-dup-todos { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.pm-cg-dup-principal { display: grid; gap: 4px; }
.pm-cg-dup-principal span { color: var(--cg-muted); font-size: 12px; }
.pm-cg-dup-principal select { width: 100%; padding: 8px 10px; border: 1px solid var(--cg-line); border-radius: 10px; background: #fff; }
.pm-cg-aviso .pm-cg-btn:disabled { opacity: .55; cursor: not-allowed; }

/* Página do chamado */
.pm-cg-page { padding: 14px 22px 22px; overflow-y: auto; }
.pm-cg-pagebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pm-cg-pagebar > div { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-cg-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.pm-cg-page-grid > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.pm-cg-page dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin-top: 10px; font-size: 13px; }
.pm-cg-page dt { color: var(--cg-muted); }
.pm-cg-page dd { font-weight: 500; overflow-wrap: anywhere; text-align: right; }
.pm-cg-timeline li { position: relative; display: grid; padding: 0 0 14px 26px; font-size: 13px; }
.pm-cg-timeline li::before { content: ""; position: absolute; top: 2px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--cg-green); }
.pm-cg-timeline li::after { content: ""; position: absolute; top: 18px; bottom: 0; left: 6.500px; width: 1px; background: var(--cg-line); }
.pm-cg-timeline li:last-child::after { display: none; }
.pm-cg-timeline strong { font-weight: 500; }
.pm-cg-timeline small { color: var(--cg-muted); font-size: 12px; }
.pm-cg-timeline p { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pm-cg-timeline .is-interna::before { background: var(--cg-orange); }
.pm-cg-timeline .is-cidadao::before { background: var(--cg-blue); }
.pm-cg-timeline .is-pendente::before { border: 1px solid #c9cfd8; background: #fff; }
.pm-cg-composer { display: grid; gap: 8px; margin-top: 4px; }
.pm-cg-msgtabs { justify-self: start; }
.pm-cg-composer textarea { width: 100%; min-height: 76px; padding: 10px 12px; border: 1px solid var(--cg-line); border-radius: 10px; background: #fff; }
.pm-cg-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pm-cg-composer-foot small { color: var(--cg-muted); font-size: 12px; }
.pm-cg-modal { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: rgb(23 32 44 / 35%); }
.pm-cg-modal-card { display: grid; gap: 12px; width: min(440px, 100%); max-height: 100%; padding: 18px; border-radius: 16px; background: var(--cg-card); overflow-y: auto; }

/* Gaveta de notificações (mesma do TASK) */
.pm-cg-drawer { position: absolute; inset: 0; z-index: 8; }
.pm-cg-drawer-bg { position: absolute; inset: 0; background: rgb(15 30 66 / 42%); backdrop-filter: blur(2px); animation: pm-cg-fade .2s ease; }
.pm-cg-drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(400px, 100%); background: #fff; box-shadow: 0 10px 40px rgb(23 32 44 / 25%); animation: pm-cg-slide .3s var(--cg-ease); }
.pm-cg-drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 20px; border-bottom: 1px solid var(--cg-line); }
.pm-cg-drawer-head h2 { flex: 1; font-size: 16px; font-weight: 700; }
.pm-cg-drawer-all { height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: #4d5563; font-size: 13px; font-weight: 500; }
.pm-cg-drawer-all:hover { background: #f1eee8; }
.pm-cg-drawer-list { flex: 1; min-height: 0; overflow-y: auto; }
.pm-cg-notif { display: flex; gap: 12px; width: 100%; padding: 13px 18px; border: 0; border-bottom: 1px solid var(--cg-line); background: #fff; font-size: 14px; text-align: left; transition: background .15s; }
.pm-cg-notif:hover { background: #f8faff; }
.pm-cg-notif.is-unread { background: #eff5fd; }
.pm-cg-notif.is-unread::before { content: ""; flex: none; width: 8px; height: 8px; margin: 11px -4px 0 -10px; border-radius: 50%; background: var(--cg-blue); }
.pm-cg-notif > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.pm-cg-notif small { display: block; margin-top: 2px; color: var(--cg-muted); font-size: 12px; }
.pm-cg-notif-ico { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; }

/* Animações: mesmas curvas e durações do TASK */
@keyframes pm-cg-fade { from { opacity: 0; } }
@keyframes pm-cg-rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes pm-cg-slide { from { opacity: 0; transform: translateX(30px); } }
@keyframes pm-cg-shimmer { to { background-position: -150% 0; } }

/* As áreas saem de display:none ao trocar de visão, e isso reinicia a animação. */
.pm-cg-list, .pm-cg-page, .pm-cg-inbox-mid { animation: pm-cg-rise .28s var(--cg-ease); }
.pm-cg-inbox-form, .pm-cg-novo { animation: pm-cg-slide .3s var(--cg-ease); }
.pm-cg-col, .pm-cg-stage { animation: pm-cg-fade .2s ease; }
.pm-cg-popup.is-entrando { animation: pm-cg-rise .2s var(--cg-ease); }
.pm-cg-inbox-mid.is-entrando { animation: pm-cg-rise-b .28s var(--cg-ease); }
.pm-cg-inbox-form.is-entrando { animation: pm-cg-slide-b .3s var(--cg-ease); }
@keyframes pm-cg-rise-b { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes pm-cg-slide-b { from { opacity: 0; transform: translateX(30px); } }
.pm-cg-modal { animation: pm-cg-fade .2s ease; }
.pm-cg-modal-card { animation: pm-cg-rise .28s var(--cg-ease); }

.pm-cg-nav button, .pm-cg-sec, .pm-cg-back, .pm-cg-iconbtn, .pm-cg-chip, .pm-cg-pill, .pm-cg-mode button, .pm-cg-listtabs button,
.pm-cg-inboxtabs button, .pm-cg-seg button, .pm-cg-pager button, .pm-cg-mapctl button, .pm-cg-bell, .pm-cg-close {
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.pm-cg-btn { transition: background .15s, border-color .15s, box-shadow .15s, transform .1s; }
.pm-cg-btn:active:not(:disabled), .pm-cg-chip:active { transform: translateY(1px); }
.pm-cg-card, .pm-cg-kpi, .pm-cg-dup { transition: border-color .15s, box-shadow .2s, background .15s, transform .2s var(--cg-ease); }
.pm-cg-card:hover, .pm-cg-kpi:hover, .pm-cg-dup:hover { box-shadow: 0 10px 24px -16px rgb(23 32 44 / 40%); transform: translateY(-1px); }
.pm-cg-card.is-active:hover { box-shadow: 0 0 0 1px var(--cg-blue), 0 10px 24px -16px rgb(23 32 44 / 40%); }
.pm-cg-table tbody tr { transition: background .12s; }
.pm-cg-search, .pm-cg-inbox-form input, .pm-cg-inbox-form select, .pm-cg-inbox-form textarea { transition: border-color .15s, background .15s, box-shadow .15s; }
.pm-cg-search:focus-within { background: #fff; box-shadow: 0 0 0 2px var(--cg-blue-soft); }

@media (hover: none) {
  .pm-cg-card:hover, .pm-cg-kpi:hover, .pm-cg-dup:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-cg, .pm-cg *, .pm-cg *::before, .pm-cg *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 1180px) {
  .pm-cg-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pm-cg[data-view="caixa"] .pm-cg-body { grid-template-columns: 280px minmax(0, 1fr); overflow-y: auto; }
  .pm-cg-inbox-form { grid-column: 2; border-left: 0; }
  .pm-cg-page-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .pm-cg { grid-template-columns: minmax(0, 1fr); }
  .pm-cg-side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 7; width: 260px; transform: translateX(-105%); transition: transform .3s var(--cg-ease); }
  .pm-cg.is-side-open .pm-cg-side { transform: none; box-shadow: 0 10px 40px rgb(23 32 44 / 25%); }
  .pm-cg.is-side-open .pm-cg-scrim { position: fixed; inset: 0; z-index: 6; display: block; background: rgb(23 32 44 / 35%); animation: pm-cg-fade .2s ease; }
}
.pm-cg-voltar-caixa { display: none; }

/* Celular. Áreas que rolam são stacking context próprio e sem overflow hidden: no iPhone,
   ancestral fixo com filhos em z-index prende o gesto de rolagem. */
@media (max-width: 767px) {
  .pm-cg :where(input, textarea, select) { font-size: 16px; } /* menor que 16px, o iOS amplia a tela */
  .pm-cg-head { grid-template-columns: auto auto; min-height: 0; padding: max(8px, env(safe-area-inset-top)) 12px 8px; }
  .pm-cg-search { grid-column: 1 / -1; grid-row: 2; }
  .pm-cg-titlebar { padding: 6px 12px; }
  .pm-cg-head-left, .pm-cg-head-right { gap: 6px; }
  .pm-cg-live { padding: 4px 7px; font-size: 11px; }
  .pm-cg-title h1 { font-size: 16px; }
  .pm-cg-live { padding: 4px 10px; }
  .pm-cg-side { padding-top: max(20px, env(safe-area-inset-top)); }
  .pm-cg-drawer-head { padding-top: max(14px, env(safe-area-inset-top)); }
  .pm-cg-drawer-panel { width: 100%; }
  .pm-cg-drawer-list, .pm-cg-col, .pm-cg-list, .pm-cg-page, .pm-cg-modal-card { position: relative; z-index: 0; isolation: isolate; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .pm-cg-chips, .pm-cg-selects { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .pm-cg-chips > *, .pm-cg-selects > * { flex: none; }
  .pm-cg-pill { max-width: none; height: 34px; }

  /* Mapa em cima, lista embaixo */
  .pm-cg[data-view="mapa"] .pm-cg-body { display: flex; flex-direction: column; }
  .pm-cg[data-view="mapa"] .pm-cg-stage { flex: none; order: -1; height: 40dvh; min-height: 240px; overflow: clip; z-index: 1; box-shadow: 0 7px 18px -12px rgb(23 32 44 / 20%); }
  .pm-cg[data-view="mapa"] .pm-cg-col { box-shadow: none; }
  .pm-cg-col { flex: 1; min-height: 0; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); border-right: 0; overflow: clip auto; }
  .pm-cg-cards { flex: none; overflow: visible; }
  .pm-cg-stats { top: 8px; right: 8px; left: 8px; flex-wrap: nowrap; gap: 10px; padding: 6px 10px; overflow-x: auto; font-size: 12px; white-space: nowrap; scrollbar-width: none; }
  .pm-cg-mapctl { top: 50px; right: 8px; gap: 6px; }
  .pm-cg-mapctl button { width: 34px; height: 34px; }
  .pm-cg-mode { right: 8px; bottom: 8px; }
  .pm-cg-scale { display: none; }

  /* Lista: cada linha vira um card */
  .pm-cg-list { padding: 10px 12px calc(16px + env(safe-area-inset-bottom)); }
  .pm-cg-listtop { margin-bottom: 10px; }
  .pm-cg-listchips { width: 100%; }
  .pm-cg-listbtns { width: 100%; }
  .pm-cg-listbtns .pm-cg-btn { flex: 1; }
  .pm-cg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pm-cg-kpi { padding: 10px 12px; }
  .pm-cg-kpi strong { font-size: 22px; }
  .pm-cg-kpi:last-child { grid-column: 1 / -1; }
  .pm-cg-tablehead { align-items: stretch; flex-direction: column; }
  .pm-cg-listtabs { overflow-x: auto; scrollbar-width: none; }
  .pm-cg-listtabs button { flex: none; }
  .pm-cg-table { overflow-x: visible; }
  .pm-cg-table thead { display: none; }
  .pm-cg-table table, .pm-cg-table tbody { display: block; }
  .pm-cg-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 14px; border-top: 1px solid var(--cg-line); }
  .pm-cg-table td { padding: 0; border: 0; white-space: normal; }
  .pm-cg-table td:nth-child(1) { order: 1; }
  .pm-cg-table td:nth-child(6) { order: 2; justify-self: end; }
  .pm-cg-table td:nth-child(2) { order: 3; grid-column: 1 / -1; }
  .pm-cg-table td:nth-child(3) { order: 4; grid-column: 1 / -1; max-width: none; color: var(--cg-muted); white-space: nowrap; }
  .pm-cg-table td:nth-child(4) { order: 5; color: var(--cg-muted); font-size: 12px; }
  .pm-cg-table td:nth-child(8) { order: 6; justify-self: end; font-size: 12px; }
  .pm-cg-table td:nth-child(5), .pm-cg-table td:nth-child(7) { display: none; }
  .pm-cg-pager { flex-direction: column; }

  /* Caixa de entrada: uma tela por vez */
  .pm-cg[data-view="caixa"] .pm-cg-body { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .pm-cg[data-view="caixa"] .pm-cg-col { height: 100%; }
  .pm-cg[data-view="caixa"] .pm-cg-inbox-mid, .pm-cg[data-view="caixa"] .pm-cg-inbox-form { display: none; }
  .pm-cg.is-triagem[data-view="caixa"] .pm-cg-col { display: none; }
  .pm-cg.is-triagem[data-view="caixa"] .pm-cg-inbox-mid, .pm-cg.is-triagem[data-view="caixa"] .pm-cg-inbox-form { display: block; }
  .pm-cg-voltar-caixa { display: block; }
  .pm-cg-inbox-mid { padding: 12px 12px 0; overflow: visible; }
  .pm-cg-inbox-form { margin-top: 14px; padding: 14px 12px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--cg-line); overflow: visible; }
  .pm-cg-box h2 { font-size: 19px; }

  /* Página do chamado */
  .pm-cg-page { padding: 10px 12px calc(16px + env(safe-area-inset-bottom)); }
  .pm-cg-pagebar > div { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; width: 100%; }
  .pm-cg-pagebar .pm-cg-btn { padding: 0 6px; font-size: 13px; white-space: normal; }
  .pm-cg-composer-foot { flex-direction: column; align-items: stretch; }
  .pm-cg-msgtabs { justify-self: stretch; }
  .pm-cg-msgtabs button { flex: 1; }
  .pm-cg-popup-top { flex-wrap: wrap; padding-right: 0; }

  /* Janelas sobem da base */
  .pm-cg-modal { padding: 0; place-items: end stretch; }
  .pm-cg-modal-card { width: 100%; max-height: 90dvh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
}

/* Lista: período, origem Ouvidoria (20261116) */
.pm-cg-periodo { display: inline-flex; align-items: center; gap: 4px; }
.pm-cg-periodo small { color: var(--cg-muted); font-size: 12px; }
.pm-cg-date { max-width: 138px; padding: 0 8px; }
.pm-cg-tag--ouv { background: #ece6f7; color: #5b3d99; }
.pm-cg-listtabs { flex-wrap: wrap; }
@media (max-width: 767px) { .pm-cg-listtabs { flex-wrap: nowrap; } .pm-cg-date { max-width: none; } }
