body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7f6;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90vh;
}

.container {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  transition: max-width 0.4s ease-in-out;
}

#loginContainer {
  max-width: 350px;
  text-align: center;
}

/* Legacy */
#loginContainer.login-modern-card {
  max-width: 400px;
  padding: 45px 40px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(229, 231, 235, 0.4);
  text-align: center;
}

.login-brand {
  margin-bottom: 35px;
}

.brand-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-radius: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  margin: 0 auto 20px auto;
  box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4);
  transform: rotate(-3deg);
}

#loginContainer.login-modern-card h2 {
  color: #111827;
  font-size: 26px;
  margin: 0 0 8px 0;
  font-weight: 800;
  letter-spacing: -0.5px;
}

#loginContainer.login-modern-card p {
  color: #6b7280;
  font-size: 15px;
  margin: 0;
}

.form-group-modern {
  margin-bottom: 22px;
  text-align: left;
}

.form-group-modern label {
  display: block;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-group-modern input {
  width: 100%;
  padding: 14px 16px;
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 15px;
  color: #1f2937;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-group-modern input:focus {
  outline: none;
  border-color: #10b981;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.btn-login-modern {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  margin-top: 10px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-login-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, #059669, #047857);
}

.btn-login-modern:active {
  transform: translateY(0);
}

#mainContainer {
  max-width: 650px;
  display: none;
  align-self: flex-start;
}

#mainContainer.modo-tabela {
  max-width: 1200px;
}

/* Customização Flatpickr Airbnb */
.flatpickr-calendar.airbnb {
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  padding: 10px;
}

.flatpickr-day.selected {
  background: #2e7d32 !important;
  /* Cor principal do seu sistema */
  border-color: #2e7d32 !important;
}

.flatpickr-months .flatpickr-month {
  background: white !important;
  color: #333 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: white !important;
  font-weight: bold;
}

.flatpickr-day:hover {
  background: #e8f5e9 !important;
  color: #333 !important;
}

/* Footer Customizado Flatpickr */
.flatpickr-footer-custom {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-top: 1px solid #eee;
  background: #fdfdfd;
  border-radius: 0 0 12px 12px;
}

.flatpickr-footer-custom button {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-flatpickr-clear {
  color: #ef4444;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  gap: 5px;
}

.btn-flatpickr-clear:hover {
  background: #fef2f2 !important;
  color: #dc2626;
}

.btn-flatpickr-month {
  color: #c2410c; /* Laranja escuro */
  background: #fff7ed !important;
  margin: 0 5px;
  border-radius: 6px;
}

.btn-flatpickr-month:hover {
  background: #ffedd5 !important;
  color: #9a3412;
}

.btn-flatpickr-today {
  color: #2e7d32;
  background: #e8f5e9 !important;
  margin-left: auto;
  border-radius: 6px;
}

.btn-flatpickr-today:hover {
  background: #c8e6c9 !important;
  color: #1b5e20;
}

/* Corrigir cursor nos campos do Flatpickr em todas as variações */
.flatpickr-input,
.flatpickr-input.form-control,
.flatpickr-mobile,
input[readonly].flatpickr-input {
  cursor: pointer !important;
  background-color: white !important;
}

/* Container de Busca com expansão suave */
.search-container-animated {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #ddd;
  margin-bottom: 20px;
  transition: all 0.4s ease-in-out;
  overflow: hidden;
}

h2 {
  text-align: center;
  color: #333;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Antiga Header foi preservada para backup invisível caso scripts confiem na classe */
.user-header {
  display: none !important;
}

/* Nova Header Airy SaaS */
.user-header-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid #eaeaea;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

.user-header-modern:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0fdf4;
  color: #16a34a;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  border: 1px solid #dcfce7;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 700;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.2;
}

.user-unit {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}

.user-unit strong {
  color: #4b5563;
  font-weight: 600;
}

.btn-logout-modern {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  color: #ef4444;
  border: 1px solid #fee2e2;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-logout-modern:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  transform: translateY(-1px);
}

.btn-logout-modern:active {
  transform: translateY(0);
}

.menu-abas {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
  overflow: visible;
}

.btn-aba {
  flex: 1 1 auto;
  padding: 8px 10px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: bold;
  color: #757575;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 0.3s;
  white-space: nowrap;
  position: relative;
}

.btn-aba:hover {
  color: #2e7d32;
}

.btn-aba.ativa {
  color: #2e7d32;
  border-bottom: 3px solid #2e7d32;
  margin-bottom: -12px;
}

/* Dropdown Admin Menu */
.dropdown-admin {
  position: relative;
  display: none;
}

.dropdown-admin-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
  z-index: 10;
  border-radius: 6px;
  top: 100%;
  left: 0;
  margin-top: 5px;
  overflow: hidden;
  border: 1px solid #eee;
}

