<style>
  body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f4f7f6; padding: 15px 0; margin: 0; display:flex; justify-content:center; }
  .container-app { width: 100%; max-width: 450px; margin: 0 auto; padding: 0 15px; box-sizing: border-box; }
  .card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); margin-bottom: 15px; box-sizing: border-box; width:100%;}
  
  .dash-card { background: linear-gradient(135deg, #4CAF50, #2E7D32); color:white; text-align: center; padding: 25px 15px; border-radius: 16px;}
  .dash-title { margin: 0; font-size: 14px; text-transform: uppercase; font-weight: 600; opacity: 0.9;}
  .dash-value { font-size: 36px; font-weight: bold; margin: 5px 0 0 0; }

  .menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 15px; }
  .menu-btn { background: white; border: none; border-radius: 12px; padding: 20px 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: 0.2s;}
  .menu-btn:active { background: #f0f0f0; transform: scale(0.98);}
  .menu-icon { font-size: 28px; margin-bottom: 8px; }
  .menu-text { font-size: 13px; font-weight: 600; color: #455a64; }

  #tela-loading { text-align: center; margin-top: 50px; }
  .loader { border: 4px solid #f3f3f3; border-top: 4px solid #4CAF50; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 20px auto; }
  @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
  
  label { font-weight: 600; display: block; margin-top: 15px; color: #37474f; font-size: 13px;}
  input, select, textarea { 
  width: 100%; 
  padding: 8px; /* Reduzido de 12 para 8 */
  margin-top: 5px; 
  border: 1px solid #cfd8dc; 
  border-radius: 8px; 
  box-sizing: border-box; 
  font-size: 14px; /* Ajustado de 15 para 14 */
  background-color: #f8fafc;
    }
  border-radius: 8px; box-sizing: border-box; font-size: 15px; background-color: #f8fafc;}
  
  .btn-primario { background-color: #4CAF50; color: white; border: none; padding: 15px; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; width: 100%; margin-top: 20px; }
  .btn-voltar { background-color: transparent; color: #78909c; border: 1px solid #cfd8dc; padding: 12px; border-radius: 8px; font-size: 14px; font-weight: bold; cursor: pointer; width: 100%; margin-top: 15px; }
  
  .header-app { display: flex; align-items: center; margin-bottom: 20px; border-bottom: 2px solid #eee; padding-bottom: 10px;}
  .header-app h2 { margin: 0; font-size: 18px; flex: 1; text-align: center; color: #333;}
  .btn-voltar-topo { background: none; border: none; font-size: 20px; color: #666; cursor: pointer; padding: 0 10px 0 0; }

  .filtros-box { background: #f0f8ff; padding: 15px; border-radius: 8px; margin-bottom: 15px; border: 1px solid #90caf9; }
  .grid-filtros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.item-pendente { 
  background: #fff; 
  border-left: 4px solid #ff9800; 
  padding: 6px 12px; /* Reduzido de 15 para 6 em cima/baixo */
  margin-bottom: 6px; /* Reduzido de 12 para 6 */
  border-radius: 8px; 
  box-shadow: 0 2px 5px rgba(0,0,0,0.06); 
}

  .acoes-card { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; border-top: 1px solid #eee; padding-top: 10px; }

/* Ajuste extra para os botões não esticarem a altura do card */
.btn-acao {
  border: none;
  padding: 6px 10px; /* Reduzi levemente o tamanho dos botões */
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

  .btn-baixa { background-color: #4CAF50; color: white; }
  .btn-editar { background-color: #ffb300; color: white; }
  .btn-excluir { background-color: #e53935; color: white; }

  /* ESTILO DAS ABAS */
  .tabs-nav { display: flex; background: #eceff1; border-radius: 10px; padding: 5px; margin-bottom: 20px; }
  .tab-btn { flex: 1; border: none; background: none; padding: 10px; border-radius: 8px; font-weight: bold; color: #546e7a; cursor: pointer; transition: 0.3s; font-size: 13px;}
  .tab-btn.active { background: white; color: #2E7D32; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
  .tab-content { display: none; }
  .tab-content.active { display: block; }

/* Regra para alinhar nome na esquerda e botões na direita */
.item-config-flex {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 10px;
}

/* Garante que os botões fiquem sempre juntos na direita */
.item-config-flex div:last-child {
  display: flex;
  gap: 5px;
  flex-shrink: 0; /* Impede que os botões "esmaguem" no celular */
}

/* Ajustes para o filtro ficar compacto no celular */
.filtros-box label {
  margin-top: 5px;
  font-size: 11px;
  color: #1a237e;
}

.filtros-box select, .filtros-box input {
  padding: 8px;
  font-size: 13px;
  margin-top: 2px;
}

.grid-filtros {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Estilo do Toast (Notificação) */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 400px;
}

.toast {
  background: #323232;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideUp 0.3s ease, fadeOut 0.5s ease 2.5s forwards;
}

.toast.sucesso { background: #2e7d32; border-left: 5px solid #1b5e20; }
.toast.erro { background: #c62828; border-left: 5px solid #8e0000; }

@keyframes slideUp {
  from { bottom: -50px; opacity: 0; }
  to { bottom: 20px; opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}


/* Container de Stats no topo do Relatório */
.relatorio-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  flex: 1;
  background: white;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid #f3e5f5;
}

.stat-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  color: #7b1fa2;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-card strong {
  font-size: 16px;
  color: #4a148c;
}

/* Melhorando os cards da lista */
.item-relatorio {
  background: white;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border-left: 4px solid #9c27b0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.stat-card {
  flex: 1;
  background: #ffffff;
  padding: 15px 10px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Sombra suave */
  border: 1px solid #f0f0f0;
  transition: transform 0.2s;
}

.stat-card:active {
  transform: scale(0.98); /* Efeito de clique */
}

/* Estilo do Modal LGPD */
.modal-lgpd {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fff;
  width: 90%;
  max-width: 450px;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  animation: subirModal 0.3s ease-out;
}

@keyframes subirModal {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
</style>
