/* ============================================ */
/* 1. IMPORTAÇÃO DE FONTES                      */
/* ============================================ */
@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap");

/* ============================================ */
/* 2. VARIÁVEIS GLOBAIS (BASE)                  */
/* ============================================ */
:root {
  --color-white: #ffffff;
  --color-black: #000000;
  --color-success: #00bfff;
  --color-warning: #e5780b;

  --border-radius: 8px;
  --transition-speed: 0.3s;
  --sidebar-width: 270px;
  --sidebar-collapsed-width: 80px;

  --sidebar-hover: var(--cor-primaria);
  --sidebar-active: #e9f0ff;
  --sidebar-text: #333333;
  --sidebar-icon: var(--cor-primaria);
  --sidebar-border: rgba(0, 0, 0, 0.08);
}

/* ============================================ */
/* 3. TEMAS (DARK / LIGHT)                      */
/* ============================================ */
[data-bs-theme="dark"] {
  --background: #0a0a0a;
  --background-alt: #0a0a0a;
  --surface: #0f0f12;
  --surface-alt: #343a40;
  --text-primary: #ffffff;
  --text-secondary: #b9bdc7;
  --text-muted: rgba(255, 255, 255, 0.67);
  --border-color: #31374a;
  --border-color-translucent: rgba(49, 55, 74, 0.5);
  --navbar-text: #ffffff;
  --navbar-hover: #000000;
  --card-bg: #0f0f12;
  --card-text: #ffffff;
  --hover-bg: rgba(133, 169, 255, 0.7);
  --modal-bg: #000000;
  --modal-surface: #15162e;
  --modal-highlight: var(--cor-primaria);
  --danger-color: #d71a1a;
  --danger-hover: #610909;
  --success-color: #10a159;
  --success-hover: #0b7c42;
  --primary-color: #3b82f6;
  --secondary-color: #1e40af;
  --dark-bg: #0f172a;

  --sistema-theme-control-toggle-bg: rgb(133 169 254 / 24%);
  --sistema-theme-control-toggle-hover-bg: rgb(133 169 255 / 70%);
  --sistema-theme-arrow-bg: #f5f7fa;
  --sistema-theme-border: 1px solid #31374a;
  --sistema-theme-background: #0a0a0a;
  --sistema-theme-emphasis-bg: #1e2139;
  --sistema-theme-body-bg: #0f111a;
  --sistema-theme-border-color: #31374a;
  --sistema-theme-secondary-bg: #1e2139;
  --sistema-theme-primary: #3874ff;
  --sistema-theme-border-color-translucent: rgba(49, 55, 74, 0.5);
  --sistema-theme-input-select-2-bg: #212529;
  --sistema-theme-color-nav-bar: #ffffff;
  --sistema-theme-color-nav-bar-hover: #000000;
  --sitema-theme-color-kanban-column: #212529;
  --sistema-theme-color-kanban-card: #343a40;
  --sistema-theme-color-services-header: #212529;
  --sistema-theme-color-public-content: #0f111a;
  --sistema-theme-color-public-content-input: #212529;
  --sistema-theme-color-public-content-cards: #1e1e1e;
  --sistema-theme-color-public-content-cards-h: #00bfff;
  --sistema-theme-color-public-content-cards-p: rgba(255, 255, 255, 0.671);
  --sistema-theme-color-acompanhar-operacao: #212529;
  --sistema-theme-color-notification-item: #2c2f36;
  --sistema-theme-card-text: #ffffff;
  --sistema-theme-color-user-message: #1e2139;
  --sistema-theme-services-text-color: #b9bdc7;
  --sistema-theme-select2-results-message-text: #d0e6ff;
  --sistema-theme-select2-results-message-bg: #0f111a;
  --sistema-theme-template-item-bg: #212529;
  --sistema-theme-template-item-info: #ffffff;
  --sistema-theme-template-item-hover: #2c2f36;
  --public-request-operation-border: rgba(255, 255, 255, 0.359);
  --sistema-theme-template-swal-model: rgb(15, 17, 26);
  --bs-body-bg: var(--card-bg);
}

