/* ===== Variaveis globais e reset basico ===== */
:root {
  --bg: #f6f7fb;
  --primary: #0047ab;
  --accent: #e53935;
  --text: #263238;
  --muted: #607d8b;
  --card-bg: #ffffff;
  --border: #e0e6ef;
  --radius: 12px;
  --shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  --sidebar-width: 240px;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

/* Reset padrao e base tipografica */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body.sidebar-open {
  overflow: hidden;
}

/* ===== Estrutura principal da aplicacao ===== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar com menu principal */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #070403, #070403);
  color: #fff;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  flex-shrink: 0;
  margin: 0 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.sidebar-logo img {
  max-width: 140px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.sidebar nav a,
.sidebar nav button.nav-link {
  display: block;
  padding: 10px 16px;
  margin-bottom: 8px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition: background 0.2s;
  background: rgba(229, 57, 53, 0.18);
}

.sidebar nav button.nav-link {
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  font: inherit;
}

.sidebar nav a:hover,
.sidebar nav a.active,
.sidebar nav button.nav-link:hover {
  background: #de4309;
}

/* Submenu styles */
.nav-submenu {
  margin-bottom: 8px;
}

.nav-link-parent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.nav-arrow {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.nav-submenu.open .nav-arrow {
  transform: rotate(-180deg);
}

.nav-submenu-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.nav-submenu.open .nav-submenu-content {
  max-height: 200px;
}

.nav-submenu.nav-submenu--config.open .nav-submenu-content {
  max-height: 320px;
}

.nav-submenu.nav-submenu--financeiro.open .nav-submenu-content {
  max-height: 280px;
}

.nav-submenu-btn--backup.nav-link-child {
  background: rgba(21, 101, 192, 0.35) !important;
}

.nav-submenu-btn--backup.nav-link-child:hover {
  background: rgba(21, 101, 192, 0.65) !important;
}

.nav-submenu-btn--danger.nav-link-child {
  background: rgba(183, 28, 28, 0.45) !important;
}

.nav-submenu-btn--danger.nav-link-child:hover {
  background: rgba(183, 28, 28, 0.75) !important;
}

.nav-link-child {
  padding-left: 32px !important;
  font-size: 0.9rem;
  background: rgba(229, 57, 53, 0.1) !important;
}

.nav-link-child:hover {
  background: rgba(222, 67, 9, 0.7) !important;
}

.sidebar.is-open {
  transform: translateX(0);
}

/* Botao recolher/expandir sidebar - apenas em desktop */
.sidebar-collapse-btn {
  display: none;
  position: absolute;
  top: 50%;
  right: -14px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: #070403;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.sidebar-collapse-btn:hover {
  background: #de4309;
  border-color: #fff;
  transform: translateY(-50%) scale(1.08);
}

.sidebar-collapse-btn:focus-visible {
  outline: 2px solid #de4309;
  outline-offset: 2px;
}

.sidebar-collapse-icon {
  display: block;
  font-weight: 700;
  user-select: none;
}

.sidebar-collapse-icon::before {
  content: "‹";
}

/* Desktop: botao visivel e sidebar recolhivel */
@media (min-width: 1025px) {
  .sidebar {
    position: relative;
    flex-shrink: 0;
    transition: width 0.25s ease, padding 0.25s ease;
  }

  .sidebar-collapse-btn {
    display: flex;
  }

  .sidebar.is-collapsed {
    width: 56px;
    min-width: 56px;
    padding: 16px 10px;
  }

  .sidebar.is-collapsed .sidebar-logo {
    margin-bottom: 20px;
  }

  .sidebar.is-collapsed .sidebar-logo img {
    max-width: 36px;
  }

  .sidebar.is-collapsed .sidebar-nav-scroll {
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    min-height: 0;
  }

  .sidebar.is-collapsed .sidebar-collapse-icon::before {
    content: "›";
  }

  .sidebar:not(.is-collapsed) .sidebar-collapse-icon::before {
    content: "‹";
  }
}

/* Mobile/tablet: esconder botao de recolher */
@media (max-width: 1024px) {
  .sidebar-collapse-btn {
    display: none !important;
  }

  .sidebar.is-collapsed {
    width: min(320px, 82vw) !important;
    min-width: 0 !important;
    padding: 28px 22px !important;
  }

  .sidebar.is-collapsed .sidebar-nav-scroll {
    overflow-y: auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    max-height: none !important;
    min-height: 0 !important;
  }
}

/* Backdrop exibido ao abrir sidebar em telas pequenas */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: none;
  z-index: 2000;
}

.sidebar-backdrop.is-active {
  display: block;
}

/* Area central que abriga topbar e conteudos */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* permite encolher em flex; evita overflow em mobile */
}

.content {
  /* Area que alterna cada secao do painel */
  flex: 1;
  padding: 28px;
  overflow-y: auto;
  min-height: 0; /* permite scroll em flex; fix para mobile */
}

/* Barra superior com usuario e botoes rapidos - fixa ao rolar a pagina */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.topbar .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.topbar .user-info > div {
  min-width: 0;
}

.user-info__meta {
  font-size: 0.85rem;
  color: #607d8b;
  line-height: 1.25;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.topbar button {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__menu-btn {
  display: none;
  border: none;
  background: rgba(0, 71, 171, 0.08);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}

.topbar__menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 99px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.topbar__menu-btn:hover {
  background: rgba(0, 71, 171, 0.16);
}

.topbar__menu-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Botoes principais visiveis em cada secao */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* Estilos genericos de botoes */
.btn {
  padding: 10px 18px;
  border-radius: 24px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.08);
}

.btn.primary {
  background: var(--primary);
}

.login-panel .login-submit {
  background: #000000;
  border-color: #000000;
}

.login-panel .login-submit:hover {
  background: #111111;
}

.btn.danger {
  background: var(--accent);
}

.btn.secondary {
  background: var(--accent);
  border-color: var(--accent);
}

.btn.secondary.is-active {
  background: #de4309;
  border-color: #de4309;
  color: #ffffff;
  box-shadow: none;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn.secondary:disabled {
  background: rgba(229, 57, 53, 0.6);
  border-color: rgba(229, 57, 53, 0.6);
  color: rgba(255, 255, 255, 0.85);
}

/* Botoes neutros (cinza) */
.btn.neutral {
  background: #374151;
  border-color: #374151;
  color: #ffffff;
}

.btn.neutral:disabled {
  background: rgba(55, 65, 81, 0.6);
  border-color: rgba(55, 65, 81, 0.6);
  color: rgba(255, 255, 255, 0.75);
}

/* Grade de cartoes da dashboard */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

/* Aparencia base dos cartoes de KPI */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card--clickable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card--clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

/* Pagina de boas-vindas */
.boas-vindas-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.boas-vindas-titulo {
  font-size: 1.75rem;
  margin: 0 0 8px;
  color: var(--primary);
  font-weight: 600;
}
.boas-vindas-subtitulo {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 32px;
}
.boas-vindas-versiculo {
  margin: 24px 0 0;
  padding: 24px;
  background: rgba(0, 71, 171, 0.06);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  text-align: left;
}
.boas-vindas-versiculo p {
  margin: 0 0 12px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text);
  font-style: italic;
}
.boas-vindas-versiculo cite {
  font-size: 0.95rem;
  color: var(--muted);
  font-style: normal;
}

.form-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.form-card h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  color: var(--text);
}

.form-card__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-card__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  grid-column: 1 / -1;
}

.form-card__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--muted);
}

.form-card__field input,
.form-card__field select,
.form-card__field textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f9fbff;
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-card__field input:focus,
.form-card__field select:focus,
.form-card__field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.18);
}

.form-card__field select:disabled {
  background: #eceff4;
  color: #90a4ae;
}

.form-card__field textarea {
  resize: vertical;
  min-height: 96px;
}

.form-card__field.full-width {
  grid-column: 1 / -1;
}

.form-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}







.unidades-container {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.unidades-container .actions {
  margin-bottom: 0;
  justify-content: flex-start;
}

.card h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card .value {
  font-size: 2rem;
  font-weight: 700;
}

.tables {
  display: grid;
  gap: 24px;
}

/* Contenedores de tabelas responsivas */
.table-wrapper {
  overflow-x: auto;
}

/* Dashboard: Movimentações recentes - mostra 5 linhas, demais com scroll */
#dashboardSection .table-wrapper.dashboard-mov-recentes {
  max-height: 260px;
  overflow-y: auto;
}

.table-wrapper /* Tabelas padrao */
table {
  min-width: 640px;
}

#produtosSection .table-wrapper td {
  vertical-align: middle;
}

#produtosSection .table-wrapper td.table-actions {
  justify-content: flex-start;
}

#produtosSection .table-wrapper td.table-actions /* Botoes utilizados nas acoes das tabelas */
.table-action {
  min-width: 96px;
  text-align: center;
}

#unidadesSection .table-wrapper td {
  vertical-align: middle;
}

#unidadesSection .table-wrapper table {
  width: 100%;
  min-width: 0;
}

#unidadesSection .table-wrapper th,
#unidadesSection .table-wrapper td {
  white-space: normal;
  word-break: break-word;
}

#unidadesSection .table-wrapper td[data-label="Observacoes"] {
  max-width: 320px;
}

#unidadesSection .table-wrapper td.table-actions {
  justify-content: flex-start;
  gap: 8px;
}

#unidadesSection .table-wrapper td.table-actions .table-action {
  min-width: 96px;
  text-align: center;
}

#unidadesSection .table-wrapper td /* Indicadores de status em formato pill */
.status-pill {
  min-width: 88px;
}

#usuariosSection .table-wrapper td {
  vertical-align: middle;
}

#usuariosSection .table-wrapper td[data-label="Foto"] {
  width: 72px;
}

#usuariosSection .table-wrapper td .usuarios-foto,
#usuariosSection .table-wrapper td .usuarios-foto--placeholder {
  margin: 0 auto;
}

#usuariosSection .table-wrapper td.table-actions {
  justify-content: flex-start;
  gap: 8px;
}

#usuariosSection .table-wrapper td.table-actions .table-action {
  min-width: 96px;
  text-align: center;
}

#usuariosSection .table-wrapper td .status-pill {
  min-width: 88px;
}

#lotesSection .table-wrapper td {
  vertical-align: middle;
}

#lotesSection .table-wrapper td[data-label="Valor total"] {
  white-space: nowrap;
}

#unidadesSection .table-wrapper td {
  vertical-align: middle;
}

#unidadesSection .table-wrapper td[data-label="Observacoes"] {
  max-width: 320px;
}

#unidadesSection .table-wrapper td.table-actions .table-action {
  min-width: 96px;
  text-align: center;
}

#unidadesSection .table-wrapper td .status-pill {
  min-width: 88px;
}

#movimentacoesSection .table-wrapper td {
  vertical-align: middle;
}

#movimentacoesSection .table-wrapper td[data-label="Motivo"] {
  max-width: 320px;
}

#movimentacoesSection .table-wrapper td .status-pill {
  min-width: 96px;
}

#comprasSection .compras-listas-card table th:nth-of-type(n + 4),
#comprasSection .compras-listas-card table td:nth-of-type(n + 4) {
  display: none;
}

#comprasSection .actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

#comprasSection .lista-compras__filtro {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  min-width: 180px;
  font-size: 0.95rem;
}

#comprasSection .compras-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#comprasSection .compras-detalhes-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

#comprasSection .compras-detalhes-card header h2 {
  margin: 0;
}

