html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.bg-gray-custom {
    background-color: #f8f9fa;
}
/* ============================================================================================================
   Sidebar (Components/Shared/Sidebar.razor + CustomComponents/NavItem.razor)
   Navy panel, red pill for the current menu, icon rail when collapsed on desktop.
   Height budget: with every menu collapsed the admin menu (15 entries + 3 section labels) must fit a ~650px
   window without scrolling - the max-height block at the end tightens spacing on short screens. Prefer putting
   new pages inside an existing menu rather than adding top-level entries.
   ============================================================================================================ */
.sidebar {
    --sb-bg-top: #131d31;
    --sb-bg-bottom: #0d1524;
    --sb-text: #e2e8f0;
    --sb-muted: #9aa5b8;
    /* Sub-menu links: clearly readable (not the muted grey, which reads as disabled). */
    --sb-sub-text: #cfd8e6;
    --sb-sub-hover: rgba(255, 255, 255, 0.09);
    --sb-sub-line: rgba(255, 255, 255, 0.16);
    --sb-label: #7f8ba0;
    --sb-hover: rgba(255, 255, 255, 0.06);
    --sb-line: rgba(255, 255, 255, 0.08);
    --sb-accent: #e3202e;
    --sb-accent-dark: #c8152a;
    background: linear-gradient(180deg, var(--sb-bg-top) 0%, var(--sb-bg-bottom) 100%);
    color: var(--sb-text);
    height: 100vh;
    min-width: 0;
    left: 0;
    top: 0;
    overflow: hidden;
}

.responsive-sidebar {
    flex: 0 0 256px;
    width: 256px;
}

@media (max-width: 991.98px) {
    .responsive-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1050;
        width: min(82vw, 280px);
        min-width: 0;
        height: 100dvh;
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform 220ms ease, visibility 220ms ease;
        box-shadow: 0.5rem 0 1.5rem rgba(0, 0, 0, 0.25);
    }

    .responsive-sidebar.is-open {
        transform: translateX(0);
        visibility: visible;
    }
}

@media (min-width: 992px) {
    .responsive-sidebar {
        position: sticky;
        top: 0;
        transform: none;
        visibility: visible;
        transition: flex-basis 200ms ease, width 200ms ease;
    }
}

/* Header: logo + collapse (desktop) / close (phone) button */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1.1rem 1rem 0.9rem 1.4rem;
}

.sidebar-brand-link {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
}

.sidebar-brand-logo {
    display: block;
    height: 26px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}

.sidebar-brand-mark {
    display: none;
    height: 28px;
    width: auto;
}

.sidebar-collapse-btn {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--sb-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
    font-size: 0.85rem;
    transition: background-color 0.2s, color 0.2s;
}

    .sidebar-collapse-btn:hover {
        background: rgba(255, 255, 255, 0.14);
        color: #fff;
    }

/* Scrolling menu area (thin scrollbar that only shows on hover) */
.sidebar-scroll {
    min-height: 0;
    padding: 0.25rem 0 0.75rem !important;
    overflow-y: auto;
    overflow-x: hidden;
    border-bottom: 1px solid var(--sb-line);
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.sidebar:hover .sidebar-scroll {
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 7px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    margin-block: 0.5rem;
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    min-height: 3rem;
    background-color: transparent;
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
    transition: background-color 180ms ease;
}

.sidebar:hover .sidebar-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
}

.sidebar:hover .sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.55);
}

/* Section labels (Operations / Support / Settings) */
.sidebar-section-label {
    padding: 1rem 1.6rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sb-label);
    user-select: none;
}