[data-bs-theme="light"] {
  --background: #dee3eb;
  --background-alt: #dee3eb;
  --surface: #e4e9f7;
  --surface-alt: #ffffff;
  --text-primary: #2e2e2e;
  --text-secondary: #6b7280;
  --text-muted: #8f969c;
  --border-color: #ffffff;
  --border-color-translucent: rgba(233, 236, 239, 0.5);
  --navbar-text: #333333;
  --navbar-hover: #000000;
  --card-bg: #f9fafb;
  --card-text: #000000;
  --hover-bg: rgba(0, 0, 0, 0.05);
  --modal-bg: #ffffff;
  --modal-surface: #ffffff;
  --modal-highlight: var(--cor-primaria);
  --danger-color: #d71a1a;
  --danger-hover: #610909;
  --success-color: #10a159;
  --success-hover: #0b7c42;
  --primary-color: #3b82f6;
  --secondary-color: #1e40af;
  --dark-bg: #0f172a;

  --sistema-theme-control-toggle-bg: rgba(255, 204, 133, 0.24);
  --sistema-theme-control-toggle-hover-bg: #e5780b;
  --sistema-theme-control-toggle-color: #e5780b;
  --sistema-theme-border: 1px solid #e9ecef;
  --sistema-theme-background: #dee3eb;
  --sistema-theme-arrow-bg: #3874ff;
  --sistema-theme-emphasis-bg: #ffffff;
  --sistema-theme-body-bg: #ffffff;
  --sistema-theme-border-color: #e9ecef;
  --sistema-theme-secondary-bg: #f5f7fa;
  --sistema-theme-primary: #3874ff;
  --sistema-theme-border-color-translucent: rgba(233, 236, 239, 0.5);
  --sistema-theme-input-select-2-bg: #ffffff;
  --sistema-theme-color-nav-bar: #333333;
  --sistema-theme-color-nav-bar-hover: #000000;
  --sistema-theme-color-services-header: #ffffff;
  --sistema-theme-color-public-content: #dee3eb;
  --sistema-theme-color-public-content-input: #ffffff;
  --sistema-theme-color-public-content-cards: #ffffff;
  --sistema-theme-color-public-content-cards-h: #000000;
  --sistema-theme-color-public-content-cards-p: #8f969c;
  --sistema-theme-color-acompanhar-operacao: #ffffff;
  --sistema-theme-color-notification-item: #2ef1ff2a;
  --sistema-theme-card-text: #000000;
  --sistema-theme-color-user-message: #f5f7fa;
  --sistema-theme-services-text-color: #6b6b6b;
  --sistema-theme-select2-results-message-text: #000000;
  --sistema-theme-select2-results-message-bg: #ffffff;
  --sistema-theme-template-item-bg: #ffffff;
  --sistema-theme-template-item-info: #212529;
  --sistema-theme-template-item-hover: #e0f2fe;
  --public-request-operation-border: rgba(0, 0, 0, 0.359);
  --sistema-theme-template-swal-model: #ffffff;
  --bs-body-bg: var(--card-bg);
}

