/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.menu .app-brand.demo {
  height: 64px;
  margin-top: 12px;
}

.app-brand-logo.demo svg {
  width: 22px;
  height: 38px;
}

.app-brand-text.demo {
  font-size: 1.75rem;
  letter-spacing: -0.5px;
  text-transform: lowercase;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
/* Detached navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 76px !important;
}
/* Default navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}

/* ==========================================================================
   Estilo Personalizado Menú Lateral: Azul Celeste Gris Suave UNIFORME
   ========================================================================== */
#layout-menu.bg-menu-theme,
#layout-menu.bg-menu-theme .menu-inner,
#layout-menu.bg-menu-theme .menu-sub {
  background-color: #ebf1f8 !important;
}

#layout-menu.bg-menu-theme {
  border-right: 1px solid #d4e0ee !important;
  box-shadow: 2px 0 12px rgba(105, 108, 255, 0.06) !important;
}

#layout-menu .app-brand {
  background-color: #ebf1f8 !important;
  border-bottom: 1px solid #d8e5f2 !important;
  justify-content: center !important;
  text-align: center !important;
  position: relative !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

#layout-menu .app-brand .app-brand-link {
  justify-content: center !important;
  width: 100% !important;
  margin-right: 0 !important;
  display: flex !important;
}

#layout-menu .app-brand .app-brand-logo img {
  margin: 0 auto !important;
}

#layout-menu .menu-header-text {
  color: #556b82 !important;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: 0.68rem !important;
  white-space: nowrap !important;
  display: inline-block;
  max-width: 100%;
}

/* Enlaces base del menú */
#layout-menu .menu-link {
  color: #33475b !important;
  font-weight: 500;
}

#layout-menu .menu-icon {
  color: #50667f !important;
}

/* Submenús del Menú Lateral: Texto normal (no strong / no negrita) */
#layout-menu .menu-sub .menu-link,
#layout-menu .menu-sub .menu-link *,
#layout-menu .menu-sub > .menu-item > .menu-link,
#layout-menu .menu-sub > .menu-item.active > .menu-link {
  font-weight: 400 !important;
}

/* Estado Hover y menú desplegado */
#layout-menu .menu-link:hover,
#layout-menu .menu-item.open > .menu-link {
  background-color: #dbe6f4 !important;
  color: #696cff !important;
}

#layout-menu .menu-link:hover .menu-icon,
#layout-menu .menu-item.open > .menu-link .menu-icon,
#layout-menu .menu-item.open > .menu-link div {
  color: #696cff !important;
}

/* OPCIÓN ACTIVA EN CUALQUIER PÁGINA (Ítem superior o Sub-ítem): Rectángulo Azul con Texto e Ícono Blanco */
#layout-menu .menu-inner > .menu-item.active:not(.open) > .menu-link,
#layout-menu .menu-sub > .menu-item.active > .menu-link {
  background: linear-gradient(72.47deg, #696cff 0%, #7e81ff 100%) !important;
  color: #ffffff !important;
  border-radius: 0.375rem !important;
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.35) !important;
}

#layout-menu .menu-inner > .menu-item.active:not(.open) > .menu-link {
  font-weight: 600 !important;
}

#layout-menu .menu-inner > .menu-item.active:not(.open) > .menu-link .menu-icon,
#layout-menu .menu-inner > .menu-item.active:not(.open) > .menu-link div,
#layout-menu .menu-sub > .menu-item.active > .menu-link div {
  color: #ffffff !important;
}

#layout-menu .menu-sub > .menu-item.active > .menu-link:before {
  background-color: #ffffff !important;
  border: 3px solid #696cff !important;
}

/* ==========================================================================
   Separación de 10px entre el Menú Lateral y el Contenido de las Páginas
   ========================================================================== */
@media (min-width: 1200px) {
  .layout-page {
    padding-left: calc(16.25rem + 10px) !important;
  }
}