.compras-status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.compras-detalhes-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Estilos especificos da area de listas de compras */
.compras-detalhes-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.compras-detalhes-resumo div {
  background: rgba(0, 71, 171, 0.08);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compras-observacoes textarea {
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid rgba(0, 71, 171, 0.2);
  padding: 10px 12px;
}

.compras-detalhes-acoes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.subtle-text {
  color: #607d8b;
  font-size: 0.9rem;
  margin: 0;
}

.anexos-lista {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.anexos-lista li {
  background: rgba(0, 71, 171, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.anexos-lista li a {
  color: #0047ab;
  font-weight: 600;
}

.anexos-lista li span {
  font-size: 0.85rem;
  color: #4b5563;
}

.lista-compras-item-input,
.lista-compras-item-select,
.lista-compras-item-textarea {
  width: 100%;
  border: 1px solid rgba(0, 71, 171, 0.18);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.9rem;
  background: #fff;
}

.lista-compras-item-textarea {
  min-height: 56px;
  resize: vertical;
}

.compras-listas-card table tbody tr.selected {
  background: rgba(0, 71, 171, 0.12);
}

.compras-listas-card table tbody tr.selected td {
  font-weight: 600;
}

.compras-listas-card table td button {
  margin: 0;
}

.compras-estabelecimento-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(0, 71, 171, 0.18);
  padding: 6px 8px;
}

.compras-estabelecimentos-select {
  border-radius: 8px;
  border: 1px solid rgba(0, 71, 171, 0.18);
  padding: 6px 8px;
}

.compras-table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.compras-table-actions button {
  font-size: 0.8rem;
  padding: 6px 10px;
}

/* Botão Adicionar à Lista na tabela de sugestões */
#sugestoesComprasModal .sugestoes-compras-table td.sugestoes-acoes .btn {
  width: auto;
  max-width: 140px;
  white-space: nowrap;
  margin: 0 auto;
}

#sugestoesComprasModal .sugestoes-compras-table td.sugestoes-acoes {
  align-items: center;
}

/* Estilos para vínculos de estabelecimentos */
.vinculo-cell {
  max-width: 200px;
}

.vinculo-badge {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: help;
  border: 1px solid #90caf9;
}

.sem-vinculo {
  color: var(--muted);
  font-style: italic;
  font-size: 0.875rem;
}

tr.tem-vinculo {
  background-color: #f3f9ff;
}

tr.tem-vinculo:hover {
  background-color: #e3f2fd;
}

.status-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 600;
}

.status-label.rascunho {
  background: rgba(20, 33, 61, 0.12);
  color: #14213d;
}

.status-label.em-compras {
  background: rgba(11, 75, 234, 0.12);
  color: #0b4bea;
}

.status-label.pausada {
  background: rgba(240, 140, 0, 0.13);
  color: #f08c00;
}

.status-label.finalizada {
  background: rgba(46, 204, 113, 0.14);
  color: #27ae60;
}

.badge-small {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(11, 75, 234, 0.12);
  color: #0b4bea;
}

.compras-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #0047ab;
}

.compras-upload-label input {
  display: none;
}

.compras-upload-label span {
  text-decoration: underline;
}

.compras-estoque-info {
  font-size: 0.85rem;
  color: #607d8b;
}

.compras-estoque-info strong {
  color: #0047ab;
}

.compras-empty-state {
  text-align: center;
  color: #607d8b;
  padding: 18px;
}

.compras-alert {
  background: rgba(215, 38, 56, 0.12);
  border-radius: 10px;
  padding: 12px;
  color: #b71c1c;
}

.compras-alert.success {
  background: rgba(46, 204, 113, 0.12);
  color: #1b5e20;
}

.lista-de-compras-loader {
  text-align: center;
  padding: 18px;
  color: #0047ab;
}

.lista-compras-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.lista-compras-controls .filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lista-compras-controls .filters select {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 71, 171, 0.18);
}

.lista-compras-controls .filters button {
  padding: 8px 12px;
}

.lista-compras-empty {
  padding: 20px;
  text-align: center;
  color: #607d8b;
}
/* Cartoes que encapsulam tabelas */
.table-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-card header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 71, 171, 0.06);
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table thead {
  background: rgba(248, 249, 252, 0.9);
}

table th,
table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.95rem;
}

table tbody tr:hover {
  background: rgba(4, 80, 170, 0.08);
}

.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.status-pill.expired {
  background: rgba(229, 57, 53, 0.1);
  color: var(--accent);
}

.status-pill.soon {
  background: rgba(255, 193, 7, 0.15);
  color: #c17900;
}

.status-pill.ok {
  background: rgba(76, 175, 80, 0.15);
  color: #2e7d32;
}

.status-pill.muted {
  background: rgba(144, 164, 174, 0.18);
  color: #455a64;
}

.status-pill.blocked {
  background: rgba(92, 107, 192, 0.18);
  color: #3949ab;
}

/* Aparencia padrao dos modais */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(33, 33, 33, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  width: min(520px, 90vw);
  padding: 26px;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-sugestoes {
  width: min(1100px, 96vw);
  max-width: calc(100vw - 24px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-x: hidden;
}

.modal-sugestoes .modal-sugestoes-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

#sugestoesComprasModal .sugestoes-compras-table,
#sugestoesComprasModal .table-wrapper {
  overflow-x: hidden !important;
}

#sugestoesComprasModal .sugestoes-compras-table table,
#sugestoesComprasModal .table-wrapper table {
  min-width: 0 !important;
  width: 100%;
}

.modal-sugestoes header {
  flex-shrink: 0;
}

.modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.modal form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
select,
textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

.modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--accent);
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

/* Alvarás: mantém "Unidade" e "Tipo" lado a lado e evita sobreposição */
#alvaraModal #alvaraForm .grid-two {
  align-items: end;
}
#alvaraModal #alvaraForm .grid-two label {
  min-width: 0; /* permite encolher dentro do grid */
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#alvaraModal #alvaraForm .grid-two label select,
#alvaraModal #alvaraForm .grid-two label input {
  width: 100%;
  min-width: 0;
}

/* Detalhes do Alvará: layout robusto (campo em cima, valor embaixo no mobile) */
#alvaraDetalhesContent {
  overflow-x: hidden;
}

.alvara-kv {
  display: grid;
  gap: 10px;
}

.alvara-kv__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  align-items: start;
}

.alvara-kv__label {
  font-weight: 700;
  color: var(--text);
}

.alvara-kv__value {
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

@media (max-width: 1024px) {
  .alvara-kv__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .alvara-kv__label {
    display: block;
  }
}

/* Visualizador PDF (PDF.js): rolagem vertical, toque no mobile */
.alvara-anexo-pdf-host,
.recibo-ajuda-pdf-host {
  width: 100%;
  max-height: min(70vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #525659;
  box-sizing: border-box;
  padding: 8px 6px 12px;
}
.alvara-anexo-pdf-host canvas,
.recibo-ajuda-pdf-host canvas {
  display: block;
  margin: 0 auto 12px;
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Modal do anexo: ocupa melhor a tela no celular e não cria scroll lateral */
@media (max-width: 1024px) {
  #alvaraAnexoModal .modal {
    width: min(720px, 96vw) !important;
  }
  #reciboAjudaPdfModal .modal {
    width: min(720px, 96vw) !important;
  }
  #alvaraAnexoFrame {
    height: 70vh !important;
  }
  .alvara-anexo-pdf-host,
  .recibo-ajuda-pdf-host {
    max-height: 70vh;
  }
  #alvaraAnexoImg {
    height: 70vh !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* Recibo ajuda: pergunta em cima, resposta embaixo (tablet) */
  #reciboAjudaSection .table-wrapper thead {
    display: none;
  }
  #reciboAjudaSection .table-wrapper tbody {
    display: grid;
    gap: 16px;
  }
  #reciboAjudaSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
  }
  #reciboAjudaSection .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    padding: 8px 0;
    border-bottom: none;
  }
  #reciboAjudaSection .table-wrapper td::before {
    content: attr(data-label);
    color: #000;
    font-weight: 700;
  }
}

/* Ficha técnica — card largo para lista, formulário e tabela de ações */
.ficha-tecnica-card {
  width: 100%;
  max-width: min(1180px, 100%);
  margin: 0 auto 2rem;
  box-sizing: border-box;
}
.ficha-tecnica-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.25rem 1.5rem 1.5rem;
  box-sizing: border-box;
}
.ficha-tecnica-form__section-title {
  margin: 1.25rem 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  border-bottom: 1px solid var(--border, #e0e0e0);
  padding-bottom: 0.35rem;
}
.ficha-tecnica-form__section-title:first-of-type {
  margin-top: 0;
}
.ficha-tecnica-form__section-title--top {
  margin-top: 0;
}
.ficha-tecnica-ingredientes-dentro-ficha {
  margin-top: 0.25rem;
}
.ficha-tecnica-ingredientes-dentro-ficha .ficha-tecnica-ingredientes-toolbar {
  padding: 0 0 0.75rem;
}
.ficha-tecnica-ingredientes-dentro-ficha .ficha-tecnica-ingredientes-lista {
  padding: 0 0 0.25rem;
}
.ficha-tecnica-form__section-desc {
  margin: -0.35rem 0 0.5rem;
  font-size: 0.85rem;
  color: #607d8b;
  line-height: 1.4;
}
.ficha-tecnica-form__field textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 180px;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border, #ddd);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
}
.ficha-tecnica-visao {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ficha-tecnica-visao__painel {
  background: linear-gradient(135deg, #f5f9ff 0%, #e8f4fc 100%);
  border: 1px solid #c5e1f5;
  border-radius: 10px;
  padding: 1rem 1.15rem;
}
.ficha-tecnica-visao__linha {
  margin-bottom: 0.85rem;
}
.ficha-tecnica-visao__rotulo {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #000;
  margin-bottom: 0.2rem;
}
.ficha-tecnica-visao__destaque {
  font-size: 1.15rem;
  color: #0d47a1;
  word-break: break-word;
}
.ficha-tecnica-visao__grid-precos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 1024px) {
  .ficha-tecnica-visao__grid-precos {
    grid-template-columns: 1fr;
  }
}
.ficha-tecnica-visao__preco-item strong {
  display: block;
  font-size: 1.1rem;
  color: #1565c0;
  margin-top: 0.15rem;
}
.ficha-tecnica-visao__inputs {
  margin-top: 0.25rem;
}
.ficha-tecnica-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
}
.ficha-tecnica-form__field > span {
  font-size: 0.92rem;
  font-weight: 700;
  color: #000;
}
.ficha-tecnica-form__field input[type="text"],
.ficha-tecnica-form__field input[type="file"] {
  font-weight: 500;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border, #ddd);
  font-size: 0.95rem;
}
.ficha-tecnica-form__hint {
  font-weight: 500;
  color: #607d8b;
  font-size: 0.82rem;
}
.ficha-tecnica-form__hint-inline {
  font-weight: 500;
  color: #78909c;
  font-size: 0.82em;
}
.ficha-tecnica-form__preview-wrap {
  margin-top: 0.75rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border, #ddd);
  background: #f5f5f5;
  max-width: 100%;
}
.ficha-tecnica-form__preview-wrap img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: cover;
}
.ficha-tecnica-form__footer {
  margin-top: 0.5rem;
  padding-top: 0.25rem;
}
.ficha-tecnica-form__footer--row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  align-items: center;
}
.ficha-tecnica-ingredientes-toolbar {
  padding: 0 1.5rem 0.75rem;
}
.ficha-tecnica-ingrediente-form-wrap {
  border-top: 1px solid var(--border, #e8e8e8);
  background: #fafafa;
}
.ficha-tecnica-form--compact {
  padding-top: 1rem;
}
.ficha-tecnica-ingredientes-lista {
  padding: 0 1.5rem 1.25rem;
}
.ficha-tecnica-ingredientes-empty {
  margin: 0;
  padding: 0.75rem 0;
  font-size: 0.9rem;
  color: #78909c;
  text-align: center;
}
.ficha-tecnica-ingredientes-table-wrap {
  margin-top: 0.25rem;
  max-height: 280px;
  overflow-y: auto;
}
.ficha-tecnica-ingredientes-table {
  width: 100%;
  font-size: 0.88rem;
}
.ficha-tecnica-ingredientes-table thead th {
  font-weight: 700;
  color: #000;
}
.ficha-tecnica-lista-table thead th {
  font-weight: 700;
  color: #000;
}
.ficha-tecnica-ingredientes-table th,
.ficha-tecnica-ingredientes-table td {
  padding: 0.45rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border, #eee);
}
.ficha-tecnica-ingredientes-table th.ficha-tecnica-ingredientes-th-acoes,
.ficha-tecnica-ingredientes-table td.ficha-tecnica-ingredientes-td-acoes {
  width: auto;
  min-width: 5.5rem;
  text-align: center;
  padding-inline: 0.35rem;
  vertical-align: middle;
}
.ficha-tecnica-ingredientes-table .ficha-tecnica-ingredientes-acoes-btns {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.ficha-tecnica-ingredientes-table .btn-icon {
  padding: 0.25rem 0.4rem;
  font-size: 0.85rem;
  line-height: 1;
}
.ficha-tecnica-ingredientes-table .btn-icon.danger {
  color: #c62828;
  opacity: 1;
}
.ficha-tecnica-ingredientes-table .btn-icon.danger:hover {
  color: #b71c1c;
}
.ficha-tecnica-ingredientes-table .btn-icon.ficha-tecnica-ingrediente-editar {
  color: var(--primary, #1565c0);
  opacity: 1;
}
.ficha-tecnica-ingredientes-table .btn-icon.ficha-tecnica-ingrediente-editar:hover {
  opacity: 0.85;
}
.ficha-tecnica-form__field select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border, #ddd);
  font-size: 0.95rem;
  font-weight: 500;
  background: #fff;
}
.ficha-tecnica-form__field input[readonly] {
  background: #f0f4f8;
  color: var(--text);
  cursor: default;
}

/* Ficha técnica — ingrediente: select de unidade + criar nova ao lado */
.ficha-tecnica-unidade-medida-linha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.ficha-tecnica-unidade-medida-linha .ficha-tecnica-unidade-medida-select {
  flex: 1 1 140px;
  min-width: 0;
  width: auto;
  max-width: 100%;
}
.ficha-tecnica-nova-unidade-input {
  flex: 0 1 160px;
  min-width: 100px;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border, #ddd);
  font-size: 0.95rem;
  box-sizing: border-box;
}
.ficha-tecnica-unidade-add-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ficha-tecnica-form__grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: end;
}
@media (max-width: 600px) {
  .ficha-tecnica-form__grid-two {
    grid-template-columns: 1fr;
  }
}

.ficha-tecnica-tempo-field .ficha-tecnica-tempo-inputs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 0.35rem;
}
.ficha-tecnica-tempo-part {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 6.5rem;
}
.ficha-tecnica-tempo-part__lbl {
  font-size: 0.82rem;
  font-weight: 700;
  color: #000;
}
.ficha-tecnica-tempo-part input[type="number"] {
  width: 100%;
  max-width: 8rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border, #ddd);
  font-size: 1rem;
  font-weight: 600;
  box-sizing: border-box;
}

