/* =========================================================
   THEME TOKENS & ROOT VARIABLES
   ========================================================= */
:root {
    --app-font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Roboto, Arial, "Source Sans Pro", "Segoe UI", sans-serif;

    /* Bootstrap core theme vars */
    --bs-primary: #d66f1f;
    --bs-primary-rgb: 214, 111, 31;
    --bs-body-font-family: var(--app-font-family);

    --bs-secondary: #53606a;
    --bs-secondary-rgb: 83, 96, 106;

    --bs-body-bg: #f2f6f7;
    --bs-body-color: #18242b;

    --bs-link-color: #b65317;
    --bs-link-hover-color: #7d3a10;

    /* Brand vars */
    --brand-navy: #1c252b;
    --brand-navy-soft: #e8eff2;
    --brand-navy-light: #cbd8df;
    --brand-accent: #d66f1f;

    --card-border-light: #ccd9df;
    --theme-primary-hover: #aa5316;
    --theme-secondary-hover: #394650;

    /* Theme tokens – default = light mode */
    color-scheme: light;
    --theme-bg: #f2f6f7;
    --theme-bg-top: #f9fcfd;
    --theme-bg-bottom: #e9f1f3;
    --theme-surface: #ffffff;
    --theme-text: #18242b;
    --theme-muted: #62717a;

    --theme-card-header-bg: #f8fbfc;
    --theme-card-header-bg2: var(--brand-navy-soft);

    --theme-border: #ccd9df;
    --theme-navbar-bg: var(--brand-navy);
    --theme-subtle: #edf3f5;
    --theme-row-alt: #f7fafb;
    --theme-row-hover: #edf4f6;
    --theme-table-head-bg: #e7eff2;
    --theme-table-head-text: #1d2d35;
    --theme-table-border: #d2dde3;
}

/* Dark Mode overrides */
:root.dark-mode {
    color-scheme: dark;

    --bs-primary: #d98b3a;
    --bs-primary-rgb: 217, 139, 58;
    --bs-secondary: #a9a39a;
    --bs-secondary-rgb: 169, 163, 154;
    --bs-body-bg: #171717;
    --bs-body-color: #eee9df;
    --bs-link-color: #e0a15e;
    --bs-link-hover-color: #f0bc7d;

    --brand-navy: #121212;
    --brand-navy-soft: #242424;
    --brand-navy-light: #3b3935;
    --brand-accent: #d98b3a;
    --theme-primary-hover: #be7128;
    --theme-secondary-hover: #8e877e;

    --theme-bg: #171717;
    --theme-bg-top: #1b1b1b;
    --theme-bg-bottom: #141414;
    --theme-surface: #222120;
    --theme-text: #eee9df;
    --theme-muted: #aca59c;

    --theme-card-header-bg: #222120;
    --theme-card-header-bg2: #2b2926;

    --theme-border: #3b3935;
    --theme-navbar-bg: #111111;
    --theme-subtle: #2a2927;
    --theme-row-alt: #262522;
    --theme-row-hover: #312e2a;
    --theme-table-head-bg: #302e2b;
    --theme-table-head-text: #f4efe7;
    --theme-table-border: #45413a;
}

/* =========================================================
   BASE LAYOUT
   ========================================================= */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--app-font-family);
    background:
        linear-gradient(180deg, var(--theme-bg-top) 0%, var(--theme-bg) 48%, var(--theme-bg-bottom) 100%);
    background-color: var(--theme-bg);
    color: var(--theme-text);
}

.uat-environment-marker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.75rem;
    flex: 0 0 auto;
    vertical-align: middle;
}

.uat-environment-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 10px;
    border: 2px solid rgba(255, 255, 255, 0.86);
    border-radius: 6px;
    background: #c1121f;
    box-shadow: 0 8px 18px rgba(52, 6, 10, 0.28);
    color: #ffffff;
    font-family: var(--app-font-family);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    pointer-events: none;
    user-select: none;
}

.uat-environment-repeat {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.uat-environment-repeat span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 3px 6px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    background: rgba(193, 18, 31, 0.84);
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    pointer-events: none;
    user-select: none;
}

.uat-environment-marker--fallback {
    position: fixed;
    top: 10px;
    left: 12px;
    z-index: 2147483000;
}

@media (max-width: 575.98px) {
    .uat-environment-marker {
        margin-left: 0.5rem;
    }

    .uat-environment-badge {
        min-height: 26px;
        padding: 7px 10px;
        font-size: 0.75rem;
    }

    .uat-environment-repeat {
        display: none;
    }
}

@media print {
    .uat-environment-marker,
    .uat-environment-badge {
        display: none !important;
    }
}

main {
    flex: 1 0 auto;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Keep dashboard area tall so cards can stretch */
#dashboard-content {
    min-height: calc(100vh - 80px);
}

/* Global link styles */
a { color: var(--bs-link-color); }
a:hover {
    color: var(--bs-link-hover-color);
    text-decoration: underline;
}

.breadcrumb a,
.breadcrumb a:hover,
.breadcrumb a:focus {
    text-decoration: none;
}

.breadcrumb {
    --bs-breadcrumb-divider-color: var(--theme-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--theme-muted) !important;
    opacity: 0.9;
}

.migrated-omnia-page {
    color: var(--theme-text);
}

.migrated-omnia-page .page-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0;
}

.migrated-omnia-page > .d-flex:first-child h1.page-title {
    display: none;
}

.migrated-omnia-page .bg-dark {
    background: var(--theme-card-header-bg2) !important;
    color: var(--theme-text) !important;
}

.migrated-omnia-page .btn-warning {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--theme-primary-hover);
    --bs-btn-hover-border-color: var(--theme-primary-hover);
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #fff !important;
}

.migrated-omnia-page a.action-icon {
    color: var(--bs-primary) !important;
    text-decoration: none !important;
}

.migrated-omnia-page .clickable-row,
.migrated-omnia-page .inupdate,
.icon-btn {
    cursor: pointer;
}

.migrated-omnia-page .input-group-append {
    display: flex;
}

.omnia-ported-page {
    min-height: calc(100vh - 112px);
}

.omnia-ported-page .top-search-bar,
.omnia-ported-page [class*="col-"]:has(.top-search-bar),
.reports-ported-page .top-search-bar,
.reports-ported-page [class*="col-"]:has(.top-search-bar) {
    display: none !important;
}

.omnia-ported-page .no-link-style,
.omnia-ported-page .no-link-style:hover,
.omnia-ported-page .no-link-style:focus {
    color: inherit;
    text-decoration: none;
}

.omnia-ported-page .card {
    border-color: var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
}

.omnia-ported-page .card-header,
.omnia-ported-page .modal-header {
    border-bottom-color: var(--theme-border);
    background: var(--theme-card-header-bg);
    color: var(--theme-text);
}

.omnia-ported-page .modal-content {
    border-color: var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
}

.modal-header .modal-title {
    margin-bottom: 0;
}

.modal-header .close,
.modal-header .modal-close-btn {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    margin-left: auto;
    text-decoration: none;
}

.modal-header .modal-close-btn {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0 !important;
    border-radius: 6px !important;
}

.omnia-ported-page .label,
.omnia-ported-page .ml-form-label {
    display: block;
    width: 100%;
    color: var(--bs-primary);
    font-size: 0.88rem;
    font-weight: 700;
}

.omnia-ported-page .field,
.omnia-ported-page .ml-form-value {
    display: block;
    width: 100%;
    margin-bottom: 0.35rem;
    color: var(--theme-text);
}

.omnia-ported-page .lumealog-incident-page .label,
.lumealog-ported-page.lumealog-incident-page .label {
    display: inline !important;
    width: auto !important;
}

.omnia-ported-page .lumealog-incident-page .editIncidentModalLink,
.lumealog-ported-page.lumealog-incident-page .editIncidentModalLink {
    display: inline-flex !important;
    align-items: center;
    margin-left: 0.35rem;
    vertical-align: baseline;
}

.omnia-ported-page .bi-card-text:hover,
.omnia-ported-page .text-info-link {
    cursor: pointer;
}

.omnia-ported-page .text-info-link {
    color: var(--bs-primary);
    text-decoration: underline;
}

.omnia-ported-page .text-info-link:hover {
    color: var(--bs-link-hover-color);
}

.omnia-ported-page .input_container {
    position: relative;
}

.omnia-ported-page .input_container ul {
    width: min(360px, 100%);
    border: 1px solid var(--theme-border);
    position: absolute;
    z-index: 1050;
    background: var(--theme-surface);
    color: var(--theme-text);
    list-style: none;
}

.omnia-ported-page .input_container ul li {
    padding: 0.25rem 0.4rem;
}

.omnia-ported-page .input_container ul li:hover {
    background: var(--theme-subtle);
}

.omnia-ported-page .auto-list-header {
    background-color: var(--bs-primary);
    color: #fff;
}

.omnia-ported-page a.list-close-link,
.omnia-ported-page a.list-close-link:visited,
.omnia-ported-page a.list-close-link:hover,
.omnia-ported-page a.list-close-link:active {
    color: #fff;
    text-decoration: underline;
    font-weight: 400;
}

.omnia-ported-page .selected,
.omnia-ported-page .table .selected td {
    background-color: rgba(var(--bs-primary-rgb), 0.14) !important;
}

.omnia-ported-page .select2-container--default .select2-selection--single,
.omnia-ported-page .select2-container--default .select2-selection--multiple {
    border: 1px solid var(--theme-border) !important;
    border-radius: 6px;
    background-color: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

.omnia-ported-page .select2-container--default .select2-selection--single .select2-selection__rendered,
.omnia-ported-page .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    color: var(--theme-text) !important;
}