/* ==========================================================================
   Buscador Flotante de Productos en Carga de Factura de Compra
   ========================================================================== */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(67, 89, 113, 0.18);
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid #d9e2ec;
  margin-top: 4px;
}

.search-result-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f4f8;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
  background-color: #f0f6ff;
}
/* ==========================================================================
   Fondo Gris Claro Nítido para Todas las Páginas (Excluyendo Sidebar)
   ========================================================================== */
html,
body,
.layout-wrapper,
.layout-container,
.layout-page,
.content-wrapper,
.container-p-y,
.container-xxl,
.container-fluid,
footer,
.footer,
.content-footer,
.bg-footer-theme {
  background-color: #e9ecef !important;
}

/* Pie de Página (Footer) Homogéneo en Tema Claro */
footer,
.footer,
.content-footer,
.bg-footer-theme {
  border-top: 1px solid #d4e0ee !important;
  box-shadow: none !important;
  color: #556b82 !important;
}

/* El menú lateral (sidebar) conserva su tema original */
#layout-menu,
#layout-menu .menu-inner,
.bg-menu-theme {
  background-color: #ffffff !important;
}

/* Las tarjetas del contenido destacan con fondo blanco nítido */
.card {
  background-color: #ffffff !important;
  box-shadow: 0 0.125rem 0.375rem rgba(161, 172, 184, 0.25) !important;
}

/* ==========================================================================
   ESTILOS COMPLETOS TEMA OSCURO (DARK MODE)
   ========================================================================== */
html.dark-theme,
body.dark-theme,
.dark-theme .layout-wrapper,
.dark-theme .layout-container,
.dark-theme .layout-page,
.dark-theme .content-wrapper,
.dark-theme .container-p-y,
.dark-theme .container-xxl,
.dark-theme .container-fluid {
  background-color: #181924 !important;
  color: #d5d8de !important;
}

/* Corrección Definitiva de Rectángulo Blanco del Logo y Sombras en Sidebar */
.dark-theme .menu-inner-shadow,
.dark-theme .menu-inner-shadow::after,
.dark-theme .menu-inner-shadow::before,
.dark-theme #layout-menu .menu-inner-shadow {
  display: none !important;
  background: transparent !important;
  background-color: transparent !important;
  opacity: 0 !important;
  box-shadow: none !important;
}

.dark-theme .app-brand,
.dark-theme .app-brand *,
.dark-theme .app-brand-logo,
.dark-theme .app-brand-link,
.dark-theme #layout-menu .app-brand,
.dark-theme .bg-menu-theme .app-brand {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Tarjetas, Navbar y Sidebar en Tema Oscuro */
.dark-theme .card,
.dark-theme #layout-navbar,
.dark-theme #layout-menu,
.dark-theme #layout-menu .menu-inner,
.dark-theme .bg-menu-theme,
.dark-theme .bg-navbar-theme {
  background-color: #2b2c40 !important;
  color: #d5d8de !important;
  border-color: #3b3c54 !important;
}

/* Encabezados de Tarjetas y Headers */
.dark-theme .card-header {
  background-color: #232433 !important;
  color: #ffffff !important;
  border-bottom: 1px solid #3b3c54 !important;
}

.dark-theme .card-header .card-title,
.dark-theme .card-header h5,
.dark-theme .card-header h4,
.dark-theme .card-header h6 {
  color: #ffffff !important;
}

/* Encabezados y Textos Generales */
.dark-theme h1,
.dark-theme h2,
.dark-theme h3,
.dark-theme h4,
.dark-theme h5,
.dark-theme h6,
.dark-theme .card-title,
.dark-theme .modal-title,
.dark-theme .text-dark,
.dark-theme .menu-link div,
.dark-theme .app-brand-text {
  color: #ffffff !important;
}

.dark-theme .text-muted,
.dark-theme .form-label,
.dark-theme small {
  color: #a1a5b7 !important;
}

/* Corrección de Tablas y Textos de Productos */
.dark-theme .table {
  color: #d5d8de !important;
}

.dark-theme .table-light,
.dark-theme .table thead th,
.dark-theme .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: #232433 !important;
  color: #ffffff !important;
  border-color: #3b3c54 !important;
}

