.titulo-concluido {
  text-decoration: line-through;
  color: #6b7280;
}
.tarefa-card-title.concluida {
  text-decoration: line-through;
  color: #6b7280;
}
:root {
  /*  Padrão  */
  --template1: #00be95;
  /* Painel lateral */
  --template2: #00bb9c;
  /* cor hover */
  --template3: #00cfad;
}


.ocultar {
  display: none;
}

.field-icon {
  float: right;
  margin-left: -25px;
  margin-top: -25px;
  position: relative;
  z-index: 2;
  margin-right: 8px;
  cursor: pointer;
}

#mensagem-recuperar {
  color: var(--template1) !important;
  font-size: 13px;
}



/* Select2 desabilitado: mesma cor cinza dos selects nativos (Cabeçalho, Marca d'água, Assinatura) */
.select2-container--default.select2-container--disabled .select2-selection--single,
select.sel-termos[disabled] ~ .select2-container .select2-selection--single {
  background-color: #e9ecef !important;
  border-color: #dee2e6 !important;
  cursor: not-allowed;
}

.select2-selection__arrow {
  height: 38px !important;
}

hr.separador {
  border: 1px dotted #666;
  border-radius: 5px;
}



hr.separador {
  border: 1px dotted #666;
  border-radius: 5px;
}

.text-verde {
  color: #0e9e29;
}

.ocultar {
  display: none;
}

.textareag {
  width: 1000px;
  height: 550px;
}

/* Sidebar/header escuros só no modo escuro — modo claro fica no painel-moderno.css */
body.dark-theme .main-sidemenu {
  background-color: #1f222b;
}

body.dark-theme .app-sidebar {
  background-color: #1f222b;
}

body.dark-theme .slide-menu {
  background-color: #1f222b !important;
  color: #ffffff;
}

body.dark-theme .side-menu__item:hover:not(.active) .side-menu__icon,
body.dark-theme .side-menu__item:hover:not(.active) .side-menu__label,
body.dark-theme .side-menu__item:hover:not(.active) .angle {
  color: #ffffff !important;
  fill: #ffffff !important;
}

body.dark-theme .slide-item:hover:not(.active),
body.dark-theme .slide-item:focus:not(.active) {
  text-decoration: none;
  color: #fff !important;
}

body.dark-theme .app-sidebar .side-item.side-item-category {
  color: rgba(255, 255, 255, 0.38);
}

body.dark-theme .main-sidebar-header {
  background: #1f222b !important;
}

body.dark-theme .main-header {
  background-color: #1f222b !important;
}

.slide-item .app-sidebar .slide-menu .slide-item:before:hover {
  color: var(--template1) !important;
}

.slide.is-expanded .slide-menu a:hover:before {
  color: var(--template1) !important;
}

body.dark-theme .slide:hover .side-menu__label,
body.dark-theme .slide:hover .angle {
  color: #fff !important;
  fill: #fff !important;
}


.font-size-11 {
  font-size: 11px !important;
}

.botao_excluir_listar_sim {
  background: #e50000;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 5px;
}

.botao_excluir_listar_sim:hover {
  background: #ff3c3c;
}

.swal-whatsapp-container {
  z-index: 99999999 !important; /* Maior que o z-index padrão das modais Bootstrap (1050) */
}

/* Botões do SweetAlert (excluir, confirmar) — juntos no centro, padrão do painel */
.swal-whatsapp-container .swal2-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.5rem !important;
  width: auto !important;
  max-width: calc(100% - 2rem);
  margin: 1.25em auto 0 !important;
  padding: 0 !important;
}

.swal-whatsapp-container .swal2-actions .swal2-styled.btn,
.swal-whatsapp-container .swal2-actions button.btn {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.swal-alert-container {
  z-index: 99999999 !important; /* Maior que o z-index padrão das modais Bootstrap (1050) */
}

/* Estilos para campos obrigatórios com um asterisco */
.required-field {
  position: relative;
}

.text-danger {
  color: #dc3545 !important;
}

/* Melhorar a exibição de feedback de validação */
.form-control.is-valid,
.form-control.is-invalid {
  background-position: right calc(0.375em + 0.1875rem) center;
  padding-right: 2.75rem !important;
}

.form-select.is-valid,
.form-select.is-invalid {
  background-position: right calc(0.75em + 0.75rem) center;
  padding-right: 3.25rem !important;
}

/* ============================
   Permissões (simples, reutilizável)
   ============================ */
.perm-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.perm-card label,
.perm-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  cursor: pointer;
}

.perm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 14px;
  height: 18px;
  color: #64748b;
  font-size: 12px;
  line-height: 1;
}

.perm-label {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 18px;
  margin: 0;
  min-width: 0;
}

.perm-card label .flex-grow-1.perm-label {
  flex: 1 1 auto;
}

.perm-switch-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 18px;
}

.perm-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.perm-switch {
  position: relative;
  display: block;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #e5e7eb;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
  pointer-events: none;
}

.perm-switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #94a3b8;
  transition: transform 0.2s ease, background 0.2s ease;
}

.perm-input:checked + .perm-switch {
  background: #0d6efd;
  border-color: #0d6efd;
}

.perm-input:checked + .perm-switch::before {
  transform: translateX(12px);
  background: #fff;
}

.perm-section {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px 10px;
  background: #f9fafb;
  margin-bottom: 10px;
}

.perm-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 4px;
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.valid-feedback,
.invalid-feedback {
  position: absolute;
  font-size: 85%;
  animation: fadeIn 0.3s;
  margin-top: 2px;
}

/* Melhorar visibilidade de campos em foco */
.form-control:focus,
.form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Estilo para dicas de campo */
.field-help {
  display: none;
  font-size: 80%;
  color: #6c757d;
  margin-top: 2px;
}

.form-control:focus + .field-help,
.form-select:focus + .field-help {
  display: block;
}

/* Estilos para o spinner de salvamento */
#btn_carregando {
  display: none;
}

/* Deixar o placeholder mais claro */
::placeholder {
  opacity: 0.6 !important;
}

/* Ajustes para grupos de input com ícones */
.input-group-text {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Espaçamento entre linhas do formulário */
.modal-body .row {
  margin-bottom: 0.5rem;
}

/* Ajuste para a visualização da imagem */
#target {
  object-fit: cover;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

/* Melhorar a exibição de feedback de validação */
.form-control.is-valid,
.form-control.is-invalid {
  background-position: right calc(0.375em + 0.1875rem) center;
  padding-right: 2.75rem !important;
}

.form-select.is-valid,
.form-select.is-invalid {
  background-position: right calc(0.75em + 0.75rem) center;
  padding-right: 3.25rem !important;
}

/* Animar os feedbacks para melhor UX */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.valid-feedback,
.invalid-feedback {
  position: absolute;
  font-size: 85%;
  animation: fadeIn 0.3s;
  margin-top: 2px;
}

/******************* CSS DAS CONFIGURAÇÕES ************************/

/* Estilo para cards de configuração */
.config-card {
  background: rgb(245, 245, 245) !important;
  border: none;
  transition: all 0.3s ease;
}

.config-card:hover {
  transform: translateY(-5px);
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px !important;
  z-index: 90000 !important;
}

.config-icon {
  width: 45px;
  min-width: 45px;
  height: 45px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--bs-primary-rgb), 0.1);
  border-radius: 12px;
}

/* =========================================
   Ajustes Dark Theme para os cards
   ========================================= */
body.dark-theme .config-card,
.dark-theme .config-card {
  background: linear-gradient(145deg, #2a3347 0%, #1e2433 55%, #1a2030 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22) !important;
}

body.dark-theme .config-card:hover,
.dark-theme .config-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.32) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.1) !important;
}