/* Top-level entries. ".sidebar" prefix + !important beat Bootstrap's .btn / .nav-link / .text-white / .w-100. */
.sidebar .sidebar-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: calc(100% - 1.5rem) !important;
    margin: 1px 0.75rem;
    padding: 0.5rem 0.85rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--sb-text) !important;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

    .sidebar .sidebar-nav-item > span {
        min-width: 0;
        margin-left: 0 !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sidebar .sidebar-nav-item svg,
    .sidebar .sidebar-nav-item > i {
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        font-size: 18px;
        opacity: 0.9;
    }

    .sidebar .sidebar-nav-item:hover {
        background: var(--sb-hover);
        color: #fff !important;
    }

    .sidebar .sidebar-nav-item.active {
        background: linear-gradient(135deg, var(--sb-accent) 0%, var(--sb-accent-dark) 100%);
        color: #fff !important;
        font-weight: 600;
        box-shadow: 0 8px 18px -8px rgba(227, 32, 46, 0.75);
    }

        .sidebar .sidebar-nav-item.active svg,
        .sidebar .sidebar-nav-item.active > i {
            opacity: 1;
        }

        /* Red marker on the panel's left edge next to the current menu. */
        .sidebar .sidebar-nav-item.active::before {
            content: "";
            position: absolute;
            top: 6px;
            bottom: 6px;
            left: -0.75rem;
            width: 4px;
            border-radius: 0 4px 4px 0;
            background: var(--sb-accent);
        }

    .sidebar .sidebar-nav-item:focus,
    .sidebar .sidebar-submenu-item:focus {
        box-shadow: none;
        outline: none;
    }

    .sidebar .sidebar-nav-item:focus-visible,
    .sidebar .sidebar-submenu-item:focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.45);
        outline-offset: -2px;
    }

/* Sub-menu links, with a thin guide line under the parent's icon */
.sidebar .sidebar-submenu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: calc(100% - 1.5rem) !important;
    margin: 1px 0.75rem;
    padding: 0.38rem 0.75rem 0.38rem 2.55rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--sb-sub-text);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

    .sidebar .sidebar-submenu-item:not(.no-indent)::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 1.45rem;
        width: 1px;
        background: var(--sb-sub-line);
    }

    .sidebar .sidebar-submenu-item:hover {
        background: var(--sb-sub-hover);
        color: #fff;
    }

        .sidebar .sidebar-submenu-item:hover::before {
            background: rgba(255, 255, 255, 0.35);
        }

    .sidebar .sidebar-submenu-item.active {
        background: rgba(227, 32, 46, 0.2);
        color: #fff;
        font-weight: 600;
        box-shadow: inset 0 0 0 1px rgba(227, 32, 46, 0.35);
    }

        .sidebar .sidebar-submenu-item.active::before {
            width: 2px;
            background: var(--sb-accent);
        }

    /* NavItem children that carry their own icon (Task Management) and links inside a nested dropdown. */
    .sidebar .sidebar-submenu-item.no-indent {
        padding-left: 1.6rem;
    }

    .sidebar .sidebar-submenu-item.nested-child {
        padding-left: 3.4rem;
    }

    .sidebar .sidebar-submenu-item svg {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
    }

/* Logout, under the menu */
.sidebar .sidebar-logout {
    margin: 0.6rem 0.75rem 0.8rem;
    color: var(--sb-muted) !important;
}

    .sidebar .sidebar-logout:hover {
        background: rgba(227, 32, 46, 0.14);
        color: #fff !important;
    }

