/* Tema escuro — carregado após style.css; usa data-theme no <html> */

[data-theme="dark"] body {
  background-color: #14171c !important;
  color: #d1d5db !important;
}

[data-theme="dark"] body.gray-bg,
[data-theme="dark"] .gray-bg,
[data-theme="dark"] #page-wrapper.gray-bg {
  background-color: #14171c !important;
}

[data-theme="dark"] .navbar-static-top.white-bg,
[data-theme="dark"] .navbar.navbar-static-top.white-bg {
  background-color: #1e2329 !important;
  border-bottom-color: #2d333b !important;
}

[data-theme="dark"] .navbar-static-top {
  background-color: #1e2329 !important;
}

[data-theme="dark"] .border-bottom {
  border-bottom-color: #2d333b !important;
}

[data-theme="dark"] .navbar-top-links > li > a,
[data-theme="dark"] .navbar-top-links > li > span {
  color: #c5cad3 !important;
}

[data-theme="dark"] .navbar-top-links > li > a:hover {
  color: #fff !important;
}

[data-theme="dark"] .minimalize-styl-2 {
  background-color: #2d333b !important;
  border-color: #3d4450 !important;
  color: #e8eaed !important;
}

[data-theme="dark"] .navbar-default {
  background-color: #1a2228 !important;
  border-color: #2d333b !important;
}

[data-theme="dark"] .navbar-static-side {
  background-color: #1a2228 !important;
}

[data-theme="dark"] .nav-header {
  background-color: #151b20 !important;
}

[data-theme="dark"] .navbar-default .nav > li > a {
  color: #b8c0cc !important;
}

[data-theme="dark"] .navbar-default .nav > li > a:hover,
[data-theme="dark"] .navbar-default .nav > li > a:focus {
  background-color: #252d35 !important;
  color: #fff !important;
}

[data-theme="dark"] .nav > li.active {
  background-color: #252d35 !important;
  border-left-color: #1ab394 !important;
}

[data-theme="dark"] ul.nav-second-level {
  background-color: #151b20 !important;
}

[data-theme="dark"] .ibox-title {
  background-color: #1e2329 !important;
  border-color: #2d333b !important;
  color: #e8eaed !important;
}

[data-theme="dark"] .ibox-content {
  background-color: #1e2329 !important;
  border-color: #2d333b !important;
  color: #d1d5db !important;
}

[data-theme="dark"] .ibox-footer {
  background-color: #1e2329 !important;
  border-top-color: #2d333b !important;
  color: #d1d5db !important;
}

[data-theme="dark"] .ibox-tools a {
  color: #8b939e !important;
}

[data-theme="dark"] .ibox-tools a.btn-primary {
  color: #fff !important;
}

[data-theme="dark"] .form-control {
  background-color: #252b33 !important;
  border-color: #3d4450 !important;
  color: #e8eaed !important;
}

[data-theme="dark"] .form-control:focus {
  border-color: #1ab394 !important;
  box-shadow: 0 0 0 0.15rem rgba(26, 179, 148, 0.25);
}

[data-theme="dark"] .table {
  color: #d1d5db !important;
}

[data-theme="dark"] .table > thead > tr > th,
[data-theme="dark"] .table > tbody > tr > th,
[data-theme="dark"] .table > tfoot > tr > th,
[data-theme="dark"] .table > thead > tr > td,
[data-theme="dark"] .table > tbody > tr > td,
[data-theme="dark"] .table > tfoot > tr > td {
  border-color: #2d333b !important;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #252b33 !important;
}

[data-theme="dark"] .table-bordered,
[data-theme="dark"] .table-bordered > thead > tr > th,
[data-theme="dark"] .table-bordered > tbody > tr > th,
[data-theme="dark"] .table-bordered > tfoot > tr > th,
[data-theme="dark"] .table-bordered > thead > tr > td,
[data-theme="dark"] .table-bordered > tbody > tr > td,
[data-theme="dark"] .table-bordered > tfoot > tr > td {
  border-color: #2d333b !important;
}

[data-theme="dark"] .table-hover > tbody > tr:hover {
  background-color: #2a3139 !important;
}

/* Cabeçalho de tabelas (thead) — fundo escuro e texto legível */
[data-theme="dark"] .table > thead > tr > th,
[data-theme="dark"] .table > thead > tr > td,
[data-theme="dark"] .table-bordered > thead > tr > th,
[data-theme="dark"] .table-bordered > thead > tr > td {
  background-color: #1e2329 !important;
  color: #ffffff !important;
  border-color: #3d4450 !important;
}

