body {
    background-color: #000;
    color: #efefef;
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.light-mode {
    background-color: #f8f9fa;
    color: #000;
}

h1 {
    margin-top: 20px;
}

.card {
    margin-bottom: 20px;
    border-color: #000;
}

.light-mode .card {
    margin-bottom: 20px;
    border-color: #fff;
}

.card-header {
    color: #efefef;
}

body.light-mode .card-header {
    color: #fff;
}

.card-body {
    background-color: #000;
    color: #efefef;
    border-color: transparent;
}

body.light-mode .card-body {
    background-color: #fff;
    color: #000;
}

.list-group-item {
    background-color: #000;
    color: #efefef;
    border-color: transparent;
}

body.light-mode .list-group-item {
    background-color: #fff;
    color: #000;
    border-color: transparent;
}

.badge {
    font-size: 1rem;
}

.dark-mode-toggle {
    cursor: pointer;
    font-size: 1.2rem;
}

.search-bar {
    margin-bottom: 20px;
}

#search-input::placeholder {
    color: #efefef;
    transition: color 0.5s ease;
}

body.light-mode #search-input::placeholder {
    color: #000;
}

#search-input {
    background-color: #000;
    color: #efefef;
    border: 1px solid #444;
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

body.light-mode #search-input {
    background-color: #fff;
    color: #000;
    border: 1px solid #ccc;
}

.modal-dialog {
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
}

.modal-content {
    background-color: #121212;
    color: #efefef;
    border: 1px solid #333;
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

body.light-mode .modal-content {
    background-color: #fff;
    color: #000;
    border: 1px solid #ccc;
}

.modal-content .table {
    background-color: #000;
    color: #efefef;
}

.modal-content .table th {
    background-color: #1a1a1a;
    color: #efefef;
}

.modal-content .table td {
    background-color: #121212;
    color: #efefef;
    border-color: #333;
}

.modal-content .table tr:nth-child(odd) td {
    background-color: #1b1b1b;
    color: #fff;
}

.modal-content .table tr:nth-child(even) td {
    background-color: #121212;
}

.modal-content .table tr:hover td {
    background-color: #333;
    color: #fff;
}

body.light-mode .modal-content .table tr:nth-child(odd) td {
    background-color: #f9f9f9;
}

body.light-mode .modal-content .table tr:nth-child(even) td {
    background-color: #fff;
}

body.light-mode .modal-content .table tr:hover td {
    background-color: #ddd;
    color: #000;
}

.dataTables_filter input {
    background-color: #121212;
    color: #efefef;
    border: 1px solid #333;
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

.dataTables_filter input::placeholder {
    color: #efefef;
    opacity: 0.7;
}

body.light-mode .dataTables_filter input {
    background-color: #fff;
    color: #000;
    border: 1px solid #ccc;
}

body.light-mode .dataTables_filter input::placeholder {
    color: #000;
    opacity: 0.7;
}

.dataTables_length select {
    background-color: #121212;
    color: #efefef;
    border: 1px solid #333;
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

body.light-mode .dataTables_length select {
    background-color: #fff;
    color: #000;
    border: 1px solid #ccc;
}

.dataTables_wrapper .dataTables_scrollBody tbody tr {
    height: 60px;
}

.dataTables_wrapper .dataTables_scrollBody tbody td {
    vertical-align: middle;
    text-align: left;
    padding: 10px;
}

.dataTables_wrapper .dataTables_scrollHead th {
    height: 60px;
    vertical-align: middle;
}

.bg-primary {
    background-color: #8129A2 !important;
}

.btn-primary {
    background-color: #8129A2 !important;
    border-color: #8129A2 !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #6a2187 !important;
    border-color: #6a2187 !important;
}

.btn-outline-primary {
    color: white !important;
    border-color: #8129A2 !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: #8129A2 !important;
    color: white !important;
    border-color: #8129A2 !important;
}

input:checked + label[for="modeRealtime"] {
    background-color: #8129A2 !important;
    color: white !important;
    border-color: #8129A2 !important;
}

input:checked + label[for="modeHistorical"] {
    background-color: #8129A2 !important;
    color: white !important;
    border-color: #8129A2 !important;
}

.linechart-wrapper {
    position: relative;
}

.chart-empty-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}

.chart-empty-overlay button {
  z-index: 1060;
}

.modal-dialog.modal-narrow {
    margin: auto;
}

span.badge.bg-primary {
    font-size: 12px;
}

@media (max-width: 576px) {
    .modal-narrow {
        max-width: 320px;
    }
}

@media (min-width: 768px) {
    .modal-narrow {
        max-width: 320px;
    }
}

@media (min-width: 992px) {
    .modal-narrow {
        max-width: 320px;
    }
}
