/*
 * MTPULSE — padrão visual único do Master e do Admin (v11.3).
 * Antes eram 6 arquivos (admin.css, version.css, master.css, master-v2.css, logo.css, comum.css) com cores
 * soltas e um tema claro "remendado" por cima do escuro. Agora: variáveis (tokens) num lugar só, tema claro
 * como padrão e escuro como opção (data-theme="dark" no <html>), fonte Inter embutida e uma escala fixa de
 * tamanhos. Regras de uso:
 *  - Cor sempre por variável (--...). Dourado (--marca) só na marca, item de menu ativo e destaques de gráfico.
 *  - Tamanhos de texto: 12 / 13 / 14 / 16 / 20 / 24 / 28. Espaços em múltiplos de 4.
 *  - Situação (online, erro, aviso) = ponto colorido + texto; nunca só cor.
 */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght.woff2?v=1') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --fonte: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fundo: #f4f5f7;
  --superficie: #ffffff;
  --superficie-2: #f9fafb;
  --borda: #e3e6eb;
  --borda-forte: #d0d5dd;
  --linha: #eef0f3;
  --texto: #101828;
  --texto-2: #475467;
  --texto-3: #667085;
  --link: #1f4e8c;
  --primario: #0b1f33;
  --primario-texto: #ffffff;
  --primario-hover: #16314f;
  --marca: #e2a529;
  --menu-fundo: #0b1f33;
  --menu-texto: #c9d3df;
  --menu-texto-2: #8ea0b5;
  --menu-ativo: rgba(255, 255, 255, 0.08);
  --serie-1: #1f3a5f;
  --serie-2: #e2a529;
  --toner-k: #1d2939;
  --ok: #12805c;
  --ok-texto: #0e6245;
  --ok-fundo: #e7f5ef;
  --aviso: #dc6803;
  --aviso-texto: #93370d;
  --aviso-fundo: #fef3e2;
  --erro: #c4321c;
  --erro-texto: #a8261a;
  --erro-fundo: #fdecea;
  --neutro: #98a2b3;
  --neutro-fundo: #f2f4f7;
  --info-fundo: #eef4fb;
  --sombra: 0 1px 2px rgba(16, 24, 40, 0.06);
  --sombra-alta: 0 20px 48px rgba(16, 24, 40, 0.18);
  --raio: 12px;
  --raio-p: 8px;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --fundo: #0d1724;
  --superficie: #111d2c;
  --superficie-2: #0f1a28;
  --borda: #1c2a3b;
  --borda-forte: #2a3b50;
  --linha: #1a2737;
  --texto: #e6ebf2;
  --texto-2: #9aa9bb;
  --texto-3: #8193a8;
  --link: #7fb3f0;
  --primario: #e2a529;
  --primario-texto: #1a1204;
  --primario-hover: #edb948;
  --menu-fundo: #0a121d;
  --menu-ativo: #15243a;
  --serie-1: #6f9fd8;
  --toner-k: #c3cedb;
  --ok: #2fbf84;
  --ok-texto: #5fd6a4;
  --ok-fundo: rgba(47, 191, 132, 0.12);
  --aviso: #f2a23a;
  --aviso-texto: #f6bd6d;
  --aviso-fundo: rgba(242, 162, 58, 0.12);
  --erro: #f0624d;
  --erro-texto: #f58e7e;
  --erro-fundo: rgba(240, 98, 77, 0.12);
  --neutro: #7c8ba0;
  --neutro-fundo: #1a2737;
  --info-fundo: #15243a;
  --sombra: none;
  --sombra-alta: 0 20px 48px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* ---------- base ---------- */
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--fonte);
  font-size: 14px;
  line-height: 1.45;
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 16px;
  font-weight: 600;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
h4 {
  font-size: 13px;
  font-weight: 600;
}
p {
  color: var(--texto-2);
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
code {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 12px;
  background: var(--neutro-fundo);
  border-radius: 4px;
  padding: 2px 6px;
  word-break: break-all;
}
small {
  font-size: 12px;
  color: var(--texto-3);
}
.hidden,
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.num,
td,
.stats strong {
  font-variant-numeric: tabular-nums;
}

/* ---------- botões e campos ---------- */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
.link-button,
a.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--borda-forte);
  border-radius: var(--raio-p);
  background: var(--superficie);
  color: var(--texto);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
button:hover,
.link-button:hover {
  background: var(--superficie-2);
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Ação principal da tela: primeiro botão de formulários e os marcados como .primary. */
.primary,
a.primary,
.login-card > button:not(.link-sair),
.settings-form > button,
.password-form > button,
.client-form > button,
.client-form .wide > button,
#newCompany {
  background: var(--primario);
  border-color: var(--primario);
  color: var(--primario-texto);
  font-weight: 600;
}
.primary:hover,
a.primary:hover,
.login-card > button:not(.link-sair):hover,
.settings-form > button:hover,
.password-form > button:hover,
.client-form > button:hover,
#newCompany:hover {
  background: var(--primario-hover);
  border-color: var(--primario-hover);
}
.reject,
.perigo,
button.perigo {
  color: var(--erro-texto);
  border-color: var(--borda-forte);
  background: var(--superficie);
}
.reject:hover,
.perigo:hover {
  background: var(--erro-fundo);
}
.approve {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
  font-weight: 600;
}
.compact,
td button,
.row-actions button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}
input:not([type='checkbox']):not([type='radio']),
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--borda-forte);
  border-radius: var(--raio-p);
  background: var(--superficie);
  color: var(--texto);
  font-size: 14px;
}
textarea {
  min-height: 90px;
}
input::placeholder,
textarea::placeholder {
  color: var(--texto-3);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--link);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 18%, transparent);
}
input[type='checkbox'],
input[type='radio'] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primario);
  cursor: pointer;
}
label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--texto-2);
}
label.check,
.check {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--texto);
}

