html {
  font-size: 14px;
}

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

html {
  min-height: 100%;
}

/* Dark theme overrides */
html[data-bs-theme="dark"] {
  --bs-body-bg: #0e1117;
  --bs-body-color: #e6edf3;
  --bs-secondary-color: #8b949e;
  --bs-border-color: #30363d;
  --bs-card-bg: #161b22;
  --bs-card-border-color: #30363d;
  --bs-card-cap-bg: #1c2128;
  --bs-navbar-bg: #161b22;
  --bs-table-bg: transparent;
  --bs-table-color: #e6edf3;
  --bs-table-border-color: #30363d;
  --bs-table-striped-bg: #1c2128;
  --bs-table-hover-bg: #21262d;
  --bs-primary: #f0b232;
  --bs-primary-rgb: 240, 178, 50;
  --bs-primary-bg-subtle: rgba(240, 178, 50, 0.2);
  --bs-primary-border-subtle: #f0b232;
}

html[data-bs-theme="dark"] body {
  background-color: #0e1117;
  color: #e6edf3;
}

html[data-bs-theme="dark"] .card {
  background-color: #161b22;
  border-color: #30363d;
  color: #e6edf3;
}

html[data-bs-theme="dark"] .card-header,
html[data-bs-theme="dark"] .card-footer {
  background-color: #1c2128;
  border-color: #30363d;
}

html[data-bs-theme="dark"] .navbar {
  background-color: #161b22 !important;
  border-bottom: 1px solid #30363d !important;
}

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

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

html[data-bs-theme="dark"] .btn-primary {
  background-color: #f0b232;
  border-color: #f0b232;
  color: #0e1117;
}

html[data-bs-theme="dark"] .btn-primary:hover,
html[data-bs-theme="dark"] .btn-primary:focus {
  background-color: #d99e1e;
  border-color: #d99e1e;
  color: #0e1117;
}

html[data-bs-theme="dark"] .btn-outline-primary {
  color: #f0b232;
  border-color: #f0b232;
}

html[data-bs-theme="dark"] .btn-outline-primary:hover,
html[data-bs-theme="dark"] .btn-outline-primary:focus {
  background-color: #f0b232;
  border-color: #f0b232;
  color: #0e1117;
}

html[data-bs-theme="dark"] .btn-success {
  background-color: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}

html[data-bs-theme="dark"] .btn-success:hover,
html[data-bs-theme="dark"] .btn-success:focus {
  background-color: #256a28;
  border-color: #256a28;
  color: #fff;
}

html[data-bs-theme="dark"] .btn-danger {
  background-color: #a03030;
  border-color: #a03030;
  color: #fff;
}

html[data-bs-theme="dark"] .btn-danger:hover,
html[data-bs-theme="dark"] .btn-danger:focus {
  background-color: #882828;
  border-color: #882828;
  color: #fff;
}

html[data-bs-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-color: #e6edf3;
  --bs-table-border-color: #30363d;
}

html[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-color-state: #e6edf3;
  --bs-table-bg-state: #1c2128;
}

html[data-bs-theme="dark"] .progress {
  background-color: #30363d;
}

html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select {
  background-color: #0e1117;
  color: #e6edf3;
  border-color: #30363d;
}

html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus {
  background-color: #0e1117;
  color: #e6edf3;
  border-color: #f0b232;
  box-shadow: 0 0 0 0.25rem rgba(240, 178, 50, 0.25);
}

html[data-bs-theme="dark"] .footer {
  border-top-color: #30363d !important;
  color: #8b949e !important;
}

html[data-bs-theme="dark"] .alert-success {
  background-color: #1c3b1c;
  color: #a3d9a5;
  border-color: #2e7d32;
}

html[data-bs-theme="dark"] .alert-warning {
  background-color: #3b2e1c;
  color: #e0c285;
  border-color: #b8860b;
}

html[data-bs-theme="dark"] .alert-danger {
  background-color: #3b1c1c;
  color: #e0a3a3;
  border-color: #a03030;
}

html[data-bs-theme="dark"] .alert-info {
  background-color: #1c2a3b;
  color: #a3c9e0;
  border-color: #2e5d8a;
}

html[data-bs-theme="dark"] .badge.bg-primary {
  background-color: #f0b232 !important;
  color: #0e1117 !important;
}

html[data-bs-theme="dark"] .badge.bg-success {
  background-color: #2e7d32 !important;
  color: #fff !important;
}

html[data-bs-theme="dark"] .badge.bg-danger {
  background-color: #a03030 !important;
  color: #fff !important;
}

html[data-bs-theme="dark"] .badge.bg-warning {
  background-color: #b8860b !important;
  color: #fff !important;
}

html[data-bs-theme="dark"] .badge.bg-info {
  background-color: #2e5d8a !important;
  color: #fff !important;
}

html[data-bs-theme="dark"] .badge.bg-secondary {
  background-color: #6e7681 !important;
  color: #fff !important;
}

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

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
