﻿/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

/* Toggle switch styles */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    background-color: #ccc;
    border-radius: 34px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.4s;
}

    .slider::before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        border-radius: 50%;
        transition: 0.4s;
    }

input:checked + .slider {
    background-color: #4caf50;
}

    input:checked + .slider::before {
        transform: translateX(26px);
    }


a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}

/* Provide sufficient contrast against white background */
a {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 13px;
    }
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

.dropdown-menu {
    width: 300px;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    position: relative;
    min-height: 100%;
}

body {
    /* Margin bottom by footer height */
    margin-bottom: 60px;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px; /* Vertically center the text there */
}

#contextMenu {
    position: absolute;
    display: none;
}

.click-to-refresh-text {
    margin: unset;
    font-size: 11px;
    padding-left: 4px;
    color: grey;
    font-weight: 400;
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    transition: background-color .3s, opacity .5s, visibility .5s;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

    #back-to-top::after {
        font-weight: normal;
        font-style: normal;
        font-size: 2em;
        line-height: 50px;
        color: #fff;
    }

    #back-to-top:hover {
        cursor: pointer;
    }

    #back-to-top:active {
        background-color: #555;
    }

    #back-to-top.show {
        opacity: 1;
        visibility: visible;
    }


.underline--magical {
    background-image: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.15em;
    background-position: 0 88%;
    transition: background-size 0.25s ease-in;
}

    .underline--magical:hover {
        background-size: 100% 88%;
    }

tr.hide-table-padding td {
    padding: 0;
}

.expand-button {
    position: relative;
}

.delete-location-detail {
    color: red
}

.add-location-detail {
    color: green
}

.width-100 {
    width: 100%;
}

.margin-left-20 {
    margin-left: 20px;
}

.margin-right-20 {
    margin-right: 20px;
}

.margin-top-10 {
    margin-top: 10px;
}

.row {
    clear: both
}

.column {
    width: 50%;
    float: left;
}

.elegant-shadow {
    color: #131313;
    letter-spacing: 0.15em;
    text-shadow: -6px 2px 3px rgba(150, 150, 150, 0.49);
}

.lsm-search-form {
    width: 100%;
    display: inline-flex;
}

ml5 {
    position: relative;
    font-weight: 300;
    font-size: 4.5em;
    color: #402d2d;
}

.ml5 .text-wrapper {
    position: relative;
    display: inline-block;
    padding-top: 0.1em;
    padding-right: 0.05em;
    padding-bottom: 0.15em;
    line-height: 1em;
}

.ml5 .line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    height: 3px;
    width: 100%;
    background-color: #402d2d;
    transform-origin: 0.5 0;
}

.ml5 .ampersand {
    font-family: Baskerville, serif;
    font-style: italic;
    font-weight: 400;
    width: 1em;
    margin-right: -0.1em;
    margin-left: -0.1em;
}

.ml5 .letters {
    display: inline-block;
    opacity: 0;
}

.box {
    height: 40px;
    margin: auto;
    overflow: hidden;
    position: relative;
}

    .box::before {
        top: 0;
        left: 0;
        z-index: 1;
        width: 100%;
        content: "";
        height: 10px;
        position: absolute;
        background: linear-gradient(180deg, white, rgba(255, 255, 255, 0));
    }

    .box::after {
        left: 0;
        bottom: 0;
        z-index: 1;
        width: 100%;
        content: "";
        height: 10px;
        position: absolute;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0), white);
    }

    .box ul {
        margin: 0;
        padding: 0;
        -webkit-animation: scrollUp 2.5s 1.0s infinite forwards;
        animation: scrollUp 2.5s 1.0s infinite forwards;
    }

        .box ul li {
            opacity: 1;
            height: 20px;
            padding: 10px;
            list-style: none;
        }

@-webkit-keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@-webkit-keyframes scrollUp {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-83.3333333333%);
    }
}

@keyframes scrollUp {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-83.3333333333%);
    }
}

