:root {
  --azul: #0038A8;
  --azulnoturno: #34495e;
  --vermelho: #e74c3c;
  --verde: #27ae60;
  --laranja: #f39c12;
  --cinza: #CCCCCC; /* #ecf0f1; */
  --grafite: #454747;
  --cinzaclaro: #F5F6FA;
  --amarelo: #F6DB17;
  --rosa: #ffebee; /* #FCE1EA; */
  --pink: #ff0084;
  --rosabebe: #f294a2;
  --amareloclaro: #F7F7C8;
  --verdeclaro: #DAF1CC;
  --verdeescuro: #006400;
  --azulclaro: #d7eff7; /* #CCE8F3 */
  
  --verde-claro: #e6f7ec;
  --amarelo-claro: #fff9e6;
  --rosa-claro: #fdeef0;
  --lilas-claro: #f4eef7;
  --bordo-borda: #8e44ad;
  --vermelho-claro: #fdeded;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


body {
  background:  var(--azulclaro) /*#f5f6fa*/;
  padding: 0; /* REMOVIDO padding: 20px */
}

/* Início do estilo para os menus do sistema */

/* ============================================= */
/* ▼▼▼ LAYOUT PRINCIPAL (Sidebar + Conteúdo) ▼▼▼ */
/* ============================================= */

/* Remove a barra superior móvel em telas grandes */
.mobile-top-bar {
    display: none; 
}

.app-container {
    display: flex;
    min-height: 100vh; 
    height: auto;
}


.sidebar-menu {
    width: 200px; 
    background: var(--azul);
    display: flex;
    flex-direction: column; 
    overflow-y: auto; 
    overflow-x: hidden;
    transition: transform 0.3s ease-in-out;
	z-index: 1000;
    flex-shrink: 0; 
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh; 
}


.sidebar-logo-container {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(246, 219, 23, 0.2); /* Amarelo com transparência */
}

.sidebar-logo-container .logo {
    max-height: 40px;
    margin-top: 0; /* Reseta o margin-top do logo original */
}

/*.content-container {
    flex: 1; 
    height: auto; 
    overflow-y: visible;
    padding: 0;
    background: var(--azulclaro);
    position: relative; 
}*/


/* (Substituir a regra do .content-container) */
.content-container {
    flex: 1; 
    height: auto; 
    overflow-y: visible; 
    padding: 0; 
    background: var(--azulclaro);
    position: relative; 
    
    /* ▼▼▼ ALTERAÇÃO PARA EMPURRAR O CONTEÚDO ▼▼▼ */
    margin-left: 200px; /* Adiciona um espaço à esquerda (largura do menu) */
}


.section {
    padding: 20px;
}

/* ============================================= */
/* ▼▼▼ ESTILOS DO MENU LATERAL (Sidebar) ▼▼▼ */
/* ============================================= */


.menu {
    display: flex;
    flex-direction: column; /* Vertical */
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    align-items: flex-start; /* Alinha à esquerda */
}

.menu > li {
    position: relative;
    width: 100%; /* Ocupa largura total da sidebar */
}

.menu li a {
    color: #F6DB17;
    text-decoration: none;
    font-weight: bold;
    padding: 7px 20px; /* Mais padding vertical */
    height: auto; /* Altura automática */
    width: 100%; /* Ocupa 100% do <li> */
    display: flex;
    align-items: center;
    transition: background 0.3s;
    box-sizing: border-box; 
	border-bottom: 1px solid rgba(246,219,23,0.1);
}

.menu li a:hover {
    background-color: #0048C8;
}


.menu > li > a.active {
    background-color: var(--amarelo);
    color: #002888; /* <-- Verifique se NÃO está escrito 'color: color: ...' */
    font-weight: bold;
    border-left: 5px solid var(--azul);
}

.menu > li > a.active:hover {
    background-color: #ffe066;
    color: #002888;
}


.has-submenu > a::after {
    content: '▼';
    font-size: 0.7em;
    margin-left: auto; /* Joga a seta para a direita */
    transition: transform 0.3s ease;
}

.has-submenu.open > a::after {
    transform: rotate(180deg); /* Gira a seta para cima */
}


.submenu {
    list-style: none;
    position: relative; /* Muda de 'absolute' para 'relative' */
    top: 0; /* Remove 'top: 100%' */
    left: 0;
    background-color: #002888; /* Cor mais escura para sub-itens */
    padding: 0;
    margin: 0;
    width: 100%; /* Ocupa 100% da sidebar */
    max-height: 0px; /* MANTÉM a lógica de max-height */
    overflow: hidden;
    transition: max-height 0.3s ease;
    /* Remove box-shadow e z-index desnecessários */
}

.submenu li a {
    padding: 7px 20px 7px 30px; /* Adiciona indentação à esquerda */
    height: auto;
    color: #FFF;
    border-bottom: 1px solid rgba(246,219,23,0.1);
    font-size: 12px;   /* <-- ALTERAÇÃO APLICADA AQUI */
    /*font-weight: normal;  <-- ALTERAÇÃO APLICADA AQUI (sobrescreve o 'bold' herdado) */
}

.submenu li:last-child a {
    border-bottom: none;
}

.submenu li a:hover {
    background-color: #0038A8;
}


.submenu li a.active {
    background-color: var(--amarelo); /* Fundo Amarelo */
    color: #002888;               /* Texto Azul Escuro */
    font-weight: bold;                /* Negrito */
    border-left: 5px solid #002888;      /* Detalhe visual na borda esquerda */
    padding-left: 26px;               /* Ajusta o padding para compensar a borda */
}


.submenu li a.active:hover {
    background-color: #ffe066; /* Um amarelo levemente diferente no hover */
    color: var(--azul);
}

.has-submenu.open > .submenu {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}


/* ============================================= */
/* ▼▼▼ ESTILOS DO MENU DE USUÁRIO (Sidebar) ▼▼▼ */
/* ============================================= */


.user-menu {
    position: relative;
    /*margin-top: auto;  EMPURRA PARA O FIM DA SIDEBAR (mágica do flex-column) */
    width: 100%;
    border-bottom: 1px solid rgba(246, 219, 23, 0.2);
}


.user-icon {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    padding: 15px; 
    gap: 10px;
    margin-top: 0; 
    margin-bottom: 0; 
    position: relative; /* (NOVO) Adicionado para a seta */
}


.user-icon::after {
    content: '▼';
    font-size: 0.7em;
    color: var(--amarelo); /* Cor da seta */
    margin-left: auto; /* Joga a seta para a direita */
    transition: transform 0.3s ease;
    /* (NOVO) Posição absoluta para garantir alinhamento */
    position: absolute;
    right: 20px;
    top: 70%;
    transform: translateY(-50%);
}


.user-menu.open .user-icon::after {
    transform: translateY(-50%) rotate(180deg);
}


.user-icon img {
    width: 35px;
    height: 35px;
    margin-bottom: 3px; /* Reseta margin-bottom */
}

/* --- ESTILOS PARA O NOVO MENU DE USUÁRIO --- */
.user-text-info {
  display: flex;
  flex-direction: column; /* Coloca o perfil abaixo do nome */
  align-items: flex-start; /* Alinha o texto à esquerda */
  color: white;
}

#user-name-display {
  font-weight: bold;
  font-size: 12px;
  margin-top: -5px;
}

#user-role-display {
  font-size: 12px;
  opacity: 0.8; /* Deixa o texto um pouco mais sutil */
  text-transform: capitalize; /* Deixa a primeira letra maiúscula (ex: Vendedor) */
}


.user-dropdown {
    display: block; /* Garante que está visível para a animação */
    position: relative; /* ALTERADO: de 'absolute' para 'relative' */
    /* REMOVIDO: bottom, top, left, right, box-shadow, z-index, border-radius */
    
    background: #002888; /* Fundo (como .submenu) */
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    overflow: hidden; /* MANTÉM overflow hidden */
    
    /* LÓGICA DO ACCORDION (como .submenu) */
    max-height: 0px; 
    transition: max-height 0.3s ease-out; /* 'ease-out' para desacelerar no final */
}


.user-menu.open > .user-dropdown {
    max-height: 120px; /* Altura suficiente para "Meu Perfil" e "Sair" */
}


.user-dropdown li {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-dropdown li:last-child {
  border-bottom: none;
}

.user-dropdown li a,
.user-dropdown li button {
  text-decoration: none;
  font-weight: bold;
  display: block;
  width: 100%;
  padding: 10px 15px;
  text-align: left; /* Alinhado à esquerda */
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.user-dropdown li a:hover,
.user-dropdown li button:hover {
  background: #0048C8;
}


.user-dropdown li a.active {
    background-color: var(--amarelo); /* Fundo Amarelo */
    color: #002888;                   /* Texto Azul Escuro */
    font-weight: bold;
    border-left: 5px solid var(--azul); /* Detalhe na borda esquerda */
}

.user-dropdown li a.active:hover {
    background-color: #ffe066;
    color: #002888;
}


.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  background: #f5f6fa;
  border-radius: 20px;
  padding: 5px 15px;
  border-color: var(--azul);
  border: 1px solid;
}

.search-bar input {
  border: none;
  background: none;
  padding: 5px 30px 5px 5px;
  width: 200px;
}

.search-bar img {
  position: absolute;
  right: 15px;
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.user-icon {
    cursor: pointer;
    display: flex;
    align-items: flex-end;  /* <-- ALTERAÇÃO: de 'center' para 'flex-end' */
    justify-content: flex-start; 
    padding: 10px 15px;     /* <-- ALTERAÇÃO: padding vertical reduzido para 10px */
    gap: 10px;
    margin-top: 0; 
    margin-bottom: 0; 
    position: relative;
}

.user-icon img {
  width: 24px;
  height: 24px;
}

/* Fim do estilo dos menus */


/* início do estilo da Sessão Usuários */
.users-section {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.users-section h2 {
  font-size: 20px;
  margin-bottom: 15px;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.users-table th, .users-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

.users-table th {
  background: #f4f4f4;
}

#register-user-section {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
  /*margin-top: 20px;*/
}

#register-user-section h2 {
  font-size: 20px;
  margin-bottom: 15px;
}

#register-user-section .form-group {
  margin-bottom: 12px;
}

#register-user-section label {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

#register-user-section .form-control {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.card-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.btn-x {
  position: absolute;
  right: 10px;
  top: 10px;
  background: red;
  color: white;
  border: none;
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
}
/* Fim do estilo da Sessão Usuários */


/* Ajuste no cabeçalho para alinhar os itens */
.header {
  gap: 10px; /* Espaço entre os elementos do cabeçalho */
  margin-bottom: 20px; /* Adiciona um espaço abaixo do cabeçalho */
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--azul);
  padding: 20px;
  margin-bottom: 0;
  margin-top: -20px;
}

.header h1 {
  margin: 0; /* Remove margens padrão do h1 para melhor alinhamento */
  flex-grow: 1; /* Permite que o título ocupe o espaço disponível */
  text-align: center; /* Centraliza o texto do título */
}

