/* 
 * Dynamic Framework Bootstrap Overrides
 * Fuerza a Bootstrap a usar variables CSS en lugar de valores hardcodeados
 * Debe cargarse DESPUÉS de Bootstrap pero ANTES del tema custom
 */

/* ========================================
   BUTTON OVERRIDES
   ======================================== */

.btn-primary {
  --bs-btn-bg: rgb(var(--bs-primary-rgb)) !important;
  --bs-btn-color: #ffffff !important;
  --bs-btn-border-color: rgb(var(--bs-primary-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-primary-600-rgb, var(--bs-primary-rgb))) !important;
  --bs-btn-hover-color: #ffffff !important;
  --bs-btn-hover-border-color: rgb(var(--bs-primary-600-rgb, var(--bs-primary-rgb))) !important;
  --bs-btn-active-bg: rgb(var(--bs-primary-700-rgb, var(--bs-primary-rgb))) !important;
  --bs-btn-active-color: #ffffff !important;
  --bs-btn-active-border-color: rgb(var(--bs-primary-700-rgb, var(--bs-primary-rgb))) !important;
  background-color: rgb(var(--bs-primary-rgb)) !important;
  border-color: rgb(var(--bs-primary-rgb)) !important;
  color: #ffffff !important;
}

.btn-primary:hover {
  background-color: rgb(var(--bs-primary-600-rgb, var(--bs-primary-rgb))) !important;
  border-color: rgb(var(--bs-primary-600-rgb, var(--bs-primary-rgb))) !important;
  color: #ffffff !important;
  filter: brightness(0.9) !important;
}

.btn-primary:active,
.btn-primary.active {
  background-color: rgb(var(--bs-primary-700-rgb, var(--bs-primary-rgb))) !important;
  border-color: rgb(var(--bs-primary-700-rgb, var(--bs-primary-rgb))) !important;
  color: #ffffff !important;
  filter: brightness(0.8) !important;
}

.btn-secondary {
  --bs-btn-bg: rgb(var(--bs-secondary-rgb)) !important;
  --bs-btn-color: #ffffff !important;
  --bs-btn-border-color: rgb(var(--bs-secondary-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-secondary-600-rgb, var(--bs-secondary-rgb))) !important;
  --bs-btn-hover-color: #ffffff !important;
  --bs-btn-hover-border-color: rgb(var(--bs-secondary-600-rgb, var(--bs-secondary-rgb))) !important;
  --bs-btn-active-bg: rgb(var(--bs-secondary-700-rgb, var(--bs-secondary-rgb))) !important;
  --bs-btn-active-color: #ffffff !important;
  --bs-btn-active-border-color: rgb(var(--bs-secondary-700-rgb, var(--bs-secondary-rgb))) !important;
  background-color: rgb(var(--bs-secondary-rgb)) !important;
  border-color: rgb(var(--bs-secondary-rgb)) !important;
  color: #ffffff !important;
}

.btn-secondary:hover {
  background-color: rgb(var(--bs-secondary-600-rgb, var(--bs-secondary-rgb))) !important;
  border-color: rgb(var(--bs-secondary-600-rgb, var(--bs-secondary-rgb))) !important;
  color: #ffffff !important;
  filter: brightness(0.9) !important;
}

.btn-secondary:active,
.btn-secondary.active {
  background-color: rgb(var(--bs-secondary-700-rgb, var(--bs-secondary-rgb))) !important;
  border-color: rgb(var(--bs-secondary-700-rgb, var(--bs-secondary-rgb))) !important;
  color: #ffffff !important;
  filter: brightness(0.8) !important;
}

.btn-success {
  --bs-btn-bg: rgb(var(--bs-success-rgb)) !important;
  --bs-btn-color: #ffffff !important;
  --bs-btn-border-color: rgb(var(--bs-success-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-success-600-rgb, var(--bs-success-rgb))) !important;
  --bs-btn-hover-color: #ffffff !important;
  --bs-btn-hover-border-color: rgb(var(--bs-success-600-rgb, var(--bs-success-rgb))) !important;
  --bs-btn-active-bg: rgb(var(--bs-success-700-rgb, var(--bs-success-rgb))) !important;
  --bs-btn-active-color: #ffffff !important;
  --bs-btn-active-border-color: rgb(var(--bs-success-700-rgb, var(--bs-success-rgb))) !important;
  background-color: rgb(var(--bs-success-rgb)) !important;
  border-color: rgb(var(--bs-success-rgb)) !important;
  color: #ffffff !important;
}