.select2-dropdown {
    z-index: 2000;
    border-color: var(--theme-border) !important;
    background-color: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border-color: var(--theme-border) !important;
    background-color: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

.select2-container--default .select2-results__option--selected,
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

.powerplan-page .powerplan-column {
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 0.8rem;
}

.powerplan-page .powerplan-header {
    border-bottom: 2px solid var(--theme-border);
    padding-bottom: 0.35rem;
    margin-bottom: 0.65rem;
    color: var(--bs-primary);
    font-size: 1.15rem;
    font-weight: 800;
}

.powerplan-page .powerplan-row {
    padding-top: 0.25rem;
}

.powerplan-page .powerplan-train-code {
    display: inline-block;
    width: 60px;
    font-weight: 800;
}

.powerplan-page .powerplan-time-terminal {
    display: inline-block;
    min-width: 200px;
}

.powerplan-page .powerplan-locos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.powerplan-page .powerplan-loco-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 1px 6px;
    background: rgba(47, 125, 70, 0.18);
    color: #2f7d46;
    font-size: 0.85rem;
    font-weight: 800;
}

.powerplan-page .powerplan-loco-tag.unconfirmed {
    background: var(--theme-subtle);
    color: var(--theme-muted);
}

.powerplan-page .powerplan-icon {
    font-size: 0.8rem;
}

.powerplan-page .powerplan-refuel-icon {
    font-size: 1.1rem;
}

.powerplan-page .powerplan-notes {
    margin-top: 5px;
    color: #bd2f2f;
    font-size: 0.85rem;
}

.powerplan-page .powerplan-cancelled {
    color: #bd2f2f !important;
    text-decoration: line-through !important;
}

.powerplan-page .powerplan-last-updated {
    font-size: 0.6em;
}

.maintenance-stat-value {
    font-size: 3.5rem;
    line-height: 1;
}

.maintenance-log-detail .reported {
    color: var(--theme-muted);
}

.maintenance-log-detail .loop-column {
    margin-bottom: 0.65rem;
}

.maintenance-log-detail .blink {
    animation: maintenance-blinker 0.8s linear infinite;
}

@keyframes maintenance-blinker {
    50% {
        opacity: 0;
    }
}

.maintenance-log-detail #count_message {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0 0.2rem;
    border-radius: 4px;
    background-color: var(--bs-primary);
    color: #fff;
}

.maintenance-photo-thumb {
    width: 140px;
    height: 100px;
    overflow: hidden;
}

.maintenance-photo-thumb img {
    width: 140px;
    height: 100px;
    object-fit: cover;
}

@media print {
    body.has-side-nav .lumea-side-nav,
    body.has-side-nav .navbar,
    body.has-side-nav .mobile-search-panel,
    .maintenance-log-detail .btn,
    .maintenance-log-detail .breadcrumb,
    .maintenance-log-detail .top-search-bar,
    .lumea-footer {
        display: none !important;
    }

    body.has-side-nav main.container-fluid {
        padding-left: 0 !important;
    }
}

:root.dark-mode .powerplan-page .powerplan-loco-tag {
    color: #8fd8a3;
}

:root.dark-mode .powerplan-page .powerplan-notes,
:root.dark-mode .powerplan-page .powerplan-cancelled {
    color: #ff8a8a !important;
}

.migrated-omnia-page .input-group-append .input-group-text,
.migrated-omnia-page .input-group-append .btn {
    border-radius: 0;
}

.day-selected {
    background-color: #228B22;
    color: #fff;
}

.day-unselected,
.text-red {
    color: #cc4b16 !important;
}

.day-unselected {
    background-color: #cb4b16;
    color: #fff !important;
}

.day-table {
    text-align: center;
}

div.hidden {
    display: none;
}

.clickable-row {
    cursor: pointer;
}

.ml-3 {
    margin-left: 1rem !important;
}

#map_overview_area {
    min-height: calc(100vh - 190px);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--theme-surface) !important;
}

#map {
    min-height: calc(100vh - 190px);
    width: 100%;
}

/* Smaller text utility for dense content */
.text-xs { font-size: 0.8rem; }

/* Muted text */
.text-muted,
small,
.form-text {
    color: var(--theme-muted) !important;
}

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: var(--theme-navbar-bg) !important;
    border-bottom: 1px solid rgba(0,0,0,0.22);
}

.navbar .navbar-brand,
.navbar .nav-link,
.navbar .navbar-text {
    color: #ffffff !important;
}

.navbar .navbar-brand {
    margin-right: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.navbar .nav-link.active {
    color: var(--brand-accent) !important;
    font-weight: 600;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #ffd6a3 !important;
}

.navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.navbar .navbar-toggler-icon { filter: invert(1); }

/* =========================================================
   MOBILE SEARCH PANEL (lightweight, no modal)
   ========================================================= */
.mobile-search-panel {
    position: sticky;
    top: 56px;              /* matches navbar height */
    z-index: 1035;          /* below navbar (1040), above content */
    background-color: var(--theme-navbar-bg);
    border-bottom: 1px solid rgba(0,0,0,0.15);
}

/* Optional: slightly tighter on mobile */
.mobile-search-panel .input-group {
    height: 34px;
}


/* =========================================================
   BUTTONS / BADGES
   ========================================================= */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--theme-primary-hover);
    --bs-btn-hover-border-color: var(--theme-primary-hover);
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--theme-primary-hover);
    --bs-btn-active-border-color: var(--theme-primary-hover);
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--theme-primary-hover) !important;
    border-color: var(--theme-primary-hover) !important;
}

.btn-outline-primary {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--bs-primary);
    --bs-btn-active-border-color: var(--bs-primary);
    --bs-btn-disabled-color: var(--bs-primary);
    --bs-btn-disabled-border-color: var(--bs-primary);
    color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active,
.show > .btn-outline-primary.dropdown-toggle {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #fff !important;
}

.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #fff !important;
}

.btn-link,
.text-primary {
    color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity, 1)) !important;
}

.btn-link:hover,
.btn-link:focus {
    color: var(--bs-link-hover-color) !important;
}

.bg-primary {
    background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important;
}

.border-primary {
    border-color: rgba(var(--bs-primary-rgb), var(--bs-border-opacity, 1)) !important;
}

.link-primary,
.page-link {
    color: var(--bs-primary) !important;
}

.page-link:hover,
.page-link:focus {
    color: var(--bs-link-hover-color) !important;
}

.active > .page-link,
.page-link.active,
.dropdown-item.active,
.dropdown-item:active,
.nav-pills .nav-link.active,
.list-group-item.active {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #fff !important;
}

.form-check-input:checked {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.form-check-input:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.56) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.16) !important;
}

.btn-secondary {
    background-color: var(--bs-secondary) !important;
    border-color: var(--bs-secondary) !important;
}
.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--theme-secondary-hover) !important;
    border-color: var(--theme-secondary-hover) !important;
}

.btn-light {
    --bs-btn-bg: var(--theme-surface);
    --bs-btn-border-color: var(--theme-border);
    --bs-btn-color: var(--theme-text);
    --bs-btn-hover-bg: var(--theme-subtle);
    --bs-btn-hover-border-color: rgba(var(--bs-primary-rgb), 0.38);
    --bs-btn-hover-color: var(--theme-text);
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

.btn-outline-secondary {
    color: var(--theme-text);
    border-color: var(--theme-border);
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: var(--theme-subtle);
    color: var(--theme-text);
}

:root.dark-mode .btn-outline-dark {
    color: var(--theme-text);
    border-color: #57534d;
}

:root.dark-mode .btn-outline-dark:hover,
:root.dark-mode .btn-outline-dark:focus {
    background-color: var(--theme-subtle);
    color: var(--theme-text);
}

.badge.bg-primary { background-color: var(--bs-primary) !important; }
.badge.bg-secondary { background-color: var(--bs-secondary) !important; }

.bg-light {
    background-color: var(--theme-subtle) !important;
    color: var(--theme-text) !important;
}

.border-light {
    border-color: var(--theme-border) !important;
}

/* =========================================================
   CARDS
   ========================================================= */
.card {
    display: block;
    min-height: 0;
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(30, 54, 65, 0.08);
}

:root.dark-mode .card {
    box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}

.card-body {
    flex: none;
    min-height: 0;
    max-height: none;
    overflow-y: visible;
}

.card-header {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0)),
        var(--theme-card-header-bg) !important;
    color: var(--theme-text) !important;
    font-weight: 600;
    border-bottom: 1px solid var(--theme-border);
    padding: 0.6rem 1rem;
}

:root.dark-mode .card-header {
    background: var(--theme-card-header-bg) !important;
}

.card-header .small { opacity: 0.9; }

.card-footer {
    background-color: transparent;
    border-top: 0;
    padding: 0.5rem 1rem 0.75rem;
}

.dashboard-row { align-items: stretch; }

/* =========================================================
   TABLES
   ========================================================= */