/* ---------- login ---------- */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--fundo);
}
.login-card {
  width: min(400px, 100%);
  display: grid;
  gap: 16px;
  padding: 32px;
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: 16px;
  box-shadow: var(--sombra-alta);
}
.login-card img,
.login-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.login-card h1 {
  font-size: 20px;
}
.login-card p {
  font-size: 13px;
  margin-top: -8px;
}
.login-card > button {
  min-height: 42px;
  font-size: 14px;
}
.login-card small {
  text-align: center;
}
.login-card .link-sair {
  border: 0;
  background: transparent;
  color: var(--texto-2);
}
.dica-senha {
  text-align: left !important;
  margin-top: -8px;
}

/* ---------- estrutura: menu lateral + conteúdo ---------- */
.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 12px;
  background: var(--menu-fundo);
  color: var(--menu-texto);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}
.brand img,
.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.brand b {
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.brand span {
  display: block;
  color: var(--menu-texto-2);
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
}
.account {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--raio-p);
  background: rgba(255, 255, 255, 0.05);
}
.account small {
  color: var(--menu-texto-2);
  font-size: 11px;
}
.account b {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
nav {
  display: grid;
  gap: 2px;
}
nav button,
nav .nav-group > button {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--raio-p);
  background: transparent;
  color: var(--menu-texto);
  font-size: 14px;
  font-weight: 500;
}
nav button:hover {
  background: rgba(255, 255, 255, 0.05);
}
nav button.active {
  background: var(--menu-ativo);
  color: #fff;
  font-weight: 600;
}
nav button svg,
nav .ico {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--menu-texto-2);
}
nav button.active svg,
nav button.active .ico {
  color: var(--marca);
}
nav .nav-group > button span {
  margin-left: auto;
  font-size: 12px;
  color: var(--menu-texto-2);
}
nav i {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--erro);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  text-align: center;
}
.submenu {
  display: grid;
  gap: 2px;
  margin: 2px 0 4px 19px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.submenu button {
  min-height: 32px;
  font-size: 13px;
}
.logout {
  margin-top: auto;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--menu-texto);
  padding: 0 10px;
}
.logout:hover {
  background: rgba(255, 255, 255, 0.05);
}
.version {
  padding: 0 10px;
  color: var(--menu-texto-2);
  font-size: 11px;
}