.btn-success:hover {
  background-color: rgb(var(--bs-success-600-rgb, var(--bs-success-rgb))) !important;
  border-color: rgb(var(--bs-success-600-rgb, var(--bs-success-rgb))) !important;
  color: #ffffff !important;
  filter: brightness(0.9) !important;
}

.btn-success:active,
.btn-success.active {
  background-color: rgb(var(--bs-success-700-rgb, var(--bs-success-rgb))) !important;
  border-color: rgb(var(--bs-success-700-rgb, var(--bs-success-rgb))) !important;
  color: #ffffff !important;
  filter: brightness(0.8) !important;
}

.btn-danger {
  --bs-btn-bg: rgb(var(--bs-danger-rgb)) !important;
  --bs-btn-color: #ffffff !important;
  --bs-btn-border-color: rgb(var(--bs-danger-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-danger-600-rgb, var(--bs-danger-rgb))) !important;
  --bs-btn-hover-color: #ffffff !important;
  --bs-btn-hover-border-color: rgb(var(--bs-danger-600-rgb, var(--bs-danger-rgb))) !important;
  --bs-btn-active-bg: rgb(var(--bs-danger-700-rgb, var(--bs-danger-rgb))) !important;
  --bs-btn-active-color: #ffffff !important;
  --bs-btn-active-border-color: rgb(var(--bs-danger-700-rgb, var(--bs-danger-rgb))) !important;
  background-color: rgb(var(--bs-danger-rgb)) !important;
  border-color: rgb(var(--bs-danger-rgb)) !important;
  color: #ffffff !important;
}

.btn-danger:hover {
  background-color: rgb(var(--bs-danger-600-rgb, var(--bs-danger-rgb))) !important;
  border-color: rgb(var(--bs-danger-600-rgb, var(--bs-danger-rgb))) !important;
  color: #ffffff !important;
  filter: brightness(0.9) !important;
}

.btn-danger:active,
.btn-danger.active {
  background-color: rgb(var(--bs-danger-700-rgb, var(--bs-danger-rgb))) !important;
  border-color: rgb(var(--bs-danger-700-rgb, var(--bs-danger-rgb))) !important;
  color: #ffffff !important;
  filter: brightness(0.8) !important;
}

.btn-warning {
  --bs-btn-bg: rgb(var(--bs-warning-rgb)) !important;
  --bs-btn-border-color: rgb(var(--bs-warning-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-warning-600-rgb, var(--bs-warning-rgb))) !important;
  --bs-btn-hover-border-color: rgb(var(--bs-warning-600-rgb, var(--bs-warning-rgb))) !important;
  --bs-btn-active-bg: rgb(var(--bs-warning-700-rgb, var(--bs-warning-rgb))) !important;
  --bs-btn-active-border-color: rgb(var(--bs-warning-700-rgb, var(--bs-warning-rgb))) !important;
  background-color: rgb(var(--bs-warning-rgb)) !important;
  border-color: rgb(var(--bs-warning-rgb)) !important;
  color: #000 !important; /* Warning usually needs dark text */
}

.btn-warning:hover {
  background-color: rgb(var(--bs-warning-600-rgb, var(--bs-warning-rgb))) !important;
  border-color: rgb(var(--bs-warning-600-rgb, var(--bs-warning-rgb))) !important;
  filter: brightness(0.9) !important;
  color: #000 !important;
}

.btn-warning:active,
.btn-warning.active {
  background-color: rgb(var(--bs-warning-700-rgb, var(--bs-warning-rgb))) !important;
  border-color: rgb(var(--bs-warning-700-rgb, var(--bs-warning-rgb))) !important;
  filter: brightness(0.8) !important;
  color: #000 !important;
}