/* Modo de preparo — mini editor rico */
.ficha-tecnica-rich-field {
  margin-top: 0.25rem;
}
.ficha-tecnica-rich-toolbar-wrap {
  display: flex;
  flex-direction: column;
}
.ficha-tecnica-rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  padding: 0.5rem 0.65rem;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid var(--border, #cfd8dc);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}
.ficha-tecnica-rich-btn {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  color: #37474f;
  line-height: 1;
}
.ficha-tecnica-rich-btn:hover {
  background: #e3f2fd;
  border-color: #90caf9;
}
.ficha-tecnica-rich-btn--emoji {
  font-size: 1.1rem;
}
.ficha-tecnica-rich-sep {
  width: 1px;
  height: 1.35rem;
  background: #cfd8dc;
  margin: 0 0.15rem;
}
.ficha-tecnica-rich-label,
.ficha-tecnica-rich-color {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #546e7a;
}
.ficha-tecnica-rich-label-txt,
.ficha-tecnica-rich-color-lbl {
  white-space: nowrap;
}
.ficha-tecnica-rich-select {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #cfd8dc;
  font-size: 0.82rem;
  background: #fff;
  max-width: 8.5rem;
}
.ficha-tecnica-rich-color input[type="color"] {
  width: 2rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
}
.ficha-tecnica-rich-editor {
  min-height: 220px;
  max-height: min(50vh, 520px);
  overflow-y: auto;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border, #cfd8dc);
  border-radius: 0 0 10px 10px;
  background: #fff;
  font-size: 0.95rem;
  line-height: 1.55;
  outline: none;
  color: #263238;
}
.ficha-tecnica-rich-editor:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.18);
}
.ficha-tecnica-rich-editor.ficha-tecnica-rich-editor--empty:before {
  content: attr(data-placeholder);
  color: #90a4ae;
  pointer-events: none;
}
/* Painel no fluxo (entre toolbar e editor). :not([hidden]) evita display:grid sobrescrever o atributo hidden. */
.ficha-tecnica-emoji-panel:not([hidden]) {
  box-sizing: border-box;
  margin: 0;
  padding: 0.5rem;
  background: #fafbfc;
  border: 1px solid var(--border, #cfd8dc);
  border-top: none;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.25rem;
  width: 100%;
}
.ficha-tecnica-emoji-item {
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.35rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.ficha-tecnica-emoji-item:hover {
  background: #e3f2fd;
}
.ficha-tecnica-ver-modo--html {
  font-size: 0.92rem;
  line-height: 1.55;
}
.ficha-tecnica-ver-modo--html ul,
.ficha-tecnica-ver-modo--html ol {
  margin: 0.5rem 0 0.5rem 1.25rem;
  padding: 0;
}

.ficha-tecnica-barra-titulo {
  margin-bottom: 0.5rem;
}
.ficha-tecnica-lista-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.ficha-tecnica-lista-header span {
  font-weight: 700;
  color: #000;
}
.ficha-tecnica-lista-empty {
  padding: 1rem 1.25rem;
  color: #607d8b;
  font-size: 0.95rem;
  margin: 0;
  border-top: 1px solid #eceff1;
}
.ficha-tecnica-form-toolbar {
  margin-bottom: 0.75rem;
}
.ficha-tecnica-col-acoes {
  min-width: 12rem;
}
.ficha-tecnica-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.ficha-tecnica-acao-btn {
  padding: 0.28rem 0.55rem;
  font-size: 0.78rem;
}
#fechaTecnicaSection .table-card header {
  font-weight: 700;
  color: #000;
}

.ficha-tecnica-ver-modal header h3 {
  font-weight: 700;
  color: #000;
}

.ficha-tecnica-ver-modal {
  width: min(900px, 96vw);
}
.ficha-tecnica-ver-modal__body {
  margin: 0.5rem 0 1rem;
  max-height: min(60vh, 480px);
  overflow-y: auto;
}
.ficha-tecnica-ver-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}
.ficha-tecnica-ver-foto {
  margin-bottom: 1rem;
  text-align: center;
}
.ficha-tecnica-ver-foto img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #eceff1;
}
.ficha-tecnica-ver-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}
.ficha-tecnica-ver-dl dt {
  margin: 0;
  color: #000;
  font-weight: 700;
}
.ficha-tecnica-ver-dl dd {
  margin: 0;
}
.ficha-tecnica-ver-subtitulo {
  font-size: 0.95rem;
  margin: 0.75rem 0 0.35rem;
  font-weight: 700;
  color: #000;
}
.ficha-tecnica-ver-ing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}
.ficha-tecnica-ver-ing-table th,
.ficha-tecnica-ver-ing-table td {
  border: 1px solid #cfd8dc;
  padding: 6px 8px;
  text-align: left;
}
.ficha-tecnica-ver-ing-table th {
  background: #eceff1;
  font-weight: 700;
  color: #000;
}
.ficha-tecnica-ver-vazio {
  color: #78909c;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}
.ficha-tecnica-ver-modo {
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

/* Ficha técnica — celular e tablet: rótulo acima, valor abaixo; sem scroll horizontal */
@media (max-width: 1024px) {
  #fechaTecnicaSection {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
  }

  #fechaTecnicaSection .ficha-tecnica-card {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

  #fechaTecnicaSection .ficha-tecnica-form {
    padding: 1rem 1rem 1.25rem;
  }

  #fechaTecnicaSection .ficha-tecnica-form-toolbar {
    padding: 0 0.25rem;
  }

  #fechaTecnicaSection .ficha-tecnica-form-toolbar .btn {
    width: 100%;
    justify-content: center;
  }

  #fechaTecnicaSection .ficha-tecnica-lista-header {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem 0.75rem;
    gap: 0.85rem;
  }

  #fechaTecnicaSection .ficha-tecnica-lista-header .btn {
    width: 100%;
    justify-content: center;
  }

  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper {
    overflow-x: visible;
    -webkit-overflow-scrolling: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 0.75rem 0.75rem;
  }

  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
  }

  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper thead {
    display: none;
  }

  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper tbody {
    display: grid;
    gap: 12px;
  }

  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper tr {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: var(--shadow, 0 1px 3px rgba(0, 0, 0, 0.06));
  }

  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper td {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: none;
    padding: 0.5rem 0;
    text-align: left;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #000;
    margin-bottom: 0.3rem;
  }

  /* Célula "Ações": display:flex obrigatório — senão td{display:block} quebra o gap entre botões */
  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper td.ficha-tecnica-acoes {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }

  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper td.ficha-tecnica-acoes::before {
    margin-bottom: 0;
  }

  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper .ficha-tecnica-acao-btn {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper td.ficha-tecnica-ingredientes-td-acoes {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper td.ficha-tecnica-ingredientes-td-acoes::before {
    margin-bottom: 0;
  }

  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper td.ficha-tecnica-ingredientes-td-acoes .ficha-tecnica-ingredientes-acoes-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.55rem;
  }

  #fechaTecnicaSection .ficha-tecnica-ingredientes-toolbar {
    padding: 0 1rem 0.75rem;
  }

  #fechaTecnicaSection .ficha-tecnica-ingredientes-toolbar .btn {
    width: 100%;
    justify-content: center;
  }

  #fechaTecnicaSection .ficha-tecnica-ingredientes-lista {
    padding: 0 1rem 1rem;
  }

  #fechaTecnicaSection .ficha-tecnica-ingredientes-table-wrap {
    max-height: none;
  }

  #fechaTecnicaSection .ficha-tecnica-tempo-part input[type="number"] {
    max-width: 100%;
  }

  #fechaTecnicaSection .ficha-tecnica-rich-editor {
    max-width: 100%;
    overflow-x: hidden;
    word-break: break-word;
  }

  .ficha-tecnica-ver-modal {
    width: calc(100vw - 24px);
    max-width: 100%;
    margin: 0 12px;
    box-sizing: border-box;
  }

  .ficha-tecnica-ver-modal__body {
    max-height: min(65vh, 520px);
    overflow-x: hidden;
    overflow-y: auto;
    word-break: break-word;
  }

  .ficha-tecnica-ver-modal .ficha-tecnica-ver-dl {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .ficha-tecnica-ver-modal .ficha-tecnica-ver-dl dt {
    margin-top: 0.75rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: #000;
  }

  .ficha-tecnica-ver-modal .ficha-tecnica-ver-dl dt:first-child {
    margin-top: 0;
  }

  .ficha-tecnica-ver-modal .ficha-tecnica-ver-dl dd {
    margin: 0.2rem 0 0.35rem;
    font-size: 0.95rem;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .ficha-tecnica-ver-modal .ficha-tecnica-ver-ing-table thead {
    display: none;
  }

  .ficha-tecnica-ver-modal .ficha-tecnica-ver-ing-table tbody {
    display: block;
  }

  .ficha-tecnica-ver-modal .ficha-tecnica-ver-ing-table tr {
    display: block;
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #fafafa;
  }

  .ficha-tecnica-ver-modal .ficha-tecnica-ver-ing-table td {
    display: block;
    width: 100%;
    border: none;
    padding: 0.35rem 0;
    text-align: left;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .ficha-tecnica-ver-modal .ficha-tecnica-ver-ing-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #000;
    margin-bottom: 0.15rem;
  }

  .ficha-tecnica-ver-modal__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.35rem;
  }

  .ficha-tecnica-ver-modal__footer .btn {
    width: 100%;
    justify-content: center;
  }

  #fechaTecnicaSection .ficha-tecnica-form__footer--row {
    flex-direction: column-reverse;
    align-items: stretch;
    justify-content: stretch;
    gap: 0.75rem;
  }

}

