input,
select {
  appearance: auto !important;
}

input#LEFT_DOCUMENTOS,
input#RIGHT_DOCUMENTOS {
  background: #ededed !important;
}

table#table-pessoa,
table#table-imovel {
  overflow: hidden;
}

ul.ms-list {
  height: 25rem !important;
}

.ms-container .ms-optgroup-label {
  margin: 0;
  padding: 10px 0 0 10px;
  cursor: pointer;
  color: #999 !important;
}

.botao-bloqueado {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

.table-hover tbody tr:hover {
  background-color: #fafbfa00 !important;
}

.text-muted {
  --bs-text-opacity: 1;
  color: #afafaf !important;
}

/* Botão de expansão */
.projeto .expand-btn {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.projeto .expand-btn.expanded {
  color: #007bff;
  background-color: #e3f2fd;
}

/* Sublinhas dos documentos */
.projeto .documento-sublinha {
  display: none;
}

.projeto .documento-sublinha.show {
  display: table-row;
  animation: slideDown 0.3s ease-out;
}

.projeto .documento-sublinha.show td {
  padding: 0 !important;
}

.projeto .documento-content {
  width: 100%;
  display: block;
  margin: 0 auto;
  padding: 0 0 0 35px;
}

.projeto .documento-item {
  display: flex;
  align-items: center;
  justify-content: start;
  margin: 0px 0;
  border-radius: 6px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Sublinhas dos anexos */
.projeto .anexo-sublinha {
  display: none;
}

.projeto .anexo-sublinha.show {
  display: block;
  animation: slideDown 0.2s ease-out;
}

.projeto .anexo-content {
  padding: 8px 16px;
  margin-left: 20px;
}

.projeto .anexo-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 10px;
  transition: all 0.2s ease;
}

.projeto .anexo-info {
  flex: 1;
}

.projeto .anexo-nome {
  font-weight: 500;
  color: #495057;
  font-size: 0.85rem;
}

.projeto .anexo-detalhes {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 1px;
}

.projeto .anexo-acoes {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Botão de expansão para documentos */
.projeto .expand-doc-btn {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  transition: all 0.2s;
  margin-right: 8px;
}

.projeto .expand-doc-btn.expanded {
  color: #28a745;
  background-color: #d4edda;
}

.projeto .documento-info {
  flex: 1;
}

.projeto .documento-nome {
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
}

.projeto .documento-acoes {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Badges de status */
.projeto .status-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
}

.projeto .status-concluido {
  background-color: #d4edda;
  color: #155724;
}

/* Contador de documentos */
.projeto .doc-counter {
  background: #007bff;
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
}

/****** BARRA PROGRESSO ******/
.progress-documentos {
  border: 1px solid #dee2e6;
  border-radius: 15px;
  padding: 0px 3px;
  text-align: center;
  font-size: 11px;
  font-weight: bold;
  color: #333;
  min-width: 100px;
  max-width: 150px;
  height: 20px;
}

/* Animações */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fix para scroll e posicionamento */
.table-responsive {
  position: relative;
}

/* Garantir que todos os elementos sejam clicáveis */
.projeto .expand-btn,
.projeto .expand-doc-btn {
  z-index: 10;
  position: relative;
}

input[type="checkbox"] {
  width: 15px;
  height: 15px;
  border-radius: 10px;
}

.modal td {
  font-weight: 600 !important;
}

.modal .btn-secondary {
  border: 1px solid grey !important;
  background: white !important;
  color: #454545 !important;
}

.tab-indicator {
  transition: transform 0.3s ease;
  opacity: 0;
}

.tab-indicator.active {
  transform: translateY(0);
  /* ou translateX se for horizontal */
  opacity: 1;
}

.linha-desativada {
  background-color: #f2f2f2;
  opacity: 0.4;
}

.text-verde-600 {
  color: #16a34a !important;
}

.text-red-700 {
  color: #f71818 !important;
}

.tag {
  padding: 2px 5px !important;
}

.count-arquivos {
  font-size: 0.8rem;
}

.documento-grid {
  display: flex;
  align-items: center;
  padding: 10px 7px 10px 15px;
  border-bottom: 1px solid #e9ecef;
  width: 100%;
  position: relative;
  border: 1px solid white;
}

.documento-info-principal {
  display: flex;
  align-items: center;
  width: 57%;
  min-width: 550px;
  flex-shrink: 0;
}

.documento-descricao {
  font-weight: 500;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
  flex-shrink: 1;
}

.count-arquivos {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.documento-esfera .tag {
  font-size: 0.75rem;
  padding: 4px 8px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
}

.documento-status,
.documento-baixado,
.documento-ativo {
  font-size: 0.875rem;
  color: #6c757d;
  white-space: nowrap;
  display: flex;
  align-items: center;
  min-width: fit-content;
}

.documento-acoes {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
  min-width: 60px;
  margin-left: auto;
}

.expand-doc-btn {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.documento-status-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  flex: 1;
  flex-shrink: 0;
}

#modalUpload p.small.text-muted.mt-5 {
  font-size: 10px;
  color: #757575 !important;
  margin: 5px 0 10px !important;
}

.dropify-wrapper .dropify-message span {
  font-size: 18px !important;
}

.anexo-botoes button {
  border-radius: 5px !important;
}

/* Estilos para anexos */
.anexos-sublinha {
  border-bottom: 1px solid #ffffff;
}

.anexos-content {
  padding: 0 0 0 40px;
  background-color: #ffffff;
  border-radius: 8px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 5px;
  margin-bottom: 5px;
}

.anexo-grid {
  display: contents;
  gap: 15px;
}

.anexo-info-principal {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 25%;
}

.anexo-nome {
  font-weight: 500;
  color: #495057;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  padding: 2px 6px;
}

.file-ext {
  font-size: 0.75rem;
  padding: 2px 6px;
  text-transform: uppercase;
  font-weight: 600;
}

.anexo-status-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
}

.status-anexo {
  font-size: 0.75rem;
  padding: 4px 8px;
}

.data-upload {
  text-align: center;
  min-width: 80px;
}

.data-upload p {
  margin: 0;
  font-size: 0.75rem;
  color: #6c757d;
  font-weight: 500;
}

.data-upload span {
  font-size: 0.8rem;
  color: #495057;
}

.anexo-acoes {
  display: flex;
  align-items: center;
  gap: 5px;
}

.download-anexo {
  padding: 4px 8px;
  font-size: 0.875rem;
}

.expand-doc-btn {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 2px;
  transition: color 0.2s ease;
}

.expand-doc-btn:hover {
  color: #007bff;
}

.expand-doc-btn i {
  transition: transform 0.2s ease;
}

.button-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border-radius: 0.375rem;
  --tw-bg-opacity: 1;
  background-color: #a0a0a0 !important;
  padding: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5rem !important;
  font-weight: 600 !important;
  --tw-text-opacity: 1;
  color: rgb(255, 255, 255) !important;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.button-secondary:hover {
  opacity: 0.75;
}

/* Estilos para o sistema de paginação */

button#nextPagePessoa,
button#nextPageImovel,
button#prevPageImovel,
button#prevPagePessoa {
  border: 0px solid white !important;
}

button#nextPagePessoa i,
button#nextPageImovel i,
button#prevPageImovel i,
button#prevPagePessoa i {
  font-size: 12px;
}

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  margin-top: 20px;
}