.table-sm th,
.table-sm td {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.table td,
.table th {
    font-size: 0.85rem !important;
    padding: 0.2rem 0.3rem !important;
}

.table {
    --bs-table-bg: var(--theme-surface);
    --bs-table-color: var(--theme-text);
    --bs-table-border-color: var(--theme-table-border);
    --bs-table-striped-bg: var(--theme-row-alt);
    --bs-table-striped-color: var(--theme-text);
    --bs-table-hover-bg: var(--theme-row-hover);
    --bs-table-hover-color: var(--theme-text);
    color: var(--theme-text) !important;
    border-color: var(--theme-table-border) !important;
}

.table > :not(caption) > * > * {
    border-color: var(--theme-table-border) !important;
    color: var(--theme-text) !important;
}

.table thead th {
    background: var(--theme-table-head-bg) !important;
    color: var(--theme-table-head-text) !important;
    border-color: var(--theme-table-border) !important;
    box-shadow: inset 0 -1px 0 rgba(27, 47, 57, 0.12);
    vertical-align: middle !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: var(--theme-row-alt) !important;
    background-color: var(--theme-row-alt) !important;
    color: var(--theme-text) !important;
}

.table-striped > tbody > tr:nth-of-type(even) > * {
    --bs-table-accent-bg: var(--theme-surface) !important;
    background-color: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: var(--theme-row-hover) !important;
    background-color: var(--theme-row-hover) !important;
    color: var(--theme-text) !important;
}

.table > :not(caption) > * > .td-accent-left-red {
    border-left-color: #eb4034 !important;
    border-left-style: solid !important;
    border-left-width: 1px !important;
    box-shadow: inset 8px 0 0 #eb4034;
    padding-left: 0.85rem !important;
}

.table > :not(caption) > * > .td-accent-right-red {
    border-right-color: #eb4034 !important;
    border-right-style: solid !important;
    border-right-width: 1px !important;
    box-shadow: inset -8px 0 0 #eb4034;
    padding-right: 0.85rem !important;
}

.table > :not(caption) > * > .td-accent-left-amber {
    border-left-color: darkorange !important;
    border-left-style: solid !important;
    border-left-width: 1px !important;
    box-shadow: inset 8px 0 0 darkorange;
    padding-left: 0.85rem !important;
}

.table > :not(caption) > * > .td-accent-right-amber {
    border-right-color: darkorange !important;
    border-right-style: solid !important;
    border-right-width: 1px !important;
    box-shadow: inset -8px 0 0 darkorange;
    padding-right: 0.85rem !important;
}

.table > :not(caption) > * > .td-accent-left-green {
    border-left-color: #039304 !important;
    border-left-style: solid !important;
    border-left-width: 1px !important;
    box-shadow: inset 8px 0 0 #039304;
    padding-left: 0.85rem !important;
}

.table > :not(caption) > * > .td-accent-right-green {
    border-right-color: #039304 !important;
    border-right-style: solid !important;
    border-right-width: 1px !important;
    box-shadow: inset -8px 0 0 #039304;
    padding-right: 0.85rem !important;
}

.dataTables_wrapper,
.dt-container,
.dataTables_info,
.dt-info,
.dataTables_length,
.dt-length,
.dataTables_filter,
.dt-search {
    color: var(--theme-muted) !important;
}

.dataTables_wrapper,
.dt-container {
    max-width: 100%;
}

.dataTables_wrapper > .row,
.dt-container > .row {
    --bs-gutter-x: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.dataTables_wrapper > .row > [class*="col-"],
.dt-container > .row > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.dataTables_wrapper .table-responsive-sm,
.dt-container .table-responsive-sm {
    max-width: 100%;
}

.dataTables_wrapper table.dataTable,
.dt-container table.dataTable {
    max-width: 100% !important;
}

.dataTables_wrapper .dataTables_filter input,
.dt-container .dt-search input,
.dataTables_wrapper .dataTables_length select,
.dt-container .dt-length select {
    background: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

.dt-button,
button.dt-button,
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dt-container .dt-paging .dt-paging-button {
    border: 1px solid var(--theme-border) !important;
    border-radius: 6px !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    box-shadow: none !important;
}

.dt-buttons .dt-button.btn-warning,
.dt-buttons button.dt-button.btn-warning,
.dt-buttons a.dt-button.btn-warning,
.dt-buttons input.dt-button.btn-warning,
.dataTables_wrapper .dt-buttons .dt-button.btn-warning,
.dt-container .dt-buttons .dt-button.btn-warning {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--theme-primary-hover);
    --bs-btn-hover-border-color: var(--theme-primary-hover);
    background: var(--bs-primary) !important;
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #fff !important;
}

.dt-buttons .dt-button.btn-warning:hover,
.dt-buttons button.dt-button.btn-warning:hover,
.dt-buttons a.dt-button.btn-warning:hover,
.dt-buttons input.dt-button.btn-warning:hover,
.dataTables_wrapper .dt-buttons .dt-button.btn-warning:hover,
.dt-container .dt-buttons .dt-button.btn-warning:hover {
    background: var(--theme-primary-hover) !important;
    background-color: var(--theme-primary-hover) !important;
    border-color: var(--theme-primary-hover) !important;
    color: #fff !important;
}

.dt-button:hover,
button.dt-button:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dt-container .dt-paging .dt-paging-button:hover {
    background: var(--theme-subtle) !important;
    border-color: rgba(var(--bs-primary-rgb),0.48) !important;
    color: var(--theme-text) !important;
}

.dataTables_wrapper .dataTables_paginate .pagination,
.dt-container .dt-paging .pagination {
    gap: 0.2rem;
    margin-bottom: 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.page-item,
.dt-container .dt-paging .dt-paging-button.page-item {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.page-item:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.page-item:focus,
.dt-container .dt-paging .dt-paging-button.page-item:hover,
.dt-container .dt-paging .dt-paging-button.page-item:focus {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button:not(.page-item),
.dt-container .dt-paging .page-link,
.dt-container .dt-paging .dt-paging-button:not(.page-item) {
    min-width: 1.8rem !important;
    min-height: 1.8rem !important;
    padding: 0.22rem 0.48rem !important;
    font-size: 0.82rem !important;
    line-height: 1.2 !important;
}

.dataTables_wrapper .dataTables_paginate .page-link,
.dt-container .dt-paging .page-link {
    border-color: var(--theme-border) !important;
    border-radius: 6px !important;
    background: var(--theme-surface) !important;
    color: var(--bs-primary) !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .page-link:hover,
.dataTables_wrapper .dataTables_paginate .page-link:focus,
.dt-container .dt-paging .page-link:hover,
.dt-container .dt-paging .page-link:focus {
    border-color: rgba(var(--bs-primary-rgb),0.48) !important;
    background: var(--theme-subtle) !important;
    color: var(--theme-primary-hover) !important;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dt-container .dt-paging .dt-paging-button.current,
.dt-container .dt-paging .page-item.active .page-link {
    border-color: var(--bs-primary) !important;
    background: var(--bs-primary) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
.dt-container .dt-paging .page-item.disabled .page-link {
    color: var(--theme-muted) !important;
    opacity: 0.72;
}

table.dataTable thead .sorting::before,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting_asc_disabled::before,
table.dataTable thead .sorting_desc_disabled::before {
    top: calc(50% - 0.32rem) !important;
    bottom: auto !important;
    line-height: 1 !important;
    transform: translateY(-50%);
}

table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after,
table.dataTable thead .sorting_asc_disabled::after,
table.dataTable thead .sorting_desc_disabled::after {
    top: calc(50% + 0.32rem) !important;
    bottom: auto !important;
    line-height: 1 !important;
    transform: translateY(-50%);
}

body.lumea-page table.dataTable thead th.sorting::before,
body.lumea-page table.dataTable thead th.sorting_asc::before,
body.lumea-page table.dataTable thead th.sorting_desc::before,
body.lumea-page table.dataTable thead th.sorting_asc_disabled::before,
body.lumea-page table.dataTable thead th.sorting_desc_disabled::before {
    top: calc(50% - 0.32rem) !important;
    bottom: auto !important;
    line-height: 1 !important;
    transform: translateY(-50%);
}

body.lumea-page table.dataTable thead th.sorting::after,
body.lumea-page table.dataTable thead th.sorting_asc::after,
body.lumea-page table.dataTable thead th.sorting_desc::after,
body.lumea-page table.dataTable thead th.sorting_asc_disabled::after,
body.lumea-page table.dataTable thead th.sorting_desc_disabled::after {
    top: calc(50% + 0.32rem) !important;
    bottom: auto !important;
    line-height: 1 !important;
    transform: translateY(-50%);
}

.omnia-ported-page table.dataTable thead th:has(.select2-container),
.reports-ported-page table.dataTable thead th:has(.select2-container) {
    padding-right: 0.55rem !important;
}

.omnia-ported-page table.dataTable thead th:has(.select2-container)::before,
.omnia-ported-page table.dataTable thead th:has(.select2-container)::after,
.reports-ported-page table.dataTable thead th:has(.select2-container)::before,
.reports-ported-page table.dataTable thead th:has(.select2-container)::after {
    display: none !important;
    content: "" !important;
    opacity: 0 !important;
}

.omnia-ported-page table.dataTable thead th .select2-container,
.reports-ported-page table.dataTable thead th .select2-container {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
}

.omnia-ported-page table.dataTable thead th .select2-container--default .select2-selection--multiple,
.reports-ported-page table.dataTable thead th .select2-container--default .select2-selection--multiple {
    display: flex;
    align-items: center;
    min-height: 2.15rem !important;
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    padding: 0.22rem 1.6rem 0.22rem 0.5rem !important;
}

.omnia-ported-page table.dataTable thead th .select2-container--default .select2-selection--multiple::before,
.reports-ported-page table.dataTable thead th .select2-container--default .select2-selection--multiple::before {
    top: 50% !important;
    right: 0.55rem !important;
    border-top-color: var(--theme-muted) !important;
    transform: translateY(-50%);
}

.omnia-ported-page table.dataTable thead th .select2-container--default .select2-selection--multiple .select2-selection__rendered,
.reports-ported-page table.dataTable thead th .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    width: 100% !important;
}

.omnia-ported-page table.dataTable thead th .select2-container .select2-search--inline .select2-search__field,
.reports-ported-page table.dataTable thead th .select2-container .select2-search--inline .select2-search__field {
    color: var(--theme-text) !important;
    width: 100% !important;
    max-width: 100% !important;
}

.omnia-ported-page table.dataTable thead th .select2-container .select2-search--inline .select2-search__field::placeholder,
.omnia-ported-page table.dataTable thead th .select2-container .select2-search--inline .select2-search__field::-webkit-input-placeholder,
.reports-ported-page table.dataTable thead th .select2-container .select2-search--inline .select2-search__field::placeholder,
.reports-ported-page table.dataTable thead th .select2-container .select2-search--inline .select2-search__field::-webkit-input-placeholder {
    color: var(--theme-text) !important;
    opacity: 0.92 !important;
}

body.lumea-page table.dataTable thead th:has(.select2-container) {
    padding-right: 0.55rem !important;
}

body.lumea-page table.dataTable thead th:has(.select2-container)::before,
body.lumea-page table.dataTable thead th:has(.select2-container)::after {
    display: none !important;
    content: "" !important;
    opacity: 0 !important;
}

.omnia-ported-page table.dataTable thead th:has(> select.form-select),
.reports-ported-page table.dataTable thead th:has(> select.form-select),
body.lumea-page table.dataTable thead th:has(> select.form-select) {
    padding-right: 0.55rem !important;
}

.omnia-ported-page table.dataTable thead th:has(> select.form-select)::before,
.omnia-ported-page table.dataTable thead th:has(> select.form-select)::after,
.reports-ported-page table.dataTable thead th:has(> select.form-select)::before,
.reports-ported-page table.dataTable thead th:has(> select.form-select)::after,
body.lumea-page table.dataTable thead th:has(> select.form-select)::before,
body.lumea-page table.dataTable thead th:has(> select.form-select)::after {
    display: none !important;
    content: "" !important;
    opacity: 0 !important;
}

.omnia-ported-page table.dataTable thead th > select.form-select,
.reports-ported-page table.dataTable thead th > select.form-select,
body.lumea-page table.dataTable thead th > select.form-select {
    min-width: 0;
    width: 100%;
    margin-top: 0.25rem;
    padding-right: 2rem;
}

body.lumea-page table.dataTable thead th .select2-container {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
}

body.lumea-page table.dataTable thead th .select2-container--default .select2-selection--multiple {
    display: flex;
    align-items: center;
    min-height: 2.15rem !important;
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    padding: 0.22rem 1.6rem 0.22rem 0.5rem !important;
}

body.lumea-page table.dataTable thead th .select2-container--default .select2-selection--multiple::before {
    top: 50% !important;
    right: 0.55rem !important;
    border-top-color: var(--theme-muted) !important;
    transform: translateY(-50%);
}

body.lumea-page table.dataTable thead th .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    width: 100% !important;
}

body.lumea-page table.dataTable thead th .select2-container .select2-search--inline .select2-search__field {
    color: var(--theme-text) !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.lumea-page table.dataTable thead th .select2-container .select2-search--inline .select2-search__field::placeholder,
body.lumea-page table.dataTable thead th .select2-container .select2-search--inline .select2-search__field::-webkit-input-placeholder {
    color: var(--theme-text) !important;
    opacity: 0.92 !important;
}

.plan-ported-page .table,
.plan-ported-page table.dataTable {
    --bs-table-bg: #fff;
    --bs-table-color: #212529;
    --bs-table-striped-bg: #f7f7f7;
    --bs-table-striped-color: #212529;
    background-color: #fff;
    color: #212529;
}

.plan-ported-page table.dataTable thead th {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.plan-ported-page .plan-hub-panel {
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(var(--bs-primary-rgb), 0.04), transparent 34%),
        var(--theme-surface) !important;
    border: 1px solid var(--theme-border);
}

.plan-ported-page .plan-list-column {
    min-width: 0;
}

.plan-ported-page .plan-list-heading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2rem;
    margin: 0.65rem 0;
    color: var(--bs-primary);
    font-size: 1.05rem;
    font-weight: 800;
}

.plan-ported-page .plan-heading-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0 !important;
    border-radius: 6px !important;
}

.plan-ported-page .plan-list-card {
    overflow: hidden;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface);
    box-shadow: 0 10px 24px rgba(18, 24, 28, 0.08);
}

.plan-ported-page .plan-list {
    margin: 0;
}

.plan-ported-page .plan-list .list-group-item,
.plan-ported-page .plan-list-item {
    min-height: 2.65rem;
    gap: 1rem;
    border-color: var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
    font-weight: 700;
    line-height: 1.25;
    padding: 0.68rem 1rem;
    text-decoration: none;
}

.plan-ported-page .plan-list-item:hover,
.plan-ported-page .plan-list-item:focus {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--theme-text);
    text-decoration: none;
}

.plan-ported-page .plan-list-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.plan-ported-page .plan-list-meta {
    flex: 0 0 auto;
}

.plan-ported-page .plan-date-badge {
    border: 1px solid rgba(var(--bs-primary-rgb), 0.34);
    border-radius: 6px;
    background: rgba(var(--bs-primary-rgb), 0.16) !important;
    color: var(--bs-primary);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.28rem 0.5rem;
    white-space: nowrap;
}

.plan-ported-page .plan-lock-icon {
    color: var(--theme-muted);
}

.plan-ported-page .plan-section-header {
    display: flex;
    align-items: center;
    min-height: 2.35rem;
    border-bottom: 1px solid var(--theme-border);
    background: var(--theme-card-header-bg);
    color: var(--bs-primary);
    font-size: 0.9rem;
    font-weight: 800;
    padding: 0.55rem 0.75rem;
}

.plan-ported-page .plan-list-toggle {
    border-top: 1px solid var(--theme-border);
    background: var(--theme-card-header-bg);
    color: var(--theme-muted);
    font-size: 0.85rem;
    padding: 0.55rem 0.75rem;
}

.plan-ported-page .plan-list-toggle .btn {
    border-radius: 6px !important;
    border-color: rgba(var(--bs-primary-rgb), 0.65);
    color: var(--bs-primary);
    font-weight: 700;
}

.plan-ported-page .plan-list-toggle .btn:hover,
.plan-ported-page .plan-list-toggle .btn:focus {
    background: var(--bs-primary);
    color: #fff;
}

:root.dark-mode .plan-ported-page .plan-hub-panel {
    background:
        linear-gradient(180deg, rgba(var(--bs-primary-rgb), 0.08), transparent 36%),
        #1f1e1c !important;
    border-color: #39352f;
}

:root.dark-mode .plan-ported-page .plan-list-card {
    border-color: #3d3932;
    background: #191817;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

:root.dark-mode .plan-ported-page .plan-list .list-group-item,
:root.dark-mode .plan-ported-page .plan-list-item {
    border-color: #3a3630;
    background: #181716;
    color: #f1ece5;
}

:root.dark-mode .plan-ported-page .plan-list-item:hover,
:root.dark-mode .plan-ported-page .plan-list-item:focus {
    background: #24211e;
}

:root.dark-mode .plan-ported-page .plan-section-header,
:root.dark-mode .plan-ported-page .plan-list-toggle {
    border-color: #3d3932;
    background: #25221f;
}

:root.dark-mode .plan-ported-page .plan-date-badge {
    background: rgba(var(--bs-primary-rgb), 0.24) !important;
    color: #fff3e6;
}

.lumeaplan-service-panel {
    margin: 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(var(--bs-primary-rgb), 0.06), transparent 68%),
        var(--theme-surface);
    color: var(--theme-text);
}

.lumeaplan-service-panel b,
.lumeaplan-service-panel label,
.lumeaplan-service-panel .custom-control-label {
    color: var(--theme-text) !important;
}

.lumeaplan-service-panel b {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.lumeaplan-service-panel label {
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.lumeaplan-service-panel .form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.15rem;
    margin-bottom: 0.2rem;
    padding-left: 0;
}

.lumeaplan-service-panel .form-check-input {
    flex: 0 0 auto;
    margin-top: 0;
    margin-left: 0;
}

.lumeaplan-service-panel .input-group {
    margin-bottom: 0.85rem;
}

.lumeaplan-service-panel .input-group-text {
    min-width: 2.65rem;
    justify-content: center;
}

:root.dark-mode .lumeaplan-service-panel {
    border-color: #46413a;
    background:
        linear-gradient(180deg, rgba(var(--bs-primary-rgb), 0.10), transparent 70%),
        #25231f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@media (max-width: 575.98px) {
    .plan-ported-page .plan-list .list-group-item,
    .plan-ported-page .plan-list-item {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 0.45rem;
    }

    .plan-ported-page .plan-list-meta {
        width: 100%;
        justify-content: flex-start;
    }
}

/* =========================================================
   FORM ELEMENTS
   ========================================================= */
.form-check-input {
    --bs-form-check-bg: var(--theme-surface);
    border: 1px solid var(--theme-border) !important;
    background-color: var(--theme-surface) !important;
    box-shadow: none !important;
}

.form-check-input:hover {
    border-color: rgba(var(--bs-primary-rgb),0.42) !important;
}

.form-check-input:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.16) !important;
}

.form-check-input:checked {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.form-check-input:disabled,
.form-check-input[disabled] {
    background-color: var(--theme-subtle) !important;
    border-color: var(--theme-border) !important;
    opacity: 0.65;
}

.form-control,
.form-select,
textarea.form-control {
    border-radius: 8px !important;
    padding: 0.25rem 0.45rem !important;
    border: 1px solid var(--theme-border) !important;
    background-color: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    box-shadow: none;
    transition: all .18s ease;
}

.form-control:hover,
.form-select:hover,
textarea.form-control:hover {
    border-color: rgba(var(--bs-primary-rgb),0.42) !important;
}

.form-control::placeholder,
textarea.form-control::placeholder {
    color: var(--theme-muted) !important;
    opacity: 0.78;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.16) !important;
}

:root.dark-mode .form-control,
:root.dark-mode .form-select,
:root.dark-mode textarea {
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

.input-group-text {
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--bs-primary) !important;
}

.input-group-text i,
.input-group-text .bi {
    color: inherit !important;
}

.btn-calendar {
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--bs-primary) !important;
}

.btn-calendar:hover,
.btn-calendar:focus {
    background-color: var(--theme-subtle) !important;
    border-color: rgba(var(--bs-primary-rgb), 0.42) !important;
    color: var(--bs-primary) !important;
}

.btn-calendar i,
.btn-calendar .bi {
    color: inherit !important;
}

/* Select2 needs explicit theming because its bundled/remote CSS hard-codes form colours. */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.select2-dropdown {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    box-shadow: none !important;
}

.select2-container--default .select2-selection--single {
    height: calc(1.5em + 0.5rem + 2px) !important;
}

.select2-container--default .select2-selection--multiple {
    min-height: calc(1.5em + 0.5rem + 2px) !important;
    padding: 0.15rem 1.75rem 0.2rem 0.45rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--theme-text) !important;
    line-height: calc(1.5em + 0.5rem) !important;
    padding-left: 0.45rem !important;
    padding-right: 2rem !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--theme-text) !important;
}