body.dark-theme .config-card .text-dark,
.dark-theme .config-card .text-dark {
  color: #f1f5f9 !important;
}

body.dark-theme .config-card .text-muted,
.dark-theme .config-card .text-muted {
  color: #94a3b8 !important;
}

body.dark-theme .config-icon,
.dark-theme .config-icon {
  background: rgba(59, 130, 246, 0.14) !important;
  border: 1px solid rgba(96, 165, 250, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.dark-theme .config-icon .text-primary,
.dark-theme .config-icon .text-primary {
  color: #93c5fd !important;
}

body.dark-theme .custom-toggle-label,
.dark-theme .custom-toggle-label {
  background: #334155;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-theme .custom-toggle-label:before,
.dark-theme .custom-toggle-label:before {
  background: #cbd5e1;
}

body.dark-theme .custom-toggle-input:checked + .custom-toggle-label,
.dark-theme .custom-toggle-input:checked + .custom-toggle-label {
  background: #6366f1;
  border-color: rgba(129, 140, 248, 0.45);
}

body.dark-theme .custom-toggle-input:checked + .custom-toggle-label:before,
.dark-theme .custom-toggle-input:checked + .custom-toggle-label:before {
  background: #ffffff;
}

/* Estilo para switches customizados */
.custom-toggle {
  position: relative;
  display: inline-block;
  margin-top: 5px;
}

.custom-toggle-input {
  display: none;
}

.custom-toggle-label {
  display: block;
  width: 65px;
  height: 26px;
  background: #e9ecef;
  border-radius: 13px;
  cursor: pointer;
  position: relative;
  transition: background 0.3s;
}

.custom-toggle-label:before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: left 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.custom-toggle-input:checked + .custom-toggle-label {
  background: #6259ca;
}

.custom-toggle-input:checked + .custom-toggle-label:before {
  left: 42px;
}

.toggle-on,
.toggle-off {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  transition: opacity 0.3s;
}

.toggle-on {
  left: 10px;
  color: #fff;
  opacity: 0;
}

.toggle-off {
  right: 10px;
  color: #666;
}

.custom-toggle-input:checked + .custom-toggle-label .toggle-on {
  opacity: 1;
}

.custom-toggle-input:checked + .custom-toggle-label .toggle-off {
  opacity: 0;
}

/* Estilo para botão de exclusão de imagem */
.position-relative {
  position: relative;
}

.btn-close-custom {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgb(255, 255, 255);
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-close-custom:hover {
  background: rgb(224, 224, 224);
  transform: scale(1.1);
}

.btn-close-custom i {
  font-size: 14px;
}

/* Modo escuro — menu do perfil (SaaS / painel) */
body.dark-theme .main-profile-menu .dropdown-menu {
  background-color: #1e2433 !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
}

body.dark-theme .main-profile-menu .menu-header-content {
  border-bottom-color: rgba(148, 163, 184, 0.16) !important;
}

body.dark-theme .main-profile-menu .menu-header-content h6 {
  color: #f1f5f9 !important;
}

body.dark-theme .main-profile-menu .dropdown-title-text,
body.dark-theme .main-profile-menu .subtext,
body.dark-theme .main-profile-menu .op-6 {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

body.dark-theme .main-profile-menu .dropdown-item,
body.dark-theme .main-profile-menu .dropdown-item i,
body.dark-theme .main-profile-menu span .dropdown-item,
body.dark-theme .main-profile-menu span .dropdown-item i {
  color: #cbd5e1 !important;
}

body.dark-theme .main-profile-menu .dropdown-item:hover,
body.dark-theme .main-profile-menu .dropdown-item:focus,
body.dark-theme .main-profile-menu span .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
}

body.dark-theme .main-profile-menu .dropdown-item .text-danger,
body.dark-theme .main-profile-menu .dropdown-item i.text-danger {
  color: #f87171 !important;
}

/* Preview de logo / fundo login */
body.dark-theme #divImg,
body.dark-theme [id="divImg"] {
  background: #252837 !important;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

body.dark-theme .btn-close-custom {
  background: #1e2433 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

body.dark-theme .btn-close-custom:hover {
  background: #334155 !important;
}

/* Tooltips globais — claro (branco) / escuro (dark-theme) + responsivo */
.tooltip {
  z-index: 99999 !important;
  --zf-tooltip-bg: #ffffff;
  --zf-tooltip-color: #1e3a5f;
  --zf-tooltip-border: rgba(37, 99, 235, 0.18);
  --zf-tooltip-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

body.dark-theme .tooltip {
  --zf-tooltip-bg: #1f2937;
  --zf-tooltip-color: #f8fafc;
  --zf-tooltip-border: rgba(148, 163, 184, 0.25);
  --zf-tooltip-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.tooltip .tooltip-inner {
  max-width: min(280px, 85vw);
  padding: 0.55rem 0.8rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background-color: #ffffff !important;
  color: #1e3a5f !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  word-wrap: break-word;
}

body.dark-theme .tooltip .tooltip-inner {
  border-color: rgba(148, 163, 184, 0.25);
  background-color: #1f2937 !important;
  color: #f8fafc !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Seta do tooltip acompanha o fundo do tema */
.tooltip.bs-tooltip-top .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
  border-top-color: #ffffff !important;
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
  border-bottom-color: #ffffff !important;
}

.tooltip.bs-tooltip-start .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
  border-left-color: #ffffff !important;
}

.tooltip.bs-tooltip-end .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
  border-right-color: #ffffff !important;
}

body.dark-theme .tooltip.bs-tooltip-top .tooltip-arrow::before,
body.dark-theme .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
  border-top-color: #1f2937 !important;
}

body.dark-theme .tooltip.bs-tooltip-bottom .tooltip-arrow::before,
body.dark-theme .tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
  border-bottom-color: #1f2937 !important;
}

body.dark-theme .tooltip.bs-tooltip-start .tooltip-arrow::before,
body.dark-theme .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
  border-left-color: #1f2937 !important;
}

body.dark-theme .tooltip.bs-tooltip-end .tooltip-arrow::before,
body.dark-theme .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
  border-right-color: #1f2937 !important;
}

@media (max-width: 576px) {
  .tooltip .tooltip-inner {
    max-width: min(240px, 90vw);
    font-size: 0.75rem;
    padding: 0.45rem 0.65rem;
  }
}

/*
 * Ajudas com ícone "i" (classe tooltip-fake = dropdown, não Bootstrap Tooltip).
 * !important vence o style="background-color:#212529" antigo do HTML.
 */
.tooltip-fake > .dropdown-menu {
  width: min(280px, 85vw) !important;
  max-width: 85vw !important;
  white-space: normal !important;
  z-index: 99999 !important;
  padding: 0.55rem 0.8rem !important;
  border-radius: 0.75rem !important;
  border: 1px solid var(--zf-tooltip-border, rgba(37, 99, 235, 0.18)) !important;
  background-color: #ffffff !important;
  color: #1e3a5f !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
}

.tooltip-fake > .dropdown-menu,
.tooltip-fake > .dropdown-menu .text-white,
.tooltip-fake > .dropdown-menu .text-primary,
.tooltip-fake > .dropdown-menu small,
.tooltip-fake > .dropdown-menu strong,
.tooltip-fake > .dropdown-menu li {
  color: #1e3a5f !important;
}

.tooltip-fake > .dropdown-menu > div {
  font-size: 0.8125rem !important;
  line-height: 1.45 !important;
  text-align: left !important;
}

body.dark-theme .tooltip-fake > .dropdown-menu {
  background-color: #1f2937 !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  color: #f8fafc !important;
}

body.dark-theme .tooltip-fake > .dropdown-menu,
body.dark-theme .tooltip-fake > .dropdown-menu .text-white,
body.dark-theme .tooltip-fake > .dropdown-menu .text-primary,
body.dark-theme .tooltip-fake > .dropdown-menu small,
body.dark-theme .tooltip-fake > .dropdown-menu strong,
body.dark-theme .tooltip-fake > .dropdown-menu li {
  color: #f8fafc !important;
}

@media (max-width: 576px) {
  .tooltip-fake > .dropdown-menu {
    width: min(240px, 90vw) !important;
    font-size: 0.75rem !important;
  }
}

.config-card {
  z-index: 1 !important;
}

/********************** MODAL MAIS MODERNA*********************/

/* Estilos para a modal mais moderna */
.modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.modal-header {
  border-bottom: none;
  padding: 1rem;
  background: linear-gradient(135deg, var(--template2), var(--template1));
  position: relative;
}

.modal-header h4 {
  font-weight: 600;
  letter-spacing: 0.5px;
  color: white;
  margin: 0;
  display: flex;
  align-items: center;
}

.modal-header h4 i {
  margin-right: 10px;
}

/* Mantém botão fechar com visual padrão do Bootstrap nos headers */
.modal-header .btn-close:not(.btn-fechar-clean) {
  background-color: transparent;
  border-radius: 0;
  margin: 0;
  padding: 0;
  width: 1em;
  height: 1em;
  transition: opacity 0.2s ease;
  opacity: .85;
}

.modal-header .btn-close:not(.btn-fechar-clean):hover {
  background-color: transparent;
  transform: none;
  opacity: 1;
}

#modalForm .modal-header .btn-close.btn-fechar-clean {
  background-color: transparent !important;
  border-radius: 0 !important;
  width: 1em !important;
  height: 1em !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.modal-body {
  padding: 1.75rem;
}

.modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.75rem;
  justify-content: flex-end;
}

/* Estilo para o alert de informação */
.alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  color: #3b82f6;
  padding: 1rem;
}