.dropdown-admin-content button {
  color: #555;
  padding: 12px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-weight: 500;
}

.dropdown-admin-content button:hover {
  background-color: #f4f7f6;
  color: #d84315;
}

.dropdown-admin.active .dropdown-admin-content {
  display: block;
}

.dropdown-admin .btn-aba.ativa {
  border-bottom: 3px solid #d84315;
  margin-bottom: -12px;
  color: #d84315;
}

.form-group {
  margin-bottom: 15px;
  text-align: left;
}

label {
  display: block;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 5px;
  color: #555;
}

input,
select {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
  background-color: white;
}

input[readonly].flatpickr-input,
input[readonly].flatpickr-mobile,
input[readonly]:not(.input-doador):not(.input-marca) {
  cursor: pointer !important;
  background-color: white !important;
}

input[readonly].input-doador,
input[readonly].input-marca {
  background-color: #f1f3f5;
  color: #495057;
  cursor: not-allowed;
  font-weight: bold;
}

button.btn-sucesso {
  width: 100%;
  padding: 12px;
  background-color: #2e7d32;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  margin-top: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

button.btn-sucesso:hover {
  background-color: #1b5e20;
}

button.btn-sucesso:disabled {
  background-color: #9e9e9e;
  cursor: not-allowed;
}

#msgLogin,
#mensagem {
  margin-top: 15px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  min-height: 20px;
}

.loading-db {
  font-size: 12px;
  color: #d84315;
  float: right;
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 4px;
}

.produto-chip {
  display: none;
  justify-content: space-between;
  align-items: center;
  background-color: #e3f2fd;
  color: #1976d2;
  padding: 10px 15px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.produto-chip-close {
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  color: #64b5f6;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.ui-autocomplete {
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mantém o padrão das tabelas, mas garante visibilidade na aba de produtos */
.tabela-container {
  width: 100%;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

#telaAdminProdutos .tabela-container {
  min-height: 300px;
  /* Garante que o espaço da tabela exista */
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
}

/* Ajuste das colunas especificamente para a aba de Produtos */
#telaAdminProdutos td:nth-child(2) {
  min-width: 250px;
}

/* Coluna Descrição */
#telaAdminProdutos td:nth-child(1) {
  min-width: 80px;
}

/* Coluna Referência */

.col-acao-fixa {
  position: sticky;
  right: 0;
  background-color: #fff;
  text-align: right;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.05);
}

th.col-acao-fixa {
  background-color: #f5f5f5;
  z-index: 3;
}

tbody tr:nth-child(even) td.col-acao-fixa {
  background-color: #f4f7f6;
}

tbody tr:hover td.col-acao-fixa {
  background-color: #e8f5e9;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

th,
td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle;
}

th {
  background-color: #f5f5f5;
  color: #333;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

td {
  min-width: 90px;
}

/* Cabeçalho Fixo no Relatório (Tela) - SOLUÇÃO FINAL */
#telaRelatorio #areaPrint {
  overflow: visible !important;
}

/* Novo Menu Orbital Admin */
.scene {
  position: relative;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  vertical-align: middle;
  margin-left: 10px;
}

.share-toggle {
  display: none;
}

.share-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
  color: #d84315;
}

