/* =========================================================
   MEUCONDO — style.css (complemento ao common.css)
   ========================================================= */

/* ----- formulários base ----- */
input,
select,
textarea {
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
}

input:disabled,
input[readonly],
select:disabled {
  background: #f0f0f0;
  cursor: default;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ----- tipografia / avisos ----- */
.page-title {
  color: #333;
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 14px;
}

.page-title-inline { margin: 0; }

.page-subtitle,
.aviso,
.subtitulo {
  color: #666;
  font-size: 14px;
  margin-bottom: 18px;
}

.aviso {
  color: #888;
  font-size: 12px;
  margin-bottom: 12px;
}

.aviso-compacto { margin: 0 0 6px; }
.aviso-hist { margin: 8px 0 10px; }
.aviso-inline { margin: 0; }
.aviso-top { margin-top: 10px; }

.texto-ajuda {
  color: #888;
  font-size: 12px;
  margin: 0 0 14px;
}

.card-title-inline { margin: 0; }

.card h3 {
  color: #333;
  font-size: 16px;
  margin-bottom: 10px;
}

.card-header-flex {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 0;
}

/* ----- tabelas ----- */
.table-wrap {
  overflow-x: auto;
  width: 100%;
  overflow: visible;
}

.table-wrap:has(.menu-acoes-lista.aberto) {
  overflow: visible;
}

table th,
table td {
  border-bottom: 1px solid #eee;
  font-size: 14px;
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

table th {
  background: #f7f7f7;
  color: #555;
  font-size: 13px;
  font-weight: bold;
}

table tr:hover td {
  background: #fafafa;
}

.valor,
td.valor {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.col-acoes { text-align: center; width: 70px; }
.col-codigo { font-size: 12px; white-space: nowrap; width: 12%; }
.col-desc { width: 32%; }
.col-data { width: 12%; }
.col-cat { width: 18%; }
.col-valor { text-align: right !important; width: 14%; }
.col-ativo { width: 50px; }
.col-acoes-160 { width: 160px; }
.col-acoes-280 { width: 280px; }

.linha-total {
  background: #f9f9f9;
  font-weight: bold;
}

th[onclick] {
  cursor: pointer;
  user-select: none;
}

th[onclick]:hover {
  background: #ebebeb;
}

/* ----- status / badges ----- */
.badge,
.status {
  border-radius: 12px;
  display: inline-block;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
}

.status.pago,
.badge.pago,
.badge-pago {
  background: #d4edda;
  color: #155724;
}

.status.aberto,
.badge.aberto,
.badge-pendente {
  background: #fff3cd;
  color: #856404;
}

.status.atrasado,
.badge.atrasado,
.badge-atrasado {
  background: #f8d7da;
  color: #721c24;
}

.status.parcial,
.badge.parcial {
  background: #f4f4f4;
  color: #666;
}

.badge-publico {
  background: #d4edda;
  color: #155724;
}

.badge-privado {
  background: #f8d7da;
  color: #721c24;
}

.positivo { color: #1e7e34; font-weight: bold; }
.negativo { color: #c0392b; font-weight: bold; }

.status-cinza { color: #999; font-weight: bold; }
.status-laranja { color: orange; font-weight: bold; }
.status-verde { color: green; font-weight: bold; }
.status-vermelho { color: red; font-weight: bold; }
.status-finalizado { color: #888; font-size: 12px; }
.status-confirmado { color: green; font-size: 12px; margin-right: 8px; }

.status-pendente {
  color: #c0392b;
  font-size: 12px;
  font-weight: bold;
  margin-right: 8px;
}

/* ----- botões ----- */
.btn-sm {
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-size: 13px;
  font-weight: bold;
  padding: 8px 12px;
  text-decoration: none;
  background: #5BA3D9;
}

.btn-sm:hover { background: #4A90C4; }

.btn-del,
.btn-del-doc {
  background: #e74c3c;
  color: #fff;
}

.btn-del:hover,
.btn-del-doc:hover {
  background: #c0392b;
}

.btn-cancel,
.btn-cancel-doc,
.btn-fec {
  background: #999;
  color: #fff;
}

.btn-cancel:hover,
.btn-cancel-doc:hover,
.btn-fec:hover {
  background: #777;
}

.btn-env { background: #5BA3D9; color: #fff; }

.btn-sucesso {
  background: #27ae60;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  padding: 10px 18px;
}

.btn-sucesso:hover { background: #1e8449; }

.btn-urgente,
.btn-emergencia { background: #e74c3c; }

.btn-urgente:hover,
.btn-emergencia:hover { background: #c0392b; }

.btn-modo {
  background: #888;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  padding: 6px 12px;
}

.btn-modo:hover { background: #666; }

.btn-calc {
  background: #5BA3D9;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  padding: 8px 14px;
}

.btn-calc:hover { background: #4A90C4; }

.btn-acoes {
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #333;
  cursor: pointer;
  font-size: 16px;
  font-weight: normal;
  padding: 4px 10px;
}

.btn-baixar {
  background: #5BA3D9;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  padding: 8px 16px;
  text-decoration: none;
}

.btn-baixar:hover { background: #4A90C4; }

.btn-download {
  background: #5BA3D9;
  border-radius: 4px;
  color: #fff;
  display: inline-block;
  font-size: 12px;
  font-weight: bold;
  margin-right: 4px;
  padding: 6px 12px;
  text-decoration: none;
}

.btn-download:hover { background: #4A90C4; }

.btn-toggle {
  background: #6c757d;
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-size: 12px;
  font-weight: bold;
  margin-right: 4px;
  padding: 6px 12px;
  text-decoration: none;
}

.btn-toggle:hover { background: #5a6268; }

.btn-flex { flex: 1; text-align: center; }

.x-cinza,
.btn-x-cinza {
  background: #bbb !important;
  color: #fff !important;
  cursor: default;
}

.x-cinza-link,
.acao-bloqueada {
  color: #aaa;
  font-size: 17px;
  text-decoration: none;
}

.x-vermelho-link,
.acao-apagar {
  color: #e74c3c;
  font-size: 17px;
  text-decoration: none;
}

.check-verde {
  color: #27ae60;
  font-size: 20px;
  margin-right: 8px;
  text-decoration: none;
}

.confirmado-txt {
  color: #27ae60;
  font-size: 12px;
  margin-right: 8px;
}

/* ----- formulários ----- */
.form-linha {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.form-linha-align-end { align-items: flex-end; }

.form-grupo {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-grupo label {
  color: #555;
  font-size: 13px;
  font-weight: bold;
}

.form-inline,
.form-inline-gap {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-inline input,
.form-inline select {
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  margin: 0;
  padding: 10px;
}

.form-inline-gap { margin-bottom: 14px; }
.form-inline-modal { display: inline; }

.form-despesa input,
.form-despesa select {
  margin-bottom: 0;
}

.input-moeda { text-align: right; }
.input-disabled { background: #f5f5f5; }
.input-motivo { width: 280px; }
.input-valor { width: 120px; }
.input-valor-lg { width: 160px; }
.input-desc { width: 260px; }
.input-desc-sm { width: 220px; }
.input-data { width: 90px; }

.input-data-full {
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  margin: 0 0 12px;
  padding: 10px;
  width: 100%;
}

.input-qtd { width: 130px; }
.input-file-sm { font-size: 12px; margin-bottom: 6px; }

.input-w-70 { width: 70px; }
.input-w-90 { width: 90px; }
.input-w-100 { width: 100px; }
.input-w-110 { width: 110px; }
.input-w-130 { width: 130px; }
.input-w-140 { width: 140px; }
.input-w-200 { width: 200px; }
.input-w-300 { width: 300px; max-width: 100%; }
.input-min-140 { min-width: 140px; }
.input-min-160 { min-width: 160px; }
.input-min-180 { min-width: 180px; }
.input-min-200 { min-width: 200px; }
.input-max-280 { max-width: 280px; width: 100%; }
.input-flex-1 { flex: 1; min-width: 220px; }

.label-bloco {
  color: #555;
  font-size: 13px;
  margin: 10px 0 8px;
}

.label-sm {
  color: #666;
  font-size: 12px;
}

.checkbox-group { margin-bottom: 14px; }

.checkbox-group label {
  display: inline-block;
  font-size: 14px;
  margin-bottom: 8px;
  margin-right: 18px;
}

.hidden-check { display: none; }

.form-check-linha { margin-bottom: 15px; }
.form-check-linha label { font-size: 14px; }

.acoes-bloco { margin-top: 14px; }

.text-right { text-align: right; }
.text-right-bold { font-weight: bold; text-align: right; }
.text-bold { font-weight: bold; }
.td-center { text-align: center; }

/* ----- menu de ações ----- */
.menu-acoes {
  display: inline-block;
  position: relative;
}

.menu-acoes .btn-acoes {
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #333;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  padding: 4px 10px;
}

.menu-acoes-lista {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  display: none;
  min-width: 160px;
  padding: 6px 0;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 80;
}

.menu-acoes-lista.aberto {
  display: block;
  z-index: 90;
}

.menu-acoes-lista button,
.menu-acoes-lista a {
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  display: block;
  font-size: 13px;
  font-weight: normal;
  padding: 8px 14px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.menu-acoes-lista button:hover,
.menu-acoes-lista a:hover {
  background: #f5f5f5;
}

.menu-acoes-lista button:disabled {
  color: #aaa;
  cursor: not-allowed;
}

.acoes a {
  font-size: 18px;
  margin: 0 6px;
  text-decoration: none;
}

.acoes .del { color: red; }
.acoes .edit { color: #555; }
.acoes .ok { color: green; }

/* ----- modais ----- */
.modal-overlay {
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 1000;
}

.modal-overlay.aberto {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  color: inherit;
}

.modal-caixa {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  max-width: 520px;
  overflow: auto;
  padding: 22px;
  width: 92%;
}

.modal-caixa h3,
.modal-caixa h4 {
  font-size: 16px;
  margin-bottom: 10px;
}

.modal-acoes {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.modal-acoes-full {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.modal-texto {
  color: #333;
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 18px;
}

.modal-erro-texto {
  color: #c0392b;
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 18px;
}

/* ----- grids / listas ----- */
.servicos-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.servico-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px;
}

.servico-card h3 { font-size: 15px; margin-bottom: 6px; }
.servico-card p { color: #666; font-size: 13px; margin-bottom: 12px; }

.meta-linha { color: #666; font-size: 12px; }

.totais {
  border-top: 1px solid #ddd;
  font-size: 15px;
  margin-top: 14px;
  padding-top: 12px;
}

.totais p { margin: 5px 0; }

.totais-linha {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 12px;
}

.totais-linha > p {
  font-size: 16px;
  margin: 0;
}

.totais-com-saldo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.totais-esq,
.totais-dir {
  flex: 1 1 240px;
}

.totais-dir { text-align: right; }

.saldo-bancario-titulo {
  font-size: 1.05em;
  font-weight: bold;
  margin: 0 0 8px;
}

.saldo-bancario-titulo strong { font-weight: bold; }

.saldo-bancario-linha {
  margin: 4px 0;
  font-size: inherit;
  font-weight: normal;
  color: inherit;
}

.saldo-bancario-linha strong { font-weight: bold; }

.voltar {
  color: #5BA3D9;
  display: inline-block;
  font-size: 14px;
  margin-bottom: 18px;
  text-decoration: none;
}

.voltar:hover { text-decoration: underline; }

/* ----- FAB ajuda ----- */
.fab-ajuda {
  align-items: center;
  background: #5BA3D9;
  border: none;
  border-radius: 50%;
  bottom: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 28px;
  height: 56px;
  justify-content: center;
  position: fixed;
  right: 20px;
  width: 56px;
  z-index: 400;
}

.fab-ajuda:hover { background: #4A90C4; }

.fab-modal {
  background: #fff;
  border-radius: 12px;
  bottom: 86px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  display: none;
  max-width: calc(100vw - 40px);
  padding: 16px 18px;
  position: fixed;
  right: 20px;
  width: 320px;
  z-index: 401;
}

.fab-modal.aberto { display: block; }
.fab-modal h4 { font-size: 15px; margin-bottom: 10px; }
.fab-modal textarea { min-height: 90px; resize: vertical; width: 100%; }

.fab-modal .acoes {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

/* ----- bloqueio master no mobile ----- */
.aviso-mobile-master {
  align-items: center;
  background: #EAEAEA;
  display: none;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 9999;
}

.aviso-mobile-master-caixa {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-width: 420px;
  padding: 28px 24px;
  text-align: center;
}

.aviso-mobile-master-caixa strong {
  color: #333;
  display: block;
  font-size: 18px;
  margin-bottom: 10px;
}

.aviso-mobile-master-caixa p {
  color: #666;
  font-size: 14px;
  line-height: 1.45;
}

.aviso-mobile-master-sub {
  color: #888;
  font-size: 13px;
  margin-top: 8px;
}

/* =========================================================
   MOBILE — somente slave
   ========================================================= */
@media (max-width: 900px) {
  body.layout-master > *:not(.aviso-mobile-master) {
    display: none !important;
  }

  body.layout-master .aviso-mobile-master {
    display: flex !important;
  }

  body.layout-slave {
    min-width: 0;
    overflow-x: hidden;
  }

  body.layout-slave header { height: auto; }

  body.layout-slave .header-content {
    flex-wrap: wrap;
    gap: 10px;
    height: auto;
    padding: 12px 16px;
  }

  body.layout-slave .logo {
    height: 48px;
    max-width: 200px;
    width: auto;
  }

  body.layout-slave .user-info { font-size: 13px; }

  body.layout-slave .menu-botoes { padding: 12px; }
  body.layout-slave .menu-botoes-inner { gap: 8px; }

  body.layout-slave .menu-botoes a {
    font-size: 12px;
    padding: 8px 12px;
  }

  body.layout-slave main { padding: 16px 12px 28px; }
  body.layout-slave .page-title { font-size: 18px; }
  body.layout-slave .card { padding: 14px; }

  body.layout-slave .card h2,
  body.layout-slave .card-title,
  body.layout-slave .card-titulo {
    font-size: 16px;
  }

  body.layout-slave .servicos-grid { grid-template-columns: 1fr; }
  body.layout-slave .grid-2 { grid-template-columns: 1fr; }

  body.layout-slave table th,
  body.layout-slave table td {
    font-size: 13px;
    padding: 8px;
  }

  body.layout-slave .fab-ajuda {
    bottom: 14px;
    height: 50px;
    right: 14px;
    width: 50px;
  }

  body.layout-slave .fab-modal {
    bottom: 72px;
    right: 14px;
    width: calc(100vw - 28px);
  }

  body.layout-slave .arquivos-grid { justify-content: center; }
  body.layout-slave .valores-topo-agua { margin-top: 0; }

  body.layout-slave .img-conta-agua {
    height: auto;
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 480px) {
  body.layout-slave .menu-botoes a {
    font-size: 11px;
    padding: 7px 10px;
  }

  body.layout-slave .logo { max-width: 160px; }
}

/* =========================================================
   PÁGINAS
   ========================================================= */

/* ----- balanço ----- */
.chart-saldo-box {
  height: 220px;
  position: relative;
}

.ordenar {
  color: #555;
  font-size: 13px;
  margin-bottom: 10px;
}

.ordenar button {
  background: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #333;
  cursor: pointer;
  font-size: 12px;
  font-weight: normal;
  margin-bottom: 4px;
  margin-right: 6px;
  padding: 5px 12px;
}

.ordenar button:hover,
.ordenar button.ativo {
  background: #5BA3D9;
  border-color: #5BA3D9;
  color: #fff;
}

.variacao {
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 18px;
  padding: 12px 16px;
}

.variacao.igual { background: #e2e3e5; color: #383d41; }
.variacao.mais { background: #f8d7da; color: #721c24; }
.variacao.menos { background: #d4edda; color: #155724; }

/* ----- configurador ----- */
.dados-grid {
  align-items: flex-start;
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
}

.dados-texto {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.dados-texto p {
  color: #444;
  font-size: 14px;
  margin: 6px 0;
}

.nome-condo {
  color: #333;
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 10px;
}

.nome-condo-linha {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.plano-badge {
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
}

.plano-plus,
.plano-basico {
  color: #5BA3D9;
}

.aviso-contato {
  color: #888;
  font-size: 12px;
  margin-top: 10px;
}

.logo-condo {
  flex-shrink: 0;
  text-align: center;
  width: 120px;
}

.logo-condo img,
.logo-placeholder {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  height: 120px;
  object-fit: contain;
  width: 120px;
}

.logo-placeholder {
  align-items: center;
  color: #999;
  display: flex;
  font-size: 12px;
  justify-content: center;
}

.logo-condo-form { margin-top: 10px; }

.estrela {
  color: #f1c40f;
  font-size: 16px;
  text-decoration: none;
}

.estrela.off { color: #ccc; }

.modo-edicao { display: none; }
.modo-texto { font-size: 13px; }

tr.editando .modo-texto { display: none; }

tr.editando .modo-edicao {
  align-items: center;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.modo-edicao-center { justify-content: center; }

.linha-opcoes.editando .modo-texto { display: none; }

.linha-opcoes.editando .modo-edicao {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

/* ----- dashboard ----- */
.bemvindo {
  color: #333;
  font-size: 22px;
  font-weight: bold;
  margin: 0;
}

.topo-info {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cidade-data { color: #555; font-size: 15px; }
.periodo { color: #888; font-size: 12px; margin-bottom: 12px; }

.resumo-linha {
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  font-size: 14px;
  justify-content: space-between;
  padding: 10px 0;
}

.resumo-linha:last-child {
  border-bottom: none;
  font-size: 16px;
  font-weight: bold;
}

.chart-box {
  height: 260px;
  position: relative;
}

.chart-tipos {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.chart-tipos button {
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #333;
  cursor: pointer;
  font-size: 12px;
  font-weight: normal;
  padding: 6px 14px;
}

.chart-tipos button.ativo {
  background: #5BA3D9;
  border-color: #5BA3D9;
  color: #fff;
}

.leituras-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.leitura-chip {
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 13px;
  min-width: 140px;
  padding: 10px 16px;
}

.leitura-chip strong {
  color: #333;
  display: block;
  margin-bottom: 4px;
}

.leitura-chip span { color: #666; }

.aviso-hoje {
  background: #fff8e6;
  border: 1px solid #f0d78c;
  border-radius: 6px;
  margin: 0 -12px;
  padding: 12px;
}

.aviso-sub {
  color: #666;
  font-size: 12px;
  margin-top: 2px;
}

.aviso-reserva-pendente {
  border-left: 3px solid #e67e22;
  padding-left: 10px;
}

.aviso-reserva-aprovada {
  align-items: baseline;
  border-left: 3px solid #27ae60;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding-left: 12px;
}

.reserva-label {
  color: #27ae60;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.reserva-data {
  color: #1351B4;
  font-size: 13px;
  font-weight: bold;
}

.reserva-periodo {
  color: #e67e22;
  font-size: 12px;
  font-weight: 600;
}

.reserva-area {
  color: #333;
  font-size: 14px;
  font-weight: bold;
}

.reserva-sep { color: #999; }

.card-atendimento-alerta {
  border-left: 4px solid #e67e22;
  margin-bottom: 18px;
}

.lista-atendimento {
  font-size: 14px;
  margin: 10px 0 0;
  padding-left: 18px;
}

.lista-atendimento-hora {
  color: #888;
  font-size: 12px;
}

.link-ver-mais {
  color: #5BA3D9;
  display: inline-block;
  font-size: 13px;
  margin-top: 8px;
  text-decoration: none;
}

.link-ver-mais:hover { text-decoration: underline; }

.aviso-rapido-titulo {
  color: #5BA3D9;
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.aviso-rapido-texto {
  color: #333;
  font-size: 18px;
  line-height: 1.45;
  margin: 0 0 16px;
  white-space: pre-wrap;
}

.pendencias-box {
  background: #fff8e6;
  border: 1px solid #f0d78c;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 14px;
  padding: 10px 12px;
}

.pendencias-titulo {
  display: block;
  margin-bottom: 6px;
}

.pendencias-box ul {
  margin: 0;
  padding-left: 18px;
}

.pendencias-box li { margin-bottom: 4px; }

/* ----- despesas ----- */
.tabela-despesas,
.tabela-recorrentes {
  table-layout: fixed;
}

.tabela-despesas .col-acoes {
  width: 90px;
  min-width: 90px;
  white-space: nowrap;
  text-align: center;
}

.rateio-box { text-align: right; }

.rateio-box > p:first-child {
  color: #444;
  font-size: 16px;
  margin: 0;
}

.iptu-resumo {
  font-size: 14px;
  margin: 0 0 10px;
}

.iptu-preview {
  color: #1351B4;
  font-size: 13px;
  margin: 10px 0 0;
}

.camera-link {
  display: inline-block;
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  margin-right: 10px;
  vertical-align: middle;
  cursor: pointer;
}

.camera-link.sem-foto {
  filter: grayscale(100%);
  opacity: 0.45;
  color: #888;
}

.camera-link.tem-foto {
  filter: none;
  opacity: 1;
  color: #27ae60;
}

.camera-link:hover {
  opacity: 1;
  filter: none;
  transform: scale(1.15);
}

/* ----- documentos ----- */
.arquivos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.arquivo-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  color: #333;
  padding: 16px 10px 12px;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  width: 120px;
}

.arquivo-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.arquivo-icone { margin-bottom: 10px; }

.arquivo-titulo {
  font-size: 12px;
  font-weight: bold;
  line-height: 1.3;
  margin-bottom: 6px;
  max-height: 2.6em;
  overflow: hidden;
}

.arquivo-meta { font-size: 11px; }

.ext {
  border-radius: 8px;
  color: #fff;
  display: inline-block;
  font-size: 13px;
  font-weight: bold;
  min-width: 52px;
  padding: 10px 8px;
}

.ext-pdf { background: #e74c3c; }
.ext-doc { background: #2980b9; }
.ext-xls { background: #27ae60; }
.ext-img { background: #8e44ad; }
.ext-zip { background: #f39c12; }
.ext-outros { background: #7f8c8d; }

.form-doc-upload input[type="text"],
.form-doc-upload textarea {
  margin-bottom: 12px;
  width: 100%;
}

.form-doc-upload textarea {
  height: 80px;
  resize: vertical;
}

.form-doc-upload input[type="file"] {
  margin-bottom: 12px;
}

/* ----- financeiro ----- */
.page-header-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.page-header-row-sm { margin-bottom: 8px; }

.tabela-financeiro {
  font-size: 12px;
  min-width: 100%;
  table-layout: auto;
  width: max-content;
}

.tabela-financeiro td,
.tabela-financeiro th {
  border-bottom: 1px solid #eee;
  padding: 8px 6px;
  text-align: center;
  white-space: nowrap;
}

.tabela-financeiro th {
  background: #f5f5f5;
  font-weight: bold;
}

.tabela-financeiro th:first-child,
.tabela-financeiro td.unidade {
  font-weight: bold;
  max-width: 110px;
  padding-right: 10px;
  text-align: left;
  white-space: nowrap;
  width: 1%;
}

.th-sub {
  color: #666;
  display: block;
  font-size: 9px;
  font-weight: normal;
}

th.mes-atual {
  background: #d6ebf8;
  color: #1a5a8a;
}

th.mes-previsao,
td.mes-previsao {
  background: #f2f2f2 !important;
}

th.mes-previsao { color: #555; }

.cel {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 72px;
}

.cel .label {
  font-size: 10px;
  text-transform: uppercase;
}

.cel .label-normal { text-transform: none; }

.cel .valor {
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.cel .venc {
  color: inherit;
  font-size: 10px;
  font-weight: bold;
}

.pago { background: #e8f8ec; color: #1e7e34; }
.aberto { background: #fff8e1; color: #9a7b0a; }
.atrasado { background: #fde8ea; color: #a71d2a; }
.vazio { color: #aaa; }

.valor-atualizado {
  color: #a71d2a;
  font-size: 11px;
  font-weight: bold;
}

.linha-saldo-adm { background: #f0f4f8; }

.unidade-saldo {
  font-size: 11px;
  white-space: normal !important;
}

.acoes-uni {
  min-width: 48px;
  overflow: visible;
  position: relative;
}

.legenda {
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 12px;
  margin-top: 14px;
}

.legenda i {
  border-radius: 3px;
  display: inline-block;
  height: 12px;
  width: 12px;
}

.legenda .l-pago { background: #27ae60; }
.legenda .l-aberto { background: #f1c40f; }
.legenda .l-atrasado { background: #e74c3c; }

.legenda span {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.modal-calc {
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 300;
}

.modal-calc.aberto { display: flex; }

.modal-calc-caixa {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  padding: 24px 28px;
  width: 92%;
}

.modal-calc-caixa h3 {
  color: #333;
  font-size: 17px;
  margin: 0 0 14px;
}

.modal-calc-caixa input {
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  padding: 8px 10px;
  width: 100%;
}

.modal-calc-caixa label {
  color: #555;
  display: block;
  font-size: 13px;
  margin: 10px 0 4px;
}

.modal-calc-result {
  background: #f5f9fc;
  border-radius: 8px;
  display: none;
  font-size: 14px;
  margin-top: 14px;
  padding: 12px;
}

.modal-calc-acoes {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.modal-calc-acoes button {
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  padding: 8px 16px;
}

.btn-calc-m { background: #27ae60; color: #fff; }
.btn-calc-m:hover { background: #1e8449; }
.btn-cancel-m { background: #999; color: #fff; }
.btn-cancel-m:hover { background: #777; }

.modal-detalhe-caixa { max-width: 480px; }

.modal-detalhe-sub {
  color: #888;
  font-size: 12px;
  margin: 0 0 10px;
}

.modal-detalhe-lista {
  font-size: 13px;
  max-height: 280px;
  overflow: auto;
}

.modal-detalhe-total {
  border-top: 1px solid #eee;
  font-size: 15px;
  font-weight: bold;
  margin-top: 12px;
  padding-top: 10px;
}

.detalhe-item {
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 6px 0;
}

/* ----- leituras ----- */
.valores-topo {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.valores-topo label {
  color: #666;
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.valores-topo input {
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  padding: 8px 10px;
  width: 130px;
}

.valores-topo-agua { margin-top: -70px; }

.img-conta-agua {
  border: 1px solid #ddd;
  border-radius: 8px;
  height: 125px;
  object-fit: cover;
  width: 305px;
}

.total-conta-linha {
  align-items: center;
  color: #333;
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 16px;
  margin-bottom: 12px;
}

.tabela-leituras {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
}

.tabela-leituras th,
.tabela-leituras td {
  border-bottom: 1px solid #eee;
  padding: 8px 6px;
  text-align: center;
  white-space: nowrap;
}

.tabela-leituras th {
  background: #f5f5f5;
  font-weight: bold;
}

.tabela-leituras th.mes-atual {
  background: #d6ebf8;
  color: #1a5a8a;
}

.tabela-leituras td.editavel { background: #f0f8ff; }

.tabela-leituras td.unidade {
  font-weight: bold;
  min-width: 50px;
  text-align: left;
}

input.leitura {
  border: 1px solid #5BA3D9;
  border-radius: 4px;
  font-size: 12px;
  padding: 5px;
  text-align: right;
  width: 70px;
}

.col-interm {
  background: #f0f8ff;
  color: #1a5a8a;
  font-size: 11px;
}

.cel-m3 { color: #2d6a2d; font-size: 11px; }
.cel-rs { color: #555; font-size: 11px; }
.cel-rs-hidden { display: none; }

.linha-total-leitura { background: #f9f9f9; }

.acoes-leituras {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.valores-topo input,
.valores-topo-agua input,
input.input-moeda,
input[name="data_vencimento"],
input[name="consumo_total"],
input[name="valor_conta"],
input[name="valor_outros"],
input[name="valor_taxa_coleta"],
.tabela-leituras input.leitura {
  text-align: right;
}

.valores-topo input[name="consumo_total"],
.valores-topo input[name="data_vencimento"],
#energia_consumo,
#agua_consumo_total,
#gas_consumo_total {
  color: #333;
  -moz-appearance: textfield;
}

.valores-topo input[name="consumo_total"]::-webkit-outer-spin-button,
.valores-topo input[name="consumo_total"]::-webkit-inner-spin-button,
#energia_consumo::-webkit-outer-spin-button,
#energia_consumo::-webkit-inner-spin-button,
#agua_consumo_total::-webkit-outer-spin-button,
#agua_consumo_total::-webkit-inner-spin-button,
#gas_consumo_total::-webkit-outer-spin-button,
#gas_consumo_total::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ----- lembretes ----- */
.validade-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.validade-item {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 18px;
  text-align: left;
}

.validade-titulo {
  font-size: 16px;
  margin-bottom: 14px;
  text-align: center;
}

.validade-label {
  color: #666;
  font-size: 13px;
  margin-bottom: 4px;
}

.validade-data {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 12px;
}

.validade-acoes {
  margin-top: 4px;
  text-align: right;
}

.link-editar {
  color: #5BA3D9;
  font-size: 12px;
  text-decoration: none;
}

.link-editar:hover { text-decoration: underline; }

.modal-lembrete {
  max-width: 420px;
  width: 100%;
}

.modal-titulo-lembrete { margin-bottom: 18px; }

.form-item { display: none; }
.form-item.form-item-ativo { display: block; }

.form-item label {
  color: #555;
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

/* ----- prestacao ----- */
.ano-bloco { margin-bottom: 30px; }

.ano-titulo {
  border-bottom: 2px solid #5BA3D9;
  color: #333;
  display: inline-block;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 14px;
  padding-bottom: 6px;
}

.meses-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.mes-icone {
  align-items: center;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: #333;
  display: flex;
  flex-direction: column;
  height: 90px;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  width: 110px;
}

.mes-icone:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  color: #5BA3D9;
  transform: translateY(-3px);
}

.mes-icone-nome {
  color: #5BA3D9;
  font-size: 16px;
  font-weight: bold;
}

.mes-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.mes-header {
  align-items: center;
  background: #f5f5f5;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
}

.mes-header-titulo {
  color: #333;
  font-size: 18px;
  margin: 0 0 4px;
}

.mes-header-periodo {
  color: #666;
  font-size: 13px;
  margin: 0;
}

.mes-body { padding: 18px 20px; }

.consumo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.consumo-chip {
  border-radius: 8px;
  flex: 1;
  min-width: 200px;
  padding: 14px 16px;
}

.consumo-agua { background: #f0f7fc; }
.consumo-gas { background: #f5f0fc; }

.consumo-label {
  color: #555;
  font-size: 12px;
  margin-bottom: 4px;
}

.consumo-valor {
  font-size: 20px;
  font-weight: bold;
}

.consumo-valor-agua { color: #2980b9; }
.consumo-valor-gas { color: #8e44ad; }

.tabela-mov {
  border-collapse: collapse;
  margin-bottom: 12px;
  table-layout: fixed;
  width: 100%;
}

.tabela-mov th,
.tabela-mov td {
  border-bottom: 1px solid #eee;
  font-size: 13px;
  padding: 10px 12px;
  text-align: left;
}

.tabela-mov th {
  background: #fafafa;
  font-weight: bold;
}

.tabela-mov .col-desc { width: 40%; }
.tabela-mov .col-cat { width: 22%; }
.tabela-mov .col-data { width: 18%; }
.tabela-mov .col-val { text-align: right; width: 20%; }
.tabela-mov .valor { text-align: right; }

/* ----- receitas ----- */
.tabela-receitas {
  border-collapse: collapse;
  margin-top: 8px;
  width: 100%;
}

.tabela-receitas th,
.tabela-receitas td {
  border-bottom: 1px solid #eee;
  font-size: 13px;
  padding: 11px 10px;
  text-align: left;
}

.tabela-receitas th { background: #f5f5f5; }
.tabela-receitas .valor { text-align: right; }

.tabela-receitas td.acoes,
.tabela-receitas .col-acoes {
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
}

.tabela-receitas td.acoes .status-confirmado,
.tabela-receitas td.acoes .status-finalizado,
.tabela-receitas td.acoes .ok,
.tabela-receitas td.acoes .del {
  display: inline-block;
  vertical-align: middle;
  margin: 0 4px;
  white-space: nowrap;
}

.card-titulo-com-busca {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-titulo-com-busca .card-titulo,
.card-titulo-com-busca .card-title {
  margin: 0;
  flex: 1 1 auto;
}

.busca-receitas {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin: 0;
  max-width: 280px;
  width: 100%;
}

.busca-receitas-icone {
  flex-shrink: 0;
  font-size: 16px;
  opacity: 0.7;
}

.input-busca-receitas {
  border: 1px solid #ccc;
  border-radius: 6px;
  flex: 1;
  font-size: 14px;
  padding: 8px 12px;
  width: 100%;
}

/* ----- atendimento ----- */
.card-msg { margin-bottom: 16px; }
.card-msg p { margin: 0; }

.card-msg-ok { border-left: 4px solid #27ae60; }
.card-msg-ok p { color: #1e7e34; }

.card-msg-info { border-left: 4px solid #5BA3D9; }
.card-msg-info p { color: #1a5a8a; }

.card-msg-erro { border-left: 4px solid #e74c3c; }
.card-msg-erro p { color: #c0392b; }

.bloco-aviso-rapido { margin-bottom: 14px; }

.textarea-aviso-rapido {
  height: 56px;
  line-height: 1.35;
  margin: 0;
  max-height: 56px;
  min-height: 56px;
  padding: 10px 12px;
  resize: none;
  width: 100%;
}

.status-aviso-rapido {
  color: #888;
  display: block;
  font-size: 11px;
  margin-top: 4px;
  min-height: 14px;
}

.form-comunicado {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  display: none;
  margin-bottom: 20px;
  padding: 16px;
}

.form-comunicado.aberto { display: block; }

.toolbar-format { margin-bottom: 6px; }

.btn-format {
  font-size: 12px;
  font-weight: bold;
  padding: 6px 10px;
}

.btn-format-i { font-style: italic; }
.btn-format-u { text-decoration: underline; }

.editor-assunto {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  min-height: 180px;
  padding: 12px;
}

.hidden-field { display: none; }
.input-max-400 { max-width: 400px; width: 100%; }
.input-max-480 { max-width: 480px; width: 100%; }
.select-mb { margin-bottom: 12px; }
.select-unidade-hidden { display: none; }

.textarea-motivo {
  margin-bottom: 12px;
  min-height: 100px;
  resize: vertical;
  width: 100%;
}

.sep-card {
  border: none;
  border-top: 1px solid #eee;
  margin: 24px 0;
}

.td-nowrap { white-space: nowrap; }

.area-info {
  background: #f8f8f8;
  border-radius: 8px;
  display: none;
  font-size: 13px;
  margin-bottom: 16px;
  padding: 12px;
}

.area-info.aberto { display: block; }
.area-info p { margin: 0 0 6px; }
.area-info p:last-child { margin: 0; }

.form-edit-reserva {
  align-items: center;
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.form-edit-reserva.aberto { display: flex; }

.input-edit-sm {
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  padding: 6px;
}

.tabela-mb { margin-bottom: 20px; }

.link-aprovar {
  color: #27ae60;
  font-weight: bold;
  margin-right: 10px;
  text-decoration: none;
}

.link-recusar {
  color: #e74c3c;
  font-weight: bold;
  text-decoration: none;
}

.servico-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px;
}

.servico-item h3 { font-size: 15px; margin-bottom: 6px; }
.servico-item p { color: #666; font-size: 13px; margin-bottom: 12px; }

tr.aviso-lido { opacity: 0.65; }

.modal-carta-overlay {
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 1000;
}

.modal-carta-overlay.aberto {
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-carta {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  max-width: 560px;
  overflow: auto;
  padding: 24px;
  width: 92%;
}

.modal-carta-sm { max-width: 420px; }

.carta-meta {
  color: #888;
  font-size: 12px;
  margin-bottom: 8px;
}

.carta-titulo {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
}

.carta-assunto {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.carta-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.carta-apagar-link {
  display: none;
  text-decoration: none;
}

.aviso-reserva-cobranca {
  background: #f0f7fc;
  border: 1px solid #c5d9ea;
  border-radius: 6px;
  color: #1a5a8a;
  font-size: 13px;
  margin-top: 12px;
  padding: 10px;
}

.aviso-cancelar-reserva {
  background: #fde8ea;
  border: 1px solid #f5c2c7;
  border-radius: 6px;
  color: #a71d2a;
  font-size: 13px;
  margin-top: 10px;
  padding: 10px;
}

.btn-hamburger {
  align-items: center;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  padding: 8px 10px;
}

.btn-hamburger span {
  background: #333;
  border-radius: 1px;
  display: block;
  height: 2px;
  width: 14px;
}

.badge-resposta {
  border-radius: 12px;
  display: inline-block;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
}

.badge-aguarda-master {
  background: #fde8ea;
  border: 1px solid #f5c2c7;
  color: #a71d2a;
}

.badge-aguarda-meucondo {
  background: #e8f4fc;
  border: 1px solid #b6d4ea;
  color: #1a5a8a;
}

.badge-respondida {
  background: #d4edda;
  border: 1px solid #a3d9b1;
  color: #155724;
}

#modal-responder {
  z-index: 2000;
}

#modal-responder.aberto {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

/* ----- impersonação / logos ----- */
.barra-impersonacao {
  background: #1a252f !important;
  border-bottom: 3px solid #e74c3c;
  color: #fff !important;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 999;
}

.barra-impersonacao-inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: center;
  padding: 12px 20px;
}

.barra-impersonacao-tipo {
  background: #e74c3c;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 8px;
  padding: 3px 10px;
  text-transform: uppercase;
}

.barra-impersonacao-btn {
  background: #e74c3c !important;
  border-radius: 8px;
  color: #fff !important;
  font-weight: 700;
  padding: 8px 16px;
  text-decoration: none !important;
}

.barra-impersonacao-btn:hover {
  background: #c0392b !important;
  color: #fff !important;
}

.logo-condo-header {
  background: #fff;
  border-radius: 8px;
  display: block;
  height: 60px;
  max-width: 150px;
  object-fit: contain;
  width: auto;
}

.user-info {
  align-items: center;
  color: #333;
  display: flex;
  flex-wrap: wrap;
  font-size: 15px;
  gap: 12px;
}

.tabela-admin td.antes {
  background: #1a2738;
  color: #6a7a8a;
}

/* $ pagamento / débito automático */
.money-link {
  display: inline-block;
  font-size: 17px;
  font-weight: bold;
  line-height: 1;
  text-decoration: none;
  margin-right: 8px;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
}
.money-link.sem-pago {
  color: #888;
  opacity: 0.45;
  filter: grayscale(100%);
}
.money-link.pago {
  color: #f1c40f;   /* amarelo = pago */
  opacity: 1;
  filter: none;
}
.money-link.debito-auto {
  color: #27ae60;   /* verde = débito automático */
  opacity: 1;
  filter: none;
}
.money-link:hover {
  opacity: 1;
  filter: none;
  transform: scale(1.15);
}
.servicos-linha1 {
  display: grid;
  grid-template-columns: repeat(3, 1fr) minmax(220px, 1fr);
  gap: 16px;
  margin-bottom: 22px;
  align-items: stretch;
}

.servicos-linha2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}


.servico-emergencial {
  border: 1px solid #f5c2c7;
  background: #fff5f5;
}

.servico-emergencial h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c0392b;
}

.icon-emergencia {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

.btn-emergencia {
  background: #e74c3c !important;
}
.btn-emergencia:hover {
  background: #c0392b !important;
}

.servico-contratavel {
  border: 1px solid #d8e9f6;
  background: #f7fbfe;
}

.mao-obra-opcoes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.btn-mao-obra {
  background: #fff;
  border: 1px solid #5BA3D9;
  color: #286B9E;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
}
.btn-mao-obra:hover {
  background: #e8f4fc;
}

@media (max-width: 1100px) {
  .servicos-linha1,
  .servicos-linha2 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .servicos-linha1,
  .servicos-linha2 {
    grid-template-columns: 1fr;
  }
}

/* ----- documentos.html----- */

.form-doc-upload .campo-doc {
  margin-bottom: 14px;
}
.form-doc-upload input.invalido,
.form-doc-upload textarea.invalido {
  border-color: #D9534F;
  background: #FFF9F9;
  box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.08);
}
.form-doc-upload .mensagem-validacao {
  display: none;
  color: #C0392B;
  font-size: 12px;
  margin-top: 6px;
  padding-left: 2px;
}
.form-doc-upload .mensagem-validacao.visivel {
  display: block;
}

/* =========================================================
   DASHBOARD — mobile só slave
   ========================================================= */
@media (max-width: 900px) {
  body.layout-slave .topo-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 8px;
  }

  body.layout-slave .bemvindo {
    font-size: 18px;
  }

  body.layout-slave .cidade-data {
    font-size: 13px;
    color: #777;
  }

  body.layout-slave .subtitulo {
    font-size: 13px;
    margin-bottom: 14px;
  }

  body.layout-slave .chart-box {
    height: 220px;
  }

  body.layout-slave .chart-tipos {
    flex-wrap: wrap;
  }

  body.layout-slave .chart-tipos button {
    flex: 1;
    min-width: 120px;
  }

  body.layout-slave .resumo-linha {
    font-size: 13px;
    padding: 8px 0;
  }

  body.layout-slave .resumo-linha:last-child {
    font-size: 15px;
  }

  body.layout-slave .leituras-grid {
    flex-direction: column;
  }

  body.layout-slave .leitura-chip {
    min-width: 0;
    width: 100%;
  }

  body.layout-slave .aviso-rapido-texto {
    font-size: 16px;
  }

  body.layout-slave .card-atendimento-alerta {
    margin-bottom: 14px;
  }

  body.layout-slave .lista-atendimento {
    font-size: 13px;
    padding-left: 16px;
  }

  body.layout-slave .aviso-reserva-aprovada {
    flex-direction: column;
    gap: 4px;
  }

  body.layout-slave .reserva-sep {
    display: none;
  }

  /* FAB ajuda um pouco menor */
  body.layout-slave .fab-ajuda {
    bottom: 14px;
    right: 14px;
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  body.layout-slave .fab-modal {
    bottom: 70px;
    right: 14px;
    left: 14px;
    width: auto;
    max-width: none;
  }
}



/* =========================================================
   ATENDIMENTO — mobile só slave
   ========================================================= */
@media (max-width: 900px) {
  body.layout-slave .page-title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  body.layout-slave .card-titulo {
    font-size: 16px;
  }

  body.layout-slave .page-subtitle {
    font-size: 13px;
  }

  /* tabelas: scroll horizontal se precisar */
  body.layout-slave .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
  }

  body.layout-slave table {
    min-width: 0;
    width: 100%;
  }

  /* tabelas longas (Meus atendimentos) ainda podem rolar */
  body.layout-slave .card:last-of-type .table-wrap table {
    min-width: 560px;
  }

  body.layout-slave table th,
  body.layout-slave table td {
    font-size: 12px;
    padding: 8px 6px;
  }

  /* formulários empilhados */
  body.layout-slave .form-inline-gap {
    flex-direction: column;
    align-items: stretch;
  }

  body.layout-slave .form-inline-gap select,
  body.layout-slave .form-inline-gap input,
  body.layout-slave .form-inline-gap button {
    width: 100%;
  }

  body.layout-slave .input-max-480,
  body.layout-slave .input-max-400 {
    max-width: 100%;
    width: 100%;
  }

  body.layout-slave .textarea-motivo {
    min-height: 90px;
  }

  body.layout-slave select.select-mb {
    width: 100%;
  }

  /* serviços em 1 coluna */
  body.layout-slave .servicos-linha1,
  body.layout-slave .servicos-linha2,
  body.layout-slave .servicos-grid {
    grid-template-columns: 1fr !important;
  }

  body.layout-slave .mao-obra-opcoes {
    gap: 8px;
  }

  body.layout-slave .btn-mao-obra {
    flex: 1 1 auto;
    text-align: center;
  }

  /* reserva: campos full width */
  body.layout-slave .area-info {
    font-size: 13px;
  }

  body.layout-slave .form-edit-reserva {
    flex-direction: column;
    align-items: stretch;
  }

  body.layout-slave .form-edit-reserva .input-edit-sm,
  body.layout-slave .form-edit-reserva button {
    width: 100%;
  }

  /* modal full quase tela */
  body.layout-slave .modal-carta {
    width: 94%;
    max-width: none;
    max-height: 88vh;
    padding: 18px 16px;
  }

  body.layout-slave .modal-carta-sm {
    max-width: none;
  }

  body.layout-slave .carta-titulo {
    font-size: 16px;
  }

  body.layout-slave .carta-acoes {
    flex-direction: column;
  }

  body.layout-slave .carta-acoes .btn-sm,
  body.layout-slave .carta-acoes a.btn-sm {
    width: 100%;
    text-align: center;
  }

  /* menu ☰ das ações */
  body.layout-slave .menu-acoes-lista {
    right: 0;
    left: auto;
    min-width: 140px;
  }

  body.layout-slave .bloco-aviso-rapido .btn-sm {
    width: 100%;
    margin-top: 8px;
  }

  body.layout-slave .textarea-aviso-rapido {
    max-height: none;
    min-height: 64px;
  }
  /* ---- Locação: "Data" DENTRO do campo (como Ambiente / Período) ---- */
  body.layout-slave .form-reserva .campo-data-reserva {
    position: relative;
    width: 100%;
  }

  body.layout-slave .form-reserva .campo-data-reserva input[type="date"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    height: 44px;
    font-size: 16px;
    padding: 8px 10px;
    border-radius: 8px;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.2;
    color: transparent; /* esconde texto nativo vazio */
  }

  body.layout-slave .form-reserva .campo-data-reserva input[type="date"].tem-valor {
    color: inherit; /* mostra a data depois de escolher */
  }

  body.layout-slave .form-reserva .placeholder-data {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #000;
    font-size: 16px;
    line-height: 1;
  }

  body.layout-slave .form-reserva .campo-data-reserva.preenchido .placeholder-data {
    display: none;
  }

  body.layout-slave .form-reserva .form-inline-gap select,
  body.layout-slave .form-reserva .form-inline-gap button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    height: 44px;
    font-size: 16px;
    padding: 8px 10px;
    border-radius: 8px;
  }

  /* ---- Minhas solicitações: caber na largura (como Avisos) ---- */
  body.layout-slave .card .table-wrap table {
    min-width: 0; /* sobrescreve o 520px global só onde der */
  }

  /* tabela de minhas reservas (5 colunas) mais compacta */
  body.layout-slave .card h3 + .table-wrap table,
  body.layout-slave .card h3 + .table-wrap {
    /* alvo: bloco "Minhas solicitações" */
  }

  body.layout-slave .card h3 + .table-wrap table {
    min-width: 100%;
    width: 100%;
    table-layout: fixed;
  }

  body.layout-slave .card h3 + .table-wrap table th,
  body.layout-slave .card h3 + .table-wrap table td {
    font-size: 11px;
    padding: 6px 4px;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  body.layout-slave .card h3 + .table-wrap table th:nth-child(1),
  body.layout-slave .card h3 + .table-wrap table td:nth-child(1) {
    width: 28%;
  }
  body.layout-slave .card h3 + .table-wrap table th:nth-child(2),
  body.layout-slave .card h3 + .table-wrap table td:nth-child(2) {
    width: 18%;
  }
  body.layout-slave .card h3 + .table-wrap table th:nth-child(3),
  body.layout-slave .card h3 + .table-wrap table td:nth-child(3) {
    width: 16%;
  }
  body.layout-slave .card h3 + .table-wrap table th:nth-child(4),
  body.layout-slave .card h3 + .table-wrap table td:nth-child(4) {
    width: 18%;
  }
  body.layout-slave .card h3 + .table-wrap table th:nth-child(5),
  body.layout-slave .card h3 + .table-wrap table td:nth-child(5) {
    width: 20%;
  }  
}



/* =========================================================
   LEITURAS — mobile (somente slave)
   ========================================================= */
@media (max-width: 900px) {
  body.layout-slave .card-header-flex {
    flex-direction: column;
    gap: 12px;
  }

  body.layout-slave .img-conta-agua {
    width: 80%;
    max-width: 80%;
    height: auto;
    max-height: 110px;
    object-fit: cover;
    align-self: flex-start;
  }

  body.layout-slave .aviso-compacto,
  body.layout-slave .card > .aviso:not(.aviso-hist):not(.aviso-inline) {
    display: none !important;
  }

  body.layout-slave .valores-topo,
  body.layout-slave .valores-topo-agua {
    display: none !important;
  }

  body.layout-slave .total-conta-linha {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0 12px;
  }

  body.layout-slave .total-conta-linha .btn-modo {
    width: 100%;
  }

  body.layout-slave .table-wrap {
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding-bottom: 6px;
    max-width: 100%;
  }

  /* água / gás: tabela larga (muitos meses + m³/R$) */
  body.layout-slave #form-leituras-agua .tabela-leituras,
  body.layout-slave #form-leituras-gas .tabela-leituras {
    min-width: 720px;
    width: max-content;
    font-size: 12px;
    border-collapse: collapse;
  }

  /* energia: só o necessário (sem faixa vazia à direita) */
  body.layout-slave .card .table-wrap .tabela-leituras {
    font-size: 12px;
    border-collapse: collapse;
    width: max-content;
    max-width: none;
  }

  body.layout-slave .card:has(#energia_total) .tabela-leituras,
body.layout-slave .card:has(#energia_valor) .tabela-leituras {
    min-width: 0 !important;
    width: max-content !important;
    max-width: none !important;
}

  body.layout-slave .tabela-leituras th,
  body.layout-slave .tabela-leituras td {
    padding: 8px 6px;
    white-space: nowrap;
  }

  /* Coluna fixa clonada — leituras mobile */
#coluna-leituras-mobile {
    display: none;
}

@media (max-width: 900px) {
    body.layout-slave #coluna-leituras-mobile {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 2147483647;
        pointer-events: none;
        overflow: visible;
        background: transparent;
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.15);
    }

    body.layout-slave #coluna-leituras-mobile .celula-clonada {
        position: absolute;
        left: 0;
        box-sizing: border-box;
        overflow: hidden;
        white-space: nowrap;
        display: flex;
        align-items: center;
        background: #fff;
        border-right: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        padding: 8px 6px;
        font-size: 12px;
    }

    body.layout-slave #coluna-leituras-mobile .celula-cabecalho {
        background: #f5f5f5 !important;
        font-weight: 600;
    }

    body.layout-slave #coluna-leituras-mobile .celula-total {
        background: #f0f4f8 !important;
        font-weight: 600;
    }
}

  body.layout-slave input.leitura {
    width: 56px;
    font-size: 12px;
    padding: 4px;
  }

  body.layout-slave .acoes-leituras {
    flex-direction: column;
    align-items: stretch;
  }

  body.layout-slave .acoes-leituras .btn-sucesso,
  body.layout-slave .acoes-leituras button {
    width: 100%;
  }

  body.layout-slave .aviso-inline {
    display: block;
    margin-top: 6px;
  }
}
@media (max-width: 900px) {
    body.layout-slave #coluna-leituras-mobile,
    body.layout-slave #coluna-unidade-mobile {
        box-shadow: none !important;
    }

    body.layout-slave #coluna-leituras-mobile .celula-clonada,
    body.layout-slave #coluna-unidade-mobile .celula-clonada {
        border-right: none !important;
    }
}

/* CORREÇÃO — energia: rolagem somente no contêiner externo */
@media (max-width: 900px) {
    body.layout-slave .card:has(#energia_total) .table-wrap,
    body.layout-slave .card:has(#energia_valor) .table-wrap {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
    }

    body.layout-slave .card:has(#energia_total) .tabela-leituras,
    body.layout-slave .card:has(#energia_valor) .tabela-leituras {
        display: table !important;
        width: max-content !important;
        min-width: 0 !important;
        max-width: none !important;
        overflow: visible !important;
    }
}


/* =========================================================
   DOCUMENTOS — mobile (slave)
   ========================================================= */
@media (max-width: 900px) {
  body.layout-slave .arquivos-grid {
    justify-content: flex-start;
    gap: 12px;
  }

  body.layout-slave .arquivo-card {
    width: calc(50% - 8px);
    max-width: 140px;
    min-width: 100px;
  }

  body.layout-slave .arquivo-titulo {
    font-size: 11px;
  }

  body.layout-slave .form-doc-upload input[type="text"],
  body.layout-slave .form-doc-upload select,
  body.layout-slave .form-doc-upload textarea,
  body.layout-slave .form-doc-upload input[type="file"],
  body.layout-slave .form-doc-upload button {
    width: 100%;
    max-width: 100%;
  }

  body.layout-slave .form-doc-upload .campo-doc {
    margin-bottom: 12px;
  }

  body.layout-slave .table-wrap,
  body.layout-slave .card table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.layout-slave .card table {
    min-width: 640px;
  }

  body.layout-slave .btn-download,
  body.layout-slave .btn-toggle {
    margin-bottom: 4px;
  }
}

@media (max-width: 400px) {
  body.layout-slave .arquivo-card {
    width: calc(50% - 6px);
  }
}



/* =========================================================
   FINANCEIRO — mobile (slave)
   Unidade fixa | meses + ações rolam | abre à direita
   ========================================================= */
@media (max-width: 900px) {

  /* CRÍTICO: sem isso a página inteira rola e o sticky “some” */
  body.layout-slave {
    min-width: 0 !important;
    overflow-x: hidden;
  }

  body.layout-slave .page-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  body.layout-slave .page-header-row .btn-calc {
    width: 100%;
  }
  body.layout-slave .page-title-inline,
  body.layout-slave .card-title-inline {
    margin-bottom: 0;
  }

  /* Só este container rola na horizontal */
  body.layout-slave .card .table-wrap {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    margin: 0 -8px;
    padding: 0 8px 8px;
    max-width: 100%;
    width: 100%;
    position: relative;
  }

  body.layout-slave .tabela-financeiro {
    display: table;
    width: max-content;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
  }

  body.layout-slave .tabela-financeiro th,
  body.layout-slave .tabela-financeiro td {
    white-space: nowrap;
    padding: 8px 6px;
    font-size: 12px;
  }
  
}



/* =========================================================
   COLUNA DUPLICADA — MOBILE
   Independente da tabela e da rolagem horizontal
   ========================================================= */

#coluna-unidade-mobile {
    display: none;
}

@media (max-width: 900px) {

    body.layout-slave #coluna-unidade-mobile {
        display: block;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 2147483647;
        pointer-events: none;
        overflow: visible;
        background: transparent;
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.18);
    }

    body.layout-slave #coluna-unidade-mobile .celula-clonada {
        position: absolute;
        left: 0;
        box-sizing: border-box;
        overflow: hidden;
        white-space: nowrap;
        display: flex;
        align-items: center;
        background: #fff;
        border-right: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        padding: 8px 6px;
        font-size: 12px;
    }

    body.layout-slave #coluna-unidade-mobile .celula-cabecalho {
        background: #f0f0f0 !important;
        font-weight: 600;
    }

    body.layout-slave #coluna-unidade-mobile .celula-saldo {
        background: #f0f4f8 !important;
        font-weight: 600;
    }
}
@media (max-width: 900px) {
    body.layout-slave #coluna-unidade-mobile {
        top: 0;
        height: 100vh;
    }
}
/* =========================================================
   AJUSTES — financeiro mobile
   ========================================================= */

@media (max-width: 900px) {
    body.layout-slave #coluna-unidade-mobile {
        z-index: 2147483646 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    body.layout-slave #coluna-unidade-mobile .celula-clonada {
        border-right: none !important;
    }
}

/* Menu de ações sempre sobreposto à tabela */
.menu-acoes-lista.aberto {
    position: fixed !important;
    z-index: 2147483647 !important;
}


/
/* =========================================================
   PRESTAÇÃO DE CONTAS — MOBILE (SLAVE)
   ========================================================= */

@media (max-width: 900px) {

  /* Cabeçalho do mês */
  body.layout-slave .mes-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }

  body.layout-slave .mes-header-titulo {
    font-size: 21px;
    line-height: 1.25;
    margin-bottom: 6px;
  }

  body.layout-slave .mes-header-periodo {
    font-size: 13px;
    line-height: 1.5;
  }

  body.layout-slave .mes-header .btn-baixar {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 12px;
    font-size: 14px;
  }

  body.layout-slave .voltar {
    display: inline-block;
    margin-bottom: 12px;
  }

  /* Consumo de água e gás */
  body.layout-slave .consumo-chips {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  }

  body.layout-slave .consumo-chip {
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    border-radius: 10px;
  }

  body.layout-slave .consumo-label {
    font-size: 13px;
  }

  body.layout-slave .consumo-valor {
    font-size: 23px;
    font-weight: 700;
    margin-top: 5px;
  }

  /* Títulos das seções */
  body.layout-slave .subtitulo {
    font-size: 16px;
    font-weight: 700;
    margin: 22px 0 10px;
  }

  /* Tabelas transformadas em cartões */
  body.layout-slave .tabela-mov {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: visible !important;
    table-layout: auto;
  }

  /* Esconde o cabeçalho tradicional */
  body.layout-slave .tabela-mov thead {
    display: none !important;
  }

  body.layout-slave .tabela-mov tbody {
    display: block !important;
    width: 100%;
  }

  /* Cada lançamento vira um cartão */
  body.layout-slave .tabela-mov tbody tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 10px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e2e5e9;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }

  body.layout-slave .tabela-mov tbody td {
    display: block !important;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal !important;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }

  /* Descrição ocupa a primeira linha inteira */
  body.layout-slave .tabela-mov tbody td:nth-child(1) {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 600;
    color: #252a31;
    padding-bottom: 5px !important;
  }

  body.layout-slave .tabela-mov tbody td:nth-child(1)::before {
    content: "Descrição";
    display: block;
    margin-bottom: 3px;
    color: #7b8490;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .4px;
  }

  /* Categoria */
  body.layout-slave .tabela-mov tbody td:nth-child(2) {
    grid-column: 1;
    color: #626b76;
    font-size: 12px;
  }

  body.layout-slave .tabela-mov tbody td:nth-child(2)::before {
    content: "Categoria: ";
    color: #8a929d;
    font-size: 11px;
  }

  /* Data */
  body.layout-slave .tabela-mov tbody td:nth-child(3) {
    grid-column: 2;
    text-align: right;
    color: #626b76;
    font-size: 12px;
    white-space: nowrap !important;
  }

  body.layout-slave .tabela-mov tbody td:nth-child(3)::before {
    content: "Data: ";
    color: #8a929d;
    font-size: 11px;
  }

  /* Valor */
  body.layout-slave .tabela-mov tbody td:nth-child(4) {
    grid-column: 1 / -1;
    text-align: right;
    padding-top: 8px !important;
    margin-top: 2px;
    border-top: 1px solid #edf0f2 !important;
    font-size: 16px;
    font-weight: 700;
    color: #252a31;
    white-space: nowrap !important;
  }

  body.layout-slave .tabela-mov tbody td:nth-child(4)::before {
    content: "Valor";
    float: left;
    color: #7b8490;
    font-size: 11px;
    font-weight: 500;
    padding-top: 3px;
  }

  /* Linhas sem lançamentos */
  body.layout-slave .tabela-mov tbody td[colspan] {
    grid-column: 1 / -1;
    text-align: center;
    padding: 10px !important;
    color: #777;
    font-size: 13px;
    font-weight: 400;
  }

  /* Totais e saldos */
  body.layout-slave .totais-com-saldo {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    box-sizing: border-box;
  }

  body.layout-slave .totais-esq,
  body.layout-slave .totais-dir {
    width: 100%;
    text-align: left;
    box-sizing: border-box;
  }

  body.layout-slave .totais-esq p,
  body.layout-slave .totais-dir p {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    margin: 7px 0;
  }

  body.layout-slave .totais-esq strong,
  body.layout-slave .totais-dir strong {
    white-space: nowrap;
    text-align: right;
  }

  body.layout-slave .totais-dir {
    border-top: 1px solid #e2e5e9;
    padding-top: 12px;
  }

  body.layout-slave .totais-dir .saldo-bancario-titulo {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
  }

  /* Navegação dos meses */
  body.layout-slave .meses-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  body.layout-slave .mes-icone {
    min-height: 65px;
    box-sizing: border-box;
    border-radius: 10px;
    font-size: 14px;
  }

  /* Área geral */
  body.layout-slave .mes-body {
    padding: 12px;
  }

  body.layout-slave .mes-card {
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 400px) {

  body.layout-slave .meses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.layout-slave .mes-header-titulo {
    font-size: 19px;
  }

  body.layout-slave .mes-body {
    padding: 9px;
  }

  body.layout-slave .tabela-mov tbody tr {
    padding: 10px;
  }
}


/* =========================================================
   BALANÇO MENSAL — mobile (slave)
   ========================================================= */
@media (max-width: 900px) {
  body.layout-slave .page-title {
    font-size: 18px;
  }

  body.layout-slave .page-subtitle {
    font-size: 13px !important;
  }

  body.layout-slave .chart-saldo-box {
    height: 220px;
  }

  body.layout-slave .ordenar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  body.layout-slave .ordenar button {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Scroll horizontal nas tabelas de entradas/saídas */
  body.layout-slave .card .table-wrap {
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding-bottom: 6px;
    max-width: 100%;
  }

  body.layout-slave #tabela-entradas,
  body.layout-slave #tabela-saidas {
    display: table;           /* não use display:block */
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
  }

  body.layout-slave #tabela-entradas {
    min-width: 480px;
  }

  body.layout-slave #tabela-saidas {
    min-width: 560px;         /* tem coluna Código a mais */
  }

  body.layout-slave #tabela-entradas th,
  body.layout-slave #tabela-entradas td,
  body.layout-slave #tabela-saidas th,
  body.layout-slave #tabela-saidas td {
    white-space: nowrap;
    padding: 8px 6px;
    font-size: 13px;
  }

  body.layout-slave .totais p {
    font-size: 14px;
  }
}