.dark-theme .table td,
.dark-theme .table th,
.dark-theme .table-hover > tbody > tr:hover > * {
  border-color: #3b3c54 !important;
  background-color: #2b2c40 !important;
  color: #e2e8f0 !important;
}

.dark-theme .table td small,
.dark-theme .table td .text-muted,
.dark-theme small.text-muted {
  color: #a1a5b7 !important;
}

/* Form inputs, Selects, Input Groups */
.dark-theme .form-control,
.dark-theme .form-select,
.dark-theme .input-group-text,
.dark-theme .bg-white {
  background-color: #232433 !important;
  color: #ffffff !important;
  border-color: #3b3c54 !important;
}

.dark-theme .form-control::placeholder {
  color: #787a91 !important;
}

.dark-theme .form-control:focus,
.dark-theme .form-select:focus {
  border-color: #696cff !important;
  box-shadow: 0 0 0 0.25rem rgba(105, 108, 255, 0.25) !important;
}

/* Modales */
.dark-theme .modal-content {
  background-color: #2b2c40 !important;
  color: #d5d8de !important;
  border: 1px solid #3b3c54 !important;
}

.dark-theme .modal-header,
.dark-theme .modal-footer {
  border-color: #3b3c54 !important;
}

/* Desplegables / Dropdowns / Buscador Flotante */
.dark-theme .dropdown-menu,
.dark-theme .search-results-dropdown {
  background-color: #2b2c40 !important;
  border-color: #3b3c54 !important;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.4) !important;
}

.dark-theme .dropdown-item {
  color: #d5d8de !important;
}

.dark-theme .dropdown-item:hover,
.dark-theme .dropdown-item:focus,
.dark-theme .search-result-item:hover {
  background-color: #363852 !important;
  color: #ffffff !important;
}

.dark-theme .search-result-item {
  border-color: #3b3c54 !important;
}

/* Menú Lateral Links, Submenús y Hover en Dark Mode */
.dark-theme #layout-menu .menu-item .menu-link {
  color: #b4b7c9 !important;
}

.dark-theme #layout-menu .menu-header-text {
  color: #7b809a !important;
}

/* On Hover de los ítems del sidebar en Theme Oscuro: Texto e iconos en color oscuro */
.dark-theme #layout-menu .menu-item .menu-link:hover,
.dark-theme #layout-menu .menu-sub .menu-link:hover,
.dark-theme .bg-menu-theme .menu-link:hover,
.dark-theme .bg-menu-theme .menu-sub .menu-link:hover {
  color: #181924 !important;
  background-color: #e9ecef !important;
}

.dark-theme #layout-menu .menu-item .menu-link:hover *,
.dark-theme #layout-menu .menu-sub .menu-link:hover *,
.dark-theme .bg-menu-theme .menu-link:hover *,
.dark-theme .bg-menu-theme .menu-sub .menu-link:hover * {
  color: #181924 !important;
}

.dark-theme #layout-menu .menu-sub,
.dark-theme #layout-menu .menu-sub *,
.dark-theme .bg-menu-theme .menu-sub,
.dark-theme .bg-menu-theme .menu-sub .menu-item {
  background-color: transparent !important;
}

.dark-theme #layout-menu .menu-sub .menu-link,
.dark-theme .bg-menu-theme .menu-sub .menu-link {
  color: #b4b7c9 !important;
}

.dark-theme #layout-menu .menu-inner > .menu-item.active:not(.open) > .menu-link,
.dark-theme .bg-menu-theme .menu-inner > .menu-item.active:not(.open) > .menu-link {
  color: #696cff !important;
  background-color: rgba(105, 108, 255, 0.16) !important;
  font-weight: 600 !important;
}