/* início do estilo dos campos de filtros */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--amareloclaro);
  padding: 15px 20px;
  border-radius: 0 0 8px 8px;
  margin-bottom: 20px;
	margin-top: -20px;
  border-top: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 10;
  color: var(--azul);
}

.filter-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-section label {
  color: var(--azul);
  font-weight: bold;
}

.filter-select {
  padding: 8px 12px;
  border-radius: 4px;
  background: white;
  color: var(--azul);
  font-weight: bold;
  cursor: pointer;
  min-width: 150px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--laranja);
  box-shadow: 0 0 0 2px rgba(246, 219, 23, 0.2);
}
/* Fim do estilo dos campos de filtros */


/* Início do estilo do Relatório */
.btn-report {
  background: var(--azul);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-report:hover {
  background: #002c85;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-report:active {
  transform: translateY(0);
}
/* Fim do estilo do Relatório */


/* Início do estilo do Financeiro */
.container {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  align-items: stretch; /* Make columns stretch to match tallest */
}

.column {
  flex: 1;
  background: white;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  min-width: 0;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2em;
  font-weight: bold;
  padding: 10px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--azul);
}

.total-value {
  font-size: 0.9em;
}

.card {
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.card-title {
  font-weight: bold;
  margin: 0;
}

.card-type {
  font-weight: bold;
}

.card-main-info {
  margin-bottom: 10px;
  text-align: center;
  font-weight: bold;
  font-size: 1.2em;
}

.card-details {
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.1);
  margin-bottom: 10px;
}

.card-details.hidden {
  display: none;
}

#atrasadas .card {
	background: var(--rosa); /* Light pink for overdue */
	border-right: 4px solid var(--vermelho);
	border-bottom: 2px solid var(--vermelho);
}

#pendentes .card {
	background: var(--amareloclaro); /* Very light yellow for pending - changed from light blue */
	border-right: 4px solid var(--laranja);
	border-bottom: 2px solid var(--laranja);
}

#pagas .card {
	background: var(--verdeclaro); /* Light green for paid - keeping existing */
	border-right: 4px solid var(--verde);
	border-bottom: 2px solid var(--verde);
}


/* --- Estilos para a Coluna e Cards "Arquivadas" --- */

.arquivadas-header {
  color: var(--grafite); /* Cinza escuro */
  border-bottom-color: var(--grafite);
}

#arquivadas .card {
  background: var(--cinza); /* Cinza claro (fundo) */
  border-right: 4px solid var(--grafite); /* Borda lateral cinza escura */
  border-bottom: 2px solid var(--grafite);
}

/* Remove o botão "Pagar" do card arquivado (se houver) */
#arquivadas .card .btn-pay {
  display: none;
}


.card-date {
  color: var(--laranja);
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 5px;
}

.vencimento-pago {
  text-decoration: line-through;
  opacity: 0.7;
  font-weight: normal;
}

.data-pagamento {
  font-weight: bold;
  color: var(--verde);
  font-size: 1.2em; /* Added this line to match column header size */
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  color: white;
  margin-bottom: 5px;
}

.status-pendente { background: var(--laranja); }
.status-paga { background: var(--verde); }
.status-atrasada { background: var(--vermelho); }

.status-ativo  { background: var(--verde); }
.status-pausado, .status-paralisada { background: var(--rosabebe); }
.status-inadimplente { background: var(--azulnoturno); }
.status-estorno   { background: var(--grafite); }
.status-cancelado, .status-cancelada { background: var(--vermelho); }

/* --- ESTILOS DINÂMICOS PARA O SELECT DE STATUS DO REPASSE --- */

.filter-select {
    transition: background-color 0.3s ease, color 0.3s ease; /* Efeito suave de transição */
}

.select-status-paga,
.select-status-recebida {
    background-color: var(--verde) !important;
    color: white !important;
    font-weight: bold !important;
    border-color: var(--verdeescuro) !important;
}

.select-status-paralisada {
    background-color: var(--rosabebe) !important;
    color: white !important;
    font-weight: bold !important;
    border-color: #d17a86 !important;
}

.select-status-cancelada {
    background-color: var(--vermelho) !important;
    color: white !important;
    font-weight: bold !important;
    border-color: #c0392b !important;
}

.select-status-estorno {
    background-color: var(--grafite) !important;
    color: white !important;
    font-weight: bold !important;
    border-color: #2c3e50 !important;
}

.select-status-pendente {
    background-color: var(--laranja) !important;
    color: white !important;
    font-weight: bold !important;
    border-color: #d35400 !important;
}

/* -------------------------- */


.card-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

/* Make sure buttons don't trigger card expansion */
.card-actions button {
  pointer-events: all;
}

.btn {
  padding: 5px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.3s;
}

.btn:hover {
  opacity: 0.9;
}

.btn-edit {
  background: var(--amarelo);
  color: var(--azul);
  font-weight: bold;
}

.btn-details {
  background: --cinzaclaro;
  color: black;
}

.btn-delete {
  background: var(--vermelho);
  color: white;
  font-weight: bold;
}

.btn-pay {
  background: var(--verde);
  color: white;
  font-weight: bold;
}

.btn-download {
  background: var(--azul);
  color: white;
  border: none;
  cursor: pointer;
  padding: 0px 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-download img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1); /* Make icon white */
}

.attachment-btn {
  background: var(--verde);
  border: none;
  cursor: pointer;
  padding: 0px 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attachment-btn img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1); /* Make icon white */
}
/* Fim do estilo do Financeiro */


/* ============================================= */
/* ▼▼▼ ESTILO UNIFICADO PARA TODOS OS MODAIS (CORRIGIDO) ▼▼▼ */
/* ============================================= */

/* O Fundo Escuro (Overlay) - Aplica-se a todos */
.modal, .calendarModal {
  display: none; /* Inicia oculto */
  position: fixed; /* Cobre a tela inteira */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Fundo escuro semitransparente */
  z-index: 1002 !important;
  backdrop-filter: blur(2px); /* Adiciona um leve desfoque ao fundo */
}

#modal-generico {
  z-index: 1003 !important;
}

#loading {
  z-index: 9999;
}

/* A Caixa de Conteúdo Centralizada - Aplica-se a todos */
.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* O truque para centralização perfeita */
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  width: 90%; /* Largura responsiva */
  max-width: 500px; /* Largura padrão para formulários */
}

/* Estilo específico para os modais de confirmação (menores e com texto centralizado) */
.modal-delete-content {
  max-width: 450px;
  text-align: center;
}

/* .modal_consorcio {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1002;
}

.modal_consorcio-content {
  background-color: #fff;
  margin: 5% auto; 
  padding: 20px;
  width: 90%;
  max-width: 1100px;
  border-radius: 8px;
}

.modal_consorcio-content h2 {
  text-align: center;
  margin-bottom: 15px;
}
 */


/* ======================================================== */
/* 🔹 CORREÇÃO DE SCROLL E CENTRALIZAÇÃO DO MODAL DE CONSÓRCIO */
/* ======================================================== */

/* 1. Ajuste no container principal do modal (Overlay) */
.modal_consorcio {
  display: none; /* Mantém o comportamento de toggle do JS */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1002;
  
  /* Removemos flex daqui para evitar conflito com o JS 'display: block' */
  padding: 0; 
  box-sizing: border-box;
}

/* 2. Ajuste na caixa branca do modal (Centralização + Estrutura) */
.modal_consorcio-content {
  background-color: #fff;
  width: 90%;
  max-width: 1100px;
  border-radius: 8px;
  
  /* --- LÓGICA DE CENTRALIZAÇÃO ABSOLUTA --- */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Centraliza perfeitamente nos eixos X e Y */
  margin: 0; /* Remove margens que poderiam deslocar */
  /* ---------------------------------------- */

  /* Lógica para travar altura e usar Flexbox interno */
  max-height: 90vh; /* Altura máxima de 90% da tela */
  display: flex;
  flex-direction: column; /* Organiza titulo, corpo e botões em coluna */
  padding: 0; /* Remove padding global para controlar internamente */
  overflow: hidden; /* Impede que a caixa principal crie barra de rolagem */
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Título fixo no topo */
.modal_consorcio-content h2 {
	  text-align: center;
    padding: 20px 20px 10px 20px;
    margin: 0;
    flex-shrink: 0; /* Impede o título de encolher */
    border-bottom: 1px solid #eee; 
    background-color: #fff; /* Garante fundo branco ao rolar */
}

/* O formulário ocupa todo o espaço restante e organiza seus filhos */
#consorcio-form {
    display: flex;
    flex-direction: column;
    flex: 1; /* Ocupa todo o espaço vertical disponível na caixa */
    overflow: hidden; /* Oculta transbordamento do container do form */
    padding: 0;
    margin: 0;
}

/* 3. A ÁREA DE ROLAGEM (Scrollbar interna) */
.modal-body-scroll {
    flex: 1; /* Ocupa todo o espaço disponível entre o título e o rodapé */
    overflow-y: auto; /* Habilita SCROLL apenas aqui */
    padding: 20px;
    
    /* Estilização da barra de rolagem (Firefox) */
    scrollbar-width: thin;
    scrollbar-color: var(--azul) #f1f1f1;
}

/* Estilo do scrollbar para Chrome/Safari/Edge */
.modal-body-scroll::-webkit-scrollbar {
    width: 8px;
}
.modal-body-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.modal-body-scroll::-webkit-scrollbar-thumb {
    background: var(--azul);
    border-radius: 4px;
}
.modal-body-scroll::-webkit-scrollbar-thumb:hover {
    background: #002888;
}

/* 4. RODAPÉ FIXO (Botões) */
.modal-footer {
    padding: 15px 20px;
    background-color: #f9f9f9; /* Destaque sutil para a área de ação */
    border-top: 1px solid #ddd;
    flex-shrink: 0; /* Garante que os botões nunca encolham ou sumam */
    margin-top: 0 !important; /* Sobrescreve margens globais */
    z-index: 10;
    display: flex;
    justify-content: flex-end; /* Alinha botões à direita */
    gap: 10px; /* Espaço entre os botões */
}

/* ======================================================== */


.modal-delete-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}


.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
  width: 100%;
}

.form-col-60 {
  flex: 0 0 60%;
}

.form-col-30 {
  flex: 0 0 30%;
}