/* Ficha técnica — celular: um pouco mais de ar entre botões */
@media (max-width: 600px) {
  #fechaTecnicaSection .ficha-tecnica-table-stack.table-wrapper td.ficha-tecnica-acoes {
    gap: 0.8rem;
  }

  .ficha-tecnica-ver-modal__footer {
    gap: 0.85rem;
  }
}

/* Modal Fornecedor: pergunta em cima, resposta embaixo */
.form-fornecedor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-fornecedor__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}
.form-fornecedor__field span {
  font-size: 0.9rem;
  color: var(--text);
}

.table-action {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-right: 6px;
}

.table-action:hover {
  background: rgba(0, 71, 171, 0.1);
}

.table-action.danger {
  border-color: var(--accent);
  color: var(--accent);
}

.table-action.danger:hover {
  background: rgba(229, 57, 53, 0.12);
}

.table-action[disabled],
.compras-table-actions button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.38);
  border-color: rgba(0, 0, 0, 0.1);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.table-actions .table-action {
  flex: 0 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.status-pill--active {
  background: rgba(46, 125, 50, 0.14);
  color: #2e7d32;
}

.status-pill--inactive {
  background: rgba(229, 57, 53, 0.14);
  color: var(--accent);
}

.status-pill--success {
  background: rgba(46, 125, 50, 0.15);
  color: #2e7d32;
}

.status-pill--warning {
  background: rgba(255, 179, 0, 0.18);
  color: #ff8f00;
}

.status-pill--danger {
  background: rgba(229, 57, 53, 0.16);
  color: var(--accent);
}

.status-pill--info {
  background: rgba(0, 71, 171, 0.14);
  color: var(--primary);
}

.status-pill--muted {
  background: rgba(96, 125, 139, 0.16);
  color: #546e7a;
}

.avatar-upload {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(0, 71, 171, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(0, 71, 171, 0.35);
  position: relative;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  font-size: 2rem;
}

.avatar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.avatar-hint {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.form-feedback {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-feedback.success {
  background: rgba(46, 125, 50, 0.12);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.4);
}

.form-feedback.error {
  background: rgba(198, 40, 40, 0.12);
  color: #c62828;
  border: 1px solid rgba(198, 40, 40, 0.4);
}

.usuarios-foto {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(0, 71, 171, 0.1);
  display: inline-block;
}

.usuarios-foto--placeholder {
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='24' fill='%23E5E7EB'/%3E%3Ccircle cx='24' cy='18' r='10' fill='%23838AA4'/%3E%3Cpath d='M8 43c0-8.84 7.16-16 16-16s16 7.16 16 16' fill='%23838AA4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;
}

.hidden {
  display: none !important;
}

/* Tela de login com layout dividido */
.login-overlay {
  position: fixed;
  inset: 0;
  padding: 32px 16px;
  background: linear-gradient(135deg, rgba(0, 40, 0, 0.95), rgba(0, 180, 100, 0.88));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  min-height: 100vh;
  overflow-y: auto;
}

.login-container {
  width: min(960px, 94%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.matrix-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  mix-blend-mode: screen;
}

.login-hero {
  background: #000000;
  color: #ffffff;
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  position: relative;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  pointer-events: none;
}

.login-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  width: max-content;
}

.login-hero__logo {
  width: min(220px, 60%);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.2));
}

.login-hero h1 {
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.25;
}

.login-hero p {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.82);
}

.login-panel {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  background: #ffffff;
}

.login-panel__header h2 {
  margin: 0;
  color: var(--primary);
  font-size: 1.65rem;
}

.login-panel__header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  font-size: 0.95rem;
  color: var(--muted);
}

.login-field input {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f9fbff;
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.login-field__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-field__input-wrapper input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #607d8b;
  cursor: pointer;
  padding: 4px;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover {
  color: #263238;
}

.password-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.password-toggle__icon {
  width: 22px;
  height: 22px;
}

.password-toggle__eye-closed {
  display: none;
}

.password-toggle.is-visible {
  color: var(--primary);
}

.password-toggle.is-visible .password-toggle__eye-open {
  display: none;
}

.password-toggle.is-visible .password-toggle__eye-closed {
  display: block;
}

.login-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.18);
}

.login-submit {
  width: 100%;
  justify-content: center;
  padding: 14px 18px;
  font-size: 1rem;
  border-radius: 16px;
  text-transform: none;
}

.login-panel__footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.login-panel__footer small {
  font-size: 0.75rem;
  color: #90a4ae;
  letter-spacing: 0.02em;
}

/* Balcoes de mensagens tipo toast */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 14px 20px;
  border-radius: 12px;
  background: #323232;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2100;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1200px) {
  .content {
    padding: 24px;
  }

  .cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  #comprasSection .compras-grid {
    grid-template-columns: 1fr;
  }

  #comprasSection .compras-detalhes-card header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  #comprasSection .compras-card {
    grid-template-columns: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  #comprasSection .compras-card__acoes {
    width: 100%;
    align-items: stretch;
  }
}