main {
  min-width: 0;
  padding: 24px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
main > header {
  display: flex;
  align-items: center;
  gap: 16px;
}
main > header > div {
  flex: 1;
  min-width: 0;
}
/* Título curto: o "rótulo em caixa alta" acima do título saiu (só repetia o nome do painel). */
main > header > div > span:not(.subtitulo) {
  display: none;
}
.subtitulo {
  display: block;
  margin-top: 2px;
  color: var(--texto-2);
  font-size: 13px;
}
.menu-toggle {
  display: none;
  width: 40px;
  min-height: 40px;
  padding: 0;
  flex: none;
}
.menu-toggle svg {
  width: 20px;
  height: 20px;
}
.view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cabeçalho de seção: o título já está no topo da página; aqui fica só a descrição curta e as ações. */
.section-head,
.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-head h2 {
  font-size: 16px;
}
.section-head p,
.panel-head p {
  font-size: 13px;
  margin-top: 2px;
  max-width: 820px;
}

/* ---------- cartões ---------- */
.panel,
.stats article,
.client-card,
.profile,
.report-summary article,
.full-report-card {
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
}
.panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.panel > h2,
.panel > h3 {
  margin: 0;
}
.table-panel {
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.stats article {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  min-width: 0;
}
.stats span {
  color: var(--texto-2);
  font-size: 13px;
  font-weight: 500;
}
.stats strong {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.stats strong .de {
  font-size: 18px;
  color: var(--texto-3);
  font-weight: 500;
}
.stats small {
  color: var(--texto-2);
}
.stats .warn strong {
  color: var(--aviso-texto);
}
.kpi-barra {
  height: 6px;
  border-radius: 3px;
  background: var(--linha);
  overflow: hidden;
}
.kpi-barra i {
  display: block;
  height: 100%;
  background: var(--ok);
}
.variacao.sobe {
  color: var(--ok-texto);
  font-weight: 600;
}
.variacao.desce {
  color: var(--erro-texto);
  font-weight: 600;
}
.grade-2 {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.grade-2 > .larga {
  flex: 2 1 560px;
  min-width: 0;
}
.grade-2 > .estreita {
  flex: 1 1 320px;
  min-width: 0;
}
.grade-2 > .meia {
  flex: 1 1 420px;
  min-width: 0;
}
.cabeca-cartao {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.cabeca-cartao a,
.cabeca-cartao .link {
  font-size: 13px;
  font-weight: 500;
}
.cabeca-cartao p {
  font-size: 13px;
  margin-top: 2px;
}
.link {
  border: 0;
  background: none;
  min-height: 0;
  padding: 0;
  color: var(--link);
}
.link:hover {
  background: none;
  text-decoration: underline;
}

/* Lista "Precisa de atenção" e listas simples com ponto de situação. */
.lista-situacao {
  display: flex;
  flex-direction: column;
}
.lista-situacao > * {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--linha);
  font-size: 13px;
  color: var(--texto);
  text-decoration: none;
  text-align: left;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  min-height: 0;
  width: 100%;
  white-space: normal;
  font-weight: 400;
}
.lista-situacao > button:hover {
  background: var(--superficie-2);
}
.lista-situacao .ponto {
  margin-top: 6px;
}
.lista-situacao b {
  display: block;
  font-weight: 600;
}
.lista-situacao small {
  display: block;
  color: var(--texto-2);
}
.lista-situacao .quando {
  margin-left: auto;
  color: var(--texto-3);
  font-size: 12px;
  white-space: nowrap;
}
.lista-situacao .vazio {
  color: var(--texto-2);
}

/* ---------- situação: ponto + texto, etiquetas ---------- */
.ponto {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--neutro);
}
.ponto.ok,
.ponto.online {
  background: var(--ok);
}
.ponto.aviso {
  background: var(--aviso);
}
.ponto.erro,
.ponto.critico {
  background: var(--erro);
}
.situacao {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  white-space: nowrap;
}
.situacao.ok {
  color: var(--ok-texto);
}
.situacao.aviso {
  color: var(--aviso-texto);
}
.situacao.erro {
  color: var(--erro-texto);
}
.situacao.off {
  color: var(--texto-2);
}
.pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  background: var(--neutro-fundo);
  color: var(--texto-2);
}
.pill.online,
.pill.sim,
.tag.ok,
.tag.papel-admin {
  background: var(--ok-fundo);
  color: var(--ok-texto);
}
.pill.offline,
.pill.nao,
.tag.blocked,
.pill.crit-critico {
  background: var(--erro-fundo);
  color: var(--erro-texto);
}
.pill.nova,
.tag.pending,
.pill.crit-atencao {
  background: var(--aviso-fundo);
  color: var(--aviso-texto);
}
.tag.auto,
.pill.crit-informativo,
.tag.papel-tecnico {
  background: var(--info-fundo);
  color: var(--link);
}
.tag.papel-visualizador {
  background: var(--neutro-fundo);
  color: var(--texto-2);
}
.ok {
  color: var(--ok-texto);
}
.bad {
  color: var(--erro-texto);
}

/* ---------- tabelas ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--borda);
}
.filters label {
  min-width: 160px;
}
.filters .search {
  flex: 1 1 260px;
  max-width: 420px;
  margin-left: auto;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--texto-2);
  background: var(--superficie-2);
  border-bottom: 1px solid var(--borda);
  white-space: nowrap;
}
th[data-sort] {
  cursor: pointer;
}
th[data-sort]:hover {
  color: var(--texto);
}
td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--linha);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
th:first-child,
td:first-child {
  padding-left: 16px;
}
th:last-child,
td:last-child {
  padding-right: 16px;
}
td b {
  font-weight: 600;
}
td small {
  display: block;
  color: var(--texto-3);
}
.panel > .table-wrap table th:first-child,
.panel > .table-wrap table td:first-child {
  padding-left: 0;
}
.table-panel .table-wrap table th:first-child,
.table-panel .table-wrap table td:first-child {
  padding-left: 16px;
}
tr.clickable {
  cursor: pointer;
}
tr.clickable:hover td {
  background: var(--superficie-2);
}
tr.selecionada td {
  background: var(--info-fundo) !important;
}
tr.clickable:focus-visible td {
  background: var(--info-fundo);
}
.duas-linhas {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.duas-linhas > :first-child {
  font-weight: 600;
  color: var(--texto);
}
.duas-linhas > :last-child:not(:first-child) {
  font-size: 12px;
  color: var(--texto-3);
}
.direita {
  text-align: right;
}
.nowrap {
  white-space: nowrap;
}
.check-cell,
th.check-cell {
  width: 36px;
  text-align: center;
}
.toner-mini {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  vertical-align: middle;
}
.toner-mini i {
  width: 8px;
  height: 22px;
  border-radius: 2px;
  background: var(--linha);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.toner-mini i b {
  display: block;
  width: 100%;
}
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--borda);
  font-size: 12px;
  color: var(--texto-2);
}
.pagination div {
  display: flex;
  gap: 6px;
}
.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--info-fundo);
  border-bottom: 1px solid var(--borda);
  font-size: 13px;
  font-weight: 500;
}
.panel .bulk-bar {
  border: 1px solid var(--borda);
  border-radius: var(--raio-p);
}
.bulk-bar div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.bulk-bar select {
  width: auto;
  min-width: 200px;
}

/* ---------- abas (filtros por situação, subtelas de alertas) ---------- */
.alert-subnav,
.abas {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: color-mix(in srgb, var(--borda) 70%, var(--fundo));
  border-radius: 10px;
  align-self: flex-start;
}
.alert-subnav button,
.abas button {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--texto-2);
  border-radius: 7px;
}
.alert-subnav button:hover,
.abas button:hover {
  background: color-mix(in srgb, var(--superficie) 60%, transparent);
}
.alert-subnav button.active,
.abas button.active,
.abas button[aria-selected='true'] {
  background: var(--superficie);
  color: var(--texto);
  font-weight: 600;
  box-shadow: var(--sombra);
}
.abas .n {
  color: var(--texto-3);
  font-weight: 500;
}

/* ---------- gráficos ---------- */
.grafico {
  display: flex;
  gap: 10px;
}
.grafico .eixo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 200px;
  font-size: 11px;
  color: var(--texto-3);
  text-align: right;
  min-width: 40px;
}
.grafico .area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.grafico .barras {
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  border-bottom: 1px solid var(--borda-forte);
  background-image: linear-gradient(var(--linha) 1px, transparent 1px);
  background-size: 100% 33.33%;
}
.grafico .barras > span {
  flex: 1;
  min-width: 2px;
  background: var(--serie-1);
  border-radius: 3px 3px 0 0;
  position: relative;
}
.grafico .barras > span.fds {
  opacity: 0.55;
}
.grafico .barras > span:hover {
  background: var(--serie-2);
}
.grafico .rotulos {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--texto-3);
}
.grafico .rotulos.cada {
  justify-content: stretch;
  gap: 4px;
}
.grafico .rotulos.cada span {
  flex: 1;
  text-align: center;
}
.legenda {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--texto-2);
}
.legenda span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legenda i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--serie-1);
}
.empty-chart,
.empty-note {
  padding: 24px 0;
  color: var(--texto-2);
  font-size: 13px;
  text-align: center;
}
.empty-note {
  text-align: left;
  padding: 8px 0;
}
.bars {
  display: flex;
  flex-direction: column;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(80px, 2fr) 90px;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--linha);
  font-size: 13px;
}
.bar-row:first-child {
  border-top: 0;
}
.bar-row span {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-row b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bar-track {
  height: 6px;
  border-radius: 3px;
  background: var(--linha);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--serie-1);
}