.share-toggle:checked~.share-btn {
  background: #d84315;
  color: white;
  border-color: #bf360c;
  transform: scale(1.05);
}

.icon-close {
  display: none;
}

.share-toggle:checked~.share-btn .icon-share {
  display: none;
}

.share-toggle:checked~.share-btn .icon-close {
  display: block;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.social-node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: white;
  border: 1px solid #ddd;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  color: #555;
}

.share-toggle:checked~.orbit-ring {
  pointer-events: all;
}

.share-toggle:checked~.orbit-ring .social-node {
  opacity: 1;
}

/* Posições para 4 itens no quadrante Superior Direito (Raio expandido para mais espaço) */
.n1 {
  --tx: 0px;
  --ty: -95px;
}

/* Topo */
.n2 {
  --tx: 48px;
  --ty: -82px;
}

/* Diagonal superior */
.n3 {
  --tx: 82px;
  --ty: -48px;
}

/* Diagonal inferior */
.n4 {
  --tx: 95px;
  --ty: 0px;
}

/* Direita */

.share-toggle:checked~.orbit-ring .social-node {
  transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1);
}

.social-node:hover {
  background: #d84315;
  color: white;
  transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.1) !important;
}

.social-node::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  left: 46px;
  /* Padrão: Direita */
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 800;
  color: #333;
  text-shadow: 0 0 4px white, 0 0 4px white;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Exceção: Usuários (n1) aparece na esquerda */
.n1::after {
  left: auto;
  right: 46px;
}

.social-node:hover::after {
  opacity: 1;
}

.Btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition-duration: .3s;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
  background-color: rgb(255, 65, 65);
}

/* plus sign */
.sign {
  width: 100%;
  transition-duration: .3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sign svg {
  width: 14px;
}

.sign svg path {
  fill: white;
}

/* text */
.text {
  position: absolute;
  right: 0%;
  width: 0%;
  opacity: 0;
  color: white;
  font-size: 0.9em;
  font-weight: 600;
  transition-duration: .3s;
}

/* hover effect on button width */
.Btn:hover {
  width: 100px;
  border-radius: 40px;
  transition-duration: .3s;
}

.Btn:hover .sign {
  width: 30%;
  transition-duration: .3s;
  padding-left: 12px;
}

/* hover effect button's text */
.Btn:hover .text {
  opacity: 1;
  width: 70%;
  transition-duration: .3s;
  padding-right: 5px;
}

/* button click effect*/
.Btn:active {
  transform: translate(2px, 2px);
}

.print-btn {
  width: 130px;
  /* Ajustado levemente para caber o texto 'Imprimir' */
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border: 1px solid rgb(213, 213, 213);
  border-radius: 10px;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
  overflow: hidden;
  font-weight: 600;
  box-shadow: 0px 10px 10px rgba(0, 0, 0, 0.065);
  transition: all 0.3s;
  color: #333;
  margin-bottom: 20px;
}

.printer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 100%;
}

.printer-container {
  height: 50%;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.printer-container svg {
  width: 100%;
  height: auto;
  transform: translateY(4px);
}

.printer-page-wrapper {
  width: 100%;
  height: 50%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.printer-page {
  width: 70%;
  height: 10px;
  border: 1px solid black;
  background-color: white;
  transform: translateY(0px);
  transition: all 0.3s;
  transform-origin: top;
}

.print-btn:hover .printer-page {
  height: 16px;
  background-color: rgb(239, 239, 239);
}

.print-btn:hover {
  background-color: rgb(239, 239, 239);
  transform: translateY(-2px);
}

#telaRelatorio .tabela-container {
  max-height: 80vh !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  position: relative;
  background: white;
  border: 1px solid #e0e0e0;
}

/* Fixar a primeira linha (Título e Info) */
#telaRelatorio thead tr:first-child td {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: white !important;
  z-index: 100 !important;
  padding: 10px !important;
  border-bottom: 2px solid #333 !important;
}

