.w-4rem {
  width: 4rem !important;
}

/* Em telas pequenas, mantém o padding padrão do AdminLTE (0 .5rem) para aproveitar o espaço */
@media (min-width: 576px) {
  .app-content {
    padding: 0.8rem !important;
  }
}

.divider {
  margin: 10px 0;
  height: 0;
  font-weight: var(--font-weight-medium);
  color: var(--bs-secondary-color);
  font-size: 1rem;
  width: 100%
}

h4.divider {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem
}

.divider:not(.divider-text) {
  border-top: 1px solid var(--bs-secondary-color);
}

.divider.divider-text {
  display: flex;
  align-items: center;
  padding: 5px 0
}

.divider.divider-text:before,
.divider.divider-text:after {
  content: "";
  flex: 1;
  border-top: var(--bs-border-width) solid var(--bs-secondary-color);
  opacity: 0.25;
}

.divider.divider-text:before {
  margin-right: .75em
}

.divider.divider-text:after {
  margin-left: .75em
}

.profile-user-img {
  border: 3px solid #adb5bd;
  margin: 0 auto;
  padding: 3px;
  width: 100px;
}

.profile-username {
  font-size: 21px;
  margin-top: 5px;
}

.navbar-nav>.user-menu>.dropdown-menu {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  width: auto;
  padding: 0.5rem;
}

/* Notificações: texto do menu do cabeçalho limitado a 3 linhas */
.notificacoes-dropdown-texto {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  white-space: pre-line;
}

/* Notificações: em telas estreitas o menu ocupa a largura do cabeçalho.
   O sino não é o último item da navbar, então "dropdown-menu-end" + min-width
   do AdminLTE (280px) empurrava o menu para fora da borda esquerda. Tornando o
   <li> estático, o menu passa a se posicionar em relação à .navbar. */
@media (max-width: 575.98px) {
  .navbar .notificacoes-nav-item {
    position: static;
  }

  .navbar .notificacoes-nav-item>.notificacoes-dropdown {
    top: 100%;
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    min-width: 0;
    max-width: none;
  }
}

/* Notificações: destaca a notificação aberta a partir do menu (#notificacao-<pk>) */
.notificacoes-item {
  scroll-margin-top: 5rem;
}

.notificacoes-item:target {
  box-shadow: inset 4px 0 0 var(--bs-primary);
  animation: notificacoes-destaque 2s ease-out;
}

@keyframes notificacoes-destaque {
  from {
    background-color: var(--bs-warning-bg-subtle);
  }
}

table.table thead th.sortable .sort-icon {
  background: url("../img/sort_both.6644ee18221c.png") no-repeat center right;
  display: inline-block;
  width: 1em;
}

table.table th.asc .sort-icon {
  background: url("../img/sort_asc.78cd89b5cbd7.png") no-repeat center right;
  display: inline-block;
  width: 1em;
}

table.table thead th.desc .sort-icon {
  background: url("../img/sort_desc.7b3e57762230.png") no-repeat center right;
  display: inline-block;
  width: 1em;
}


.pagination .page-link {
  border: 0;
}

.w-70px {
  width: 70px !important;
}

.cursor-pointer {
  cursor: pointer;
}

/* Menu Lateral */

.sidebar-wrapper .nav-link p {
  overflow: visible;
  white-space: normal;
}