/* Estilo para o spinner de carregamento */
.spinner-border {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
}

/* Estilo para o popover de ajuda */
.popover {
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: none;
  z-index: 999999 !important;
  background-color: #fff;
}

.popover-header {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  border-radius: 10px 10px 0 0;
  border-bottom: none;
}

.popover-body {
  padding: 0.75rem;
  color: #334155;
}

/* Estilos para thumbnail */
.img-thumbnail {
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  padding: 3px;
  transition: all 0.3s;
  object-fit: cover;
}

.img-thumbnail:hover {
  border-color: #3b82f6;
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Estilo para popover */
.info-icon {
  color: #3b82f6;
  cursor: help;
  transition: transform 0.2s;
  font-size: 1rem;
}

.info-icon:hover {
  transform: scale(1.2);
}

/* Estilos para a modal de Dados */
#modalDados .tile {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  height: 100%;
}

/* Estilos para a modal de WhatsApp */
#mensagem_whatsapp {
  border-radius: 12px;
  min-height: 120px;
  resize: vertical;
  background-color: rgba(255, 255, 255, 0.9);
  background-blend-mode: overlay;
}

#preview {
  border-radius: 12px;
  min-height: 80px;
  background-color: rgba(255, 255, 255, 0.9);
  background-blend-mode: overlay;
  padding: 10px;
}

/* Botões de formatação do WhatsApp */
.btn-outline-success {
  border-color: #10b981;
  color: #10b981;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
}

.btn-outline-success:hover {
  background-color: #10b981;
  color: white;
}

/* Abas horizontais — destaque global (configurações, indicações, etc.) */
.nav-tabs {
  border-bottom: 2px solid #dee2e6;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-tabs .nav-item {
  display: flex;
  margin-bottom: -2px;
}

.nav-tabs .nav-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem;
  border: 1px solid #94a3b8;
  border-radius: 8px 8px 0 0;
  padding: 0.6rem 1.15rem;
  min-height: 40px;
  font-weight: 600;
  line-height: 1.2 !important;
  /* Texto mais forte — abas inativas não ficam “apagadas” */
  color: #0f172a;
  background-color: #e2e8f0;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 0 !important;
}

.nav-tabs button.nav-link {
  cursor: pointer;
}