/* Fixar a segunda linha (Nomes das Colunas) */
#telaRelatorio thead tr:nth-child(2) th {
  position: -webkit-sticky;
  position: sticky;
  top: 150px;
  /* Ajustado para a altura real do cabeçalho acima */
  background: #f5f5f5 !important;
  color: #333 !important;
  z-index: 90 !important;
  border-bottom: 2px solid #ccc !important;
  padding: 12px 10px !important;
}

/* Garantir que a tabela não quebre o sticky */
#telaRelatorio table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100%;
  table-layout: fixed;
  min-width: 1100px;
  /* Previne esmagamento grave em telas pequenas, gerando scroll lateral */
}

#telaRelatorio th,
#telaRelatorio td {
  word-wrap: break-word;
}

/* Ajuste fino para evitar que as bordas da tabela "vazarem" ao rolar */
#telaRelatorio thead th,
#telaRelatorio thead td {
  box-shadow: inset 0 -1px 0 #333;
  /* Mantém a borda visível ao rolar */
}

tbody tr:nth-child(even) {
  background-color: #f4f7f6;
}

/* Zebra striping original */
tbody tr:hover {
  background-color: #e8f5e9;
}

/* Hover verde claro original */

.tag-qtd {
  background-color: #e8f5e9;
  color: #2e7d32;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.loading-tabela {
  text-align: center;
  padding: 30px;
  color: #757575;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ==========================================
   ESTILIZAÇÃO DO RELATÓRIO (TELA)
   ========================================== */
.cabecalho-relatorio {
  background-color: transparent;
  padding: 10px 0;
  margin-bottom: 25px;
}

.cabecalho-relatorio h1 {
  margin: 0 0 15px 0;
  font-size: 22px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid #333;
  padding-bottom: 12px;
  color: #333;
}

.info-header-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-top: 5px;
}

.info-header-grid p {
  margin: 0;
  font-size: 15px;
  color: #333;
}

.info-header-grid strong {
  color: #000;
}

/* Esconder assinaturas na tela, só mostrar na impressão */
.assinaturas-container {
  display: none;
}

/* ==========================================
   CSS PARA IMPRESSÃO (RELATÓRIO)
   ========================================== */
@media print {
  @page {
    size: A4 landscape;
    margin: 5mm;
  }

  body {
    background-color: white;
    padding: 0;
    margin: 0;
    overflow: visible !important;
  }

  .container {
    box-shadow: none;
    max-width: 100% !important;
    padding: 0;
    margin: 0;
  }

  /* Ocultar elementos UI */
  .user-header,
  .user-header-modern,
  .menu-abas,
  h2,
  #telaFormulario,
  #telaHistorico,
  #telaAdmin,
  #loginContainer,
  #formRelatorioPrint,
  #btnImprimirContainer {
    display: none !important;
  }

  /* Mostrar apenas a tela de relatório */
  #mainContainer {
    display: block !important;
    overflow: visible !important;
  }

  #telaRelatorio {
    display: block !important;
    overflow: visible !important;
  }

  #telaRelatorio #areaPrint {
    display: block !important;
    overflow: visible !important;
  }

  /* Resetar a tabela para impressão */
  #telaRelatorio .tabela-container {
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
    position: static !important;
  }

  table {
    width: 100%;
    min-width: auto !important;
    border-collapse: collapse !important;
    margin-top: 20px;
    font-size: 11px;
    table-layout: fixed !important;
  }

  th,
  td {
    border: 1px solid #000 !important;
    padding: 4px 6px;
    color: #000;
    word-wrap: break-word;
  }

  tr.cabecalho-print-row td,
  tfoot td {
    border: none !important;
  }

  /* Remover bordas pretas nos blocos de agrupamento que herdaram do table td */
  th {
    background-color: #f0f0f0 !important;
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
    font-size: 10px;
  }

  /* Assinaturas */
  .assinaturas-container {
    margin-top: 50px;
    display: flex;
    justify-content: space-around;
    page-break-inside: avoid;
  }

  .linha-assinatura {
    border-top: 1px solid #000;
    width: 250px;
    text-align: center;
    padding-top: 5px;
    font-size: 12px;
  }

  /* Cabeçalho do relatório (Impressão) */
  .cabecalho-relatorio {
    border: none !important;
    padding: 10px 0;
    margin-bottom: 20px;
    border-radius: 0;
    box-shadow: none;
    background-color: white !important;
  }

  .cabecalho-relatorio h1 {
    font-size: 20px;
    border-bottom: none;
    color: #000;
  }

  .info-header-grid p {
    color: #000;
    font-size: 14px;
  }

  /* Resetar estilos sticky para impressão */
  #telaRelatorio thead tr:first-child td,
  #telaRelatorio thead tr:nth-child(2) th {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    background: white !important;
    box-shadow: none !important;
  }

  /* Repetir cabeçalho e rodapé da tabela em cada página */
  thead {
    display: table-header-group !important;
  }

  tfoot {
    display: table-footer-group;
  }
}