/*
* Timeline
*/
/**
.timeline {
  margin: 0 0 45px;
  padding: 0;
  position: relative;
}

.timeline::before {
  border-radius: 0.25rem;
  background-color: #dee2e6;
  bottom: 0;
  content: "";
  left: 31px;
  margin: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

.timeline>div {
  margin-bottom: 15px;
  margin-right: 10px;
  position: relative;
}

.timeline>div::before,
.timeline>div::after {
  content: "";
  display: table;
}

.timeline>div>.timeline-item {
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
  border-radius: 0.25rem;
  background-color: #fff;
  color: #495057;
  margin-left: 60px;
  margin-right: 15px;
  margin-top: 0;
  padding: 0;
  position: relative;
}

.timeline>div>.timeline-item>.time {
  color: #999;
  float: right;
  font-size: 12px;
  padding: 10px;
}

.timeline>div>.timeline-item>.timeline-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  color: #495057;
  font-size: 16px;
  line-height: 1.1;
  margin: 0;
  padding: 10px;
}

.timeline>div>.timeline-item>.timeline-header>a {
  font-weight: 600;
}

.timeline>div>.timeline-item>.timeline-body,
.timeline>div>.timeline-item>.timeline-footer {
  padding: 10px;
}

.timeline>div>.timeline-item>.timeline-body>img {
  margin: 10px;
}

.timeline>div>.timeline-item>.timeline-body>dl,
.timeline>div>.timeline-item>.timeline-body ol,
.timeline>div>.timeline-item>.timeline-body ul {
  margin: 0;
}

.timeline>div>.timeline-item>.timeline-footer>a {
  color: #fff;
}

.timeline>div>.fa,
.timeline>div>.fas,
.timeline>div>.far,
.timeline>div>.fab,
.timeline>div>.fal,
.timeline>div>.fad,
.timeline>div>.svg-inline--fa,
.timeline>div>.ion {
  background-color: #adb5bd;
  border-radius: 50%;
  font-size: 16px;
  height: 30px;
  left: 18px;
  line-height: 30px;
  position: absolute;
  text-align: center;
  top: 0;
  width: 30px;
}

.timeline>div>.svg-inline--fa {
  padding: 7px;
}

.timeline>.time-label>span {
  border-radius: 4px;
  background-color: #fff;
  display: inline-block;
  font-weight: 600;
  padding: 5px;
}

.timeline-inverse>div>.timeline-item {
  box-shadow: none;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
}

.timeline-inverse>div>.timeline-item>.timeline-header {
  border-bottom-color: #dee2e6;
}

.dark-mode .timeline::before {
  background-color: #6c757d;
}

.dark-mode .timeline>div>.timeline-item {
  background-color: #343a40;
  color: #fff;
  border-color: #6c757d;
}

.dark-mode .timeline>div>.timeline-item>.timeline-header {
  color: #ced4da;
  border-color: #6c757d;
}

.dark-mode .timeline>div>.timeline-item>.time {
  color: #ced4da;
}

.timeline>div>.timeline-item>.time i {
  margin-right: 0.3em;
}

**/

.alert-error {
  --bs-alert-color: var(--bs-danger-text-emphasis);
  --bs-alert-bg: var(--bs-danger-bg-subtle);
  --bs-alert-border-color: var(--bs-danger-border-subtle);
  --bs-alert-link-color: var(--bs-danger-text-emphasis);
}

.titulo {
  color: var(--bs-secondary);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 1.2rem;
}

.sub-titulo {
  margin-top: 15px;
  color: var(--bs-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

}

.forget-pswrd {
  flex: 0 0 auto;
  width: 50%;
  margin: 0 auto;
  margin-top: 20px;

}

/*imagem dashboard página inicial kopera*/
.escritorio-homepage {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  position: relative;
}

@media (max-width: 896px) {

  .escritorio-homepage {
    width: 17.5rem;
  }

}

.cldf-logo {
  margin-bottom: 0.9rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;

}

.cldf-logo img {
  width: 155px;
  height: auto;
  display: block;
  padding-top: 1rem;
}

.cldf-logo a {
  color: var(--bs-secondary-color);
  text-decoration: none;
}

.login-servidor {
  max-width: 300px;
  width: 100%;
  margin: 0 auto;
  margin-top: 2rem;

}

.login-externo {
  max-width: 300px;
  width: 100%;
  margin: 0 auto;
}

.login-externo:empty {
  display: none;
}

.login-externo .login-externo-titulo {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
  font-size: 1rem;
  text-align: center;
}

.login-duvidas {
  width: 67.7%;
  margin: 0 auto;
  margin-top: 2.25rem;
}

/* Responsividade User-image do dashboard da homepage Kopera */
@media (max-width: 896px) {
  .user-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
  }
}

@media (max-width: 576px) {
  .user-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
  }
}


/*
 * Welcome Widget
*/

@media (max-width: 896px) {

  .welcome-widget img {
    width: 17.5rem;
  }
}


/*
 * Error pages
*/

.logo-kopera-erros {
  max-width: 150px !important;
  display: block;
  margin: 1rem auto 2rem auto;
}


