body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Default light theme (Bootstrap 4 default) */

body {
  background-color: #fff;
  color: #212529;
}

/* Dark theme */

body.dark-theme {
  background-color: #212529;
  color: #f8f9fa;
}

/* Bootstrap 4 component overrides for dark theme */

body.dark-theme .btn-primary {
  background-color: #375a7f;
  border-color: #375a7f;
}

body.dark-theme .btn-primary:hover {
  background-color: #2c4866;
  border-color: #2c4866;
}

body.dark-theme .btn-secondary {
  background-color: #444;
  border-color: #444;
}

body.dark-theme .btn-secondary:hover {
  background-color: #333;
  border-color: #333;
}

body.dark-theme .card {
  background-color: #343a40;
  border-color: #454d55;
  color: #f8f9fa;
}

body.dark-theme .table {
  color: #f8f9fa;
  background-color: #343a40;
}

body.dark-theme .table-bordered {
  border-color: #454d55;
}

body.dark-theme .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .navbar {
  background-color: #343a40;
  color: #f8f9fa;
}

body.dark-theme .nav-link {
  color: #f8f9fa;
}

body.dark-theme .form-control {
  background-color: #343a40;
  border-color: #454d55;
  color: #f8f9fa;
}

body.dark-theme .form-control:focus {
  background-color: #454d55;
  border-color: #596673;
  color: #f8f9fa;
}

/* TRS Player Rankings table - override inline styles so dark mode has visible text */
body.dark-theme #new-trs-table,
body.dark-theme #new-trs-table th,
body.dark-theme #new-trs-table td,
body.dark-theme #new-trs-table tbody tr {
  color: #f8f9fa !important;
  background-color: #343a40 !important;
}
body.dark-theme #new-trs-table tbody tr:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.05) !important;
}
body.dark-theme #new-trs-table tbody tr:nth-child(even) {
  background-color: #343a40 !important;
}
body.dark-theme #new-trs-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-theme #new-trs-table thead th {
  background-color: #454d55 !important;
  color: #f8f9fa !important;
  border-color: #495057 !important;
}
body.dark-theme #new-trs-mgmt-panel .card-body,
body.dark-theme #new-trs-mgmt-panel .form-control,
body.dark-theme #new-trs-mgmt-panel .form-check-label,
body.dark-theme #new-trs-mgmt-panel label,
body.dark-theme #new-trs-mgmt-panel .text-muted {
  color: #e9ecef !important;
}
body.dark-theme #new-trs-mgmt-panel .card.bg-light,
body.dark-theme #new-trs-mgmt-panel .card-body.bg-light,
body.dark-theme #new-trs-mgmt-panel .card.bg-white {
  background-color: #343a40 !important;
  color: #f8f9fa !important;
  border-color: #495057 !important;
}
body.dark-theme #new-trs-mgmt-panel .card.bg-white .card-body,
body.dark-theme #new-trs-mgmt-panel .card.bg-white label,
body.dark-theme #new-trs-mgmt-panel .card.bg-white .text-muted {
  background-color: #343a40 !important;
  color: #e9ecef !important;
}
body.dark-theme #new-trs-mgmt-panel .card.bg-white .form-control,
body.dark-theme #new-trs-mgmt-panel .card.bg-white .form-control-sm {
  background-color: #454d55 !important;
  border-color: #495057 !important;
  color: #f8f9fa !important;
}
body.dark-theme #new-trs-mgmt-panel .card.bg-white .btn-outline-secondary {
  border-color: #6c757d !important;
  color: #e9ecef !important;
}
body.dark-theme #new-trs-mgmt-panel .card.bg-white .btn-outline-secondary:hover {
  background-color: #495057 !important;
  border-color: #6c757d !important;
  color: #f8f9fa !important;
}
body.dark-theme #new-trs-mgmt-panel .input-group-text {
  background-color: #454d55 !important;
  border-color: #495057 !important;
  color: #f8f9fa !important;
}
body.dark-theme #toggle-search-filter-btn {
  background-color: #495057 !important;
  border-color: #6c757d !important;
  color: #f8f9fa !important;
}

/* Add more Bootstrap component overrides as needed */