.form-control {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

textarea.form-control {
  min-height: 60px;
  resize: vertical;
}

.form-control[type="date"] {
  height: 35px;
}

select.form-control {
  /*height: 35px;*/ 
}

/* Início do estilo do Calendário */
.atrasadas-header { color: var(--vermelho); }
.pendentes-header { color: var(--laranja); }
.pagas-header { color: var(--verde); }

.hidden {
  display: none;
}

.calendar-container {
  margin-top: 0;
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-header {
  display: none; /* Removed calendar title */
}

.calendar {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* Forces equal column widths */
}

.calendar th, .calendar td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

.calendar th {
  background: var(--azul);
  color: white;
}

.calendar td {
  height: 100px;
  vertical-align: top;
}

.calendar-date {
  font-weight: bold;
  margin-bottom: 5px;
}

.pagar-icon {
  width: 20px;
  height: 20px;
  margin-bottom: -4px;
}

.calendar-event {
    justify-content: space-between; /* Para que o ícone fique à direita */
  font-size: 0.8em;
  margin: 2px;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap; /* Prevents text wrapping */
  overflow: hidden; /* Hides overflow content */
  text-overflow: ellipsis; /* Shows ... for overflow text */
  display: block; /* Makes the event take full width of container */
  width: auto; /* Allows the event to fill container width */
  box-sizing: border-box; /* Includes padding in width calculation */
}

.calendar-event.atrasada { background: var(--vermelho); color: white; }
.calendar-event.pendente { background: var(--laranja); color: white; }
.calendar-event.paga { background: var(--verde); color: white; }

.calendar-event.birthday {
	background: var(--azulclaro);
	color: var(--azul);
	padding-left: 10px; /* Espaço para o ícone */
	font-weight: bold;
	cursor: default;
}

.birthday-icon {
  margin-bottom: -2px;
  width: 20px;
  height: 20px;
}

.birthday-title {
  display: flex;
  align-items: center; /* Centraliza verticalmente a imagem e o texto */
  gap: 10px; /* Espaçamento entre a imagem e o texto */
}

.urgent-accounts-title {
  display: flex;
  align-items: center; /* Centraliza verticalmente a imagem e o texto */
  gap: 10px; /* Espaçamento entre a imagem e o texto */
}

.urgent-icon {
  width: 40px;
  height: 40px;
}

.current-day {
  background: #CDDFEA;
}
/* Fim do estilo do Calendário */

.fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background:  var(--amarelo); /* var(--verde); */
  color: var(--azul); /* white; */
  border: none;
  font-size: 31px;
  padding: 5px 10px 10px 10px;  /* Changed from padding: 10px */
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 1000;
}

.fab:hover {
  transform: translateY(-2px); /* transform: scale(1.1); */
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); /* box-shadow: 0 3px 8px rgba(0,0,0,0.3); */
}

.fab:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Início do estilo Responsivo */
@media (max-width: 768px) {
	
  .calendarModal {
    width: 95%;
    max-width: 95%;
  }
    
    /* 1. Ajuste no Body e System-Section */
	body {
        padding-top: 60px; /* ALTERADO: Adiciona o padding SÓ no topo para o mobile */
    }

	#system-section {
        padding-top: 0; /* REMOVIDO: O padding foi movido para o body */
    }

    /* 2. Barra Superior Móvel */
    .mobile-top-bar {
        display: flex;
        align-items: center;
        gap: 15px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: var(--azul);
        padding: 0 15px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 1001; /* Acima da sidebar */
        box-sizing: border-box;
    }

    .mobile-menu-toggle {
        background: none;
        border: none;
        color: var(--amarelo);
        font-size: 24px;
        cursor: pointer;
        padding: 5px;
		-webkit-user-select: none; /* Safari */
		-moz-user-select: none;    /* Firefox */
		-ms-user-select: none;     /* IE10+/Edge */
		user-select: none;         /* Standard syntax */
    }

    .mobile-logo {
        height: 35px;
        width: auto;
    }

    /* 3. Container da Aplicação (Mobile) */
    .app-container {
        display: block; /* Remove o flex */
        height: 100%;
    }


	.sidebar-menu {
        position: fixed;
        top: 60px; /* SOBRESCRITA: Posição abaixo da barra móvel */
        left: 0;
        height: calc(100vh - 60px); /* SOBRESCRITA: Altura correta para mobile */
        transform: translateX(-100%); /* Mantém escondido */
        box-shadow: 4px 0 10px rgba(0,0,0,0.1);
		z-index: 10002;
    }
	

    .sidebar-menu.visible {
        transform: translateX(0); /* MOSTRA O MENU */
    }

	.content-container {
        width: 100%;
        height: 100%; 
        padding: 0; 
        box-sizing: border-box;
        margin-left: 0;
		margin-top: 60px; 
        min-width: 0;
	}

    /* 6. Logo da Sidebar (Mobile) */
    /* Esconde o logo de dentro da sidebar no mobile,
       já que ele está na barra superior */
    .sidebar-logo-container {
        display: none;
    }
	
	.container {
		flex-direction: column;
		gap: 10px;
	}

	.column {
		width: 100%;
		min-height: auto;
	}

	.header {
	  padding: 15px;
	  flex-wrap: wrap; /* 1. Permite que os itens quebrem a linha */
	  justify-content: space-between; /* 2. Mantém o alinhamento */
	  row-gap: 15px; /* 3. Adiciona espaço entre as linhas (botões e título) */
	}

	.header h1 {
		font-size: 1.2em;
	}

	/* 4. Corrige o seletor de H1 para H2 (que é o usado no HTML) e ajusta a ordem */
	.header h2#main-title {
	  font-size: 1.2em;
	  flex-basis: 50%; /* Deixa espaço para os botões de seta */
	  flex-grow: 1;     
	  text-align: center;
	  order: 4; /* [Botão < (3)] [Título (4)] [Botão > (5)] */
	  margin: 0; /* Remove margens do h2 */
	}
	
	/* 5. Faz os botões de Ação ocuparem a primeira linha */
	.header .btn-report {
	  order: 1;
	  flex-grow: 1; /* Faz o botão crescer para preencher o espaço */
	  margin-right: 10px; /* Adiciona um espaço entre os dois botões */
	  
	  /* Ajustes de tamanho para mobile */
	  font-size: 0.9em; /* Reduz a fonte */
	  height: 45px; /* Mantém a altura dos botões de navegação */
	  padding: 0 10px; /* Ajusta padding lateral */
	}

	.header .btn-add-account {
	  order: 2;
	  flex-grow: 1; /* Faz o botão crescer */
	  
	  /* Ajustes de tamanho para mobile */
	  font-size: 0.9em;
	  height: 45px;
	  padding: 0 10px;
	}

	/* 6. Define a ordem dos botões de navegação (segunda linha) */
	.header .nav-btn[onclick*="-1"] { /* Seta Esquerda */
	  order: 3;
	}

	.header .nav-btn[onclick*="1"] { /* Seta Direita */
	  order: 5;
	}

  .filter-bar {
    flex-direction: column;
    gap: 15px;
  }

  .filter-section {
    width: 100%;
  }

  .filter-select {
    flex-grow: 1;
  }

  .btn-report {
    width: 100%;
    justify-content: center;
	font-weight: bold;
  }

  .modal-content {
    width: 95%;
    margin: 20px auto;
    padding: 10px;
  }

  .form-row {
    flex-direction: column;
    gap: 10px;
  }

  .form-col-60,
  .form-col-30 {
    flex: 0 0 100%;
  }

  .calendar th,
  .calendar td {
    padding: 5px;
    font-size: 0.9em;
  }

  .calendar td {
    height: 80px;
  }

  .calendar-event {
    font-size: 0.7em;
  }

  .fab {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .modal-delete-buttons {
    flex-direction: column;
    gap: 5px;
  }

  .modal-delete-content {
    width: 95%;
    padding: 15px;
  }
  
  .section {
        padding: 10px;
   }
   

/* Em: style.css (DENTRO de @media (max-width: 768px)) */

/* Reorganiza a linha "Nome / CPF / Status"
*/
#cad_clientes .form-group:has(#client-name) > div[style*="display: flex"] {
    flex-wrap: wrap !important; /* Permite a quebra de linha */
    row-gap: 15px !important;   /* Espaço entre a linha do Nome e a linha do CPF/Status */
}
/* Faz "Nome Completo" (flex: 2) ocupar 100% da largura */
#cad_clientes .form-group:has(#client-name) > div[style*="display: flex"] > div[style*="flex: 2"] {
    flex-basis: 100% !important;
    order: 1 !important; /* Garante que venha primeiro */
}
/* Faz "CPF/CNPJ" (flex: 1) ocupar 50% */
#cad_clientes .form-group:has(#client-name) > div[style*="display: flex"] > div[style*="flex: 1"]:has(#client-cpf-cnpj) {
    flex-basis: calc(50% - 5px) !important;
    flex-grow: 1 !important;
    order: 2 !important; /* Segundo item */
}
/* Faz "Status" (flex: 1) ocupar 50% */
#cad_clientes .form-group:has(#client-name) > div[style*="display: flex"] > div[style*="flex: 1"]:has(#client-status-manual) {
    flex-basis: calc(50% - 5px) !important;
    flex-grow: 1 !important;
    order: 3 !important; /* Terceiro item */
}


/* Reorganiza a linha "Endereço / Cidade / Estado"
*/
#cad_clientes .form-group:has(#client-address) > div[style*="display: flex"] {
    flex-wrap: wrap !important; /* Permite a quebra de linha */
    row-gap: 15px !important;   /* Espaço entre a linha do Endereço e a linha Cidade/Estado */
}
/* Faz "Endereço" (flex: 3) ocupar 100% */
#cad_clientes .form-group:has(#client-address) > div[style*="display: flex"] > div[style*="flex: 3"] {
    flex-basis: 100% !important;
    order: 1 !important;
}
/* Faz "Cidade" (flex: 2) ocupar 50% */
#cad_clientes .form-group:has(#client-address) > div[style*="display: flex"] > div[style*="flex: 2"] {
    flex-basis: calc(50% - 5px) !important;
    flex-grow: 1 !important;
    order: 2 !important;
}
/* Faz "Estado" (flex: 1) ocupar 50% */
#cad_clientes .form-group:has(#client-address) > div[style*="display: flex"] > div[style*="flex: 1"] {
    flex-basis: calc(50% - 5px) !important;
    flex-grow: 1 !important;
    order: 3 !important;
}

/* Reorganiza a linha "Data de Aniversário / Email / Telefone / Whatsapp"
*/
#cad_clientes .form-group:has(#client-birthday) > div[style*="display: flex"] {
    flex-wrap: wrap !important; /* Permite quebrar linha */
    row-gap: 15px !important;   /* Espaço entre as linhas */
}
/* 1. Data de Aniversário (1º item) -> 100% */
#cad_clientes .form-group:has(#client-birthday) > div[style*="display: flex"] > div:nth-child(1) {
    flex-basis: 100% !important; /* Força 100% de largura */
    order: 1 !important;
}
/* 2. Email (2º item) -> 100% */
#cad_clientes .form-group:has(#client-birthday) > div[style*="display: flex"] > div:nth-child(2) {
    flex-basis: 100% !important; /* Força 100% de largura */
    flex: 1 1 100% !important;   /* Sobrescreve o 'flex: 2' inline */
    order: 2 !important;
}
/* 3. Telefone (3º item) -> 50% */
#cad_clientes .form-group:has(#client-birthday) > div[style*="display: flex"] > div:nth-child(3) {
    flex-basis: calc(50% - 5px) !important; /* Ocupa metade */
    flex-grow: 1 !important;
    order: 3 !important;
}
/* 4. Whatsapp (4º item) -> 50% */
#cad_clientes .form-group:has(#client-birthday) > div[style*="display: flex"] > div:nth-child(4) {
    flex-basis: calc(50% - 5px) !important; /* Ocupa metade */
    flex-grow: 1 !important;
    order: 4 !important;
}