.select2-container .select2-search--inline .select2-search__field {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    color: var(--theme-text) !important;
    font-family: inherit !important;
    font-size: 0.95rem !important;
    line-height: 24px !important;
}

.select2-search__field::placeholder,
.select2-search__field::-webkit-input-placeholder,
.select2-container--default .select2-selection__placeholder {
    color: var(--theme-text) !important;
    opacity: 0.92 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 0.35rem !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

.select2-container--default .select2-results__option {
    color: var(--theme-text) !important;
}

.select2-container--default .select2-results__option--selected {
    background: var(--theme-subtle) !important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--bs-primary) !important;
    color: #fff !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    border-color: var(--theme-border) !important;
    background: var(--theme-subtle) !important;
    color: var(--theme-text) !important;
    line-height: 1.35 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    border-right-color: var(--theme-border) !important;
    color: var(--theme-muted) !important;
}

body.lumea-page .select2-container--default .select2-selection--single,
body.lumea-page .select2-container--default .select2-selection--multiple,
body.lumea-page .select2-dropdown {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

body.lumea-page .select2-container--default .select2-selection--single .select2-selection__rendered,
body.lumea-page .select2-container--default .select2-selection--multiple .select2-selection__rendered,
body.lumea-page .select2-container--default .select2-search--dropdown .select2-search__field,
body.lumea-page .select2-container--default .select2-results__option {
    color: var(--theme-text) !important;
}

body.lumea-page .select2-container--default .select2-results__option--selected:not(.select2-results__option--highlighted) {
    background: var(--theme-subtle) !important;
    color: var(--theme-text) !important;
}

body.lumea-page .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--bs-primary) !important;
    color: #fff !important;
}