.btn-info {
  --bs-btn-bg: rgb(var(--bs-info-rgb)) !important;
  --bs-btn-color: #ffffff !important;
  --bs-btn-border-color: rgb(var(--bs-info-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-info-600-rgb, var(--bs-info-rgb))) !important;
  --bs-btn-hover-color: #ffffff !important;
  --bs-btn-hover-border-color: rgb(var(--bs-info-600-rgb, var(--bs-info-rgb))) !important;
  --bs-btn-active-bg: rgb(var(--bs-info-700-rgb, var(--bs-info-rgb))) !important;
  --bs-btn-active-color: #ffffff !important;
  --bs-btn-active-border-color: rgb(var(--bs-info-700-rgb, var(--bs-info-rgb))) !important;
  background-color: rgb(var(--bs-info-rgb)) !important;
  border-color: rgb(var(--bs-info-rgb)) !important;
  color: #ffffff !important;
}

.btn-info:hover {
  background-color: rgb(var(--bs-info-600-rgb, var(--bs-info-rgb))) !important;
  border-color: rgb(var(--bs-info-600-rgb, var(--bs-info-rgb))) !important;
  color: #ffffff !important;
  filter: brightness(0.9) !important;
}

.btn-info:active,
.btn-info.active {
  background-color: rgb(var(--bs-info-700-rgb, var(--bs-info-rgb))) !important;
  border-color: rgb(var(--bs-info-700-rgb, var(--bs-info-rgb))) !important;
  color: #ffffff !important;
  filter: brightness(0.8) !important;
}

.btn-light {
  --bs-btn-bg: rgb(var(--bs-light-rgb)) !important;
  --bs-btn-border-color: rgb(var(--bs-light-rgb)) !important;
  --bs-btn-hover-bg: rgba(var(--bs-light-rgb), 0.8) !important;
  --bs-btn-hover-border-color: rgba(var(--bs-light-rgb), 0.8) !important;
  --bs-btn-active-bg: rgba(var(--bs-light-rgb), 0.7) !important;
  --bs-btn-active-border-color: rgba(var(--bs-light-rgb), 0.7) !important;
  background-color: rgb(var(--bs-light-rgb)) !important;
  border-color: rgb(var(--bs-light-rgb)) !important;
  color: #000 !important;
}

.btn-light:hover {
  background-color: rgba(var(--bs-light-rgb), 0.8) !important;
  border-color: rgba(var(--bs-light-rgb), 0.8) !important;
  color: #000 !important;
}

.btn-light:active,
.btn-light.active {
  background-color: rgba(var(--bs-light-rgb), 0.7) !important;
  border-color: rgba(var(--bs-light-rgb), 0.7) !important;
  color: #000 !important;
}

.btn-dark {
  --bs-btn-bg: rgb(var(--bs-dark-rgb)) !important;
  --bs-btn-border-color: rgb(var(--bs-dark-rgb)) !important;
  --bs-btn-hover-bg: rgba(var(--bs-dark-rgb), 0.8) !important;
  --bs-btn-hover-border-color: rgba(var(--bs-dark-rgb), 0.8) !important;
  --bs-btn-active-bg: rgba(var(--bs-dark-rgb), 0.7) !important;
  --bs-btn-active-border-color: rgba(var(--bs-dark-rgb), 0.7) !important;
  background-color: rgb(var(--bs-dark-rgb)) !important;
  border-color: rgb(var(--bs-dark-rgb)) !important;
}

.btn-dark:hover {
  background-color: rgba(var(--bs-dark-rgb), 0.8) !important;
  border-color: rgba(var(--bs-dark-rgb), 0.8) !important;
}

.btn-dark:active,
.btn-dark.active {
  background-color: rgba(var(--bs-dark-rgb), 0.7) !important;
  border-color: rgba(var(--bs-dark-rgb), 0.7) !important;
}

/* ========================================
   OUTLINE BUTTON OVERRIDES
   ======================================== */

