/* =====================================================
   custom.css — Estilos globais do Propondo
   Importe APÓS material-dashboard.css em todas as views
   ===================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css");
@import url("https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css");
@import url("https://cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css");

/* Fonte global — Inter */
body,
html,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span:not(.material-icons):not(.material-icons-round):not(
    .material-icons-outlined
  ),
a,
label,
input,
select,
textarea,
button,
td,
th,
li,
div,
small,
strong,
em,
b,
legend,
option,
.form-control,
.form-select,
.btn,
.badge,
.dropdown-item,
.nav-link,
.modal-title,
.card-title,
.card-text,
.alert,
.table {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif !important;
}

/* Impede scroll horizontal causado pelo Select2 dropdown */
html,
body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* --------------------------------------------------
   Cards — sem sombra globalmente
   -------------------------------------------------- */
.card,
.card.shadow,
.card.shadow-sm,
.card.shadow-lg {
  box-shadow: none !important;
}

/* --------------------------------------------------
   Tabs — padrão global underline clean (.leads-tabs)
   -------------------------------------------------- */

.leads-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1.5px solid #e5e9e4;
  margin-bottom: 0 !important;
  padding: 6px 0 0;
  background: transparent;
}

.leads-tabs .nav-item {
  margin-bottom: -1.5px;
}

.leads-tabs .nav-link {
  background: transparent !important;
  border: 1.5px solid #e5e9e4 !important;
  border-bottom: none !important;
  border-radius: 6px 6px 0 0 !important;
  color: #9aa0a6 !important;
  font-weight: 500 !important;
  font-size: 0.8rem !important;
  padding: 8px 16px 9px !important;
  box-shadow: none !important;
  transition:
    color 0.15s,
    border-color 0.15s !important;
  white-space: nowrap;
}

.leads-tabs .nav-link i {
  font-size: 0.78rem;
  vertical-align: middle;
  margin-right: 5px;
}

.leads-tabs .nav-link:hover {
  color: #5a6b53 !important;
  border-color: #5a6b53 !important;
  background: transparent !important;
  opacity: 1 !important;
}

.leads-tabs .nav-link.active {
  color: #5a6b53 !important;
  border-color: #5a6b53 !important;
  border-bottom: 1.5px solid #fff !important;
  font-weight: 700 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Card colado abaixo das abas sem raio no topo */
.leads-tab-content {
  margin-top: 0;
}

.leads-tab-card {
  border-radius: 0 0 8px 8px !important;
  border: 1.5px solid #e5e9e4 !important;
  border-top: 1.5px solid #e5e9e4 !important;
  box-shadow: none !important;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .leads-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}

/* --------------------------------------------------
   DataTables — tema clean Propondo
   -------------------------------------------------- */

/* Wrapper geral */
.dataTables_wrapper {
  font-size: 0.72rem;
  color: #495057;
}

/* Carregando das tabelas que buscam no servidor: o mesmo padrão do overlay
   de navegação da sidebar (fundo claro translúcido, spinner oliva, rótulo
   "Carregando..."). Substitui a caixinha com bolinhas azuis do DataTables.
   O seletor leva .card porque o CSS do DataTables carrega depois deste. */
div.dataTables_wrapper div.dataTables_processing.card {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  background: rgba(244, 246, 243, 0.85);
  z-index: 5;
}

/* As quatro bolinhas animadas do DataTables. */
div.dataTables_wrapper div.dataTables_processing.card > div:last-child:not(.dt-carregando) {
  display: none;
}

.dt-carregando {
  height: 100%;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.dt-carregando .spinner-border {
  width: 2.25rem;
  height: 2.25rem;
  color: #5a6b53;
  border-width: 3px;
}

.dt-carregando-texto {
  font-family: Inter, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #5a6b53;
  letter-spacing: 0.04em;
}

/* Cabeçalho */
table.dataTable thead th,
table.dataTable thead td {
  /* background: #fafafa !important; */
  color: #b0b8c1 !important;
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  border-bottom: 1px solid #f0f2f0 !important;
  border-top: none !important;
  padding: 6px 12px !important;
  white-space: nowrap;
}

/* Fix: linha dupla no cabeçalho com scrollX ativo.
   O DataTables cria um segundo <thead> dentro de .dataTables_scrollBody
   para calcular larguras de coluna — esse cabeçalho precisa ter borda zero. */
.dataTables_scrollBody table.dataTable thead th,
.dataTables_scrollBody table.dataTable thead td {
  border-top: 0 !important;
  border-bottom: 0 !important;
}

/* Ícones de ordenação */
table.dataTable thead .sorting:after,
table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
  opacity: 0.3;
  font-size: 0.6rem;
}

table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
  opacity: 0.8;
  color: #5a6b53;
}