/* ---------- janelas (dialog) e painel lateral ---------- */
dialog {
  width: min(760px, 94vw);
  max-height: 90vh;
  padding: 24px;
  border: 1px solid var(--borda);
  border-radius: 16px;
  background: var(--superficie);
  color: var(--texto);
  box-shadow: var(--sombra-alta);
}
dialog::backdrop {
  background: rgba(16, 24, 40, 0.45);
}
dialog h2 {
  font-size: 18px;
  margin-bottom: 4px;
  padding-right: 40px;
}
dialog > p,
dialog form > p {
  margin-bottom: 8px;
}
.close {
  float: right;
  width: 36px;
  min-height: 36px;
  padding: 0;
  margin: -6px -6px 0 0;
  border: 0;
  background: transparent;
  color: var(--texto-2);
  font-size: 22px;
  line-height: 1;
}
.close:hover {
  background: var(--neutro-fundo);
}
/* Detalhe da impressora: painel que desliza da direita, a lista continua visível atrás. */
dialog.printer-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(520px, 100vw);
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  border-width: 0 0 0 1px;
  padding: 0;
  overflow-y: auto;
}
dialog.printer-dialog[open] {
  animation: entra-direita 0.18s ease-out;
}
dialog.printer-dialog::backdrop {
  background: rgba(16, 24, 40, 0.25);
}
@keyframes entra-direita {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
}
.printer-dialog .close {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 12px 0 0;
  z-index: 2;
}
#printerDetail, #mImpDetalhe {
  padding: 20px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#printerDetail h2, #mImpDetalhe h2 {
  font-size: 18px;
}
#printerDetail > h3, #mImpDetalhe > h3 {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--linha);
}
.detail-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.detail-sub {
  font-size: 12px;
  color: var(--texto-2);
  margin-top: -10px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0;
  font-size: 13px;
}
.detail-grid div {
  display: contents;
}
.detail-grid span {
  color: var(--texto-2);
  padding: 6px 0;
  border-top: 1px solid var(--linha);
}
.detail-grid b {
  font-weight: 500;
  padding: 6px 0;
  border-top: 1px solid var(--linha);
  word-break: break-word;
}
.metric-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.metric-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--raio-p);
  background: var(--superficie-2);
  border: 1px solid var(--linha);
}
.metric-card span {
  font-size: 12px;
  color: var(--texto-2);
}
.metric-card strong {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.supply-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.supply-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.supply-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.supply-head b {
  font-weight: 500;
}
.supply-head .pct {
  margin-left: auto;
  font-weight: 600;
}
.supply-track {
  height: 8px;
  border-radius: 4px;
  background: var(--linha);
  overflow: hidden;
}
.supply-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--serie-1);
}
.supply-fill.warn {
  background: var(--aviso);
}
.supply-fill.bad {
  background: var(--erro);
}
.swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  background: var(--neutro);
}
.swatch-k {
  background: #1d2939;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.swatch-c {
  background: #0ba5d9;
}
.swatch-m {
  background: #d9338a;
}
.swatch-y {
  background: #e8b90c;
}
.aviso-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--texto-2);
}