/* ============================================ */
/* 4. ESTILOS GLOBAIS                           */
/* ============================================ */
body {
  font-family: "Nunito Sans", sans-serif;
  background-color: var(--sistema-theme-background);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* ============================================ */
/* 5. HEADER / TOPO                             */
/* ============================================ */
input.search-input {
  width: 100%;
  max-width: 330px;
  padding: 5px 20px;
}

img.icon-user {
  width: 50px;
  height: 50px;
  object-fit: cover;
}

.assets-topo {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.edit-pers,
.switch-theme {
  background-color: var(--border-color-translucent);
  height: 45px;
  width: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
  transition: all var(--transition-speed) ease;
  cursor: pointer;
}

.edit-pers:hover {
  transform: rotate(360deg);
}

.switch-theme:hover {
  transform: rotate(180deg);
}

.switch-theme i {
  color: var(--color-warning);
  transition: color 0.3s ease;
}

.header-nav .messages .message-item p {
  font-size: 13px;
  margin-bottom: 3px;
  color: var(--text-secondary);
}

.header-nav .messages .message-item:hover {
  background-color: var(--hover-bg);
}

.header-nav .profile {
  min-width: 240px;
  padding-bottom: 0;
  top: 8px !important;
}

.header-nav .profile .dropdown-header h6 {
  font-size: 18px;
  margin-bottom: 0;
  font-weight: 600;
}

.header-nav .profile .dropdown-header span {
  font-size: 14px;
}

.header-nav .profile .dropdown-item {
  font-size: 14px;
  padding: 10px 15px;
  transition: var(--transition-speed);
}

.header-nav .profile .dropdown-item i {
  margin-right: 10px;
  font-size: 18px;
  line-height: 0;
}

.header-nav .profile .dropdown-item:hover {
  background-color: var(--hover-bg);
}

button.marcar-lida-notificacoes {
  background: none;
  border: none;
  padding: 0;
}

/* ============================================ */
/* 6. CONTEÚDO PRINCIPAL                        */
/* ============================================ */
.content {
  min-height: 100vh;
  margin-top: 81px;
  margin-left: var(--sidebar-width);
  padding: 60px 40px 40px;
  transition: margin-left var(--transition-speed) ease;
  overflow-x: hidden;
}

body.sidebar-collapsed .content {
  margin-left: var(--sidebar-collapsed-width);
}

/* ============================================ */
/* 7. GRÁFICOS (APEXCHARTS)                     */
/* ============================================ */
text.apexcharts-text.apexcharts-yaxis-label,
text.apexcharts-text.apexcharts-xaxis-label,
.apexcharts-tooltip.apexcharts-theme-light.apexcharts-active,
.apexcharts-tooltip-title,
.apexcharts-tooltip * {
  font-size: 16px;
  color: var(--bs-tertiary-color) !important;
  fill: var(--bs-tertiary-color) !important;
}

.h-box {
  height: 198px;
}

/* ============================================ */
/* 8. ASSETS / USUÁRIOS                        */
/* ============================================ */
.thumb-users img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 100%;
  padding: 4px;
}

.search-box input {
  width: 100%;
  max-width: 300px;
}

td.td-users-icons-name {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
}

/* ============================================ */
/* 9. TABELAS E PAGINAÇÃO                       */
/* ============================================ */
.table-default-system ul.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.table-default-system ul.pagination li a {
  color: #fff;
  padding: 0.5rem 0.75rem;
  font-size: 16px;
  border-radius: var(--border-radius);
  text-decoration: none;
  background: var(--text-secondary);
}

.table-default-system ul.pagination li.active a {
  background-color: var(--primary-color);
}

.sort {
  cursor: pointer;
  position: relative;
}

.sort::before {
  content: "\f0b0";
  position: absolute;
  top: 5px;
  right: 5px;
  font-family: "Font Awesome 6 Free";
}

.sort:hover {
  background-color: var(--sistema-theme-background);
}

.sort:focus {
  outline: none;
}

.sort:after {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid transparent;
  content: "";
  position: relative;
  top: -10px;
  right: -5px;
}

.sort.asc:after {
  border-top: 5px solid var(--sistema-theme-arrow-bg);
  position: relative;
  top: 13px;
  right: -5px;
}

.sort.desc:after {
  border-bottom: 5px solid var(--sistema-theme-arrow-bg);
  position: relative;
  top: -10px;
  right: -5px;
}

/* ============================================ */
/* 10. ELEMENTOS DE FORMULÁRIO                  */
/* ============================================ */
.eye-pass {
  position: relative;
}

.eye-pass span.view-pass {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
}

.form-select {
  padding: 1rem 0.75rem;
}

span.select2-selection.select2-selection--multiple {
  padding: 12px 0px;
  background-color: var(--sistema-theme-background);
  border: 1px solid var(--border-color) !important;
}

.select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__display {
  color: var(--text-primary);
}

.select2-container {
  display: block !important;
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  background-color: var(--sistema-theme-input-select-2-bg);
}

.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: var(--text-primary);
}