/* Desktop icon rail */
@media (min-width: 992px) {
    .responsive-sidebar.is-collapsed {
        flex-basis: 76px;
        width: 76px;
    }

    .is-collapsed .sidebar-header {
        flex-direction: column;
        gap: 0.85rem;
        padding: 1.1rem 0.5rem 0.75rem;
    }

    .is-collapsed .sidebar-brand-link {
        flex: 0 0 auto;
        justify-content: center;
    }

    .is-collapsed .sidebar-brand-logo {
        display: none;
    }

    .is-collapsed .sidebar-brand-mark {
        display: block;
    }

    .is-collapsed .sidebar-section-label {
        height: 1px;
        margin: 0.6rem 1.25rem;
        padding: 0;
        font-size: 0;
        background: var(--sb-line);
    }

    .sidebar.is-collapsed .sidebar-nav-item {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

        .sidebar.is-collapsed .sidebar-nav-item > span {
            display: none;
        }

    .sidebar.is-collapsed .sidebar-submenu-item {
        display: none !important;
    }
}

/* Short desktop windows (e.g. 1366x768 laptops): tighter rows so the collapsed menu still fits. */
@media (min-width: 992px) and (max-height: 820px) {
    .sidebar-header {
        padding-top: 0.65rem;
        padding-bottom: 0.5rem;
    }

    .sidebar .sidebar-nav-item {
        padding-top: 0.27rem;
        padding-bottom: 0.27rem;
        font-size: 0.9rem;
    }

    .sidebar .sidebar-submenu-item {
        padding-top: 0.28rem;
        padding-bottom: 0.28rem;
    }

    .sidebar-section-label {
        padding-top: 0.5rem;
        padding-bottom: 0.15rem;
    }

    .sidebar .sidebar-logout {
        margin-top: 0.4rem;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    #newComplaintModal .modal-dialog {
        margin: 0.5rem;
    }

    #newComplaintModal .modal-body,
    #newComplaintModal .modal-header,
    #newComplaintModal .modal-footer {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    #newComplaintModal .row > .col {
        flex: 1 0 100%;
    }

    .complaints-page .table-responsive,
    .complaints-boards .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

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

.btn {
    border-radius: 50rem;
}


.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

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

/* Restore Bootstrap 5.3+ floating label behavior */
.form-floating > .form-control::placeholder,
.form-floating > .form-control-plaintext::placeholder {
    color: transparent !important;
}


.table td{
    font-family: monospace;
    vertical-align: middle;
}
.table-responsive {
    max-height: 500px;
}
.table thead th{
    padding-top: 15px;
    padding-bottom: 15px;
}
tbody tr {
    cursor: pointer;
}
/* Rounded corners for first and last header cells */
thead th:first-child {
    border-top-left-radius: 10px;
    padding-left: 1.5rem;
}

thead th:last-child {
    border-top-right-radius: 10px;
    padding-right: 1.5rem;
}

tbody td:first-child {
    padding-left: 1.5rem;
}
tbody td:last-child {
    padding-right: 1.5rem;
}

tfoot td:first-child {
    border-bottom-left-radius: 10px;
}

tfoot td:last-child {
    border-bottom-right-radius: 10px;
}

thead td{
    font-weight: bolder;
}

/*----- AUTOCOMPLETE MULTISELECT START -----*/
.ams-container {
    position: relative;
}

.ams-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.ams-chip {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
}

    .ams-chip button {
        border: none;
        background: none;
        margin-left: 4px;
        cursor: pointer;
    }

.ams-dropdown {
    z-index: 1000;
    position: relative;
    width: 100%;
    max-height: 300px;
    background: white;
    border: 1px solid #ccc;
    overflow-y: auto;
}

.ams-dropdown li {
    padding: 6px 10px;
    cursor: pointer;
}

.ams-dropdown li:hover {
    background-color: #f8f9fa;
}
/*----- AUTOCOMPLETE MULTISELECT END -----*/

/*----- TOGGLE SWITCH START -----*/
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0d6efd; /* always blue, no grey off */
    border-radius: 34px;
    transition: 0.4s;
}

/* The toggle knob */
.slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

/* Move knob when checked */
input:checked + .slider::before {
    transform: translateX(26px);
}

/*----- TOGGLE SWITCH OFF -----*/