.error-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background-color: #fffef9;
}

.error-container img {
  max-width: 750px;
  height: auto;
}

@media (max-width: 896px) {
  .error-container img {
    max-width: 550px;

  }
}

@media (max-width: 576px) {
  .error-container img {
    max-width: 350px;

  }
}

.error-container h1 {
  margin-top: 1.5rem;
  font-size: 3rem;
  color: #f28c28;
}

.error-container h2 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
  color: #f28c28;
}

.error-container a {
  color: #f28c28;
}

.image-error {
  display: block;
  margin: 0 auto;
}

@media (max-width: 1280px) {
  .tabela-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tabela-responsive table {
    width: 100%;
    min-width: 600px;
    /* ou mais, conforme suas colunas */
  }
}

.content-card-body-dashboard {
  max-height: 250px;
  overflow-y: auto;
}

tbody[x-sort] tr {
  cursor: grab;
}

tbody[x-sort] tr:active {
  cursor: grabbing;
}


.content-card-text-terms {
  max-height: 450px;
  overflow-y: auto;
}

/*
 * Termos e Condições renderizados de Markdown (perfil "termos" do MARKDOWNIFY)
*/
.terms-content h1,
.terms-content h2,
.terms-content h3,
.terms-content h4,
.terms-content h5,
.terms-content h6 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.terms-content h1 { font-size: 1.5rem; }
.terms-content h2 { font-size: 1.3rem; }
.terms-content h3 { font-size: 1.15rem; }
.terms-content h4,
.terms-content h5,
.terms-content h6 { font-size: 1rem; }

.terms-content > :first-child {
  margin-top: 0;
}

.terms-content > :last-child,
.terms-info > :last-child {
  margin-bottom: 0;
}

.terms-content table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.terms-content th,
.terms-content td {
  padding: 0.5rem;
  border: 1px solid var(--bs-border-color);
  vertical-align: top;
}

.terms-content thead th {
  background-color: var(--bs-tertiary-bg);
}

.terms-content blockquote {
  padding-left: 1rem;
  border-left: 0.25rem solid var(--bs-border-color);
  color: var(--bs-secondary-color);
}

/*
 * Filtros BuscarBaseFilter
*/

/* Remove a margem inferior padrão da label e impede a quebra de linha */
.filter-inline-wrapper label {
  margin-bottom: 0 !important;
  /* fw-semibold */
  font-weight: 600;
  /* text-secondary */
  color: #6c757d;
  white-space: nowrap;
}

.filter-inline-wrapper .form-control {
  box-shadow: var(--bs-box-shadow-sm) !important;
}

.filter-inline-wrapper .multiselect.dropdown {
  margin-left: 0.5rem;
}

.filter-inline-wrapper .multiselect.dropdown button {
  border: 0;
  /* tentativa de manter o field da mesma altura dos demais*/
  font-size: 0.875rem;
}

/* multiwidget */

.filter-inline-wrapper .subwidgets {
  margin-left: 0.5rem;
}

/*
 * Model List Table Loading Spinner
*/

/* 1. BASE STYLES */
.table-loading-wrapper {
  position: relative;
  /* Required to center the spinner absolute to this container */
}

#table-container {
  transition: filter 0.2s ease, opacity 0.2s ease;
}

/* 2. THE BLURRY EFFECT */
/* When HTMX is active, it adds .htmx-request to the wrapper */
.table-loading-wrapper.htmx-request #table-container {
  filter: blur(4px);
  opacity: 0.6;
  pointer-events: none;
  /* Prevents users from clicking rows while loading */
}

/* 3. THE CENTERED SPINNER OVERLAY */
.spinner-overlay {
  display: none;
  /* Hidden by default */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  justify-content: center;
  align-items: center;
  /* Perfectly centers the child item */
}

/* Show the spinner overlay only during HTMX requests */
.table-loading-wrapper.htmx-request .spinner-overlay {
  display: flex;
}

/* Pure CSS Spinner */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 0, 0, 0.1);
  border-top-color: #3b82f6;
  /* Change to your brand color */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Alpine.js: oculta elementos até a inicialização */
[x-cloak] {
  display: none !important;
}