body.lumea-page .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--theme-subtle) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

body.lumea-page .select2-container--bootstrap-5 .select2-dropdown .select2-results__option[aria-selected=true]:not(.select2-results__option--highlighted),
body.lumea-page .select2-container--bootstrap-5 .select2-dropdown .select2-results__option.select2-results__option--selected:not(.select2-results__option--highlighted) {
    background: var(--theme-subtle) !important;
    color: var(--theme-text) !important;
}

body.lumea-page .select2-container--bootstrap-5 .select2-dropdown .select2-results__option.select2-results__option--highlighted,
body.lumea-page .select2-container--bootstrap-5 .select2-dropdown .select2-results__option--highlighted[aria-selected] {
    background: var(--bs-primary) !important;
    color: #fff !important;
}

body.lumea-page .form-control-light {
    background: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

body.lumea-page .wcml .form-check {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-border);
    color: var(--theme-text) !important;
}

body.lumea-page .wcml .form-check label span {
    color: var(--theme-text) !important;
}

body.lumea-page .wcml .form-check input:checked + span {
    background: var(--bs-primary) !important;
    color: #fff !important;
}

/* Accent rule before labels */
.form-label {
    position: relative;
    padding-left: 8px;
    font-weight: 500;
}
.form-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    background-color: var(--bs-primary);
    border-radius: 1px;
}

.toast-item-wrapper {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-border);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    color: var(--theme-text) !important;
    padding: 1rem 2.25rem 1rem 1.25rem;
}

.toast-item-wrapper.fullscreen {
    min-width: min(520px, calc(100vw - 2rem)) !important;
    max-width: calc(100vw - 2rem);
}

.toast-item-wrapper.toast-bottom-right {
    right: 1rem !important;
    bottom: 1rem !important;
}

.toast-item-wrapper .toast-title {
    color: var(--bs-primary) !important;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.toast-item-wrapper .toast-message {
    color: var(--theme-text) !important;
    margin: 0;
}

.toast-item-wrapper .toast-close {
    color: var(--theme-text) !important;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    position: absolute;
    right: 0.75rem;
    top: 0.65rem;
}

.toast-item-wrapper .toast-progress {
    background: var(--bs-primary);
    bottom: 0;
    height: 3px;
    left: 0;
    position: absolute;
}

/* =========================================================
   DARK MODE – COMPONENT TEXT FIXES
   ========================================================= */
:root.dark-mode body { color: var(--theme-text) !important; }

:root.dark-mode .card,
:root.dark-mode .card-body,
:root.dark-mode .table,
:root.dark-mode .accordion-button,
:root.dark-mode .modal-content,
:root.dark-mode .modal-header,
:root.dark-mode .modal-body,
:root.dark-mode .modal-footer,
:root.dark-mode .nav-link,
:root.dark-mode .navbar-brand,
:root.dark-mode .navbar-text,
:root.dark-mode label,
:root.dark-mode .form-label,
:root.dark-mode .form-check-label {
    color: var(--theme-text) !important;
}

.accordion-item {
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
}

.accordion-button {
    background-color: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(var(--bs-primary-rgb),0.12) !important;
    color: var(--theme-text) !important;
    box-shadow: inset 0 -1px 0 var(--theme-border);
}

/* =========================================================
   SLIM SIDEBAR (NAMESPACED)
   ========================================================= */
.lumea-side-nav {
    position: fixed;
    top: 48px;
    bottom: 0;
    left: 0;
    width: 64px;
    background: var(--theme-navbar-bg);
    color: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1041;
    transition: width .25s ease, left .25s ease;

    /* allow footer to sit at bottom */
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.lumea-side-nav::-webkit-scrollbar {
    width: 0.45rem;
}

.lumea-side-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
}

/* Desktop: expand on hover */
@media (min-width: 992px) {
    .lumea-side-nav:hover,
    body.sidebar-preview-open .lumea-side-nav,
    body.sidebar-pinned .lumea-side-nav { width: 280px; }

    /* Push main content so it doesn't sit under the sidebar */
    body.has-side-nav main.container-fluid {
        padding-left: 74px;
        transition: padding-left .25s ease;
    }

    body.has-side-nav.sidebar-pinned main.container-fluid { padding-left: 290px; }
}

/* Mobile: off-canvas style */
@media (max-width: 991.98px) {
    .lumea-side-nav {
        top: 48px;
        left: -280px;
        width: 280px;
    }
    .lumea-side-nav.open { left: 0; }
}

.lumea-app-selector {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 38px;
    margin: 0.75rem 0.5rem;
    padding: 0.25rem 0.65rem;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.55rem;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}

.lumea-side-nav-pin-row {
    display: none;
    position: fixed;
    top: 0;
    left: 220px;
    align-items: center;
    justify-content: flex-end;
    width: 60px;
    height: 48px;
    padding: 0 0.5rem;
    z-index: 1042;
}

.lumea-side-nav-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    min-height: 2.35rem;
    padding: 0;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: #c9c8c1 !important;
    cursor: pointer;
}

.lumea-side-nav-pin-icon {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    overflow: visible;
    color: #c9c8c1;
    fill: currentColor;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
    opacity: 1;
}

.lumea-side-nav-pin:hover,
.lumea-side-nav-pin[aria-pressed="true"] {
    background-color: rgba(var(--bs-primary-rgb),0.18);
    color: #fff !important;
}

.lumea-side-nav-pin:hover .lumea-side-nav-pin-icon,
.lumea-side-nav-pin[aria-pressed="true"] .lumea-side-nav-pin-icon {
    color: #fff !important;
}

@media (min-width: 992px) {
    body.sidebar-pinned .lumea-side-nav-pin-row,
    body.sidebar-preview-open .lumea-side-nav-pin-row {
        display: flex;
    }
}

@media (max-width: 991.98px) {
    .lumea-side-nav-pin-row { display: none; }
}

.lumea-app-selector .bi {
    flex: 0 0 auto;
    font-size: 1rem;
}

.lumea-app-selector select {
    min-width: 0;
    width: 0;
    flex: 1 1 auto;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: 0.84rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity .2s ease, width .2s ease;
    appearance: none;
    /* The selector lives on a dark surface in both themes. Keep Chromium/Edge's
       native popup in the same colour scheme instead of inheriting page light mode. */
    color-scheme: dark;
}

.lumea-app-selector select option {
    background-color: #1c252b;
    color: #fff;
}

@media (min-width: 992px) {
    .lumea-side-nav:hover .lumea-app-selector select,
    body.sidebar-preview-open .lumea-app-selector select,
    body.sidebar-pinned .lumea-app-selector select {
        width: 100%;
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .lumea-app-selector select {
        width: 100%;
        opacity: 1;
    }
}

.lumea-side-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0 0.5rem 1rem;

    /* fill space so footer pins at bottom */
    flex: 1 1 auto;
}

.lumea-side-nav-menu li { margin-bottom: 0.25rem; }

.lumea-side-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.2rem 0.8rem;
    border-radius: 0.55rem;
    color: rgba(255,255,255,0.72);
    font-size: 0.9rem;
    white-space: nowrap;
}

.lumea-side-nav .nav-link .bi {
    font-size: 1.2rem;
    width: 1.5rem;
    text-align: center;
}

.lumea-side-nav .nav-link:hover {
    background-color: rgba(var(--bs-primary-rgb),0.16);
    color: #ffffff;
    text-decoration: none;
}