.dark-theme .bg-light {
  background-color: #232433 !important;
  color: #d5d8de !important;
}

.dark-theme .btn-outline-secondary {
  color: #b4b7c9 !important;
  border-color: #444564 !important;
}

.dark-theme .btn-outline-secondary:hover {
  background-color: #3b3c54 !important;
  color: #ffffff !important;
}

/* Pie de Página (Footer) en Dark Mode */
.dark-theme footer,
.dark-theme .footer,
.dark-theme .content-footer,
.dark-theme .bg-footer-theme {
  background-color: #181924 !important;
  color: #a1a5b7 !important;
  border-top: 1px solid #2d2f45 !important;
  box-shadow: none !important;
}

/* Tabs de Navegación (configuracion.php) */
.dark-theme .nav-tabs {
  border-bottom-color: #3b3c54 !important;
}

.dark-theme .nav-tabs .nav-link {
  color: #a1a5b7 !important;
  background-color: #232433 !important;
  border-color: #3b3c54 !important;
}

.dark-theme .nav-tabs .nav-link.active,
.dark-theme .nav-tabs .nav-item.show .nav-link {
  color: #ffffff !important;
  background-color: #2b2c40 !important;
  border-color: #3b3c54 #3b3c54 #2b2c40 #3b3c54 !important;
  border-top: 3px solid #696cff !important;
}

.dark-theme .nav-tabs .nav-link:hover {
  color: #ffffff !important;
  background-color: #323348 !important;
}

/* Badges Tintados en Dark Mode */
.dark-theme .bg-label-primary {
  background-color: #2e3256 !important;
  color: #8c90ff !important;
}

.dark-theme .bg-label-secondary {
  background-color: #2d2f45 !important;
  color: #b4b7c9 !important;
}

.dark-theme .bg-label-success {
  background-color: #1f3b34 !important;
  color: #71dd37 !important;
}

.dark-theme .bg-label-info {
  background-color: #1a3848 !important;
  color: #03c3ec !important;
}

.dark-theme .bg-label-warning {
  background-color: #3e3328 !important;
  color: #ffab00 !important;
}

.dark-theme .bg-label-danger {
  background-color: #3f262f !important;
  color: #ff3e1d !important;
}

/* Switches, Checks y Radios */
.dark-theme .form-check-input {
  background-color: #232433 !important;
  border-color: #444564 !important;
}

.dark-theme .form-check-input:checked {
  background-color: #696cff !important;
  border-color: #696cff !important;
}

/* Alertas en Dark Mode */
.dark-theme .alert-info {
  background-color: #1a3848 !important;
  color: #72d9fc !important;
  border-color: #285167 !important;
}

.dark-theme .alert-danger {
  background-color: #3f262f !important;
  color: #ff8c7a !important;
  border-color: #63333d !important;
}

.dark-theme .alert-success {
  background-color: #1f3b34 !important;
  color: #89e45b !important;
  border-color: #2d584b !important;
}

.dark-theme .alert-warning {
  background-color: #3e3328 !important;
  color: #ffc44d !important;
  border-color: #5c4a37 !important;
}

/* Card Superior / Navbar en Fondo Blanco Sólido */
.layout-navbar,
#layout-navbar,
.bg-navbar-theme,
.navbar-detached {
  background-color: #ffffff !important;
  background: #ffffff !important;
  box-shadow: 0 0.125rem 0.375rem rgba(161, 172, 184, 0.2) !important;
}

html.dark-theme .layout-navbar,
html.dark-theme #layout-navbar,
html.dark-theme .bg-navbar-theme,
html.dark-theme .navbar-detached,
body.dark-theme .layout-navbar,
body.dark-theme #layout-navbar,
body.dark-theme .bg-navbar-theme,
body.dark-theme .navbar-detached,
.dark-theme #layout-navbar,
.dark-theme .bg-navbar-theme {
  background-color: #2b2c40 !important;
  background: #2b2c40 !important;
  color: #d5d8de !important;
  border-color: #3b3c54 !important;
}