.nav-tabs .nav-link i {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1 !important;
  width: 1.1em;
  height: 1.1em;
  margin: 0 !important;
  font-size: 0.95em;
  color: inherit;
  opacity: 1;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
  color: var(--template1, #2563eb);
  background-color: #cbd5e1;
  border-color: #64748b;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  color: #fff !important;
  background-color: var(--template1, #2563eb) !important;
  border-color: var(--template1, #2563eb) !important;
  border-bottom-color: var(--template1, #2563eb) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.dark-theme .nav-tabs {
  border-bottom-color: #3d4154;
}

.dark-theme .nav-tabs .nav-link {
  color: #f1f5f9;
  background-color: #334155;
  border-color: #64748b;
}

.dark-theme .nav-tabs .nav-link:hover,
.dark-theme .nav-tabs .nav-link:focus {
  color: #fff;
  background-color: #475569;
  border-color: #94a3b8;
}

.dark-theme .nav-tabs .nav-link.active,
.dark-theme .nav-tabs .nav-item.show .nav-link {
  color: #fff !important;
  background-color: var(--template1, #2563eb) !important;
  border-color: var(--template1, #2563eb) !important;
  border-bottom-color: var(--template1, #2563eb) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.modal.fade .modal-dialog {
  animation: fadeIn 0.3s ease-out;
}

/* Responsividade */
@media (max-width: 768px) {
  .modal-xl,
  .modal-lg {
    max-width: 95%;
  }

  .modal-body {
    padding: 1.25rem;
  }

  .form-label {
    margin-bottom: 0.25rem;
  }
}

/* Menu de Emojis */
.emoji-menu {
  display: flex;
  flex-wrap: wrap;
  width: 200px;
}

.emoji-menu button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Estilos personalizados */
.icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.bg-primary-soft {
  background-color: rgba(13, 110, 253, 0.1);
}

.preview-container {
  position: relative;
  border-radius: 0;
}

.gradient-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.9));
}

.message-card {
  transition: all 0.2s ease;
}

.message-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeIn 0.3s ease forwards;
}

/* TABELA MODERNAS */

/**
 * CSS para Tabelas Modernas
 * 
 * Adicione este CSS ao seu arquivo de estilo principal ou inclua como arquivo separado
 */

/* Estilos para badges soft */
.bg-primary-soft {
  background-color: rgba(13, 110, 253, 0.1) !important;
}

.bg-success-soft {
  background-color: rgba(25, 135, 84, 0.1) !important;
}

.bg-danger-soft {
  background-color: rgba(220, 53, 69, 0.1) !important;
}

.bg-warning-soft {
  background-color: rgba(255, 193, 7, 0.1) !important;
}

.bg-info-soft {
  background-color: rgba(13, 202, 240, 0.1) !important;
}

.bg-secondary-soft {
  background-color: rgba(108, 117, 125, 0.1) !important;
}

.bg-dark-soft {
  background-color: rgba(33, 37, 41, 0.1) !important;
}

.bg-light-hover:hover {
  background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Botões de ícone */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

/* Círculo de ícone */
.icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* Efeito hover nos botões */
.shadow-hover {
  transition: all 0.3s ease !important;
}

.shadow-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Arredondamento do card */
.rounded-4 {
  border-radius: 0.75rem !important;
}

/* Botões soft */
.btn-primary-soft {
  color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.1);
  border-color: transparent;
}

.btn-primary-soft:hover {
  color: white;
  background-color: #0d6efd;
}

.btn-danger-soft {
  color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
  border-color: transparent;
}

.btn-danger-soft:hover {
  color: white;
  background-color: #dc3545;
}

.btn-success-soft {
  color: #198754;
  background-color: rgba(25, 135, 84, 0.1);
  border-color: transparent;
}

.btn-success-soft:hover {
  color: white;
  background-color: #198754;
}

.btn-info-soft {
  color: #0dcaf0;
  background-color: rgba(13, 202, 240, 0.1);
  border-color: transparent;
}

.btn-info-soft:hover {
  color: white;
  background-color: #0dcaf0;
}

.btn-warning-soft {
  color: #ffc107;
  background-color: rgba(255, 193, 7, 0.1);
  border-color: transparent;
}

.btn-warning-soft:hover {
  color: white;
  background-color: #ffc107;
}

.btn-secondary-soft {
  color: #6c757d;
  background-color: rgba(108, 117, 125, 0.1);
  border-color: transparent;
}

.btn-secondary-soft:hover {
  color: white;
  background-color: #6c757d;
}

.btn-dark-soft {
  color: #212529;
  background-color: rgba(33, 37, 41, 0.1);
  border-color: transparent;
}

.btn-dark-soft:hover {
  color: white;
  background-color: #212529;
}

/* Efeito hover na linha da tabela */
.hover-actions .action-buttons {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.hover-actions:hover .action-buttons {
  opacity: 1;
}

/* Fonte extra pequena para ícones */
.fs-xs {
  font-size: 0.75rem !important;
}

/* Melhoria na visualização das tabelas */
.table-hover tbody tr {
  transition: all 0.2s ease;
}

/* Tamanho reduzido das tabelas */
#tabela.table td,
#tabela.table th {
  padding: 0.75rem 1rem;
}

/* Estilo para dropdown menu */
.dropdown-menu {
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.dropdown-item {
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  margin: 0 0.25rem;
  transition: all 0.2s;
}

.dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* (tooltips: estilo global no bloco "Tooltips globais" acima) */

/* Status indicator para imagens de perfil */
.status-indicator {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
}

/* Melhoria nos badges */
.badge {
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Melhoria nas imagens de perfil */
.rounded-circle.border {
  object-fit: cover;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* FOTO NO SELECT2 */
.select2-image {
  width: 25px;
  height: 25px;
  vertical-align: middle;
  margin-right: 5px;
  object-fit: contain;
}

/* CSS CARDS PRDUTOS */

.stock-card {
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.stock-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.icon-wrapper {
  transition: all 0.2s ease;
}

.stock-card:hover .icon-wrapper {
  transform: scale(1.1);
}
/* Animação de pulso para o card crítico */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.critical-icon {
  animation: pulse 1.5s infinite;
}

/* Animação flutuante para o segundo card */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0px);
  }
}

.low-icon {
  animation: float 2s ease-in-out infinite;
}

/* Animação giratória para o quarto card */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* DELEY DOS CARDAS DOS PRODUTOS */
.animate__delay-custom1 {
  animation-delay: 0.1s;
}
.animate__delay-custom2 {
  animation-delay: 0.2s;
}
.animate__delay-custom3 {
  animation-delay: 0.3s;
}

/* Adicione isso ao seu CSS */
.trumbowyg-editor p {
  margin-top: 0.5em !important;
  margin-bottom: 0.5em !important;
}

/* Ou para um espaçamento ainda menor */
.trumbowyg-editor p {
  margin: 0 !important;
  padding: 0.2em 0 !important;
}

/* Garantir que a modal de upload de imagem fique sempre na frente */
.trumbowyg-modal {
  z-index: 99999999 !important;
}

.trumbowyg-editor {
  font-weight: normal !important;
}

/* Garantir que qualquer texto inserido não comece em negrito */
.trumbowyg-editor p,
.trumbowyg-editor div,
.trumbowyg-editor span,
.trumbowyg-editor * {
  font-weight: inherit !important;
}

/* Apenas aplicar negrito quando o usuário explicitamente usar a tag strong ou b */
.trumbowyg-editor strong,
.trumbowyg-editor b {
  font-weight: bold !important;
}

@keyframes zoomModal {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0.98);
  }
}

.zoom-animation {
  animation: zoomModal 0.15s ease-out;
}

/* Estilos para os cartões de caixa mais compactos */
.caixa-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 15px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: #fff;
  position: relative;
}

.caixa-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1);
}