/* Ajustes responsivos para tablets */
@media (max-width: 1024px) {
  .app-shell {
    position: relative;
    flex-direction: column;
  }

  .main-content {
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
  }

  .content {
    -webkit-overflow-scrolling: touch; /* scroll suave no iOS */
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 82vw);
    padding: 28px 22px;
    transform: translateX(-106%);
    box-shadow: 12px 0 28px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    z-index: 2100;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar nav a,
  .sidebar nav button.nav-link {
    font-size: 0.95rem;
  }

  .sidebar-backdrop {
    display: none;
  }

  .sidebar-backdrop.is-active {
    display: block;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }
  .topbar__left {
    width: 100%;
    flex: 1;
    min-width: 0;
    justify-content: space-between;
    gap: 8px;
  }
  .topbar .user-info {
    gap: 4px;
    flex-wrap: wrap;
  }
  .topbar .user-info strong,
  .topbar .user-info .user-info__meta {
    font-size: 0.8rem;
    line-height: 1.3;
  }
  .topbar #userName { word-break: break-word; max-width: 100%; }

  .topbar__menu-btn {
    display: inline-flex;
  }

  .content {
    padding: 24px 18px 32px;
  }

  .cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 900px) {
  .login-container {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .login-hero {
    padding: 36px 32px;
    text-align: center;
    align-items: center;
  }

  .login-hero::after {
    inset: 20px;
  }

  .login-hero__logo {
    margin: 0 auto;
  }

  .login-panel {
    padding: 36px 28px;
  }

  .login-panel__footer {
    align-items: center;
    text-align: center;
  }

  .login-overlay {
    align-items: flex-start;
    padding: 28px 16px 40px;
  }

  #dashboardSection .table-wrapper {
    overflow: visible;
  }

  #dashboardSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #dashboardSection .table-wrapper thead {
    display: none;
  }

  #dashboardSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #dashboardSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #dashboardSection .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    border-bottom: none;
  }

  #dashboardSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }

  #boletaoSection .table-wrapper {
    overflow: visible;
  }

  #boletaoSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #boletaoSection .table-wrapper thead {
    display: none;
  }

  #boletaoSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #boletaoSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #boletaoSection .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    border-bottom: none;
  }

  #boletaoSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }

  /* Alvarás - card layout no mobile: pergunta em cima, resposta embaixo */
  #alvaraSection .table-wrapper {
    overflow: visible;
  }

  #alvaraSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #alvaraSection .table-wrapper thead {
    display: none;
  }

  #alvaraSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #alvaraSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #alvaraSection .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    border-bottom: none;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #alvaraSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }

  /* Funcionários - card layout: pergunta em cima, resposta embaixo */
  #funcionariosSection .table-wrapper {
    overflow: visible;
  }

  #funcionariosSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #funcionariosSection .table-wrapper thead {
    display: none;
  }

  #funcionariosSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #funcionariosSection .table-wrapper tr {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #funcionariosSection .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 0;
    border-bottom: none;
  }

  #funcionariosSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.8rem;
  }

  #funcionariosSection .table-wrapper td[data-label="Foto"] {
    align-items: center;
  }

  #funcionariosSection .table-wrapper td[data-label="Foto"] .usuarios-foto,
  #funcionariosSection .table-wrapper td[data-label="Foto"] .usuarios-foto--placeholder {
    width: 72px;
    height: 72px;
  }

  #funcionariosSection .table-wrapper td.table-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  #funcionariosSection .table-wrapper td.table-actions::before {
    margin-bottom: 4px;
  }

  #funcionariosSection .table-wrapper td.table-actions .table-action {
    width: 100%;
  }

  /* Proventos - cards responsivos: pergunta em cima, resposta embaixo */
  #proventosSection .table-wrapper {
    overflow: visible;
  }

  #proventosSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #proventosSection .table-wrapper thead {
    display: none;
  }

  #proventosSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #proventosSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #proventosSection .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    border-bottom: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  #proventosSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }

  #proventosSection .table-wrapper td.table-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  #proventosSection .table-wrapper td.table-actions::before {
    margin-bottom: 4px;
  }

  #proventosSection .table-wrapper td.table-actions .table-action {
    width: 100%;
  }

  /* Célula dispositivo clicável nos logs (auditoria) */
  .log-dispositivo-clicavel {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    color: var(--primary, #1565c0);
  }
  .log-dispositivo-clicavel:hover {
    opacity: 0.85;
  }

  /* Modal de visualização de funcionário - responsivo */
  #funcionarioViewModal .view-funcionario-header {
    flex-direction: column;
    align-items: center;
  }

  #funcionarioViewModal .view-fields-grid {
    grid-template-columns: 1fr;
  }

  #produtosSection .table-wrapper {
    overflow: visible;
  }

  #produtosSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #produtosSection .table-wrapper thead {
    display: none;
  }

  #produtosSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #produtosSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #produtosSection .table-wrapper td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: none;
  }

  #produtosSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
  }

  #produtosSection .table-wrapper td.table-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 12px;
  }

  #produtosSection .table-wrapper td.table-actions::before {
    margin-bottom: 4px;
  }

  #produtosSection .table-wrapper td.table-actions .table-action {
    width: 100%;
  }

  #estoqueSection .table-wrapper {
    overflow: visible;
  }

  #estoqueSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #estoqueSection .table-wrapper thead {
    display: none;
  }

  #estoqueSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #estoqueSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #estoqueSection .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    border-bottom: none;
  }

  #estoqueSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }

  #estoqueSection .table-wrapper td.table-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 12px;
  }

  #estoqueSection .table-wrapper td.table-actions::before {
    margin-bottom: 4px;
  }

  #estoqueSection .table-wrapper td.table-actions .table-action {
    width: 100%;
  }

  #estoqueLotesModal .table-wrapper {
    overflow: visible;
  }

  #estoqueLotesModal .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #estoqueLotesModal .table-wrapper thead {
    display: none;
  }

  #estoqueLotesModal .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #estoqueLotesModal .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #estoqueLotesModal .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    border-bottom: none;
  }

  #estoqueLotesModal .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }

  #comprasSection .compras-listas-card .table-wrapper {
    overflow: visible;
  }

  #comprasSection .compras-listas-card .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #comprasSection .compras-listas-card .table-wrapper thead {
    display: none;
  }

  #comprasSection .compras-listas-card .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #comprasSection .compras-listas-card .table-wrapper tr {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #comprasSection .compras-listas-card .table-wrapper td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: none;
  }

  #comprasSection .compras-listas-card .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
  }

  /* Em desktop pequeno esconde colunas extras; em mobile card mostra todas via data-label */
  #comprasSection .compras-listas-card .table-wrapper tr td:nth-of-type(n + 4) {
    display: none;
  }

  /* Itens da lista e Estabelecimentos - layout pergunta em cima, resposta em baixo */
  #comprasSection .compras-detalhes-card .table-wrapper {
    overflow: visible;
  }

  #comprasSection .compras-detalhes-card .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #comprasSection .compras-detalhes-card .table-wrapper thead {
    display: none;
  }

  #comprasSection .compras-detalhes-card .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #comprasSection .compras-detalhes-card .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #comprasSection .compras-detalhes-card .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    border-bottom: none;
  }

  #comprasSection .compras-detalhes-card .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }

  #comprasSection .compras-detalhes-card .table-wrapper td.compras-table-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 12px;
  }

  #comprasSection .compras-detalhes-card .table-wrapper td.compras-table-actions::before {
    margin-bottom: 4px;
  }

  #comprasSection .compras-detalhes-resumo {
    flex-direction: column;
    gap: 12px;
  }

  #comprasSection .compras-detalhes-resumo > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  #comprasSection .compras-observacoes {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  #comprasSection .compras-detalhes-acoes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    width: 100%;
  }

  #comprasSection .compras-detalhes-acoes .btn {
    margin: 0;
  }

  #comprasSection .compras-detalhes-card header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  #comprasSection .compras-status {
    width: 100%;
    justify-content: flex-start;
  }

  #comprasSection .compras-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  #comprasSection .compras-card__acoes {
    width: 100%;
    align-items: stretch;
  }

  #comprasSection .compras-detalhes-resumo {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  #unidadesSection .table-wrapper {
    overflow: visible;
  }

  #unidadesSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #unidadesSection .table-wrapper thead {
    display: none;
  }

  #unidadesSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #unidadesSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #unidadesSection .table-wrapper td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: none;
  }

  #unidadesSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
  }

  #unidadesSection .table-wrapper td.table-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 12px;
  }

  #unidadesSection .table-wrapper td.table-actions::before {
    margin-bottom: 4px;
  }

  #unidadesSection .table-wrapper td.table-actions .table-action {
    width: 100%;
  }

  #unidadesSection .table-wrapper td .status-pill {
    margin-left: auto;
  }

  /* Fornecedores - layout pergunta em cima, resposta em baixo (mobile) */
  #fornecedoresSection .table-wrapper,
  #fornecedoresBackupSection .table-wrapper {
    overflow: visible;
  }
  #fornecedoresSection .table-wrapper table,
  #fornecedoresBackupSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }
  #fornecedoresSection .table-wrapper thead,
  #fornecedoresBackupSection .table-wrapper thead {
    display: none;
  }
  #fornecedoresSection .table-wrapper tbody,
  #fornecedoresBackupSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }
  #fornecedoresSection .table-wrapper tr,
  #fornecedoresBackupSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }
  #fornecedoresSection .table-wrapper td,
  #fornecedoresBackupSection .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    border-bottom: none;
  }
  #fornecedoresSection .table-wrapper td::before,
  #fornecedoresBackupSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }
  #fornecedoresSection .table-wrapper td.table-actions,
  #fornecedoresBackupSection .table-wrapper td.table-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 12px;
  }
  #fornecedoresSection .table-wrapper td.table-actions::before,
  #fornecedoresBackupSection .table-wrapper td.table-actions::before {
    margin-bottom: 4px;
  }
  #fornecedoresSection .actions,
  #fornecedoresBackupSection .actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  #fornecedoresSection .actions .btn,
  #fornecedoresSection .actions input {
    width: 100%;
  }

  /* Modal Fornecedor - mobile: pergunta em cima, resposta embaixo */
  #fornecedorModal .form-fornecedor__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }
  #fornecedorModal .form-fornecedor__field span {
    display: block;
    font-weight: 600;
  }
  #fornecedorModal .form-fornecedor__field input,
  #fornecedorModal .form-fornecedor__field select,
  #fornecedorModal .form-fornecedor__field textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  #fornecedorModal .form-fornecedor footer {
    flex-direction: column;
  }
  #fornecedorModal .form-fornecedor footer .btn {
    width: 100%;
  }

  /* Consulta Estoque - layout pergunta em cima, resposta em baixo */
  #estoqueSection .table-wrapper {
    overflow: visible;
  }

  #estoqueSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #estoqueSection .table-wrapper thead {
    display: none;
  }

  #estoqueSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #estoqueSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #estoqueSection .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    border-bottom: none;
  }

  #estoqueSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }

  /* Select Produto em estoque - label em cima */
  #estoqueSection label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1rem;
  }

  #estoqueSection .table-card > div:first-of-type {
    display: flex;
    flex-direction: column;
  }

  /* Actions - botões em linha distribuídos em telas menores */
  #estoqueSection .actions,
  #locaisSection .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
  }

  #estoqueSection .actions .btn,
  #locaisSection .actions .btn {
    flex: 1;
    min-width: 140px;
  }

  /* Locais - layout pergunta em cima, resposta em baixo */
  #locaisSection .table-wrapper {
    overflow: visible;
  }

  #locaisSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #locaisSection .table-wrapper thead {
    display: none;
  }

  #locaisSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #locaisSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #locaisSection .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    border-bottom: none;
  }

  #locaisSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }

  #locaisSection .table-wrapper td.table-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 12px;
  }

  #locaisSection .table-wrapper td.table-actions::before {
    margin-bottom: 4px;
  }

  #locaisSection .table-wrapper td.table-actions .table-action {
    width: 100%;
  }

  #usuariosSection .table-wrapper {
    overflow: visible;
  }

  #usuariosSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #usuariosSection .table-wrapper thead {
    display: none;
  }

  #usuariosSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #usuariosSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #usuariosSection .table-wrapper td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: none;
  }

  #usuariosSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
  }

  #usuariosSection .table-wrapper td[data-label="Foto"] {
    justify-content: flex-start;
    gap: 16px;
  }

  #usuariosSection .table-wrapper td .usuarios-foto,
  #usuariosSection .table-wrapper td .usuarios-foto--placeholder {
    margin: 0;
  }

  #usuariosSection .table-wrapper td.table-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 12px;
  }

  #usuariosSection .table-wrapper td.table-actions::before {
    margin-bottom: 4px;
  }

  #usuariosSection .table-wrapper td.table-actions .table-action {
    width: 100%;
  }

  #usuariosSection .table-wrapper td .status-pill {
    margin-left: auto;
  }

  #lotesSection .table-wrapper {
    overflow: visible;
  }

  #lotesSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #lotesSection .table-wrapper thead {
    display: none;
  }

  #lotesSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #lotesSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #lotesSection .table-wrapper td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: none;
  }

  #lotesSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
  }

  #lotesSection .table-wrapper td[data-label="Valor total"] {
    justify-content: space-between;
  }

  #lotesSection .table-wrapper td .status-pill {
    margin-left: auto;
  }

  #movimentacoesSection .table-wrapper {
    overflow: visible;
  }

  #movimentacoesSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #movimentacoesSection .table-wrapper thead {
    display: none;
  }

  #movimentacoesSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
  }

  #movimentacoesSection .table-wrapper tr {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #movimentacoesSection .table-wrapper td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: none;
  }

  #movimentacoesSection .table-wrapper tr td:nth-of-type(n + 4) {
    display: none;
  }

  #movimentacoesSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
  }

  #movimentacoesSection .table-wrapper td .status-pill {
    margin-left: auto;
  }

  /* Filtros - pergunta em cima, resposta em baixo (movimentacoes e relatorios) */
  #movimentacoesSection .filters-panel label,
  #relatoriosSection .filters-panel label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0.5rem;
  }

  #movimentacoesSection .filters-grid,
  #relatoriosSection .filters-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  #relatoriosSection .report-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    width: 100%;
  }

  #relatoriosSection .report-actions .btn {
    width: 100%;
    margin: 0;
  }

  #relatoriosSection .table-wrapper {
    overflow: visible;
  }

  #relatoriosSection .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  #relatoriosSection .table-wrapper thead {
    display: none;
  }

  #relatoriosSection .table-wrapper tbody {
    display: grid;
    gap: 18px;
  }

  #relatoriosSection .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #relatoriosSection .table-wrapper td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    border-bottom: none;
  }

  #relatoriosSection .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }

  .sidebar {
    width: min(300px, 80vw);
  }

  .topbar {
    gap: 12px;
  }

  .content {
    padding: 20px 16px 28px;
  }

  .cards {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .table-wrapper table {
    min-width: 560px;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 12px 16px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .topbar__left {
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
  }

  .topbar .user-info {
    min-width: 0;
    max-width: 100%;
  }

  .topbar .user-info strong {
    display: block;
    word-break: break-word;
  }

  .user-info__meta {
    font-size: 0.75rem;
  }

  .content {
    padding: 20px 16px 28px;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .tables {
    gap: 18px;
  }

  .form-card {
    padding: 18px;
  }

  .filters-panel {
    padding: 14px 16px;
  }

  .form-card__grid,
  .form-card__row,
  .filters-grid,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .filters-actions,
  .report-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-actions .btn,
  .report-actions .btn {
    width: 100%;
  }

  .modal {
    width: min(520px, 96vw);
    padding: 24px 20px;
  }

  #sugestoesComprasModal .modal {
    width: min(100%, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    margin: 12px;
  }

  #sugestoesComprasModal .modal-sugestoes-body {
    padding: 12px !important;
  }

  /* Sugestões de compras: pergunta em cima, resposta em baixo (tablet) */
  #sugestoesComprasModal .sugestoes-compras-table {
    overflow: visible;
  }

  #sugestoesComprasModal .sugestoes-compras-table thead {
    display: none;
  }

  #sugestoesComprasModal .sugestoes-compras-table tbody {
    display: grid;
    gap: 18px;
  }

  #sugestoesComprasModal .sugestoes-compras-table tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  #sugestoesComprasModal .sugestoes-compras-table td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
    border-bottom: none;
  }

  #sugestoesComprasModal .sugestoes-compras-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
  }

  #sugestoesComprasModal .sugestoes-compras-table td.sugestoes-acoes {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
  }

  .modal footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .avatar-upload {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .avatar-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }

  .actions {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .lista-compras-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .lista-compras-controls .filters {
    width: 100%;
    justify-content: space-between;
  }

  .lista-compras-controls .filters select,
  .lista-compras-controls .filters button {
    flex: 1;
  }
}