/* Em: style.css (DENTRO de @media (max-width: 768px)) */

/* Reorganiza os botões "Adicionar / Salvar / Cancelar"
*/
#cad_clientes .form-group:has(#add-consorcio-btn) {
    display: flex !important;
    flex-wrap: wrap !important;      /* Permite a quebra de linha */
    justify-content: center !important; /* Centraliza a linha Salvar/Cancelar */
    gap: 15px; /* Espaço entre linhas E entre os botões lado a lado */
    margin-top: 30px !important;
}

/* 1. "Adicionar Consórcio" (Linha 1 - 100%) */
#cad_clientes .form-group:has(#add-consorcio-btn) > #add-consorcio-btn {
    flex-basis: 100% !important;     /* Largura total */
    max-width: 300px !important;
    margin: 0 !important;
    float: none !important;
    order: 1 !important;             /* Ordem 1 */
}

/* 2. "Salvar" (Linha 2, Esquerda) - Alvo pela classe .btn-pay */
#cad_clientes .form-group:has(#add-consorcio-btn) > .btn-pay {
    flex-basis: calc(50% - 7.5px) !important; /* 50% menos metade do 'gap' */
    flex-grow: 1 !important;
    max-width: 200px !important;      /* Limite para não ficar gigante */
    margin: 0 !important;
    float: none !important;
    order: 3 !important;             /* Ordem 2 (Salvar) */
}

/* 3. "Cancelar" (Linha 2, Direita) - Alvo pela classe .btn-cancel */
#cad_clientes .form-group:has(#add-consorcio-btn) > .btn-cancel {
    flex-basis: calc(50% - 7.5px) !important; /* 50% menos metade do 'gap' */
    flex-grow: 1 !important;
    max-width: 200px !important;
    margin: 0 !important;
    float: none !important;
    order: 2 !important;             /* Ordem 3 (Cancelar) */
    
    /* ▼▼▼ MUDANÇA DE COR (Conforme print) ▼▼▼ */
    background: var(--vermelho) !important; 
    color: white !important;
    /* ▲▲▲ FIM DA MUDANÇA DE COR ▲▲▲ */
}


/* 1. Linha "Nome / Email / Telefone / CPF"
      Torna todos os 4 itens 100% e empilhados
*/
#cad_usuarios .form-row-flex:has(#user-name) {
    flex-wrap: wrap !important;
    row-gap: 15px !important;
}
#cad_usuarios .form-row-flex:has(#user-name) > .form-group {
    flex-basis: 100% !important; /* Força 100% de largura */
    flex: 1 1 100% !important;   /* Sobrescreve 'flex: 2' e 'flex: 1' inline */
}


/* 2. Linha "Senha / Confirmar / Tipo / Tabela"
      Torna um grid 2x2
*/
#cad_usuarios .form-row-flex:has(#user-password) {
    flex-wrap: wrap !important;
    row-gap: 15px !important;
}
/* Senha (50%) */
#cad_usuarios .form-row-flex:has(#user-password) > .form-group:has(#user-password) {
    flex-basis: calc(50% - 10px) !important;
    flex-grow: 1 !important;
}
/* Confirmar Senha (50%) */
#cad_usuarios .form-row-flex:has(#user-password) > #confirm-password-group {
    flex-basis: calc(50% - 10px) !important;
    flex-grow: 1 !important;
}
/* Tipo Usuário (50%) */
#cad_usuarios .form-row-flex:has(#user-password) > #user-type-container {
    flex-basis: calc(50% - 10px) !important;
    flex-grow: 1 !important;
}
/* Tabela Comissão (50%) */
#cad_usuarios .form-row-flex:has(#user-password) > #user-tabela-container {
    flex-basis: calc(50% - 10px) !important;
    flex-grow: 1 !important;
}


/* 3. Linha "Endereço / Cidade-UF"
      Torna ambos 100% e empilhados
*/
#cad_usuarios .form-row-flex:has(#user-address) {
    flex-wrap: wrap !important;
    row-gap: 15px !important;
}
#cad_usuarios .form-row-flex:has(#user-address) > .form-group {
    flex-basis: 100% !important;
    flex: 1 1 100% !important;
}


/* 4. Linha "Dados Bancários / Observações"
      Torna ambos 100% e empilhados
*/
#cad_usuarios .form-row-flex:has(#user-dados-bancarios) {
    flex-wrap: wrap !important;
    row-gap: 15px !important;
}
#cad_usuarios .form-row-flex:has(#user-dados-bancarios) > .form-group {
    flex-basis: 100% !important;
    flex: 1 1 100% !important;
}

  
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .header h1 {
    font-size: 1em;
  }

  .card {
    padding: 10px;
  }

  .card-actions {
    flex-wrap: wrap;
  }

  .btn {
    flex: 1 1 auto;
    min-width: 80px;
  }
}

.tipo-total {
  text-align: right;
  font-weight: bold;
  font-size: 0.9em;
  background: #888;
  color: white;
  padding: 8px 15px;
  margin: 10px 0;
  border-radius: 4px;
}
/* Fim do estilo Responsivo */

.dashboard {
  /* padding: 20px; */
}

.dashboard-header {
  /*display: flex;*/
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.dashboard-actions {
  /*display: flex;*/
  gap: 15px;
  justify-content: flex-end; /* Adicionado para alinhar os botões à direita */
}

.btn-add-account {
  background:  var(--amarelo);
  color: var(--azul);
  font-weight: bold;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-add-client {
  background:  var(--amarelo);
  color: var(--azul);
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.btn-add-account:hover {
  background:  white;
}

.btn-add-client:hover {
  background:  white;
}

.dashboard-grid {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}

.dashboard-column {
  flex: 1;
  background: white;
  border-radius: 8px;
  padding: 15px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-column h2 {
  font-size: 1.2em;
  font-weight: bold;
  padding: 10px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--azul);
  color: var(--azul);
}

.urgent-account-item {
  background: var(--rosa);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-weight: bold;
}

.birthday-item {
  background: var(--azulclaro);
  border-radius: 8px;
  padding: 10.5px 15px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center; /**/
  font-weight: bold;
}

.birthday-item .whatsapp-btn {
  background: var(--verde);
  color: white;
  border: none;
  padding: 3px 16px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1em;
  font-weight: bold;
  text-decoration: none;
  width: 25px;
  height: 25px;
}

.birthday-item .whatsapp-btn img {
  margin-right: 5px;
}

.birthday-item .whatsapp-off {
  background: var(--cinza);
  color: var(--azul);
  border: none;
  padding: 3px 16px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1em;
  font-weight: bold;
  text-decoration: none;
}

.clients-section, .register-client-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  /*margin-bottom: 20px;*/
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.clients-section h2, .register-client-section h2 {
  margin-bottom: 15px;
  color: var(--azul);
}

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

.clients-table th, .clients-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.clients-table th {
  background: var(--azul);
  color: white;
}

.clients-table td {
  background: #f9f9f9;
}

.clients-table tr:hover td {
  background: var(--azulclaro); /*#f1f1f1;*/
}

.clients-table .action-btn {
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  margin: 2px;
}

.btn-cadastrar-cliente {
  background: var(--amarelo); /* Changed from var(--laranja) */
  color: var(--azul); /* Changed from white */
  font-weight: bold;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1em;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-cadastrar-cliente:hover {
  background: f7df2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.clients-table .btn-new-sale {
  background: var(--azul);
  font-weight: bold;
}

.clients-table .btn-edit {
  background: var(--amarelo);
  color: var(--azul);
  font-weight: bold;
}

.clients-table .btn-delete {
  background: var(--vermelho);
  font-weight: bold;
}

.clients-table .btn-detalhes {
  background: var(--verde);
  font-weight: bold;
}

.clients-table .btn-reset {
  background: var(--azul);
  color: white;
  font-weight: bold;
}

#client-form .form-group {
  margin-bottom: 15px;
}

#client-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

#client-form .form-control {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

#client-form .btn-pay {
  background: var(--verde);
  color: white;
  border: none;
  margin-top: 10px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1em;
  font-weight: bold;
}

.btn-cancel {
  background: var(--amarelo);
  color: var(--azul);
  border: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1em;
  margin-top: 10px;
  padding: 8px 16px;
  font-weight: bold;
}

#cad_clientes .btn-cancel {
    background: var(--vermelho) !important; 
    color: white !important;
}

label.required:after {
  content: "*";
  color: red;
  margin-left: 4px;
}

.checkbox-group ul {
  list-style-type: none; /* Remove o símbolo de ponto */
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Define 3 colunas iguais */
  gap: 10px; /* Espaçamento entre os itens */
}

.checkbox-group li {
  margin: 5px 0;
}

.checkbox-whats ul {
  list-style-type: none; /* Remove o símbolo de ponto */
  padding: 0;
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* Define 3 colunas iguais */
  gap: 10px; /* Espaçamento entre os itens */
}

.checkbox-whats li {
  margin: 40px 0;
}

#client-whatsapp-checkbox {
  transform: scale(1.2); /* Aumenta o tamanho do checkbox */
  margin-right: 10px; /* Ajusta o espaçamento */
}

.radio-group, .checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radio-group label, .checkbox-group label {
  font-weight: normal;
}

.radio-group input, .checkbox-group input {
  margin-right: 5px;
}

.produtos-interesse {
  margin-top: 10px;
}

#add-consorcio-btn {
  margin-top: 10px;
  background: var(--azul);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

#add-consorcio-btn.disabled {
  background-color: #d3d3d3; /* Cor de fundo cinza claro */
  cursor: not-allowed; /* Sinal de proibido */
  color: #808080; /* Cor do texto desativado */
}

.consorcio {
  border: 1px solid #ddd;
  padding: 10px;
  margin-top: 10px;
}

#clients-list td:nth-child(2),
#clients-list td:nth-child(3),
#clients-list td:nth-child(4) {
  text-align: center;
}

.btn-x {
	position: absolute;
	right: 20px;
	top: 5px;
	background: none;
	border: none;
	font-size: 30px;
	font-weight: bold;
	cursor: pointer;
}

.btn-x:hover {
  color: var(--vermelho);
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.pagination-controls button {
  background-color: var(--azul);
  color: white;
  border: none;
  padding: 8px 12px;
  margin: 0 5px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 5px;
}

.pagination-controls button[disabled] {
  background-color: #d1d1d1;
  cursor: not-allowed;
}

.pagination-controls .pagination-info {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6); /* Cor mais opaca para o texto da página */
  margin: 0 10px;
}