.caixa-header {
  padding: 12px 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.caixa-header::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.caixa-status-aberto {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.caixa-status-fechado {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.caixa-body {
  padding: 12px 16px;
  background-color: #ffffff;
}

.caixa-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.caixa-info-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.caixa-info-label {
  font-weight: 500;
  color: #64748b;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.caixa-info-label i {
  width: 16px;
  text-align: center;
  opacity: 0.7;
}

.caixa-info-value {
  color: #1e293b;
  font-weight: 600;
  font-size: 0.875rem;
  text-align: right;
}

.valor-positivo {
  color: #059669;
}

.valor-negativo {
  color: #dc2626;
}

.total-destaque {
  background: #f8fafc;
  margin: 8px -16px 0;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.total-destaque .caixa-info-label {
  color: #475569;
  font-weight: 700;
  font-size: 0.8125rem;
}

.total-destaque .caixa-info-value {
  font-size: 1rem;
  color: #0f172a;
}

.caixa-footer {
  padding: 8px;
  background-color: #ffffff;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.caixa-operador {
  display: flex;
  align-items: center;
  gap: 12px;
}

.caixa-operador h5 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 1px;
  color: #fff;
  letter-spacing: -0.01em;
}

.caixa-operador small {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 500;
}

.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
}

.indicator-aberto {
  background-color: #fff;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4);
  animation: pulse-white 2s infinite;
}

.indicator-fechado {
  background-color: #fff;
  opacity: 0.5;
}

@keyframes pulse-white {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.caixa-image {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.2;
  position: absolute;
  right: -5px;
  bottom: -5px;
  transform: rotate(-15deg);
}

.caixa-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: white;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Melhorias para responsividade */
@media (max-width: 576px) {
  .caixa-info-label {
    width: 90px;
  }

  .caixa-image {
    width: 40px;
    height: 40px;
  }
}

/* Resumo geral do período — Central do Caixa */
.caixa-resumo-periodo {
  width: 100%;
}

.caixa-resumo-titulo strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.caixa-resumo-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  height: 100%;
  min-height: 78px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.caixa-resumo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.caixa-resumo-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.caixa-resumo-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.caixa-resumo-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.caixa-resumo-valor {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  word-break: break-word;
}

.caixa-resumo-recebido {
  border-left: 4px solid #16a34a;
}

.caixa-resumo-recebido .caixa-resumo-icon {
  background: #dcfce7;
  color: #16a34a;
}

.caixa-resumo-recebido .caixa-resumo-valor {
  color: #15803d;
}

.caixa-resumo-saidas {
  border-left: 4px solid #dc2626;
}

.caixa-resumo-saidas .caixa-resumo-icon {
  background: #fee2e2;
  color: #dc2626;
}

.caixa-resumo-saidas .caixa-resumo-valor {
  color: #b91c1c;
}

.caixa-resumo-sangrias {
  border-left: 4px solid #f59e0b;
}

.caixa-resumo-sangrias .caixa-resumo-icon {
  background: #fef3c7;
  color: #d97706;
}

.caixa-resumo-sangrias .caixa-resumo-valor {
  color: #b45309;
}

.caixa-resumo-total {
  border-left: 4px solid #2563eb;
}

.caixa-resumo-total .caixa-resumo-icon {
  background: #dbeafe;
  color: #2563eb;
}

.caixa-resumo-total .caixa-resumo-valor {
  color: #1d4ed8;
}

.caixa-resumo-quebra {
  border-left: 4px solid #64748b;
}

.caixa-resumo-quebra .caixa-resumo-icon {
  background: #f1f5f9;
  color: #64748b;
}

.caixa-resumo-quebra-ok .caixa-resumo-valor {
  color: #15803d;
}

.caixa-resumo-quebra-neg {
  border-left-color: #dc2626;
}

.caixa-resumo-quebra-neg .caixa-resumo-icon {
  background: #fee2e2;
  color: #dc2626;
}

.caixa-resumo-quebra-neg .caixa-resumo-valor {
  color: #b91c1c;
}

@media (max-width: 576px) {
  .caixa-resumo-card {
    padding: 12px;
    gap: 10px;
    min-height: 70px;
  }

  .caixa-resumo-icon {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }

  .caixa-resumo-valor {
    font-size: 0.9rem;
  }

  .caixa-resumo-label {
    font-size: 0.68rem;
  }
}

/* Modo escuro — módulo Caixas */
body.dark-theme .pagina-caixas .card.custom-card {
  background: #1a1f2e !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}

body.dark-theme .pagina-caixas .text-dark {
  color: #f1f5f9 !important;
}

body.dark-theme .pagina-caixas .text-muted {
  color: #94a3b8 !important;
}

body.dark-theme .caixa-resumo-titulo strong {
  color: #f1f5f9 !important;
}

body.dark-theme .caixa-resumo-card {
  background: #1a1f2e !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}

body.dark-theme .caixa-resumo-label {
  color: #94a3b8 !important;
}

body.dark-theme .caixa-resumo-valor {
  color: #f1f5f9 !important;
}

body.dark-theme .caixa-resumo-recebido .caixa-resumo-valor {
  color: #4ade80 !important;
}

body.dark-theme .caixa-resumo-saidas .caixa-resumo-valor {
  color: #f87171 !important;
}

body.dark-theme .caixa-resumo-sangrias .caixa-resumo-valor {
  color: #fbbf24 !important;
}

body.dark-theme .caixa-resumo-total .caixa-resumo-valor {
  color: #60a5fa !important;
}

body.dark-theme .caixa-resumo-quebra .caixa-resumo-icon {
  background: rgba(148, 163, 184, 0.2) !important;
  color: #94a3b8 !important;
}

body.dark-theme .caixa-resumo-quebra-ok .caixa-resumo-valor {
  color: #4ade80 !important;
}

body.dark-theme .caixa-resumo-quebra-neg .caixa-resumo-icon {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #f87171 !important;
}

body.dark-theme .caixa-resumo-quebra-neg .caixa-resumo-valor {
  color: #f87171 !important;
}

body.dark-theme .caixa-card {
  background: #1a1f2e !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .caixa-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .caixa-body,
body.dark-theme .caixa-footer {
  background-color: #1e2433 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .caixa-info-row {
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .caixa-info-label {
  color: #94a3b8 !important;
}

body.dark-theme .caixa-info-value {
  color: #e2e8f0 !important;
}

body.dark-theme .valor-positivo {
  color: #4ade80 !important;
}

body.dark-theme .valor-negativo {
  color: #f87171 !important;
}

body.dark-theme .total-destaque {
  background: #161b26 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .total-destaque .caixa-info-label {
  color: #cbd5e1 !important;
}

body.dark-theme .total-destaque .caixa-info-value {
  color: #f8fafc !important;
}

/* Botões do rodapé do card — contraste no fundo escuro */
body.dark-theme .caixa-footer .btn-primary-soft {
  color: #93c5fd !important;
  background-color: rgba(59, 130, 246, 0.28) !important;
  border-color: rgba(96, 165, 250, 0.4) !important;
}

body.dark-theme .caixa-footer .btn-danger-soft {
  color: #fca5a5 !important;
  background-color: rgba(239, 68, 68, 0.28) !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
}

body.dark-theme .caixa-footer .btn-success-soft {
  color: #86efac !important;
  background-color: rgba(34, 197, 94, 0.28) !important;
  border-color: rgba(74, 222, 128, 0.4) !important;
}

body.dark-theme .caixa-footer .btn-info-soft {
  color: #7dd3fc !important;
  background-color: rgba(14, 165, 233, 0.28) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

body.dark-theme .caixa-footer .btn-secondary-soft {
  color: #cbd5e1 !important;
  background-color: rgba(148, 163, 184, 0.24) !important;
  border-color: rgba(203, 213, 225, 0.3) !important;
}

body.dark-theme .caixa-footer .btn[class*="-soft"]:hover {
  color: #fff !important;
}

body.dark-theme .caixa-footer .btn-primary-soft:hover {
  background-color: #3b82f6 !important;
}

body.dark-theme .caixa-footer .btn-danger-soft:hover {
  background-color: #ef4444 !important;
}

body.dark-theme .caixa-footer .btn-success-soft:hover {
  background-color: #22c55e !important;
}

body.dark-theme .caixa-footer .btn-info-soft:hover {
  background-color: #0ea5e9 !important;
}

body.dark-theme .caixa-footer .btn-secondary-soft:hover {
  background-color: #64748b !important;
}

/* Dropdown Ações em tabelas — Bootstrap (td.position-static + data-bs-display="static") */
.table td.action-buttons.position-static,
.table td.position-static .action-buttons {
  position: static !important;
}

.table td.action-buttons.position-static .dropdown-menu,
.table td.position-static .dropdown-menu {
  z-index: 1055;
}

/* Estilos personalizados para o campo select2 */

/* Personalização do Select2 */
.select2-container--default .select2-selection--single {
  height: 38px;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  line-height: 36px;
  padding-left: 12px;
  color: #495057;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 36px;
}

/* Personalização do dropdown */
.select2-dropdown {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.select2-search--dropdown .select2-search__field {
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  padding: 8px;
}

/* Estilo dos grupos de opções */
.select2-results__group {
  font-weight: bold;
  color: #212529;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

/* Estilo das opções */
.select2-results__option {
  padding: 8px 12px;
  cursor: pointer;
}

.select2-results__option--highlighted {
  background-color: #007bff;
  color: white;
}

.select2-results__option--selected {
  background-color: #e9ecef;
}

/* Ícones nas tags */
.select2-results__option i {
  margin-right: 8px;
  color: #6c757d;
  width: 16px;
  text-align: center;
}

.select2-results__option--highlighted i {
  color: white;
}

/* Animação de abertura do dropdown */
.select2-container--open .select2-dropdown {
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .select2-container {
    width: 100% !important;
  }
}

/* Tooltip de atalho */
.sel-tag-wrapper {
  position: relative;
}

.sel-tag-wrapper::after {
  content: "Ctrl+T para abrir";
  position: absolute;
  top: -25px;
  right: 0;
  font-size: 11px;
  color: #6c757d;
  background-color: #f8f9fa;
  padding: 2px 6px;
  border-radius: 3px;
  display: none;
}

.sel-tag-wrapper:hover::after {
  display: block;
}

/* Tag no editor */
.trumbowyg-editor .tag-placeholder {
  background-color: #e9ecef;
  color: #495057;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 14px;
  display: inline-block;
  margin: 0 2px;
}

/* PREELOADER */

#global-loader {
  position: fixed;
  z-index: 50000;
  background: #fff;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.loader-wrapper {
  position: relative;
}

.loader {
  width: 60px;
  height: 60px;
  border: 5px solid #f3f3f3;
  border-radius: 50%;
  border-top: 5px solid var(--template1);
  -webkit-animation: spin 1s linear infinite;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.loader-inner {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 5px solid #f3f3f3;
  border-radius: 50%;
  border-top: 5px solid var(--template2);
  top: 50%;
  left: 50%;
  margin: -20px 0 0 -20px;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
}

.loader-name {
  color: var(--template1);
  font-size: 16px;
  font-weight: 500;
  margin-top: 15px;
}

@-webkit-keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.bg-degrade-verde-escuro {
  background: linear-gradient(to right, #37745d, #77cb8f);
}

/* MENSAGEM DA HONE */

/* Animação pulsante para o ícone de mensagens */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-pulse {
  animation: pulse 1.5s infinite ease-in-out;
  color: #fff !important;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Estilo para o contador de mensagens não lidas */
.badge.header-badge {
  position: absolute;
  top: 3px;
  right: 0;
  border-radius: 50%;
  font-size: 10px;
  padding: 2px 5px;
  line-height: 1.1;
}

/* Estilo para dropdown de mensagens */
.main-message-list {
  max-height: 300px;
  overflow-y: auto;
}

.main-message-list .dropdown-item {
  padding: 10px 15px;
  transition: background-color 0.2s;
}

.main-message-list .dropdown-item:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

.main-message-list .name {
  font-size: 14px;
  color: #495057;
}

.main-message-list .desc {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 5px;
}

.avatar img {
  width: 36px;
  height: 36px;
  object-fit: cover;
}

.input-erro {
  border-color: red !important;
}

.btn-cinza-claro {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.btn-cinza-claro:hover {
  background-color: #e9ecef;
  color: #6c757d;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.btn-outline-cinza-claro {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.btn-outline-cinza-claro {
  color: #6c757d !important;
  border-color: #6c757d;
}

.btn-outline-cinza-claro:hover {
  color: #fff !important;
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-outline-cinza-claro:focus,
.btn-outline-cinza-claro.focus {
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5) !important;
}

.tarefas-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 0;
  align-items: stretch;
}
@media (min-width: 1400px) {
  .tarefas-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.tarefas-card-divider {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 2rem 0 1.5rem;
}
.tarefas-card-divider-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 1.8rem;
  border-radius: 999px;
  background: #059669;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 15px 28px rgba(5, 150, 105, 0.25);
}
.tarefas-card-divider-canceladas .tarefas-card-divider-pill {
  background: #b60000;
  box-shadow: 0 15px 28px rgba(182, 0, 0, 0.25);
}
.tarefas-card-item {
  display: flex;
}
.tarefa-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 15px 38px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  background: #ffffff;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
  min-height: 260px;
}

.tarefa-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 48px rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.35);
}

.tarefa-card-acento {
  display: block;
  height: 6px;
  width: 100%;
  background: var(--tarefa-acento, #3b82f6);
}
.tarefa-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tarefa-card-indicator {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 2px solid currentColor;
  background-color: rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.tarefa-card-indicator i {
  color: inherit;
}
.tarefa-card-id {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  display: block;
  margin-bottom: 4px;
}
.tarefa-card-title.concluida {
  text-decoration: line-through;
  color: #6b7280;
}

.tarefa-card-main {
  flex: 1;
  padding: 20px 22px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tarefa-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.tarefa-card-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tarefa-card-check {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tarefa-card-check .form-check-input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow: none;
}
.form-check-concluir .form-check-input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.tarefa-card-top-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tarefa-card-status-top {
  align-self: stretch;
}
.tarefa-card-status-top .badge {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tarefa-card-priority {
  font-size: 0.78rem;
  padding: 7px 12px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}
.tarefa-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 6px;
}
.tarefa-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
  font-size: 0.72rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}
.tarefa-chip i {
  font-size: 0.75rem;
  color: inherit;
}
.tarefa-chip-prioridade {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}
.tarefa-chip-prioridade.prioridade-baixa {
  background: rgba(14, 165, 233, 0.15);
  color: #0ea5e9;
}
.tarefa-chip-prioridade.prioridade-media,
.tarefa-chip-prioridade.prioridade-media i {
  background: rgba(245, 158, 11, 0.18);
  color: #d97706;
}
.tarefa-chip-prioridade.prioridade-alta {
  background: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}
.tarefa-chip-today {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}
.tarefa-chip-date {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}
.tarefa-chip-nodate {
  background: rgba(148, 163, 184, 0.18);
  color: #334155;
}
.tarefa-chip-time {
  background: rgba(249, 115, 22, 0.15);
  color: #ea580c;
}
.tarefa-chip-recorrencia {
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
}
.tarefa-chip-alerta {
  background: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}
.tarefa-chip-tag {
  background: var(--chip-color, rgba(99, 102, 241, 0.18));
  color: #fff;
}
.tarefa-chip-tag i {
  color: inherit;
}
.tarefa-chip-tag.chip-sem-categoria {
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
}

.tarefa-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0;
}

.tarefa-card-check .form-check-input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  border-color: rgba(15, 23, 42, 0.2);
}

.tarefa-card-desc {
  color: #6b7280;
  font-size: 0.86rem;
  line-height: 1.45;
  margin-bottom: 0;
}

.tarefa-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #475569;
  font-size: 0.8rem;
}

.tarefa-card-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.15);
}

.tarefa-card-meta i {
  color: #3b82f6;
}

.tarefa-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tarefa-card-tags .badge {
  font-size: 0.72rem;
  padding: 5px 11px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.tarefa-card-footer {
  padding: 16px 22px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: #ffffff;
}
.tarefa-card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: #6b7280;
}
.tarefa-card-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tarefa-card-info i {
  color: #93c5fd;
}

.tarefa-card-status .badge {
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tarefa-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tarefa-card-actions .btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tarefa-card-actions .btn i {
  font-size: 0.85rem;
}

.tarefa-card-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.tarefa-card-actions .btn.ocultar {
  display: none;
}
.tarefa-card-estado-concluida {
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 20px 35px rgba(16, 185, 129, 0.2);
}
.tarefa-card-estado-concluida .tarefa-card-acento {
  background: #10b981;
}
.tarefa-card-estado-concluida .tarefa-card-title {
  color: #065f46;
}
.tarefa-card-estado-cancelada {
  border-color: rgba(182, 0, 0, 0.25);
  box-shadow: 0 20px 35px rgba(182, 0, 0, 0.18);
}
.tarefa-card-estado-cancelada .tarefa-card-acento {
  background: #b60000;
}
.tarefa-card-estado-cancelada .tarefa-card-title {
  color: #7f1d1d;
  text-decoration: line-through;
}
.tarefas-card-grid-finished .tarefa-card,
.tarefas-card-grid-canceladas .tarefa-card {
  opacity: 0.95;
}
@media (max-width: 768px) {
  .tarefa-card-heading {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .tarefa-card-status-top {
    width: 100%;
    margin-top: 10px;
  }
  /* Chips em linha com quebra — não empilhar um por cima do outro */
  .tarefa-card-chips {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .tarefa-chip {
    width: auto;
    max-width: 100%;
  }
  .tarefa-card-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .tarefa-card-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .tarefas-card-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
  }
}

/* ===============================
   Módulo de Anotações - novo layout
   =============================== */
.anotacoes-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  min-width: 0;
}

.anotacoes-sidebar {
  width: 280px;
  max-width: 280px;
  flex: 0 0 280px;
  min-height: 100%;
  min-width: 0;
  overflow: hidden;
}

.anotacoes-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
  background: #fff;
}

.anotacoes-toolbar .btn-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid #edf2f7;
}

.cadernos-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-cadernos-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-caderno-item {
  border: 1px solid #edf2f7;
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  transition: all 0.2s ease;
  text-align: left;
  color: #1f2933;
}

.sidebar-caderno-item .sidebar-caderno-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sidebar-caderno-item .sidebar-caderno-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar-caderno-item .sidebar-caderno-info .title {
  font-weight: 600;
  font-size: 0.88rem;
  color: #1f2933;
  line-height: 1.2;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-caderno-item .sidebar-caderno-info small {
  color: #6c757d;
  display: block;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-caderno-item:hover {
  background: #f8fafc;
}

.sidebar-caderno-item.is-active {
  background: #f8fafc;
  border-color: #edf2f7;
  box-shadow: none;
}

/* Cofre: faixa laranja */
.sidebar-caderno-item.sidebar-caderno-cofre {
  border-left: 3px solid #f59e0b;
}

.sidebar-caderno-item:focus {
  outline: none;
}

.notebook-card.is-active,
.notebook-card.notebook-card-active {
  border: 2px solid #0d6efd;
  transform: translateY(-5px);
}

.anotacoes-destaques .notebook-card {
  margin-bottom: 0;
}

@media (max-width: 1199.98px) {
  .anotacoes-layout {
    flex-direction: column;
  }

  .anotacoes-sidebar {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
  }
}

/* Thumbnails da coluna Arquivo - Contas a Pagar/Receber */
.thumb-arquivo {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  object-fit: cover !important;
  display: block !important;
}

@keyframes pulseBadgeAprovacao {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.badge-aprovacao-pendente {
  background: #ef4444 !important;
  animation: pulseBadgeAprovacao 1.2s infinite;
}

/* ===== Botões primários: pill + gradiente (mesmo padrão do login) — painel, SaaS, modais ===== */
.btn-primary:not(.btn-close):not(.btn-link):not(.page-link) {
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  background-color: transparent;
  background-image: linear-gradient(
    90deg,
    var(--primary-bg-color, var(--primary-color, var(--template1))) 0%,
    color-mix(in srgb, var(--primary-bg-color, var(--primary-color, var(--template1))) 48%, #0f172a) 100%
  );
  border-color: transparent;
  border-radius: 12px;
  box-shadow: 0 8px 24px -6px color-mix(in srgb, var(--primary-bg-color, var(--primary-color, var(--template1))) 55%, transparent);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.btn-primary:not(.btn-close):not(.btn-link):not(.page-link):hover:not(:disabled):not(.disabled),
.btn-primary:not(.btn-close):not(.btn-link):not(.page-link):focus-visible:not(:disabled):not(.disabled) {
  background-color: transparent;
  background-image: linear-gradient(
    90deg,
    var(--primary-bg-hover, var(--template3, var(--primary-bg-color, var(--primary-color)))) 0%,
    color-mix(in srgb, var(--primary-bg-hover, var(--primary-bg-color, var(--primary-color))) 48%, #0f172a) 100%
  );
  border-color: transparent;
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -6px color-mix(in srgb, var(--primary-bg-color, var(--primary-color)) 58%, transparent);
}

.btn-primary:not(.btn-close):not(.btn-link):not(.page-link):active:not(:disabled):not(.disabled) {
  transform: translateY(0);
  filter: brightness(0.98);
}

.btn-group > .btn-primary:not(:first-child),
.input-group > .btn-primary:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.btn-group > .btn-primary:not(:last-child),
.input-group > .btn-primary:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.modal-header.bg-primary {
  background-image: linear-gradient(
    90deg,
    var(--primary-bg-color, var(--primary-color, var(--template1))) 0%,
    color-mix(in srgb, var(--primary-bg-color, var(--primary-color, var(--template1))) 45%, #0f172a) 100%
  ) !important;
  background-color: transparent !important;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

@supports not (color: color-mix(in srgb, white 50%, black)) {
  .btn-primary:not(.btn-close):not(.btn-link):not(.page-link) {
    background-image: linear-gradient(
      90deg,
      var(--primary-bg-color, var(--primary-color, var(--template1))) 0%,
      #14532d 100%
    );
    box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.18);
  }
  .btn-primary:not(.btn-close):not(.btn-link):not(.page-link):hover:not(:disabled):not(.disabled) {
    background-image: linear-gradient(
      90deg,
      var(--primary-bg-hover, var(--template3)) 0%,
      #0f3d2e 100%
    );
  }
  .modal-header.bg-primary {
    background-image: linear-gradient(
      90deg,
      var(--primary-bg-color, var(--primary-color, var(--template1))) 0%,
      #14532d 100%
    ) !important;
  }
}

/* Diagnóstico (modal): cabeçalho/corpo claros — não herdar .dark-theme .text-dark branco */
.dark-theme .diag-modal-res-card .text-dark {
  color: #0f172a !important;
}
.dark-theme .diag-modal-res-card .diag-modal-res-hdr .fw-semibold {
  color: #0f172a !important;
}


/* Modal Etiquetas (produtos): prévia — tudo aqui; não duplicar em produtos.php */
#modalEtiquetas .previa-etiqueta-amostra {
	width: 100%;
	max-width: 200px;
	text-align: center;
	font-family: Arial, Helvetica, sans-serif;
	background: #fff;
	padding: 6px 8px;
}
#modalEtiquetas .previa-etiqueta-amostra.previa-borda-sim {
	border: 1px solid #000;
	border-radius: 0;
}
#modalEtiquetas .previa-etiqueta-amostra.previa-borda-sim.previa-borda-redonda {
	border-radius: 6px;
}
#modalEtiquetas .previa-etiqueta-amostra.previa-borda-nao {
	border: none;
	border-radius: 0;
}
#modalEtiquetas .previa-etiqueta-amostra.modelo-30 {
	max-width: 168px;
}
#modalEtiquetas .previa-etiqueta-amostra.modelo-65 {
	max-width: 198px;
}
#modalEtiquetas .previa-etiqueta-amostra.modelo-96 {
	max-width: 190px;
}
#modalEtiquetas .previa-etiqueta-amostra.modelo-126 {
	max-width: 176px;
}
#modalEtiquetas .previa-etiqueta-titulo {
	font-weight: 800;
	font-size: 0.62rem;
	line-height: 1.1;
	text-transform: uppercase;
	word-break: break-word;
	margin-bottom: 4px;
	min-height: 1.1em;
}
#modalEtiquetas .previa-etiqueta-barras {
	height: 26px;
	margin: 2px 0;
	background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 3px);
	border-radius: 1px;
	opacity: 0.88;
}
#modalEtiquetas .previa-etiqueta-codigo {
	font-size: 0.65rem;
	font-weight: 700;
	margin-bottom: 4px;
	letter-spacing: 0.02em;
}
#modalEtiquetas .previa-etiqueta-preco {
	display: inline-block;
	background: #222;
	color: #fff;
	font-weight: 800;
	font-size: 0.75rem;
	padding: 2px 10px;
	border-radius: 2px;
}

