/**
 * Dark mode – ativar quando body tem a classe theme-dark
 * (escolha feita em Configurações > Aparência)
 */
body.theme-dark {
  background-color: #1a1d23;
  color: #c8cdd6;
}
body.theme-dark a {
  color: #7eb8e6;
}
body.theme-dark a:hover,
body.theme-dark a:focus {
  color: #a8d4f5;
}

/* Área principal */
body.theme-dark .page-container .main-content {
  background: #1a1d23;
}

/* Painéis */
body.theme-dark .panel-primary {
  border-color: #3d424d;
  background-color: #252830;
}
body.theme-dark .panel-primary > .panel-heading {
  color: #e4e6eb;
  background-color: #2d323d;
  border-color: #3d424d;
}
body.theme-dark .panel-primary > .panel-body {
  background-color: #252830;
  color: #c8cdd6;
  border-color: #3d424d;
}
body.theme-dark .panel-primary > .panel-heading > .panel-title,
body.theme-dark .panel-primary > .panel-heading > .panel-title strong {
  color: #e4e6eb;
}
body.theme-dark .panel-primary > .panel-heading > .panel-options > a {
  color: rgba(228, 230, 235, 0.8);
}
body.theme-dark .panel-primary > .panel-heading > .panel-options > a.bg {
  background-color: #3d424d;
}
body.theme-dark .panel-primary > .panel-heading > .panel-options > a.bg:hover {
  background-color: #454a56;
}
body.theme-dark .panel-primary > .panel-footer {
  background-color: #2d323d;
  color: #c8cdd6;
  border-top-color: #3d424d;
}

/* Qualquer panel-body (ex.: tela Encomendas) */
body.theme-dark .panel .panel-body,
body.theme-dark .panel-body {
  background-color: #252830 !important;
  color: #c8cdd6;
  border-color: #3d424d;
}
body.theme-dark .panel .panel-body .form-group,
body.theme-dark .panel-body .form-group {
  color: #c8cdd6;
}
body.theme-dark .panel .panel-body .control-label,
body.theme-dark .panel-body .control-label {
  color: #c8cdd6;
}
body.theme-dark .panel .panel-body p,
body.theme-dark .panel-body p {
  color: #c8cdd6;
}
/* Caixa com borda verde (ex.: área de foto na Encomendas) */
body.theme-dark .panel-body div[style*="bfefbe"] {
  background-color: #252830 !important;
  border-color: #3d424d !important;
  color: #c8cdd6;
}

/* Select2 (dropdowns) */
body.theme-dark .select2-container .select2-choice {
  background-color: #2d323d !important;
  border-color: #3d424d !important;
  color: #e4e6eb;
}
body.theme-dark .select2-container .select2-chosen {
  color: #e4e6eb;
}
body.theme-dark .select2-container .select2-arrow {
  background-color: #3d424d !important;
  border-color: #3d424d;
}
body.theme-dark .select2-container .select2-arrow b {
  border-top-color: #c8cdd6;
}
body.theme-dark .select2-drop {
  background-color: #252830 !important;
  border-color: #3d424d;
}
body.theme-dark .select2-drop .select2-search input.select2-input {
  background-color: #2d323d !important;
  border-color: #3d424d;
  color: #e4e6eb;
}
body.theme-dark .select2-results .select2-result-label {
  color: #c8cdd6;
}
body.theme-dark .select2-results .select2-highlighted .select2-result-label {
  color: #e4e6eb;
  background-color: #3d424d !important;
}
body.theme-dark .select2-results .select2-no-results {
  background-color: #252830;
  color: #9ca3af;
}

/* Formulários */
body.theme-dark .form-control {
  background-color: #2d323d;
  border-color: #3d424d;
  color: #e4e6eb;
}
body.theme-dark .form-control:focus {
  border-color: #5a7ea6;
  background-color: #323842;
}
body.theme-dark .form-control::placeholder {
  color: #6b7280;
}
body.theme-dark label,
body.theme-dark .form-group label {
  color: #c8cdd6;
}

/* Tabelas */
body.theme-dark .table,
body.theme-dark table {
  background-color: #252830;
  color: #c8cdd6;
  border-color: #3d424d;
}
body.theme-dark .table > thead > tr > th,
body.theme-dark thead th {
  background-color: #2d323d !important;
  border-color: #3d424d;
  color: #e4e6eb;
}
body.theme-dark .table > tbody > tr > td,
body.theme-dark .table > tbody > tr > th,
body.theme-dark .table > tfoot > tr > td,
body.theme-dark .table > tfoot > tr > th,
body.theme-dark tbody td,
body.theme-dark tbody th {
  background-color: #252830 !important;
  border-color: #3d424d;
  color: #c8cdd6;
}
body.theme-dark .table > tbody > tr:hover > td,
body.theme-dark .table > tbody > tr:hover > th,
body.theme-dark tbody tr:hover td,
body.theme-dark tbody tr:hover th {
  background-color: #2d323d !important;
}
body.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > td,
body.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > th {
  background-color: #252830 !important;
}
body.theme-dark .table-striped > tbody > tr:nth-of-type(even) > td,
body.theme-dark .table-striped > tbody > tr:nth-of-type(even) > th {
  background-color: #2a2e38 !important;
}
body.theme-dark .table-bordered {
  border-color: #3d424d;
}
body.theme-dark .table-bordered > thead > tr > th,
body.theme-dark .table-bordered > tbody > tr > td,
body.theme-dark .table-bordered > tbody > tr > th {
  border-color: #3d424d;
}