.btn-1 {
    background: linear-gradient(90deg, var(--c1, #f6d365), var(--c2, #fda085) 51%, var(--c1, #f6d365)) var(--x, 0)/ 200%;
    transition: 0.5s;
    --c1: #28a745;
    --c2: #54ff7b;
    color: #4a4a4a;
}

    .btn-1:hover {
        --x: 100%;
    }

.selected {
    background: lightBlue
}

.margin-bottom-5 {
    margin-bottom:5px;
}

.display-center-loading {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.highcharts-figure, .highcharts-data-table table {
    min-width: 360px;
    max-width: 800px;
    margin: 1em auto;
}

.highcharts-data-table table {
    font-family: Verdana, sans-serif;
    border-collapse: collapse;
    border: 1px solid #EBEBEB;
    margin: 10px auto;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.highcharts-data-table caption {
    padding: 1em 0;
    font-size: 1.2em;
    color: #555;
}

.highcharts-data-table th {
    font-weight: 600;
    padding: 0.5em;
}

.highcharts-data-table td, .highcharts-data-table th, .highcharts-data-table caption {
    padding: 0.5em;
}

.highcharts-data-table thead tr, .highcharts-data-table tr:nth-child(even) {
    background: #f8f8f8;
}

.highcharts-data-table tr:hover {
    background: #f1f7ff;
}

.week-selector-week-btn {
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
    font-size: 0.735rem;
    padding: 0 0.2rem;
}

.week-selector-week-btn[data-week-selected] {
        
}

.modal {
    top: 50px !important;
}

.table.table-sticky-head tbody {
    border-top-width: 0;
}
.table.table-sticky-foot tbody {
    border-bottom-width: 0;
}

.table.table-sticky-head thead {
    position: sticky;
    top: 0;
    background-color: white;
}

    .table.table-sticky-head thead tr:last-of-type {
        border-bottom: 2px solid currentColor;
    }

.table.table-sticky-foot tfoot {
    position: sticky;
    bottom: 0;
    background-color: white;
}

    .table.table-sticky-foot tfoot tr:first-of-type {
        border-top: 2px solid currentColor;
        border-bottom: none;
    }

    .table.table-sticky-foot tfoot tr:last-of-type, .table.table-sticky-foot tfoot tr:last-of-type td {
        border-bottom: none;
    }

/* Navbar items */
#navBar .nav-item {
    border-bottom: 1px solid rgba(206, 212, 218, 0.3) !important;
}

    #navBar .nav-item:last-child {
        border-bottom: none !important;
    }

    /* Navbar links */
    #navBar .nav-item .nav-link {
        color: inherit !important; /* keep original color unless hovered or active */
    }

        #navBar .nav-item .nav-link:hover {
            color: #eed390 !important;
        }

/* Active/expanded nav links */
#navBar .nav-link[aria-expanded="true"],
#navBar .nav-link.active {
    color: goldenrod !important;
}

    #navBar .nav-link[aria-expanded="true"]:hover,
    #navBar .nav-link.active:hover {
        color: goldenrod !important;
    }

/* Icons inside navbar */
#navBar i {
    width: 1rem;
    padding-right: 1.5rem;
    align-content: center;
}

/* Navbar subtitles */
.nav-subtitle {
    text-decoration: none;
    color: goldenrod !important;
    font-weight: bold;
}

    .nav-subtitle:hover {
        color: goldenrod !important;
        pointer-events: none;
    }

/* =============================
   Dark Gray Theme for Bootstrap 5.3
   ============================= */