/* Compra de usados — modal nova compra */
.modal-compra-usados-corpo {
	padding: 25px;
	background: #f8f9fa;
	max-height: calc(100vh - 210px);
	overflow-y: auto;
}
.modal-compra-usados-rodape {
	padding: 20px 25px;
	border-top: 2px solid #e9ecef;
	background: #fff;
}
.condicoes-aparelho-box {
	max-height: 250px;
	overflow-y: auto;
	padding: 15px;
	background: #fff;
	border-radius: 8px;
	border: 1px solid #dee2e6;
}
.condicoes-aparelho-box-sm {
	max-height: 200px;
}
.alert-valor-base-compra {
	background: #e7f3ff;
	border-radius: 10px;
}
.alert-valor-final-compra {
	background: #d4edda;
	border-radius: 10px;
}

body.dark-theme .modal-compra-usados .modal-content {
	background: #1a1f2e;
	color: #e2e8f0;
}
body.dark-theme .modal-compra-usados .modal-compra-usados-corpo {
	background: #1a1f2e !important;
	color: #e2e8f0;
}
body.dark-theme .modal-compra-usados .modal-compra-usados-rodape {
	background: #1a1f2e !important;
	border-top-color: rgba(255, 255, 255, 0.08) !important;
}
body.dark-theme .modal-compra-usados .condicoes-aparelho-box {
	background: #1e2433 !important;
	border-color: rgba(255, 255, 255, 0.1) !important;
	color: #e2e8f0;
}
body.dark-theme .modal-compra-usados .condicoes-aparelho-box .form-check-label {
	color: #e2e8f0 !important;
}
body.dark-theme .modal-compra-usados .condicoes-aparelho-box .form-check-input {
	background-color: #2a3347;
	border-color: rgba(255, 255, 255, 0.25);
}
body.dark-theme .modal-compra-usados .condicoes-aparelho-box .form-check-input:checked {
	background-color: var(--primary-bg-color, var(--template1, #0d6efd));
	border-color: var(--primary-bg-color, var(--template1, #0d6efd));
}
body.dark-theme .modal-compra-usados .alert-valor-base-compra {
	background: rgba(59, 130, 246, 0.15) !important;
	color: #93c5fd !important;
	border-color: rgba(59, 130, 246, 0.25) !important;
}
body.dark-theme .modal-compra-usados .alert-valor-final-compra {
	background: rgba(34, 197, 94, 0.15) !important;
	color: #86efac !important;
	border-color: rgba(34, 197, 94, 0.25) !important;
}
body.dark-theme .modal-compra-usados .alert-valor-final-compra .text-success {
	color: #4ade80 !important;
}
body.dark-theme .modal-compra-usados .form-label {
	color: #e2e8f0;
}

/* SweetAlert — aprovar orçamento e demais confirmações */
.swal-aprov-orc-pergunta {
	margin: 0 0 12px 0;
	color: #334155;
	font-size: 15px;
}
.swal-aprov-orc-box {
	text-align: left;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 12px;
}
.swal-aprov-orc-label {
	font-weight: 700;
	margin-bottom: 8px;
	display: block;
	color: #1e293b;
	font-size: 13px;
}
.swal-aprov-orc-select {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 38px;
	margin: 0;
	padding: 0.375rem 2rem 0.375rem 0.75rem;
	font-size: 0.875rem;
	line-height: 1.5;
	border: 1px solid #ced4da;
	border-radius: 0.375rem;
	background-color: #fff;
	color: #212529;
	box-sizing: border-box;
	appearance: auto;
}
body.dark-theme .swal2-popup {
	background: #1a1f2e !important;
	color: #e2e8f0;
}
body.dark-theme .swal2-title {
	color: #f1f5f9 !important;
}
body.dark-theme .swal2-html-container {
	color: #cbd5e1;
}
body.dark-theme .swal-aprov-orc-pergunta {
	color: #cbd5e1;
}
body.dark-theme .swal-aprov-orc-box {
	background: #1e2433;
	border-color: rgba(255, 255, 255, 0.1);
}
body.dark-theme .swal-aprov-orc-label {
	color: #e2e8f0;
}
body.dark-theme .swal-aprov-orc-select {
	background: #252d3d !important;
	color: #f1f5f9 !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
}
body.dark-theme .swal2-validation-message {
	background: rgba(239, 68, 68, 0.15);
	color: #fca5a5;
}

/* Dica de grade/variação do produto (OS, orçamento) — funciona em conteúdo AJAX sem JS */
.dica-grade {
	position: relative;
	display: inline-flex;
	align-items: center;
	cursor: help;
	vertical-align: middle;
}
/* .dica-grade vem depois de .ocultar — precisa reforçar o hide */
.dica-grade.ocultar {
	display: none !important;
}
.dica-grade::before,
.dica-grade::after {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s ease, visibility 0.15s ease;
	z-index: 1080;
}
.dica-grade::after {
	content: attr(data-dica);
	bottom: calc(100% + 8px);
	top: auto;
	min-width: 120px;
	max-width: 280px;
	padding: 6px 10px;
	font-size: 12px;
	line-height: 1.35;
	font-weight: 400;
	text-align: center;
	white-space: normal;
	color: #fff;
	background: #212529;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.dica-grade::before {
	content: '';
	bottom: calc(100% + 2px);
	top: auto;
	border: 5px solid transparent;
	border-top-color: #212529;
}
.dica-grade:hover::before,
.dica-grade:hover::after,
.dica-grade:focus-visible::before,
.dica-grade:focus-visible::after {
	opacity: 1;
	visibility: visible;
}
body.dark-theme .dica-grade::after {
	background: #334155;
	color: #f1f5f9;
}
body.dark-theme .dica-grade::before {
	border-top-color: #334155;
}

/* Ajustes mobile para painel de filtros (breadcrumb-header) */
@media (max-width: 768px) {
  .breadcrumb-header select,
  .breadcrumb-header .select2-container,
  .breadcrumb-header .btn,
  .breadcrumb-header .form-select,
  .breadcrumb-header div[style*="width:250px"],
  .breadcrumb-header div[style*="width:280px"],
  .breadcrumb-header div[style*="width:300px"],
  .breadcrumb-header div[style*="width: 250px"],
  .breadcrumb-header div[style*="width: 280px"],
  .breadcrumb-header div[style*="width: 300px"],
  .breadcrumb-header .filtros-busca > .w-100-mobile {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }
  /* Lista/Cards: não estica; fica em linha própria abaixo dos filtros */
  .breadcrumb-header .prod-visao-toggle,
  .breadcrumb-header .apl-visao-toggle {
    width: auto !important;
    flex: 0 0 auto !important;
    margin-left: 0 !important;
  }
  /* Os dois primeiros filtros (Status e Aniv) dividem a mesma linha para poupar espaço */
  .breadcrumb-header #inad,
  .breadcrumb-header #aniversariantes {
    width: calc(50% - 0.3rem) !important;
    flex: 0 0 calc(50% - 0.3rem) !important;
  }
  /* Forçar os grupos a ocuparem a tela toda no celular para os botões descerem e preencherem */
  .breadcrumb-header .d-flex {
    width: 100%;
  }
  /* Para os botões, se eles tem ícones, garante que fiquem no meio */
  .breadcrumb-header .btn {
    justify-content: center;
  }
}
/* Correcao logo mobile */
.d-lg-none .dark-logo-1 { display: none !important; }
body.dark-theme .d-lg-none .logo-1 { display: none !important; }
body.dark-theme .d-lg-none .dark-logo-1 { display: inline-block !important; }

/* Forcar scrollbar visivel no mobile */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive::-webkit-scrollbar { height: 6px; background-color: #f1f1f1; }
.table-responsive::-webkit-scrollbar-thumb { background-color: #c1c1c1; border-radius: 4px; }



/* Botoes em grupo full-width — não aplicar em btn-group-sm (toolbar WhatsApp) */
#modalForm .btn-group:not(.btn-group-sm),
#modalEquipamentos .btn-group:not(.btn-group-sm) {
	display: flex;
	width: 100%;
}
#modalForm .btn-group:not(.btn-group-sm) > .btn,
#modalEquipamentos .btn-group:not(.btn-group-sm) > .btn {
	flex: 1;
}