/* ==========================================
   MODAL GLOBAL ESTILIZADO (CENTRALIZAÇÃO GARANTIDA)
   ========================================== */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
  display: none;
  /* JS muda para flex */
  justify-content: center !important;
  align-items: center !important;
  z-index: 999999 !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  margin: 0 !important;
  padding: 20px !important;
  box-sizing: border-box !important;
}

.modal-container {
  background: #ffffff !important;
  width: 100% !important;
  max-width: 450px !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  animation: modalAnimIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  position: relative !important;
}

@keyframes modalAnimIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: 15px 20px !important;
  background-color: #f8f9fa !important;
  border-bottom: 1px solid #eee !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.modal-close {
  font-size: 24px;
  cursor: pointer;
  color: #999;
  line-height: 1;
}

.modal-body {
  padding: 25px 20px;
  text-align: center;
}

.modal-body p {
  margin: 0;
  font-size: 16px;
  color: #555;
  line-height: 1.5;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: center;
}

.modal-footer button {
  padding: 10px 25px;
  font-size: 14px;
  width: auto;
  margin-top: 0;
}

/* Tipos de Modal (Cores dos Ícones) */
.modal-type-error {
  color: #d32f2f;
}

.modal-type-success {
  color: #2e7d32;
}

.modal-type-warning {
  color: #f57c00;
}

.modal-type-info {
  color: #1976d2;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes stretchDown {
  from {
    transform: scaleY(0.4);
    transform-origin: top;
    opacity: 0;
  }

  to {
    transform: scaleY(1);
    transform-origin: top;
    opacity: 1;
  }
}

.anim-slide-down {
  animation: slideDown 0.4s ease-out forwards;
}

.anim-stretch-down {
  animation: stretchDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ==========================================
   LOADING ANIMATION (UIVERSE - TABLE SIZE)
   ========================================== */
.loading-card-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0;
  width: 100%;
}

.card-loader {
  width: 100%;
  background: #ffff;
  box-shadow: 0 1px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-loader-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  border-bottom: 1px solid #f9f9f9;
}

.card-loader-row:last-child {
  border-bottom: none;
}

.card_load {
  width: 30px;
  height: 30px;
  background: linear-gradient(120deg, #e5e5e5 30%, #f0f0f0 38%, #f0f0f0 40%, #e5e5e5 48%);
  border-radius: 50%;
  background-size: 200% 100%;
  animation: load89234 2s infinite;
  flex-shrink: 0;
}

.card_load_extreme_title {
  height: 20px;
  border-radius: 5px;
  background: linear-gradient(120deg, #e5e5e5 30%, #f0f0f0 38%, #f0f0f0 40%, #e5e5e5 48%);
  background-size: 200% 100%;
  animation: load89234 2s infinite;
  flex: 1;
}

.card_load_extreme_descripion {
  height: 20px;
  border-radius: 5px;
  background: linear-gradient(120deg, #e5e5e5 30%, #f0f0f0 38%, #f0f0f0 40%, #e5e5e5 48%);
  background-size: 200% 100%;
  animation: load89234 2s infinite;
  flex: 2;
}

@keyframes load89234 {
  100% {
    background-position: -100% 0;
  }
}