/* Fundo e cor geral da página */
body {
  background-color: #0B1739;
  color: #AEB9E1;
}

/* Estilização de tabelas no modo dark */
.table-dark {
  background-color: #0B1739 !important;
  color: #AEB9E1;
}

.color-dark {
  background-color: #0B1739 !important;
}

table {
  border-radius: 20px !important;
  padding: 20px !important;
}

table,
th,
td {
  background-color: #0B1739 !important;
  color: #AEB9E1 !important;
  font-size: 1em !important;
  border-color: #173ca123 !important;
  vertical-align: middle !important;
}

.table-stripedet tbody tr:nth-of-type(odd) {
  background-color: #6b7db0 !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: #0f2258 !important;
}

.table-hover {
  background-color: #0f2258 !important;
}


/* Estilização para inputs, selects e áreas de texto */
.form-control,
.form-select {
  background-color: #060d20 !important;
  /* Fundo mais escuro */
  border: 1px solid #07153b !important;
  /* Borda sutil */
  color: #ffffff !important;
  /* Texto branco */
  border-radius: 4px;
  /* Bordas levemente arredondadas */
  padding: 0.5rem 0.75rem;
  transition: background-color 0.3s, border-color 0.3s;
}

/* Foco nos inputs e selects */
.form-control:focus,
.form-select:focus {
  background-color: #060d20 !important;
  /* Fundo um pouco mais claro ao focar */
  border-color: #3B82F6 !important;
  /* Borda realçada */
  color: #ffffff !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

/* Labels de formulário */
.form-label {
  color: #ffffff !important;
  font-weight: 500 !important;
}

/* Texto de ajuda */
.form-text {
  color: #e0e0e0 !important;
}

/* Checkboxes e radios */
.form-check-label {
  color: #ffffff !important;
}

.form-check-input {
  background-color: #060d20 !important;
  border: 1px solid #07153b !important;
}

.form-check-input:checked {
  background-color: #3B82F6 !important;
  border-color: #3B82F6 !important;
}

/* Placeholders */
.form-control::placeholder {
  color: #b0b0b0 !important;
}

/* Estilização para botões (ajuste conforme necessário) */
.btn {
  border-radius: 4px;
  padding: 0.5rem 1rem;
  transition: background-color 0.3s, border-color 0.3s;
}

/* Exemplos para botões customizados */
.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:hover {
  background-color: #0069d9;
  border-color: #0062cc;
}

.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.btn-clonar {
  background-color: #CB3CFF;
  color: #fff;
}

.btn-limpar {
  background-color: #00C2FF;
  color: #fff;
}

.btn-clonar:hover {
  background-color: #cb3cff7c;
  color: #fff;
}

.btn-limpar:hover {
  background-color: #00c3ff83;
  color: #fff;
}

.btn-icon {
  width: 30px;
  height: 30px;
}

.modal-content {
  background-color: #0f2258 !important;
}

.edit-parcelas {
  width: 40% !important;
}

.avatar-iniciais {
  width: 50px;
  height: 50px;
  background-color: #6c757d;
  /* cinza escuro do Bootstrap */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  user-select: none;
}

/* esconde o caret de TODO elemento dropdown-toggle */
.dropdown-toggle::after {
  display: none !important;
}

/* container que "corta" o overflow e dá o tamanho total */
.iframe-container {
  position: relative;
  width: 100%;
  height: 90%;
  overflow: hidden;
  margin-bottom: 25px;
}

/* iframe escalonado para 80% */
.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* 100% / 0.8 = 125% */
  height: 120%;
  /* idem */
  border: none;
  transform: scale(1);
  /* zoom de 80% */
  transform-origin: 0 0;
}

/* Ajustes para o menu lateral responsivo */
.sidebar {
  min-width: 250px;
  transition: all 0.3s ease;
}

.sidebar .nav-link {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.89rem !important;
}

/* Submenus com a mesma fonte */
.sidebar .nav-link.ps-4 {
  font-size: 0.85rem !important;
}

.sidebar .section-label {
  transition: all 0.3s ease;
}

.sidebar .nav-link i {
  font-size: 1.1em;
  transition: all 0.3s ease;
}