.pagination-info {
  margin: 0;
  color: #6c757d;
  font-size: 12px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  background-color: #fff;
  color: #007bff;
  text-decoration: none;
  border-radius: 0px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s ease;
  height: 25px;
  width: 25px;
}

.pagination-btn:hover:not(:disabled):not(.pagination-ellipsis) {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.pagination-btn:disabled {
  color: #6c757d;
  background-color: #fff;
  border-color: #dee2e6;
  cursor: not-allowed;
  opacity: 0.6;
}

.pagination-btn.active {
  color: #fff !important;
  background-color: #2597dd !important;
  border-color: #2597dd !important;
}

.pagination-btn.active:hover {
  background-color: #0056b3;
  border-color: #004085;
}

.page-number-btn {
  font-weight: 500;
}

.pagination-ellipsis {
  border: none;
  background: none;
  color: #6c757d;
  cursor: default;
  font-weight: bold;
}

.pagination-ellipsis:hover {
  background: none;
  border: none;
}

.page-info {
  color: #6c757d;
  font-size: 14px;
  margin: 0 10px;
  white-space: nowrap;
}

/* Responsividade */
@media (max-width: 768px) {
  .pagination-container {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .pagination-controls {
    justify-content: center;
    flex-wrap: wrap;
  }

  .pagination-info {
    text-align: center;
  }

  .page-info {
    margin: 0 5px;
  }

  .pagination-btn {
    min-width: 35px;
    height: 35px;
    padding: 6px 10px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .pagination-controls {
    gap: 3px;
  }

  .pagination-btn {
    min-width: 32px;
    height: 32px;
    padding: 5px 8px;
    font-size: 12px;
  }

  /* Esconder alguns botões numerados em telas muito pequenas */
  .page-number-btn:not(.active):nth-child(n + 6) {
    display: none;
  }
}

#modalNovaPessoa,
#modalNovoImovel {
  position: relative;
  top: 45px;
}

#table-imovel .status-documento-select,
#table-pessoa .status-documento-select {
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 0.875rem;
  text-align: center;
  background-color: transparent;
  font-size: 10px !important;
}

#table-imovel .status-documento-select option,
#table-pessoa .status-documento-select option {
  text-align: start;
  color: #333;
}

#table-imovel .status-documento-select:disabled,
#table-pessoa .status-documento-select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.pagination-btn.active:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

.grid-dashboard {
  grid-template-columns: 1fr;
  @media (width > 1024px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

p.limitar-texto {
    text-align: start;
}