.btn-outline-primary {
  --bs-btn-color: rgb(var(--bs-primary-rgb)) !important;
  --bs-btn-border-color: rgb(var(--bs-primary-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-primary-rgb)) !important;
  --bs-btn-hover-border-color: rgb(var(--bs-primary-rgb)) !important;
  --bs-btn-active-bg: rgb(var(--bs-primary-rgb)) !important;
  --bs-btn-active-border-color: rgb(var(--bs-primary-rgb)) !important;
  color: rgb(var(--bs-primary-rgb)) !important;
  border-color: rgb(var(--bs-primary-rgb)) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:active,
.btn-outline-primary.active {
  background-color: rgb(var(--bs-primary-rgb)) !important;
  border-color: rgb(var(--bs-primary-rgb)) !important;
  color: #fff !important;
}

.btn-outline-secondary {
  --bs-btn-color: rgb(var(--bs-secondary-rgb)) !important;
  --bs-btn-border-color: rgb(var(--bs-secondary-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-secondary-rgb)) !important;
  --bs-btn-hover-border-color: rgb(var(--bs-secondary-rgb)) !important;
  --bs-btn-active-bg: rgb(var(--bs-secondary-rgb)) !important;
  --bs-btn-active-border-color: rgb(var(--bs-secondary-rgb)) !important;
  color: rgb(var(--bs-secondary-rgb)) !important;
  border-color: rgb(var(--bs-secondary-rgb)) !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:active,
.btn-outline-secondary.active {
  background-color: rgb(var(--bs-secondary-rgb)) !important;
  border-color: rgb(var(--bs-secondary-rgb)) !important;
  color: #fff !important;
}

.btn-outline-success {
  --bs-btn-color: rgb(var(--bs-success-rgb)) !important;
  --bs-btn-border-color: rgb(var(--bs-success-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-success-rgb)) !important;
  --bs-btn-hover-border-color: rgb(var(--bs-success-rgb)) !important;
  --bs-btn-active-bg: rgb(var(--bs-success-rgb)) !important;
  --bs-btn-active-border-color: rgb(var(--bs-success-rgb)) !important;
  color: rgb(var(--bs-success-rgb)) !important;
  border-color: rgb(var(--bs-success-rgb)) !important;
}

.btn-outline-success:hover,
.btn-outline-success:active,
.btn-outline-success.active {
  background-color: rgb(var(--bs-success-rgb)) !important;
  border-color: rgb(var(--bs-success-rgb)) !important;
  color: #fff !important;
}

.btn-outline-danger {
  --bs-btn-color: rgb(var(--bs-danger-rgb)) !important;
  --bs-btn-border-color: rgb(var(--bs-danger-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-danger-rgb)) !important;
  --bs-btn-hover-border-color: rgb(var(--bs-danger-rgb)) !important;
  --bs-btn-active-bg: rgb(var(--bs-danger-rgb)) !important;
  --bs-btn-active-border-color: rgb(var(--bs-danger-rgb)) !important;
  color: rgb(var(--bs-danger-rgb)) !important;
  border-color: rgb(var(--bs-danger-rgb)) !important;
}

.btn-outline-danger:hover,
.btn-outline-danger:active,
.btn-outline-danger.active {
  background-color: rgb(var(--bs-danger-rgb)) !important;
  border-color: rgb(var(--bs-danger-rgb)) !important;
  color: #fff !important;
}

.btn-outline-warning {
  --bs-btn-color: rgb(var(--bs-warning-rgb)) !important;
  --bs-btn-border-color: rgb(var(--bs-warning-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-warning-rgb)) !important;
  --bs-btn-hover-border-color: rgb(var(--bs-warning-rgb)) !important;
  --bs-btn-active-bg: rgb(var(--bs-warning-rgb)) !important;
  --bs-btn-active-border-color: rgb(var(--bs-warning-rgb)) !important;
  color: rgb(var(--bs-warning-rgb)) !important;
  border-color: rgb(var(--bs-warning-rgb)) !important;
}

.btn-outline-warning:hover,
.btn-outline-warning:active,
.btn-outline-warning.active {
  background-color: rgb(var(--bs-warning-rgb)) !important;
  border-color: rgb(var(--bs-warning-rgb)) !important;
  color: #000 !important;
}

.btn-outline-info {
  --bs-btn-color: rgb(var(--bs-info-rgb)) !important;
  --bs-btn-border-color: rgb(var(--bs-info-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-info-rgb)) !important;
  --bs-btn-hover-border-color: rgb(var(--bs-info-rgb)) !important;
  --bs-btn-active-bg: rgb(var(--bs-info-rgb)) !important;
  --bs-btn-active-border-color: rgb(var(--bs-info-rgb)) !important;
  color: rgb(var(--bs-info-rgb)) !important;
  border-color: rgb(var(--bs-info-rgb)) !important;
}

.btn-outline-info:hover,
.btn-outline-info:active,
.btn-outline-info.active {
  background-color: rgb(var(--bs-info-rgb)) !important;
  border-color: rgb(var(--bs-info-rgb)) !important;
  color: #fff !important;
}

.btn-outline-light {
  --bs-btn-color: rgb(var(--bs-light-rgb)) !important;
  --bs-btn-border-color: rgb(var(--bs-light-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-light-rgb)) !important;
  --bs-btn-hover-border-color: rgb(var(--bs-light-rgb)) !important;
  --bs-btn-active-bg: rgb(var(--bs-light-rgb)) !important;
  --bs-btn-active-border-color: rgb(var(--bs-light-rgb)) !important;
  color: rgb(var(--bs-light-rgb)) !important;
  border-color: rgb(var(--bs-light-rgb)) !important;
}

.btn-outline-light:hover,
.btn-outline-light:active,
.btn-outline-light.active {
  background-color: rgb(var(--bs-light-rgb)) !important;
  border-color: rgb(var(--bs-light-rgb)) !important;
  color: #000 !important;
}

.btn-outline-dark {
  --bs-btn-color: rgb(var(--bs-dark-rgb)) !important;
  --bs-btn-border-color: rgb(var(--bs-dark-rgb)) !important;
  --bs-btn-hover-bg: rgb(var(--bs-dark-rgb)) !important;
  --bs-btn-hover-border-color: rgb(var(--bs-dark-rgb)) !important;
  --bs-btn-active-bg: rgb(var(--bs-dark-rgb)) !important;
  --bs-btn-active-border-color: rgb(var(--bs-dark-rgb)) !important;
  color: rgb(var(--bs-dark-rgb)) !important;
  border-color: rgb(var(--bs-dark-rgb)) !important;
}

.btn-outline-dark:hover,
.btn-outline-dark:active,
.btn-outline-dark.active {
  background-color: rgb(var(--bs-dark-rgb)) !important;
  border-color: rgb(var(--bs-dark-rgb)) !important;
  color: #fff !important;
}

/* ========================================
   BACKGROUND COLOR OVERRIDES
   ======================================== */

.bg-primary {
  background-color: rgb(var(--bs-primary-rgb)) !important;
}

.bg-secondary {
  background-color: rgb(var(--bs-secondary-rgb)) !important;
}

.bg-success {
  background-color: rgb(var(--bs-success-rgb)) !important;
}

.bg-danger {
  background-color: rgb(var(--bs-danger-rgb)) !important;
}

.bg-warning {
  background-color: rgb(var(--bs-warning-rgb)) !important;
}

.bg-info {
  background-color: rgb(var(--bs-info-rgb)) !important;
}

.bg-light {
  background-color: rgb(var(--bs-light-rgb)) !important;
}

.bg-dark {
  background-color: rgb(var(--bs-dark-rgb)) !important;
}

/* ========================================
   TEXT COLOR OVERRIDES
   ======================================== */

.text-primary {
  color: rgb(var(--bs-primary-rgb)) !important;
}

.text-secondary {
  color: rgb(var(--bs-secondary-rgb)) !important;
}

.text-success {
  color: rgb(var(--bs-success-rgb)) !important;
}

.text-danger {
  color: rgb(var(--bs-danger-rgb)) !important;
}

.text-warning {
  color: rgb(var(--bs-warning-rgb)) !important;
}

.text-info {
  color: rgb(var(--bs-info-rgb)) !important;
}

.text-light {
  color: rgb(var(--bs-light-rgb)) !important;
}

.text-dark {
  color: rgb(var(--bs-dark-rgb)) !important;
}

/* ========================================
   BORDER COLOR OVERRIDES
   ======================================== */

.border-primary {
  border-color: rgb(var(--bs-primary-rgb)) !important;
}

.border-secondary {
  border-color: rgb(var(--bs-secondary-rgb)) !important;
}

.border-success {
  border-color: rgb(var(--bs-success-rgb)) !important;
}

.border-danger {
  border-color: rgb(var(--bs-danger-rgb)) !important;
}

.border-warning {
  border-color: rgb(var(--bs-warning-rgb)) !important;
}

.border-info {
  border-color: rgb(var(--bs-info-rgb)) !important;
}

.border-light {
  border-color: rgb(var(--bs-light-rgb)) !important;
}

.border-dark {
  border-color: rgb(var(--bs-dark-rgb)) !important;
}

/* ========================================
   ALERT OVERRIDES
   ======================================== */

.alert-primary {
  --bs-alert-bg: rgba(var(--bs-primary-rgb), 0.1) !important;
  --bs-alert-border-color: rgba(var(--bs-primary-rgb), 0.2) !important;
  --bs-alert-color: rgb(var(--bs-primary-rgb)) !important;
  background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
  border-color: rgba(var(--bs-primary-rgb), 0.2) !important;
  color: rgb(var(--bs-primary-rgb)) !important;
}

.alert-secondary {
  --bs-alert-bg: rgba(var(--bs-secondary-rgb), 0.1) !important;
  --bs-alert-border-color: rgba(var(--bs-secondary-rgb), 0.2) !important;
  --bs-alert-color: rgb(var(--bs-secondary-rgb)) !important;
  background-color: rgba(var(--bs-secondary-rgb), 0.1) !important;
  border-color: rgba(var(--bs-secondary-rgb), 0.2) !important;
  color: rgb(var(--bs-secondary-rgb)) !important;
}

.alert-success {
  --bs-alert-bg: rgba(var(--bs-success-rgb), 0.1) !important;
  --bs-alert-border-color: rgba(var(--bs-success-rgb), 0.2) !important;
  --bs-alert-color: rgb(var(--bs-success-rgb)) !important;
  background-color: rgba(var(--bs-success-rgb), 0.1) !important;
  border-color: rgba(var(--bs-success-rgb), 0.2) !important;
  color: rgb(var(--bs-success-rgb)) !important;
}

.alert-danger {
  --bs-alert-bg: rgba(var(--bs-danger-rgb), 0.1) !important;
  --bs-alert-border-color: rgba(var(--bs-danger-rgb), 0.2) !important;
  --bs-alert-color: rgb(var(--bs-danger-rgb)) !important;
  background-color: rgba(var(--bs-danger-rgb), 0.1) !important;
  border-color: rgba(var(--bs-danger-rgb), 0.2) !important;
  color: rgb(var(--bs-danger-rgb)) !important;
}

.alert-warning {
  --bs-alert-bg: rgba(var(--bs-warning-rgb), 0.1) !important;
  --bs-alert-border-color: rgba(var(--bs-warning-rgb), 0.2) !important;
  --bs-alert-color: #000 !important;
  background-color: rgba(var(--bs-warning-rgb), 0.1) !important;
  border-color: rgba(var(--bs-warning-rgb), 0.2) !important;
  color: #000 !important;
}

.alert-info {
  --bs-alert-bg: rgba(var(--bs-info-rgb), 0.1) !important;
  --bs-alert-border-color: rgba(var(--bs-info-rgb), 0.2) !important;
  --bs-alert-color: rgb(var(--bs-info-rgb)) !important;
  background-color: rgba(var(--bs-info-rgb), 0.1) !important;
  border-color: rgba(var(--bs-info-rgb), 0.2) !important;
  color: rgb(var(--bs-info-rgb)) !important;
}

.alert-light {
  --bs-alert-bg: rgba(var(--bs-light-rgb), 0.8) !important;
  --bs-alert-border-color: rgba(var(--bs-light-rgb), 0.9) !important;
  --bs-alert-color: #000 !important;
  background-color: rgba(var(--bs-light-rgb), 0.8) !important;
  border-color: rgba(var(--bs-light-rgb), 0.9) !important;
  color: #000 !important;
}

.alert-dark {
  --bs-alert-bg: rgba(var(--bs-dark-rgb), 0.1) !important;
  --bs-alert-border-color: rgba(var(--bs-dark-rgb), 0.2) !important;
  --bs-alert-color: rgb(var(--bs-dark-rgb)) !important;
  background-color: rgba(var(--bs-dark-rgb), 0.1) !important;
  border-color: rgba(var(--bs-dark-rgb), 0.2) !important;
  color: rgb(var(--bs-dark-rgb)) !important;
}

/* ========================================
   BADGE OVERRIDES
   ======================================== */

.badge.bg-primary {
  background-color: rgb(var(--bs-primary-rgb)) !important;
  color: #fff !important;
}

.badge.bg-secondary {
  background-color: rgb(var(--bs-secondary-rgb)) !important;
  color: #fff !important;
}

.badge.bg-success {
  background-color: rgb(var(--bs-success-rgb)) !important;
  color: #fff !important;
}

.badge.bg-danger {
  background-color: rgb(var(--bs-danger-rgb)) !important;
  color: #fff !important;
}

.badge.bg-warning {
  background-color: rgb(var(--bs-warning-rgb)) !important;
  color: #000 !important;
}

.badge.bg-info {
  background-color: rgb(var(--bs-info-rgb)) !important;
  color: #fff !important;
}

.badge.bg-light {
  background-color: rgb(var(--bs-light-rgb)) !important;
  color: #000 !important;
}

.badge.bg-dark {
  background-color: rgb(var(--bs-dark-rgb)) !important;
  color: #fff !important;
}

/* ========================================
   LINK OVERRIDES
   ======================================== */

a {
  color: rgb(var(--bs-primary-rgb)) !important;
}

a:hover {
  color: rgba(var(--bs-primary-rgb), 0.8) !important;
}

.link-primary {
  color: rgb(var(--bs-primary-rgb)) !important;
}

.link-secondary {
  color: rgb(var(--bs-secondary-rgb)) !important;
}

.link-success {
  color: rgb(var(--bs-success-rgb)) !important;
}

.link-danger {
  color: rgb(var(--bs-danger-rgb)) !important;
}

.link-warning {
  color: rgb(var(--bs-warning-rgb)) !important;
}

.link-info {
  color: rgb(var(--bs-info-rgb)) !important;
}

.link-light {
  color: rgb(var(--bs-light-rgb)) !important;
}

.link-dark {
  color: rgb(var(--bs-dark-rgb)) !important;
}

/* ========================================
   FORM CONTROL FOCUS OVERRIDES
   ======================================== */

.form-control:focus,
.form-select:focus {
  border-color: rgb(var(--bs-primary-rgb)) !important;
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25) !important;
}

.form-check-input:focus {
  border-color: rgb(var(--bs-primary-rgb)) !important;
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25) !important;
}