[data-bs-theme="dark"] {
    --bs-body-bg: #212529;
    --bs-body-color: #e0e0e0;
    --bs-btn-bg: #3a3a3a;
    --bs-btn-color: #e0e0e0;
    --bs-btn-border-color: #555;
    --bs-border-color: #333;
    --bs-modal-bg: #2a2a2a;
    --bs-modal-color: #e0e0e0;
    --bs-input-bg: #2a2a2a;
    --bs-input-color: #e0e0e0;
    --bs-input-border-color: #555;
    --bs-dropdown-bg: #2a2a2a;
    --bs-dropdown-color: #e0e0e0;
}

    [data-bs-theme="dark"] .cr-dashboard-widget-body {
        background-color: #212529;
    }

    [data-bs-theme="dark"] .cr-dashboard-widget-header .cr-dashboard-widget-title .col-6 {
        width: auto;
        flex: 1 1 auto;
    }

    [data-bs-theme="dark"] .accordion-item {
        background-color: #2a2a2a;
        border: 1px solid #555;
    }

    [data-bs-theme="dark"] .accordion-button {
        background-color: #3a3a3a;
        color: #e0e0e0;
        border: none;
    }

        [data-bs-theme="dark"] .accordion-button:not(.collapsed) {
            background-color: #444; /* slightly different when open */
            color: #fff;
        }

    [data-bs-theme="dark"] .accordion-body {
        background-color: #212529;
        color: #e0e0e0;
        border-top: 1px solid #555;
    }

    [data-bs-theme="dark"] .cr-dashboard-widget-header,
    [data-bs-theme="dark"] .cr-dashboard-widget-header,
    [data-bs-theme="dark"] .cr-dashboard-widget-header,
    [data-bs-theme="dark"] .cr-dashboard-widget-header,
    [data-bs-theme="dark"] .cr-dashboard-widget-header,
    [data-bs-theme="dark"] .cr-dashboard-widget-header {
        background-color: #3a3a3a;
        color: #e0e0e0;
        border-color: #555;
    }

    [data-bs-theme="dark"] .cr-dashboard-widget-header h1,
    [data-bs-theme="dark"] .cr-dashboard-widget-header h2,
    [data-bs-theme="dark"] .cr-dashboard-widget-header h3,
    [data-bs-theme="dark"] .cr-dashboard-widget-header h4,
    [data-bs-theme="dark"] .cr-dashboard-widget-header h5,
    [data-bs-theme="dark"] .cr-dashboard-widget-header h6 {
        background-color: #3a3a3a;
        color: #e0e0e0;
        border-color: #555;
    }

    [data-bs-theme="dark"] .cr-dashboard-widget-header cr-dashboard-widget-title,
    [data-bs-theme="dark"] .cr-dashboard-widget-header cr-dashboard-widget-title,
    [data-bs-theme="dark"] .cr-dashboard-widget-header cr-dashboard-widget-title,
    [data-bs-theme="dark"] .cr-dashboard-widget-header cr-dashboard-widget-title,
    [data-bs-theme="dark"] .cr-dashboard-widget-header cr-dashboard-widget-title,
    [data-bs-theme="dark"] .cr-dashboard-widget-header cr-dashboard-widget-title {
        background-color: #3a3a3a;
        color: #e0e0e0;
        border-color: #555;
    }

/* Buttons */
[data-bs-theme="dark"] .btn:not(#navBarBtn),
[data-bs-theme="dark"] .btn-primary,
[data-bs-theme="dark"] .btn-outline-primary {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-color: #555;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

[data-bs-theme="dark"] #navBarBtn {
    color: #e0e0e0 !important;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s !important;
}

    [data-bs-theme="dark"] #navBarBtn:hover {
        color: #e0e0e0 !important;
        transition: background-color 0.2s, color 0.2s, border-color 0.2s !important;
    }

/* Offcanvas header buttons */
[data-bs-theme="dark"] .offcanvas-header .btn {
    background-color: goldenrod !important; /* button background */
    color: goldenrod !important; /* fallback text color */
    border: none !important;
}

/* Icon inside the button */
    [data-bs-theme="dark"] .offcanvas-header .btn i {
        color: #ffffff !important; /* keep icon white */
    }

/* Hover effect */
    [data-bs-theme="dark"] .offcanvas-header .btn:hover {
        background-color: #e0b200 !important; /* slightly lighter goldenrod */
    }

        [data-bs-theme="dark"] .offcanvas-header .btn:hover i {
            color: black !important; /* icon stays white on hover */
        }

[data-bs-theme="dark"] .btn:hover,
[data-bs-theme="dark"] .btn:focus,
[data-bs-theme="dark"] .btn-outline-primary:hover,
[data-bs-theme="dark"] .btn-outline-primary:focus {
    background-color: #505050;
    color: #ffffff;
    border-color: #666;
}

[data-bs-theme="dark"] .btn:active,
[data-bs-theme="dark"] .btn-outline-primary:active {
    background-color: #606060;
    color: #ffffff;
    border-color: #777;
}

/* Cards */
[data-bs-theme="dark"] .card {
    background-color: #272727;
    color: #e0e0e0;
    border: 1px solid #333;
    transition: background-color 0.2s;
}

    [data-bs-theme="dark"] .card:hover {
        background-color: #2a2a2a;
        color: #ffffff;
    }

/* Override text-black globally */
[data-bs-theme="dark"] .text-black {
    color: #e0e0e0 !important;
}