.lumea-side-nav .nav-link.active {
    background-color: rgba(var(--bs-primary-rgb),0.22);
    color: #ffffff;
    box-shadow: inset 3px 0 0 var(--brand-accent);
}

/* Labels hidden in collapsed desktop state, visible on hover & mobile */
.lumea-side-nav-label {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity .25s ease, max-width .25s ease;
}
@media (min-width: 992px) {
    .lumea-side-nav:hover .lumea-side-nav-label,
    body.sidebar-preview-open .lumea-side-nav-label,
    body.sidebar-pinned .lumea-side-nav-label {
        opacity: 1;
        max-width: 160px;
    }
}
@media (max-width: 991.98px) {
    .lumea-side-nav .lumea-side-nav-label {
        opacity: 1;
        max-width: 160px;
    }
}

/* ---------- SIDE NAV SUBMENUS ---------- */
.lumea-side-nav-menu li.has-submenu { position: relative; }

/* Submenu container: hidden by default */
.lumea-side-nav-submenu {
    list-style: none;
    margin: 0 0 0 2.2rem;
    padding: 0;                    /* important: avoids extra gap under Orders */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .2s ease, opacity .2s ease;
}

/* Mobile: submenu opens normally */
@media (max-width: 991.98px) {
    .lumea-side-nav-menu li.has-submenu.submenu-open > .lumea-side-nav-submenu {
        max-height: 500px;
        opacity: 1;
        padding-bottom: 0.35rem;  /* spacing only when visible */
    }
}

/* Desktop: submenu only visible while sidebar is hovered */
@media (min-width: 992px) {
    .lumea-side-nav:hover
    .lumea-side-nav-menu li.has-submenu.submenu-open
    > .lumea-side-nav-submenu {
        max-height: 500px;
        opacity: 1;
        padding-bottom: 0.35rem;  /* spacing only when visible */
    }
}

/* Submenu items */
.nav-link-sub {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem 0.3rem 2.1rem;
    color: #c9c8c1;
    width: 100%;
    border-radius: 0.55rem;
}
.nav-link-sub:hover {
    background-color: rgba(255,255,255,0.08);
    color: #ffffff;
}

/* Caret icon on parents */
.submenu-caret {
    font-size: 0.7rem;
    transition: transform .2s ease;
}
.lumea-side-nav-menu li.has-submenu.submenu-open .submenu-caret {
    transform: rotate(90deg);
}