.hover-pop {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-pop:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.hover-pop {
    cursor: pointer;
    will-change: transform;
}

.hover-scale {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.2);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.hover-scale {
    cursor: pointer;
    will-change: transform;
}

/*----- TRELLO COMMENTS -----*/
.trello-comment {
    background: #ebedf3;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

.comment-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.comment-header .author {
    font-weight: 600;
    color: #172b4d;
}

.comment-header .date {
    color: #6b778c;
    font-size: 12px;
}

.comment-text {
    color: #172b4d;
    white-space: pre-wrap; /* preserves new lines like Trello */
    word-wrap: break-word;
    font-size: 1.15em;
}

.comment-text a {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.comment-text p:last-child {
    display:contents;
}

.comment-text p {
    margin: 0;
}

.EasyMDEContainer {
    margin-top: 0.5rem;
}

.switch-lg {
    transform: scale(1.5);
    transform-origin: left center;
}

/* Independent scrollable columns inside the modal */
.scroll-column {
    max-height: 70vh; /* keeps columns within modal viewport */
    overflow-y: auto;
    padding: 0rem 0.25rem;
}

/* Make sure editor inside the scroll area expands naturally */
.scroll-column .easymde-container,
.scroll-column .CodeMirror {
    min-height: 200px;
}

.bg-danger, btn-danger, .modal-header, .btn-danger, .btn-close {
    color: #fff !important;
    background-color: #dd0000 !important;
}

.btn-outline-danger {
    --bs-btn-color: #dd0000;
    --bs-btn-border-color: #dd0000;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #dd0000;
    --bs-btn-hover-border-color: #dd0000;
    --bs-btn-active-bg: #dd0000;
    --bs-btn-active-border-color: #bb0000;
}

.table-danger {
    --bs-table-color: #fff !important;
    --bs-table-bg: #dd0000 !important;
}

.form-check-input:checked {
    border-color: #dd0000;
    color: #fff !important;
    background-color: #dd0000 !important;
}

.slider {
    background-color: #dd0000 !important;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn-danger:focus {
    border-color: #dd0000; /* solid inner border */
    outline: 0; /* remove default outline */
    background-clip: padding-box; /* preserves white gap */
    box-shadow: 0 0 0 0.15rem rgba(221, 0, 0, 0.5); /* outer ring with white gap */
}

/* Account Action Cards */
.account-action-card {
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid var(--border-color);
  min-height: 180px;
}

.account-action-card:hover {
  border-color: var(--primary-red);
  box-shadow: 0 0.5rem 1rem rgba(220, 53, 69, 0.15);
  transform: translateY(-2px);
}

/* TRANSFER DETAILS MODAL */
.td-modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.td-header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.td-state-badge {
    text-transform: capitalize;
    font-weight: 600;
}

.td-state-completed {
    background-color: #198754;
    color: #fff;
}

.td-state-failed {
    background-color: #dc3545;
    color: #fff;
}

.td-state-pending {
    background-color: #ffc107;
    color: #212529;
}

.td-state-default {
    background-color: #6c757d;
    color: #fff;
}

.td-reason {
    margin-bottom: 1rem;
}

.td-summary {
    display: grid;
    grid-template-columns: max-content 1fr;
    row-gap: 0.5rem;
    column-gap: 10rem;
    margin-bottom: 1.5rem;
}

.td-row {
    display: contents;
}

.td-row dt {
    color: #6c757d;
    font-weight: 700;
}

.td-row dd {
    margin: 0;
    word-break: break-all;
}

.td-header-title h5 {
    font-weight: 700;
}

.td-legs-title {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.td-legs-table {
    table-layout: fixed;
}

.td-legs-table th,
.td-legs-table td {
    width: 33.33%;
    overflow-wrap: break-word;
}

.td-legs-table th {
    color: #6c757d;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: left;
    vertical-align: middle;
}

.td-legs-table td {
    vertical-align: middle;
}

.td-muted {
    color: #6c757d;
    font-size: 0.8rem;
}

.td-amount-negative {
    color: #dc3545;
    font-weight: 600;
}

.td-amount-positive {
    color: #198754;
    font-weight: 600;
}
.login-logo-wrap {
    display: flex;
    justify-content: center;
    margin: 0 auto 1.75rem;
    padding: 0 .5rem;
}

.login-logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.login-logo-link {
    display: block;
    width: min(100%, 380px);
}

.complaint-status-awaiting {
    color: #b54708;
    background-color: #ffead5;
    border-color: #f79009 !important;
}

.complaint-status-awaiting-bar {
    background-color: #f79009 !important;
}

@media (max-width: 575.98px) {
    .login-logo-wrap {
        margin-bottom: 1.25rem;
    }

    .login-logo {
        width: 100%;
    }

    .login-logo-link {
        width: min(86vw, 320px);
    }
}

/* Live driver dashboard sections */
.main-dashboard .live-dashboard-panel {
    min-width: 0;
    overflow: hidden;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .05);
}

.main-dashboard .live-dashboard-panel-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .3rem;
    padding: .6rem .85rem;
    background: var(--bs-tertiary-bg, #f8fafc);
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.main-dashboard .live-dashboard-panel-top,
.main-dashboard .live-dashboard-panel-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

.main-dashboard .live-dashboard-panel-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bs-heading-color, #212529);
}

.main-dashboard .live-dashboard-panel-description {
    margin: 0;
    color: var(--bs-secondary-color, #6c757d);
    font-size: .85rem;
}

.main-dashboard .live-dashboard-panel-count {
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--bs-secondary-color, #6c757d);
    font-size: .8rem;
    font-weight: 600;
    text-align: right;
}

.main-dashboard .live-dashboard-panel-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    margin-left: auto;
    white-space: nowrap;
}

.main-dashboard .live-dashboard-search {
    width: 220px;
}

.main-dashboard .live-dashboard-filter {
    width: 180px;
}

.main-dashboard .live-dashboard-period {
    width: 205px;
}

.main-dashboard .live-dashboard-date {
    width: 145px;
}

.main-dashboard .live-dashboard-panel-body {
    min-width: 0;
    padding: 1.25rem;
}

.main-dashboard .live-dashboard-status-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
}

.main-dashboard .live-dashboard-panel .ctable-container {
    box-shadow: none;
}

@media (max-width: 1199.98px) {
    .main-dashboard .live-dashboard-panel-bottom {
        flex-wrap: wrap;
    }

    .main-dashboard .live-dashboard-panel-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .main-dashboard .live-dashboard-panel-header {
        padding: .6rem .75rem;
    }

    .main-dashboard .live-dashboard-panel-body {
        padding: 1rem;
    }

    .main-dashboard .live-dashboard-panel-top {
        flex-wrap: wrap;
    }

    .main-dashboard .live-dashboard-panel-count {
        margin-left: 0;
        text-align: left;
    }
}

/* Fleet accordions (History and Inspections under a hire agreement): a header that opens and closes its body with a
   Bootstrap-accordion-like slide. The body's height eases between 0 and its content (grid rows 0fr -> 1fr). */
.fleet-accordion {
    margin-top: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    overflow: hidden;
}

.fleet-accordion-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 0;
    background: #f8fafc;
    color: #1e293b;
    font-size: 0.85rem;
    text-align: left;
    transition: background-color 0.15s ease;
}

    .fleet-accordion-toggle:hover {
        background: #f1f5f9;
    }

    .fleet-accordion-toggle:focus-visible {
        outline: 2px solid #94a3b8;
        outline-offset: -2px;
    }

.fleet-accordion.is-open > .fleet-accordion-toggle {
    border-bottom: 1px solid #e2e8f0;
    background: #fef2f2;
}

/* Boxed in slate like the card titles' icons, so every section icon on the page looks the same. */
.fleet-accordion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 0.4rem;
    background: #eef2f6;
    color: #475569;
    font-size: 0.7rem;
}