.btn-delete-consorcio {
  background: var(--vermelho);
  color: white;
  font-weight: bold;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-edit-consorcio {
  background: var(--amarelo);
  color: var(--azul);
  font-weight: bold;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 5px;
}

.btn-group {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center; /* Centraliza horizontalmente */
  min-height: 75px; /* Ajuste para a altura desejada */
}

#consorcios-list td {
  vertical-align: middle; /* Centraliza verticalmente o conteúdo da célula */
  text-align: center; /* Centraliza horizontalmente o conteúdo da célula */
}

/* Estilos para o switch */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--azul);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

#periodo-texto {
  margin-left: 10px;
  font-weight: bold;
  color: var(--azul);
}

.calendar-icon {
  cursor: pointer;
  font-size: 24px;
  margin-right: 10px;
  vertical-align: middle;
  transition: transform 0.2s ease-in-out;
}

.calendar-icon:hover {
  transform: scale(1.2);
}

/* Contêiner do calendário */
.calendar-container {
  max-height: 100vh; /* Impede que ultrapasse a tela */
  overflow-y: auto; /* Adiciona rolagem caso necessário */
}

/* Ícone "X" para fechar o modal */
.close-button {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  color: #333;
  transition: color 0.2s ease-in-out;
}

.close-button:hover {
  color: red;
}


button.sair {
    background: none;
    border: none;
    box-shadow: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    padding: 5px 10px;
}

button.sair:hover {
    text-decoration: none;
}

/* Esconde o sistema por padrão */
#system-section {
    padding: 0;
    min-height: 100vh; /* ALTERADO: de height para min-height */
    height: auto; /* Permite que o container cresça */
    display: none; 
    box-sizing: border-box; 
}

/* Sessão de login */
#login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    background: white;
    padding: 25px;
    width: 350px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: center;
}

.login-container h2 {
  color: #0963AE; /* Aplica a cor azul */
  text-align: center; /* Centraliza o texto */
  font-weight: bold; /* Deixa em negrito (opcional) */
}

input.login {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button.login {
    width: 100%;
    padding: 10px;
    background: #0963AE;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button.login:hover {
    background: #001f5b;
}

.remember-me {
    display: flex;
    align-items: center;
    justify-content: left;
    margin: 10px 0;
}

.remember-me input {
    width: auto;
    margin-right: 8px;
}

.error-message {
    color: red;
    font-size: 14px;
    display: none;
    margin-bottom: 10px;
}

.loading {
    display: none;
    margin-top: 10px;
}

.login-logo {
  display: block;
  margin: 0 auto; /* Centraliza a imagem */
  max-width: 200px; /* Ajusta o tamanho máximo */
  height: auto;
}

.logo {
  margin-top: 14px;
  max-height: 35px; /* Ajusta o tamanho máximo */
}



.form-inline {
  display: flex;
  align-items: center;
  gap: 10px; /* espaço entre elementos */
}

.form-inline label {
  margin: 0;
  white-space: nowrap; /* evita quebra de linha */
}

.form-inline .form-control {
  flex: 1; /* ocupa espaço proporcional */
  min-width: 100px;
}

/* Estilos para a tela de Meu Perfil */
.profile-details {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Duas colunas */
    gap: 15px;
    /*padding-top: 20px;
    border-top: 1px solid #eee;*/
}

.profile-details .detail-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--azul);
}

.profile-details .detail-item label {
    font-weight: bold;
    color: #555;
    font-size: 0.9em;
    display: block;
    margin-bottom: 5px;
}

.profile-details .detail-item p {
    font-size: 1.1em;
    color: #333;
    word-wrap: break-word;
}

.profile-details .full-width {
    grid-column: 1 / -1; /* Ocupa todas as colunas */
}

/* --- ESTILOS PARA O NOVO MENU DE USUÁRIO --- */
.user-text-info {
  display: flex;
  flex-direction: column; /* Coloca o perfil abaixo do nome */
  align-items: flex-start; /* Alinha o texto à esquerda */
  color: white;
}

#user-name-display {
  font-weight: bold;
  font-size: 12px;
  /*margin-top: -18px;*/
}

#user-role-display {
  font-size: 12px;
  opacity: 0.8; /* Deixa o texto um pouco mais sutil */
  text-transform: capitalize; /* Deixa a primeira letra maiúscula (ex: Vendedor) */
}

/* --- ESTILOS PARA A TELA DE NOVA VENDA --- */
.nova-venda-cliente-selecao {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.search-column {
    flex: 1;
    position: relative;
}

.selected-column {
    flex: 1;
}

.input-with-button {
    display: flex;
    gap: 10px;
}

.input-with-button input {
    flex-grow: 1; /* Faz o input ocupar o espaço disponível */
}

.search-results-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.search-result-item {
    padding: 10px;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: #f1f1f1;
}

.search-result-item.none {
    cursor: default;
    color: #888;
}

#add_vendas #search-cliente-venda {
    flex-basis: 70%;
}

#add_vendas .btn-cadastrar-cliente {
    flex-basis: 30%;
    white-space: nowrap;
}
/* --- FIM DO ESTILOS PARA A TELA DE NOVA VENDA --- */


/* --- ESTILO PARA LINHAS DE FORMULÁRIO FLEXÍVEIS --- */
.form-row-flex {
    display: flex;
    gap: 20px;
    margin-bottom: 15px; /* Espaçamento entre as linhas */
}

.form-row-flex .form-group {
    flex: 1; /* Faz com que cada grupo de formulário ocupe o mesmo espaço por padrão */
    margin-bottom: 0;
}



/* --- ESTILO PARA O AVISO NA TELA DE TABELA DE COMISSÃO --- */
#aviso-comissao-pai {
  background-color: var(--rosa); /* Fundo vermelho claro (definido nas variáveis :root) */
  border: 1px solid #e57373; /* Borda vermelha sutil */
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 25px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#aviso-comissao-pai h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #a02c2c;
  font-size: 1.1em;
}

#aviso-comissao-pai #limites-comissao-texto {
  margin-bottom: 15px;
  line-height: 1.6;
  font-style: italic;
  color: #333;
}

#aviso-comissao-pai .aviso-importante {
  margin-bottom: 0;
  font-size: 0.9em;
  color: #a02c2c; /* Vermelho mais escuro para o texto do aviso */
}





/* --- Estilo para inputs que simulam um select desabilitado --- */
input.form-control-disabled {
    background-color: #e9ecef; /* Cor de fundo cinza claro, padrão para campos desabilitados */
    opacity: 1; /* Garante que o texto seja legível */
    cursor: not-allowed; /* Mostra um cursor de "proibido" */
    color: #495057; /* Cor do texto */
}





/* --- ESTILOS PARA O DASHBOARD --- */

.dashboard-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
	border-left: 4px solid var(--azul);
}

.dashboard-card .card-icon img { width: 60px; height: 60px; }
.dashboard-card .card-content { display: flex; flex-direction: column; }
.dashboard-card .card-title { font-size: 14px; color: #555; margin-bottom: 5px; }
.dashboard-card .card-value { font-size: 22px; font-weight: 700; color: var(--azul); }

#meta-widget-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    /*border: 1px solid #e0e0e0;*/
    margin-bottom: 15px;
	border-left: 4px solid var(--azul);
}
#meta-widget-container h3 {
    color: var(--azul);
    text-align: center;
}

.meta-grid {
	flex: 1; /* Ocupa todo o espaço disponível */
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    /*gap: 20px;*/
	margin-top: -20px;
	padding-bottom: 10px;
}

.meta-widget {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.meta-chart-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 12px;
    color: #555;
}


.dashboard-grid-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 15px;
}

.dashboard-main-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
	border-left: 4px solid var(--azul);
}

.dashboard-main-widget h3 {
    color: var(--azul);
    /*border-bottom: 2px solid #f0f0f0;*/
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.recent-list { list-style: none; padding: 0; }
.recent-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 5px; border-bottom: 1px solid #f0f0f0; }
.recent-list li:last-child { border-bottom: none; }
.recent-list .item-name { font-weight: 500; }
.recent-list .item-detail { font-size: 13px; color: #888; background-color: #f5f5f5; padding: 3px 8px; border-radius: 6px; }

/* --- ESTILOS PARA A NOVA SEÇÃO DE METAS --- */

/* Ajusta o container de cada widget de meta para ter mais espaço vertical */
.meta-widget {
    position: relative;
    width: 160px; /* Um pouco mais de largura */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0px; /* Espaço entre o gráfico e o valor abaixo */
}

.meta-widget canvas {
    width: 180px !important; /* Tamanho fixo para o canvas */
    height: 180px !important;
}

/* Container do texto DENTRO do gráfico */
.meta-chart-label {
    position: absolute;
    top: 40%; /* Ajusta a posição vertical para o canvas */
    left: 50%;
    transform: translate(-50%, calc(-50% - 0px)); /* transform: translate(-50%, -50%); */
    text-align: center;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

/* CORREÇÃO DA FONTE: Estilo para a porcentagem (grande) */
.chart-percent {
    font-size: 24px;
    font-weight: 700;
    color: var(--azul);
}

/* CORREÇÃO DA FONTE: Estilo para o texto da meta (pequeno) */
.chart-text-label {
    font-size: 12px;
    color: #555;
    font-weight: 500;
}

/* NOVO ESTILO: Para o valor que fica ABAIXO do gráfico */
/* Container para o valor abaixo do gráfico */
.meta-widget-value {
    background-color: #f0f3f5;
    padding: 5px 10px;
    border-radius: 6px;
    text-align: center;
    line-height: 1.2; /* Ajusta o espaçamento entre as linhas */
}

/* Estilo para o rótulo "para vendas até" (pequeno e cinza) */
.meta-valor-label {
    display: block; /* Garante que o texto fique em uma linha separada */
    font-size: 11px;
    color: #555;
    font-weight: 500;
}

/* Estilo para o valor em R$ (maior e azul) */
.meta-valor-numero {
    display: block; /* Garante que o valor fique em uma linha separada */
    font-size: 16px;
    font-weight: bold;
    color: var(--azul); /* Usa a cor azul do seu sistema */
}



/* --- ESTILO PARA O CARD DE INFO DA TELA "MINHA META" --- */


#minha-meta-aviso #minha-meta-descricao-tabela {
  margin: 0;
  line-height: 1.6;
  color: #333; /* Texto padrão */
}



/* --- ESTILOS PARA O SWITCH TRIPLO (AGORA QUÁDRUPLO) DE RELATÓRIOS --- */
.report-type-switch {
  display: flex;/* --- Estilos para Mostrar/Ocultar Senha (Abordagem Flexbox) --- */
  flex-wrap: wrap; /* Permite que os itens quebrem para a próxima linha */
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--azul);
  margin-top: 10px;
}

/* Ajusta o container da opção Recebimentos para se comportar como os outros itens flex */
#report-option-recebimentos {
    flex: 1; /* Ocupa espaço como os outros */
    display: flex; /* Necessário para o label interno funcionar corretamente */
    min-width: 150px; /* Largura mínima opcional */
}


.report-type-switch input[type="radio"] {
  display: none; /* Esconde os botões rádio originais */
}

