html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
  margin-bottom: 60px;
}

/* Dark theme (Bootstrap 5.1 has no built-in dark mode, so components are overridden manually) */
:root {
  --bs-body-color: #212529;
  --bs-body-bg: #fff;
}

[data-bs-theme="dark"] {
  --bs-body-color: #dee2e6;
  --bs-body-bg: #121417;
}

[data-bs-theme="dark"] body {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
}

[data-bs-theme="dark"] .navbar {
  background-color: #1a1d21 !important;
  border-color: #2b2f34 !important;
}

[data-bs-theme="dark"] .navbar .navbar-brand,
[data-bs-theme="dark"] .navbar .nav-link {
  color: #dee2e6 !important;
}

[data-bs-theme="dark"] .navbar .navbar-toggler-icon {
  filter: invert(1) grayscale(100%) brightness(200%);
}

[data-bs-theme="dark"] .footer {
  background-color: #121417;
  color: #9ba1a8;
  border-color: #2b2f34 !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #1e2125;
  border-color: #3a3f45;
  color: #dee2e6;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: #1e2125;
  color: #dee2e6;
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: #7d848c;
}

[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] .form-check-label {
  color: #dee2e6;
}

[data-bs-theme="dark"] a {
  color: #6ea8fe;
}

[data-bs-theme="dark"] .border-bottom {
  border-color: #2b2f34 !important;
}

[data-bs-theme="dark"] .border-top {
  border-color: #2b2f34 !important;
}

[data-bs-theme="dark"] .box-shadow {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.4) !important;
}

#themeToggle {
  border-color: #6c757d;
}

.error-stacktrace {
  background-color: #f8f9fa;
}

[data-bs-theme="dark"] .card {
  background-color: #1a1d21;
  border-color: #2b2f34;
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .alert-danger {
  background-color: #2c1416;
  border-color: #58151c;
  color: #ea868f;
}

[data-bs-theme="dark"] .error-stacktrace {
  background-color: #1e2125;
  color: #dee2e6;
}