[data-bs-theme="blue"] {
  --bs-body-color: var(--bs-white);
  --bs-body-color-rgb: #{to-rgb($white)};
  --bs-body-bg: var(--bs-blue);
  --bs-body-bg-rgb: #{to-rgb($blue)};
  --bs-tertiary-bg: #{$blue-600};

  .dropdown-menu {
    --bs-dropdown-bg: #{mix($blue-500, $blue-600)};
    --bs-dropdown-link-active-bg: #{$blue-700};
  }

  .btn-secondary {
    --bs-btn-bg: #{mix($gray-600, $blue-400, .5)};
    --bs-btn-border-color: #{rgba($white, .25)};
    --bs-btn-hover-bg: #{darken(mix($gray-600, $blue-400, .5), 5%)};
    --bs-btn-hover-border-color: #{rgba($white, .25)};
    --bs-btn-active-bg: #{darken(mix($gray-600, $blue-400, .5), 10%)};
    --bs-btn-active-border-color: #{rgba($white, .5)};
    --bs-btn-focus-border-color: #{rgba($white, .5)};
    --bs-btn-focus-box-shadow: 0 0 0 .25rem rgba(255, 255, 255, .2);
  }
}


/* Tema oscuro principal */
.dark-theme {
    background-color: #121212;
    color: #E0E0E0;
    margin: 40px;
    font: 14px/22px normal Helvetica, Arial, sans-serif;
}

.dark-theme a {
    color: #BB86FC;
    background-color: transparent;
    font-weight: normal;
    text-decoration: none;
}

.dark-theme a:hover {
    color: #3700B3;
}

/* Estructuras de contenedores */
.container-custom {
    margin: 10px;
    border: 1px solid #333;
    box-shadow: 0 0 8px #222;
}

/* Encabezados */
.dark-theme h1 {
    color: #BB86FC;
    background-color: transparent;
    border-bottom: 1px solid #333;
    font-size: 20px;
    font-weight: normal;
    margin: 0 0 14px 0;
    padding: 14px 15px 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-theme h1 img {
    margin-right: 10px;
    vertical-align: middle;
    max-height: 20vh;
}

/* Tablas */
.dark-theme table.dataTable thead {
    background-color: #333;
    color: #E0E0E0;
}

.dark-theme table.dataTable tbody tr {
    background-color: #1F1B24;
    color: #E0E0E0;
}

/* Menús desplegables */
.dropdown-menu-dark {
    background-color: #1F1B24;
    border: 1px solid #333;
}

.dropdown-item {
    color: #BB86FC;
}

.dropdown-item:hover, 
.dropdown-item:focus {
    background-color: #3700B3;
    color: #fff;
}

.dropdown-item.active {
    background-color: #3700B3;
    color: #fff;
}

/* Footer */
.footer-custom p {
    text-align: right;
    font-size: 11px;
    border-top: 1px solid #333;
    line-height: 32px;
    padding: 0 10px;
    margin: 20px 0 0 0;
    color: #8C8C8C;
}

[data-bs-theme="blue"] {
  --bs-body-color: var(--bs-white);
  --bs-body-color-rgb: #{to-rgb($white)};
  --bs-body-bg: var(--bs-blue);
  --bs-body-bg-rgb: #{to-rgb($blue)};
  --bs-tertiary-bg: #{$blue-600};

  .dropdown-menu {
    --bs-dropdown-bg: #{mix($blue-500, $blue-600)};
    --bs-dropdown-link-active-bg: #{$blue-700};
  }

  .btn-secondary {
    --bs-btn-bg: #{mix($gray-600, $blue-400, .5)};
    --bs-btn-border-color: #{rgba($white, .25)};
    --bs-btn-hover-bg: #{darken(mix($gray-600, $blue-400, .5), 5%)};
    --bs-btn-hover-border-color: #{rgba($white, .25)};
    --bs-btn-active-bg: #{darken(mix($gray-600, $blue-400, .5), 10%)};
    --bs-btn-active-border-color: #{rgba($white, .5)};
    --bs-btn-focus-border-color: #{rgba($white, .5)};
    --bs-btn-focus-box-shadow: 0 0 0 .25rem rgba(255, 255, 255, .2);
  }
}