/* Ajustes responsivos para celulares */
@media (max-width: 600px) {
  .login-overlay {
    padding: 20px 12px;
  }

  .login-hero {
    padding: 28px 22px;
    gap: 16px;
  }

  .login-hero::after {
    display: none;
  }

  .login-panel {
    padding: 28px 22px;
    gap: 24px;
  }

  .login-panel__header h2 {
    font-size: 1.4rem;
  }

  .login-submit {
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .table-wrapper table {
    min-width: 0;
    width: 100%;
  }

  .table-wrapper thead {
    display: none;
  }

  .table-wrapper tbody {
    display: grid;
    gap: 16px;
  }

  .table-wrapper tr {
    display: grid;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
  }

  .table-wrapper td {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: none;
  }

  .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
  }

  /* Recibo ajuda: pergunta em cima, resposta embaixo (celular) */
  #reciboAjudaSection .table-wrapper td {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
  }
  #reciboAjudaSection .table-wrapper td::before {
    color: #000;
    font-weight: 700;
  }

  /* Recibo ajuda: evitar scroll horizontal (celular) */
  #reciboAjudaSection .table-wrapper {
    overflow-x: hidden;
  }
  #reciboAjudaSection .table-wrapper table {
    width: 100%;
    min-width: 0 !important;
  }
  #reciboAjudaSection .table-wrapper tr,
  #reciboAjudaSection .table-wrapper td {
    min-width: 0;
    max-width: 100%;
  }
  #reciboAjudaSection .table-wrapper td {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* Recibo ajuda: ações em linha, centralizadas (celular) */
  #reciboAjudaSection .table-wrapper td.table-actions {
    width: 100%;
  }
  #reciboAjudaSection .table-wrapper td.table-actions .table-action {
    flex: 1 1 auto;
  }
  #reciboAjudaSection .table-wrapper td.table-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
  }

  /* Sugestões modal: cabe na tela do celular, sem scroll horizontal */
  #sugestoesComprasModal {
    align-items: flex-start;
    padding: 12px 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  #sugestoesComprasModal .modal {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px);
    margin: 0 12px 24px;
    padding: 12px 14px;
    overflow-x: hidden;
  }

  #sugestoesComprasModal .modal-sugestoes-body {
    padding: 8px 0 !important;
    overflow-x: hidden;
  }

  #sugestoesComprasModal .sugestoes-compras-table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  #sugestoesComprasModal .sugestoes-compras-table tr {
    padding: 12px;
  }

  #sugestoesComprasModal .sugestoes-compras-table td {
    padding: 6px 0;
  }

  #sugestoesComprasModal .filters-panel {
    padding: 10px 0;
    margin-bottom: 0.75rem;
  }

  #sugestoesComprasModal .filters-grid {
    gap: 10px;
  }

  #sugestoesComprasModal .modal header {
    margin-bottom: 12px;
  }

  #sugestoesComprasModal .modal header h2 {
    font-size: 1.1rem;
  }

  /* Sugestões de compras: pergunta em cima, resposta em baixo (celular/tablet) */
  #sugestoesComprasModal .sugestoes-compras-table td {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #sugestoesComprasModal .sugestoes-compras-table td::before {
    font-size: 0.85rem;
  }

  #sugestoesComprasModal .sugestoes-compras-table td.sugestoes-acoes {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
  }

  .table-wrapper td.table-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 10px;
  }

  .table-wrapper td.table-actions::before {
    margin-bottom: 4px;
  }

  .filters-actions,
  .report-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-actions .btn,
  .report-actions .btn {
    width: 100%;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar button {
    align-self: stretch;
  }

  #produtosSection .table-wrapper tr {
    padding: 16px;
  }

  #produtosSection .table-wrapper td {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #produtosSection .table-wrapper td::before {
    font-size: 0.85rem;
  }

  #produtosSection .table-wrapper td.table-actions {
    gap: 8px;
  }

  /* Listas de compras - mostrar todas as colunas no card (não esconder 4+) */
  #comprasSection .compras-listas-card .table-wrapper tr td:nth-of-type(n + 4) {
    display: flex;
  }

  #dashboardSection .table-wrapper tr {
    padding: 16px;
  }

  #dashboardSection .table-wrapper td {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #dashboardSection .table-wrapper td::before {
    font-size: 0.85rem;
  }

  #boletaoSection .table-wrapper tr {
    padding: 16px;
  }

  #boletaoSection .table-wrapper td {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #boletaoSection .table-wrapper td::before {
    font-size: 0.85rem;
  }

  #unidadesSection .table-wrapper tr {
    padding: 16px;
  }

  #unidadesSection .table-wrapper td {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #unidadesSection .table-wrapper td::before {
    font-size: 0.85rem;
  }

  #unidadesSection .table-wrapper td.table-actions {
    gap: 8px;
  }

  #unidadesSection .table-wrapper td .status-pill {
    margin-left: 0;
  }

  #lotesSection .table-wrapper tr {
    padding: 16px;
  }

  #lotesSection .table-wrapper td {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #lotesSection .table-wrapper td::before {
    font-size: 0.85rem;
  }

  #lotesSection .table-wrapper td .status-pill {
    margin-left: 0;
  }

  #movimentacoesSection .table-wrapper tr {
    padding: 16px;
  }

  #movimentacoesSection .table-wrapper td {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #movimentacoesSection .table-wrapper td::before {
    font-size: 0.85rem;
  }

  #movimentacoesSection .table-wrapper td .status-pill {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .login-overlay {
    padding: 24px 12px 32px;
  }

  .login-container {
    border-radius: 16px;
  }

  .login-hero {
    padding: 24px 20px;
  }

  .login-panel {
    padding: 24px 20px;
  }

  .login-panel__header h2 {
    font-size: 1.3rem;
  }

  .login-field input {
    padding: 12px 14px;
    padding-right: 44px;
  }

  #unidadesSection .table-wrapper tr {
    padding: 14px;
  }

  #unidadesSection .table-wrapper td {
    gap: 4px;
  }

  #lotesSection .table-wrapper tr {
    padding: 14px;
  }

  #lotesSection .table-wrapper td {
    gap: 4px;
  }

  #movimentacoesSection .table-wrapper tr {
    padding: 14px;
  }

  #movimentacoesSection .table-wrapper td {
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .table-wrapper table {
    min-width: 460px;
  }

  #dashboardSection .table-wrapper table {
    min-width: 0;
  }

  #boletaoSection .table-wrapper table {
    min-width: 0;
  }

  .topbar__menu-btn {
    width: 40px;
    height: 40px;
  }
}

@media (max-height: 780px) {
  .login-overlay {
    align-items: flex-start;
    padding-top: 32px;
  }

  .login-container {
    margin: 0 auto;
  }
}
.lote-status-chart {
  margin-top: 24px;
  background: #fff;
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bar-label {
  flex: 0 0 180px;
  font-weight: 600;
  color: var(--muted);
}
.bar-track {
  flex: 1;
  height: 12px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.3s ease;
}
.bar-value {
  width: 36px;
  text-align: right;
  font-weight: 600;
}
.bar-fill--ativo { background: #2e7d32; }
.bar-fill--avencer { background: #ffb300; }
.bar-fill--vencido { background: #e53935; }
.bar-fill--esgotado { background: #90a4ae; }
.bar-fill--bloqueado { background: #5c6bc0; }
#cardLotesAVencer, #cardLotesVencidos { cursor: pointer; }
#cardLotesAVencer:hover, #cardLotesVencidos:hover { box-shadow: 0 12px 24px rgba(0,0,0,0.12); transform: translateY(-2px); }
#cardLotesVencidos .value { color: #e53935; }

.filters-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.filters-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.filters-grid label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--muted);
  position: relative;
}

.filters-grid select,
.filters-grid input {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

.filters-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  max-height: 220px;
  overflow-y: auto;
  z-index: 9999;
}

.autocomplete-dropdown .ac-item {
  padding: 8px 12px;
  font-size: 0.93rem;
  cursor: pointer;
  color: #333;
}

.autocomplete-dropdown .ac-item:hover,
.autocomplete-dropdown .ac-item.ac-active {
  background: #e8f4fd;
  color: var(--primary, #1565c0);
}

.autocomplete-dropdown .ac-empty {
  padding: 8px 12px;
  font-size: 0.9rem;
  color: #999;
  font-style: italic;
}

/* Select expandido pelo filtro de busca */
select[size]:not([size="1"]) {
  border-radius: 0 0 8px 8px !important;
  border-top: none !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  z-index: 100;
  position: relative;
}

.filters-actions .btn {
  background: var(--primary);
  color: #fff;
}

.filters-actions .btn:nth-child(2) {
  background: #90a4ae;
}

/* Proventos: período (início/fim) em uma célula, rótulos dentro do bloco */
#proventosFilterForm label.proventos-filter-dates {
  min-width: min(100%, 280px);
}
#proventosFilterForm .proventos-filter-dates__row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  align-items: stretch;
}
#proventosFilterForm .proventos-filter-dates__field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px 8px;
  background: #fff;
}
#proventosFilterForm .proventos-filter-dates__lbl {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  line-height: 1.2;
}
#proventosFilterForm .proventos-filter-dates__field input[type="date"] {
  margin-top: 4px;
  border: none;
  padding: 4px 0;
  border-radius: 0;
  width: 100%;
  box-shadow: none;
}

/* RH — formação educacional (funcionário) */
.formacao-blocos {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.formacao-bloco {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  background: #fafbfc;
}
.formacao-bloco__summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 0;
  color: var(--primary, #1565c0);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.formacao-bloco__summary::-webkit-details-marker {
  display: none;
}
.formacao-bloco__summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.2s ease;
  font-size: 0.85em;
  color: var(--muted);
}
.formacao-bloco[open] .formacao-bloco__summary::before {
  transform: rotate(90deg);
}
.formacao-bloco__summary .btn-formacao-add {
  font-size: 0.8rem;
  padding: 4px 10px;
  font-weight: 600;
  margin-left: auto;
}
.formacao-linhas {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 14px;
}
.formacao-linha {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.formacao-linha__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.formacao-linha__status {
  font-size: 0.82rem;
  color: #2e7d32;
  flex: 1 1 200px;
  line-height: 1.35;
}
.formacao-linha__status strong {
  font-weight: 700;
}
.formacao-linha__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.formacao-linha__actions .btn {
  font-size: 0.8rem;
  padding: 4px 10px;
}
.formacao-linha--confirmada {
  border-style: solid;
  border-color: #a5d6a7;
  background: #f1f8f4;
}
.formacao-linha--confirmada .formacao-linha__campos input[readonly],
.formacao-linha--confirmada .formacao-linha__campos input:disabled {
  background: #f5faf6;
  color: #37474f;
  cursor: default;
}
.formacao-linha__campos {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.formacao-linha__campos label {
  margin: 0;
}
.formacao-linha__campos .grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .formacao-linha__campos .grid-two {
    grid-template-columns: 1fr;
  }
}

.report-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.report-actions .btn {
  background: #607d8b;
}

.relatorios-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Esconder colunas extras apenas em desktop (mobile usa card layout com data-label) */
@media (min-width: 1025px) {
  #relatoriosSection .table-card table th:nth-of-type(n + 4),
  #relatoriosSection .table-card table td:nth-of-type(n + 4) {
    display: none;
  }
}

.card--alert {
  box-shadow: 0 0 0 1px rgba(244, 67, 54, 0.25);
}

.card--alert .value {
  color: #d32f2f;
}

.produto-abaixo-minimo {
  background: rgba(244, 67, 54, 0.08);
}

.produto-abaixo-minimo:hover {
  background: rgba(244, 67, 54, 0.12);
}

.usuario-inativo {
  opacity: 0.55;
}

.usuario-inativo:hover {
  opacity: 0.75;
}

.table-flag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: 999px;
  font-weight: 600;
}

.table-flag.danger {
  background: rgba(244, 67, 54, 0.15);
  color: #b71c1c;
}

#cardMinimoHint {
  color: #607d8b;
}

.card--alert #cardMinimoHint {
  color: #b71c1c;
}

.card-minimo-select {
  margin-top: 0.35rem;
  width: 100%;
  max-width: 100%;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}