@media (max-width: 1096px) {
  .sidebar {
    flex: 0 0 60px !important;
    max-width: 60px !important;
    min-width: 60px !important;
  }

  .sidebar .nav-link {
    padding: 12px;
    text-align: center;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar .nav-link i {
    font-size: 1.3em;
    margin: 0 !important;
  }

  .sidebar .nav-link span {
    display: none;
  }

  .sidebar .nav-item {
    text-align: center;
  }

  .sidebar .section-label {
    display: none;
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
  }

  .conteudo {
    margin-left: 60px;
  }
}

/* Sidebar ocupa 12% em telas médias pra cima */
@media (min-width: 768px) {
  .sidebar {
    flex: 0 0 12% !important;
    max-width: 12% !important;
  }
}

/* Sidebar offcanvas ocupa 100% em telas pequenas */
@media (max-width: 767.98px) {
  .offcanvas .sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    min-width: 100vw !important;
    padding-top: 0 !important;
  }

  .conteudo {
    padding: 15px !important;
  }

  table,
  th,
  td {
    background-color: #0B1739 !important;
    color: #AEB9E1 !important;
    font-size: 0.98em !important;
    border-color: #173ca123 !important;
    vertical-align: middle !important;
  }

  .badge {
    font-size: 0.8em !important;
  }

  .row-actions {
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
  }
}

/* Garante que o main não tenha overflow horizontal */
.main-container {
  overflow-x: hidden;
}

/* Imagens responsivas */
img,
.img-fluid {
  /* max-width: 100%; */
  height: auto;
}

/* Ajustes para o avatar e menu do usuário */
.avatar-wrapper {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 50px;
  overflow: visible;
  flex-shrink: 0;
}