.fleet-accordion-title {
    font-weight: 600;
}

.fleet-accordion-note {
    color: #64748b;
    font-size: 0.78rem;
}

.fleet-accordion-chevron {
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

/* Only this accordion's own chevron: an accordion inside an open one keeps its own state. */
.fleet-accordion.is-open > .fleet-accordion-toggle .fleet-accordion-chevron {
    transform: rotate(-180deg);
}

.fleet-accordion-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}

.fleet-accordion.is-open > .fleet-accordion-body {
    grid-template-rows: 1fr;
}

.fleet-accordion-inner {
    min-height: 0;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .fleet-accordion-body,
    .fleet-accordion-chevron {
        transition: none;
    }
}

/* An empty Fleet card (no transactions, no scheduled payments): centred, with an icon, a title and a short hint. */
.fleet-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    text-align: center;
}

.fleet-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.6rem;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 1rem;
}

.fleet-empty-title {
    margin: 0 0 0.25rem;
    color: #1e293b;
    font-size: 0.95rem;
    font-weight: 600;
}

.fleet-empty-text {
    max-width: 28rem;
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
}

/* Fleet public routes: each has its own colour, used for its plate and in the run-mix bar.
   The ink is the plate's text colour; the keyline is its inner border. None is yellow, so a route plate is never mistaken for the registration plate beside it.
   Private runs, the ordinary case, have a colour too (the run-mix bar): a deep teal, clear of the four route colours. */
:root {
    --run-private: #0f766e;
    --route-x80: #c2410c;
    --route-x80-ink: #ffffff;
    --route-x80-keyline: rgba(255, 255, 255, 0.55);
    --route-x6: #be185d;
    --route-x6-ink: #ffffff;
    --route-x6-keyline: rgba(255, 255, 255, 0.55);
    --route-dc1: #1d4ed8;
    --route-dc1-ink: #ffffff;
    --route-dc1-keyline: rgba(255, 255, 255, 0.55);
}

/* The planner's hint beside an inspection date (InspectionPlanHint): amber when nothing is planned for it, red when it
   is planned too late or the plan has gone by, green when it is booked in time. */
.plan-icon.is-warn { color: #d97706; }
.plan-icon.is-bad { color: #dc2626; }
.plan-icon.is-ok { color: #0f766e; }
.plan-icon.is-quiet { color: #64748b; }