/* DataTables (length, filter, info, paginação) */
body.theme-dark .dataTables_length,
body.theme-dark .dataTables_length label {
  background-color: transparent !important;
  color: #c8cdd6;
}
body.theme-dark .dataTables_length select {
  background-color: #2d323d !important;
  border-color: #3d424d;
  color: #e4e6eb;
}
body.theme-dark .dataTables_filter,
body.theme-dark .dataTables_filter label {
  background-color: transparent !important;
  color: #c8cdd6;
}
body.theme-dark .dataTables_filter input[type="search"] {
  background-color: #2d323d !important;
  border-color: #3d424d;
  color: #e4e6eb;
}
body.theme-dark .dataTables_filter input[type="search"]::placeholder {
  color: #6b7280;
}
body.theme-dark .dataTables_info {
  background-color: transparent !important;
  color: #c8cdd6;
}
body.theme-dark .dataTables_paginate {
  background-color: transparent !important;
}
body.theme-dark .dataTables_paginate .paginate_button {
  background-color: #2d323d !important;
  border-color: #3d424d !important;
  color: #c8cdd6 !important;
}
body.theme-dark .dataTables_paginate .paginate_button:hover {
  background-color: #3d424d !important;
  border-color: #4d535e !important;
  color: #e4e6eb !important;
}
body.theme-dark .dataTables_paginate .paginate_button.current {
  background-color: #5a7ea6 !important;
  border-color: #5a7ea6 !important;
  color: #fff !important;
}
body.theme-dark .dataTables_paginate .paginate_button.disabled {
  background-color: #252830 !important;
  border-color: #3d424d !important;
  color: #6b7280 !important;
}
body.theme-dark .dataTables_wrapper {
  color: #c8cdd6;
}

/* Breadcrumb e títulos da página */
body.theme-dark .breadcrumb {
  background-color: transparent;
  color: #9ca3af;
}
body.theme-dark .breadcrumb > li a {
  color: #7eb8e6;
}
body.theme-dark .page-title {
  color: #e4e6eb;
}

/* Header (barra superior quando existir) */
body.theme-dark header.navbar {
  background-color: #252830 !important;
  border-color: #3d424d !important;
}
body.theme-dark header.navbar .navbar-nav > li > a {
  color: #c8cdd6 !important;
}
body.theme-dark header.navbar .navbar-nav > li:hover > a {
  color: #e4e6eb !important;
}

/* Dropdown e modais */
body.theme-dark .dropdown-menu {
  background-color: #252830;
  border-color: #3d424d;
}
body.theme-dark .dropdown-menu > li > a {
  color: #c8cdd6;
}
body.theme-dark .dropdown-menu > li > a:hover {
  background-color: #2d323d;
  color: #e4e6eb;
}
body.theme-dark .modal-content {
  background-color: #252830;
  border-color: #3d424d;
  color: #c8cdd6;
}
body.theme-dark .modal-header {
  background-color: #2d323d;
  border-color: #3d424d;
  color: #e4e6eb;
}
body.theme-dark .modal-footer {
  border-color: #3d424d;
}

/* Botões secundários / default */
body.theme-dark .btn-default {
  background-color: #2d323d;
  border-color: #3d424d;
  color: #c8cdd6;
}
body.theme-dark .btn-default:hover {
  background-color: #3d424d;
  border-color: #4d535e;
  color: #e4e6eb;
}

/* Alertas e mensagens */
body.theme-dark .alert {
  border-color: #3d424d;
}
body.theme-dark .alert-info {
  background-color: #1e3a4d;
  border-color: #2d4a5e;
  color: #b8d4e8;
}
body.theme-dark .alert-success {
  background-color: #1e3d2e;
  border-color: #2d4d3a;
  color: #b8e8c8;
}
body.theme-dark .alert-warning {
  background-color: #4d3d1e;
  border-color: #5e4d2d;
  color: #e8dcb8;
}
body.theme-dark .alert-danger {
  background-color: #4d1e1e;
  border-color: #5e2d2d;
  color: #e8b8b8;
}

/* HR e bordas gerais */
body.theme-dark hr {
  border-top-color: #3d424d;
}

/* Checkbox e radio */
body.theme-dark input[type="checkbox"],
body.theme-dark input[type="radio"] {
  accent-color: #5a7ea6;
}