.avatar-wrapper img.avatar,
.avatar-wrapper .avatar-iniciais {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Garante que o menu do usuário permaneça visível */
.navbar-nav .dropdown-menu {
  position: absolute;
}

.dropdown-item {
  
}

/* Ajustes para telas pequenas */
@media (max-width: 767.98px) {
  .navbar-nav .nav-link {
    padding: 0.5rem 1rem;
  }

  .avatar-wrapper {
    width: 40px;
    height: 40px;
  }

  .user-level {
    font-size: 0.6rem;
  }

  .d-flex.align-items-center {
    gap: 0.5rem;
  }

  table tr {
    height: 55px !important;
    font-size: 1em !important;
  }	

  .row-actions {
    background-color: #0f2258;
    padding: 5px;
    border-radius: 5px;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
}

/* Ajustes para o logo */
.navbar-brand img {
  width: 150px;
  height: auto;
}

@media (max-width: 767.98px) {
  .navbar-brand img {
    width: 120px;
  }
}

/* Ajustes para o menu lateral e avatar */
.btn-outline-light {
  border-color: #aeb9e1;
  color: #aeb9e1;
}

.btn-outline-light:hover {
  background-color: #aeb9e1;
  color: #0B1739;
}

/* Ajustes para o conteúdo principal */
.conteudo {
  background-color: #081028;
  padding: 40px;
  color: #aeb9e1;
  margin-left: 20px;
  border-radius: 10px;
}

/* Ajustes para telas grandes */
@media (min-width: 768px) {
  .conteudo {
    margin-left: 30px;
    padding: 40px;
  }
}

/* Ajustes para telas pequenas */
@media (max-width: 767.98px) {
  .conteudo {
    margin: 0;
    padding: 15px;
    border-radius: 0;
  }

  /* Ajustes para o menu offcanvas */
  .offcanvas .sidebar {
    overflow-x: hidden !important;
  }

  .dropdown {
    background-color: #0f2258 !important;
    padding: 10px !important;
    border-radius: 20px !important;
    width: 90% !important;
    display: block;
    margin-bottom: 15px !important;
  }
}

/* Ajustes para o menu offcanvas */
.offcanvas {
  background-color: #060d20 !important;
}

.offcanvas-body {
  padding: 0 !important;
}

.offcanvas .nav-link {
  color: #aeb9e1;
  padding: 15px 20px;
  display: flex;
  align-items: center;
}

.offcanvas .nav-link:hover,
.offcanvas .nav-link.active {
  color: #fff;
  background-color: #0f2258;
}

.offcanvas .nav-link i {
  font-size: 1.1em;
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.offcanvas .nav-link span {
  display: inline-block;
}

.offcanvas .section-label {
  padding: 10px 20px;
  margin: 0;
  color: #aeb9e1;
}

/* Ajustes para telas muito pequenas (mobile) */
@media (max-width: 767.98px) {
  .sidebar {
    display: none;
  }

  .conteudo {
    margin-left: 0;
  }
}

/* Global font size reduction on small screens */
@media (max-width: 767.98px) {
  html {
    font-size: 14px !important;
  }

  #barra-desafio {
    margin-top: 8px;
  }

  .conteudo {
    background-color: #081028;
    padding: 12px 0px !important;
    color: #aeb9e1;
  }
}

@media (max-width: 1366px) {
  .hide-lt-1366 {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  /* 1) Aumenta a opacidade do backdrop via variável do Bootstrap */
  :root {
    --bs-modal-backdrop-opacity: 1;
  }

  /* 2) Override direto na classe caso a variável não seja suficiente */
  .modal-backdrop.show {
    background-color: rgba(4, 10, 27, 0.97) !important;
    opacity: var(--bs-modal-backdrop-opacity) !important;
  }
}

.switch-operacao .btn-operacao {
    padding: 10px 20px;
    border: 1px solid #0f2258;
    background-color: #0b1739;
    color: #aeb9e1;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
  }

  .switch-operacao input[type="radio"]:checked+.btn-operacao {
    background-color: #042a94 !important;
    border: 1px solid #0f2258;

    color: #fff;
    font-weight: bold;
  }

  .switch-operacao .btn-operacao:hover {
    background-color: #0a358d;
    border: 1px solid #0f2258;
    color: #ffffff;
  }

  @media (max-width: 768px) {
    .switch-operacao .btn-operacao {
      font-size: 0.9rem;
      padding: 8px 12px;
    }
  }

/* Paginação igual à tela de aportes */
.pagination .page-link {
  background-color: #0b1739 !important;
  border: 1px solid #0f2258 !important;
  color: #aeb9e185 !important;
  margin: 0 2px;
  border-radius: 6px !important;
  transition: background-color 0.2s, color 0.2s;
}
.pagination .page-link:hover {
  background-color: #0f2258 !important;
  color: #fff !important;
}
.pagination .page-item.active .page-link {
  background-color: #0f2258 !important;
  border: 1px solid #0f2258 !important;
  color: #aeb9e185 !important;
  font-weight: bold;
}
@media (max-width: 767.98px) {
  .pagination .page-link {
    font-size: 0.95em !important;
    padding: 0.3rem 0.7rem !important;
  }
}

.chatbot-container,
.chatbot-container *,
#chatbotToggle,
#chatbotWindow,
.chatbot-window,
.chatbot-button,
.chatbot-header,
.chatbot-messages,
.chatbot-input-container,
.chatbot-tips {
  display: none !important;
}

/* Melhorias para o submenu em tablets */
@media (max-width: 991px) {
  .sidebar .nav-link[data-bs-toggle="collapse"] {
    cursor: pointer;
  }
  
  .sidebar .collapse.show {
    display: block !important;
  }
  
  .sidebar .collapse:not(.show) {
    display: none !important;
  }
  
  /* Garante que os submenus sejam visíveis quando expandidos */
  .sidebar .nav-link.ps-4 {
    padding-left: 2rem !important;
    margin-left: 1rem;
    border-left: 2px solid #0f2258;
    transition: all 0.3s ease;
  }
  
  .sidebar .nav-link.ps-4:hover {
    border-left-color: #0DCAD7;
    background-color: #0f2258;
  }
}

/* Estilos globais para o submenu funcionar em todos os dispositivos */
.sidebar .collapse {
  transition: all 0.3s ease;
}

.sidebar .collapse:not(.show) {
  display: none !important;
}

.sidebar .collapse.show {
  display: block !important;
}

/* Garante que os links do submenu sejam clicáveis */
.sidebar .nav-link.ps-4 {
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar .nav-link.ps-4:hover {
  background-color: #0f2258;
  color: #fff;
}