/* ---------- formulários ---------- */
.client-form,
.settings-form,
.password-form {
  display: grid;
  gap: 14px;
}
.client-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
}
.client-form .wide,
.client-form > button,
.client-form > .form-status {
  grid-column: 1 / -1;
}
.client-form > button {
  justify-self: start;
}
.client-form small {
  min-height: 0;
}
.client-form fieldset,
.expediente {
  border: 1px solid var(--borda);
  border-radius: var(--raio-p);
  padding: 8px 14px 12px;
  margin: 0;
  display: grid;
  gap: 10px;
}
legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--texto-2);
}
.settings-form > button,
.password-form > button {
  justify-self: start;
}
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  align-items: start;
}
.form-status {
  font-size: 13px;
  color: var(--texto-2);
}
.token-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--marca) 60%, var(--borda));
  border-radius: var(--raio-p);
  background: color-mix(in srgb, var(--marca) 10%, var(--superficie));
}
.token-box code {
  font-size: 14px;
  font-weight: 600;
}
.report-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}
.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.report-summary article {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.report-summary span {
  font-size: 12px;
  color: var(--texto-2);
}
.report-summary strong {
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.full-report-list {
  display: grid;
  gap: 12px;
}
.full-report-card {
  padding: 14px 16px;
  display: grid;
  gap: 8px;
}
.email-status {
  display: block;
  font-size: 11px;
  color: var(--texto-3);
}
.email-status.falhou {
  color: var(--erro-texto);
}
.email-status.enviado {
  color: var(--ok-texto);
}
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.papel-label {
  text-transform: capitalize;
}
.link-acao {
  font-weight: 500;
}
.login-rodape {
  display: block;
  text-align: center;
}
.botoes-linha {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- cartões de clientes, Agents e perfis (Master) ---------- */
.cards,
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.client-card,
.profile {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile h3 {
  font-size: 15px;
}
.meta,
.oid-list,
.client-meta {
  font-size: 13px;
  color: var(--texto-2);
  display: grid;
  gap: 4px;
}
.oid-list code {
  font-size: 11px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  counter-reset: passo;
}
.flow div {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--borda);
  border-radius: var(--raio-p);
  background: var(--superficie-2);
  color: var(--texto-3);
  font-size: 12px;
  font-weight: 600;
}
.flow b {
  color: var(--texto);
  font-size: 14px;
}
.flow span {
  color: var(--texto-2);
  font-weight: 400;
}
.inline {
  display: flex;
  gap: 8px;
}
#codeResult {
  font-size: 13px;
  color: var(--texto-2);
}
.agent-row,
.report-row,
.row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--linha);
  font-size: 13px;
}
.report-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
.agent-row small,
.report-row small {
  display: block;
  color: var(--texto-3);
}
.company-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.admin-access,
.credential {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--raio-p);
  background: var(--superficie-2);
  border: 1px solid var(--borda);
  font-size: 13px;
}
.credential span {
  font-weight: 600;
}
.profile.editing {
  border-color: var(--link);
}
.mapping .hint {
  font-size: 12px;
  color: var(--texto-2);
}
.mapping summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.map-wrap {
  overflow-x: auto;
}
.map-table th,
.map-table td {
  padding: 6px 8px;
}
.map-table select {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 12px;
}
.map-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.map-preview {
  padding: 10px 12px;
  border-radius: var(--raio-p);
  background: var(--superficie-2);
  border: 1px solid var(--borda);
  font-size: 13px;
}
.map-preview.com-problema {
  border-color: var(--aviso);
  background: var(--aviso-fundo);
}
.backup-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
}
.backup-lista li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 6px 0;
  border-top: 1px solid var(--linha);
}
.backup-lista span {
  color: var(--texto-3);
}

/* ---------- aviso flutuante ---------- */
#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 16px;
  border-radius: 10px;
  background: #101828;
  color: #fff;
  font-size: 13px;
  box-shadow: var(--sombra-alta);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.18s;
}
#toast.show {
  opacity: 1;
  transform: none;
}

/* ---------- permissões no navegador (a validação de verdade é no servidor) ---------- */
body[data-papel='visualizador'] .nao-visualizador {
  display: none !important;
}

/* ---------- celular e tablet ---------- */
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }
  aside {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(290px, 86vw);
    height: auto;
    z-index: 50;
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    box-shadow: var(--sombra-alta);
  }
  body.menu-aberto aside {
    transform: none;
  }
  body.menu-aberto::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(16, 24, 40, 0.45);
  }
  .menu-toggle {
    display: inline-flex;
  }
  main {
    padding: 16px 16px 40px;
    gap: 16px;
  }
  h1 {
    font-size: 20px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .stats article {
    padding: 12px 14px;
  }
  .stats strong {
    font-size: 22px;
  }
  .client-form {
    grid-template-columns: 1fr;
  }
  .filters .search {
    max-width: none;
    margin-left: 0;
  }
  #refresh {
    padding: 0 12px;
  }
  .bar-row {
    grid-template-columns: minmax(0, 1fr) 70px;
  }
  .bar-row .bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .agent-row {
    grid-template-columns: 1fr auto;
  }
  .so-desktop {
    display: none !important;
  }
}
@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stats strong {
    font-size: 20px;
  }
  .panel {
    padding: 16px;
  }
}