.form-check-input:checked {
  background-color: rgb(var(--bs-primary-rgb)) !important;
  border-color: rgb(var(--bs-primary-rgb)) !important;
}

/* ========================================
   NAV AND PAGINATION OVERRIDES
   ======================================== */

/* Nav Pills - with background */
.nav-pills .nav-link.active {
  background-color: rgb(var(--bs-primary-rgb)) !important;
  color: #ffffff !important;
}

/* Nav Underline - NO background, only bottom border */
.nav.nav-underline .nav-link,
.nav-underline .nav-link,
.nav.nav-underline button.nav-link,
.nav-underline button.nav-link {
  background-color: transparent !important;
  background: transparent !important;
  color: #6c757d !important;
  border-bottom: 2px solid transparent !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
}

.nav.nav-underline .nav-link.active,
.nav-underline .nav-link.active,
.nav.nav-underline button.nav-link.active,
.nav-underline button.nav-link.active,
.nav.nav-underline .nav-link.active:hover,
.nav-underline .nav-link.active:hover,
.nav.nav-underline button.nav-link.active:hover,
.nav-underline button.nav-link.active:hover,
.nav.nav-underline .nav-link.active:focus,
.nav-underline .nav-link.active:focus,
.nav.nav-underline button.nav-link.active:focus,
.nav-underline button.nav-link.active:focus {
  background-color: transparent !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid rgb(var(--bs-primary-rgb)) !important;
  color: rgb(var(--bs-primary-rgb)) !important;
}