/* Estilo base para TODOS os labels dentro do switch */
.report-type-switch label {
  flex: 1; /* Faz os labels ocuparem espaço igual */
  padding: 12px 10px;
  text-align: center;
  font-weight: bold;
  color: var(--azul);
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border-left: 1px solid var(--azulclaro);
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE10+/Edge */
  user-select: none;         /* Standard syntax */
}

/* Remove a borda esquerda do PRIMEIRO label VISÍVEL */
.report-type-switch > input[type="radio"]:first-of-type + label, /* Primeiro label direto */
#report-option-recebimentos:first-child label { /* Label dentro do div, se for o primeiro elemento */
    border-left: none;
}
/* Caso o #report-option-recebimentos não seja o primeiro, mas o label dentro dele seja o primeiro visualmente após outros */
.report-type-switch > label + #report-option-recebimentos label {
    border-left: 1px solid var(--azulclaro); /* Garante borda se não for o primeiro */
}
/* Se houver labels *depois* do #report-option-recebimentos */
#report-option-recebimentos + label {
     border-left: 1px solid var(--azulclaro); /* Garante borda se vier depois */
}


/* --- CORREÇÃO HOVER: Aplica a todos os labels --- */
.report-type-switch label:hover {
  background-color: var(--azulclaro);
  margin-bottom: -1px; 
}

/* --- CORREÇÃO CHECKED: Usa '+' para irmãos diretos E :has() para o caso da DIV --- */
.report-type-switch input[type="radio"]:checked + label,
#report-option-recebimentos:has(> input[type="radio"]:checked) label {
  background-color: var(--azul); /* Cor de fundo quando selecionado */
  color: var(--amarelo); /* Cor do texto quando selecionado */
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: -1px; /* Ajuste para cobrir borda inferior */
  /* margin-top: -1px; */ /* Descomente se necessário para borda superior */
  position: relative; /* Ajuda a sobrepor a borda corretamente */
  z-index: 1; /* Garante que fique acima da borda */
}

/* --- CORREÇÃO HOVER + CHECKED: Combina as lógicas --- */
.report-type-switch input[type="radio"]:checked + label:hover,
#report-option-recebimentos:has(> input[type="radio"]:checked) label:hover {
  background-color: #0048C8; /* Tom de azul um pouco mais claro no hover */
}



/* ============================================= */
/* ▼▼▼ ESTILOS DOS RELATÓRIOS GERADOS ▼▼▼ */
/* ============================================= */

/* Garante fundo branco para o corpo do relatório */
body.report-body {
    background-color: white !important; /* Força fundo branco */
    padding-top: 70px; /* Mantém espaço para controles */
    /* Herda font-family, margin, line-height do body geral ou defina aqui se necessário */
    font-family: Arial, sans-serif;
    margin: 20px;
    line-height: 1.5;
}

/* Estilos gerais do corpo e títulos do relatório (Ajuste para usar .report-body) */
.report-body h1,
.report-body h2,
.report-body h3 {
     color: #333;
     margin-bottom: 10px;
}
.report-body h1 {
     text-align: center;
     font-size: 1.8em;
     color: var(--azul);
}
.report-body h2 {
    font-size: 1.5em;
    color: var(--azul);
    border-bottom: 2px solid var(--azul);
    padding-bottom: 5px;
}
.report-body h3 { font-size: 1.2em; }

/* Tabela do relatório (Ajuste para usar .report-body) */
.report-body table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 9pt;
}
.report-body th,
.report-body td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: left;
}
.report-body th {
    background: var(--azul); /* Cabeçalho azul */
	color: white;
    text-align: center;
    font-weight: bold;
}
.report-body tfoot td {
    font-weight: bold;
    background: #f9f9f9;
    text-align: right;
}

/* Quebra de página */
.report-body .page-break {
    page-break-before: always;
    border-top: 2px dashed #ccc;
    margin-top: 10px;
    padding-top: 10px;
}

/* Controles fixos (Voltar/Imprimir) */
.controls { /* Este estilo já pode existir, apenas garanta que esteja correto */
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: #f5f5f5; z-index: 1000;
    padding: 10px 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    box-sizing: border-box; display: flex; justify-content: space-between;
}
.print-btn { /* Pode já existir */
    padding: 10px 20px; background: var(--azul); color: white;
    border: none; border-radius: 5px; cursor: pointer; font-weight: bold;
}
.control-btn { /* Pode já existir */
    padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer;
    background: #F6DB17; color: #0038A8; font-weight: bold !important;
    font-family: 'Arial', sans-serif;
}