/* Ícones de linha (símbolos SVG do menu e dos botões): traço na cor do texto. */
.ico,
nav svg,
.menu-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.stats strong span {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.stats strong .de,
.stats strong .de span {
  font-size: 18px;
  color: var(--texto-3);
  font-weight: 500;
}
/* Poucas barras (ex.: 2 meses de histórico): barras estreitas e centralizadas, rótulo embaixo de cada uma. */
.grafico.poucos .barras,
.grafico.poucos .rotulos {
  justify-content: center;
  gap: 24px;
}
.grafico.poucos .barras > span,
.grafico.poucos .rotulos span {
  flex: 0 0 56px;
}
/* O menu lateral acompanha a página inteira (antes terminava na altura da janela em páginas longas). */
.shell {
  background: linear-gradient(to right, var(--menu-fundo) 240px, var(--fundo) 240px);
}
.filters:not(:has(> label:not(.hidden))) {
  display: none;
}
.filters label {
  min-width: 0;
}
.filters select {
  width: auto;
  min-width: 96px;
}
.filters label:has(select) {
  max-width: 280px;
}
.alerta-tipo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alerta-tipo .ponto {
  margin-top: 6px;
}
@media (max-width: 900px) {
  .shell {
    background: var(--fundo);
  }
}

#acoesPagina {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#acoesPagina:empty {
  display: none;
}
main > header > #acoesPagina {
  flex: none;
}
td.row-actions {
  display: table-cell;
  white-space: nowrap;
}
td.row-actions button + button {
  margin-left: 6px;
}
p.admin-access {
  display: block;
  color: var(--texto-2);
}
.stats .warn strong:is(:empty, [data-zero]) {
  color: inherit;
}
/* Campo de senha com olhinho (public/senha.js) e aviso de confirmação. */
.campo-senha {
  position: relative;
  display: block;
}
.campo-senha input {
  padding-right: 44px !important;
}
.campo-senha .olho {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 34px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--texto-2);
}
.campo-senha .olho:hover {
  background: var(--neutro-fundo);
}
.campo-senha .olho svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.confere {
  font-size: 12px;
  font-weight: 500;
}
.confere.sim {
  color: var(--ok-texto);
}
.confere.nao {
  color: var(--erro-texto);
}
.credencial-linhas {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  margin: 12px 0;
  font-size: 13px;
}
.credencial-linhas span {
  color: var(--texto-2);
}
.credencial-linhas code {
  font-size: 13px;
  justify-self: start;
}
.panel.link-acesso {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
}
.link-acesso > div {
  flex: 1 1 260px;
}
.link-acesso b {
  display: block;
  font-size: 14px;
}
/* Master v11.3: ficha do cliente, relatório por período, cadastro com endereço. */
.ficha-dados .cabeca-cartao { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ficha-dados .detail-grid { grid-template-columns: 170px minmax(0, 1fr) 170px minmax(0, 1fr); column-gap: 18px; }
@media (max-width: 900px) { .ficha-dados .detail-grid { grid-template-columns: 140px minmax(0, 1fr); } }
.ficha-dados .hint, #clienteFicha .hint, .printer-dialog .hint { font-size: 13px; color: var(--texto-2); margin-top: 12px; }
#clienteFicha > * + * { margin-top: 16px; }
.relatorio-periodo { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.relatorio-periodo label { max-width: 190px; }
.client-form fieldset > .client-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 0; }
#dlgCliente small:empty { display: none; }
#dlgCliente small { font-size: 12px; color: var(--texto-2); }
#dlgCliente small.confere.nao { color: var(--erro); }
#dlgCliente small.confere.sim { color: var(--ok, #12805c); }
#dlgCliente, #dlgHomologacao { width: min(720px, calc(100vw - 32px)); }
.bar-row .link { font: inherit; color: inherit; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.bar-row .link:hover, td .link:hover { color: var(--link); text-decoration: underline; }
td .link { font: inherit; color: var(--texto); text-align: left; }
#dashboard .grade-2:first-of-type, #clienteFicha .grade-2 { align-items: flex-start; }
.table-panel > .cabeca-cartao { padding: 16px 16px 10px; }
#clienteFicha .relatorio-periodo { border: 0; padding: 4px 0 0; }
#dashboard .report-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#dlgCliente, #dlgHomologacao { position: fixed; }
.client-form > button.close { position: absolute; top: 14px; right: 14px; width: 36px; min-height: 36px; padding: 0; margin: 0; border: 0; background: transparent; color: var(--texto-2); font-size: 22px; box-shadow: none; }
.client-form > button.close:hover { background: var(--neutro-fundo); color: var(--texto); }
.client-form .botoes-linha button:not(.primary) { background: var(--superficie); color: var(--texto); border: 1px solid var(--borda); }
/* v11.3.1: botão de salvar das janelas e formulários sempre com respiro em relação aos campos acima. */
dialog form > button:not(.close),
dialog form > .botoes-linha,
.client-form > .botoes-linha,
.client-form > .wide.botoes-linha,
.client-form > button:not(.close) {
  margin-top: 12px;
}
dialog form > div.client-form + button,
dialog form > fieldset + button,
dialog form > label + button {
  margin-top: 20px;
}
.settings-form > button,
.password-form > button {
  margin-top: 8px;
}
dialog form > h3 {
  margin: 18px 0 8px;
}
/* Regras de alerta (Admin v11.3.1) */
#alertConfigPanel > * + * { margin-top: 16px; }
.regra-bloco { border: 1px solid var(--borda); border-radius: var(--raio-p); padding: 10px 14px 12px; margin: 14px 0; display: grid; gap: 8px; }
.regra-tipos { display: grid; gap: 8px; }
.regra-tipos select { margin-left: 8px; width: auto; min-height: 30px; padding: 2px 8px; }
.regra-clientes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; max-height: 220px; overflow: auto; margin-top: 8px; }
#rgClientesBusca { margin-top: 6px; }
.regra-tags .tag { margin: 2px 2px 2px 0; }
.aviso-faixa { margin: 0 16px 12px; padding: 10px 12px; border-radius: var(--raio-p); background: var(--aviso-fundo, #fff7e0); color: var(--aviso-texto, #7a5600); font-size: 13px; }
#regraDialog { width: min(680px, 94vw); }
dialog form > h2 { margin-bottom: 12px; }
.client-form + p.form-status { margin-top: 12px; }
#tokenVisualizadorBox { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--linha); }
#tokenVisualizadorBox h3 { margin-bottom: 4px; }
#tokenVisualizadorBox .credencial-linhas { margin-top: 12px; }
#cepStatus:empty { display: none; }
/* v11.4: permissões do usuário do Admin (o servidor também confere). */

body:not([data-perms~='clientes']) [data-perm='clientes'],
body:not([data-perms~='impressoras']) [data-perm='impressoras'],
body:not([data-perms~='agents']) [data-perm='agents'],
body:not([data-perms~='alertas']) [data-perm='alertas'],
body:not([data-perms~='relatorios']) [data-perm='relatorios'],
body:not([data-perms~='usuarios']) [data-perm='usuarios'],
body:not([data-perms~='pin']) [data-perm='pin'] {
  display: none !important;
}
/* Cliente final (Visualizador): topo só com a marca. */
body[data-papel='visualizador'] .account,
body[data-papel='visualizador'] .brand span,
body[data-papel='visualizador'] #headerKicker {
  display: none !important;
}
.submenu.hidden { display: none; }
.walk-caixa { border: 1px dashed var(--borda); border-radius: var(--raio-p); padding: 12px 14px; background: var(--fundo-2, transparent); }
.walk-caixa p { font-size: 13px; color: var(--texto-2); margin: 4px 0 8px; }
#hmWalkResultado { margin-top: 10px; font-size: 13px; }
#hmWalkResultado table { width: 100%; font-size: 12px; }
#hmWalkResultado .aviso-faixa { margin: 6px 0; }
.explica-catalogo { max-width: 860px; color: var(--texto-2); font-size: 14px; margin: 0 0 16px; }
body[data-papel='visualizador'] .grade-2:has(> .nao-visualizador) > .panel:not(.nao-visualizador) { grid-column: 1 / -1; }
/* ---------- v11.5: estoque, peças, chamados, fatura, previsão do toner ---------- */
body:not([data-perms~='estoque']) [data-perm='estoque'],
body:not([data-perms~='chamados']) [data-perm='chamados'],
body:not([data-papel='admin']) .so-admin {
  display: none !important;
}
nav button .nav-n { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--marca); color: #1d1300; font-size: 11px; font-weight: 700; text-align: center; }
nav button .nav-n.alerta { background: var(--erro); color: #fff; }
nav button .nav-n.hidden { display: none; }
.toner-celula { display: inline-flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.prev-toner { color: var(--texto-3); font-size: 11px; white-space: nowrap; }
.prev-toner.perto { color: var(--erro-texto); font-weight: 600; }
.texto-erro { color: var(--erro-texto); }
tr.inativo td { opacity: 0.55; }
.modelos-cel { max-width: 260px; color: var(--texto-2); font-size: 13px; }
.mov-det > span:last-child { white-space: normal; max-width: 620px; }
.regra-tags .tag b { font-weight: 700; }
.status-ch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status-ch::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--neutro); }
.status-ch.st-aberto::before { background: var(--aviso); }
.status-ch.st-em_atendimento::before { background: var(--link); }
.status-ch.st-aguardando::before { background: var(--marca); }
.status-ch.st-resolvido::before { background: var(--ok); }
.prio-alta { color: var(--aviso-texto) !important; }
.prio-critica { color: var(--erro-texto) !important; font-weight: 600 !important; }
.tag.prio-alta { background: var(--aviso-fundo); }
.tag.prio-critica { background: var(--erro-fundo); }
.op-dialog { width: min(640px, 94vw); }
.op-dialog .client-form .hidden { display: none; }
.chips-modelos { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: -4px; }
.chips-modelos small { color: var(--texto-3); }
.chip { min-height: 26px; padding: 2px 10px; border: 1px solid var(--borda); border-radius: 13px; background: var(--superficie-2); color: var(--texto-2); font-size: 12px; }
.chip:hover { border-color: var(--borda-forte); color: var(--texto); }
.chamado-dialog { width: min(760px, 96vw); }
.chamado-msgs { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; margin: 14px 0; padding: 4px 2px; }
.msg { max-width: 86%; padding: 10px 12px; border-radius: var(--raio); background: var(--superficie-2); border: 1px solid var(--borda); }
.msg.nosso { align-self: flex-end; background: var(--info-fundo); }
.msg.interna { background: var(--aviso-fundo); border-style: dashed; }
.msg-cab { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--texto-3); margin-bottom: 4px; }
.msg-cab b { color: var(--texto); font-size: 13px; }
.msg-cab span:last-child { margin-left: auto; }
.msg-texto { white-space: pre-wrap; font-size: 14px; line-height: 1.5; }
.msg-sistema { align-self: center; font-size: 12px; color: var(--texto-3); }
.chamado-dialog .resp { display: flex; flex-direction: column; gap: 6px; }
.resp-linha { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 10px; }
.resp-linha label:not(.check) { display: flex; gap: 8px; align-items: center; }
.resp-linha .espaco { flex: 1; }
.prev-lista { display: grid; gap: 8px; }
.prev-item { display: grid; grid-template-columns: auto auto 50px 1fr; gap: 4px 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--borda); border-radius: var(--raio-p); background: var(--superficie); }
.prev-item small { grid-column: 2 / -1; color: var(--texto-3); }
.prev-item > span:nth-of-type(1) { font-weight: 700; text-align: right; }
.prev-item > span:nth-of-type(2) { color: var(--texto-2); font-size: 13px; }
.pecas-imp { display: grid; gap: 8px; }
.peca-card { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--borda); border-radius: var(--raio-p); background: var(--superficie); }
.peca-topo { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.peca-card small { color: var(--texto-3); }
.peca-card small.texto-erro { color: var(--erro-texto); }
.instalar-peca { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.instalar-peca select { flex: 1 1 260px; min-width: 0; }
.instalar-peca input { flex: 0 0 160px; width: 160px; }
.aviso-list.trocas li small { color: var(--texto-3); }
.stats strong.menor { font-size: 22px; }
.pc-nota { padding: 0 16px 14px; }
.valor-cobranca { display: inline-flex; gap: 6px; align-items: center; }
.valor-cobranca input { width: 110px; }
#chamadosBadge.hidden, #suporteBadge.hidden, #pendingBadge.hidden { display: none; }
.cat-total { margin-left: auto; align-self: end; color: var(--texto-3); font-size: 13px; padding-bottom: 10px; }
tr.cat-det td { background: var(--superficie-2); }
tr.cat-det .profile { border: 0; background: transparent; box-shadow: none; }
.hist-botao { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 4px; }
.hist-botao small { color: var(--texto-3); }
.op-dialog.largo { width: min(920px, 96vw); }
.hist-tabela { max-height: 56vh; overflow: auto; margin-top: 10px; }
.diag-texto { max-height: 56vh; overflow: auto; padding: 12px; border-radius: var(--raio-p); background: var(--superficie-2); border: 1px solid var(--borda); font: 12px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
/* v11.7: Modelos encontrados nos clientes (Homologações) e lista do que já vem pronto no Agent (Catálogo). */
.modelos-panel { margin-top: 20px; }
.modelos-panel > .panel-head { padding: 16px 16px 0; }
.modelos-panel > .hint { padding: 0 16px 14px; margin: 10px 0 0; }
.panel.embutido { margin-bottom: 16px; }
.panel.embutido summary { cursor: pointer; }
.panel.embutido table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.panel.embutido td, .panel.embutido th { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--borda, #e5e7eb); }
.aviso-walk { color: var(--aviso-texto); }
/* v11.8: tela de login com o nome ao lado do T (MTPULSE / MASTER ou ADMIN), como no menu lateral. */
.login-marca { display: flex; align-items: center; gap: 12px; }
.login-marca img { width: 48px; height: 48px; object-fit: contain; }
.login-marca b { display: block; font-size: 22px; font-weight: 800; letter-spacing: 0.5px; color: var(--texto); line-height: 1.1; }
.login-marca span { display: block; font-size: 12px; font-weight: 700; letter-spacing: 2.5px; color: var(--texto-2, #64748b); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* v11.8: com uma janela (diálogo) aberta, só ela rola; a página de trás fica parada. */
body.dialogo-aberto { overflow: hidden; }
dialog { overscroll-behavior: contain; }
.login-aviso { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--aviso-fundo, #fff7e6); color: var(--aviso-texto, #8a5a00); font-size: 13px; }
/* v11.8: relatório com contador total, P&B e cor (inicial e final). */
.report-contadores th.grupo { text-align: center; border-bottom: 1px solid var(--borda); }
.report-contadores th.num, .report-contadores td.num { text-align: right; white-space: nowrap; }
/* v11.8: relatório de cobrança por cliente (Master → Cobrança). */
.cob-rel-empresa { border: 1px solid var(--borda); border-radius: 12px; padding: 16px; margin-top: 14px; }
.cob-rel-empresa header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.cob-rel-empresa h3 { margin: 0 0 2px; font-size: 17px; }
.cob-rel-empresa table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cob-rel-empresa td, .cob-rel-empresa th { padding: 6px 8px; border-bottom: 1px solid var(--borda); text-align: left; }
.cob-rel-empresa .direita { text-align: right; }
.cob-rel-total { margin: 12px 0 0; font-size: 15px; text-align: right; }
@media print {
  body.imprimindo-cobranca > *:not(#dlgCobRel) { display: none !important; }
  body.imprimindo-cobranca #dlgCobRel { position: static; display: block; border: 0; box-shadow: none; max-width: none; width: 100%; max-height: none; overflow: visible; padding: 0; }
  body.imprimindo-cobranca #dlgCobRel::backdrop { display: none; }
  body.imprimindo-cobranca .sem-imprimir, body.imprimindo-cobranca #dlgCobRel .close { display: none !important; }
  body.imprimindo-cobranca .cob-rel-empresa { break-inside: avoid; color: #000; }
}
#backupLista li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 4px 0; }
a.botao-link { border: 1px solid var(--borda); border-radius: 8px; padding: 3px 10px; text-decoration: none; color: var(--texto); font-size: 13px; }

/* v11.9: homologação em largura total, com busca e colunas Papel · Valor · Nome · OID */
.profile.largo { grid-column: 1 / -1; }
.profile .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.map-ferramentas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 8px 0; }
.map-ferramentas input[type="search"] { flex: 1 1 280px; min-height: 36px; }
.map-contagem { font-size: 12px; color: var(--texto-3); margin-left: auto; }
.map-wrap { max-height: 520px; overflow: auto; border: 1px solid var(--borda); border-radius: var(--raio-p); }
.map-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.map-table thead th { position: sticky; top: 0; background: var(--superficie-2); z-index: 1; text-align: left; }
.map-table th.num, .map-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.map-table td code { font-size: 11px; color: var(--texto-3); word-break: break-all; }
.map-table tbody tr { border-top: 1px solid var(--linha); }
.map-table tr.escolhido { background: var(--superficie-2); }
.map-table tr.escolhido td:first-child select { border-color: var(--link); }
.correcao { display: grid; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--linha); }
/* v11.9: logo da empresa (Admin) */
.brand img.logo-empresa { width: auto; max-width: 120px; height: 36px; background: #fff; border-radius: 6px; padding: 2px 4px; }
.logo-previa { display: flex; align-items: center; min-height: 64px; padding: 10px; border: 1px dashed var(--borda); border-radius: var(--raio-p); background: var(--superficie-2); }
.logo-previa img { max-height: 60px; max-width: 220px; object-fit: contain; }
.logo-previa span { font-size: 13px; color: var(--texto-3); }
.map-table small.pista { color: var(--texto-3); font-size: 11px; }

/* v11.9b: restaurar backup */
.backup-lista li .compact { margin-left: 6px; }
#restaurarResumo { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--linha); display: grid; gap: 10px; }
#restaurarResumo.hidden { display: none; }
#restaurarResumo ul { margin: 0; padding-left: 18px; font-size: 13px; }
#restaurarResumo .aviso-faixa { margin: 0; }