/* Sidebar footer */
.lumea-side-nav-footer {
    margin-top: auto;
    padding: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.lumea-side-nav-action {
    width: 100%;
    cursor: pointer;
    background: transparent;
    border: 0;
    text-align: left;
}

.lumea-side-nav .dashboard-nav-list {
    flex: 1 1 auto;
    padding: 0 0.5rem 1rem;
}

.lumea-side-nav .dashboard-nav-item,
.lumea-side-nav .dashboard-nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 30px;
    padding: 0.28rem 0.8rem;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 0.55rem;
    color: rgba(255,255,255,0.72);
    font-size: 0.88rem;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.lumea-side-nav .dashboard-nav-dropdown-item {
    padding-left: 2.35rem;
    font-size: 0.8rem;
    color: #c9c8c1;
}

.lumea-side-nav .dashboard-nav-dropdown .dashboard-nav-dropdown .dashboard-nav-item {
    padding-left: 2.35rem;
    font-size: 0.8rem;
    color: #d8d7d2;
}

.lumea-side-nav .dashboard-nav-item .bi {
    flex: 0 0 1.5rem;
    width: 1.5rem;
    font-size: 1.15rem;
    text-align: center;
}

.lumea-side-nav .dashboard-nav-item:hover,
.lumea-side-nav .dashboard-nav-dropdown-item:hover {
    background-color: rgba(var(--bs-primary-rgb),0.16);
    color: #ffffff !important;
    text-decoration: none;
}

.lumea-side-nav .dashboard-nav-item.text-primary,
.lumea-side-nav .dashboard-nav-dropdown-item.text-primary,
.lumea-side-nav .dashboard-nav-item.active,
.lumea-side-nav .dashboard-nav-dropdown-item.active {
    background-color: rgba(var(--bs-primary-rgb),0.22);
    color: #ffffff !important;
    box-shadow: inset 3px 0 0 var(--brand-accent);
}

.lumea-side-nav .dashboard-nav-dropdown {
    margin-bottom: 0.25rem;
}

.lumea-side-nav .dashboard-nav-dropdown-menu {
    display: none;
    margin: 0.15rem 0 0.2rem;
    padding: 0 0 0 0.15rem;
}

.lumea-side-nav .dashboard-nav-dropdown.submenu-open > .dashboard-nav-dropdown-menu {
    display: block;
}

.lumea-side-nav .dashboard-nav-dropdown-toggle {
    position: relative;
    cursor: pointer;
}

.lumea-side-nav .dashboard-nav-dropdown-toggle::after {
    content: "\F285";
    margin-left: auto;
    color: rgba(255,255,255,0.58);
    font-family: bootstrap-icons !important;
    font-size: 0.72rem;
    line-height: 1;
    transition: transform .2s ease;
}

.lumea-side-nav .dashboard-nav-dropdown.submenu-open > .dashboard-nav-dropdown-toggle::after {
    transform: rotate(90deg);
}

.lumea-side-nav .nav-item-divider {
    height: 1px;
    margin: 0.45rem 0.8rem;
    background: rgba(255,255,255,0.08);
}

@media (min-width: 992px) {
    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .lumea-app-selector {
        justify-content: center;
        gap: 0;
        width: 2.35rem;
        min-height: 2.35rem;
        margin: 0.45rem auto;
        padding: 0;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .lumea-app-selector .bi:last-child {
        display: none;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .lumea-app-selector select {
        display: none;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .lumea-app-selector .bi:first-child {
        width: 1.4rem;
        text-align: center;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .lumea-side-nav-menu,
    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .dashboard-nav-list {
        padding-right: 0;
        padding-left: 0;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .dashboard-nav-dropdown {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .dashboard-nav-item,
    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .nav-link {
        justify-content: center;
        gap: 0;
        width: 2.35rem;
        min-height: 2.35rem;
        margin-right: auto;
        margin-left: auto;
        padding: 0 !important;
        font-size: 0 !important;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .dashboard-nav-item .bi,
    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .nav-link .bi {
        flex: 0 0 auto;
        width: 1.4rem;
        margin: 0;
        font-size: 1.15rem !important;
        text-align: center;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .dashboard-nav-dropdown-toggle::after,
    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .dashboard-nav-dropdown-menu {
        display: none !important;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .dashboard-nav-dropdown-item {
        display: none !important;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .nav-item-divider {
        width: 1.9rem;
        margin-top: 0.25rem;
        margin-right: auto;
        margin-bottom: 0.25rem;
        margin-left: auto;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .lumea-side-nav-footer {
        display: flex;
        justify-content: center;
        padding-right: 0;
        padding-left: 0;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) .lumea-side-nav-action {
        width: 2.35rem;
        min-height: 2.35rem;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover) {
        scrollbar-width: none;
    }

    body:not(.sidebar-pinned):not(.sidebar-preview-open) .lumea-side-nav:not(:hover)::-webkit-scrollbar {
        width: 0;
        height: 0;
    }
}

/* =========================================================
   NAVBAR SEARCH BAR
   ========================================================= */
.navbar-search {
    max-width: 380px;
    width: 100%;
}

.navbar-search .input-group {
    max-height: 32px;
    height: 30px;
}

.navbar-search .form-control {
    border-radius: 0 !important;
    background-color: var(--theme-surface) !important;
    border: 1px solid var(--theme-border) !important;
    color: var(--theme-text) !important;
    font-size: 0.85rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* Leftmost input */
.navbar-search .form-control:first-child {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Middle input (date) */
.navbar-search .form-control:nth-child(2) {
    border-radius: 0 !important;
}

.navbar-search .btn {
    border-radius: 0;
    font-size: 0.85rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.navbar-search .btn-calendar {
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--bs-primary) !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.navbar-search .btn-calendar:hover {
    background-color: var(--theme-subtle) !important;
    border-color: rgba(var(--bs-primary-rgb), 0.42) !important;
    color: var(--bs-primary) !important;
}

.navbar-search .btn-search {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #ffffff;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}
.navbar-search .btn-search:hover { filter: brightness(0.9); }

/* Dark mode: navbar search readability */
:root.dark-mode .navbar-search .form-control {
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}
:root.dark-mode .navbar-search .form-control::placeholder {
    color: var(--theme-muted) !important;
    opacity: 1;
}
:root.dark-mode .navbar-search .btn-calendar {
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--bs-primary) !important;
}

/* Small screens: hide search */
@media (max-width: 767.98px) {
    .navbar-search { display: none !important; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.lumea-footer {
    background: var(--theme-card-header-bg2);
    color: #514b43;
    border-top: 1px solid #d1c8bb;
    margin-top: auto;
}

:root.dark-mode .lumea-footer {
    background: #1f1e1d;
    color: #d7d0c5;
    border-top-color: #38342f;
}

.footer-logo {
    width: 200px;
    height: 40px;
    box-sizing: border-box;
    padding: 6px 30px;
    background-image: url("../images/hidcot-lightmode.png");
    background-repeat: no-repeat;
    background-position: center;
    background-origin: content-box;
    background-size: contain;
}

:root.dark-mode .footer-logo {
    background-image: url("../images/hidcot-darkmode.png");
}

.footer-text { font-size: 0.8rem; }

.lumea-footer .footer-left,
.lumea-footer .footer-right,
.lumea-footer .text-muted {
    color: #514b43 !important;
}

:root.dark-mode .lumea-footer .footer-left,
:root.dark-mode .lumea-footer .footer-right,
:root.dark-mode .lumea-footer .text-muted {
    color: #d7d0c5 !important;
}

/* Offset to clear slim sidebar */
body.has-side-nav .lumea-footer .container-fluid {
    padding-left: 74px;
    transition: padding-left .25s ease;
}

@media (min-width: 992px) {
    body.has-side-nav.sidebar-pinned .lumea-footer .container-fluid { padding-left: 290px; }
}

/* Lumea Logo */
.lumea-logo {
    display: inline-flex;
    align-items: center;
    gap: calc(0.45rem - 2px);
    padding: 0.1rem 0;
    line-height: 1;
    flex-shrink: 0;
}

.lumea-logo::before {
    content: "";
    width: 24.06px;
    height: 24.06px;
    background-color: #FE8D00;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    flex: 0 0 auto;
}

.lumea-logo-img {
    display: block;
    width: 110px;
    max-width: 100%;
    height: auto;
}

@media (max-width: 767.98px) {
    .lumea-logo::before {
        width: 21.44px;
        height: 21.44px;
    }

    .lumea-logo-img {
        width: 98px;
    }
}

/* =========================================================
   HOME SCREEN / PREFIRE PANELS
   ========================================================= */
.home-dashboard {
    font-size: 0.92rem;
}

.home-title {
    font-size: 1.35rem;
    font-weight: 700;
}

.home-refresh-form {
    align-self: flex-start;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 0.55rem 0.8rem;
}

.home-dashboard h4.text-primary {
    font-size: 1rem;
    font-weight: 700;
    margin: 0.4rem 0 0.65rem;
}

.home-dashboard .accordion-item {
    background: var(--theme-surface);
    border-color: var(--theme-border);
}

.home-dashboard .accordion-button {
    min-height: 38px;
    height: auto !important;
    background: var(--theme-surface);
    color: var(--theme-text);
    font-size: 0.88rem !important;
    padding: 0.45rem 0.75rem;
}

.home-dashboard .accordion-button:not(.collapsed) {
    color: var(--theme-text);
    background: rgba(var(--bs-primary-rgb), 0.12);
    box-shadow: inset 0 -1px 0 var(--theme-border);
}

.home-dashboard .accordion-button.is-alerting,
.home-dashboard .accordion-button.bg-warning {
    background: #f2b84b !important;
    color: #2d2924 !important;
}

.home-dashboard .accordion-body {
    background: var(--theme-surface);
    color: var(--theme-text);
    padding: 0.8rem;
}

.home-dashboard .table-responsive {
    border-radius: 8px;
}

.home-dashboard .table-bordered > :not(caption) > * {
    border-color: var(--theme-border);
}

.home-dashboard .clickable-row {
    cursor: pointer;
}

.home-dashboard .clickable-row:hover > * {
    filter: brightness(0.98);
}

.home-dashboard .card {
    border-radius: 8px;
    overflow: hidden;
}

.home-dashboard .card-header a {
    text-decoration: none;
}

.home-dashboard .filterBtn {
    border-radius: 8px;
}

.home-dashboard .filterBtn > span.text-white:not(.rounded-circle) {
    color: var(--theme-text) !important;
}

.home-dashboard .overflow-auto {
    scrollbar-width: thin;
}

.bg-custom-red {
    background-color: #bd2f2f !important;
    color: #fff !important;
}

.bg-custom-magenta {
    background-color: #9f3eb2 !important;
    color: #fff !important;
}

.bg-custom-amber {
    background-color: var(--brand-accent) !important;
    color: #fff !important;
}

.bg-custom-green {
    background-color: #2f7d46 !important;
    color: #fff !important;
}

.bg-custom-yellow {
    background-color: #f5d35f !important;
    color: #2d2924 !important;
}

.bg-custom-pending {
    background-color: #4f6770 !important;
    color: #fff !important;
}

.weatherWarningStageOne,
.weatherWarningStageTwo,
.weatherWarningStageThree {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin-right: 0.25rem;
    padding: 0.05rem 0.25rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
}

.weatherWarningStageOne {
    background: #f5d35f;
    color: #2d2924;
}

.weatherWarningStageTwo {
    background: var(--brand-accent);
    color: #fff;
}

.weatherWarningStageThree {
    background: #bd2f2f;
    color: #fff;
}

/* =========================================================
   INCIDENT MANAGEMENT
   ========================================================= */
.incident-page .breadcrumb {
    margin-bottom: 0;
}

.incident-register-page .custom-btn {
    width: 100%;
    min-height: 2.4rem;
    font-size: 1rem;
}

.incident-register-page a:has(.custom-btn),
.incident-register-page a:has(.incident-register-quick-btn) {
    text-decoration: none;
}

.incident-register-button-row {
    margin-top: 0.95rem;
}

.incident-register-date-row {
    margin-top: 0.75rem;
}

.incident-register-inline-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.incident-register-quick-btn {
    width: 100%;
    min-height: 1.95rem;
}

.incident-register-nowrap {
    white-space: nowrap;
}

.incident-register-table-container {
    max-width: 99%;
    margin-top: 1.9rem;
}

.incident-register-table-container.is-hidden {
    visibility: hidden;
}

.incident-register-status-open,
.incident-register-status-closed,
.incident-register-status-deleted {
    color: #fff !important;
    font-weight: 800;
    white-space: nowrap;
}

.incident-register-status-open {
    background: var(--bs-primary) !important;
}

.incident-register-page .table tbody td.incident-register-status-open,
.incident-register-page table.dataTable tbody td.incident-register-status-open {
    --bs-table-bg: var(--bs-primary) !important;
    --bs-table-accent-bg: var(--bs-primary) !important;
    background: var(--bs-primary) !important;
    background-color: var(--bs-primary) !important;
    box-shadow: inset 0 0 0 9999px var(--bs-primary) !important;
    color: #fff !important;
}

.incident-register-status-closed {
    background: #2f7d46 !important;
}

.incident-register-page .table tbody td.incident-register-status-closed,
.incident-register-page table.dataTable tbody td.incident-register-status-closed {
    --bs-table-bg: #2f7d46 !important;
    --bs-table-accent-bg: #2f7d46 !important;
    background: #2f7d46 !important;
    background-color: #2f7d46 !important;
    box-shadow: inset 0 0 0 9999px #2f7d46 !important;
    color: #fff !important;
}

.incident-register-status-deleted {
    background: var(--bs-secondary) !important;
}

.incident-register-page .table tbody td.incident-register-status-deleted,
.incident-register-page table.dataTable tbody td.incident-register-status-deleted {
    --bs-table-bg: var(--bs-secondary) !important;
    --bs-table-accent-bg: var(--bs-secondary) !important;
    background: var(--bs-secondary) !important;
    background-color: var(--bs-secondary) !important;
    box-shadow: inset 0 0 0 9999px var(--bs-secondary) !important;
    color: #fff !important;
}

.incident-register-status-open a,
.incident-register-status-closed a {
    color: #fff !important;
    margin-left: 0.25rem;
    text-decoration: none;
}

.incident-register-page .btn-delete-incident {
    color: var(--theme-muted);
    cursor: pointer;
    font-size: 0.9rem;
}

.incident-register-page #filters {
    display: block;
}

.incident-register-page #filters .badge {
    margin-bottom: 0.35rem;
}

.incident-register-filter-select {
    width: calc(25% - 0.45rem) !important;
    min-width: 13rem;
}

.incident-register-page .select2-container {
    width: calc(25% - 0.45rem) !important;
    min-width: 13rem;
    margin-right: 0.35rem;
    margin-bottom: 0.4rem;
}

.incident-register-page .select2-container--default .select2-selection--single,
.incident-register-page .select2-container--default .select2-selection--multiple,
.incident-register-page .select2-dropdown {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

.incident-register-page .select2-container--default .select2-selection--single .select2-selection__rendered,
.incident-register-page .select2-container--default .select2-selection--multiple .select2-selection__rendered,
.incident-register-page .select2-search__field {
    color: var(--theme-text) !important;
}

.incident-register-page .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.incident-register-page .select2-container--default .select2-results__option--selected {
    background: var(--bs-primary) !important;
    color: #fff !important;
}

.incident-register-page .select2-container--open {
    z-index: 2000;
}

.incident-register-page #order-list_filter {
    margin-top: -1.55rem;
}

.incident-register-page .mwidth {
    max-width: 4rem;
}

.incident-register-modal-name {
    color: var(--bs-primary);
    font-weight: 900;
}

.incident-register-copy-btn i {
    font-size: 1rem;
}

.incident-register-copy-helper {
    position: fixed;
    left: -99999px;
    top: 0;
    white-space: pre-wrap;
}

/* =========================================================
   ASSET MANAGEMENT
   ========================================================= */
.asset-page .breadcrumb {
    margin-bottom: 0;
}

.asset-toolbar,
.asset-filter-bar {
    width: 100%;
    margin-bottom: 1rem;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface);
}

.asset-filter-bar {
    padding: 0.8rem;
}

.asset-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
}

.asset-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.asset-kpi-card,
.asset-panel,
.asset-summary-card {
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface);
}

.asset-kpi-card,
.asset-summary-card {
    padding: 0.75rem;
}

.asset-kpi-label {
    color: var(--theme-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.asset-kpi-value {
    color: var(--theme-text);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
}

.asset-kpi-note {
    color: var(--theme-muted);
    font-size: 0.82rem;
}

.asset-type-pill,
.asset-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.35rem;
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.asset-type-pill {
    background: rgba(var(--bs-primary-rgb), 0.14);
    color: var(--bs-primary);
}

.asset-type-loco {
    background: rgba(47, 125, 70, 0.16);
    color: #2f7d46;
}

.asset-type-wagon {
    background: rgba(79, 103, 112, 0.18);
    color: #4f6770;
}

:root.dark-mode .asset-type-loco { color: #8fd8a3; }
:root.dark-mode .asset-type-wagon { color: #a4c0c9; }

.asset-status-active {
    background: rgba(47, 125, 70, 0.18);
    color: #2f7d46;
}

.asset-status-open {
    background: rgba(214, 111, 31, 0.18);
    color: var(--bs-primary);
}

.asset-status-held {
    background: rgba(159, 62, 178, 0.16);
    color: #9f3eb2;
}

.asset-status-retired {
    background: var(--theme-subtle);
    color: var(--theme-muted);
}

:root.dark-mode .asset-status-active { color: #8fd8a3; }
:root.dark-mode .asset-status-held { color: #dda1ea; }

.asset-panel {
    overflow: hidden;
}

.asset-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--theme-border);
    background: var(--theme-card-header-bg);
    color: var(--theme-text);
    font-weight: 800;
}

.asset-panel-body {
    padding: 0.8rem;
}

.asset-chart-grid,
.asset-two-column {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.asset-chart-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
}

.asset-two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.asset-token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.asset-token {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    background: var(--theme-subtle);
    color: var(--theme-text);
    font-size: 0.82rem;
    font-weight: 700;
}

.asset-inline-action {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.asset-alert-cell {
    background: rgba(189, 47, 47, 0.16) !important;
    color: #bd2f2f !important;
    font-weight: 800;
}

:root.dark-mode .asset-alert-cell {
    color: #ff8a8a !important;
}

.asset-empty {
    border: 1px dashed var(--theme-border);
    border-radius: 8px;
    padding: 1rem;
    color: var(--theme-muted);
    background: var(--theme-surface);
}

.order-detail-page,
.asset-usage-page {
    color: var(--theme-text);
}

.order-detail-page h1,
.asset-usage-page h1,
.order-detail-page .page-title,
.asset-usage-page .page-title {
    letter-spacing: 0;
}

.order-detail-page .nav-tabs,
.asset-usage-page .nav-tabs {
    gap: 0.25rem;
    border-bottom-color: var(--theme-border);
}

.order-detail-page .order-breadcrumb-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    height: 1.25rem;
    padding: 0 0.4rem;
    font-size: 0.8rem;
    line-height: 1;
    vertical-align: text-bottom;
}

.order-detail-page .nav-tabs .nav-link,
.asset-usage-page .nav-tabs .nav-link {
    border-color: var(--theme-border);
    border-bottom-color: transparent;
    color: var(--theme-muted);
    background: var(--theme-card-header-bg);
    font-weight: 700;
}

.order-detail-page .nav-tabs .nav-link.active,
.asset-usage-page .nav-tabs .nav-link.active {
    color: var(--theme-text);
    background: var(--theme-surface);
    box-shadow: inset 0 3px 0 var(--bs-primary);
}

.order-detail-page .tab-content > .tab-pane,
.asset-usage-page .tab-content > .tab-pane {
    border: 1px solid var(--theme-border) !important;
    border-top: 0 !important;
    background: var(--theme-surface);
}

.order-detail-page .bg-dark,
.asset-usage-page .bg-dark {
    background: var(--theme-card-header-bg2) !important;
    color: var(--theme-text) !important;
}

.order-detail-page .card,
.asset-usage-page .card,
.modal-content {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

.order-detail-page .card-header,
.asset-usage-page .card-header,
.modal-header {
    background: var(--theme-card-header-bg) !important;
    color: var(--theme-text) !important;
    border-bottom-color: var(--theme-border) !important;
}

.order-detail-page .accordion-item,
.asset-usage-page .accordion-item {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
}

.order-detail-page .accordion-button,
.asset-usage-page .accordion-button {
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

.order-detail-page .accordion-button:not(.collapsed),
.asset-usage-page .accordion-button:not(.collapsed) {
    background: rgba(var(--bs-primary-rgb), 0.12) !important;
    color: var(--theme-text) !important;
}

@media (max-width: 991.98px) {
    .asset-chart-grid,
    .asset-two-column {
        grid-template-columns: 1fr;
    }

    .asset-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

.incident-toolbar,
.incident-filter-bar {
    width: 100%;
    margin-bottom: 1rem;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface);
}

.incident-filter-bar {
    padding: 0.8rem;
}

.incident-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
}

.incident-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.incident-kpi-card {
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface);
    padding: 0.75rem;
}

.incident-kpi-label {
    color: var(--theme-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.incident-kpi-value {
    color: var(--theme-text);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
}

.incident-kpi-note {
    color: var(--theme-muted);
    font-size: 0.82rem;
}

.incident-section-pill,
.incident-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.15rem;
    min-height: 1.35rem;
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.incident-section-pill {
    background: rgba(var(--bs-primary-rgb), 0.14);
    color: var(--bs-primary);
}

.incident-section-pill.section-a {
    background: rgba(189, 47, 47, 0.16);
    color: #bd2f2f;
}

.incident-section-pill.section-b {
    background: rgba(214, 111, 31, 0.16);
    color: var(--bs-primary);
}

.incident-section-pill.section-c {
    background: rgba(47, 125, 70, 0.16);
    color: #2f7d46;
}

.incident-section-pill.section-d {
    background: rgba(79, 103, 112, 0.18);
    color: #4f6770;
}

.incident-section-pill.section-e {
    background: rgba(159, 62, 178, 0.16);
    color: #9f3eb2;
}

:root.dark-mode .incident-section-pill.section-a { color: #ff8a8a; }
:root.dark-mode .incident-section-pill.section-c { color: #8fd8a3; }
:root.dark-mode .incident-section-pill.section-d { color: #a4c0c9; }
:root.dark-mode .incident-section-pill.section-e { color: #dda1ea; }

.incident-status-open {
    background: rgba(47, 125, 70, 0.18);
    color: #2f7d46;
}

.incident-status-closed {
    background: var(--theme-subtle);
    color: var(--theme-muted);
}

:root.dark-mode .incident-status-open {
    color: #8fd8a3;
}

.incident-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 1rem;
}

.incident-panel {
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface);
    overflow: hidden;
}

.incident-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--theme-border);
    background: var(--theme-card-header-bg);
    color: var(--theme-text);
    font-weight: 800;
}

.incident-panel-body {
    padding: 0.8rem;
}

.incident-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.65rem;
}

.incident-meta-item {
    min-width: 0;
}

.incident-meta-label {
    color: var(--theme-muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.incident-meta-value {
    color: var(--theme-text);
    font-weight: 650;
    overflow-wrap: anywhere;
}

.incident-description,
.incident-summary-content {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.incident-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.incident-timeline-item {
    border-left: 3px solid var(--bs-primary);
    padding: 0.15rem 0 0.15rem 0.75rem;
}

.incident-timeline-meta {
    color: var(--theme-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.incident-bar-list {
    display: grid;
    gap: 0.5rem;
}

.incident-bar-row {
    display: grid;
    grid-template-columns: minmax(110px, 180px) 1fr auto;
    align-items: center;
    gap: 0.6rem;
}

.incident-bar-track {
    min-height: 0.7rem;
    border-radius: 999px;
    background: var(--theme-subtle);
    overflow: hidden;
}

.incident-bar-fill {
    height: 100%;
    min-width: 0.25rem;
    border-radius: inherit;
    background: var(--bs-primary);
}

.incident-chart {
    min-height: 260px;
}

.incident-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.incident-token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.incident-token {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    background: var(--theme-subtle);
    color: var(--theme-text);
    font-size: 0.82rem;
    font-weight: 700;
}

.incident-summary-card {
    display: grid;
    gap: 0.45rem;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface);
    padding: 0.8rem;
}

.incident-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.8rem;
    color: var(--theme-muted);
    font-size: 0.82rem;
}

.incident-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.incident-empty {
    border: 1px dashed var(--theme-border);
    border-radius: 8px;
    padding: 1rem;
    color: var(--theme-muted);
    background: var(--theme-surface);
}

@media (max-width: 991.98px) {
    .incident-detail-grid {
        grid-template-columns: 1fr;
    }

    .incident-chart-grid,
    .incident-two-column {
        grid-template-columns: 1fr;
    }

    .incident-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .incident-bar-row {
        grid-template-columns: 1fr auto;
    }

    .incident-bar-track {
        grid-column: 1 / -1;
    }
}

/* Shared Omnia-style file upload drop target */
.file-drop-area {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 400px;
    max-width: 100%;
    min-height: 96px;
    padding: 1.35rem 1.5rem;
    border: 1px dashed var(--brand-accent);
    border-radius: 8px;
    background: var(--brand-navy);
    color: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.10);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.file-drop-area.is-active,
.file-drop-area:focus-within {
    border-color: rgba(255, 255, 255, 0.8);
    background: var(--bs-primary);
    box-shadow: 0 12px 24px rgba(var(--bs-primary-rgb), 0.25);
}

.fake-btn {
    flex: 0 0 auto;
    border-radius: 6px;
    background: var(--bs-primary);
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.55rem 0.9rem;
}

.file-drop-area.is-active .fake-btn,
.file-drop-area:focus-within .fake-btn {
    background: rgba(0, 0, 0, 0.22);
}

.file-msg {
    min-width: 0;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-delete {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    display: none;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(-50%);
}

.item-delete::before,
.item-delete::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.85rem;
    height: 2px;
    border-radius: 999px;
    background: #fff;
}

.item-delete::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.item-delete::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.item-delete:hover {
    background: rgba(255, 255, 255, 0.18);
}

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
}

.file-input:focus {
    outline: none;
}

@media (max-width: 575.98px) {
    .file-drop-area {
        align-items: flex-start;
        flex-direction: column;
        min-height: 126px;
    }

    .file-msg {
        max-width: calc(100% - 2rem);
        white-space: normal;
    }
}