/* Forms */
[data-bs-theme="dark"] .input-group-text,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .form-control.bg-light {
    background-color: #272727;
    color: #e0e0e0;
    border: 1px solid #555;
}

    [data-bs-theme="dark"] .form-control:focus,
    [data-bs-theme="dark"] .form-select:focus {
        background-color: #272727;
        color: #ffffff;
        border-color: #555;
        box-shadow: none;
    }

/* Tables */
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd),
[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(even),
[data-bs-theme="dark"] tfoot {
    background-color: #1f1f1f;
    color: #e0e0e0 !important;
    border-color: #333;
}

    [data-bs-theme="dark"] .table th,
    [data-bs-theme="dark"] .table td,
    [data-bs-theme="dark"] tfoot td {
        border-color: #333;
        color: #e0e0e0 !important;
    }

    [data-bs-theme="dark"] .table thead th {
        background-color: #2a2a2a;
        color: #e0e0e0 !important;
    }

[data-bs-theme="dark"] .table-hover > tbody > tr:hover {
    background-color: #3a3a3a;
}

    /* Dark mode tables */
    [data-bs-theme="dark"] .table,
    [data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd),
    [data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(even),
    [data-bs-theme="dark"] tfoot,
    [data-bs-theme="dark"] tfoot tr,
    [data-bs-theme="dark"] tfoot td {
        background-color: #1f1f1f; /* dark footer background */
        color: #e0e0e0 !important; /* light text */
        border-color: #333;
    }

        /* Table cells and header cells */
        [data-bs-theme="dark"] .table th,
        [data-bs-theme="dark"] .table td,
        [data-bs-theme="dark"] tfoot td {
            border-color: #333;
            color: #e0e0e0 !important;
        }

        /* Table header */
        [data-bs-theme="dark"] .table thead th {
            background-color: #2a2a2a;
            color: #e0e0e0 !important;
        }

    /* Hover effect */
    [data-bs-theme="dark"] .table-hover > tbody > tr:hover {
        background-color: #3a3a3a;
    }

    /* Sticky footer specific fix */
    [data-bs-theme="dark"] .table-sticky-foot tfoot {
        background-color: #1f1f1f;
        color: #e0e0e0 !important;
    }


/* Dark mode links inside list items, excluding navbar */
[data-bs-theme="dark"] li a:not(#navBar a),
[data-bs-theme="dark"] .table a,
[data-bs-theme="dark"] p a,
[data-bs-theme="dark"] .list-group a {
    color: #e0e0e0;
    text-decoration: none;
}

    [data-bs-theme="dark"] li a:not(#navBar a):hover,
    [data-bs-theme="dark"] .table a:hover,
    [data-bs-theme="dark"] p a:hover,
    [data-bs-theme="dark"] .list-group a:hover {
        color: #ffffff;
        text-decoration: underline;
    }

/* Force bg-light to behave in dark mode */
[data-bs-theme="dark"] .bg-light {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
}

/* Outline primary button fix */
[data-bs-theme="dark"] .btn-outline-primary {
    color: #e0e0e0;
    border-color: #888;
}

    [data-bs-theme="dark"] .btn-outline-primary:hover,
    [data-bs-theme="dark"] .btn-outline-primary:focus {
        background-color: #444;
        border-color: #aaa;
        color: #fff;
    }

/* Outline danger button fix */
[data-bs-theme="dark"] .btn-outline-danger {
    color: #ff6b6b;
    border-color: #aa4444;
}

    [data-bs-theme="dark"] .btn-outline-danger:hover,
    [data-bs-theme="dark"] .btn-outline-danger:focus {
        background-color: #aa4444;
        border-color: #ff6b6b;
        color: #fff;
    }

    [data-bs-theme="dark"] .btn.btn-outline-primary {
        color: #e0e0e0 !important;
        border-color: #888 !important;
        background-color: transparent;
    }

        [data-bs-theme="dark"] .btn.btn-outline-primary:hover,
        [data-bs-theme="dark"] .btn.btn-outline-primary:focus {
            background-color: #444 !important;
            border-color: #aaa !important;
            color: #fff !important;
        }

/* Accordion */
[data-bs-theme="dark"] .accordion-button {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid #555;
}

    [data-bs-theme="dark"] .accordion-button:not(.collapsed),
    [data-bs-theme="dark"] .accordion-button:hover {
        background-color: #505050;
        color: #ffffff;
    }

    [data-bs-theme="dark"] .accordion-button::after {
        filter: invert(1);
        color: #e0e0e0 !important;
    }

/* List groups */
[data-bs-theme="dark"] .list-group,
[data-bs-theme="dark"] .list-group-item {
    background-color: #272727;
    color: #e0e0e0;
    border: 1px solid #333;
}

    [data-bs-theme="dark"] .list-group-item:hover {
        background-color: #2a2a2a;
        color: #ffffff;
    }

    /* Buttons inside list items and headers */
    [data-bs-theme="dark"] li .btn,
    [data-bs-theme="dark"] .list-group-item .btn,
    [data-bs-theme="dark"] h1 .btn,
    [data-bs-theme="dark"] h2 .btn,
    [data-bs-theme="dark"] h3 .btn,
    [data-bs-theme="dark"] h4 .btn,
    [data-bs-theme="dark"] h5 .btn,
    [data-bs-theme="dark"] h6 .btn {
        background-color: #3a3a3a;
        color: #e0e0e0;
        border-color: #555;
    }

        [data-bs-theme="dark"] li .btn:hover,
        [data-bs-theme="dark"] .list-group-item .btn:hover,
        [data-bs-theme="dark"] li .btn:focus,
        [data-bs-theme="dark"] .list-group-item .btn:focus,
        [data-bs-theme="dark"] h1 .btn:hover,
        [data-bs-theme="dark"] h2 .btn:hover,
        [data-bs-theme="dark"] h3 .btn:hover,
        [data-bs-theme="dark"] h4 .btn:hover,
        [data-bs-theme="dark"] h5 .btn:hover,
        [data-bs-theme="dark"] h6 .btn:hover {
            background-color: #505050;
            color: #ffffff;
            border-color: #666;
        }

        [data-bs-theme="dark"] li .btn:active,
        [data-bs-theme="dark"] .list-group-item .btn:active,
        [data-bs-theme="dark"] h1 .btn:active,
        [data-bs-theme="dark"] h2 .btn:active,
        [data-bs-theme="dark"] h3 .btn:active,
        [data-bs-theme="dark"] h4 .btn:active,
        [data-bs-theme="dark"] h5 .btn:active,
        [data-bs-theme="dark"] h6 .btn:active {
            background-color: #606060;
            color: #ffffff;
            border-color: #777;
        }

/* Nav tabs */
[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: #e0e0e0;
    background-color: #272727;
    border: 1px solid #333;
}

    [data-bs-theme="dark"] .nav-tabs .nav-link.active {
        background-color: #3a3a3a;
        color: #ffffff;
        border-color: #555;
    }

    [data-bs-theme="dark"] .nav-tabs .nav-link:hover {
        background-color: #505050;
        color: #ffffff;
    }

/* Preserve outline button colors in dark mode */
[data-bs-theme="dark"] .btn-success {
    color: white !important; /* green */
    background-color: #198754 !important;
}

[data-bs-theme="dark"] .btn-danger {
    color: white !important; /* red */
    background-color: #dc3545 !important;
}

[data-bs-theme="dark"] .btn-warning {
    color: white !important; /* warning yellow */
    background-color: #ffc107 !important;
}

/* Preserve outline button colors in dark mode */
[data-bs-theme="dark"] .btn-outline-success {
    color: #198754 !important; /* green */
    border-color: #198754 !important; /* green border */
    background-color: transparent !important;
}

[data-bs-theme="dark"] .btn-outline-primary {
    color: #0d6efd !important; /* blue */
    border-color: #0d6efd !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .btn-outline-danger {
    color: #dc3545 !important; /* red */
    border-color: #dc3545 !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .btn-outline-warning {
    color: #ffc107 !important; /* warning yellow */
    border-color: #ffc107 !important;
    background-color: transparent !important;
}

/* Hover state */
[data-bs-theme="dark"] .btn-outline-success:hover {
    color: #fff !important;
    background-color: #198754 !important;
    border-color: #198754 !important;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    color: #fff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

[data-bs-theme="dark"] .btn-outline-danger:hover {
    color: #fff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

[data-bs-theme="dark"] .btn-outline-warning:hover {
    color: black !important;
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
}

/* Dark mode: form controls inside columns */
[data-bs-theme="dark"] .col-6 .form-control,
[data-bs-theme="dark"] .col-6 .input-group-text {
    background-color: #272727 !important; /* dark gray */
    color: #e0e0e0 !important; /* light text */
    border: 1px solid #555 !important; /* subtle border */
}

    /* Focused state */
    [data-bs-theme="dark"] .col-6 .form-control:focus {
        background-color: #272727 !important;
        color: #ffffff !important;
        border-color: #666 !important;
        box-shadow: none !important;
    }

/* If there are buttons inside the column */
[data-bs-theme="dark"] .col-6 .btn {
    background-color: #3a3a3a !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

    [data-bs-theme="dark"] .col-6 .btn:hover,
    [data-bs-theme="dark"] .col-6 .btn:focus {
        background-color: #505050 !important;
        color: #ffffff !important;
        border-color: #666 !important;
    }

[data-bs-theme="dark"] .border {
    border-color: #555 !important; /* darker border */
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2a2a2a !important; /* dark background */
    color: #e0e0e0 !important; /* ensure text is readable */
}

/* Dark mode: bstreeview hover */
[data-bs-theme="dark"] .bstreeview .list-group-item:hover,
[data-bs-theme="dark"] .bstreeview .list-group-item:focus {
    background-color: #e0e0e0 !important; /* light gray */
    color: #000 !important; /* black text */
}

/* Target the dropdown menu in dark mode */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2b2b2b; /* dark background */
    border-color: #444; /* optional: dark border */
}

    /* Dropdown items text color */
    [data-bs-theme="dark"] .dropdown-menu .dropdown-item {
        color: #f1f1f1; /* light text */
    }

    .dropdown-menu .dropdown-item:hover,
    .dropdown-menu .dropdown-item:focus {
        background-color: #0d6efd; /* Bootstrap primary blue */
        color: #fff; /* ensure text is readable */
    }

    /* Active item styling */
    .dropdown-menu .dropdown-item.active {
        background-color: #0b5ed7; /* slightly darker blue for active */
        color: #fff;
    }

/* Dark mode select styling */
body.dark-mode .form-select {
    background-color: #2b2b2b; /* dark background */
    color: #f1f1f1; /* light text */
    border: 1px solid #444; /* optional: dark border */
}

    /* Optional: focus state */
    body.dark-mode .form-select:focus {
        background-color: #3a3a3a;
        border-color: #666;
        color: #fff;
    }

/* Dark mode input group */
body.dark-mode .input-group {
    background-color: #2b2b2b; /* match dropdown background */
    border: 1px solid #444; /* dark border */
    border-radius: 0.25rem; /* optional: match Bootstrap default */
    overflow: hidden; /* ensures border-radius applies */
    display: flex;
    align-items: center;
}

    /* Dark mode select inside input group */
    body.dark-mode .input-group .form-select {
        background-color: #2b2b2b; /* dark background */
        color: #f1f1f1; /* light text */
        border: none; /* remove inner border for seamless look */
        flex: 1; /* take full width */
        padding: 0.5rem 1rem;
    }

        /* Optional: focus state */
        body.dark-mode .input-group .form-select:focus {
            background-color: #3a3a3a;
            border-color: #666; /* not visible due to border:none, but kept for safety */
            color: #fff;
            outline: none; /* remove default focus outline */
        }

        /* Optional: placeholder color */
        body.dark-mode .input-group .form-select option:first-child {
            color: #aaa; /* light grey placeholder */
        }

/* Add left border to the first tab */
.nav-tabs .nav-item:first-child .nav-link {
    border-left: 1px solid #dee2e6; /* Bootstrap default border color */
    border-top-left-radius: 0.25rem; /* match Bootstrap rounded corners */
}

/* Add right border to the last tab */
.nav-tabs .nav-item:last-child .nav-link {
    border-right: 1px solid #dee2e6;
    border-top-right-radius: 0.25rem;
}

/* Apply dark mode styles to all modals */
[data-bs-theme="dark"] .modal-content {
    background-color: #1e1e1e !important;
    color: #fff !important;
    border: 1px solid #333 !important;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    border-color: #333 !important;
}

    [data-bs-theme="dark"] .modal-header .btn-close {
        filter: invert(1) grayscale(100%) brightness(200%);
    }

/* Dark mode override for primary links */
[data-bs-theme="dark"] .link-primary {
    color: #66b0ff !important; /* lighter blue for contrast on dark bg */
}

    [data-bs-theme="dark"] .link-primary:hover,
    [data-bs-theme="dark"] .link-primary:focus {
        color: #99ccff !important; /* even lighter blue on hover */
    }

/* Dark mode close button override */
[data-bs-theme="dark"] #navSearchContent .btn-close {
    filter: none !important; /* remove default invert */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath stroke='goldenrod' stroke-width='2' d='M2 2l12 12M14 2L2 14'/%3e%3c/svg%3e") !important;
}

/* Dark mode active buttons (status=1) */
[data-bs-theme="dark"] .permBtn[data-status="1"] {
    background-color: #b8860b !important; /* Dimmed goldenrod */
    color: #fff !important;
    border-color: #b8860b !important;
}

    /* Optional: hover effect for active buttons */
    [data-bs-theme="dark"] .permBtn[data-status="1"]:hover {
        background-color: #a77c07 !important; /* slightly darker on hover */
        border-color: #a77c07 !important;
    }

/* Dark mode inactive buttons (status=0) */
[data-bs-theme="dark"] .permBtn[data-status="0"] {
    background-color: #343a40 !important; /* dim gray */
    color: #e0e0e0 !important;
    border-color: #495057 !important;
}

    [data-bs-theme="dark"] .permBtn[data-status="0"]:hover {
        background-color: #495057 !important;
        color: #fff !important;
    }

/* Order Status Styles */
.order-status-edit {
    background-color: var(--bs-secondary-bg);
    color: var(--bs-body-color);
}

.order-status-cancelled {
    background-color: var(--bs-danger);
    color: #fff;
}

.order-status-pick-paused {
    background-color: var(--bs-warning);
    color: #000;
}

.order-status-held {
    background-color: var(--bs-orange); /* not in default palette, alias to warning-subtle? */
    background-color: #fd7e14;
    color: #fff;
}

.order-status-hidden {
    background-color: var(--bs-dark);
    color: #fff;
}

.order-status-basket {
    background-color: var(--bs-gray-500);
    color: #fff;
}

.order-status-placed {
    background-color: var(--bs-info);
    color: #fff;
}

.order-status-approved {
    background-color: var(--bs-success);
    color: #fff;
}

.order-status-superpicking {
    background-color: var(--bs-purple, #6f42c1);
    color: #fff;
}

.order-status-picking {
    background-color: var(--bs-primary);
    color: #fff;
}

.order-status-checking {
    background-color: var(--bs-teal, #20c997);
    color: #fff;
}

.order-status-packing {
    background-color: var(--bs-success, #6610f2);
    color: #fff;
}

.order-status-despatched {
    background-color: var(--bs-cyan, #0dcaf0);
    color: #000;
}

.order-status-completed {
    background-color: var(--bs-success);
    color: #fff;
}

/* Priority Styles */

.priority-very-low {
    background-color: var(--bs-info, #0dcaf0);
    color: #fff;
}

.priority-low {
    background-color: var(--bs-warning, #ffc107);
    color: #000;
}

.priority-medium {
    background-color: var(--bs-gray-400, #ced4da);
    color: #000;
}

.priority-high {
    background-color: var(--bs-orange, #fd7e14);
    color: #fff;
}

.priority-very-high {
    background-color: var(--bs-danger, #dc3545);
    color: #fff;
}

.priority-urgent {
    background-color: #b71c1c; /* deeper than danger for emphasis */
    color: #fff;
}

[data-bs-theme="dark"] .btn-link {
    background-color: transparent !important;
    padding-block: var(--keep-vertical-padding, initial) !important;
    border: none !important;
    box-shadow: none !important;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 2rem; /* ensures content doesn't hide off page */
}

/* Quill placeholder text */
[data-bs-theme="dark"] .ql-editor.ql-blank::before {
    color: #fff; /* white text in dark mode */
}

/* CUSTOM CLASS FOR DARK MODE */
[data-bs-theme="dark"] .text-light-dark-mode {
    color: var(--bs-light) !important;
}

/* Make the toggle mode switch itself larger */
.big-switch {
    transform: scale(1.6);
    cursor: pointer;
    margin-top: 0.2rem;
    margin-right: 0.75rem;
    transition: transform 0.2s ease;
}

    /* Optional hover animation */
    .big-switch:hover {
        transform: scale(1.7);
    }