.select2-results__option--selectable {
  color: var(--text-primary);
  background-color: var(--sistema-theme-background);
}

.select2-search--dropdown {
  background-color: var(--sistema-theme-background);
}

input.select2-search__field:focus-visible {
  border: none;
  outline: none;
}

.select2-results__message {
  color: var(--text-secondary);
  background-color: var(--surface);
}

/* ============================================ */
/* 11. SWEETALERT                               */
/* ============================================ */
.swal-custom {
  background-color: var(--sistema-theme-background);
  color: var(--text-primary);
}

.swal-custom .swal-title,
.swal-custom .swal-text {
  color: var(--text-primary);
}

.swal-custom .swal-footer {
  background-color: var(--sistema-theme-background);
}

.swal-custom .swal-button {
  background-color: var(--sistema-theme-control-toggle-bg);
  color: var(--sistema-theme-control-toggle-color);
}

.swal-custom .swal-button:hover {
  background-color: var(--sistema-theme-control-toggle-hover-bg);
  color: #fff;
}

.swal-custom .swal-icon--success:after,
.swal-custom .swal-icon--success:before {
  background-color: transparent;
}

.swal-icon--success__hide-corners {
  background-color: transparent;
}

.swal-custom .swal-icon--success__ring {
  border: 4px solid var(--success-color);
}

.swal-btns-space .swal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.swal-btns-space .swal-button-container {
  flex: none;
}

.swal-btns-space .swal-button {
  padding: 8px 16px;
  font-size: 14px;
}

.swal-btns-space button.swal-button.swal-button--cancel {
  background-color: var(--danger-color);
  color: #fff;
}

.swal-btns-space button.swal-button.swal-button--cancel:hover {
  background-color: var(--danger-hover);
  color: #fff;
}

button.swal-button.swal-button--confirm.swal-button--danger {
  background-color: var(--success-color);
  color: #fff;
}

button.swal-button.swal-button--confirm.swal-button--danger:hover {
  background-color: var(--success-hover);
  color: #fff;
}

.swal-modal,
.swal-title,
.swal-text {
  background-color: var(--surface) !important;
  color: var(--text-primary) !important;
}

/* ============================================ */
/* 12. BOTÕES E DROPDOWNS                       */
/* ============================================ */
.btn-check:checked + .btn:focus-visible,
.btn.active:focus-visible,
.btn.show:focus-visible,
.btn:first-child:active:focus-visible,
:not(.btn-check) + .btn:active:focus-visible {
  border: none !important;
}

.btn-check:checked + .btn,
.btn.active,
.btn.show,
.btn:first-child:active,
:not(.btn-check) + .btn:active {
  border: none !important;
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--sistema-theme-background);
}

/* ============================================ */
/* 13. DROPZONE                                 */
/* ============================================ */
.dropzone {
  background: transparent;
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
}

.dropzone .dz-preview.dz-image-preview {
  background: transparent;
}

.dz-preview .dz-image {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  width: 100% !important;
}

.dz-preview .dz-image img {
  max-width: 100%;
  max-height: 100%;
}

.dz-image i {
  font-size: 120px;
  position: absolute;
  top: 0;
}

.dz-preview .dz-progress {
  background-color: var(--sidebar-hover);
  border-radius: 5px;
  overflow: hidden;
  height: 20px;
}

.dz-preview .dz-progress .dz-upload {
  background-color: var(--success-color);
  height: 100%;
  width: 0;
  transition: width var(--transition-speed) ease-in-out;
}

.dz-preview .dz-error-message {
  color: var(--danger-color);
}

.dz-preview .dz-success-mark,
.dz-preview .dz-error-mark {
  display: none;
}

.dz-filename {
  display: none;
}

.dropzone .dz-preview.dz-image-preview:hover .dz-details .dz-filename {
  display: block !important;
}

