/*
* 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;
}

#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;
}