.nav.nav-underline .nav-link:hover:not(.active),
.nav-underline .nav-link:hover:not(.active),
.nav.nav-underline button.nav-link:hover:not(.active),
.nav-underline button.nav-link:hover:not(.active) {
  background-color: transparent !important;
  background: transparent !important;
  color: rgb(var(--bs-primary-rgb)) !important;
  border: none !important;
  border-bottom: 2px solid rgba(var(--bs-primary-rgb), 0.3) !important;
}

/* Generic nav-link.active (for other nav types) */
.nav-link.active:not(.nav-underline .nav-link):not(.nav-pills .nav-link) {
  color: rgb(var(--bs-primary-rgb)) !important;
}

.pagination .page-link {
  color: rgb(var(--bs-primary-rgb)) !important;
}

.pagination .page-item.active .page-link {
  background-color: rgb(var(--bs-primary-rgb)) !important;
  border-color: rgb(var(--bs-primary-rgb)) !important;
}

/* ========================================
   PROGRESS BAR OVERRIDES
   ======================================== */

.progress-bar {
  background-color: rgb(var(--bs-primary-rgb)) !important;
}

.progress-bar-striped {
  background-color: rgb(var(--bs-primary-rgb)) !important;
}

/* ========================================
   LIST GROUP OVERRIDES
   ======================================== */