/* Grid e Cards de Resumo */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.summary-card {
    background: #f9f9f9; border: 1px solid #ddd; padding: 15px;
    border-radius: 5px; border-left: 4px solid var(--azul);
}
.summary-card .title { font-size: 0.9em; color: #555; font-weight: bold; }
.summary-card .value { font-size: 1.5em; font-weight: bold; color: var(--azul); margin-top: 5px; display: block; }
.summary-card .value-total { font-size: 1.1em; font-weight: bold; display: block; margin-top: 8px; border-top: 1px solid #eee; padding-top: 8px; }

/* Estilos dos Cards de Status */

.summary-card.status-ativo { background: var(--verde-claro); border-left: 5px solid var(--verde); }
.summary-card.status-ativo .title, .summary-card.status-ativo .value, .summary-card.status-ativo .value-total { color: var(--verde-escuro, #1e7e34); }
.summary-card.status-pausado { background: var(--rosa-claro); border-left: 5px solid var(--pink); }
.summary-card.status-pausado .title, .summary-card.status-pausado .value, .summary-card.status-pausado .value-total { color: var(--pink); }
.summary-card.status-inadimplente { background: #eaf1f4; border-left: 5px solid var(--azulnoturno); } 
.summary-card.status-inadimplente .title, .summary-card.status-inadimplente .value, .summary-card.status-inadimplente .value-total { color: var(--azulnoturno, #2c3e50); }
.summary-card.status-cancelado { background: var(--vermelho-claro); border-left: 5px solid var(--vermelho); } 
.summary-card.status-cancelado .title, .summary-card.status-cancelado .value, .summary-card.status-cancelado .value-total { color: var(--vermelho, #c0392b); }

.summary-card.status-paga, .summary-card.status-ativo { background: var(--verde-claro); border-left-color: var(--verde); }
.summary-card.status-paga .title, .summary-card.status-paga .value, .summary-card.status-paga .value-total,
.summary-card.status-ativo .title, .summary-card.status-ativo .value, .summary-card.status-ativo .value-total { color: var(--verde-escuro, #1e7e34); }

.summary-card.status-pendente { background: var(--amarelo-claro); border-left-color: var(--laranja); }
.summary-card.status-pendente .title, .summary-card.status-pendente .value, .summary-card.status-pendente .value-total { color: var(--laranja, #d35400); }

.summary-card.status-paralisada, .summary-card.status-pausado { background: var(--rosa-claro); border-left-color: var(--pink); }
.summary-card.status-paralisada .title, .summary-card.status-paralisada .value, .summary-card.status-paralisada .value-total,
.summary-card.status-pausado .title, .summary-card.status-pausado .value, .summary-card.status-pausado .value-total { color: var(--pink); }

.summary-card.status-cancelada, .summary-card.status-cancelado { background: var(--vermelho-claro); border-left-color: var(--vermelho); } /* Usando vermelho para cancelado */
.summary-card.status-cancelada .title, .summary-card.status-cancelada .value, .summary-card.status-cancelada .value-total,
.summary-card.status-cancelado .title, .summary-card.status-cancelado .value, .summary-card.status-cancelado .value-total { color: var(--vermelho, #c0392b); }

.summary-card.status-estornada { background: var(--lilas-claro); border-left: 5px solid #8e44ad; } /*border-left-color: var(--vermelho); }  Mantendo vermelho */
.summary-card.status-estornada .title, .summary-card.status-estornada .value, .summary-card.status-estornada .value-total { color: #8e44ad; } /* { color: var(--vermelho, #c0392b); } */

.summary-card.status-inadimplente { background: #eaf1f4; border-left-color: var(--azulnoturno); }
.summary-card.status-inadimplente .title, .summary-card.status-inadimplente .value, .summary-card.status-inadimplente .value-total { color: var(--azulnoturno, #2c3e50); }

/* Detalhes do Usuário (se aplicável) */
.user-details {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin: 20px 0;
    background: #f9f9f9; border: 1px solid #ddd; padding: 15px; border-radius: 5px;
}
.user-details div { font-size: 1.1em; }
.user-details strong { color: var(--azul); }

/* Rodapé com Total e Dados Bancários (se aplicável) */
.report-footer-container { display: flex; justify-content: space-between; gap: 20px; margin-top: 15px; page-break-inside: avoid; }
.total-repasse-user { flex: 1; text-align: right; font-size: 1.2em; font-weight: bold; padding: 15px; border-radius: 5px; background: #f0f3f5; border: 1px solid #ccc; border-top: 2px solid var(--azul); }
.dados-bancarios { flex: 1; margin-top: 0; background: #fff8e1; border: 1px solid #ffe082; padding: 15px; border-radius: 5px; white-space: pre-wrap; font-size: 0.9em; }
.dados-bancarios h4 { margin-top: 0; margin-bottom: 5px; }
.dados-bancarios p { margin: 0; }

/* Estilos de Células de Status */
td.status-pendente { font-weight: bold; color: var(--laranja); background: var(--amarelo-claro); }
td.status-paga, td.status-ativo { font-weight: bold; color: var(--verde); background: var(--verde-claro); }
td.status-paralisada, td.status-pausado { color: var(--pink);  background: var(--rosa-claro); }
td.status-cancelada, td.status-cancelado { color: var(--vermelho, #c0392b); background: var(--vermelho-claro); } 
td.status-estorno { color: var(--bordo-borda); background: var(--lilas-claro); }
td.status-inadimplente { font-weight: bold; color: var(--azulnoturno); background: #eaf1f4; }


/* Status da Esteira de Vendas (Clientes) */
.status-lead {font-weight: bold; color: #2381F3 } /* Azul Claro */
.status-em-contato {font-weight: bold; color: #15E24D } 
.status-reunião-agendada {font-weight: bold; color: var(--azul) } /* Verde Água #1abc9c;*/
.status-proposta-gerada {font-weight: bold; color: var(--verdeescuro); } /* Azul Escuro */
.status-negociação {font-weight: bold; color: var(--laranja); } /* Laranja */
.status-não-fechou {font-weight: bold; color: var(--grafite); } /* Grafite */

/* Status de Venda/Consórcio (Clientes) */
.status-venda-realizada {font-weight: bold; color: var(--verde); } /* Verde (Ativo) */
.status-consórcio-pausado {font-weight: bold; color: var(--pink); } /* Rosa (Pausado) */
.status-consórcio-inadimplente {font-weight: bold; color: var(--bordo-borda); } /* Azul Escuro (Inadimplente) */
.status-consórcio-cancelado {font-weight: bold; color: var(--vermelho); } /* Vermelho (Cancelado) */
.status-consorcio-pendente { 
    background: var(--amareloclaro); 
    color: var(--azul); 
    border: 1px solid var(--laranja); 
    font-weight: bold;
}



/* Em: style.css */
/* (ADICIONAR ESTE BLOCO NOVO) */

/* Estilo padrão para as opções DENTRO do dropdown (fundo branco, texto preto) */
.filter-select option {
    background: #ffffff;
    color: #000000;
    font-weight: normal;
}

/* Estilo para as opções coloridas (quando não estão em foco no dropdown) */
/* Isso força a cor de fundo e do texto que você já definiu para os selects */
.filter-select option.select-status-paga,
.filter-select option.select-status-recebida {
    background-color: var(--verde);
    color: white;
    font-weight: bold;
}

.filter-select option.select-status-paralisada {
    background-color: var(--rosabebe);
    color: white;
    font-weight: bold;
}

.filter-select option.select-status-cancelada {
    background-color: var(--vermelho);
    color: white;
    font-weight: bold;
}

.filter-select option.select-status-estorno {
    background-color: var(--grafite);
    color: white;
    font-weight: bold;
}

.filter-select option.select-status-pendente {
    background-color: var(--laranja);
    color: white;
    font-weight: bold;
}

/* Estilo para a opção "Receb. Parcial" (para consistência) */
.filter-select option.select-status-parcial {
    background: var(--verdeescuro);
    color: white;
    font-weight: bold;
}

/* Estilo para a opção que está ATUALMENTE SELECIONADA quando o dropdown está ABERTO */
/* Isso sobrepõe o azul/cinza padrão do sistema operacional */
.filter-select option:checked {
    background: var(--azul);
    color: var(--amarelo);
}


/* Estilos de Impressão */
@media print {
    @page {
        margin-top: 20px;
        margin-bottom: 20px;
        margin-left: 10px;
        margin-right: 10px;
    }
    body.report-body { 
        background-color: white !important; 
        padding-top: 0; 
    }
    .controls { display: none; }
    .report-body h1, .report-body h2, .report-body h3 { color: #000; }
    .page-break { border-top: none; }
    .dados-bancarios { background: #eee !important; }
    .total-repasse-user { background: #eee !important; border-color: #ccc; }
    .summary-card { page-break-inside: avoid; }
}

/* ============================================= */
/* ▲▲▲ FIM ESTILOS DOS RELATÓRIOS GERADOS ▲▲▲ */
/* ============================================= */



/* Estilo para o link "Esqueci minha senha" */
.forgot-password-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--azul);
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

.forgot-password-link:hover {
    text-decoration: underline;
    color: #002c85;
}


/* =================================================== */
/* --- ESTILOS UNIFICADOS PARA MOSTRAR/OCULTAR SENHA --- */
/* =================================================== */

/* --- 1. Para a TELA DE LOGIN (que usa .password-container) --- */
.password-container {
  display: flex;
  align-items: center;
  position: relative;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: white;
  width: 100%;
  margin: 10px 0;
}

/* Input DENTRO do container de login (sem borda, com padding) */
.password-container input.login {
  flex-grow: 1;
  border: none;
  outline: none;
  /* Adiciona padding extra à direita para o cursor não piscar sobre o ícone */
  padding: 10px 45px 10px 10px; 
  margin: 0;
  background-color: transparent;
}

/* Ícone DENTRO do .password-container (Login) - usa Flexbox */
.password-container .toggle-password {
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  margin-right: 10px; /* Espaçamento do ícone para a borda */
  flex-shrink: 0;
  background-image: url('Imagens/nao_ver.png');
  user-select: none;
  /* Remove position:absolute, top, right, transform daqui */
}

/* Olho aberto DENTRO do .password-container (Login) */
.password-container .toggle-password.visible {
  background-image: url('Imagens/ver.png');
}


/* --- 2. Para MODAIS e FORMS DE RESET (sem .password-container) --- */

/* Regra para inputs .login (Reset/Primeiro Acesso) que SÃO alvos */
input.login.password-toggle-target {
    padding-right: 40px; /* Adiciona espaço para o ícone absoluto */
    box-sizing: border-box;
}
/* Regra para inputs .form-control (Modal Alterar Senha) que SÃO alvos */
input.form-control.password-toggle-target {
    padding-right: 40px; /* Adiciona espaço para o ícone absoluto */
    box-sizing: border-box;
}

/* Ícone FORA do .password-container (usa Posição Absoluta) */
/* Esta regra é para o span que está em um div com position: relative */
.toggle-password {
  position: absolute;
  right: 10px; /* Posição padrão */
  top: 50%;    /* Centralização padrão */
  transform: translateY(-50%);
  cursor: pointer;
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  user-select: none;
  background-image: url('Imagens/nao_ver.png');
  z-index: 2;
}

/* Olho aberto FORA do .password-container */
.toggle-password.visible {
  background-image: url('Imagens/ver.png');
}

/* Ajuste de posição vertical para os inputs .form-control (Modal Alterar Senha) */
/* que têm um <label> em cima, empurrando o centro para baixo */
.form-group .toggle-password {
    top: 70%; /* Ajuste vertical para campos com label */
}

/* Ajuste de posição vertical para inputs .login (Reset/Primeiro Acesso) */
/* que não têm label, mantendo o centro */
input.login.password-toggle-target + .toggle-password {
    top: 50%;
}

/* --- FIM DOS ESTILOS DE SENHA --- */





/* ============================================= */
/* ▼▼▼ CABEÇALHO DA PROPOSTA PÚBLICA ▼▼▼ */
/* ============================================= */

.public-proposal-header {
    display: flex;                 
    justify-content: space-between; 
    align-items: center;           
    padding: 15px 20px;
    background-color: var(--azul);     /* ALTERAÇÃO: Fundo azul */
    border-bottom: 1px solid var(--amarelo); /* ALTERAÇÃO: Borda amarela */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin: -20px -20px 20px -20px; 
}

.public-proposal-header .public-logo {
    height: 40px; 
    width: auto;
    /* ALTERAÇÃO: Usa o logo principal (branco/amarelo) */
    content: url('Imagens/Logos JPDigital.png'); 
}

.public-proposal-header .public-login-btn {
    background-color: var(--amarelo); /* ALTERAÇÃO: Fundo amarelo */
    color: var(--azul);              /* ALTERAÇÃO: Texto azul */
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s;
}

.public-proposal-header .public-login-btn:hover {
    background-color: #f7e04f; /* ALTERAÇÃO: Amarelo mais claro no hover */
}

/* ============================================= */


/* Estilos ESPECÍFICOS para os botões de navegação (< e >) por CLASSE */
.header .nav-btn {
  background: var(--amarelo);
  color: var(--azul);
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: bold;
  padding-bottom: 8px;
  flex-shrink: 0; /* Impede que esses botões encolham */
}
.header .nav-btn:hover {
	background: #f7e04f; /* Amarelo mais claro */
}


/* Estilo para o botão de navegação (>) QUANDO estiver desabilitado */
.header .nav-btn:disabled {
  background: #ccc; /* Fundo cinza */
  color: #888; /* Texto cinza escuro */
  cursor: not-allowed; /* Cursor de "bloqueado" */
  opacity: 0.7; /* Efeito "desbotado" */
}

/* Garante que o efeito hover não se aplique ao botão desabilitado */
.header .nav-btn:disabled:hover {
  background: #ccc; /* Mantém o fundo cinza */
  transform: none; /* Remove qualquer efeito de 'translate' */
}


/* Estilo ESPECÍFICO para o botão "Adicionar Conta" por CLASSE */
.header .btn-add-account {
  background-color: var(--verde);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
  flex-shrink: 0;
  height: 45px; /* Adicionado para igualar a altura dos .nav-btn */
  box-sizing: border-box; /* Adicionado para padding não estragar a altura */
}

.header .btn-add-account:hover {
  background: var(--verdeescuro);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Estilo ESPECÍFICO para o botão "Gerar Relatório" DENTRO DO HEADER */
.header .btn-report {
  /* Puxa o estilo original do .btn-report (linha 478) */
  background: var(--azul);
  color: white;
  border: none;
  padding: 10px 15px; /* Padding original do Adicionar Conta */
  border-radius: 5px; /* Raio original do Adicionar Conta */
  cursor: pointer;
  font-size: 1.2em; /* Fonte original do Adicionar Conta */
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  flex-shrink: 0;
  height: 45px; /* Adicionado para igualar a altura */
  box-sizing: border-box; /* Adicionado para padding não estragar a altura */
}

.header .btn-report:hover {
  background: #002c85;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* ============================================= */
/* ▼▼▼ OVERLAY DE CARREGAMENTO DO SISTEMA ▼▼▼ */
/* ============================================= */

#system-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff; /* Fundo branco limpo */
    z-index: 99999; /* Acima de tudo, inclusive modais e menus */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#system-loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

#system-loading-overlay img {
    width: 80px; /* Ajuste conforme o tamanho do seu gif */
    height: auto;
}

#system-loading-overlay p {
    margin-top: 20px;
    font-family: 'Segoe UI', sans-serif;
    color: var(--azul);
    font-weight: bold;
    font-size: 1.2em;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* ============================================= */



 #gerador-de-propostas-section body{
    background-color:#003399;
    color:#fff;
    font-family:Arial,sans-serif;
    margin:0;
    padding:0
  }

 #gerador-de-propostas-section header{
    background-color:#002266;
    padding:15px; 
    text-align:center
  }

 #gerador-de-propostas-section header h1{
    font-size:24px
  }

#gerador-de-propostas-section  form{
    background-color:#f0f4f8;
    border-radius:10px;
    padding:20px
  }

 #gerador-de-propostas-section .container{
    padding:20px;
    max-width:600px;
    margin:auto
  }

 #gerador-de-propostas-section .form-group{
    margin-bottom:15px
  }
  
 #gerador-de-propostas-section #totaisProposta .form-group {
  margin-bottom: 0px; 
  }
  
 #gerador-de-propostas-section #grupo-extra .form-group {
  margin-bottom: 5px; 
  }

 #gerador-de-propostas-section .form-group label{
    display:block;
    font-weight:700;
    margin-bottom:5px;
    color:#05c
  }
  
 #gerador-de-propostas-section .form-group input,  .form-group select, .form-group 
  textarea{
    padding:10px;
    width:100%;
    max-width:100%;
    margin-bottom:5px;
    border:1px solid #003399;
    border-radius:5px;
    box-sizing:border-box
  }
  
 #gerador-de-propostas-section .form-group 
  input[type=checkbox]{
    width:auto
  }
  
 #gerador-de-propostas-section .form-row{
    display:flex;
    justify-content:space-between
  }
  
 #gerador-de-propostas-section .form-row .form-group{
    flex:1;
    margin-right:10px
  }
  
 #gerador-de-propostas-section .form-row .form-group:last-child{
    margin-right:0
  }
  
 #gerador-de-propostas-section .form-row .form-group
    input{
      max-width:100%
    }
  
  #gerador-de-propostas-section  button{
      background-color:#05c;
      color:#fff;
      padding:10px 20px;
      border:none;
      border-radius:5px;
      cursor:pointer;
      display:block;
      margin:0 auto;
      width: 100%
    }
  
 #gerador-de-propostas-section button:hover{
    background-color:#003399
  }

 #gerador-de-propostas-section .hidden{
    display:none
  }
  
 #gerador-de-propostas-section .result{
    margin-top: 20px;
    background-color:#fff;
    padding:10px;
    border-radius:10px;
    color:#05c
  }
  
 #gerador-de-propostas-section h2{
    color:#05c
  }
  
 #gerador-de-propostas-section .add-seller-btn{
    background-color:#008000;
    color:#fff;
    border:none;
    border-radius:5px;
    cursor:pointer;
    padding:10px 20px;
    font-size:14px;
    width:100%;/**/
    margin-top:0px
  }

 #gerador-de-propostas-section .add-seller-btn:hover{
    background-color:#006414
  }
  
 #gerador-de-propostas-section .add-seller-btn.delete{
    background-color:#e91c05
  }
  
#gerador-de-propostas-section .add-seller-btn.delete:hover{
    background-color:#970700
  }

#gerador-de-propostas-section .seller-list{
    background:#fff;
    color:#000;
    max-height:200px;
    overflow-y:auto;
    list-style-type:none;
    padding:0
  }

#gerador-de-propostas-section .seller-list li{
    padding:10px;cursor:pointer
  }

#gerador-de-propostas-section .seller-list li:hover{
    background:#eee
  }

#gerador-de-propostas-section #shareProposal{
    background-color:#008000;
   } 

#gerador-de-propostas-section #shareProposal:hover{
    background-color:#006414
  }

#gerador-de-propostas-section #proposalResult {
    font-size: 14px; /* Define o tamanho padrão do texto */
    line-height: 1.5; /* Opcional: melhora a legibilidade */
    background: none; /* Garante que nenhum fundo seja aplicado */
}

#gerador-de-propostas-section button#editProposal, button#shareProposal {
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#gerador-de-propostas-section button#shareProposal {
  font-weight: bold;
}


#gerador-de-propostas-section #downloadProposal {
    background-color: #FF9F0A;         /* amarelo ouro #FFD700;  background-color:#05c; */
  color:#fff;
  padding: 10px;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#gerador-de-propostas-section #downloadProposal:hover {
  background-color: #FF8E08;        /* laranja escuro #DE5819;  background-color:#003399 */
}

#gerador-de-propostas-section #downloadProposal img {
  width: 20px;
  height: 20px;
}


  
#gerador-de-propostas-section .buttons-row .form-group {
    flex: 1; /* Faz com que os botões ocupem o mesmo espaço */
}