.dropzone .dz-preview:hover .dz-details .dz-filename span {
  position: absolute;
  top: -20px;
  left: 0 !important;
  background: var(--sistema-theme-primary);
  color: #fff;
}

div#upload-progress {
  position: fixed;
  right: 25px;
  bottom: 0;
  -webkit-animation: scale-up-center 1s ease-in-out infinite alternate both;
  animation: scale-up-center 1s ease-in-out infinite alternate both;
}

#produto-dropzone > div.dz-preview.d-flex.flex-wrap {
  display: none !important;
}

/* ============================================ */
/* 14. PRODUTO / IMAGENS                        */
/* ============================================ */
.img-container {
  width: 220px;
  height: 150px;
  overflow: hidden;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--sidebar-hover);
  margin-bottom: 12px;
}

.produto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-image-btn {
  position: absolute;
  top: 5px;
  right: 5px;
}

span.ordem-imgs {
  position: absolute;
  left: 6px;
  top: 6px;
  background: var(--card-bg);
  padding: 5px;
  border-radius: 6px;
  font-size: 12px;
  cursor: move;
}

/* ============================================ */
/* 15. CONFIGURAÇÕES E CARDS                    */
/* ============================================ */
.box-card-funcoes {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--border-radius);
}

.box-card-funcoes-header i {
  font-size: 20px;
  margin-bottom: 19px;
}

.box-card-funcoes a {
  text-decoration: none;
}

.card-home {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.card-home h4 {
  font-size: clamp(2rem, 5vw, 60px);
}

.card-home i {
  font-size: 25px;
  color: var(--primary-color);
}

.card-body .card-text {
  color: var(--text-secondary);
}

.card-body .card-title {
  color: var(--text-primary);
}

.card-body {
  background-color: var(--card-bg);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.config-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.config-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--cor-primaria) !important;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.config-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--cor-primaria);
}

