body { font-size: 0.9rem; }
.table-sm td, .table-sm th { padding: 0.3rem 0.5rem; }
.navbar-brand { font-weight: 600; }
.pagination { margin-bottom: 0; }

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] {
    color-scheme: dark;
    --bs-body-color: #dee2e6;
    --bs-body-color-rgb: 222, 226, 230;
    --bs-body-bg: #212529;
    --bs-body-bg-rgb: 33, 37, 41;
    --bs-emphasis-color: #fff;
    --bs-secondary-color: rgba(222, 226, 230, .75);
    --bs-secondary-bg: #343a40;
    --bs-tertiary-color: rgba(222, 226, 230, .5);
    --bs-tertiary-bg: #2b3035;
    --bs-link-color: #6ea8fe;
    --bs-link-hover-color: #8bb9fe;
    --bs-border-color: #495057;
    --bs-border-color-translucent: rgba(255, 255, 255, .15);
    --bs-heading-color: inherit;
    --bs-code-color: #e685b5;
    --bs-form-valid-color: #75b798;
    --bs-form-valid-border-color: #75b798;
    --bs-form-invalid-color: #ea868f;
    --bs-form-invalid-border-color: #ea868f;
  }

  html[data-bs-theme="auto"] .table {
    --bs-table-color: #dee2e6;
    --bs-table-bg: transparent;
    --bs-table-border-color: #495057;
    --bs-table-striped-bg: rgba(222, 226, 230, .05);
    --bs-table-hover-bg: rgba(222, 226, 230, .075);
    --bs-table-active-bg: rgba(222, 226, 230, .1);
  }

  html[data-bs-theme="auto"] .table-dark {
    --bs-table-color: #fff;
    --bs-table-bg: #343a40;
    --bs-table-border-color: #4d5154;
    --bs-table-striped-bg: #3a4046;
    --bs-table-hover-bg: #3e464c;
    --bs-table-active-bg: #424850;
  }

  html[data-bs-theme="auto"] .form-control,
  html[data-bs-theme="auto"] .form-select {
    color: #dee2e6;
    background-color: #2b3035;
    border-color: #495057;
  }

  html[data-bs-theme="auto"] .form-control::placeholder { color: #6c757d; }

  html[data-bs-theme="auto"] .form-control:focus,
  html[data-bs-theme="auto"] .form-select:focus {
    background-color: #2b3035;
    border-color: #6ea8fe;
    color: #dee2e6;
  }

  html[data-bs-theme="auto"] .input-group-text {
    color: #dee2e6;
    background-color: #343a40;
    border-color: #495057;
  }

  html[data-bs-theme="auto"] .card {
    --bs-card-bg: #2b3035;
    --bs-card-border-color: #495057;
    --bs-card-cap-bg: rgba(255, 255, 255, .03);
    --bs-card-color: #dee2e6;
  }

  html[data-bs-theme="auto"] .dropdown-menu {
    --bs-dropdown-bg: #343a40;
    --bs-dropdown-border-color: rgba(255, 255, 255, .15);
    --bs-dropdown-link-color: #dee2e6;
    --bs-dropdown-link-hover-color: #fff;
    --bs-dropdown-link-hover-bg: rgba(255, 255, 255, .15);
    --bs-dropdown-link-active-color: #fff;
    --bs-dropdown-link-active-bg: #0d6efd;
    --bs-dropdown-divider-bg: rgba(255, 255, 255, .15);
    --bs-dropdown-header-color: #adb5bd;
  }

  html[data-bs-theme="auto"] .alert {
    --bs-alert-bg: transparent;
    --bs-alert-color: inherit;
  }

  html[data-bs-theme="auto"] .modal-content {
    background-color: #343a40;
    color: #dee2e6;
    border-color: #495057;
  }

  html[data-bs-theme="auto"] .list-group-item {
    --bs-list-group-bg: #2b3035;
    --bs-list-group-color: #dee2e6;
    --bs-list-group-border-color: #495057;
    --bs-list-group-action-hover-bg: rgba(255, 255, 255, .075);
  }

  html[data-bs-theme="auto"] .pagination {
    --bs-pagination-bg: #2b3035;
    --bs-pagination-border-color: #495057;
    --bs-pagination-color: #6ea8fe;
    --bs-pagination-hover-bg: #343a40;
    --bs-pagination-hover-color: #8bb9fe;
    --bs-pagination-hover-border-color: #495057;
    --bs-pagination-disabled-bg: #212529;
    --bs-pagination-disabled-color: #6c757d;
    --bs-pagination-disabled-border-color: #495057;
    --bs-pagination-active-bg: #0d6efd;
    --bs-pagination-active-border-color: #0d6efd;
    --bs-pagination-active-color: #fff;
  }

  html[data-bs-theme="auto"] .nav-tabs {
    --bs-nav-tabs-border-color: #495057;
    --bs-nav-tabs-link-hover-border-color: #343a40 #343a40 #495057;
    --bs-nav-tabs-link-active-color: #dee2e6;
    --bs-nav-tabs-link-active-bg: #212529;
    --bs-nav-tabs-link-active-border-color: #495057 #495057 #212529;
  }

  html[data-bs-theme="auto"] .badge.bg-secondary { background-color: #495057 !important; }
}

label.form-label:has(+ .form-control-plaintext) { font-weight: 600; }