/* Células */
table.dataTable tbody td,
table.dataTable tbody td.sorting_1 {
  border-bottom: 1px solid #f2f4f7 !important;
  border-top: none !important;
  padding: 6px 12px !important;
  vertical-align: middle !important;
  font-size: 0.72rem !important;
  line-height: 1.4 !important;
}

/* Células de ação — inline-flex para respeitar vertical-align:middle do td */
table.dataTable tbody td > .d-flex {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

table.dataTable tbody td > .d-flex.justify-content-center {
  justify-content: center !important;
}

/* Badges dentro de células — mesma altura dos .btn-action (26px) */
table.dataTable tbody td .badge,
table.dataTable tbody td span.badge,
table.dataTable tbody td .badge.bg-success,
table.dataTable tbody td .badge.bg-warning,
table.dataTable tbody td .badge.bg-danger,
table.dataTable tbody td .badge.bg-info,
table.dataTable tbody td .badge.bg-gradient-success,
table.dataTable tbody td .badge.bg-gradient-warning {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  padding: 0 8px !important;
  font-size: 0.65rem !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  border-radius: 4px !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

/* Badges globais (fora de tabelas também) */
.badge {
  font-size: 0.65rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

/* Controla todo conteúdo interno das células */
table.dataTable tbody td p,
table.dataTable tbody td span,
table.dataTable tbody td a,
table.dataTable tbody td small,
table.dataTable tbody td .text-sm,
table.dataTable tbody td .text-xs {
  font-size: 0.72rem !important;
  margin-bottom: 0 !important;
  line-height: 1.4 !important;
}

/* Cabeçalho — neutraliza classes Material Dashboard */
table.dataTable thead th {
  padding: 7px 12px !important;
}

/* Sem zebra */
table.dataTable.table-striped tbody tr:nth-of-type(odd),
table.dataTable.table-striped tbody tr:nth-of-type(even),
table.dataTable tbody tr,
table.dataTable tbody tr:nth-of-type(odd),
table.dataTable tbody tr:nth-of-type(even),
table.dataTable tbody tr:nth-of-type(odd) > *,
table.dataTable tbody tr:nth-of-type(even) > * {
  background-color: #fff !important;
  --bs-table-striped-bg: #fff !important;
  --bs-table-bg: #fff !important;
  --bs-table-accent-bg: transparent !important;
}

/* Sem hover nas linhas */
table.dataTable tbody tr:hover,
table.dataTable tbody tr:hover > * {
  box-shadow: none !important;
  background-color: #fff !important;
  --bs-table-hover-bg: #fff !important;
  --bs-table-bg-state: transparent !important;
}

/* Borda */
table.dataTable {
  border-collapse: collapse !important;
  border: none !important;
}

/* Controles superiores — busca sempre à direita */
div.dt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

div.dt-length {
  flex: 0 0 auto;
}

div.dt-search {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

div.dt-table {
  width: 100%;
  overflow-x: auto;
}

div.dt-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

div.dt-info {
  flex: 0 0 auto;
}
div.dt-pages {
  flex: 0 0 auto;
}

/* Input de busca */
.dataTables_filter input {
  border: 1px solid #e0e3e8 !important;
  border-radius: 5px !important;
  padding: 4px 10px !important;
  font-size: 0.74rem !important;
  color: #495057 !important;
  background: #fff !important;
  box-shadow: none !important;
  outline: none !important;
  width: 180px;
  transition: border-color 0.15s ease;
}

.dataTables_filter input:focus {
  border-color: #5a6b53 !important;
  box-shadow: none !important;
}

.dataTables_filter label {
  font-size: 0.74rem;
  color: #9aa0ac;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  white-space: nowrap;
}

/* Select de quantidade */
.dataTables_length select {
  border: 1px solid #e0e3e8 !important;
  border-radius: 5px !important;
  padding: 3px 22px 3px 8px !important;
  font-size: 0.74rem !important;
  color: #495057 !important;
  background: #fff !important;
  box-shadow: none !important;
  outline: none !important;
  appearance: auto;
}

.dataTables_length label {
  font-size: 0.74rem;
  color: #9aa0ac;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  white-space: nowrap;
}

/* Info */
.dataTables_info {
  font-size: 0.72rem !important;
  color: #b0b8c4 !important;
  padding-top: 3px !important;
}

/* Paginação */
.dataTables_paginate {
  font-size: 0.74rem !important;
}

/* Neutraliza todo estilo Bootstrap de .pagination */
.dataTables_paginate .pagination {
  margin: 0 !important;
  gap: 1px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

.dataTables_paginate .page-item .page-link,
.dataTables_paginate .paginate_button,
.dataTables_paginate .paginate_button > a {
  display: inline-block !important;
  padding: 3px 9px !important;
  margin: 0 1px !important;
  border: none !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #6c757d !important;
  box-shadow: none !important;
  outline: none !important;
  font-size: 0.74rem !important;
  line-height: 1.5 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  transition: none !important;
}

.dataTables_paginate .page-item.active .page-link,
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current > a {
  background: #5a6b53 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}

.dataTables_paginate .page-item.disabled .page-link,
.dataTables_paginate .paginate_button.disabled,
.dataTables_paginate .paginate_button.disabled > a {
  color: #d0d5dd !important;
  background: transparent !important;
  cursor: default !important;
  pointer-events: none !important;
}

.dataTables_paginate .page-item .page-link:hover,
.dataTables_paginate .paginate_button:not(.current):not(.disabled):hover,
.dataTables_paginate .paginate_button:not(.current):not(.disabled) > a:hover {
  background: #f0f4ef !important;
  color: #5a6b53 !important;
}

/* --------------------------------------------------
   Flatpickr — tema verde Propondo
   -------------------------------------------------- */
.flatpickr-calendar {
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(90, 107, 83, 0.15);
  border: 1px solid #dde4db;
  font-family: inherit;
  font-size: 0.78rem;
  width: 270px !important;
}

/* Os containers internos do flatpickr vêm com largura fixa (307.875px).
   Como o calendário acima é mais estreito, eles precisam acompanhar a
   largura dele. Sem isso cabem 8 ou 9 dias por linha e o sábado some. */
.flatpickr-innerContainer,
.flatpickr-rContainer,
.flatpickr-days,
.dayContainer {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.flatpickr-months {
  background: #5a6b53;
  border-radius: 10px 10px 0 0;
  padding: 4px 0;
  align-items: center;
}

.flatpickr-months .flatpickr-month,
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  color: #fff;
  fill: #fff;
  display: flex;
  align-items: center;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: #d4e2cf;
}

/* mês e ano no header — texto branco sobre verde */
.flatpickr-current-month {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 2px 0;
  font-size: 0.82rem;
  height: auto !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-size: 0.82rem !important;
  font-weight: 600;
  padding: 1px 4px 1px 2px !important;
  height: auto !important;
  border: none !important;
  border-radius: 4px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  box-shadow: none !important;
  color: #fff !important;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: auto;
}

/* opções do select de mês — precisa de texto escuro */
.flatpickr-current-month .flatpickr-monthDropdown-months option {
  background: #fff !important;
  color: #3d4a3a !important;
  font-size: 0.8rem !important;
}

.flatpickr-current-month input.cur-year {
  font-size: 0.82rem !important;
  font-weight: 600;
  padding: 1px 2px !important;
  height: auto !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #fff !important;
  width: 52px !important;
}

.flatpickr-weekdays {
  background: #f0f4ef;
}

span.flatpickr-weekday {
  color: #5a6b53;
  font-weight: 700;
  font-size: 0.68rem;
}

.flatpickr-day {
  max-width: 14.2857143% !important; /* 7 colunas exatas */
  height: 38px !important;
  line-height: 38px !important;
  font-size: 0.75rem !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: #5a6b53;
  border-color: #5a6b53;
  color: #fff;
}

.flatpickr-day:hover {
  background: #eaf0e8;
  border-color: #c8d4c5;
}

.flatpickr-day.today {
  border-color: #5a6b53;
  font-weight: 700;
}

.flatpickr-day.today:hover {
  background: #5a6b53;
  color: #fff;
}

/* Input alt do Flatpickr — menor e sem conflito com Select2 theme */
.flatpickr-input.form-control[readonly],
input.flatpickr-input[readonly] {
  background-color: #fff !important;
  cursor: pointer;
  border: 1.5px solid #c8d4c4 !important;
  border-radius: 7px !important;
  font-size: 0.75rem !important;
  padding: 4px 9px !important;
  height: auto !important;
  box-shadow: none !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
}

.flatpickr-input.form-control[readonly]:focus,
input.flatpickr-input[readonly]:focus {
  border-color: #5a6b53 !important;
  box-shadow: 0 0 0 3px rgba(90, 107, 83, 0.13) !important;
  outline: none !important;
}

/* Selects de mês/ano dentro do calendário — não herdam .form-select global */
/* (regras já tratadas na seção Flatpickr acima) */

/* --------------------------------------------------
   Botão de filtros — padrão global (.filter-toggle)
   -------------------------------------------------- */
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent !important;
  background-image: none !important;
  color: #5a6b53 !important;
  border: 1.5px solid #5a6b53 !important;
  padding: 0.38rem 0.85rem;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.8rem;
  box-shadow: none !important;
  cursor: pointer;
  line-height: 1.5;
  text-decoration: none;
  transition: opacity 0.15s ease !important;
}

.filter-toggle:hover,
.filter-toggle:focus,
.filter-toggle:active {
  background: transparent !important;
  color: #5a6b53 !important;
  border-color: #5a6b53 !important;
  box-shadow: none !important;
  outline: none;
  opacity: 0.75;
}

/* Estado ativo: algum filtro está aplicado */
.filter-toggle-active,
.filter-toggle-active:hover,
.filter-toggle-active:focus,
.filter-toggle-active:active {
  background: #5a6b53 !important;
  color: #fff !important;
  opacity: 1 !important;
}

/* Badge com contagem de filtros ativos */
.filter-active-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #fff;
  color: #5a6b53;
  border-radius: 20px;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
}

.filter-toggle i,
.filter-toggle .material-icons-round {
  font-size: 1.1rem;
  vertical-align: middle;
}

/* --------------------------------------------------
   Botões — padrão global Propondo
   Outline verde primary em TODOS os botões do sistema
   -------------------------------------------------- */

/* === Regra base: TODO .btn vira outline primary === */
.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-light,
.btn-dark,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn.bg-gradient-primary,
.btn.bg-gradient-secondary,
.btn.bg-gradient-success,
.btn.bg-gradient-danger,
.btn.bg-gradient-warning,
.btn.bg-gradient-info {
  background-color: transparent !important;
  background-image: none !important;
  border: 1.5px solid #5a6b53 !important;
  color: #5a6b53 !important;
  box-shadow: none !important;
  transform: none !important;
  transition: opacity 0.15s ease !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.btn:hover,
.btn:focus,
.btn:active,
.btn.active,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn.bg-gradient-primary:hover,
.btn.bg-gradient-secondary:hover,
.btn.bg-gradient-success:hover,
.btn.bg-gradient-danger:hover,
.btn.bg-gradient-warning:hover,
.btn.bg-gradient-info:hover {
  background-color: transparent !important;
  background-image: none !important;
  border-color: #5a6b53 !important;
  color: #5a6b53 !important;
  box-shadow: none !important;
  transform: none !important;
  opacity: 0.75 !important;
}

.btn:disabled,
.btn.disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-success:disabled,
.btn-danger:disabled,
.btn-warning:disabled,
.btn-info:disabled {
  background-color: transparent !important;
  border-color: #5a6b53 !important;
  color: #5a6b53 !important;
  opacity: 0.4 !important;
  box-shadow: none !important;
}

/* === Paginação DataTables — cor Propondo === */
.paginate_button.current,
.paginate_button.current:hover {
  background: #5a6b53 !important;
  border-color: #5a6b53 !important;
  color: #fff !important;
  box-shadow: none !important;
}

.paginate_button:hover {
  background: #eaf0e8 !important;
  color: #5a6b53 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* ══════════════════════════════════════════════════════
   Botões de Ação por linha — .btn-action e .btn-action-text
   Seguem o padrão global: outline primary, fundo transparente
   ══════════════════════════════════════════════════════ */

/* Ícone compacto */
.btn-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  border: 1.5px solid #5a6b53 !important;
  border-radius: 5px !important;
  background-color: transparent !important;
  color: #5a6b53 !important;
  font-size: 0.65rem !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: pointer !important;
  text-decoration: none !important;
  vertical-align: middle !important;
  text-align: center !important;
}

.btn-action:hover,
.btn-action:focus,
.btn-action:active,
.btn-action:focus-visible {
  background-color: transparent !important;
  border-color: #5a6b53 !important;
  color: #5a6b53 !important;
  box-shadow: none !important;
  transform: none !important;
  outline: none !important;
  opacity: 0.7 !important;
}

/* Texto compacto (ex: "Ver Proposta") */
.btn-action-text {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 3px 9px !important;
  border: 1.5px solid #5a6b53 !important;
  border-radius: 5px !important;
  background-color: transparent !important;
  color: #5a6b53 !important;
  font-size: 0.68rem !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: pointer !important;
  vertical-align: middle !important;
}

.btn-action-text:hover,
.btn-action-text:focus,
.btn-action-text:active {
  background-color: transparent !important;
  border-color: #5a6b53 !important;
  color: #5a6b53 !important;
  box-shadow: none !important;
  transform: none !important;
  outline: none !important;
  opacity: 0.7 !important;
  text-decoration: none !important;
}

/* =====================================================
   Formulários — padrão global Propondo
   Labels, inputs, selects, Select2
   ===================================================== */

/* -- Labels ------------------------------------------ */
.form-label,
.form-label-modern {
  color: #5a6b53 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  margin-bottom: 4px !important;
  letter-spacing: 0.01em;
  display: block;
}

/* Asterisco vermelho em campos obrigatórios */
.form-label.required::after,
.form-label-modern.required::after {
  content: " *";
  color: #dc3545;
  font-weight: 700;
}

.required-asterisk {
  color: #dc3545 !important;
  font-weight: 700;
}

/* -- Inputs ------------------------------------------ */
.form-control {
  border: 1.5px solid #c8d4c4 !important;
  border-radius: 7px !important;
  font-size: 0.82rem !important;
  color: #3d4a3a !important;
  background-color: #fff !important;
  box-shadow: none !important;
  padding: 7px 12px !important;
  height: auto !important;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease !important;
}

.form-control:focus {
  border-color: #5a6b53 !important;
  box-shadow: 0 0 0 3px rgba(90, 107, 83, 0.13) !important;
  background-color: #fff !important;
  color: #3d4a3a !important;
}

.form-control::placeholder {
  color: #b5bec8 !important;
  font-size: 0.78rem !important;
}

.form-control[readonly] {
  background-color: #f8faf7 !important;
  color: #6c757d !important;
  cursor: default;
}

/* -- Selects nativos (sem Select2) ------------------- */
.form-select {
  border: 1.5px solid #c8d4c4 !important;
  border-radius: 7px !important;
  font-size: 0.82rem !important;
  color: #3d4a3a !important;
  background-color: #fff !important;
  box-shadow: none !important;
  padding: 7px 30px 7px 12px !important;
  height: auto !important;
  transition: border-color 0.15s ease !important;
}

.form-select:focus {
  border-color: #5a6b53 !important;
  box-shadow: 0 0 0 3px rgba(90, 107, 83, 0.13) !important;
  color: #3d4a3a !important;
}

/* -- Checkbox ----------------------------------------
   Dois defeitos herdados do Material Dashboard, corrigidos aqui de uma vez
   para todo o sistema:

   1) O "check" era desenhado com o glifo \f00c da FontAwesome 4, mas o projeto
      carrega a FontAwesome 6, cujo family tem outro nome. O glifo não resolvia
      e aparecia um quadradinho vazio no lugar do check. Agora é um SVG, que
      não depende de fonte nenhuma.

   2) O alinhamento vinha de float com medidas em em. Quando o rótulo tinha
      tamanho de fonte próprio, as contas desencontravam e a caixinha subia
      para fora da linha do texto. Agora é flex.

   .form-switch fica de fora: lá o mesmo input vira o pino do interruptor. */
.form-check:not(.form-switch):not(.form-check-inline) {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding-left: 0;
}

.form-check:not(.form-switch) .form-check-input[type="checkbox"] {
  float: none;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  /* !important porque o tema aplica margin-left:auto !important, que dentro do
     flex jogava a caixinha e o rótulo para a direita da linha. */
  margin: 0.12rem 0 0 0 !important;
  border: 1.7px solid #6f8068;
  border-radius: 4px;
  background-color: #fff;
  background-image: none;
  cursor: pointer;
}

/* Mata o glifo quebrado que o tema desenhava por cima da caixinha. */
.form-check:not(.form-switch) .form-check-input[type="checkbox"]::after,
.form-check:not(.form-switch) .form-check-input[type="checkbox"]::before {
  content: none !important;
}

.form-check:not(.form-switch) .form-check-input[type="checkbox"]:hover {
  border-color: #4e6048;
}

.form-check:not(.form-switch) .form-check-input[type="checkbox"]:focus {
  border-color: #5a6b53;
  box-shadow: 0 0 0 3px rgba(90, 107, 83, 0.13);
}

.form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked {
  background-color: #5a6b53;
  border-color: #5a6b53;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.72rem;
}

/* "Parte marcada", usado no marcar todas de uma lista com seleção. */
.form-check:not(.form-switch) .form-check-input[type="checkbox"]:indeterminate {
  background-color: #5a6b53;
  border-color: #5a6b53;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.72rem;
}

.form-check:not(.form-switch) .form-check-input[type="checkbox"]:disabled {
  background-color: #eef1ed;
  border-color: #c8d4c4;
  cursor: not-allowed;
}

/* O radio do tema é desenhado com pseudo-elemento próprio e continua como
   está. Só perde o float e a margem negativa, que existiam para compensar o
   padding do container que o flex agora dispensa. */
.form-check:not(.form-switch) .form-check-input[type="radio"] {
  float: none;
  flex-shrink: 0;
  margin: 0.12rem 0 0 0 !important;
}

.form-check:not(.form-switch) .form-check-label {
  margin-bottom: 0;
  cursor: pointer;
  line-height: 1.35;
}

/* -- CKEditor (Ordem de Serviço) ---------------------
   O editor vinha com o espaçamento padrão de parágrafo (1em acima e abaixo),
   que na tela parece um Enter valendo duas linhas. No PDF e na descrição do
   evento no Google o mesmo parágrafo vira um espaço pequeno, então o que se
   digitava não era o que saía.

   Aqui o parágrafo do editor recebe o MESMO respiro do PDF (7px), e a lista
   acompanha. Assim Enter tem sempre o mesmo efeito, e o texto sai do jeito
   que foi escrito. */
.ck-content p {
  margin: 0 0 7px !important;
}

.ck-content p:last-child {
  margin-bottom: 0 !important;
}

.ck-content ul,
.ck-content ol {
  margin: 0 0 7px 18px !important;
  padding-left: 0 !important;
}

.ck-content li {
  margin-bottom: 3px !important;
}

.ck-content hr {
  border: none !important;
  border-top: 1px solid #d5e0d1 !important;
  margin: 10px 0 !important;
}

/* -- Select2 — theming primário ---------------------- */
.select2-container {
  width: 100% !important;
  max-width: 100% !important;
}

/* Dropdown nunca ultrapassa o viewport */
.select2-dropdown {
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

.select2-container--bootstrap-5 .select2-selection {
  border: 1.5px solid #c8d4c4 !important;
  border-radius: 7px !important;
  font-size: 0.82rem !important;
  min-height: 34px !important;
  color: #3d4a3a !important;
  background-color: #fff !important;
  display: flex;
  align-items: center;
  padding: 3px 8px !important;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: #5a6b53 !important;
  box-shadow: 0 0 0 3px rgba(90, 107, 83, 0.13) !important;
  outline: none !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
  border: 1.5px solid #c8d4c4 !important;
  border-radius: 7px !important;
  font-size: 0.82rem !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09) !important;
  margin-top: 2px;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.select2-container--bootstrap-5 .select2-results__option {
  font-size: 0.81rem !important;
  padding: 6px 12px !important;
  color: #3d4a3a !important;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted,
.select2-container--bootstrap-5
  .select2-results__option--highlighted[aria-selected] {
  background-color: #5a6b53 !important;
  color: #fff !important;
}

.select2-container--bootstrap-5 .select2-results__option--selected,
.select2-container--bootstrap-5
  .select2-results__option[aria-selected="true"]:not(
    .select2-results__option--highlighted
  ) {
  background-color: #edf2ec !important;
  color: #5a6b53 !important;
}

.select2-container--bootstrap-5
  .select2-search--dropdown
  .select2-search__field {
  border: 1.5px solid #c8d4c4 !important;
  border-radius: 5px !important;
  font-size: 0.8rem !important;
  padding: 5px 10px !important;
  box-shadow: none !important;
}

.select2-container--bootstrap-5
  .select2-search--dropdown
  .select2-search__field:focus {
  border-color: #5a6b53 !important;
  box-shadow: 0 0 0 2px rgba(90, 107, 83, 0.12) !important;
  outline: none !important;
}

/* Placeholder do Select2 */
.select2-container--bootstrap-5 .select2-selection__placeholder {
  color: #b5bec8 !important;
  font-size: 0.78rem !important;
}

/* -- Remove Material Dashboard float-label interference -- */
.input-group-outline .form-control ~ label,
.input-group-outline .form-select ~ label {
  display: none !important;
}

/* -- input-group: alinha input e botão na mesma altura -- */
.input-group .form-control,
.input-group .form-select {
  height: 38px !important;
  padding-top: 0.375rem !important;
  padding-bottom: 0.375rem !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  box-shadow: none !important;
}

.input-group .btn {
  height: 38px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 38px !important;
  font-size: 0.85rem !important;
}

/* =====================================================
   Modais — padrão global Propondo
   ===================================================== */

/* Sempre abrir no topo — sobrepõe modal-dialog-centered */
.modal-dialog {
  max-width: 500px !important;
  margin-top: 60px !important;
  align-items: flex-start !important;
}

.modal-dialog-centered {
  align-items: flex-start !important;
  margin-top: 60px !important;
}

.modal-dialog.modal-sm {
  max-width: 360px !important;
}
.modal-dialog.modal-lg {
  max-width: 720px !important;
}
.modal-dialog.modal-xl {
  max-width: 960px !important;
}

/* Content — sem sombra, borda sutil, raio clean */
.modal-content {
  border: 1px solid #e2e8e0 !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 32px rgba(90, 107, 83, 0.12) !important;
  overflow: hidden;
}

/* Header — fundo branco, borda inferior sutil, sem padding excessivo */
.modal-header {
  background: #fff !important;
  border-bottom: 1.5px solid #eef1ed !important;
  padding: 14px 20px !important;
  align-items: center;
}

.modal-title {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #3d4a3a !important;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.modal-title i,
.modal-title .material-icons-round {
  font-size: 1rem !important;
  color: #5a6b53 !important;
  opacity: 0.85;
}

/* Botão fechar — tamanho controlado */
.modal-header .btn-close {
  width: 0.75rem !important;
  height: 0.75rem !important;
  padding: 0 !important;
  opacity: 0.45;
  box-shadow: none !important;
}

.modal-header .btn-close:hover {
  opacity: 0.8;
}

/* Body */
.modal-body {
  background: #fff !important;
  padding: 20px !important;
  font-size: 0.85rem !important;
  color: #3d4a3a !important;
}

/* Textos descritivos dentro do body — fonte padronizada */
.modal-body p,
.modal-body small,
.modal-body span:not(.badge):not(.material-icons):not(.material-icons-round) {
  font-size: 0.85rem !important;
  color: #3d4a3a !important;
}

/* Footer — borda superior sutil, fundo herda do modal-content */
.modal-footer {
  background: transparent !important;
  border-top: 1.5px solid #eef1ed !important;
  padding: 10px 20px !important;
  gap: 0px !important;
  justify-content: flex-end;
}

/* Botões no footer — tamanho compacto */
.modal-footer .btn {
  font-size: 0.775rem !important;
  padding: 5px 13px !important;
  min-width: 80px;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* Backdrop mais sutil */
.modal-backdrop.show {
  opacity: 0.35 !important;
}

/* Textarea dentro de modais — sem resize e borda padrão (sobrepõe inline style) */
.modal-body textarea.form-control {
  resize: none !important;
  border: 1.5px solid #c8d4c4 !important;
}

/* Ícones decorativos (material-icons) em modal-body — sobrepõe inline style font-size */
.modal-body .material-icons-round {
  font-size: 26px !important;
  flex-shrink: 0;
}

/* Botões de ação no modal mantêm o tamanho do ícone definido localmente */
.modal-body .btn-action .material-icons-round {
  font-size: inherit !important;
}

/* Alertas dentro de modais — padrão flat, sem gradiente */
.modal-body .alert {
  background: none !important;
  border: none !important;
  border-left: 4px solid !important;
  border-radius: 6px !important;
  padding: 9px 13px !important;
  font-size: 0.82rem !important;
  font-weight: 400 !important;
  color: #3d4a3a !important;
  box-shadow: none !important;
}

/* Alertas globais — mesmo padrão flat fora de modais */
.alert {
  background: none !important;
  border: none !important;
  border-left: 4px solid #c8d4c4 !important;
  border-radius: 6px !important;
  padding: 9px 13px !important;
  font-size: 0.82rem !important;
  font-weight: 400 !important;
  color: #3d4a3a !important;
  box-shadow: none !important;
}

.alert-info {
  background-color: #edf5ff !important;
  border-left-color: #1a73e8 !important;
  color: #1a4a80 !important;
}

.alert-warning {
  background-color: #fff9ed !important;
  border-left-color: #fb8c00 !important;
  color: #7a4a00 !important;
}

.alert-danger {
  background-color: #fff2f2 !important;
  border-left-color: #f44335 !important;
  color: #7a1a10 !important;
}

.alert-success {
  background-color: #f0faf0 !important;
  border-left-color: #4caf50 !important;
  color: #1e5c20 !important;
}

.alert i,
.alert .material-icons-round {
  font-size: 0.95rem !important;
  vertical-align: -2px;
}

.modal-body .alert-info {
  background-color: #edf5ff !important;
  border-left-color: #1a73e8 !important;
  color: #1a4a80 !important;
}
.modal-body .alert-info i,
.modal-body .alert-info .material-icons-round {
  color: #1a73e8 !important;
  font-size: 0.95rem !important;
}

.modal-body .alert-warning {
  background-color: #fff9ed !important;
  border-left-color: #fb8c00 !important;
  color: #7a4a00 !important;
}
.modal-body .alert-warning i,
.modal-body .alert-warning .material-icons-round {
  color: #fb8c00 !important;
  font-size: 0.95rem !important;
}

.modal-body .alert-danger {
  background-color: #fff2f2 !important;
  border-left-color: #f44335 !important;
  color: #7a1a10 !important;
}
.modal-body .alert-danger i,
.modal-body .alert-danger .material-icons-round {
  color: #f44335 !important;
  font-size: 0.95rem !important;
}

.modal-body .alert-success {
  background-color: #f0faf0 !important;
  border-left-color: #4caf50 !important;
  color: #1e5c20 !important;
}
.modal-body .alert-success i,
.modal-body .alert-success .material-icons-round {
  color: #4caf50 !important;
  font-size: 0.95rem !important;
}

/* =====================================================
   Toasts globais — Propondo
   Utilizados via @include('partials.toasts') e showToast()
   ===================================================== */
#toast-container-propondo {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  pointer-events: none;
  min-width: 255px;
  max-width: 330px;
}
#toast-container-propondo .toast {
  pointer-events: all;
  width: 100%;
}
.toast-propondo {
  background: #ffffff !important;
  border: none !important;
  border-radius: 9px !important;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.05) !important;
  font-size: 0.8rem;
  overflow: hidden;
  animation: toastSlideIn 0.2s ease;
}
@keyframes toastSlideIn {
  from {
    transform: translateX(28px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.toast-propondo.toast-success {
  border-left: 3px solid #5a6b53 !important;
}
.toast-propondo.toast-error {
  border-left: 3px solid #dc3545 !important;
}
.toast-propondo.toast-warning {
  border-left: 3px solid #fd7e14 !important;
}
.toast-propondo.toast-info {
  border-left: 3px solid #0ea5e9 !important;
}
.toast-propondo .toast-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
}
.toast-propondo .toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.toast-propondo.toast-success .toast-icon {
  background: rgba(90, 107, 83, 0.1);
  color: #5a6b53;
}
.toast-propondo.toast-error .toast-icon {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}
.toast-propondo.toast-warning .toast-icon {
  background: rgba(253, 126, 20, 0.1);
  color: #fd7e14;
}
.toast-propondo.toast-info .toast-icon {
  background: rgba(14, 165, 233, 0.1);
  color: #0ea5e9;
}
.toast-propondo .toast-msg {
  color: #344767;
  font-weight: 500;
  line-height: 1.4;
  flex: 1;
  word-break: break-word;
}
.toast-propondo .toast-close {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin-left: 0.1rem;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}
.toast-propondo .toast-close:hover {
  background: rgba(0, 0, 0, 0.07);
  color: #344767;
}

/* =====================================================
   Respostas da IA — visual global clean
   Utilizado em dashboard, calendario e propostas
   ===================================================== */
.ai-md-output {
  font-size: 0.84rem;
  line-height: 1.58;
  color: #475467;
  font-weight: 400;
}

.ai-md-output h1,
.ai-md-output h2 {
  font-size: 0.92rem;
  line-height: 1.35;
  color: #1f2937;
  font-weight: 600;
  margin: 0.85rem 0 0.35rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid #e7ebf0;
}

.ai-md-output h3,
.ai-md-output h4,
.ai-md-output h5,
.ai-md-output h6 {
  font-size: 0.83rem;
  line-height: 1.35;
  color: #344054;
  font-weight: 600;
  margin: 0.7rem 0 0.3rem;
}

.ai-md-output h1:first-child,
.ai-md-output h2:first-child,
.ai-md-output h3:first-child,
.ai-md-output h4:first-child,
.ai-md-output h5:first-child,
.ai-md-output h6:first-child {
  margin-top: 0;
}

.ai-md-output p {
  margin: 0 0 0.45rem;
}

.ai-md-output ul,
.ai-md-output ol {
  padding-left: 1.15rem;
  margin: 0 0 0.5rem;
}

.ai-md-output li {
  margin-bottom: 0.14rem;
}

.ai-md-output strong {
  color: #1f2937;
  font-weight: 600;
}

.ai-md-output hr {
  border: none;
  border-top: 1px solid #e7ebf0;
  margin: 0.7rem 0;
}

.ai-md-output table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6rem 0;
  font-size: 0.8rem;
  background: #fff;
}

.ai-md-output th {
  background: #f8fafc;
  color: #344054;
  font-weight: 600;
  text-align: left;
  padding: 0.42rem 0.55rem;
  border: 1px solid #e7ebf0;
  white-space: nowrap;
}

.ai-md-output td {
  padding: 0.4rem 0.55rem;
  border: 1px solid #e7ebf0;
  color: #475467;
}

.ai-md-output tr:nth-child(even) td {
  background: #fbfcfd;
}

.ai-md-output code {
  background: #f5f7fa;
  border-radius: 4px;
  padding: 0.05rem 0.22rem;
  font-size: 0.79em;
  color: #344054;
}

.ai-md-output blockquote {
  margin: 0.55rem 0;
  padding: 0.15rem 0 0.15rem 0.75rem;
  border-left: 2px solid #d0d5dd;
  color: #667085;
}