.config-card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.card-icon.loans {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.card-icon.simulations {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.card-icon.commissions {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.card-icon.notifications {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

.card-icon.palette {
  background: linear-gradient(135deg, #1892f5, #eb0b0b);
  color: white;
}

.config-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.card-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-primary-custom {
  background: var(--cor-primaria);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  color: white;
}

.btn-secondary-custom {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary-custom:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(59, 130, 246, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ============================================ */
/* 16. PÁGINA INICIAL (ANÁLISES DE CRÉDITO)    */
/* ============================================ */
.analises-creditos-home #serviceContainer {
  margin-bottom: 2rem;
}

.analises-creditos-home #serviceContainer i {
  z-index: 1;
  position: relative;
}

.analises-creditos-home .service-card-modern {
  border-radius: 12px;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.analises-creditos-home .service-card-modern:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.analises-creditos-home .card-header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  ) !important;
  border-radius: 12px 12px 0 0;
  color: var(--color-light);
  position: relative;
  z-index: 1;
}

.analises-creditos-home .header-overlay {
  border-radius: 12px 12px 0 0;
}

.analises-creditos-home .card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.analises-creditos-home .card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.analises-creditos-home .btn-outline-primary {
  border-radius: 20px;
  padding: 8px 16px;
  font-weight: 600;
}

.analises-creditos-home .btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: var(--color-light);
}

.analises-creditos-home #searchService {
  border-radius: 25px;
  padding: 10px 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================ */
/* 17. PÁGINA DE SOLICITAÇÕES DE CRÉDITO       */
/* ============================================ */
.analises-creditos-solicitar .form-step {
  animation: fadeIn 0.4s ease-in-out;
}

.analises-creditos-solicitar .progress {
  background-color: var(--color-white);
  height: 10px;
}

.analises-creditos-solicitar .progress-bar {
  background: linear-gradient(90deg, var(--color-success), #218838);
  height: 10px;
}

.analises-creditos-solicitar .form-control,
.analises-creditos-solicitar .form-select {
  height: 52px;
  font-size: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease-in-out;
}

.analises-creditos-solicitar .form-control:focus,
.analises-creditos-solicitar .form-select:focus {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border-color: var(--color-success);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.analises-creditos-solicitar button {
  border-radius: 30px;
}

.analises-creditos-solicitar textarea {
  height: 120px;
}

.analises-creditos-solicitar input[type="file"] {
  height: auto;
}

.analises-creditos-solicitar .is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* ============================================ */
/* 18. CRM / KANBAN                             */
/* ============================================ */
.kanban-full .kanban-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  overflow-x: auto;
  padding-bottom: 20px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 46, 46, 0.67) var(--color-white);
}

.kanban-full .kanban-container::-webkit-scrollbar {
  height: 10px;
}

.kanban-full .kanban-container::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

.kanban-full .kanban-container::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

.kanban-full .kanban-container::-webkit-scrollbar-track {
  background: var(--color-white);
  border-radius: 5px;
}

.kanban-full .kanban-cards {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: var(--text-secondary) var(--color-white);
}

.kanban-full .kanban-cards::-webkit-scrollbar {
  width: 8px;
}

.kanban-full .kanban-cards::-webkit-scrollbar-thumb {
  background: var(--color-success);
  border-radius: 5px;
}

.kanban-full .kanban-cards::-webkit-scrollbar-thumb:hover {
  background: #1e7e34;
}

.kanban-full .kanban-cards::-webkit-scrollbar-track {
  background: var(--color-white);
  border-radius: 5px;
}

.kanban-full .kanban-column {
  background: var(--surface);
  border-radius: 8px;
  min-width: 300px;
  max-width: 300px;
  padding: 10px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.kanban-full .kanban-header {
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
  padding: 10px;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.kanban-full .kanban-count {
  background: var(--color-white);
  color: var(--color-light);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 14px;
  position: absolute;
  top: 5px;
  right: 10px;
}

.kanban-full .kanban-cards {
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
}

.kanban-full .kanban-card {
  background-color: var(--surface-alt);
  padding: 10px;
  margin-bottom: 24px !important;
  border-radius: 5px;
  cursor: grab;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  border-left: 5px solid var(--primary-color);
}

.kanban-full .add-card,
.kanban-full .add-column {
  background: var(--primary-color);
  color: var(--color-light);
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 5px;
  margin-top: 10px;
  width: 100%;
}

.kanban-full .add-card:hover,
.kanban-full .add-column:hover {
  background: var(--secondary-color);
}

.kanban-full .card-info {
  font-size: 14px;
  color: var(--text-secondary);
}

.kanban-full .card-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}

.kanban-full .card-actions i {
  cursor: pointer;
}

.kanban-full .cursor-pointer {
  cursor: pointer;
}

/* ============================================ */
/* 19. COMENTÁRIOS E MENSAGENS                  */
/* ============================================ */
#listaComentarios {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

#listaComentarios::-webkit-scrollbar {
  width: 8px;
}

#listaComentarios::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  border-radius: 4px;
}

.mention-item {
  cursor: pointer;
  font-weight: bold;
}

.comment-card {
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.comment-user {
  font-weight: bold;
}

.comment-time {
  font-size: 12px;
}

.dropdown-menu-itens-acoes li {
  cursor: pointer;
}

/* ============================================ */
/* 20. PÁGINA PÚBLICA (PUBLIC CONTENT)         */
/* ============================================ */
main.public-content {
  margin-top: 84px;
  background-color: var(--background-alt);
}

main img.logo-img {
  width: 160px;
}

.logo img {
  width: 140px;
  height: 100%;
}

.logo img,
.logo-light,
.logo-dark,
.logo-img {
  width: 160px;
  height: 100%;
}

main img.logo-img {
  width: 160px;
}

.logo-dark {
  display: none;
}

.logo-light {
  display: inline;
}

[data-bs-theme="dark"] .logo-light {
  display: none;
}

[data-bs-theme="dark"] .logo-dark {
  display: inline;
}

.bg-navbar-public {
  background: var(--surface) !important;
}

.h-100vh {
  height: 100vh;
  margin-top: 12px;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 1.25rem;
  color: var(--text-secondary);
  z-index: 5;
}

.btn-busca:hover {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.conteudo-modal {
  border-radius: 0.5rem;
  border: none;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

#modalBuscaAvancada .form-floating > label {
  padding-left: 2.5rem;
}

#modalBuscaAvancada .form-floating .form-control {
  padding-left: 2.5rem;
  height: calc(3.5rem + 2px);
}

.search-container .bg-input,
.search-container .form-control {
  background-color: var(--input-bg) !important;
}

/* ============================================ */
/* 21. TOGGLE ON/OFF                            */
/* ============================================ */
.onoff input.toggle {
  display: none;
}

.onoff input.toggle + label {
  display: inline-block;
  position: relative;
  height: 40px;
  width: 70px;
  border-radius: 20px;
  background-color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.2s;
}

.onoff input.toggle + label:after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  height: 36px;
  width: 36px;
  background-color: var(--surface);
  border-radius: 50%;
  transition: left 0.2s;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.onoff input.toggle:checked + label {
  background-color: var(--success-color);
}

.onoff input.toggle:checked + label:after {
  left: 32px;
}

/* ============================================ */
/* 22. MODAIS ESPECÍFICOS                       */
/* ============================================ */
#modalComentarios #listaComentarios {
  max-height: 500px;
  overflow-y: auto;
}

#modalComentarios .card.bg-primary {
  border: none;
}

#modalComentarios .card.bg-light {
  border: 1px solid var(--border-color);
}