/* ==========================================================================
   AJUSTES COMPLEMENTARIOS DE VISUALIZACIÓN EN TEMA OSCURO (DARK MODE)
   ========================================================================== */

/* 1. Select2 Dropdowns - Selección e Ítem Activo */
html.dark-theme .select2-container,
html.dark-theme .select2-container *,
html.dark-theme .select2-selection,
html.dark-theme .select2-selection--single,
html.dark-theme .select2-selection--multiple,
html.dark-style .select2-container,
html.dark-style .select2-selection--single,
.light-style.dark-theme .select2-container,
.light-style.dark-theme .select2-selection--single,
.dark-theme .select2-selection--single,
.select2-container--default .select2-selection--single {
  background-color: #232433 !important;
  border-color: #3b3c54 !important;
  color: #ffffff !important;
}

html.dark-theme .select2-container--default .select2-selection--single .select2-selection__rendered,
html.dark-style .select2-container--default .select2-selection--single .select2-selection__rendered,
.light-style.dark-theme .select2-container--default .select2-selection--single .select2-selection__rendered,
.dark-theme .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #ffffff !important;
}

html.dark-theme .select2-container--default .select2-selection--single .select2-selection__placeholder,
body.dark-theme .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #787a91 !important;
}

html.dark-theme .select2-container--default .select2-selection--single .select2-selection__arrow b,
body.dark-theme .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #a1a5b7 transparent transparent transparent !important;
}

/* 1b. Select2 Menu Desplegable FLOTANTE (Dropdown Panel y Resultados) */
html.dark-theme .select2-dropdown,
html.dark-style .select2-dropdown,
.light-style.dark-theme .select2-dropdown,
body.dark-theme .select2-dropdown,
.dark-theme .select2-dropdown,
.select2-dropdown {
  background-color: #2b2c40 !important;
  border-color: #3b3c54 !important;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.5) !important;
}

html.dark-theme .select2-results,
html.dark-theme .select2-results__options,
html.dark-theme .select2-results__option,
html.dark-style .select2-results__option,
.light-style.dark-theme .select2-results__option,
body.dark-theme .select2-results__option,
.dark-theme .select2-results__option,
.select2-results__option {
  background-color: #2b2c40 !important;
  color: #ffffff !important;
}

html.dark-theme .select2-container--default .select2-results__option--highlighted[aria-selected],
html.dark-theme .select2-container--default .select2-results__option[aria-selected="true"],
html.dark-style .select2-container--default .select2-results__option--highlighted[aria-selected],
.light-style.dark-theme .select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #696cff !important;
  color: #ffffff !important;
}

html.dark-theme .select2-container--default .select2-search--dropdown,
html.dark-theme .select2-container--default .select2-search--dropdown .select2-search__field,
body.dark-theme .select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: #232433 !important;
  border-color: #3b3c54 !important;
  color: #ffffff !important;
}

/* 2. Form Selects, Desplegables y Campos Deshabilitados */
html.dark-theme .form-select,
html.dark-style .form-select,
.dark-theme .form-select,
body.dark-theme .form-select,
.light-style.dark-theme .form-select,
html.dark-theme select.form-select,
html.dark-theme .card .form-select,
html.dark-theme .card-body .form-select,
html.dark-theme .row .form-select,
html.dark-theme div .form-select,
html.dark-theme form .form-select,
html.dark-theme #compra_proveedor_id,
html.dark-theme #item_marca_id,
html.dark-theme #item_categoria_id,
html.dark-theme #item_unidad_medida_id,
html.dark-theme #item_alicuota_iva,
.dark-theme select,
.dark-theme .form-select,
html.dark-theme .custom-search-select-trigger,
html.dark-style .custom-search-select-trigger,
.dark-theme .custom-search-select-trigger {
  background-color: #232433 !important;
  color: #ffffff !important;
  border-color: #3b3c54 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28255, 255, 255, 0.7%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.875rem center !important;
  background-size: 17px 12px !important;
}