.list-group-item.active {
  background-color: rgb(var(--bs-primary-rgb)) !important;
  border-color: rgb(var(--bs-primary-rgb)) !important;
}

.list-group-item-primary {
  background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
  border-color: rgba(var(--bs-primary-rgb), 0.2) !important;
  color: rgb(var(--bs-primary-rgb)) !important;
}

.list-group-item-secondary {
  background-color: rgba(var(--bs-secondary-rgb), 0.1) !important;
  border-color: rgba(var(--bs-secondary-rgb), 0.2) !important;
  color: rgb(var(--bs-secondary-rgb)) !important;
}

.list-group-item-success {
  background-color: rgba(var(--bs-success-rgb), 0.1) !important;
  border-color: rgba(var(--bs-success-rgb), 0.2) !important;
  color: rgb(var(--bs-success-rgb)) !important;
}

.list-group-item-danger {
  background-color: rgba(var(--bs-danger-rgb), 0.1) !important;
  border-color: rgba(var(--bs-danger-rgb), 0.2) !important;
  color: rgb(var(--bs-danger-rgb)) !important;
}

.list-group-item-warning {
  background-color: rgba(var(--bs-warning-rgb), 0.1) !important;
  border-color: rgba(var(--bs-warning-rgb), 0.2) !important;
  color: #000 !important;
}

.list-group-item-info {
  background-color: rgba(var(--bs-info-rgb), 0.1) !important;
  border-color: rgba(var(--bs-info-rgb), 0.2) !important;
  color: rgb(var(--bs-info-rgb)) !important;
}

.list-group-item-light {
  background-color: rgba(var(--bs-light-rgb), 0.8) !important;
  border-color: rgba(var(--bs-light-rgb), 0.9) !important;
  color: #000 !important;
}

.list-group-item-dark {
  background-color: rgba(var(--bs-dark-rgb), 0.1) !important;
  border-color: rgba(var(--bs-dark-rgb), 0.2) !important;
  color: rgb(var(--bs-dark-rgb)) !important;
}