.text-start {
  text-align: left !important;
}

.text-end {
  text-align: right !important;
}

#modalControleDocs .modal-header {
  border-bottom: 2px solid var(--primary-color);
}

#modalControleDocs .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: var(--color-white);
}

#modalControleDocs .badge {
  font-size: 0.9rem;
}

#modalControleDocs .btn-sm {
  margin-right: 5px;
}

.bg-sub {
  background-color: var(--surface);
}

/* ============================================ */
/* 23. LOADER E ANIMAÇÕES                       */
/* ============================================ */
.ajax-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8)
    url("https://retchhh.wordpress.com/wp-content/uploads/2015/03/loading7.gif")
    no-repeat center;
  z-index: 9999;
  display: none;
}

@-webkit-keyframes scale-up-center {
  0% {
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
  }
  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@keyframes scale-up-center {
  0% {
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
  }
  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ============================================ */
/* 24. OUTROS UTILITÁRIOS                       */
/* ============================================ */
#modalOrdenarServicos li {
  cursor: all-scroll;
}

.sortable-service-placeholder {
  background-color: var(--surface);
  border: 2px dashed var(--border-color);
  min-height: 150px;
  border-radius: 0.5rem;
}

.ui-sortable-helper {
  background-color: var(--card-bg) !important;
  border: 2px dashed var(--primary-color) !important;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
  opacity: 1.2;
}

.form-select-sm,
.pagination > li > a {
  background-color: var(--card-bg) !important;
  color: var(--text-primary) !important;
}

.preview {
  background-color: var(--preview-bg) !important;
  color: var(--preview-text) !important;
}

.preview-bg {
  background-color: var(--preview-overlay) !important;
}

/* ============================================ */
/* 25. HEADER (SEÇÃO CONFIGURAÇÕES)             */
/* ============================================ */
.main-content {
  margin-left: 280px;
  min-height: 100vh;
  transition: all 0.3s ease;
}

.main-content.expanded {
  margin-left: 80px;
}

.header {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.breadcrumb {
  background: none;
  margin: 0;
  padding: 0;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-toggle:hover {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.1);
}

/* ============================================ */
/* 26. CONTEÚDO DA ÁREA (PÁGINAS INTERNAS)    */
/* ============================================ */
.content-area {
  padding: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
}

.page-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* ============================================ */
/* 27. LOADING SPINNER                          */
/* ============================================ */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================ */
/* 28. NOTIFICATION BADGE                       */
/* ============================================ */
.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger-color);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ============================================ */
/* 29. TEMPLATES E SERVIÇOS                     */
/* ============================================ */
.modal-body .template-item {
  background-color: var(--card-bg);
}

.modal-body .template-item:hover {
  background-color: var(--hover-bg);
}

.template-name,
.info-item,
.template-icons {
  color: var(--text-secondary) !important;
}

.btn-share-service {
  border: none !important;
}

.text-danger-important {
  --bs-text-opacity: 1;
  color: rgba(var(--danger-rgb), var(--bs-text-opacity)) !important;
}

/* ============================================ */
/* 30. DOCUMENTOS PENDENTES                     */
/* ============================================ */
.upload-section {
  background-color: var(--card-bg) !important;
}

.document-icon {
  background-color: var(--card-bg) !important;
  border: none !important;
}

.document-details .document-name {
  color: var(--text-secondary);
}

.document-content .attachment-info {
  background-color: var(--card-bg) !important;
}

.nome-doc {
  max-width: 50px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-doc {
  max-width: 180px;
}

/* ============================================ */
/* 31. APEXCHARTS (AJUSTES ADICIONAIS)         */
/* ============================================ */
.apexcharts-tooltip {
  color: var(--text-secondary) !important;
  background: var(--surface) !important;
}

.apexcharts-tooltip .apexcharts-tooltip-title {
  color: var(--text-secondary) !important;
  background: var(--surface) !important;
}

.apexcharts-menu {
  color: var(--text-secondary) !important;
  background-color: var(--surface) !important;
}

.apexcharts-menu-item {
  color: var(--text-secondary);
  font-size: 14px;
}

.apexcharts-menu-item:hover {
  background-color: rgba(88, 88, 88, 0.3) !important;
}

.apexcharts-title-text {
  fill: var(--text-secondary) !important;
}

/* ============================================ */
/* 32. CRM / AGENDA                             */
/* ============================================ */
#agendaContainer {
  background-color: var(--surface);
}

/* ============================================ */
/* 33. FOOTER                                   */
/* ============================================ */
footer.footer-system {
  margin-left: var(--sidebar-width);
  padding: 1rem 40px;
  text-align: center;
  transition: margin-left var(--transition-speed) ease;
}

body.sidebar-collapsed footer {
  margin-left: var(--sidebar-collapsed-width);
}

/* ============================================ */
/* 34. AJUSTES DE FOCUS E ACESSIBILIDADE        */
/* ============================================ */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ============================================ */
/* 35. INPUTS / SELECTS TEMÁTICOS               */
/* ============================================ */

/* Inputs e selects que respondem ao dark/light mode */
.themed-input {
  background-color: var(--surface) !important;
  border-color: var(--sistema-theme-border-color) !important;
  color: var(--text-primary) !important;
}

.themed-input:focus {
  background-color: var(--surface) !important;
  border-color: var(--primary-color) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.themed-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Input group addon temático */
.input-group-text.themed-input {
  background-color: var(--surface) !important;
  border-color: var(--sistema-theme-border-color) !important;
  color: var(--text-secondary) !important;
}

/* Opções de select no dropdown */
.themed-input option {
  background-color: var(--surface);
  color: var(--text-primary);
}

/* ─── Módulo: Planos / Fechamento ─────────────────────────────────────────── */

/* Tabelas sem bg fixo — Bootstrap cuida via data-bs-theme */
.table-planos thead th,
.table-planos tbody td {
  border-color: var(--sistema-theme-border-color);
}

/* Badge forma de pagamento nos botões de seleção */
#pag-forma-grid .btn-check:checked + .btn {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

#pag-forma-grid .btn-check:checked + .btn i {
  color: #fff !important;
}

/* Linha da tabela de fechamento hover */
.linha-fechamento:hover td {
  background-color: var(--hover-bg);
}

/* Linha do cargo hover */
.linha-cargo:hover td {
  background-color: var(--hover-bg);
}

/* Modal com tema correto */
.modal-content[style*="modal-surface"] {
  border: 1px solid var(--sistema-theme-border-color);
}