#gerador-de-propostas-section .buttons-row {
    display: flex;
    justify-content: space-between; /* Distribui os botões ao longo da linha */
    align-items: center; /* Alinha os itens verticalmente no centro */
    gap: 10px; /* Espaçamento entre os botões */
}

#gerador-de-propostas-section .buttons-row .form-group {
    margin: 0; /* Remove margens extras para garantir alinhamento */
}

#gerador-de-propostas-section .buttons-row .form-group button {
    width: 100%; /* Faz o botão ocupar toda a largura da coluna */
    padding: 10px; /* Define um espaçamento interno para o botão, se necessário */
    box-sizing: border-box; /* Inclui o padding dentro do tamanho do botão */
}

#gerador-de-propostas-section label[for]:has(+ input:required)::after {
    content: ' *'; /* Adiciona o asterisco */
    color: red;    /* Define a cor vermelha */
    font-weight: bold; /* Negrito opcional */
}

#gerador-de-propostas-section label.required::after {
    content: ' *';
    color: red;
    font-weight: bold;
}


#gerador-de-propostas-section #addGroupBtn {
  background-color: #008000;   /* verde escuro */
  color: white;                /* texto e ícone brancos */
  border: none;
  border-radius: 5px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  margin: 10px 0;
  width: 100%;                 /* largura de 30% */
  text-align: center;         /* centraliza o texto dentro do botão */
  display: block;             /* garante comportamento de bloco */
  margin-left: 0;             /* alinha o botão à esquerda */
}

#gerador-de-propostas-section #addGroupBtn:hover {
  background-color: #006414;  /* verde ainda mais escuro no hover */
}

#gerador-de-propostas-section .remove-group-btn {
  background-color: #e91c05;
  font-weight: bold; /* Negrito opcional */
  color: white;
  border: none;
  border-radius: 20%;
  width: 20px;
  height: 38px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
  margin-bottom: 5px;
  margin-right: 70px;
}

#gerador-de-propostas-section .remove-group-btn:hover {
  background-color: #b00000;
}

#gerador-de-propostas-section .form-row.parcela-com-botao .form-group {
  flex: 0 0 38%;
  margin-bottom: 0px;
}

#gerador-de-propostas-section .form-row.parcela-com-botao .form-group.botao-excluir {
  flex: 0 0 24%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

#gerador-de-propostas-section .page-break {
  display: block;
  height: 1px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  page-break-before: always;
  break-before: page;
}



/* ======================================================== */
/* ▼▼▼ CORREÇÃO LAYOUT PROPOSTA (PREVIEW E PDF) v2 ▼▼▼ */
/* ======================================================== */

/* Aplica as regras de margem/bloco tanto ao preview (#proposalResult) 
  quanto ao container de geração do PDF (#proposaltoPDF) para
  anular o reset global do style.css.
*/
#gerador-de-propostas-section #proposalResult p,
#gerador-de-propostas-section #proposaltoPDF p,
#gerador-de-propostas-section #proposalResult h4,
#gerador-de-propostas-section #proposaltoPDF h4,
#gerador-de-propostas-section #proposalResult div,
#gerador-de-propostas-section #proposaltoPDF div {
    display: block; /* Garante que não fiquem na mesma linha */
    margin: 0;      
    padding: 0;
    /* Adiciona um espaçamento padrão entre os parágrafos */
    margin-bottom: 10px; 
    line-height: 1.4; /* Melhora a leitura */
}

/* Estilo específico para o Título (PROPOSTA DE CONSÓRCIO) */
#gerador-de-propostas-section #proposalResult h4,
#gerador-de-propostas-section #proposaltoPDF h4 {
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Restaura o espaçamento da linha horizontal (hr) */
#gerador-de-propostas-section #proposalResult hr,
#gerador-de-propostas-section #proposaltoPDF hr {
    display: block;
    height: 1px;
    margin: 15px 0;
    border: 0;
    border-top: 1px solid #ccc; /* Linha fina cinza */
    background-color: transparent;
}

/* Ajustes finos (aplicando a ambos).
  Nota: #proposaltoPDF > div se refere às 'pagina1'/'pagina2' dinâmicas.
*/
#gerador-de-propostas-section #proposalResult > div:first-child,
#gerador-de-propostas-section #proposaltoPDF > div > div:first-child { /* O div da data */
     margin-bottom: 0;
}
#gerador-de-propostas-section #proposalResult > h4:first-of-type,
#gerador-de-propostas-section #proposaltoPDF h4:first-of-type {
     margin-top: 5px;
}
#gerador-de-propostas-section #proposalResult > p:last-of-type,
#gerador-de-propostas-section #proposaltoPDF p:last-of-type { /* O parágrafo final do Consultor/Obs */
     margin-bottom: 0;
}

/* Garante que os divs internos (como o da data) não tenham margem de parágrafo */
#gerador-de-propostas-section #proposaltoPDF div {
    margin-bottom: 0;
}

/* ============================================= */


/* ======================================================== */
/* ▼▼▼ CORREÇÃO DROPDOWN (DISPLAY E Z-INDEX) ▼▼▼ */
/* ======================================================== */

/* 1. Define o 'position: relative' e um 'z-index' para o container do formulário.
     Isso garante que o formulário crie um contexto de empilhamento 
     e que seus filhos (como o dropdown) possam ficar "acima" dele.
*/
#gerador-de-propostas-section form {
    position: relative;
    z-index: 1; 
}

/* 2. Sobrescreve a regra 'display: none' do style.css.
     Usamos '#gerador-de-propostas-section .search-results-dropdown' 
     para ser MAIS específico que a regra global '.search-results-dropdown'.
*/
#gerador-de-propostas-section .search-results-dropdown {
    /* Herda o z-index: 100 do style.css, o que é ótimo */
    
    /* Força 'display: none' quando a classe .hidden ESTIVER presente */
    display: none; 
}

/* 3. A Mágica: Quando o JS remover a classe .hidden, esta regra
     (que é mais específica) será aplicada, forçando o bloco a aparecer.
*/
#gerador-de-propostas-section .search-results-dropdown:not(.hidden) {
    display: block; 
}


/* ============================================= */
/* ▼▼▼ ESTILOS PARA CHECKBOX COMO SWITCH ▼▼▼ */
/* ============================================= */

/* Container para alinhar switch e texto */
#gerador-de-propostas-section .form-group-switch {
    display: flex;
    align-items: center;
    gap: 15px; /* Espaço entre o switch e o texto */
    margin-bottom: 15px; /* Mantém o espaçamento original do .form-group */
}

/* O texto (label) ao lado do switch */
#gerador-de-propostas-section .form-group-switch .switch-label {
    /* Remove o 'display: block' e 'margin-bottom: 5px' da regra geral de label */
    display: inline;
    margin-bottom: 0;
    font-weight: 700;
    color: #05c;
    cursor: pointer; /* Faz o texto também ser clicável */
}

/* Oculta o input original dentro do switch (reforça a regra do style.css) */
#gerador-de-propostas-section .form-group-switch .switch input[type=checkbox] {
    opacity: 0;
    width: 0;
    height: 0;
    margin-bottom: 0; /* Sobrescreve a regra de margin-bottom: 5px do .form-group input */
    padding: 0; /* Sobrescreve a regra de padding: 10px */
    border: none; /* Sobrescreve a regra de border */
}

/* Garante que o .switch (que é um <label>) não pegue estilos de label de texto */
#gerador-de-propostas-section .form-group-switch label.switch {
    margin-bottom: 0;
}

/* -------------------------------------------------------- */



/* Estilos AgroEasy */
.badge-agro {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
    color: white;
}
.badge-agro-finalizado { background-color: var(--verde); }
.badge-agro-parcial { background-color: var(--laranja); }
.badge-agro-aguardando { background-color: var(--cinza); color: #555; }

.btn-plus-parcela {
    background: var(--verde);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    margin-left: 8px;
    font-weight: bold;
    line-height: 1;
}
.btn-plus-parcela:hover { background: var(--verdeescuro); }

.agro-alert-row {
    background-color: #fff3e0; /* Laranja bem claro para alerta */
    border-left: 4px solid #d32f2f;
}

.doc-item-view {
    padding: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.doc-item-view a { text-decoration: none; font-weight: bold; }
.doc-item-view button { padding: 2px 8px; font-size: 0.8em; }


/* -------------------------------------------------------- */



