/* ============================================================
   Bootstrap brand retheme — points Bootstrap's "primary" at the
   Energroup brand (#3b82f6) instead of Bootstrap's default #0d6efd.

   Loaded AFTER bootstrap.min.css so the component overrides below win
   by source order. Everything references the canonical tokens in
   tokens.css, so the brand color is changed in exactly one place.

   This is the one INTENTIONAL visual change of the early standardization
   work: it unifies the five competing blues (favicon, sidebar, modal
   accent, nav, .btn-primary) into a single recognizable accent.
   ============================================================ */

:root {
  --bs-primary:               var(--brand);
  --bs-primary-rgb:           59, 130, 246;        /* #3b82f6 */
  --bs-primary-text-emphasis: #1e3a8a;             /* blue-900 */
  --bs-primary-bg-subtle:     var(--brand-soft);
  --bs-primary-border-subtle: #bfdbfe;             /* blue-200 */

  /* Links derive from primary by default in Bootstrap — repoint them too. */
  --bs-link-color:            var(--brand);
  --bs-link-color-rgb:        59, 130, 246;
  --bs-link-hover-color:      var(--brand-hover);
  --bs-link-hover-color-rgb:  37, 99, 235;         /* #2563eb */
}

/* .btn-primary / .btn-outline-primary use compiled literal --bs-btn-*
   values, so :root --bs-primary alone won't restyle them — repoint the
   button variables directly (same technique modals.css uses, but global). */
.btn-primary {
  --bs-btn-bg:                    var(--brand);
  --bs-btn-border-color:          var(--brand);
  --bs-btn-hover-bg:              var(--brand-hover);
  --bs-btn-hover-border-color:    var(--brand-hover);
  --bs-btn-active-bg:             var(--brand-hover);
  --bs-btn-active-border-color:   var(--brand-hover);
  --bs-btn-disabled-bg:           var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
}
.btn-outline-primary {
  --bs-btn-color:                 var(--brand);
  --bs-btn-border-color:          var(--brand);
  --bs-btn-hover-bg:              var(--brand);
  --bs-btn-hover-border-color:    var(--brand);
  --bs-btn-active-bg:             var(--brand);
  --bs-btn-active-border-color:   var(--brand);
}

/* Focus ring + checked state on form controls -> brand (was #0d6efd). */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--focus-border);
  box-shadow: var(--focus-ring);
}
.form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}