/* Opciones dentro de todos los selects en Tema Oscuro */
html.dark-theme select option,
html.dark-theme .form-select option,
.dark-theme select option,
.dark-theme .form-select option {
  background-color: #232433 !important;
  color: #ffffff !important;
}

html.dark-theme .custom-search-select-menu,
html.dark-style .custom-search-select-menu,
.dark-theme .custom-search-select-menu {
  background-color: #2b2c40 !important;
  background: #2b2c40 !important;
  border-color: #3b3c54 !important;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.5) !important;
}

html.dark-theme .custom-search-select-item,
.dark-theme .custom-search-select-item {
  color: #d5d8de !important;
}

html.dark-theme .custom-search-select-item:hover,
.dark-theme .custom-search-select-item:hover {
  background-color: #696cff !important;
  color: #ffffff !important;
}

/* Selects e Inputs Deshabilitados */
html.dark-theme .form-control:disabled,
html.dark-theme .form-control[readonly],
html.dark-theme .form-select:disabled,
html.dark-theme select.form-select:disabled,
html.dark-theme .card-body .form-select:disabled,
body.dark-theme .form-control:disabled,
.dark-theme .form-select:disabled {
  background-color: #1c1d2b !important;
  color: #8a8d9b !important;
  border-color: #33344a !important;
  opacity: 0.8 !important;
}

/* 3. Badges Amarillos / Advertencias */
html.dark-theme .badge.bg-warning,
html.dark-theme .badge.bg-warning.text-dark,
html.dark-theme .badge.bg-light.text-dark,
body.dark-theme .badge.bg-warning {
  color: #212529 !important;
}

/* 4. Elementos con clase bg-white, bg-light, Tablas y Filas Vacías */
html.dark-theme .bg-white,
html.dark-theme .bg-light,
html.dark-theme .card-footer.bg-white,
html.dark-theme .card-header.bg-white,
html.dark-theme .modal-footer.bg-white,
html.dark-theme .border.rounded.bg-white,
html.dark-theme .table,
html.dark-theme .table > :not(caption) > * > *,
html.dark-theme .table-striped > tbody > tr:nth-of-type(odd) > *,
html.dark-theme .table-striped > tbody > tr > *,
html.dark-theme .table-hover > tbody > tr:hover > *,
html.dark-theme #tabla_items,
html.dark-theme #tbody_items,
html.dark-theme #tbody_items tr,
html.dark-theme #tbody_items td,
html.dark-theme #tbody_items td *,
html.dark-theme #row_empty,
html.dark-theme #row_empty td,
html.dark-style .table,
html.dark-style #tabla_items,
html.dark-style #tbody_items td,
.dark-theme #tabla_items,
.dark-theme #tabla_items tr,
.dark-theme #tabla_items td,
.dark-theme #tbody_items,
.dark-theme #tbody_items tr,
.dark-theme #tbody_items td,
.dark-theme #tbody_items td *,
.dark-theme #row_empty,
.dark-theme #row_empty td,
html.dark-theme #tabla_items,
html.dark-theme #tabla_items tr,
html.dark-theme #tabla_items td,
html.dark-theme #tbody_items tr,
html.dark-theme #tbody_items td,
html.dark-style #tabla_items tr,
html.dark-style #tbody_items td,
.light-style.dark-theme #tabla_items tr,
.light-style.dark-theme #tbody_items td {
  --bs-table-bg: #232433 !important;
  --bs-table-accent-bg: #232433 !important;
  --bs-table-striped-bg: #232433 !important;
  --bs-table-hover-bg: #2b2c40 !important;
  background-color: #232433 !important;
  background: #232433 !important;
  color: #ffffff !important;
  border-color: #3b3c54 !important;
}