.card--alert .card-minimo-select {
  border-color: rgba(244, 67, 54, 0.35);
}

/* ===== Estilos para o Modulo de Boletos ===== */

/* Header do Modulo de Boletos */
.boletos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.boletos-header h2 {
  margin: 0;
  color: var(--primary);
  font-size: 1.75rem;
}

.boletos-actions {
  display: flex;
  gap: 12px;
}

/* Modulo RH - Funcionarios */
.funcionarios-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}
.funcionarios-header h2 { margin: 0; color: var(--primary); font-size: 1.5rem; }
.form-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.form-section:last-of-type { border-bottom: none; }
.form-section h3 { margin: 0 0 0.75rem; font-size: 1rem; color: var(--primary); }
.modal--wide { max-width: 560px; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-label input { width: auto; }
#funcionariosSection .table-wrapper td[data-label="Foto"] { width: 64px; }
#funcionariosSection .table-wrapper .usuarios-foto,
#funcionariosSection .table-wrapper .usuarios-foto--placeholder { width: 48px; height: 48px; }
#funcionariosSection .table-action { cursor: pointer; }

@media (min-width: 901px) {
  #funcionariosSection .table-wrapper {
    overflow-x: auto;
  }

  #funcionariosSection .table-wrapper table {
    min-width: 1240px;
  }

  /* Mantem "Ações" sempre visivel no lado direito */
  #funcionariosSection .table-wrapper th:last-child,
  #funcionariosSection .table-wrapper td.table-actions {
    position: sticky;
    right: 0;
    z-index: 2;
    background: var(--card-bg);
  }

  #funcionariosSection .table-wrapper th:last-child {
    z-index: 3;
  }
}

/* Modal visualizar funcionário: cabeçalho/rodapé fixos, conteúdo com rolagem (todas as larguras) */
#funcionarioViewModal .modal {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 640px);
  overflow: hidden;
  padding-bottom: 16px;
}

#funcionarioViewModal .modal > header {
  flex-shrink: 0;
}

#funcionarioViewModal #funcionarioViewContent {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  margin-bottom: 8px;
}

#funcionarioViewModal .modal > footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e0e0e0);
}

/* Modal de visualização - pergunta em cima, resposta embaixo */
.view-field { margin-bottom: 0.75rem; }
.view-field-label { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.2rem; font-weight: 500; }
.view-field-value { font-size: 1rem; color: var(--text); }
.view-funcionario-header { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.view-foto-wrap .usuarios-foto, .view-foto-wrap .usuarios-foto--placeholder { width: 96px; height: 96px; border-radius: 8px; object-fit: cover; }
.view-foto-placeholder { background: var(--border); display: flex; align-items: center; justify-content: center; }
.view-fields-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 1.5rem; }

/* Filtro de Mes/Ano */
.boletos-filtro {
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.boletos-filtro label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text);
}

.boletos-mes-select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s;
  min-width: 200px;
}

.boletos-mes-select:hover {
  border-color: var(--primary);
}

.boletos-mes-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
}

/* Cards de Resumo Financeiro */
.boletos-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.boleto-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid transparent;
}

.boleto-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}

.boleto-card--total {
  border-left-color: #2196f3;
}

.boleto-card--pago {
  border-left-color: #4caf50;
}

.boleto-card--juros {
  border-left-color: #ff9800;
}

.boleto-card--atrasados {
  border-left-color: #f44336;
}

.boleto-card__icon {
  font-size: 2.5rem;
  line-height: 1;
}

.boleto-card__content {
  flex: 1;
}

.boleto-card__label {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.boleto-card__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.boleto-card--total .boleto-card__value {
  color: #2196f3;
}

.boleto-card--pago .boleto-card__value {
  color: #4caf50;
}

.boleto-card--juros .boleto-card__value {
  color: #ff9800;
}

.boleto-card--atrasados .boleto-card__value {
  color: #f44336;
}

/* Grafico de Economia */
.boletos-grafico-card {
  margin-bottom: 1.5rem;
}

.boletos-grafico {
  padding: 2rem 1rem;
}

.boletos-grafico-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 1.5rem;
  height: 200px;
  padding: 0 1rem;
}

.boleto-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.boleto-bar__fill {
  width: 100%;
  background: linear-gradient(180deg, #4caf50 0%, #66bb6a 100%);
  border-radius: 8px 8px 0 0;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.boleto-bar__fill:hover {
  background: linear-gradient(180deg, #66bb6a 0%, #4caf50 100%);
  transform: scaleY(1.05);
  box-shadow: 0 6px 12px rgba(76, 175, 80, 0.4);
}

.boleto-bar__fill::after {
  content: attr(data-value);
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.boleto-bar__fill:hover::after {
  opacity: 1;
}

.boleto-bar__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Botoes de Icone */
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.5rem;
  transition: transform 0.2s, opacity 0.2s;
  opacity: 0.7;
}

.btn-icon:hover {
  opacity: 1;
  transform: scale(1.2);
}

.btn-icon--primary {
  opacity: 1;
}

.btn-icon--primary:hover {
  transform: scale(1.3);
}

/* Pills de Status dos Boletos */
.status-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.status-pill--success {
  background: rgba(76, 175, 80, 0.15);
  color: #2e7d32;
}

.status-pill--warning {
  background: rgba(255, 152, 0, 0.15);
  color: #e65100;
}

.status-pill--danger {
  background: rgba(244, 67, 54, 0.15);
  color: #c62828;
}

.status-pill--info {
  background: rgba(33, 150, 243, 0.15);
  color: #1565c0;
}

.status-pill--muted {
  background: rgba(96, 125, 139, 0.15);
  color: #455a64;
}

/* Ajustes Responsivos para Boletos */
@media (max-width: 768px) {
  .boletos-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .boletos-actions {
    width: 100%;
  }

  .boletos-actions button {
    flex: 1;
  }

  .boletos-resumo {
    grid-template-columns: 1fr;
  }

  .boletos-grafico-bars {
    gap: 0.75rem;
  }

  .boleto-card__value {
    font-size: 1.5rem;
  }
}

/* Estilo para input de arquivo no modal de boleto */
#boletoAnexoInput {
  padding: 0.75rem;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: #f9f9f9;
  cursor: pointer;
  transition: all 0.3s;
}

#boletoAnexoInput:hover {
  border-color: var(--primary);
  background: #f0f4ff;
}

#boletoAnexoInput:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
}

/* Preview do anexo */
#boletoAnexoPreview {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#boletoRemoverAnexo:hover {
  transform: scale(1.2);
  color: #b71c1c;
}

/* ========== RESERVAS DE MESAS ========== */
.reservas-mesas-container {
  padding: 0 1rem;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.reservas-mesas-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.reservas-mesas-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text);
}

.reservas-mesas-filtro {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

.reservas-mesas-filtro label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: left;
  min-width: 0;
  max-width: 100%;
}

.reservas-select, .reservas-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.reservas-mesas-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  min-width: 0;
}

.reserva-card {
  background: var(--card-bg);
  padding: 0.75rem 1rem;
  min-width: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  border-left: 4px solid transparent;
  text-align: left;
}

