/* Dark mode customizado para AdminLTE 3.2 */
body.cbe-dark {
  background: #1f1f1f !important;
  color: #d4d4d4 !important;
}
body.cbe-dark .wrapper,
body.cbe-dark .content-wrapper,
body.cbe-dark .main-header,
body.cbe-dark .main-footer {
  background: #2b2b2b !important;
  color: #d4d4d4 !important;
}
body.cbe-dark .main-sidebar {
  background: #1a1a1a !important;
}
body.cbe-dark .main-header.navbar {
  background: #2b2b2b !important;
  border-color: #3a3a3a !important;
}
body.cbe-dark .content-header {
  background: #2b2b2b !important;
  color: #d4d4d4 !important;
}
body.cbe-dark .breadcrumb-item a,
body.cbe-dark .breadcrumb-item.active {
  color: #d4d4d4 !important;
}
body.cbe-dark .nav-sidebar .nav-link,
body.cbe-dark .nav-sidebar .nav-header {
  color: #d4d4d4 !important;
}
body.cbe-dark .nav-sidebar .nav-link:hover {
  background: #3a3a3a !important;
}
body.cbe-dark .nav-sidebar .nav-treeview {
  background: #1f1f1f !important;
}
body.cbe-dark .brand-link {
  background: #1a1a1a !important;
  color: #ffffff !important;
  border-bottom: 1px solid #3a3a3a;
}
body.cbe-dark h1, body.cbe-dark h2, body.cbe-dark h3 {
  color: #f0f0f0;
}
body.cbe-dark .card {
  background: #2b2b2b;
  color: #d4d4d4;
}
body.cbe-dark .navbar-light .navbar-nav .nav-link {
  color: #d4d4d4 !important;
}
body.cbe-dark .main-footer {
  background: #1a1a1a !important;
  color: #aaaaaa !important;
  border-color: #3a3a3a;
}

/* Correcao para dropdowns na navbar */
.main-header .navbar-nav .dropdown-menu {
  z-index: 1050;
}
.dropdown-menu {
  overflow: visible !important;
  max-height: none;
}

.main-header {
  overflow: visible !important;
}
.navbar {
  overflow: visible !important;
}

/* Dark mode generico para paginas legadas (over.php, edit_*, etc) */
body.cbe-dark {
  background: #1f1f1f !important;
  color: #d4d4d4 !important;
}
body.cbe-dark table,
body.cbe-dark table * {
  background-color: transparent !important;
  color: #d4d4d4 !important;
}
body.cbe-dark table[cellpadding] td,
body.cbe-dark table[cellpadding] th {
  background-color: #2b2b2b !important;
  color: #d4d4d4 !important;
}
body.cbe-dark font,
body.cbe-dark font * {
  color: #d4d4d4 !important;
}
body.cbe-dark input,
body.cbe-dark select,
body.cbe-dark textarea {
  background-color: #1a1a1a !important;
  color: #e0e0e0 !important;
  border: 1px solid #444 !important;
}
body.cbe-dark a {
  color: #3B4FE8 !important;
}
body.cbe-dark a:hover {
  color: #2F3EB8 !important;
}

/* Sobrescrever bgcolor do HTML antigo (atributo) */
body.cbe-dark table[bgcolor],
body.cbe-dark table[cellpadding],
body.cbe-dark td[bgcolor] {
  background-color: #2b2b2b !important;
  color: #d4d4d4 !important;
}
body.cbe-dark table[bgcolor] tr,
body.cbe-dark tr[bgcolor] {
  background-color: #2b2b2b !important;
  color: #d4d4d4 !important;
}

/* Modal do Bootstrap em dark mode */
body.cbe-dark .modal-content {
  background-color: #2b2b2b !important;
  color: #d4d4d4 !important;
  border: 1px solid #444 !important;
}
body.cbe-dark .modal-header {
  background-color: #1f1f1f !important;
  border-bottom: 1px solid #444 !important;
}
body.cbe-dark .modal-header .modal-title {
  color: #f0f0f0 !important;
}
body.cbe-dark .modal-header .close {
  color: #f0f0f0 !important;
  opacity: 0.8;
}
body.cbe-dark .modal-footer {
  background-color: #1f1f1f !important;
  border-top: 1px solid #444 !important;
}
body.cbe-dark .modal-footer .btn {
  background-color: #3a3a3a !important;
  border-color: #555 !important;
  color: #f0f0f0 !important;
}
body.cbe-dark .modal-footer .btn:hover {
  background-color: #4a4a4a !important;
}

/* Areas colapsaveis do menu */
.cbe-area-content.cbe-open {
  display: block !important;
}

/* Preloader do AdminLTE em dark mode */
body.cbe-dark .preloader {
  background-color: #1f1f1f !important;
  color: #d4d4d4 !important;
}

/* Text colors em dark mode - mais claros para contraste */
body.cbe-dark .text-danger,
body.cbe-dark .text-danger * {
  color: #ff8a93 !important;
}
body.cbe-dark .text-warning,
body.cbe-dark .text-warning * {
  color: #ffd966 !important;
}
body.cbe-dark .text-success,
body.cbe-dark .text-success * {
  color: #7ddc8e !important;
}
body.cbe-dark .text-info,
body.cbe-dark .text-info * {
  color: #7ec8e3 !important;
}
body.cbe-dark .text-primary,
body.cbe-dark .text-primary * {
  color: #6aa3ff !important;
}
body.cbe-dark .text-muted,
body.cbe-dark .text-muted * {
  color: #a0a0a0 !important;
}