.dark-theme #tbody_items td,
.dark-theme #tbody_items td strong,
.dark-theme #tbody_items td span,
.dark-theme #tbody_items td div,
html.dark-theme #tbody_items td,
html.dark-theme #tbody_items td strong,
html.dark-theme #tbody_items td span,
html.dark-theme #tbody_items td div,
.light-style.dark-theme #tbody_items td,
.light-style.dark-theme #tbody_items td *,
html.dark-theme #row_empty td {
  color: #ffffff !important;
}

.dark-theme #tbody_items td small,
.dark-theme #tbody_items td .text-muted,
html.dark-theme #tbody_items td small,
html.dark-theme #tbody_items td .text-muted,
.light-style.dark-theme #tbody_items td small,
.light-style.dark-theme #tbody_items td .text-muted {
  color: #a1a5b7 !important;
}

html.dark-theme #tbody_items input.form-control,
.dark-theme #tbody_items input.form-control {
  background-color: #1c1d2b !important;
  color: #ffffff !important;
  border-color: #3b3c54 !important;
}

html.dark-theme .table-light,
html.dark-theme .table-light th,
html.dark-theme .table-light td,
html.dark-theme thead.table-light th,
html.dark-theme thead,
html.dark-style thead.table-light th,
body.dark-theme .table-light th {
  --bs-table-bg: #1e1f2d !important;
  background-color: #1e1f2d !important;
  color: #ffffff !important;
  border-color: #3b3c54 !important;
}

/* 4b. Cards de Gastos en Caja y Contenedores bg-body */
.card-gasto-item {
  background-color: rgba(67, 89, 113, 0.04);
  border-color: rgba(67, 89, 113, 0.15) !important;
}

html.dark-theme .card-gasto-item,
html.dark-style .card-gasto-item,
.dark-theme .card-gasto-item,
.dark-theme .bg-body,
html.dark-theme .bg-body {
  background-color: #232433 !important;
  border-color: #3b3c54 !important;
  color: #ffffff !important;
}

html.dark-theme .card-gasto-item span,
.dark-theme .card-gasto-item span {
  color: #ffffff !important;
}

html.dark-theme .card-gasto-item .text-danger,
html.dark-theme h5.text-danger,
.dark-theme h5.text-danger {
  color: #ff4d49 !important;
}

/* 5. Modales SweetAlert2 */
html.dark-theme .swal2-popup,
body.dark-theme .swal2-popup {
  background-color: #2b2c40 !important;
  color: #ffffff !important;
  border: 1px solid #3b3c54 !important;
}

html.dark-theme .swal2-title,
html.dark-theme .swal2-content,
html.dark-theme .swal2-html-container {
  color: #ffffff !important;
}

html.dark-theme .swal2-input,
html.dark-theme .swal2-textarea,
html.dark-theme .swal2-select {
  background-color: #232433 !important;
  color: #ffffff !important;
  border-color: #3b3c54 !important;
}

/* 6. Paginación en Modo Oscuro */
html.dark-theme .pagination .page-link,
body.dark-theme .pagination .page-link {
  background-color: #232433 !important;
  color: #d5d8de !important;
  border-color: #3b3c54 !important;
}

html.dark-theme .pagination .page-item.active .page-link {
  background-color: #696cff !important;
  border-color: #696cff !important;
  color: #ffffff !important;
}

html.dark-theme .pagination .page-item.disabled .page-link {
  background-color: #1c1d2b !important;
  color: #5c5f78 !important;
  border-color: #2d2f45 !important;
}

/* 7. Drag & Drop Zone (Actualizador de Precios / Importación) */
.dropzone-area {
  border: 2px dashed #696cff;
  border-radius: 0.75rem;
  background-color: rgba(105, 108, 255, 0.03);
  transition: all 0.25s ease-in-out;
  cursor: pointer;
}

.dropzone-area:hover,
.dropzone-area.drag-over {
  border-color: #696cff !important;
  background-color: rgba(105, 108, 255, 0.1) !important;
  box-shadow: 0 0.25rem 1rem rgba(105, 108, 255, 0.2) !important;
  transform: translateY(-2px);
}