[data-theme="dark"] .table > thead > tr > th a,
[data-theme="dark"] .table > thead > tr > td a {
  color: #8ee4d6 !important;
}

[data-theme="dark"] .table > thead > tr > th .text-muted,
[data-theme="dark"] .table > thead > tr > th small,
[data-theme="dark"] .table > thead > tr > td .text-muted {
  color: #c5cad3 !important;
}

[data-theme="dark"] table.dataTable thead > tr > th,
[data-theme="dark"] table.dataTable thead > tr > td,
[data-theme="dark"] table.dataTable tfoot > tr > th,
[data-theme="dark"] table.dataTable tfoot > tr > td {
  background-color: #1e2329 !important;
  color: #ffffff !important;
  border-color: #3d4450 !important;
}

[data-theme="dark"] .table-responsive {
  border-color: #2d333b;
}

[data-theme="dark"] .btn-default {
  background-color: #2d333b !important;
  border-color: #454d58 !important;
  color: #e8eaed !important;
}

[data-theme="dark"] .btn-default:hover {
  background-color: #3d4450 !important;
  border-color: #5a6370 !important;
  color: #fff !important;
}

[data-theme="dark"] .text-muted {
  color: #8b939e !important;
}

[data-theme="dark"] .hr-line-dashed {
  border-top-color: #2d333b !important;
}

[data-theme="dark"] a {
  color: #5ad4c4;
}

[data-theme="dark"] a:hover {
  color: #7de8da;
}

[data-theme="dark"] .close {
  color: #e8eaed;
  opacity: 0.7;
}

[data-theme="dark"] .dropdown-menu {
  background-color: #1e2329 !important;
  border-color: #2d333b !important;
}

[data-theme="dark"] .dropdown-menu > li > a {
  color: #d1d5db !important;
}

[data-theme="dark"] .dropdown-menu > li > a:hover {
  background-color: #252b33 !important;
  color: #fff !important;
}

[data-theme="dark"] .help-block,
[data-theme="dark"] .has-error .help-block {
  color: #f8a4a4 !important;
}

/* Interruptor tema claro / escuro */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  margin: 0;
  cursor: pointer;
  vertical-align: middle;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  margin: 0;
}

.theme-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cfd4da;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  border-radius: 28px;
  border: 1px solid #b8bec7;
}

.theme-switch-slider:before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.22s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.theme-switch input:checked + .theme-switch-slider {
  background-color: #1ab394;
  border-color: #18a689;
}

.theme-switch input:checked + .theme-switch-slider:before {
  transform: translateX(22px);
}

.theme-switch input:focus-visible + .theme-switch-slider {
  box-shadow: 0 0 0 2px rgba(26, 179, 148, 0.35);
}

.navbar-top-links > li.theme-toggle-nav-item {
  padding-top: 11px;
  padding-bottom: 11px;
  display: inline-flex;
  align-items: center;
}

.theme-switch--nav {
  margin-right: 4px;
}

/* Páginas públicas (login / solicitação) */
.theme-switch-wrap--floating {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 2005;
}

.theme-switch-wrap--floating .theme-switch {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}

[data-theme="dark"] .theme-switch-slider {
  background-color: #3d4450;
  border-color: #5a6370;
}

[data-theme="dark"] .theme-switch-slider:before {
  background: #e8eaed;
}

[data-theme="dark"] .theme-switch input:checked + .theme-switch-slider {
  background-color: #1ab394;
  border-color: #18a689;
}

[data-theme="dark"] .middle-box h2,
[data-theme="dark"] .passwordBox h2,
[data-theme="dark"] .passwordBox h3 {
  color: #e8eaed !important;
}

[data-theme="dark"] .passwordBox .ibox-content {
  background-color: #1e2329 !important;
  border-color: #2d333b !important;
}

[data-theme="dark"] .loginscreen .form-control {
  background-color: #252b33 !important;
  border-color: #3d4450 !important;
  color: #e8eaed !important;
}

[data-theme="dark"] .loginscreen p a,
[data-theme="dark"] .passwordBox a {
  color: #5ad4c4;
}

[data-theme="dark"] .alert {
  border-color: transparent;
}

/* Marca no topo do menu lateral (logo + título da configuração) */
.sidebar-brand {
  padding: 12px 10px;
  color: #fff;
  font-weight: 600;
  text-align: center;
}

.sidebar-brand-logo {
  display: block;
  max-height: 52px;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto 10px;
  object-fit: contain;
}

.sidebar-brand-title {
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
  color: #dfe4ed;
}
