[data-bs-theme="dark"]  body {
  background: #2f3441 !important;
}

[data-bs-theme="dark"] .app-header {
    background: linear-gradient(135deg, #2d313d, #2a303f, #282b38) !important;
}

[data-bs-theme="dark"] .sidebar-brand {
background-color: #31373d;
}

[data-bs-theme="dark"] .user-footer {
  background: linear-gradient(135deg, #2d2f37, #272b37, #283f56);
}

[data-bs-theme="dark"] .app-footer {
  background: linear-gradient(135deg, #2d2f37, #272b37, #283f56);
}

[data-bs-theme="dark"] .user-footer .btn-flat {
  background-color: #4f86b1 !important;
  color: #ffffff !important;
  border: 1px solid #4a83c9 !important;
  transition: all 0.2s ease-in-out;
}

[data-bs-theme="dark"] .user-footer .btn-flat:hover {
  background-color: #317db7 !important;
  border-color: rgb(20, 117, 150) !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .card {
  background: linear-gradient(135deg, #31333a, #2f3441, #283f56);
  background-attachment: fixed;
  color: #fff;
}

[data-bs-theme="dark"] {
  --success-gradient: linear-gradient(to right, #2ad56c, #11998e);
  --success-gradient-hover: linear-gradient(to right, #2ed573, #0c7d6d);

  --success-gradient-info: linear-gradient(to right, #0bb8f7, #0780a9);
  --success-gradient-info-hover: linear-gradient(to right, #07b3de, #1097c8);
}

[data-bs-theme="dark"] .btn-success {
  background: var(--success-gradient) !important;
  border-color: #05e694 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

[data-bs-theme="dark"] .btn-success:hover {
  background: var(--success-gradient-hover) !important;
  border-color: #0c7d6d !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-info {
  background: var(--success-gradient-info) !important;
  border-color: #13c2e9 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

[data-bs-theme="dark"] .btn-info:hover {
  background: var(--success-gradient-info-hover) !important;
  border-color: #0bd7ee !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .card .card-header .card-title {
  color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .grid-view .card-header {
  background: linear-gradient(135deg, #31333a, #2f3441, #283f56);
  color: #e4e3e3 !important;
}

[data-bs-theme="dark"] .grid-view .card-header
  :is(
    .gridview-panel-heading-success,
    .gridview-panel-heading-info,
    .gridview-panel-heading-warning,
    .gridview-panel-heading-danger,
    .gridview-panel-heading-default
  ) {
  color: #d7d8d7 !important;
}

[data-bs-theme="dark"] .border-active {
  color:#f4d09a !important;
}

[data-bs-theme="dark"] .grid-view  table a { 
  color: #8fbce5 !important;
}

[data-bs-theme="dark"] .grid-view table a:hover { 
  color: #257adb !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
  color:#8db3e6 !important;
}

[data-bs-theme="dark"] .card :is(
  .border-success,
  .border-info,
  .border-danger,
  .border-warning,
  .border-primary,
) {
  border-color: #2e2e2e !important;  
}


[data-bs-theme="dark"] .kv-grid-panel .kv-table-header > tr,
[data-bs-theme="dark"] .kv-grid-panel .kv-table-header > tr > th,
[data-bs-theme="dark"] .kv-grid-panel .kv-table-header > tr > td {
  background: #2a2d33 !important;
}

[data-bs-theme="dark"] .sidebar-wrapper {
  background-color: #2d363d !important;
}

[data-bs-theme="dark"] .sidebar-wrapper .nav-link.active {
  border-left: 3px solid #e8270a !important;
  color: #e7e7e7 !important;
}

/* Solo afecta al modal con clase .modal-success */
[data-bs-theme="dark"] .modal-success .bg-success {
  background: linear-gradient(
    90deg,
    #3e9377 0%,
    #289b88 50%,
    #28755f 100%
  ) !important;

  border-bottom: none;
}

[data-bs-theme="dark"] .modal-success .modal-header .btn-close {
  filter: none !important; /* cancelar filtro de Bootstrap para no mostrar boton en blanco*/
}

[data-bs-theme="dark"] .select2-container--krajee-bs5 .select2-selection {
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    background-color: #292a31;
    border: 1px solid #292a31 !important;
    border-radius: 0.25rem;
    color: #212529;
    outline: 0;
    transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}

[data-bs-theme="dark"] .select2-container--krajee-bs5 .select2-selection--multiple .select2-selection__choice {
    color: #ffffff;
    background: #7aa2fa;
}

.select2-container--krajee-bs5 .select2-selection--multiple .select2-selection__choice__remove {   
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1rem;
    color: #faf9f9 !important;
    opacity: 0.9;
}

[data-bs-theme="dark"] .select2-dropdown  {
  background-color: #292a31 !important;
}

[data-bs-theme="dark"] .select2-search--dropdown {
  background-color: #292a31 !important;
}
[data-bs-theme="dark"]
  .select2-container--krajee-bs5
  .select2-search--dropdown
  .select2-search__field {
  background: #292a31 url(search.png) right 0.625rem top 0.625rem no-repeat;
  border: 1px dashed #434242;
  color: #fff !important;
}

[data-bs-theme="dark"]
  .select2-container--krajee-bs5
  .select2-results__option[aria-selected] {
  background-color: #292a31;
  color: #f2f2f2;
}

[data-bs-theme="dark"]
  .select2-container--krajee-bs5
  .select2-selection--single
  .select2-selection__rendered {
  color: #dee3e7;
}

[data-bs-theme="dark"]
  .select2-container--krajee-bs5
  .select2-results__option--highlighted[aria-selected] {
  background-color: #2c67c0;
}

[data-bs-theme="dark"]
  .select2-container--krajee-bs5
  .select2-selection__clear {
  color: #e7dfdf;
}

[data-bs-theme="dark"] .select2-container--krajee-bs5.select2-container--open:not(.select2-container--disabled) .select2-selection, .select2-container--krajee-bs5:not(.select2-container--disabled) .select2-selection:focus {
    border-color: none !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .select2-container--krajee-bs5:not(.select2-container--disabled) .select2-dropdown {
    border: 1px solid #434242;
    box-shadow: none;
}


[data-bs-theme="dark"] .card .card-body .entidad-form-detalles {
    color: #90caf3 !important;
}

/* Ajusta inputs */
[data-bs-theme="dark"] .form-control {
 background: linear-gradient(135deg, #2d2f37, #26282f, rgb(45, 49, 55));
 
}

[data-bs-theme="dark"] .nav-link {

  color: #b3b3b3 !important;
}

[data-bs-theme="dark"] .sidebar-wrapper .nav-link.active {   
    font-weight: 500;      
    padding-left: 15px !important;     
}

[data-bs-theme="dark"] [data-lte-toggle="sidebar"] {
    color: #f19a58 !important;  
    /* --- ESTILO CIRCULAR --- */
    background: #2b2b2b;    
    /* --- SOMBRA Y EFECTO ELEGANTE --- */
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: background 0.25s ease, transform 0.2s ease;
}

[data-bs-theme="dark"] [data-lte-toggle="sidebar"].nav-link:hover {
    background: #3a3a3a;           
    transform: scale(1.07);
}

[data-bs-theme="dark"] [data-lte-toggle="sidebar"].nav-link:active {   
    transform: scale(0.95);
}

[data-bs-theme="dark"] .text-bg-primary {
    color: #fff !important;
    background-color: rgb(50, 50, 63) !important;
}

[data-bs-theme="dark"] .card-title {
   color: #e7d45c !important;
}

[data-bs-theme="dark"] .CellCampo {   
    color: #f4d09a;
}

[data-bs-theme="dark"] .CellName {
    color: #fdfbfb;
}

[data-bs-theme="dark"] .header-title-x h5,
[data-bs-theme="dark"] .header-title-x h6 {
  color: #e7d45c;
}

[data-bs-theme="dark"] .filter-reports {
  color: #151515;
}

[data-bs-theme="dark"] .list-reports {
  color: #55baf1;
}

[data-bs-theme="dark"] .timeline .timeline-item .timeline-header { 
  background: #009b95 !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .timeline-item a {
  color: #fff;
}

[data-bs-theme="dark"] .timeline .timeline-item .timeline-body {   
  background: #2f3441 !important;
}

[data-bs-theme="dark"] .time-dropdown-button .text-dark {
  color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .check-marcas {
  color:#32e605;
}

[data-bs-theme="dark"] .check-grafica-reporte {
  color:#e49228;
}

[data-bs-theme="dark"] .highcharts-background {
    fill: #2d313a !important;
}

[data-bs-theme="dark"] .highcharts-title {
    fill: #c9c8f1 !important;
}

[data-bs-theme="dark"] .highcharts-axis-title {
    fill: #e66e37 !important;
    font-weight: bold;
}

[data-bs-theme="dark"] .highcharts-axis-labels text {
  fill: #e7d45c !important;
  font-weight: 500;
}

[data-bs-theme="dark"] .highcharts-legend-item text {
  fill: #fff !important;
  font-weight: 500;
}

[data-bs-theme="dark"] .highcharts-legend-item text:hover {
    fill: #40ca7e !important;
    font-weight: 500;
}

[data-bs-theme="dark"] .highcharts-grid-line {
    stroke: #404455 !important;
}

/* Fondo del tooltip (caja) */
[data-bs-theme="dark"] .highcharts-tooltip path,
[data-bs-theme="dark"] .highcharts-tooltip path {
    fill: #2a2c33 !important;
    stroke: #34d399 !important;
}
[data-bs-theme="dark"] .highcharts-tooltip text,
[data-bs-theme="dark"] .highcharts-tooltip tspan,
[data-bs-theme="dark"] .highcharts-tooltip text,
[data-bs-theme="dark"] .highcharts-tooltip tspan {
    fill: #e5e7eb !important;
}

[data-bs-theme="dark"] .btn-neutral {
  background-color: #313641 !important;
  color: #87c475;
  border: solid 1px #27272c !important;
}

[data-bs-theme="dark"] .btn-neutral:hover {
  background-color: #2d323b !important; 
  color: #81c06e;
  border: solid 1px #27272c;
}

[data-bs-theme="dark"] .datepicker table tr td:hover {
    background-color: #f0962f;
    color: #000;
}

[data-bs-theme="dark"] .btn-zinc {
  background-color: #5f5f79  !important;
  color: #fdfdfd;
}

[data-bs-theme="dark"] .btn-zinc:hover {
  background-color: #56566e  !important; 
  color: #fdfdfd;
}

[data-bs-theme="dark"] .btn-gray {
  background-color: #525252  !important;
  color: #f0f3f7;
  border: solid 1px #272727 !important;
}

[data-bs-theme="dark"] .btn-gray:hover {
  background-color: #474747 !important; 
  color: #f0f3f7;
}

[data-bs-theme="dark"] .btn-zinc-grid { 
  background: linear-gradient(to bottom, #3a3e50, #3b3d47);
  border: 1px solid #292929 !important;
  color:#d1d1d0;
}

[data-bs-theme="dark"] .btn-zinc-grid:hover {
  background: linear-gradient(to bottom, #292b38, #33353f);
  color:#eea341;
}

[data-bs-theme="dark"] .btn-outline-secondary {
  background: linear-gradient(to bottom, #3a3e50, #3b3d47);
  border: 1px solid #292929 !important;
  color:#d1d1d0;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
  background-color: #3b3f42 !important;
   color:#eea341;
}

[data-bs-theme="dark"] .kv-grid-panel .kv-table-header > tr > th, .kv-grid-panel .kv-table-header > tr > td {
    color: #5f93d6 !important;
}

[data-bs-theme="dark"] .info-box {
  background:none;  
  box-shadow: 0 0 1px rgba(var(--bs-body-color-rgb), 0.5), 0 1px 3px rgba(var(--bs-body-color-rgb), 0.05);
}

[data-bs-theme="dark"] .info-box {
  transition: box-shadow 0.3s ease;
}

[data-bs-theme="dark"] .info-box:hover {
  box-shadow: 
    0 0 1px rgba(20, 20, 20, 0.2),
    0 1px 3px rgba(22, 22, 22, 0.7);
}

[data-bs-theme="dark"] .dropdownlist {
  background-color: #2f3441;
}

[data-bs-theme="dark"] .timeline-icon  {
  background-color: #3d3d5c !important;
}

[data-bs-theme="dark"] .label-reporte  {
  color: #80828d !important;
}

[data-bs-theme="dark"] label {
  color: #8f8f9e !important;
  font-size:smaller
}

[data-bs-theme="dark"] .sp-replacer {
  background: #242424 !important;
  width: 45px;
}
[data-bs-theme="dark"] .sp-dd {
  color: #fdffff !important;
}

[data-bs-theme="dark"] .sp-palette-container {
background-color: #2d323b; 
}

[data-bs-theme="dark"] .sp-picker-container {
background-color: #2d323b; 
}

[data-bs-theme="dark"] .skeleton{
  background: linear-gradient(
    90deg,
    #4d515a 25%,
    #31363f 37%,
    #3f4450 63%
  );
  background-size:400% 100%;
  animation:shimmer 1.4s ease infinite;
  border-radius:6px;
}

[data-bs-theme="dark"] .filter-skeleton { 
  border: 1px solid #495057;
  background: none;
}

[data-bs-theme="dark"] .skeleton-input,
[data-bs-theme="dark"] .skeleton-select,
[data-bs-theme="dark"] .skeleton-button {
  background: linear-gradient(
    90deg,
    #4d515a 25%,
    #31363f 37%,
    #3f4450 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

/* Barra principal */
[data-bs-theme="dark"] .ui-mprogress .bar-bg,
[data-bs-theme="dark"] .ui-mprogress .buffer-bg,
[data-bs-theme="dark"] .ui-mprogress .deter-bar,
[data-bs-theme="dark"] .ui-mprogress .indeter-bar,
[data-bs-theme="dark"] .ui-mprogress .query-bar {
  background: #3a81f0 !important;
}

/* Fondo / buffer */
[data-bs-theme="dark"] .ui-mprogress .bar-bg,
[data-bs-theme="dark"] .ui-mprogress .buffer-bg {
  z-index: 1031;
  background: #b0d0ef !important;
}

/* Línea dashed animada */
[data-bs-theme="dark"] .ui-mprogress .mp-ui-dashed {
  z-index: 1030;
  background: transparent;
}

[data-bs-theme="dark"] .ui-mprogress .mp-ui-dashed:before {
    background: radial-gradient(#a9c0e9 0, #a9c0e9 16%, transparent 42%) 0 -23px !important;
}

/* Brillo lateral */
[data-bs-theme="dark"] .ui-mprogress .peg {
  box-shadow:
    0 0 10px #3a81f0,
    0 0 5px #29d !important;
}

[data-bs-theme="dark"] .info-box-text {
  color: #ceccbb;
}

[data-bs-theme="dark"] .kv-grid-table .bg-light {
  
  background: #212529 !important;

}

[data-bs-theme="dark"] .kv-expand-header-cell.kv-batch-toggle, .kv-expand-icon-cell:hover{
    background: #212529;   
    color:#05e694 !important;
}

[data-bs-theme="dark"] .kv-expand-header-cell, .kv-expand-icon-cell:hover { 
   color:#e49228 !important;
}

[data-bs-theme="dark"] .table-info {
     --bs-table-bg: #292929 !important;
}

[data-bs-theme="dark"] .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
    border-top: 5px solid #2c2c30;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-bg-type: #292929 !important;
}

[data-bs-theme="dark"] .card-text-medio {
  color:#d8d3ab;
}

[data-bs-theme="dark"] .modal-title-x {
  color: #f5b454;
}

[data-bs-theme="dark"] .gridview-panel-heading-title {
  color: #b0b0d3;
}

[data-bs-theme="dark"] .callout-warning-title {
  color: #fff !important;
}