.reserva-card--livre { border-left-color: #4caf50; }
.reserva-card--reservada { border-left-color: #f44336; }
.reserva-card--ocupada { border-left-color: #ff9800; }
.reserva-card--total { border-left-color: #2196f3; }

.reserva-card__icon { font-size: 1.75rem; }
.reserva-card__label { font-size: 0.8rem; color: var(--muted); font-weight: 700; text-align: left; }
.reserva-card__value { font-size: 1.5rem; font-weight: 600; text-align: left; }

.reservas-mesas-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
  min-width: 0;
}

/* Tablet: pergunta em cima, resposta em baixo + scroll */
@media (max-width: 900px) {
  .reservas-mesas-grid {
    grid-template-columns: 1fr;
  }
  .reservas-mesas-filtro {
    flex-direction: column;
    align-items: stretch;
  }
  .reservas-mesas-filtro label {
    display: block;
    min-width: 100%;
    font-weight: 700;
    text-align: left;
  }
  .reservas-mesas-filtro .reservas-select,
  .reservas-mesas-filtro .reservas-input {
    width: 100%;
    min-width: 0;
  }
  .reserva-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .reserva-card__label { order: 1; }
  .reserva-card__value { order: 2; font-size: 1.3rem; }
  .reserva-card__icon { order: 0; }
  .reservas-mesas-cards {
    max-height: 50vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mesa-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .mesa-card__numero { order: 1; }
  .mesa-card__info { order: 2; }
  .mesa-card__cliente { order: 3; }
}

@media (max-width: 600px) {
  #reservaMesaSection { overflow-x: hidden; max-width: 100%; }
  .reservas-mesas-container { padding: 0 0.4rem; max-width: 100%; }
  .reservas-mesas-filtro { flex-direction: column; align-items: stretch; }
  .reservas-mesas-filtro label {
    display: block;
    min-width: 100%;
  }
  .reservas-mesas-filtro .reservas-select,
  .reservas-mesas-filtro .reservas-input {
    width: 100%;
    min-width: 0;
  }
  .reservas-mesas-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
  .reserva-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }
  .reserva-card__label { order: 1; }
  .reserva-card__value { order: 2; font-size: 1.1rem; }
  .reserva-card__icon { order: 0; }
  .reservas-mesas-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    max-height: 45vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mesa-card {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    flex-direction: column;
    align-items: flex-start;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .mesa-card__numero { font-size: 0.95rem; order: 1; }
  .mesa-card__info { order: 2; }
  .mesa-card__cliente { order: 3; }
  .mesa-card__del { order: 0; align-self: flex-end; }
  .reservas-table { font-size: 0.8rem; }
  .reservas-table th, .reservas-table td { padding: 0.4rem 0.25rem; }
  .reservas-mesas-header { flex-direction: column; align-items: stretch; }
  .reservas-mesas-actions { display: flex; gap: 0.5rem; }
  .btn-icon { padding: 0.35rem; font-size: 1rem; }
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .reservas-mesas-mesas h3, .reservas-mesas-lista h3 { font-size: 1rem; }
  .btn-icon { min-width: 44px; min-height: 44px; }
  .reserva-card { -webkit-tap-highlight-color: transparent; }
}

.reservas-mesas-mesas h3,
.reservas-mesas-lista h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}

.reservas-mesas-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.4rem;
  min-width: 0;
}

.reservas-mesas-cards > .reservas-empty {
  grid-column: 1 / -1;
  white-space: normal;
  word-wrap: break-word;
}

.mesa-card {
  position: relative;
  background: var(--card-bg);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  min-width: 0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.mesa-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mesa-card--livre { border-color: #4caf50; background: rgba(76,175,80,0.08); }
.mesa-card--reservada { border-color: #f44336; background: rgba(244,67,54,0.08); }
.mesa-card--ocupada { border-color: #ff9800; background: rgba(255,152,0,0.08); }
.mesa-card--bloqueada { border-color: #9e9e9e; background: rgba(158,158,158,0.08); opacity: 0.7; }

.mesa-card__numero {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.mesa-card__info {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
}

.mesa-card__del {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.8;
  line-height: 1;
}
.mesa-card__del:hover {
  opacity: 1;
}

.mesa-card__cliente {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-weight: 600;
}

.reservas-table {
  width: 100%;
  border-collapse: collapse;
}

.reservas-table th,
.reservas-table td {
  padding: 0.6rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

/* Mobile/Tablet: Reservas do dia - card layout para não estourar */
@media (max-width: 900px) {
  .reservas-mesas-mesas, .reservas-mesas-lista { min-width: 0; }
  .reservas-mesas-lista .table-wrapper {
    overflow: visible;
    max-width: 100%;
  }
  .reservas-table thead { display: none; }
  .reservas-table tr.reserva-row {
    display: block;
    margin-bottom: 1rem;
    padding: 0.75rem;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
  }
  .reservas-table tr.reserva-row td {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: none;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    max-width: 100%;
  }
  .reservas-table tr.reserva-row td:last-child { border-bottom: none; }
  .reservas-table tr.reserva-row td::before {
    content: attr(data-label);
    font-weight: 700;
    flex-shrink: 0;
    min-width: 70px;
    font-size: 0.75rem;
  }
  .reservas-table tr.reserva-row td {
    flex-wrap: wrap;
  }
  .reservas-table tr.reserva-row td.reserva-row-acoes {
    flex-wrap: wrap;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
  }
  .reservas-table tr.reserva-row td.reserva-row-acoes::before {
    width: 100%;
    margin-bottom: 0.25rem;
  }
  .reservas-table tr.reserva-row-empty td {
    display: block;
    padding: 1rem;
  }
  .reservas-table tr.reserva-row-empty td::before {
    display: none;
  }
  .reservas-table td.reservas-empty {
    text-align: left !important;
    padding: 1rem;
    display: block;
  }
}

@media (max-width: 600px) {
  .reservas-table tr.reserva-row td::before { min-width: 80px; font-size: 0.8rem; }
  .reservas-table td.reservas-empty {
    text-align: left !important;
    padding-left: 1rem;
  }
}

.reservas-table th { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; font-weight: 700; }

.reservas-empty {
  color: var(--muted);
  padding: 1rem 1.5rem;
  text-align: left !important;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: block;
  visibility: visible;
}

.reservas-table td.reservas-empty {
  text-align: left !important;
}

.status-reserva { padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }

.status-reserva--pendente { background: #fff3e0; color: #e65100; }
.status-reserva--confirmada { background: #e3f2fd; color: #1565c0; }
.status-reserva--cliente_chegou { background: #e8f5e9; color: #2e7d32; }
.status-reserva--cancelada { background: #ffebee; color: #c62828; }
.status-reserva--no_show { background: #fce4ec; color: #ad1457; }
.status-reserva--finalizada { background: #f5f5f5; color: #616161; }

.modal--wide { max-width: 700px; }

/* Auditoria fechamento caixa */
.fechamento-audit__intro {
  max-width: 920px;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

/* Recibo ajuda de custo */
.recibo-ajuda__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem 1.25rem;
  padding: 0 1.25rem 1rem;
}
.recibo-ajuda__finalidade {
  grid-column: span 1;
}
.multi-select {
  position: relative;
  width: 100%;
  max-width: 420px;
}
.multi-select__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: #111;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.multi-select__btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.25);
  border-color: rgba(66, 153, 225, 0.9);
}
.multi-select__arrow {
  font-size: 0.85rem;
  opacity: 0.9;
}
.multi-select__btn[aria-expanded="true"] .multi-select__arrow {
  transform: rotate(180deg);
}
.multi-select__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
  padding: 8px;
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

/* Recibo: o dropdown da finalidade fica abaixo do botão (position absolute).
   .table-card usa overflow:hidden e recorta o menu; o card seguinte pode cobrir o menu sem z-index. */
#reciboAjudaPainel > .table-card.form-card--wide:first-of-type {
  overflow: visible;
  position: relative;
  z-index: 6;
}
#reciboAjudaSection .multi-select__menu {
  z-index: 80;
}

/* deixa a rolagem mais visível */
.multi-select__menu {
  scrollbar-width: thin;
}
.multi-select__menu::-webkit-scrollbar {
  width: 10px;
}
.multi-select__menu::-webkit-scrollbar-thumb {
  background: rgba(38, 50, 56, 0.25);
  border-radius: 999px;
}
.multi-select__menu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
}
.multi-select__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
}
.multi-select__item:hover {
  background: rgba(25, 118, 210, 0.08);
}
.multi-select__item input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
.recibo-ajuda__funcionario select,
.recibo-ajuda__funcionario input,
.recibo-ajuda__unidade select {
  width: 100%;
}

@media (min-width: 960px) {
  .recibo-ajuda__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
  .recibo-ajuda__funcionario {
    grid-column: span 2;
  }
  .recibo-ajuda__unidade {
    grid-column: span 1;
  }
}

.recibo-ajuda__sign-actions {
  display: flex;
  gap: 12px;
}
.recibo-ajuda__sign-wrap {
  padding: 0 1.25rem 1.25rem;
}
.recibo-ajuda__evidencias {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 0.75rem;
}
.recibo-ajuda__sign-canvas.is-locked {
  opacity: 0.55;
  filter: grayscale(0.2);
  pointer-events: none;
}
.recibo-ajuda__sign-canvas {
  width: 100%;
  max-width: 100%;
  background: #fff;
  border: 2px dashed var(--border);
  border-radius: 12px;
  touch-action: none; /* importante para desenhar no mobile */
}

.recibo-ajuda__painel--collapsed {
  display: none;
}

.fechamento-audit__toggle-principal {
  min-width: 2.5rem;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}

.fechamento-audit__toggle-icon {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.fechamento-audit__toggle-principal[aria-expanded="false"] .fechamento-audit__toggle-icon {
  transform: rotate(-90deg);
}

.fechamento-audit__principal-painel--collapsed {
  display: none;
}

.fechamento-audit__meta .fechamento-audit__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem 1.25rem;
  padding: 0 1.25rem 1rem;
}

.fechamento-audit__caixa-operador {
  grid-column: 1 / -1;
}

.fechamento-audit__field-hint {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: #607d8b;
  margin-top: 0.35rem;
  line-height: 1.35;
}

.fechamento-audit__meta label,
.fechamento-audit__obs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #37474f;
}

.fechamento-audit__meta input,
.fechamento-audit__meta select,
.fechamento-audit__obs textarea {
  font-weight: 500;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #cfd8dc;
  width: 100%;
  box-sizing: border-box;
}

.fechamento-audit__obs {
  padding: 0 1.25rem 1.25rem;
}

.fechamento-audit__table-wrap {
  overflow-x: auto;
}

.fechamento-audit__referencia-block {
  margin-bottom: 1rem;
}

.fechamento-audit__ref-table-wrap {
  overflow-x: auto;
  padding: 0 1.25rem 1.25rem;
}

.fechamento-audit__ref-table {
  min-width: 260px;
  max-width: 420px;
}

.fechamento-audit__table {
  min-width: 680px;
}

.fechamento-audit__table--simples {
  min-width: 520px;
}

.fechamento-audit__diff-cell {
  font-weight: 700;
  white-space: nowrap;
}

.fechamento-audit__acoes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.fechamento-audit__acoes .btn {
  padding: 0.28rem 0.55rem;
  font-size: 0.78rem;
}

.fechamento-ver-modal__body {
  padding: 0 1.25rem 1.25rem;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  font-size: 0.9rem;
}

.fechamento-ver-modal__body table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}

.fechamento-ver-modal__body th,
.fechamento-ver-modal__body td {
  border: 1px solid #e0e0e0;
  padding: 0.4rem 0.5rem;
  text-align: left;
}

.fechamento-ver-modal__body th {
  background: #f5f5f5;
  font-size: 0.8rem;
}

.fechamento-ver-modal__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}

.fechamento-ver-modal__meta dt {
  font-weight: 700;
  color: #546e7a;
}

.fechamento-ver-modal__meta dd {
  margin: 0;
}

.fechamento-audit__resumo-mes-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.25rem;
  padding: 0 1.25rem 1rem;
}

.fechamento-audit__resumo-mes-bar label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #37474f;
}

.fechamento-audit__resumo-mes-bar input[type="month"],
.fechamento-audit__resumo-mes-bar select {
  min-width: 180px;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #cfd8dc;
  font-weight: 500;
}

.fechamento-audit__resumo-mes-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.fechamento-audit__resumo-mes-resultado {
  padding: 0 1.25rem 1.25rem;
  line-height: 1.5;
}

.fechamento-audit__resumo-mes-resultado .fechamento-resumo-mes-head {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: #37474f;
}

.fechamento-audit__resumo-mes-resultado .fechamento-resumo-mes-totais {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  background: linear-gradient(145deg, #e3f2fd 0%, #fff 100%);
  border: 1px solid #90caf9;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0d47a1;
}

.fechamento-audit__resumo-mes-resultado .fechamento-resumo-mes-totais--negativo {
  background: linear-gradient(145deg, #ffebee 0%, #fffefe 100%);
  border-color: #e57373;
  color: #b71c1c;
}

.fechamento-valor-negativo {
  color: #c62828;
  font-weight: 700;
}

.fechamento-audit__resumo-mes-resultado table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.fechamento-audit__resumo-mes-resultado th,
.fechamento-audit__resumo-mes-resultado td {
  border: 1px solid #e0e0e0;
  padding: 0.45rem 0.55rem;
  text-align: left;
}

.fechamento-audit__resumo-mes-resultado th {
  background: #f5f5f5;
}

.fechamento-audit__conf-cell {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  white-space: nowrap;
  color: #37474f;
}

.fechamento-audit__table th,
.fechamento-audit__table td {
  vertical-align: middle;
  font-size: 0.875rem;
}

.fechamento-audit__money {
  width: 100%;
  min-width: 96px;
  max-width: 140px;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #cfd8dc;
  box-sizing: border-box;
}

.fechamento-audit__resumo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 0.75rem;
}

.fechamento-audit__card {
  background: linear-gradient(145deg, #fafafa 0%, #f0f4f8 100%);
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.fechamento-audit__card--destaque {
  border-color: #1565c0;
  background: linear-gradient(145deg, #e3f2fd 0%, #fff 100%);
}

.fechamento-audit__card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #607d8b;
  font-weight: 700;
}

.fechamento-audit__card-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #263238;
}

.fechamento-audit__card-hint {
  font-size: 0.7rem;
  font-weight: 500;
  color: #78909c;
  line-height: 1.3;
  margin-top: 0.15rem;
}

.fechamento-audit__sit-valor {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #37474f;
}

.fechamento-audit__card--status.fechamento-audit__card--destaque .fechamento-audit__sit-valor--zero {
  color: #607d8b;
}

.fechamento-audit__card--status.fechamento-audit__card--destaque .fechamento-audit__sit-valor--pos {
  color: #2e7d32;
}

.fechamento-audit__card--status.fechamento-audit__card--destaque .fechamento-audit__sit-valor--neg {
  color: #c62828;
}

.fechamento-audit__card--status .fechamento-audit__status {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  display: inline-block;
  width: fit-content;
}

.fechamento-audit__status--neutral {
  background: #eceff1;
  color: #546e7a;
}

.fechamento-audit__status--ok {
  background: #e8f5e9;
  color: #2e7d32;
}

.fechamento-audit__status--alert {
  background: #ffebee;
  color: #c62828;
}

.fechamento-audit__explicacao {
  max-width: 920px;
  margin-bottom: 2rem;
  line-height: 1.55;
}

.fechamento-audit__diff--pos {
  color: #2e7d32;
  font-weight: 700;
}

.fechamento-audit__diff--neg {
  color: #c62828;
  font-weight: 700;
}

.fechamento-audit__diff--zero {
  color: #607d8b;
}

@media (max-width: 768px) {
  .fechamento-audit__table thead {
    display: none;
  }
  .fechamento-audit__table tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.5rem;
  }
  .fechamento-audit__table td {
    display: block;
    text-align: left !important;
    padding: 0.35rem 0;
  }
  .fechamento-audit__table td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: #607d8b;
  }
  .fechamento-audit__money {
    max-width: none;
    margin-top: 0.25rem;
  }

  .fechamento-audit__conf-cell {
    white-space: normal;
    word-break: break-word;
  }

  .fechamento-audit__diff-cell {
    white-space: normal;
  }
}