html.dark-theme .dropzone-area,
html.dark-style .dropzone-area,
.dark-theme .dropzone-area {
  border-color: #4b4d7d !important;
  background-color: #232433 !important;
  color: #ffffff !important;
}

html.dark-theme .dropzone-area:hover,
html.dark-theme .dropzone-area.drag-over,
.dark-theme .dropzone-area:hover,
.dark-theme .dropzone-area.drag-over {
  border-color: #696cff !important;
  background-color: #2b2c40 !important;
}

/* 8. Pestañas y Navegación Nav-Tabs en Modo Oscuro */
html.dark-theme .nav-align-top,
html.dark-theme .nav-align-bottom,
html.dark-theme .nav-align-left,
html.dark-theme .nav-align-right,
html.dark-theme .nav-tabs,
html.dark-theme .tab-content,
html.dark-style .nav-align-top,
html.dark-style .nav-tabs,
html.dark-style .tab-content,
.dark-theme .nav-align-top,
.dark-theme .nav-tabs,
.dark-theme .tab-content {
  background-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  border-color: #3b3c54 !important;
}

html.dark-theme .nav-tabs .nav-link,
html.dark-style .nav-tabs .nav-link,
.dark-theme .nav-tabs .nav-link {
  background-color: #232433 !important;
  color: #a1a5b7 !important;
  border-color: #3b3c54 !important;
}

html.dark-theme .nav-tabs .nav-link:hover,
.dark-theme .nav-tabs .nav-link:hover {
  background-color: #2b2c40 !important;
  color: #ffffff !important;
}

html.dark-theme .nav-tabs .nav-link.active,
html.dark-style .nav-tabs .nav-link.active,
.dark-theme .nav-tabs .nav-link.active {
  background-color: #2b2c40 !important;
  color: #ffffff !important;
  border-bottom: 3px solid #696cff !important;
}

/* 9. Compatibilidad con Impresión */
@media print {
  html, body, .layout-wrapper, .card, .content-wrapper, .container-p-y {
    background-color: #ffffff !important;
    color: #000000 !important;
  }
}

/* Custom Modal Header & Footer (Modo Claro / Modo Oscuro) */
.modal-header-custom {
  background-color: #ffffff !important;
  color: #1e293b !important;
  border-bottom-color: #e2e8f0 !important;
}

.modal-footer-custom {
  background-color: #ffffff !important;
  color: #1e293b !important;
  border-top-color: #e2e8f0 !important;
}

.modal-title-custom {
  color: #1e293b !important;
}

html.dark-theme .modal-header-custom,
html.dark-style .modal-header-custom,
.dark-theme .modal-header-custom {
  background-color: #2b2c40 !important;
  color: #ffffff !important;
  border-bottom-color: #3b3c54 !important;
}

html.dark-theme .modal-footer-custom,
html.dark-style .modal-footer-custom,
.dark-theme .modal-footer-custom {
  background-color: #2b2c40 !important;
  color: #ffffff !important;
  border-top-color: #3b3c54 !important;
}

html.dark-theme .modal-title-custom,
html.dark-style .modal-title-custom,
.dark-theme .modal-title-custom {
  color: #ffffff !important;
}

html.dark-theme .modal-header-custom .btn-close,
html.dark-style .modal-header-custom .btn-close,
.dark-theme .modal-header-custom .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Nombre de la Empresa en Navbar Superior */
.nav-empresa-nombre {
  color: #0f172a !important;
  font-weight: 700 !important;
}

html.dark-theme .nav-empresa-nombre,
html.dark-style .nav-empresa-nombre,
.dark-theme .nav-empresa-nombre {
  color: #ffffff !important;
}

/* Desplegables de tablas flotantes (Z-Index global) */
.table-responsive {
  margin-bottom: 0;
}

body > .dropdown-menu {
  z-index: 100000 !important;
}


