﻿/* ═══════════════════════════════════════════════════════════════
   ELITE DESIGN TOKENS – CSS CUSTOM PROPERTIES
   All theme colours flow from here.  Dark theme = body[data-theme="dark"]
   ═══════════════════════════════════════════════════════════════ */

/* ── LIGHT (default) ── */
:root {
    /* brand */
    --elite-brand:        #0190fe;
    --elite-brand-dark:   #0055b3;
    --elite-brand-light:  rgba(1,144,254,.10);

    /* sidebar – gradient anchors  (charcoal → slate → steel gray) */
    --sidebar-grad-top:   #1a2035;
    --sidebar-grad-mid:   #242f45;
    --sidebar-grad-bot:   #2e3c55;
    --sidebar-bg:         #1a2035;  /* fallback only */
    --sidebar-bg-deep:    #111726;
    --sidebar-bg-sub:     rgba(0,0,0,.20);
    --sidebar-item-color: rgba(255,255,255,.75);
    --sidebar-item-hover: #ffffff;
    --sidebar-icon-color: rgba(255,255,255,.45);
    --sidebar-active-bg:  rgba(255,255,255,.12);
    --sidebar-active-clr: #ffffff;
    --sidebar-divider:    rgba(255,255,255,.09);
    --sidebar-logo-bg:    rgba(0,0,0,.20);
    --sidebar-trigger-bg: #111726;
    --sidebar-scroll-thumb: rgba(255,255,255,.15);

    /* topbar / content */
    --topbar-bg:          #ffffff;
    --topbar-border:      #e4e9f0;
    --content-bg:         #f2f4f8;
    --card-bg:            #ffffff;
    --card-border:        rgba(1,144,254,.07);
    --text-primary:       #1a2035;
    --text-secondary:     #6b7490;
    --text-muted:         #a8b3c7;

    /* footer */
    --footer-bg:          #ffffff;
    --footer-border:      rgba(1,144,254,.10);
}

/* ── DARK ── */
body[data-theme="dark"],
html[data-theme="dark"] {
    /* sidebar */
    --sidebar-grad-top:   #0d1117;
    --sidebar-grad-mid:   #0f172a;
    --sidebar-grad-bot:   #1a2235;
    --sidebar-bg:         #0d1117;
    --sidebar-bg-deep:    #080c12;
    --sidebar-bg-sub:     rgba(0,0,0,.30);
    --sidebar-item-color: rgba(255,255,255,.58);
    --sidebar-item-hover: rgba(255,255,255,.92);
    --sidebar-icon-color: rgba(255,255,255,.32);
    --sidebar-active-bg:  rgba(1,144,254,.22);
    --sidebar-divider:    rgba(255,255,255,.06);
    --sidebar-logo-bg:    rgba(0,0,0,.40);
    --sidebar-trigger-bg: #080c12;

    /* content area — richer layered blues */
    --topbar-bg:          #0f172a;
    --topbar-border:      rgba(1,144,254,.12);
    --content-bg:         #0b1120;
    --surface-1:          #0f1a2e;   /* panels, cards */
    --surface-2:          #152035;   /* elevated cards */
    --surface-3:          #1a2740;   /* modals, dropdowns */
    --card-bg:            #0f1a2e;
    --card-border:        rgba(1,144,254,.14);
    --input-bg:           #0b1628;
    --input-border:       #1e3050;
    --input-border-focus: #0190fe;
    --text-primary:       #e2e8f8;
    --text-secondary:     #7a8fb0;
    --text-muted:         #3d5070;
    --divider:            rgba(1,144,254,.09);

    /* semantic accent colours in dark */
    --dk-success:         #34d399;
    --dk-warning:         #fbbf24;
    --dk-danger:          #f87171;
    --dk-info:            #60a5fa;

    /* footer */
    --footer-bg:          #0a1020;
    --footer-border:      rgba(1,144,254,.10);

    color-scheme: dark;
}

/*#region General */
.cui-topbar-activity-descr {
    white-space: normal !important;
}

.gridFooter {
    font-weight: bold;
    background-color: rgb(67, 74, 84);
    color: white;
}

.select2-selection__clear {
    right: 15px !important;
}

.bootstrap-tagsinput .tag {
    color: #000000 !important;
}

label {
    /* Allow wrapping on small screens — only truncate inside fixed-width containers */
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: 100%;
}

/* Truncate only when label is inside a constrained cell / input-group */
.input-group label,
.col-form-label,
td label,
th label {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.notification-background {
    background-color: #f2f2f2;
}

/* Base font-size: 14px desktop, 15px mobile (prevents iOS auto-zoom on inputs)
   12px is preserved only for dense table cells via .table rule below */
html {
    font-size: 14px;
}

table, input, button, select {
    font-size: 13px !important;
}

a {
    font-size: inherit;
}

@media (max-width: 767px) {
    html {
        font-size: 15px;
    }
    /* Prevent iOS Safari auto-zoom: inputs must be >= 16px on mobile */
    input, select, textarea {
        font-size: 16px !important;
    }
}

.card-body {
    padding: 1.5rem;
}

.form-control {
    padding-top: 0.375rem;
    padding-right: 0.75rem;
    padding-bottom: 0.375rem;
    padding-left: 0.75rem;
}

/* Minimum 44px touch target on mobile (Apple HIG / WCAG 2.5.5) */
.btn-sm {
    padding: 4px 10px !important;
}

@media (max-width: 767px) {
    .btn-sm {
        min-height: 44px !important;
        padding: 10px 14px !important;
    }
    /* All buttons need comfortable touch targets on mobile */
    .btn {
        min-height: 44px !important;
    }
}

.cui-utils-content {
    padding: 10px;
}



.small-font {
    font-size: small;
    text-align: center
}

.ajs-warning {
    background-color: #ff6a00 !important
}


.WaterMark {
    position: fixed;
    top: 20vh;
    left: 42%;
    bottom: 0px;
    width: 500px;
    height: 500px;
    font-weight: bold;
    font-size: 100px;
    z-index: 7000;
    color: rgba(255, 0, 0, 0.50);
}

textarea {
    max-width: 100% !important;
}

.file-caption-info, .file-thumbnail-footer {
    width: 100% !important
}

.input-validation-error {
    border-color: red;
}

@media print {
    html, body {
        display: none;
    }
}

.progress {
    margin-bottom: 2px !important
}

.disabled {
    pointer-events: none;
    opacity: 0.4;
}

.nopadding {
    padding: 0px;
}

.nomargin {
    margin: 0px;
}

.p-xs {
    padding: .25em;
}

.table {
    margin-bottom: 0px;
}

.borderless-input {
    border: 0;
    outline: none;
    outline-offset: 0;
}


/*#endregion */

/*#region Chat Component */
.btn-chat {
    background-color: #665CAC !important;
    color: white;
    font-weight: bold;
}

.userchat:hover {
    font-weight: bold;
    border-radius: 5px;
    border: solid 3px #2a9605;
    cursor: pointer;
}

.selectedUser {
    font-weight: bold;
    border-radius: 5px;
    border: solid 3px #2a9605;
    cursor: pointer;
}


/*#endregion */

/*#region NavBar */


.navbar-fixed-bottom {
    margin-bottom: 50px;
}


/*#endregion */

/*#region form-control */


.form-control-inline {
    width: 100px;
    display: inline;
}

.form-control-inline-md {
    width: 70px;
    display: inline;
}

.form-control-inline-sm {
    width: 50px;
    display: inline;
}

.form-control-inline-xs {
    width: 30px;
    display: inline;
}


/*#endregion */


/*#region Attachments */


.btn-kv {
    background: #8a8b8d !important
}

/*#endregion */

/*#region Alertify */
.alertify-notifier {
    color: white;
}
/*#endregion */

/*#region AutoComplete Form Control */
.ui-autocomplete {
    max-height: 200px;
    max-width: 800px;
    overflow-y: auto;
    /* prevent horizontal scrollbar 
            overflow-x: hidden;*/
    /* add padding to account for vertical scrollbar */
    padding-right: 20px;
}
/*#endregion */

/*#region selectable jquery ui */


.ui-selecting {
    background-color: #FECA40;
}

.ui-selected {
    background-color: #F39814;
}

/*#endregion */

/*#region Loading Icon */

.gif-loading {
    z-index: 6000;
    position: fixed;
    width: 150px;
    margin: 30vh auto; /* Will not center vertically and won't work in IE6/7. */
    left: 0;
    right: 0;
}

#loading-bar-spinner-ajax, #loading-bar-spinner-page {
    display: block;
    width: 150px;
    height: 150px;
    position: fixed;
    top: 50%;
    left: 50%;
    margin-left: -50px;
    margin-top: -50px;
    z-index: 6000;
}

#disabling-background-ajax, #disabling-background-page {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
}

/*#endregion */

/*#region Slider Form Control */

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}


    .switch input {
        display: none;
    }


.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #8A8B8D;
    -webkit-transition: .4s;
    transition: .4s;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 16px;
        width: 16px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        -webkit-transition: .4s;
        transition: .4s;
    }

input:checked + .slider {
    background-color: #37BC9B;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

    .slider.round:before {
        border-radius: 50%;
    }


/*#endregion */

/*#region Tables */
tbody tr.selected td {
    background-color: #37BC9B !important;
    color: black;
}

div.total label {
    width: 100%;
    padding: 5px;
    text-align: center;
    background-color: rgb(55, 188, 155);
    color: #fff;
}

div.total input {
    width: auto;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    text-align: center;
    color: #656D78;
}

div.total input:disabled {
    text-align: center;
    border: 1px solid #8aefd6;
    padding: 10px;
}

/*#endregion */


/*#region Bootstrap Modal */

.modal-content {
    box-shadow: 0px 0px 10px 2px rgba(0, 0, 0,0.3)
}

/*#endregion */


/*#region Overriding CleanUI */


.cui-config-borderless .card-header {
    padding-top: 0 !important;
}

.note-toolbar {
    z-index: 100;
}

.cui-menu-left {
    z-index: 2000
}

.col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-lg, .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-md, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-sm, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-xl, .col-xl-1, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9 {
    padding-left: 0.50rem;
    padding-right: 0.50rem;
}
/*#endregion */


/* ═══════════════════════════════════════════════════════════════
   PRIORITY 1 – MODERN UI OVERRIDES
   All rules here intentionally override CleanUI v2.0.2 defaults.
   Brand palette:  primary #0190fe  |  dark  #0055b3
   ═══════════════════════════════════════════════════════════════ */

/*#region P1-1 – Page background & content area */

body {
    background: #eef1f7 !important;
}

.cui-utils-content {
    padding: 12px 16px 20px !important;
    background: transparent !important;
}

/*#endregion */

/*#region P1-2 – Card elevation & radius */

.card {
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 16px rgba(1,144,254,.08),
                0 1px 4px  rgba(0,0,0,.05) !important;
    transition: box-shadow .22s ease !important;
}

.card:hover {
    box-shadow: 0 6px 28px rgba(1,144,254,.13),
                0 2px 8px  rgba(0,0,0,.07) !important;
}

.card-header {
    border-radius: 14px 14px 0 0 !important;
    background: #fff !important;
    border-bottom: 1px solid rgba(1,144,254,.10) !important;
    font-weight: 600 !important;
}

.card-body {
    padding: 1.25rem !important;
    border-radius: 0 0 14px 14px !important;
}

/* Full-bleed reclaim / eclaims / approval pages – cancel card-body padding */
.card-body:has(> .rcd-page),
.card-body:has(> .rcu-page),
.card-body:has(> .rci-page),
.card-body:has(> .rdd-page) {
    padding: 0 !important;
    border-radius: 0 0 14px 14px !important;
    overflow: hidden !important;
}

.modal-content {
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 48px rgba(0,0,0,.18) !important;
    overflow: hidden !important;
}

.modal-header {
    border-bottom: 1px solid rgba(1,144,254,.10) !important;
    padding: .9rem 1.2rem !important;
}

.modal-footer {
    border-top: 1px solid rgba(1,144,254,.10) !important;
    padding: .75rem 1.2rem !important;
}

/*#endregion */

/*#region P1-3 – Topbar (header) */

.cui-layout-header {
    box-shadow: none !important;
}

.cui-layout-header .cui-topbar {
    height: 54px !important;
    min-height: 54px !important;
    background: rgba(255,255,255,.97) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(1,144,254,.12) !important;
    box-shadow: 0 2px 12px rgba(1,144,254,.09) !important;
    padding: 0 14px !important;
    display: flex !important;
    align-items: center !important;
}

.cui-topbar .text-primary {
    font-weight: 600 !important;
    font-size: .78rem !important;
    letter-spacing: .01em !important;
    color: #0190fe !important;
}

.cui-topbar-item {
    display: flex !important;
    align-items: center !important;
}

.cui-topbar-menu-button {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #6b7490 !important;
    transition: background .18s, color .18s !important;
    cursor: pointer !important;
}

.cui-topbar-menu-button:hover {
    background: rgba(1,144,254,.10) !important;
    color: #0190fe !important;
}

.cui-topbar-avatar {
    border-radius: 50% !important;
    overflow: hidden !important;
    width: 34px !important;
    height: 34px !important;
    display: inline-flex !important;
    border: 2px solid rgba(1,144,254,.25) !important;
    transition: border-color .2s !important;
}

.cui-topbar-avatar:hover {
    border-color: #0190fe !important;
}

.cui-topbar-avatar img {
    width: 34px !important;
    height: 34px !important;
    object-fit: cover !important;
}

/*#endregion */

/*#region P1-4 – Sidebar (left menu) */

.cui-menu-left {
    box-shadow: 2px 0 16px rgba(0,0,0,.12) !important;
}

.cui-menu-left-logo {
    padding: 10px 16px !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

#menuSearch {
    background: rgba(255,255,255,.08) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    border-radius: 7px !important;
    color: rgba(255,255,255,.85) !important;
    font-size: .75rem !important;
    padding: 5px 10px !important;
    width: 86% !important;
    margin: 8px 7% !important;
    display: block !important;
    transition: background .2s, border-color .2s !important;
}

#menuSearch::placeholder {
    color: rgba(255,255,255,.40) !important;
}

#menuSearch:focus {
    outline: none !important;
    background: rgba(255,255,255,.14) !important;
    border-color: rgba(1,144,254,.60) !important;
}

.cui-menu-left-item > a {
    border-left: 3px solid transparent !important;
    border-radius: 0 8px 8px 0 !important;
    margin-right: 10px !important;
    transition: background .18s ease, border-left-color .18s ease !important;
}

.cui-menu-left-item > a:hover {
    border-left-color: #0190fe !important;
    background: rgba(1,144,254,.12) !important;
}

.cui-menu-left-item--active > a,
.cui-menu-left-item.active > a {
    border-left-color: #0190fe !important;
    background: rgba(1,144,254,.18) !important;
}

.cui-menu-left-icon {
    min-width: 22px !important;
    text-align: center !important;
    font-size: .7rem !important;
    font-weight: 700 !important;
    background: rgba(1,144,254,.18) !important;
    color: #7ecfff !important;
    border-radius: 5px !important;
    padding: 2px 5px !important;
    margin-right: 6px !important;
    line-height: 1.5 !important;
    transition: background .18s !important;
}

.cui-menu-left-item > a:hover .cui-menu-left-icon,
.cui-menu-left-item--active > a .cui-menu-left-icon,
.cui-menu-left-item.active > a .cui-menu-left-icon {
    background: #0190fe !important;
    color: #fff !important;
}

.cui-menu-left-divider {
    border-top: 1px solid rgba(255,255,255,.07) !important;
    margin: 6px 0 !important;
}

.cui-menu-left-title {
    font-size: .775rem !important;
    letter-spacing: .01em !important;
}

/*#endregion */

/*#region P1-5 – Breadcrumb bar */

nav.cui-breadcrumbs {
    background: transparent !important;
    border-bottom: none !important;
    padding: 14px 16px 6px !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 42px !important;
}

nav.cui-breadcrumbs .font-size-18 strong {
    font-size: .95rem !important;
    font-weight: 700 !important;
    color: #1a2035 !important;
    letter-spacing: .01em !important;
}

nav.cui-breadcrumbs .float-md-end {
    float: none !important;
    display: flex !important;
    align-items: center !important;
    gap: .4rem !important;
}

/*#endregion */

/*#region P1-6 – Buttons */

.btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    letter-spacing: .01em !important;
    transition: opacity .18s ease, transform .12s ease, box-shadow .18s ease !important;
}

.btn:disabled,
.btn.disabled {
    transform: none !important;
    opacity: .55 !important;
}

.btn-primary {
    background: linear-gradient(90deg, #0055b3 0%, #0190fe 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(1,144,254,.28) !important;
}

.btn-primary:hover:not(:disabled) {
    opacity: .9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(1,144,254,.40) !important;
    color: #fff !important;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0) !important;
}

.btn-danger {
    background: linear-gradient(90deg, #c0392b 0%, #e74c3c 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(231,76,60,.25) !important;
}

.btn-danger:hover:not(:disabled) {
    opacity: .9 !important;
    transform: translateY(-1px) !important;
    color: #fff !important;
}

.btn-success {
    background: linear-gradient(90deg, #1a8a4a 0%, #27ae60 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(39,174,96,.25) !important;
}

.btn-success:hover:not(:disabled) {
    opacity: .9 !important;
    transform: translateY(-1px) !important;
    color: #fff !important;
}

.btn-warning {
    background: linear-gradient(90deg, #d68910 0%, #f39c12 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(243,156,18,.25) !important;
}

.btn-warning:hover:not(:disabled) {
    opacity: .9 !important;
    transform: translateY(-1px) !important;
    color: #fff !important;
}

.btn-secondary {
    background: #f0f4f8 !important;
    border: 1px solid #dde3ee !important;
    color: #4a5270 !important;
    box-shadow: none !important;
}

.btn-secondary:hover:not(:disabled) {
    background: #e3e9f5 !important;
    border-color: #c8d2e6 !important;
    color: #1a2035 !important;
    transform: translateY(-1px) !important;
}

.btn-info {
    background: linear-gradient(90deg, #117a8b 0%, #17a2b8 100%) !important;
    border: none !important;
    color: #fff !important;
}

.btn-info:hover:not(:disabled) {
    opacity: .9 !important;
    transform: translateY(-1px) !important;
    color: #fff !important;
}

.btn-sm {
    border-radius: 6px !important;
    padding: 4px 10px !important;
    font-size: .75rem !important;
}

/*#endregion */

/*#region P1-7 – Tables */

.table thead th {
    background: linear-gradient(90deg, #1a2035 0%, #2e3c55 100%) !important;
    color: #e8ecf4 !important;
    font-weight: 700 !important;
    font-size: .70rem !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
    border: none !important;
    border-right: 1px solid rgba(255,255,255,.06) !important;
    padding: .6rem .75rem !important;
    white-space: nowrap !important;
}

.table tbody tr {
    transition: background .12s !important;
}

.table tbody tr:hover td {
    background: rgba(1,144,254,.04) !important;
}

.table tbody td {
    font-size: .78rem !important;
    vertical-align: middle !important;
    border-color: rgba(0,0,0,.05) !important;
    padding: 7px 10px !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background: rgba(240,244,248,.6) !important;
}

/*#endregion */

/*#region P1-8 – Form inputs */

.form-control,
.form-select {
    border: 1.5px solid #e0e6f0 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    transition: border-color .18s, box-shadow .18s !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #0190fe !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(1,144,254,.12) !important;
}

.form-label {
    font-size: .77rem !important;
    font-weight: 600 !important;
    color: #4a5270 !important;
    margin-bottom: .25rem !important;
}

/*#endregion */

/*#region P1-9 – CSS page/ajax spinner (replaces GIF) */

/* Hide the legacy GIF spinners — replaced by elite-spinner below */
#loading-bar-spinner-ajax,
#loading-bar-spinner-page {
    display: none !important;
    visibility: hidden !important;
}

.elite-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    margin-top: -28px;
    margin-left: -28px;
    z-index: 6000;
    pointer-events: none;
}

.elite-spinner::before {
    content: '';
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid rgba(1,144,254,.15);
    border-top-color: #0190fe;
    animation: elite-spin .7s linear infinite;
}

.elite-spinner::after {
    content: '';
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid rgba(1,144,254,.08);
    border-bottom-color: #0055b3;
    animation: elite-spin .45s linear infinite reverse;
    position: absolute;
    top: 9px;
    left: 9px;
}

@keyframes elite-spin {
    to { transform: rotate(360deg); }
}

#disabling-background-ajax,
#disabling-background-page {
    background: rgba(238,241,247,.75) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
}

/*#endregion */

/*#region P1-10 – Footer */

.cui-footer {
    background: #fff !important;
    border-top: 1px solid rgba(1,144,254,.10) !important;
    box-shadow: 0 -2px 8px rgba(1,144,254,.06) !important;
    /* Kill CleanUI’s 2.3rem side padding that creates white gaps */
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.cui-footer-inner {
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.cui-footer-company {
    display: flex !important;
    align-items: center !important;
    gap: .6rem !important;
    font-size: .72rem !important;
    color: #8a93a8 !important;
}

.cui-footer-company a {
    color: #0190fe !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.cui-footer-company a:hover {
    text-decoration: underline !important;
}

.cui-footer-company-logo {
    height: 20px !important;
    width: auto !important;
    opacity: .7 !important;
}

/*#endregion */

/* ═══════════════════════════════════════════════════════════════
   END PRIORITY 1 OVERRIDES
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   NOTIFICATION GROUP UI
   Paired Ready/Pending badge groups in the topbar
   ═══════════════════════════════════════════════════════════════ */

/*#region Notification group pill wrapper */

/* The outer pill that wraps both Ready + Pending buttons */
.notif-group {
    display: inline-flex;
    align-items: center;
    background: rgba(1,144,254,.07);
    border: 1px solid rgba(1,144,254,.15);
    border-radius: 20px;
    padding: 2px 4px;
    gap: 2px;
    position: relative;
    overflow: visible;
    transition: background .2s;
}

.notif-group:hover {
    background: rgba(1,144,254,.12);
    border-color: rgba(1,144,254,.28);
}

/* Thin vertical separator between the two buttons */
.notif-group-sep {
    width: 1px;
    height: 18px;
    background: rgba(1,144,254,.20);
    margin: 0 2px;
    flex-shrink: 0;
}

/*#endregion */

/*#region Notification trigger button (each badge+icon) */

.notif-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    border-radius: 14px;
    padding: 3px 7px;
    cursor: pointer;
    position: relative;
    text-decoration: none !important;
    transition: background .18s;
    color: inherit !important;
}

.notif-btn:hover {
    background: rgba(1,144,254,.12);
}

/* Badge counter */
.notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    font-size: .65rem;
    font-weight: 700;
    padding: 0 5px;
    line-height: 1;
    transition: transform .2s;
}

.notif-btn:hover .notif-badge {
    transform: scale(1.15);
}

/* ── All badge variants → unified charcoal palette ── */
/* Ready */
.notif-badge-ready {
    background: linear-gradient(135deg, #1a2035, #2e3c55);
    color: #fff;
    box-shadow: 0 1px 4px rgba(26,32,53,.35);
}

/* Pending */
.notif-badge-pending {
    background: linear-gradient(135deg, #1a2035, #2e3c55);
    color: #fff;
    box-shadow: 0 1px 4px rgba(26,32,53,.35);
}

/* Ops / Instructions */
.notif-badge-ops {
    background: linear-gradient(135deg, #1a2035, #2e3c55);
    color: #fff;
    box-shadow: 0 1px 4px rgba(26,32,53,.35);
}

/* Icon */
.notif-icon {
    font-size: .82rem;
    opacity: .75;
}

/* Tooltip label below icon */
.notif-tooltip-label {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26,32,53,.88);
    color: #fff;
    font-size: .62rem;
    white-space: nowrap;
    padding: 2px 7px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 9999;
}

.notif-btn:hover .notif-tooltip-label {
    opacity: 1;
}

/*#endregion */

/*#region Notification dropdown panel */

/* ── Dropdown panel shell ───────────────────────────────────── */
.notif-dropdown {
    min-width: 340px;
    max-width: 380px;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 40px rgba(0,0,0,.16), 0 2px 8px rgba(1,144,254,.10) !important;
    padding: 0 !important;

    margin-top: 10px !important;
    animation: notifDropIn .18s ease;
}

@keyframes notifDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── Panel header bar — colour-coded per type ───────────────── */
.notif-panel-header {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .85rem 1.1rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: #fff;
    border-bottom: none;
}

.notif-panel-header i { font-size: 1rem; opacity: .9; }

/* Ready  → emerald */
.notif-panel-header-ready   { background: linear-gradient(120deg, #0d6e3a, #16a34a); }
/* Pending → amber  */
.notif-panel-header-pending { background: linear-gradient(120deg, #92400e, #d97706); }
/* Info   → steel-blue */
.notif-panel-header-info    { background: linear-gradient(120deg, #1e3a5f, #2563eb); }
/* Batch  → teal */
.notif-panel-header-batch   { background: linear-gradient(120deg, #0e4d52, #0d9488); }
/* Ops    → indigo */
.notif-panel-header-ops     { background: linear-gradient(120deg, #312e81, #4f46e5); }

.notif-panel-header .notif-panel-count {
    margin-left: auto;
    background: rgba(255,255,255,.22);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    backdrop-filter: blur(4px);
}

/* ── Scrollable body ────────────────────────────────────────── */
/* ── Panel body scroll container ────────────────────────────── */
.notif-panel-body {
    max-height: 380px;
    overflow-y: auto;
    padding: .55rem .65rem;
    background: linear-gradient(180deg, #f0f4fb 0%, #eef2f9 100%);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.notif-panel-body::-webkit-scrollbar       { width: 5px; }
.notif-panel-body::-webkit-scrollbar-track { background: #e4eaf5; border-radius: 5px; }
.notif-panel-body::-webkit-scrollbar-thumb { background: linear-gradient(180deg,#a0b4d8,#7a96c8); border-radius: 5px; }

/* ── Individual notification card ──────────────────────────── */
/*  Per-type CSS variables: accent, glow, bg-from, bg-to, border */
.notif-panel-header-ready ~ .notif-panel-body .notif-item {
    --ni-accent:      #16a34a;
    --ni-glow:        rgba(22,163,74,.18);
    --ni-bg-from:     #f0fdf4;
    --ni-bg-to:       #dcfce7;
    --ni-border:      rgba(22,163,74,.30);
    --ni-stripe-from: #16a34a;
    --ni-stripe-to:   #4ade80;
    --ni-title-color: #14532d;
}

.notif-panel-header-pending ~ .notif-panel-body .notif-item {
    --ni-accent:      #d97706;
    --ni-glow:        rgba(217,119,6,.18);
    --ni-bg-from:     #fffbeb;
    --ni-bg-to:       #fef3c7;
    --ni-border:      rgba(217,119,6,.30);
    --ni-stripe-from: #d97706;
    --ni-stripe-to:   #fbbf24;
    --ni-title-color: #78350f;
}

.notif-panel-header-info ~ .notif-panel-body .notif-item {
    --ni-accent:      #2563eb;
    --ni-glow:        rgba(37,99,235,.18);
    --ni-bg-from:     #eff6ff;
    --ni-bg-to:       #dbeafe;
    --ni-border:      rgba(37,99,235,.28);
    --ni-stripe-from: #2563eb;
    --ni-stripe-to:   #60a5fa;
    --ni-title-color: #1e3a8a;
}

.notif-panel-header-batch ~ .notif-panel-body .notif-item {
    --ni-accent:      #0d9488;
    --ni-glow:        rgba(13,148,136,.18);
    --ni-bg-from:     #f0fdfa;
    --ni-bg-to:       #ccfbf1;
    --ni-border:      rgba(13,148,136,.28);
    --ni-stripe-from: #0d9488;
    --ni-stripe-to:   #34d399;
    --ni-title-color: #134e4a;
}

.notif-panel-header-ops ~ .notif-panel-body .notif-item {
    --ni-accent:      #4f46e5;
    --ni-glow:        rgba(79,70,229,.18);
    --ni-bg-from:     #f5f3ff;
    --ni-bg-to:       #ede9fe;
    --ni-border:      rgba(79,70,229,.28);
    --ni-stripe-from: #4f46e5;
    --ni-stripe-to:   #a78bfa;
    --ni-title-color: #2e1065;
}

.notif-item {
    display: block;
    background: linear-gradient(135deg, var(--ni-bg-from, #f8faff), var(--ni-bg-to, #e8eeff));
    border-radius: 12px;
    padding: .7rem .9rem .7rem 1.1rem;
    border: 1.5px solid var(--ni-border, rgba(1,144,254,.22));
    box-shadow: 0 2px 8px var(--ni-glow, rgba(1,144,254,.10)),
                0 1px 2px rgba(0,0,0,.06);
    transition: box-shadow .18s, transform .15s, border-color .18s;
    text-decoration: none !important;
    color: inherit !important;
    position: relative;
    overflow: hidden;
}

/* gradient left accent stripe */
.notif-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--ni-stripe-from, #0190fe), var(--ni-stripe-to, #60c8ff));
    border-radius: 12px 0 0 12px;
}

/* subtle shimmer overlay on top-right corner */
.notif-item::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 70px; height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.notif-item:hover {
    box-shadow: 0 6px 22px var(--ni-glow, rgba(1,144,254,.22)),
                0 2px 6px rgba(0,0,0,.08);
    transform: translateY(-2px);
    border-color: var(--ni-accent, #0190fe);
    color: inherit !important;
}

/* ── Card title row ─────────────────────────────────────────── */
.notif-item-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .78rem;
    font-weight: 700;
    color: var(--ni-title-color, #1a2035);
    margin-bottom: .32rem;
    gap: .4rem;
}

.notif-item-title > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status pill — vibrant per-type */
.notif-item-status {
    flex-shrink: 0;
    font-size: .62rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    background: linear-gradient(120deg, var(--ni-stripe-from, #0190fe), var(--ni-stripe-to, #60c8ff));
    color: #fff;
    white-space: nowrap;
    letter-spacing: .03em;
    box-shadow: 0 1px 4px var(--ni-glow, rgba(1,144,254,.25));
}

/* ── Meta row — key/value chips ─────────────────────────────── */
.notif-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .22rem .5rem;
    margin-top: .1rem;
}

.notif-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: .18rem;
    font-size: .67rem;
    color: #475569;
    white-space: nowrap;
    background: rgba(255,255,255,.55);
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 6px;
    padding: 1px 6px;
}

.notif-item-meta strong {
    color: var(--ni-accent, #374151);
    font-weight: 700;
}

/* ── Instruction text (ops) — clamp long HTML content ──────── */
.notif-item-text {
    font-size: .72rem;
    color: #374151;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* ── Empty state ────────────────────────────────────────────── */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.2rem 1rem;
    text-align: center;
    background: linear-gradient(160deg,#f1f5fd,#e8eef8);
    color: #94a3b8;
    font-size: .76rem;
    gap: .55rem;
}

.notif-empty i {
    font-size: 2.2rem;
    opacity: .30;
}

/* ── Footer CTA ─────────────────────────────────────────────── */
.notif-panel-footer {
    padding: .65rem .8rem;
    border-top: 1px solid rgba(0,0,0,.08);
    background: linear-gradient(90deg, #1a2035 0%, #2e3f60 100%);
    display: flex;
    gap: .4rem;
}

.notif-panel-footer .btn {
    flex: 1;
    font-size: .73rem !important;
    padding: 7px 12px !important;
    border-radius: 9px !important;
    background: rgba(255,255,255,.12) !important;
    color: #e0eaff !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    font-weight: 600 !important;
    letter-spacing: .03em !important;
    transition: background .15s, transform .12s, box-shadow .15s !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .35rem !important;
    backdrop-filter: blur(4px) !important;
}

.notif-panel-footer .btn:hover {
    background: rgba(255,255,255,.22) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 10px rgba(0,0,0,.18) !important;
}

/* ── Progress bar (batch) ───────────────────────────────────── */
.notif-batch-progress {
    height: 7px;
    border-radius: 7px;
    background: rgba(0,0,0,.08);
    overflow: hidden;
    margin: .4rem 0 .18rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
}

.notif-batch-progress .approvals-batch-progress-bar {
    height: 100%;
    border-radius: 7px;
    background: linear-gradient(90deg, #0d9488, #14b8a6, #34d399);
    background-size: 200% 100%;
    animation: progressShimmer 2s linear infinite;
    transition: width .5s ease;
}

@keyframes progressShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Batch action icon buttons (retry / dismiss) ────────────── */
.notif-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: rgba(100,116,139,.10);
    color: #64748b;
    border: 1px solid rgba(100,116,139,.18);
    font-size: .7rem;
    text-decoration: none !important;
    transition: background .15s, color .15s;
}

.notif-action-btn:hover {
    background: rgba(37,99,235,.12);
    color: #2563eb;
    border-color: rgba(37,99,235,.25);
}

.notif-action-btn-dismiss:hover {
    background: rgba(220,38,38,.10);
    color: #dc2626;
    border-color: rgba(220,38,38,.22);
}

/*#endregion */

/* ═══════════════════════════════════════════════════════════════
   END NOTIFICATION GROUP UI
   ═══════════════════════════════════════════════════════════════ */


/* Keep Approvals Batch panel fully visible near the left topbar group */
#Div-ApprovalsBatchNotification .dropdown {
    position: static;
}

#Div-ApprovalsBatchNotification .notif-dropdown {
    left: 0 !important;
    right: auto !important;
    transform: none !important;
}

@media (max-width: 1200px) {
    #Div-ApprovalsBatchNotification .notif-dropdown {
        max-width: min(92vw, 380px);
    }
}

/* ═══════════════════════════════════════════════════════════════
   FIX 1 – TOPBAR Z-INDEX & DROPDOWN OVERLAP
   The CleanUI layout uses flex columns. Without an explicit
   z-index on the header flex item, Bootstrap dropdowns (z:1000)
   get painted behind sibling flex items. Setting z-index here
   creates a proper stacking context so every dropdown in the
   topbar renders above the page content.
   ═══════════════════════════════════════════════════════════════ */

.cui-layout-header {
    position: relative !important;
    z-index: 1050 !important;   /* above Bootstrap modals baseline (1040) */
}

/* Ensure topbar itself does not clip its own dropdowns */
.cui-layout-header .cui-topbar {
    overflow: visible !important;
}

/* ═══════════════════════════════════════════════════════════════
   FIX 2 – USER MENU DROPDOWN
   ═══════════════════════════════════════════════════════════════ */

/*#region User menu dropdown */

.usermenu-dropdown {
    min-width: 230px !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.14),
                0 2px 8px  rgba(1,144,254,.10) !important;
    padding: 0 !important;
    overflow: hidden !important;
    margin-top: 6px !important;
    z-index: 1060 !important;
}

/* Header section — avatar + name */
.usermenu-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    background: linear-gradient(135deg, #0055b3 0%, #0190fe 100%);
}

.usermenu-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.4);
    flex-shrink: 0;
}

.usermenu-avatar img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.usermenu-info {
    min-width: 0;
}

.usermenu-name {
    font-size: .78rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.usermenu-role {
    font-size: .68rem !important;
    color: rgba(255,255,255,.75) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: .9rem;
}

.usermenu-date {
    font-size: .65rem !important;
    color: rgba(255,255,255,.60) !important;
}

/* Menu items */
.usermenu-item {
    display: flex !important;
    align-items: center !important;
    gap: .6rem !important;
    padding: .5rem 1rem !important;
    font-size: .77rem !important;
    color: #4a5270 !important;
    transition: background .15s !important;
}

.usermenu-item:hover {
    background: rgba(1,144,254,.07) !important;
    color: #0190fe !important;
}

.usermenu-item-icon {
    width: 16px;
    text-align: center;
    font-size: .85rem;
    opacity: .7;
}

.usermenu-item:hover .usermenu-item-icon {
    opacity: 1;
}

.usermenu-item-danger {
    color: #dc3545 !important;
}

.usermenu-item-danger:hover {
    background: rgba(220,53,69,.06) !important;
    color: #c0392b !important;
}

/*#endregion */


/* ═══════════════════════════════════════════════════════════════
   FIX 3 – FOOTER REDESIGN
   4-column layout: Brand | Quick Links | Legal | System Info
   + compact bottom copyright bar
   ═══════════════════════════════════════════════════════════════ */

/*#region Footer */

/* Remove the old scroll-top arrow button entirely */
.cui-utils-scroll-top {
    display: none !important;
}

.cui-footer {
    background: #fff !important;
    border-top: 1px solid rgba(1,144,254,.10) !important;
    box-shadow: 0 -2px 12px rgba(1,144,254,.07) !important;
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.cui-footer-inner {
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

/* ── 5-column grid (brand + quick links + legal + payer contact + system) ── */
.footer-main {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr 1fr;
    gap: 0;
    padding: 1.4rem 1.6rem 1rem;
    align-items: start;
}

@media (max-width: 1280px) {
    .footer-main {
        grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
        gap: .5rem;
    }
    /* System col wraps under brand on medium screens */
    .footer-col-info {
        grid-column: 1;
    }
}

@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
    }
    .footer-col-info {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
    .footer-main {
        grid-template-columns: 1fr;
    }
}

/* Column base */
.footer-col {
    padding: .4rem .8rem;
}

/* Brand column */
.footer-col-brand {
    border-right: 1px solid rgba(0,0,0,.05);
    padding-right: 1.2rem;
}

.footer-logo {
    height: 32px;
    width: auto;
    margin-bottom: .5rem;
    border-radius: 6px;
}

.footer-tagline {
    font-size: .72rem !important;
    color: #8a93a8;
    margin: 0 0 .6rem;
    line-height: 1.5;
}

.footer-tagline span {
    color: #b0b9cc;
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-top: .4rem;
}

.footer-social-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    height: 28px;
    padding: 0 10px 0 8px;
    border-radius: 20px;
    background: rgba(1,144,254,.08);
    color: #0190fe !important;
    font-size: .72rem;
    font-weight: 500;
    transition: background .18s, transform .15s, box-shadow .18s;
    text-decoration: none !important;
    white-space: nowrap;
    width: fit-content;
}

.footer-social-btn i {
    font-size: .78rem;
    flex-shrink: 0;
}

.footer-social-label {
    font-size: .69rem;
    letter-spacing: .01em;
    opacity: .85;
}

.footer-social-btn-web {
    background: rgba(1,144,254,.09);
    color: #0190fe !important;
}

.footer-social-btn-mail {
    background: rgba(234,84,85,.09);
    color: #ea5455 !important;
}

/* button-reset so <button> looks identical to <a> */
button.footer-social-btn {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

.footer-social-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(1,144,254,.18);
}

.footer-social-btn-web:hover {
    background: #0190fe;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(1,144,254,.3);
}

.footer-social-btn-mail:hover {
    background: #ea5455;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(234,84,85,.3);
}

/* dark mode social btns */
body[data-theme="dark"] .footer-social-btn-web  { background: rgba(1,144,254,.13); }
body[data-theme="dark"] .footer-social-btn-mail { background: rgba(234,84,85,.13); }

/* Column title */
.footer-col-title {
    font-size: .7rem !important;
    font-weight: 700 !important;
    color: #1a2035 !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
    margin-bottom: .5rem !important;
    padding-bottom: .3rem !important;
    border-bottom: 2px solid rgba(1,144,254,.12) !important;
    white-space: normal !important;
}

/* Links list */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: .2rem;
}

.footer-links a {
    font-size: .72rem !important;
    color: #6b7490 !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: 2px 0;
    transition: color .15s, padding-left .15s;
    white-space: nowrap;
    overflow: visible !important;
}

.footer-links a i {
    width: 14px;
    text-align: center;
    opacity: .6;
    font-size: .7rem;
}

.footer-links a:hover {
    color: #0190fe !important;
    padding-left: 4px;
}

.footer-links a:hover i {
    opacity: 1;
}

/* System info column */
.footer-col-info .footer-info-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .72rem;
    color: #6b7490;
    margin-bottom: .3rem;
}

.footer-col-info .footer-info-item i {
    width: 14px;
    text-align: center;
    color: #0190fe;
    opacity: .7;
    font-size: .72rem;
}

/* ── Payer Contact footer column ── */
.footer-col-payer-contact {
    border-left: 2px solid rgba(1,144,254,.10);
    padding-left: 1.2rem !important;
}

.payer-contact-avatar {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: .35rem;
    vertical-align: middle;
}

.payer-contact-list li {
    margin-bottom: .28rem;
}

.payer-contact-list a,
.payer-contact-hours {
    display: flex !important;
    align-items: center !important;
    gap: .4rem !important;
    font-size: .72rem !important;
    color: #6b7490 !important;
    text-decoration: none !important;
    transition: color .15s !important;
    flex-wrap: nowrap !important;
}

.payer-contact-list a:hover { color: #0190fe !important; }

.payer-contact-icon {
    width: 15px;
    text-align: center;
    flex-shrink: 0;
    font-size: .78rem;
}

.payer-ci-hotline   { color: #0190fe !important; }
.payer-ci-landline  { color: #74708d !important; }
.payer-ci-approvals { color: #ff9f43 !important; font-size: 1rem !important; }
.payer-ci-whatsapp  { color: #25d366 !important; font-size: .9rem !important; }
.payer-ci-email     { color: #ea5455 !important; }
.payer-ci-web       { color: #0190fe !important; }
.payer-ci-hours     { color: #b0b9cc !important; }

.payer-contact-label {
    font-weight: 600;
    color: #4e5a72;
    min-width: 58px;
    flex-shrink: 0;
    font-size: .68rem !important;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.payer-contact-val {
    color: #6b7490;
    font-size: .72rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* dark mode */
body[data-theme="dark"] .footer-col-payer-contact {
    border-left-color: rgba(255,255,255,.07);
}
body[data-theme="dark"] .payer-contact-list a,
body[data-theme="dark"] .payer-contact-hours { color: #8a93a8 !important; }
body[data-theme="dark"] .payer-contact-label { color: #74708d; }
body[data-theme="dark"] .payer-contact-val   { color: #8a93a8; }

/* ── Bottom copyright bar ── */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .55rem 1.6rem;
    background: linear-gradient(90deg, #1a2035 0%, #2e3c55 100%);
    font-size: .68rem;
    color: rgba(255,255,255,.60);
    flex-wrap: wrap;
    gap: .3rem;
    border-top: 1px solid rgba(255,255,255,.06);
}

.footer-bottom a {
    color: rgba(255,255,255,.80) !important;
    font-weight: 600;
    text-decoration: none !important;
}

.footer-bottom a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

.footer-bottom-version {
    color: rgba(255,255,255,.45);
    font-size: .65rem;
}

.footer-bottom-version .text-danger {
    color: #ff8fa3 !important;
}

/*#endregion */

/* ═══════════════════════════════════════════════════════════════
   END FIX 3
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   PRIORITY 2 – COMPONENT MODERNIZATION
   ═══════════════════════════════════════════════════════════════ */

/*#region P2-6 – Menu search box */

.menu-search-wrap {
    position: relative;
    margin: 10px 8px 6px;
}

.menu-search-wrap .menu-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: .72rem;
    color: rgba(255,255,255,.40);
    pointer-events: none;
    transition: color .18s;
}

/* Override P1-4 #menuSearch inline-style remnants */
#menuSearch {
    width: 100% !important;
    margin: 0 !important;
    padding: 5px 10px 5px 30px !important;
}

.menu-search-wrap:focus-within .menu-search-icon {
    color: rgba(1,144,254,.80) !important;
}

/* Brand stamp at bottom of menu */
.menu-brand-stamp > a.menu-brand-link {
    opacity: .5;
    font-size: .68rem !important;
    letter-spacing: .04em;
    transition: opacity .18s;
}

.menu-brand-stamp > a.menu-brand-link:hover {
    opacity: .85;
}

/*#endregion */

/*#region P2-8 – Payer Selector (compact topbar pill) */

.payer-selector-form {
    display: flex;
    align-items: center;
}

.payer-selector {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: rgba(1,144,254,.07);
    border: 1px solid rgba(1,144,254,.16);
    border-radius: 22px;
    padding: 3px 10px 3px 4px;
    cursor: pointer;
    transition: background .18s, border-color .18s;
    max-width: 260px;
}

.payer-selector:hover {
    background: rgba(1,144,254,.13);
    border-color: rgba(1,144,254,.32);
}

.payer-selector-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(1,144,254,.25);
    flex-shrink: 0;
}

.payer-selector-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.payer-selector-label {
    font-size: .6rem !important;
    font-weight: 700 !important;
    color: #0190fe !important;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1;
    margin-bottom: 1px;
    white-space: nowrap !important;
    overflow: visible !important;
}

.payer-selector-select {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: .76rem !important;
    font-weight: 600 !important;
    color: #1a2035 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    max-width: 180px;
    outline: none !important;
    /* Remove default arrow — we add our own */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.payer-selector-caret {
    font-size: .6rem;
    color: #0190fe;
    opacity: .7;
    flex-shrink: 0;
    pointer-events: none;
}

/*#endregion */

/*#region P2-10 – Dashboard KPI cards & chart containers */

/* ── Dashboard header ── */
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(1,144,254,.10);
}

.dash-header-left {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.dash-payer-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(1,144,254,.22);
    box-shadow: 0 2px 8px rgba(1,144,254,.18);
}

.dash-payer-label {
    font-size: .68rem;
    color: #8a93a8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Date picker button */
.dash-date-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(1,144,254,.07);
    border: 1px solid rgba(1,144,254,.18);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: .76rem;
    font-weight: 600;
    color: #1a2035;
    cursor: pointer;
    transition: background .18s, border-color .18s;
}

.dash-date-btn:hover {
    background: rgba(1,144,254,.13);
    border-color: rgba(1,144,254,.34);
    color: #0190fe;
}

.dash-date-btn .fa-calendar-o { color: #0190fe; }
.dash-date-caret { font-size: .6rem; color: #0190fe; opacity: .6; }

/* ── KPI card grid ── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .85rem;
    margin-bottom: 1.2rem;
}

/* KPI card */
.kpi-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #fff;
    border: 1px solid rgba(1,144,254,.08);
    border-radius: 14px;
    padding: .85rem 1rem;
    box-shadow: 0 2px 10px rgba(1,144,254,.07);
    transition: box-shadow .2s, transform .18s;
    cursor: default;
}

.kpi-card:hover {
    box-shadow: 0 6px 22px rgba(1,144,254,.14);
    transform: translateY(-2px);
}

.kpi-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon {
    font-size: 1.25rem;
}

.kpi-body {
    min-width: 0;
}

.kpi-value {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #1a2035 !important;
    line-height: 1.1;
    white-space: nowrap;
    overflow: visible !important;
}

.kpi-label {
    font-size: .68rem !important;
    color: #8a93a8 !important;
    font-weight: 500;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* ── Chart grid ── */
.dash-charts-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -.5rem;
}

.dash-chart-col {
    padding: 0 .5rem .85rem;
}

.dash-chart-card {
    background: #fff;
    border: 1px solid rgba(1,144,254,.07);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(1,144,254,.06);
    height: 100%;
}

.dash-chart-title {
    font-size: .78rem !important;
    font-weight: 700 !important;
    color: #1a2035 !important;
    margin-bottom: .6rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid rgba(1,144,254,.10);
    white-space: normal !important;
    overflow: visible !important;
}

.dash-chart-canvas {
    max-height: 260px;
}

/* Empty chart state */
.dash-chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    color: #c0c8d8;
    gap: .4rem;
}

.dash-chart-empty i {
    font-size: 2rem;
    opacity: .35;
}

.dash-chart-empty span {
    font-size: .72rem !important;
    color: #b0b9cc !important;
    white-space: normal !important;
}

/*#endregion */

/* ═══════════════════════════════════════════════════════════════
   END PRIORITY 2
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   PRIORITY 3 – SYSTEM-WIDE DATA LAYER
   Covers: feedback alerts, grid toolbar, table rows,
           pager, grid footer
   ═══════════════════════════════════════════════════════════════ */

/*#region P3-A – Elite Alert Bars (_FeedbackBars) */

@keyframes eliteAlertIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.elite-alert {
    display: flex;
    align-items: center;
    gap: .65rem;
    border: none !important;
    border-radius: 10px !important;
    padding: .65rem 1rem !important;
    margin-bottom: .6rem !important;
    font-size: .8rem !important;
    animation: eliteAlertIn .22s ease both;
    box-shadow: 0 2px 10px rgba(0,0,0,.08) !important;
    position: relative;
}

/* Icon bubble */
.elite-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: .9rem;
}

.elite-alert-body {
    flex: 1;
    line-height: 1.4;
}

.elite-alert-close {
    flex-shrink: 0;
    opacity: .5;
    transition: opacity .15s;
}

.elite-alert-close:hover { opacity: 1; }

/* Colour variants */
.elite-alert-success {
    background: rgba(39,174,96,.09) !important;
    color: #1a5e35 !important;
    border-left: 4px solid #27ae60 !important;
}
.elite-alert-success .elite-alert-icon {
    background: rgba(39,174,96,.15);
    color: #27ae60;
}

.elite-alert-warning {
    background: rgba(243,156,18,.09) !important;
    color: #7b5e00 !important;
    border-left: 4px solid #f39c12 !important;
}
.elite-alert-warning .elite-alert-icon {
    background: rgba(243,156,18,.15);
    color: #e67e22;
}

.elite-alert-danger {
    background: rgba(231,76,60,.09) !important;
    color: #7b1f1a !important;
    border-left: 4px solid #e74c3c !important;
}
.elite-alert-danger .elite-alert-icon {
    background: rgba(231,76,60,.15);
    color: #e74c3c;
}

/* Validation summary */
.validation-summary-wrap .validation-summary-errors {
    padding: .5rem .75rem !important;
    border-radius: 8px !important;
    background: rgba(231,76,60,.07) !important;
    border-left: 4px solid #e74c3c !important;
    font-size: .78rem !important;
}

.validation-summary-wrap .validation-summary-errors ul {
    margin: .25rem 0 0 1rem;
    padding: 0;
}

/*#endregion */

/*#region P3-B – Grid Toolbar */

.grid-toolbar-cell {
    background: linear-gradient(180deg, #f8fafc 0%, #f0f3f8 100%) !important;
    border-bottom: 2px solid rgba(1,144,254,.12) !important;
    padding: .45rem .75rem !important;
}

.grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .4rem;
}

.grid-toolbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
}

.grid-toolbar-right {
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* Tool buttons */
.grid-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: 1px solid transparent;
    border-radius: 7px !important;
    padding: 4px 10px !important;
    font-size: .73rem !important;
    font-weight: 600;
    cursor: pointer;
    transition: background .16s, border-color .16s, transform .12s;
    text-decoration: none !important;
    white-space: nowrap;
}

.grid-tool-btn:hover { transform: translateY(-1px); }

.grid-tool-btn-refresh {
    background: rgba(39,174,96,.1);
    border-color: rgba(39,174,96,.25);
    color: #1a7a42 !important;
}
.grid-tool-btn-refresh:hover {
    background: #27ae60;
    color: #fff !important;
    border-color: #27ae60;
}
.grid-tool-btn-refresh .fa { color: inherit; }

.grid-tool-btn-export {
    background: rgba(1,144,254,.08);
    border-color: rgba(1,144,254,.22);
    color: #0055b3 !important;
}
.grid-tool-btn-export:hover {
    background: #0190fe;
    color: #fff !important;
    border-color: #0190fe;
}

/* Page badge pill */
.grid-page-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: rgba(1,144,254,.08);
    border: 1px solid rgba(1,144,254,.18);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .68rem;
    font-weight: 600;
    color: #0055b3;
    white-space: nowrap;
}

.grid-page-badge .fa { opacity: .6; }

/*#endregion */

/*#region P3-C – Table header, rows & hover */

/* ── Sticky/frozen grid header on scroll ── */
/*
  Strategy: the table is wrapped in .mvc-grid-scroll-wrapper which is the
  scroll container. thead th cells get position:sticky top:0 so they freeze
  at the top of that scroll box. Multi-row stacking uses explicit top values.
*/
.mvc-grid-scroll-wrapper {
    overflow-y: auto;
    overflow-x: auto;
    max-height: 72vh;
    border-radius: 0 0 8px 8px;
}
.mvc-grid-scroll-wrapper > table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
/* Toolbar row (first tr in thead – spans all cols) */
.mvc-grid-scroll-wrapper > table > thead > tr:first-child > th {
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #f0f3f8 100%);
}
/* Column headers row */
.mvc-grid-scroll-wrapper > table > thead > tr.mvc-grid-headers > th {
    position: sticky;
    top: 44px; /* toolbar row height ≈ 44px */
}
/* Filter row (Row mode) */
.mvc-grid-scroll-wrapper > table > thead > tr.mvc-grid-row-filters:not(:first-child) > th {
    position: sticky;
    top: 88px; /* toolbar (44) + headers (44) */
    background: #f0f4fa;
}

/* ── Column header: dark navy gradient matching apd-table / ecd-table ── */
.mvc-grid > table > thead > tr.mvc-grid-headers > th,
.mvc-grid-scroll-wrapper > table > thead > tr.mvc-grid-headers > th {
    background: linear-gradient(90deg, #1a2035 0%, #2e3c55 100%) !important;
    color: #e8ecf4 !important;
    font-size: .68rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .6rem .75rem !important;
    border: none !important;
    border-right: 1px solid rgba(255,255,255,.06) !important;
    white-space: nowrap;
    transition: background .15s;
}
.mvc-grid > table > thead > tr.mvc-grid-headers > th:last-child,
.mvc-grid-scroll-wrapper > table > thead > tr.mvc-grid-headers > th:last-child {
    border-right: none !important;
}
/* Sort indicator arrows – inherit and tint on the light header */
.mvc-grid > table > thead > tr.mvc-grid-headers > th .mvc-grid-sort,
.mvc-grid-scroll-wrapper > table > thead > tr.mvc-grid-headers > th .mvc-grid-sort {
    color: rgba(255,255,255,.45) !important;
    font-size: .6rem !important;
    margin-left: .25rem;
    transition: color .12s;
}
.mvc-grid > table > thead > tr.mvc-grid-headers > th:hover .mvc-grid-sort,
.mvc-grid > table > thead > tr.mvc-grid-headers > th.mvc-grid-sort-asc .mvc-grid-sort,
.mvc-grid > table > thead > tr.mvc-grid-headers > th.mvc-grid-sort-desc .mvc-grid-sort,
.mvc-grid-scroll-wrapper > table > thead > tr.mvc-grid-headers > th:hover .mvc-grid-sort,
.mvc-grid-scroll-wrapper > table > thead > tr.mvc-grid-headers > th.mvc-grid-sort-asc .mvc-grid-sort,
.mvc-grid-scroll-wrapper > table > thead > tr.mvc-grid-headers > th.mvc-grid-sort-desc .mvc-grid-sort {
    color: #64b5f6 !important;
}
/* Active sort column: slight accent overlay */
.mvc-grid > table > thead > tr.mvc-grid-headers > th.mvc-grid-sort-asc,
.mvc-grid > table > thead > tr.mvc-grid-headers > th.mvc-grid-sort-desc,
.mvc-grid-scroll-wrapper > table > thead > tr.mvc-grid-headers > th.mvc-grid-sort-asc,
.mvc-grid-scroll-wrapper > table > thead > tr.mvc-grid-headers > th.mvc-grid-sort-desc {
    background: linear-gradient(90deg, #0d1829 0%, #243450 100%) !important;
}

/* ── Filter row: crisp white so filter inputs are clearly readable ── */
.mvc-grid > table > thead > tr.mvc-grid-row-filters > th,
.mvc-grid-scroll-wrapper > table > thead > tr.mvc-grid-row-filters > th {
    background: #f0f4fa !important;
    padding: .35rem .45rem !important;
    border-top: 1px solid rgba(1,144,254,.18) !important;
    border-right: 1px solid rgba(0,0,0,.05) !important;
    border-bottom: 3px solid #0190fe !important;
}

/* Zebra rows */
.mvc-grid > table > tbody > tr:nth-child(even) > td {
    background: rgba(1,144,254,.025) !important;
}

/* Row hover highlight */
.mvc-grid > table > tbody > tr {
    transition: background .12s;
}
.mvc-grid > table > tbody > tr:hover > td {
    background: rgba(1,144,254,.07) !important;
}

/* Data cells */
.mvc-grid > table > tbody > tr > td {
    font-size: .76rem !important;
    color: #3a4060 !important;
    padding: .45rem .6rem !important;
    border-color: rgba(0,0,0,.05) !important;
    vertical-align: middle !important;
}

/* Empty row */
.mvc-grid-empty-row td {
    text-align: center !important;
    padding: 2.5rem 1rem !important;
    color: #b0b9cc !important;
    font-size: .8rem !important;
    font-style: italic;
    background: #fafbfc !important;
}

/* Filter inputs in header – light theme: white bg, dark text, blue accent */
.mvc-grid-row-filters input.mvc-grid-value,
.mvc-grid-row-filters select.mvc-grid-value {
    border: 1px solid #c8d6ea !important;
    border-radius: 5px !important;
    padding: 3px 28px 3px 8px !important;
    font-size: .71rem !important;
    color: #1a2035 !important;
    background: #ffffff !important;
    width: 100% !important;
    transition: border-color .15s, box-shadow .15s;
}

.mvc-grid-row-filters input.mvc-grid-value:focus,
.mvc-grid-row-filters select.mvc-grid-value:focus {
    border-color: #0190fe !important;
    box-shadow: 0 0 0 2px rgba(1,144,254,.18) !important;
    outline: none !important;
    background: #f5f9ff !important;
}
.mvc-grid-row-filters input.mvc-grid-value::placeholder {
    color: #b0bac8 !important;
}

/* ── Filter icon / toggle button inside each filter cell ── */
.mvc-grid-row-filters .mvc-grid-filter {
    position: relative;
    display: flex;
    align-items: center;
}

/* The small funnel / filter icon button */
.mvc-grid-row-filters button.mvc-grid-filter-button,
.mvc-grid-row-filters .mvc-grid-filter-button {
    position: absolute !important;
    right: 4px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    padding: 0 3px !important;
    cursor: pointer !important;
    line-height: 1 !important;
    z-index: 1 !important;
    color: #0190fe !important;
    font-size: .75rem !important;
    opacity: .75;
    transition: opacity .15s, color .15s;
}
.mvc-grid-row-filters button.mvc-grid-filter-button:hover,
.mvc-grid-row-filters .mvc-grid-filter-button:hover {
    opacity: 1 !important;
    color: #004fa8 !important;
}
/* Active (filter applied) state */
.mvc-grid-row-filters th.mvc-grid-filter-applied button.mvc-grid-filter-button,
.mvc-grid-row-filters th.mvc-grid-filter-applied .mvc-grid-filter-button {
    color: #e74c3c !important;
    opacity: 1 !important;
}

/* The filter icon itself (SVG or :before glyph) */
.mvc-grid-row-filters button.mvc-grid-filter-button i,
.mvc-grid-row-filters .mvc-grid-filter-button i {
    font-size: .8rem !important;
    pointer-events: none;
}

/*#endregion */

/*#region P3-D – Elite Pager */

/* Override the old mvc-grid-pager defaults */
.mvc-grid-pager.elite-pager {
    background: #f8fafc !important;
    border-top: 1px solid rgba(1,144,254,.10) !important;
    padding: .5rem .75rem !important;
    border-radius: 0 0 8px 8px !important;
}

.elite-pager-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: space-between;
}

/* Info pill */
.elite-pager-info {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .7rem;
    color: #6b7490;
    background: rgba(1,144,254,.06);
    border: 1px solid rgba(1,144,254,.12);
    border-radius: 16px;
    padding: 2px 10px;
    white-space: nowrap;
}

.elite-pager-info .fa { color: #0190fe; opacity: .7; }
.elite-pager-info strong { color: #1a2035; }

/* Rows-per-page */
.elite-pager-sizes {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.elite-pager-sizes-label {
    font-size: .68rem;
    color: #8a93a8;
    display: flex;
    align-items: center;
    gap: .25rem;
    white-space: nowrap;
}

.elite-pager-rows-select,
.elite-pager-rows-input {
    border: 1px solid rgba(1,144,254,.2) !important;
    border-radius: 6px !important;
    padding: 2px 6px !important;
    font-size: .71rem !important;
    color: #3a4060 !important;
    background: #fff !important;
    min-width: 56px;
    transition: border-color .15s;
}

.elite-pager-rows-select:focus,
.elite-pager-rows-input:focus {
    border-color: #0190fe !important;
    outline: none !important;
}

/* Page button group */
.elite-pager-buttons {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.elite-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    border: 1px solid rgba(1,144,254,.15);
    border-radius: 6px !important;
    background: #fff;
    font-size: .72rem;
    font-weight: 600;
    color: #4a5270;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
    line-height: 1;
}

.elite-pager-btn:hover:not(:disabled) {
    background: rgba(1,144,254,.08);
    border-color: rgba(1,144,254,.35);
    color: #0190fe;
    transform: translateY(-1px);
}

.elite-pager-btn.active {
    background: linear-gradient(135deg, #0055b3, #0190fe) !important;
    border-color: #0190fe !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(1,144,254,.35);
}

.elite-pager-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
    background: #f0f3f8;
}

.elite-pager-btn-nav { color: #0190fe; }

/*#endregion */

/*#region P3-E – Grid footer row */

.grid-footer-row {
    background: linear-gradient(180deg, #f4f7fb 0%, #eef1f7 100%) !important;
}

.grid-footer-cell {
    font-size: .72rem !important;
    font-weight: 700 !important;
    color: #1a2035 !important;
    padding: .4rem .6rem !important;
    border-top: 2px solid rgba(1,144,254,.14) !important;
}

.grid-footer-value {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    background: rgba(1,144,254,.08);
    border-radius: 5px;
    padding: 1px 7px;
    color: #0055b3;
}

/*#endregion */

/* ═══════════════════════════════════════════════════════════════
   END PRIORITY 3
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   SIDEBAR REDESIGN  +  DARK / LIGHT THEME
   ═══════════════════════════════════════════════════════════════ */

/*#region Sidebar shell */

/* ── Gradient background on the inner panel ──
   Selector includes body.cui-theme-light to defeat CleanUI’s white override.
   gradient: deep navy → royal blue → sky blue  */
.cui-menu-left-inner,
body.cui-theme-light .cui-menu-left-inner {
    background: linear-gradient(
        160deg,
        var(--sidebar-grad-top, #002d6e)  0%,
        var(--sidebar-grad-mid, #0062c8) 55%,
        var(--sidebar-grad-bot, #0fa8ff) 100%
    ) !important;
    transition: width .3s !important;
}

/* ── Brand logo bar ── */
.cui-menu-left-logo,
body.cui-theme-light .cui-menu-left-logo {
    background: var(--sidebar-logo-bg) !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 16px !important;
    height: 64px !important;
    border-bottom: 1px solid var(--sidebar-divider) !important;
    overflow: hidden !important;
}

/* ── Bottom collapse trigger ── */
.cui-menu-left-trigger,
body.cui-theme-light .cui-menu-left-trigger {
    background: var(--sidebar-trigger-bg) !important;
    border-top: 1px solid var(--sidebar-divider) !important;
}

/* ── Submenu drop panel ──
   The critical fix: CleanUI hardcodes background:#000c17 on both
   .cui-menu-left-submenu > .cui-menu-left-list  AND
   .cui-menu-left-submenu-toggled.cui-menu-left-item
   We need higher specificity to override both. */
.cui-menu-left-submenu > .cui-menu-left-list,
body.cui-theme-light .cui-menu-left-submenu > .cui-menu-left-list,
nav .cui-menu-left-submenu > .cui-menu-left-list {
    background: rgba(0,0,0,.22) !important;
    backdrop-filter: none !important;
}

/* CleanUI sets background:#000c17 directly on the toggled parent li */
.cui-menu-left-submenu-toggled.cui-menu-left-item,
body.cui-theme-light .cui-menu-left-submenu-toggled.cui-menu-left-item,
nav .cui-menu-left-submenu-toggled.cui-menu-left-item {
    background: rgba(0,0,0,.18) !important;
}

/* ── Divider lines ── */
.cui-menu-left-divider,
body.cui-theme-light .cui-menu-left-divider {
    background: var(--sidebar-divider) !important;
    height: 1px !important;
    margin: 4px 16px !important;
}

/* ── CleanUI light-theme text/icon overrides on gradient ── */
body.cui-theme-light .cui-menu-left-item > a,
body.cui-theme-light .cui-menu-left-item > a:hover,
body.cui-theme-light .cui-menu-left-item > a:focus {
    color: var(--sidebar-item-color) !important;
}

body.cui-theme-light .cui-menu-left-icon {
    color: var(--sidebar-icon-color) !important;
}

/*#endregion */

/*#region Sidebar brand logo area */

/* The new brand link fills the logo bar */
.sidebar-brand-link {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    width: 100% !important;
    min-width: 0 !important;
}

/* White rounded square icon container */
.sidebar-brand-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.25) !important;
    flex-shrink: 0 !important;
}

.sidebar-brand-icon img {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
}

/* Text block — name + tagline */
.sidebar-brand-text {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

.sidebar-brand-name {
    display: block !important;
    font-size: .92rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: .04em !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

.sidebar-brand-tagline {
    display: block !important;
    font-size: .62rem !important;
    font-weight: 500 !important;
    color: rgba(255,255,255,.55) !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    margin-top: 1px !important;
}

/* Hide text in collapsed (80px) mode */
.cui-menu-left-toggled .cui-menu-left:not(:hover) .sidebar-brand-text {
    opacity: 0 !important;
    pointer-events: none !important;
}

/*#endregion */

/*#region Sidebar items – root level */

/* ── Every item link: defeat CleanUI's #b8beca default ── */
.cui-menu-left .cui-menu-left-item > a,
.cui-menu-left .cui-menu-left-item > a:link,
.cui-menu-left .cui-menu-left-item > a:visited {
    color: var(--sidebar-item-color) !important;
}

/* Root item link */
.cui-menu-left-list-root > .cui-menu-left-item > a {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 10px 16px !important;
    color: var(--sidebar-item-color) !important;
    font-size: .80rem !important;
    font-weight: 500 !important;
    letter-spacing: .01em !important;
    border-radius: 0 !important;
    transition: background .16s, color .16s, padding-left .16s !important;
    text-decoration: none !important;
    position: relative !important;
    min-height: unset !important;
}

.cui-menu-left-list-root > .cui-menu-left-item > a:hover {
    color: var(--sidebar-item-hover) !important;
    background: rgba(255,255,255,.10) !important;
    padding-left: 20px !important;
}

/* Active / open submenu item */
.cui-menu-left-list-root > .cui-menu-left-item.cui-menu-left-item-active > a,
.cui-menu-left-list-root > .cui-menu-left-item.cui-menu-left-submenu-toggled > a {
    color: #ffffff !important;
    background: rgba(1,144,254,.18) !important;
    border-left: 3px solid #0190fe !important;
    padding-left: 13px !important;
    font-weight: 600 !important;
}

/* Also defeat CleanUI's toggled-item background#000c17 on the row itself */
.cui-menu-left-list-root > .cui-menu-left-item.cui-menu-left-submenu-toggled {
    background: transparent !important;
}

/* Icon span */
.cui-menu-left-icon {
    width: 34px !important;
    min-width: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: .92rem !important;
    color: rgba(255,255,255,.60) !important;
    transition: color .16s !important;
    flex-shrink: 0 !important;
    /* override CleanUI absolute positioning */
    position: static !important;
    top: auto !important;
    right: auto !important;
}

.cui-menu-left-list-root > .cui-menu-left-item > a:hover .cui-menu-left-icon,
.cui-menu-left-list-root > .cui-menu-left-item.cui-menu-left-item-active .cui-menu-left-icon,
.cui-menu-left-list-root > .cui-menu-left-item.cui-menu-left-submenu-toggled .cui-menu-left-icon {
    color: rgba(255,255,255,.95) !important;
}

/* Title span */
.cui-menu-left-title {
    flex: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: .80rem !important;
    transition: opacity .2s !important;
}

/* Chevron arrows */
.cui-menu-left-submenu.cui-menu-left-item > a:before,
.cui-menu-left-submenu.cui-menu-left-item > a:after {
    background: rgba(255,255,255,.55) !important;
    right: 16px !important;
}

.cui-menu-left-submenu.cui-menu-left-item > a:hover:before,
.cui-menu-left-submenu.cui-menu-left-item > a:hover:after {
    background: #ffffff !important;
}

.cui-menu-left-submenu-toggled.cui-menu-left-item > a:before,
.cui-menu-left-submenu-toggled.cui-menu-left-item > a:after {
    background: #ffffff !important;
}

/* Also defeat CleanUI's .cui-menu-left-submenu-toggled > a color:#fff — already white, fine */
.cui-menu-left-submenu-toggled.cui-menu-left-item > a .cui-menu-left-icon {
    color: rgba(255,255,255,.95) !important;
}

/*#endregion */

/*#region Sidebar sub-items */

/* Every sub-item link — defeat CleanUI's #b8beca default */
.cui-menu-left-submenu .cui-menu-left-item > a,
.cui-menu-left-submenu .cui-menu-left-item > a:link,
.cui-menu-left-submenu .cui-menu-left-item > a:visited {
    padding: 8px 16px 8px 50px !important;
    font-size: .76rem !important;
    font-weight: 400 !important;
    color: rgba(255,255,255,.75) !important;
    display: flex !important;
    align-items: center !important;
    gap: .45rem !important;
    text-decoration: none !important;
    transition: background .14s, color .14s, padding-left .14s !important;
    border-radius: 0 !important;
    min-height: unset !important;
}

.cui-menu-left-submenu .cui-menu-left-item > a:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,.10) !important;
    padding-left: 56px !important;
}

.cui-menu-left-submenu .cui-menu-left-item.cui-menu-left-item-active > a {
    color: #ffffff !important;
    background: rgba(1,144,254,.15) !important;
    font-weight: 600 !important;
    border-left: 2px solid #0190fe !important;
    padding-left: 48px !important;
}

/* Sub-item icon */
.cui-menu-left-submenu .cui-menu-left-item > a .cui-menu-left-icon {
    width: 22px !important;
    min-width: 22px !important;
    font-size: .78rem !important;
    color: rgba(255,255,255,.50) !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
}

.cui-menu-left-submenu .cui-menu-left-item > a:hover .cui-menu-left-icon,
.cui-menu-left-submenu .cui-menu-left-item.cui-menu-left-item-active .cui-menu-left-icon {
    color: rgba(255,255,255,.95) !important;
}

/*#endregion */

    min-width: 22px !important;
    /*#region Menu search box (P2 override with tokens) */

.menu-search-wrap {
    background: rgba(255,255,255,.05) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    margin: 10px 12px 4px !important;
    transition: border-color .18s, background .18s !important;
}

.menu-search-wrap:focus-within {
    background: rgba(255,255,255,.09) !important;
    border-color: rgba(1,144,254,.45) !important;
}

#menuSearch {
    background: transparent !important;
    border: none !important;
    color: rgba(255,255,255,.75) !important;
    font-size: .75rem !important;
    padding: 6px 10px 6px 32px !important;
}

#menuSearch::placeholder { color: rgba(255,255,255,.30) !important; }
#menuSearch:focus { outline: none !important; box-shadow: none !important; }

.menu-search-icon { color: rgba(255,255,255,.30) !important; }
.menu-search-wrap:focus-within .menu-search-icon { color: var(--elite-brand) !important; }

/* Category label in list-root (cui-menu-left-divider text) */
.menu-brand-stamp > a.menu-brand-link {
    color: rgba(255,255,255,.35) !important;
}

/*#endregion */

/*#region Collapsed sidebar icon-only mode */

.cui-menu-left-toggled .cui-menu-left:not(:hover) .cui-menu-left-title {
    opacity: 0 !important;
    pointer-events: none !important;
}

.cui-menu-left-toggled .cui-menu-left:not(:hover) .cui-menu-left-icon {
    width: 46px !important;
    min-width: 46px !important;
    font-size: 1.05rem !important;
}

/* Keep search wrap visible but shrink it to an icon-only state.
   User can click/focus it → JS auto-expands the sidebar. */
.cui-menu-left-toggled .cui-menu-left:not(:hover) .menu-search-wrap {
    margin: 10px 8px 4px !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.cui-menu-left-toggled .cui-menu-left:not(:hover) #menuSearch {
    width: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.cui-menu-left-toggled .cui-menu-left:not(:hover) .menu-search-icon {
    position: static !important;
    transform: none !important;
    left: auto !important;
    opacity: 1 !important;  /* keep icon visible */
    color: rgba(255,255,255,.55) !important;
    font-size: .85rem !important;
}

.cui-menu-left-toggled .cui-menu-left:not(:hover) .cui-menu-left-submenu > a:before,
.cui-menu-left-toggled .cui-menu-left:not(:hover) .cui-menu-left-submenu > a:after {
    display: none !important;
}

/*#endregion */

/*#region Section category labels */

/* Visually group menu sections with a micro-label above divider */
.cui-menu-left-list-root > .cui-menu-left-divider {
    position: relative;
}

/*#endregion */

/*#region Dark/Light theme toggle button */

.elite-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: rgba(1,144,254,.08);
    border: 1px solid rgba(1,144,254,.18);
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: .72rem;
    font-weight: 600;
    color: #4a5270;
    transition: background .18s, border-color .18s, color .18s;
    white-space: nowrap;
    user-select: none;
}

.elite-theme-toggle:hover {
    background: rgba(1,144,254,.15);
    border-color: rgba(1,144,254,.35);
    color: var(--elite-brand);
}

.elite-theme-toggle .toggle-icon {
    font-size: .82rem;
    transition: transform .35s ease;
}

/*#endregion */

/*#region Dark theme – content area overrides */

/* ─────────────────────────────────────────────────────────────
   DARK MODE — COMPLETE PROFESSIONAL THEME
   Palette: deep navy-blue (#0b1120) base, layered surfaces,
   electric-blue (#0190fe) accent, soft typography.
   ───────────────────────────────────────────────────────────── */

/* ══ 1. BASE ══════════════════════════════════════════════════ */
body[data-theme="dark"] {
    background: var(--content-bg) !important;
    color: var(--text-primary) !important;
}

/* Global scrollbar */
body[data-theme="dark"] ::-webkit-scrollbar              { width: 6px; height: 6px; }
body[data-theme="dark"] ::-webkit-scrollbar-track        { background: #0b1120; }
body[data-theme="dark"] ::-webkit-scrollbar-thumb        { background: #1e3555; border-radius: 6px; }
body[data-theme="dark"] ::-webkit-scrollbar-thumb:hover  { background: #2a4a75; }

/* Headings */
body[data-theme="dark"] h1, body[data-theme="dark"] h2,
body[data-theme="dark"] h3, body[data-theme="dark"] h4,
body[data-theme="dark"] h5, body[data-theme="dark"] h6 {
    color: #e2e8f8 !important;
}

body[data-theme="dark"] p, body[data-theme="dark"] span,
body[data-theme="dark"] small, body[data-theme="dark"] li {
    color: var(--text-secondary);
}

body[data-theme="dark"] strong, body[data-theme="dark"] b {
    color: #c8d6f0 !important;
}

body[data-theme="dark"] hr {
    border-color: var(--divider) !important;
    opacity: 1 !important;
}

body[data-theme="dark"] a {
    color: #60a5fa;
}
body[data-theme="dark"] a:hover {
    color: #93c5fd;
}

/* ══ 2. TOPBAR ════════════════════════════════════════════════ */
body[data-theme="dark"] .cui-topbar {
    background: linear-gradient(90deg, #0a1428 0%, #0f1a2e 100%) !important;
    border-bottom: 1px solid var(--topbar-border) !important;
    box-shadow: 0 2px 16px rgba(0,0,0,.40) !important;
}

body[data-theme="dark"] .cui-topbar .text-primary {
    color: var(--elite-brand) !important;
}

/* ══ 3. BREADCRUMBS ═══════════════════════════════════════════ */
body[data-theme="dark"] .cui-breadcrumbs {
    background: linear-gradient(90deg, #0d1627, #0f1b30) !important;
    border-bottom: 1px solid var(--topbar-border) !important;
    color: var(--text-secondary) !important;
}

body[data-theme="dark"] .cui-breadcrumbs strong {
    color: var(--text-primary) !important;
}

body[data-theme="dark"] .breadcrumb-item a { color: #60a5fa !important; }
body[data-theme="dark"] .breadcrumb-item.active { color: #7a8fb0 !important; }
body[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before { color: #3d5070 !important; }

/* ══ 4. CONTENT AREA ══════════════════════════════════════════ */
body[data-theme="dark"] .cui-utils-content {
    background: var(--content-bg) !important;
}

/* ══ 5. CARDS ════════════════════════════════════════════════ */
body[data-theme="dark"] .card {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.30) !important;
    color: var(--text-primary) !important;
}

body[data-theme="dark"] .card-header {
    background: linear-gradient(90deg, #0d1a30, #112240) !important;
    border-bottom: 1px solid var(--card-border) !important;
    color: #c8d6f0 !important;
}

body[data-theme="dark"] .card-footer {
    background: #0d1627 !important;
    border-top: 1px solid var(--card-border) !important;
    color: var(--text-secondary) !important;
}

body[data-theme="dark"] .card-body {
    background: var(--card-bg) !important;
}

body[data-theme="dark"] .card-title { color: #c8d6f0 !important; }
body[data-theme="dark"] .card-text  { color: var(--text-secondary) !important; }

/* ══ 6. FORMS ════════════════════════════════════════════════ */
body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select,
body[data-theme="dark"] input[type="text"],
body[data-theme="dark"] input[type="number"],
body[data-theme="dark"] input[type="email"],
body[data-theme="dark"] input[type="password"],
body[data-theme="dark"] input[type="date"],
body[data-theme="dark"] input[type="time"],
body[data-theme="dark"] input[type="search"],
body[data-theme="dark"] textarea,
body[data-theme="dark"] select {
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    color: var(--text-primary) !important;
    transition: border-color .2s, box-shadow .2s !important;
}

body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus,
body[data-theme="dark"] input:focus,
body[data-theme="dark"] textarea:focus,
body[data-theme="dark"] select:focus {
    border-color: var(--elite-brand) !important;
    box-shadow: 0 0 0 3px rgba(1,144,254,.20) !important;
    background: #0d1e35 !important;
    outline: none !important;
}

body[data-theme="dark"] .form-control::placeholder,
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
    color: #3d5070 !important;
    opacity: 1 !important;
}

body[data-theme="dark"] .form-control:disabled,
body[data-theme="dark"] .form-control[readonly],
body[data-theme="dark"] .form-select:disabled {
    background: #0a1428 !important;
    color: #3d5070 !important;
    border-color: #152035 !important;
}

body[data-theme="dark"] label,
body[data-theme="dark"] .form-label,
body[data-theme="dark"] .col-form-label {
    color: #8aa4cc !important;
}

body[data-theme="dark"] .form-text,
body[data-theme="dark"] .text-muted {
    color: #4a6080 !important;
}

body[data-theme="dark"] .form-check-label    { color: #8aa4cc !important; }
body[data-theme="dark"] .form-check-input    { background-color: #0b1628 !important; border-color: #1e3050 !important; }
body[data-theme="dark"] .form-check-input:checked {
    background-color: var(--elite-brand) !important;
    border-color: var(--elite-brand) !important;
}

body[data-theme="dark"] .input-group-text {
    background: #0f1e35 !important;
    border-color: var(--input-border) !important;
    color: #6080a8 !important;
}

/* ══ 7. BUTTONS ══════════════════════════════════════════════ */
body[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #0073e0, #0190fe) !important;
    border-color: #0073e0 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(1,144,254,.30) !important;
}
body[data-theme="dark"] .btn-primary:hover {
    background: linear-gradient(135deg, #005dc2, #007de8) !important;
    box-shadow: 0 4px 14px rgba(1,144,254,.40) !important;
}

body[data-theme="dark"] .btn-secondary {
    background: #1a2740 !important;
    border-color: #253550 !important;
    color: #8aa4cc !important;
}
body[data-theme="dark"] .btn-secondary:hover {
    background: #1f3050 !important;
    color: #c8d6f0 !important;
}

body[data-theme="dark"] .btn-success {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    border-color: #059669 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(16,185,129,.25) !important;
}

body[data-theme="dark"] .btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    border-color: #dc2626 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(239,68,68,.25) !important;
}

body[data-theme="dark"] .btn-warning {
    background: linear-gradient(135deg, #d97706, #f59e0b) !important;
    border-color: #d97706 !important;
    color: #0a1020 !important;
    box-shadow: 0 2px 8px rgba(245,158,11,.25) !important;
}

body[data-theme="dark"] .btn-info {
    background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
    border-color: #0284c7 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(56,189,248,.25) !important;
}

body[data-theme="dark"] .btn-light {
    background: #1a2740 !important;
    border-color: #253550 !important;
    color: #c8d6f0 !important;
}

body[data-theme="dark"] .btn-outline-primary {
    border-color: #0190fe !important;
    color: #60a5fa !important;
    background: transparent !important;
}
body[data-theme="dark"] .btn-outline-primary:hover {
    background: rgba(1,144,254,.15) !important;
    color: #93c5fd !important;
}

body[data-theme="dark"] .btn-outline-secondary {
    border-color: #253550 !important;
    color: #8aa4cc !important;
    background: transparent !important;
}
body[data-theme="dark"] .btn-outline-secondary:hover {
    background: #1a2740 !important;
    color: #c8d6f0 !important;
}

body[data-theme="dark"] .btn-kv {
    background: #0d1e35 !important;
    border-color: #1e3050 !important;
    color: #60a5fa !important;
}
body[data-theme="dark"] .btn-kv:hover {
    background: rgba(1,144,254,.15) !important;
}

/* ══ 8. BADGES ═══════════════════════════════════════════════ */
body[data-theme="dark"] .badge.bg-primary   { background: rgba(1,144,254,.20) !important; color: #60a5fa !important; border: 1px solid rgba(1,144,254,.30) !important; }
body[data-theme="dark"] .badge.bg-success   { background: rgba(16,185,129,.18) !important; color: #34d399 !important; border: 1px solid rgba(16,185,129,.28) !important; }
body[data-theme="dark"] .badge.bg-danger    { background: rgba(239,68,68,.18) !important; color: #f87171 !important; border: 1px solid rgba(239,68,68,.28) !important; }
body[data-theme="dark"] .badge.bg-warning   { background: rgba(245,158,11,.18) !important; color: #fbbf24 !important; border: 1px solid rgba(245,158,11,.28) !important; }
body[data-theme="dark"] .badge.bg-info      { background: rgba(56,189,248,.18) !important; color: #7dd3fc !important; border: 1px solid rgba(56,189,248,.28) !important; }
body[data-theme="dark"] .badge.bg-secondary { background: #1a2740 !important; color: #8aa4cc !important; border: 1px solid #253550 !important; }
body[data-theme="dark"] .badge.bg-dark      { background: #0a1020 !important; color: #c8d6f0 !important; }
body[data-theme="dark"] .badge.bg-light     { background: #1a2740 !important; color: #c8d6f0 !important; }

/* ══ 9. NAVIGATION / TABS ════════════════════════════════════ */
body[data-theme="dark"] .nav-tabs {
    border-bottom: 2px solid rgba(1,144,254,.15) !important;
}

body[data-theme="dark"] .nav-tabs .nav-link {
    color: #7a8fb0 !important;
    background: transparent !important;
    border-color: transparent !important;
    border-radius: 8px 8px 0 0 !important;
    transition: color .2s, background .2s !important;
}

body[data-theme="dark"] .nav-tabs .nav-link:hover {
    color: #c8d6f0 !important;
    background: rgba(1,144,254,.08) !important;
    border-color: rgba(1,144,254,.15) transparent !important;
}

body[data-theme="dark"] .nav-tabs .nav-link.active {
    background: linear-gradient(180deg, rgba(1,144,254,.18), rgba(1,144,254,.06)) !important;
    border-color: rgba(1,144,254,.30) rgba(1,144,254,.30) transparent !important;
    color: #60a5fa !important;
    font-weight: 700 !important;
}

body[data-theme="dark"] .tab-content {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-top: none !important;
    border-radius: 0 0 10px 10px !important;
    padding: 1rem !important;
}

body[data-theme="dark"] .nav-pills .nav-link { color: #7a8fb0 !important; }
body[data-theme="dark"] .nav-pills .nav-link.active {
    background: linear-gradient(135deg, #0073e0, #0190fe) !important;
    color: #fff !important;
}

/* ══ 10. TABLES (standard Bootstrap) ════════════════════════ */
body[data-theme="dark"] .table {
    color: var(--text-primary) !important;
    border-color: #1a2e48 !important;
}

body[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent !important;
    border-bottom-color: #1a2e48 !important;
    color: var(--text-primary) !important;
}

body[data-theme="dark"] .table thead th,
body[data-theme="dark"] .table > thead > tr > th {
    background: linear-gradient(90deg, #091525, #0f1e35) !important;
    color: #8aa4cc !important;
    border-color: #1a2e48 !important;
    font-weight: 700 !important;
    letter-spacing: .03em !important;
}

body[data-theme="dark"] .table tbody tr:nth-child(even) > td { background: rgba(1,144,254,.04) !important; }
body[data-theme="dark"] .table tbody tr:hover > td { background: rgba(1,144,254,.08) !important; }
body[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(255,255,255,.02) !important; }
body[data-theme="dark"] .table-hover > tbody > tr:hover > * { background-color: rgba(1,144,254,.08) !important; }

body[data-theme="dark"] .table-bordered { border-color: #1a2e48 !important; }
body[data-theme="dark"] .table-bordered td,
body[data-theme="dark"] .table-bordered th { border-color: #1a2e48 !important; }

/* ══ 11. MVC-GRID (data tables) ══════════════════════════════ */
body[data-theme="dark"] .mvc-grid > table > thead > tr.mvc-grid-headers > th {
    background: linear-gradient(90deg, #091525 0%, #0f1e35 100%) !important;
    color: #8aa4cc !important;
    border-color: rgba(1,144,254,.10) !important;
}

body[data-theme="dark"] .mvc-grid > table > thead > tr.mvc-grid-row-filters > th {
    background: #0d1a2e !important;
    border-color: rgba(1,144,254,.10) !important;
    border-bottom-color: var(--elite-brand) !important;
}

body[data-theme="dark"] .mvc-grid-row-filters input.mvc-grid-value,
body[data-theme="dark"] .mvc-grid-row-filters select.mvc-grid-value {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}

body[data-theme="dark"] .mvc-grid-row-filters input.mvc-grid-value:focus,
body[data-theme="dark"] .mvc-grid-row-filters select.mvc-grid-value:focus {
    background: #0d1e35 !important;
    border-color: var(--elite-brand) !important;
    box-shadow: 0 0 0 2px rgba(1,144,254,.20) !important;
}

body[data-theme="dark"] .mvc-grid-row-filters button.mvc-grid-filter-button,
body[data-theme="dark"] .mvc-grid-row-filters .mvc-grid-filter-button {
    color: #60a5fa !important;
}

body[data-theme="dark"] .mvc-grid > table > tbody > tr > td {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: #1a2e48 !important;
}

body[data-theme="dark"] .mvc-grid > table > tbody > tr:nth-child(even) > td {
    background: rgba(1,144,254,.04) !important;
}

body[data-theme="dark"] .mvc-grid > table > tbody > tr:hover > td {
    background: rgba(1,144,254,.09) !important;
    cursor: pointer;
}

/* Grid toolbar */
body[data-theme="dark"] .grid-toolbar-cell {
    background: #0a1628 !important;
    border-bottom: 1px solid #1a2e48 !important;
}

/* ══ 12. PAGER ═══════════════════════════════════════════════ */
body[data-theme="dark"] .mvc-grid-pager.elite-pager {
    background: #08111e !important;
    border-top: 1px solid #1a2e48 !important;
}

body[data-theme="dark"] .elite-pager-btn {
    background: #0f1e35 !important;
    border-color: #1e3050 !important;
    color: #6080a8 !important;
}

body[data-theme="dark"] .elite-pager-btn:hover:not(:disabled) {
    background: rgba(1,144,254,.14) !important;
    color: #60a5fa !important;
    border-color: rgba(1,144,254,.30) !important;
}

body[data-theme="dark"] .elite-pager-btn.active {
    background: linear-gradient(135deg, #0073e0, #0190fe) !important;
    color: #fff !important;
    border-color: #0073e0 !important;
}

body[data-theme="dark"] .elite-pager-info {
    background: rgba(1,144,254,.08) !important;
    border-color: rgba(1,144,254,.15) !important;
    color: #6080a8 !important;
}

body[data-theme="dark"] .elite-pager-rows-select,
body[data-theme="dark"] .elite-pager-rows-input {
    background: #0b1628 !important;
    border-color: #1e3050 !important;
    color: #8aa4cc !important;
}

/* ══ 13. DROPDOWNS ═══════════════════════════════════════════ */
body[data-theme="dark"] .dropdown-menu {
    background: var(--surface-3) !important;
    border: 1px solid rgba(1,144,254,.15) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,.55), 0 2px 8px rgba(1,144,254,.08) !important;
    color: var(--text-primary) !important;
}

body[data-theme="dark"] .dropdown-item {
    color: #c0cce0 !important;
    background: transparent !important;
    border-radius: 6px;
    transition: background .15s, color .15s;
}

body[data-theme="dark"] .dropdown-item:hover,
body[data-theme="dark"] .dropdown-item:focus {
    background: rgba(1,144,254,.12) !important;
    color: #60a5fa !important;
}

body[data-theme="dark"] .dropdown-item.active,
body[data-theme="dark"] .dropdown-item:active {
    background: rgba(1,144,254,.20) !important;
    color: #93c5fd !important;
}

body[data-theme="dark"] .dropdown-divider {
    border-color: rgba(1,144,254,.10) !important;
}

body[data-theme="dark"] .dropdown-header {
    color: #4a6080 !important;
    font-size: .7rem !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
}

/* ══ 14. MODALS ══════════════════════════════════════════════ */
body[data-theme="dark"] .modal-content {
    background: var(--surface-3) !important;
    border: 1px solid rgba(1,144,254,.15) !important;
    box-shadow: 0 24px 60px rgba(0,0,0,.70) !important;
    color: var(--text-primary) !important;
}

body[data-theme="dark"] .modal-header {
    background: linear-gradient(90deg, #0a1628, #0f1e35) !important;
    border-bottom: 1px solid rgba(1,144,254,.15) !important;
}

body[data-theme="dark"] .modal-footer {
    background: #0a1628 !important;
    border-top: 1px solid rgba(1,144,254,.12) !important;
}

body[data-theme="dark"] .modal-title { color: #c8d6f0 !important; }

body[data-theme="dark"] .btn-close {
    filter: invert(1) brightness(0.6) !important;
}

/* Modal backdrop */
body[data-theme="dark"] .modal-backdrop {
    background-color: rgba(0,0,0,.75) !important;
}

/* ══ 15. ALERTS ══════════════════════════════════════════════ */
body[data-theme="dark"] .elite-alert-success {
    background: linear-gradient(135deg, rgba(5,150,105,.15), rgba(16,185,129,.08)) !important;
    border-left: 4px solid #10b981 !important;
    color: #34d399 !important;
}

body[data-theme="dark"] .elite-alert-warning {
    background: linear-gradient(135deg, rgba(217,119,6,.15), rgba(245,158,11,.08)) !important;
    border-left: 4px solid #f59e0b !important;
    color: #fbbf24 !important;
}

body[data-theme="dark"] .elite-alert-danger {
    background: linear-gradient(135deg, rgba(220,38,38,.15), rgba(239,68,68,.08)) !important;
    border-left: 4px solid #ef4444 !important;
    color: #f87171 !important;
}

body[data-theme="dark"] .alert-success {
    background: rgba(16,185,129,.12) !important;
    border-color: rgba(16,185,129,.25) !important;
    color: #34d399 !important;
}
body[data-theme="dark"] .alert-danger {
    background: rgba(239,68,68,.12) !important;
    border-color: rgba(239,68,68,.25) !important;
    color: #f87171 !important;
}
body[data-theme="dark"] .alert-warning {
    background: rgba(245,158,11,.12) !important;
    border-color: rgba(245,158,11,.25) !important;
    color: #fbbf24 !important;
}
body[data-theme="dark"] .alert-info {
    background: rgba(56,189,248,.12) !important;
    border-color: rgba(56,189,248,.25) !important;
    color: #7dd3fc !important;
}

/* ══ 16. LIST GROUPS ══════════════════════════════════════════ */
body[data-theme="dark"] .list-group-item {
    background: var(--card-bg) !important;
    border-color: #1a2e48 !important;
    color: var(--text-primary) !important;
}
body[data-theme="dark"] .list-group-item:hover {
    background: rgba(1,144,254,.08) !important;
}
body[data-theme="dark"] .list-group-item.active {
    background: rgba(1,144,254,.20) !important;
    border-color: rgba(1,144,254,.30) !important;
    color: #60a5fa !important;
}

/* ══ 17. SELECT2 ═════════════════════════════════════════════ */
body[data-theme="dark"] .select2-container--default .select2-selection--single,
body[data-theme="dark"] .select2-container--default .select2-selection--multiple {
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    color: var(--text-primary) !important;
}

body[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
}

body[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-top-color: #6080a8 !important;
}

body[data-theme="dark"] .select2-dropdown {
    background: var(--surface-3) !important;
    border: 1px solid rgba(1,144,254,.20) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,.50) !important;
}

body[data-theme="dark"] .select2-container--default .select2-results__option {
    background: transparent !important;
    color: #c0cce0 !important;
}

body[data-theme="dark"] .select2-container--default .select2-results__option--highlighted {
    background: rgba(1,144,254,.18) !important;
    color: #60a5fa !important;
}

body[data-theme="dark"] .select2-container--default .select2-results__option--selected {
    background: rgba(1,144,254,.10) !important;
    color: #93c5fd !important;
}

body[data-theme="dark"] .select2-search__field {
    background: #0b1628 !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}

body[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: rgba(1,144,254,.20) !important;
    border-color: rgba(1,144,254,.30) !important;
    color: #60a5fa !important;
}

/* ══ 18. PAYER SELECTOR ══════════════════════════════════════ */
body[data-theme="dark"] .payer-selector {
    background: rgba(255,255,255,.04) !important;
    border: 1px solid rgba(1,144,254,.15) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.30) !important;
}

body[data-theme="dark"] .payer-selector-select,
body[data-theme="dark"] select.payer-selector-select {
    color: var(--text-primary) !important;
    background: transparent !important;
}

body[data-theme="dark"] .payer-selector-label { color: var(--elite-brand) !important; }

/* ══ 19. DASHBOARD ═══════════════════════════════════════════ */
body[data-theme="dark"] .dash-header {
    border-bottom: 1px solid rgba(1,144,254,.12) !important;
}

body[data-theme="dark"] .dash-date-btn {
    background: rgba(255,255,255,.05) !important;
    border: 1px solid rgba(1,144,254,.18) !important;
    color: #c8d6f0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.25) !important;
}

body[data-theme="dark"] .dash-date-btn:hover {
    background: rgba(1,144,254,.12) !important;
    border-color: rgba(1,144,254,.30) !important;
    color: #fff !important;
}

body[data-theme="dark"] .kpi-card {
    background: linear-gradient(135deg, #0f1e35, #152540) !important;
    border: 1px solid rgba(1,144,254,.14) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.30) !important;
}

body[data-theme="dark"] .kpi-value { color: #e2e8f8 !important; }
body[data-theme="dark"] .kpi-label { color: #5a7090 !important; }

body[data-theme="dark"] .dash-chart-card {
    background: linear-gradient(160deg, #0f1e35, #0d1a2e) !important;
    border: 1px solid rgba(1,144,254,.12) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.30) !important;
}

body[data-theme="dark"] .dash-chart-title { color: #c8d6f0 !important; }
body[data-theme="dark"] .dash-payer-label { color: #60a5fa !important; }

/* ══ 20. USER MENU DROPDOWN ══════════════════════════════════ */
body[data-theme="dark"] .usermenu-dropdown {
    background: linear-gradient(160deg, #0f1e35, #1a2a45) !important;
    border: 1px solid rgba(1,144,254,.18) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,.60) !important;
}

body[data-theme="dark"] .usermenu-item {
    color: #b0c0dc !important;
}

body[data-theme="dark"] .usermenu-item:hover {
    background: rgba(1,144,254,.12) !important;
    color: #60a5fa !important;
}

/* ══ 21. NOTIFICATION PANELS ══════════════════════════════════ */
body[data-theme="dark"] .notif-dropdown {
    background: #0e1b30 !important;
    border: 1px solid rgba(1,144,254,.20) !important;
    box-shadow: 0 16px 50px rgba(0,0,0,.65), 0 2px 8px rgba(1,144,254,.12) !important;
}

body[data-theme="dark"] .notif-panel-header-ready   { background: linear-gradient(90deg, #052e1a, #064526) !important; }
body[data-theme="dark"] .notif-panel-header-pending { background: linear-gradient(90deg, #2a1a02, #3d2804) !important; }
body[data-theme="dark"] .notif-panel-header-info    { background: linear-gradient(90deg, #051a3a, #0a2450) !important; }
body[data-theme="dark"] .notif-panel-header-batch   { background: linear-gradient(90deg, #032420, #054030) !important; }
body[data-theme="dark"] .notif-panel-header-ops     { background: linear-gradient(90deg, #14084a, #1e0d6a) !important; }

body[data-theme="dark"] .notif-panel-body {
    background: linear-gradient(180deg, #0b1628 0%, #091325 100%) !important;
}

body[data-theme="dark"] .notif-item {
    background: linear-gradient(135deg, var(--ni-bg-from), var(--ni-bg-to)) !important;
    filter: brightness(0.72) saturate(1.3);
    border-color: var(--ni-border) !important;
}

body[data-theme="dark"] .notif-item:hover {
    filter: brightness(0.85) saturate(1.4);
    border-color: var(--ni-accent) !important;
    box-shadow: 0 6px 22px var(--ni-glow) !important;
}

body[data-theme="dark"] .notif-item-title  { color: #c8d6f0 !important; }
body[data-theme="dark"] .notif-item-meta span { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.10) !important; color: #7090b8 !important; }
body[data-theme="dark"] .notif-item-text   { color: #9ab0cc !important; }
body[data-theme="dark"] .notif-empty       { background: #091325 !important; color: #3d5570 !important; }

body[data-theme="dark"] .notif-panel-footer {
    background: linear-gradient(90deg, #06101e 0%, #0a1628 100%) !important;
    border-top: 1px solid rgba(1,144,254,.12) !important;
}

/* ══ 22. FOOTER ══════════════════════════════════════════════ */
body[data-theme="dark"] .cui-footer {
    background: linear-gradient(90deg, #06101e 0%, #0a1426 100%) !important;
    border-top: 1px solid rgba(1,144,254,.10) !important;
}

body[data-theme="dark"] .footer-col-title  { color: #8aa4cc !important; }

body[data-theme="dark"] .footer-links a,
body[data-theme="dark"] .footer-col-info .footer-info-item {
    color: #3d5570 !important;
}

body[data-theme="dark"] .footer-links a:hover { color: #60a5fa !important; }
body[data-theme="dark"] .footer-tagline { color: #253550 !important; }

/* ══ 23. MISCELLANEOUS ELEMENTS ═══════════════════════════════ */
/* Tooltip */
body[data-theme="dark"] .tooltip-inner {
    background: #1a2a45 !important;
    color: #c8d6f0 !important;
    border: 1px solid rgba(1,144,254,.20) !important;
}
body[data-theme="dark"] .bs-tooltip-top .tooltip-arrow::before    { border-top-color: #1a2a45 !important; }
body[data-theme="dark"] .bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: #1a2a45 !important; }

/* Progress bars */
body[data-theme="dark"] .progress {
    background: #0a1628 !important;
    border: 1px solid #1a2e48 !important;
}

body[data-theme="dark"] .progress-bar {
    background: linear-gradient(90deg, #0073e0, #0190fe) !important;
}

/* Spinners */
body[data-theme="dark"] .spinner-border { color: #0190fe !important; }

/* Bootstrap table card-variant rows */
body[data-theme="dark"] .table-primary { background: rgba(1,144,254,.12) !important; }
body[data-theme="dark"] .table-success  { background: rgba(16,185,129,.10) !important; }
body[data-theme="dark"] .table-danger   { background: rgba(239,68,68,.10) !important; }
body[data-theme="dark"] .table-warning  { background: rgba(245,158,11,.10) !important; }
body[data-theme="dark"] .table-info     { background: rgba(56,189,248,.10) !important; }

/* Pagination */
body[data-theme="dark"] .page-item .page-link {
    background: #0f1e35 !important;
    border-color: #1e3050 !important;
    color: #6080a8 !important;
}
body[data-theme="dark"] .page-item .page-link:hover {
    background: rgba(1,144,254,.14) !important;
    color: #60a5fa !important;
}
body[data-theme="dark"] .page-item.active .page-link {
    background: linear-gradient(135deg, #0073e0, #0190fe) !important;
    border-color: #0073e0 !important;
    color: #fff !important;
}
body[data-theme="dark"] .page-item.disabled .page-link {
    background: #0a1020 !important;
    color: #253550 !important;
    border-color: #152035 !important;
}

/* Accordion */
body[data-theme="dark"] .accordion-item {
    background: var(--card-bg) !important;
    border-color: #1a2e48 !important;
}
body[data-theme="dark"] .accordion-button {
    background: #0f1e35 !important;
    color: #c8d6f0 !important;
    box-shadow: none !important;
}
body[data-theme="dark"] .accordion-button:not(.collapsed) {
    background: linear-gradient(90deg, #0a1e38, #0f2a50) !important;
    color: #60a5fa !important;
}
body[data-theme="dark"] .accordion-body {
    background: var(--card-bg) !important;
    color: var(--text-secondary) !important;
}

/* Bootstrap text utilities */
body[data-theme="dark"] .text-dark    { color: #c8d6f0 !important; }
body[data-theme="dark"] .text-body    { color: var(--text-primary) !important; }
body[data-theme="dark"] .text-muted   { color: #4a6080 !important; }
body[data-theme="dark"] .text-black   { color: #e2e8f8 !important; }
body[data-theme="dark"] .bg-white     { background: var(--card-bg) !important; }
body[data-theme="dark"] .bg-light     { background: #0f1a2e !important; }
body[data-theme="dark"] .border       { border-color: #1a2e48 !important; }
body[data-theme="dark"] .border-bottom { border-bottom-color: #1a2e48 !important; }
body[data-theme="dark"] .border-top   { border-top-color: #1a2e48 !important; }
body[data-theme="dark"] .shadow       { box-shadow: 0 4px 20px rgba(0,0,0,.40) !important; }
body[data-theme="dark"] .shadow-sm    { box-shadow: 0 2px 8px rgba(0,0,0,.30) !important; }

/* Bootstrap tagsinput */
body[data-theme="dark"] .bootstrap-tagsinput {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
body[data-theme="dark"] .bootstrap-tagsinput .tag {
    background: rgba(1,144,254,.22) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(1,144,254,.30) !important;
}

/* Print override: restore light mode for printing */
@media print {
    body[data-theme="dark"] { background: #fff !important; color: #000 !important; }
    body[data-theme="dark"] * { background: transparent !important; color: #000 !important; }
}

/* ══ 24. THEME TOGGLE BUTTON ══════════════════════════════════ */
body[data-theme="dark"] .elite-theme-toggle .toggle-icon {
    transform: rotate(180deg);
}

body[data-theme="dark"] .elite-theme-toggle {
    background: rgba(255,255,255,.05) !important;
    border: 1px solid rgba(1,144,254,.20) !important;
    color: rgba(255,255,255,.70) !important;
}

body[data-theme="dark"] .elite-theme-toggle:hover {
    background: rgba(1,144,254,.14) !important;
    border-color: rgba(1,144,254,.40) !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(1,144,254,.25) !important;
}

/*#endregion */

/* ═══════════════════════════════════════════════════════════════
   END SIDEBAR + DARK / LIGHT THEME
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   DARK MODE — THIRD-PARTY LIBRARY OVERRIDES
   jQuery DataTables · alertify · bootstrap-tagsinput · fileinput
   jstree · select2 · cleanui vendor components
   ═══════════════════════════════════════════════════════════════ */

/*#region DataTables dark mode */

/* ── Wrapper & controls bar ─────────────────────────────────── */
body[data-theme="dark"] .dataTables_wrapper {
    color: #c8d6f0 !important;
    background: transparent !important;
}

body[data-theme="dark"] .dataTables_wrapper .dataTables_length label,
body[data-theme="dark"] .dataTables_wrapper .dataTables_filter label,
body[data-theme="dark"] .dataTables_wrapper .dataTables_info {
    color: #7a8fb0 !important;
}

body[data-theme="dark"] .dataTables_wrapper .dataTables_length select,
body[data-theme="dark"] .dataTables_wrapper .dataTables_filter input {
    background: #0b1628 !important;
    border: 1px solid #1e3050 !important;
    color: #c8d6f0 !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
    outline: none !important;
}

body[data-theme="dark"] .dataTables_wrapper .dataTables_filter input:focus {
    border-color: #0190fe !important;
    box-shadow: 0 0 0 2px rgba(1,144,254,.20) !important;
}

/* ── Table header ───────────────────────────────────────────── */
body[data-theme="dark"] table.dataTable thead th,
body[data-theme="dark"] table.dataTable thead td {
    background: linear-gradient(90deg, #091525 0%, #0d1e35 100%) !important;
    color: #8aa4cc !important;
    border-bottom: 2px solid rgba(1,144,254,.20) !important;
    border-color: rgba(1,144,254,.12) !important;
    font-weight: 700 !important;
    letter-spacing: .03em !important;
    text-transform: uppercase !important;
    font-size: .75rem !important;
    white-space: nowrap !important;
}

body[data-theme="dark"] table.dataTable thead th.sorting,
body[data-theme="dark"] table.dataTable thead th.sorting_asc,
body[data-theme="dark"] table.dataTable thead th.sorting_desc {
    background: linear-gradient(90deg, #091525, #0d1e35) !important;
    color: #8aa4cc !important;
}

body[data-theme="dark"] table.dataTable thead th.sorting_asc  { color: #60a5fa !important; }
body[data-theme="dark"] table.dataTable thead th.sorting_desc { color: #60a5fa !important; }

/* Sort icons */
body[data-theme="dark"] table.dataTable thead .sorting::after,
body[data-theme="dark"] table.dataTable thead .sorting_asc::after,
body[data-theme="dark"] table.dataTable thead .sorting_desc::after,
body[data-theme="dark"] table.dataTable thead .sorting::before,
body[data-theme="dark"] table.dataTable thead .sorting_asc::before,
body[data-theme="dark"] table.dataTable thead .sorting_desc::before {
    opacity: .5 !important;
    filter: invert(1) brightness(2) !important;
}

/* ── Table body ─────────────────────────────────────────────── */
body[data-theme="dark"] table.dataTable tbody tr {
    background: #0f1a2e !important;
    transition: background .15s !important;
}

body[data-theme="dark"] table.dataTable tbody tr:nth-child(even) {
    background: rgba(1,144,254,.04) !important;
}

body[data-theme="dark"] table.dataTable tbody tr:hover,
body[data-theme="dark"] table.dataTable tbody tr.odd:hover,
body[data-theme="dark"] table.dataTable tbody tr.even:hover {
    background: rgba(1,144,254,.10) !important;
    cursor: pointer;
}

body[data-theme="dark"] table.dataTable tbody tr.selected,
body[data-theme="dark"] table.dataTable tbody tr.odd.selected,
body[data-theme="dark"] table.dataTable tbody tr.even.selected {
    background: rgba(1,144,254,.18) !important;
}

body[data-theme="dark"] table.dataTable tbody td {
    background: transparent !important;
    color: #c8d6f0 !important;
    border-color: rgba(1,144,254,.08) !important;
    vertical-align: middle !important;
}

body[data-theme="dark"] table.dataTable.stripe tbody tr.odd,
body[data-theme="dark"] table.dataTable.display tbody tr.odd {
    background: #0f1a2e !important;
}

body[data-theme="dark"] table.dataTable.stripe tbody tr.even,
body[data-theme="dark"] table.dataTable.display tbody tr.even {
    background: rgba(1,144,254,.04) !important;
}

/* ── thead-dark helper (Bootstrap) ─────────────────────────── */
body[data-theme="dark"] .thead-dark th,
body[data-theme="dark"] thead.thead-dark th {
    background: linear-gradient(90deg, #091525, #0d1e35) !important;
    color: #8aa4cc !important;
    border-color: rgba(1,144,254,.12) !important;
}

/* ── Table borders ──────────────────────────────────────────── */
body[data-theme="dark"] table.dataTable,
body[data-theme="dark"] .table-bordered {
    border-color: rgba(1,144,254,.10) !important;
}

body[data-theme="dark"] table.dataTable.no-footer {
    border-bottom-color: rgba(1,144,254,.12) !important;
}

/* ── Pagination ─────────────────────────────────────────────── */
body[data-theme="dark"] .dataTables_wrapper .dataTables_paginate {
    padding-top: .5rem !important;
}

body[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #0f1e35 !important;
    border: 1px solid #1e3050 !important;
    color: #7a8fb0 !important;
    border-radius: 6px !important;
    margin: 0 2px !important;
    transition: background .15s, color .15s !important;
}

body[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(1,144,254,.15) !important;
    border-color: rgba(1,144,254,.30) !important;
    color: #60a5fa !important;
}

body[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, #0073e0, #0190fe) !important;
    border-color: #0073e0 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(1,144,254,.35) !important;
}

body[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: #0a1020 !important;
    border-color: #152035 !important;
    color: #253550 !important;
}

body[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.previous,
body[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.next {
    background: #0f1e35 !important;
    color: #60a5fa !important;
}

/* ── Scrollbar inside DataTables ────────────────────────────── */
body[data-theme="dark"] .dataTables_scrollBody {
    background: #0b1120 !important;
}

body[data-theme="dark"] .dataTables_scrollBody::-webkit-scrollbar       { width: 6px; height: 6px; }
body[data-theme="dark"] .dataTables_scrollBody::-webkit-scrollbar-track { background: #0a1020; }
body[data-theme="dark"] .dataTables_scrollBody::-webkit-scrollbar-thumb { background: #1e3555; border-radius: 6px; }

/* ── Fixed columns (FixedColumns ext) ──────────────────────── */
body[data-theme="dark"] .DTFC_LeftHeadWrapper,
body[data-theme="dark"] .DTFC_RightHeadWrapper {
    background: #091525 !important;
}
body[data-theme="dark"] .DTFC_LeftBodyWrapper,
body[data-theme="dark"] .DTFC_RightBodyWrapper {
    background: #0f1a2e !important;
}

/* ── ColReorder drag ghost ──────────────────────────────────── */
body[data-theme="dark"] table.DTCR_clonedTable {
    background: #0f1a2e !important;
    border: 2px solid #0190fe !important;
}

/* ── Buttons extension ──────────────────────────────────────── */
body[data-theme="dark"] .dt-buttons .dt-button,
body[data-theme="dark"] div.dt-buttons button {
    background: linear-gradient(135deg, #0f1e35, #152540) !important;
    border: 1px solid rgba(1,144,254,.25) !important;
    color: #8aa4cc !important;
    border-radius: 7px !important;
    transition: background .15s, color .15s !important;
}

body[data-theme="dark"] .dt-buttons .dt-button:hover,
body[data-theme="dark"] div.dt-buttons button:hover {
    background: rgba(1,144,254,.18) !important;
    color: #60a5fa !important;
    border-color: rgba(1,144,254,.40) !important;
}

/* ── Select extension checkbox ──────────────────────────────── */
body[data-theme="dark"] table.dataTable tbody td.select-checkbox::before,
body[data-theme="dark"] table.dataTable tbody th.select-checkbox::before {
    border: 2px solid #3d5570 !important;
    border-radius: 4px !important;
}

body[data-theme="dark"] table.dataTable tbody td.selected.select-checkbox::after,
body[data-theme="dark"] table.dataTable tbody th.selected.select-checkbox::after {
    border-color: #0190fe !important;
}

/* ── ColVis button ──────────────────────────────────────────── */
body[data-theme="dark"] div.ColVis_collection button span {
    color: #c8d6f0 !important;
}

/* ── Loading spinner ────────────────────────────────────────── */
body[data-theme="dark"] .dataTables_processing {
    background: linear-gradient(135deg, #0f1a2e, #1a2740) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(1,144,254,.20) !important;
    border-radius: 8px !important;
}

/* ── Row group headers (RowGroup ext) ───────────────────────── */
body[data-theme="dark"] table.dataTable tr.dtrg-group td {
    background: #091e38 !important;
    color: #60a5fa !important;
    font-weight: 700 !important;
}

/* ── Responsive extension detail rows ──────────────────────── */
body[data-theme="dark"] table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,
body[data-theme="dark"] table.dataTable > tbody > tr.child td.child {
    background: #081220 !important;
}

body[data-theme="dark"] table.dataTable > tbody > tr.child td.child ul.dtr-details li {
    border-bottom: 1px solid #1a2e48 !important;
    color: #c8d6f0 !important;
}

body[data-theme="dark"] table.dataTable > tbody > tr.child td.child ul.dtr-details .dtr-title {
    color: #7a8fb0 !important;
}

/* ── SearchPanes ────────────────────────────────────────────── */
body[data-theme="dark"] div.dtsp-panesContainer .dtsp-searchPane {
    background: #0f1a2e !important;
    border-color: rgba(1,144,254,.15) !important;
}

body[data-theme="dark"] div.dtsp-searchPane input {
    background: #0b1628 !important;
    border-color: #1e3050 !important;
    color: #c8d6f0 !important;
}

/* ── FilterDropDown (excel-like filter) ─────────────────────── */
body[data-theme="dark"] .filterDropDown,
body[data-theme="dark"] .filterSelect {
    background: #0b1628 !important;
    border: 1px solid #1e3050 !important;
    color: #c8d6f0 !important;
}

/*#endregion DataTables dark mode */

/*#region Alertify dark mode */

body[data-theme="dark"] .alertify,
body[data-theme="dark"] .alertify-notifier .ajs-message {
    color: #c8d6f0 !important;
}

body[data-theme="dark"] .alertify .ajs-dialog {
    background: #0f1a2e !important;
    border: 1px solid rgba(1,144,254,.18) !important;
    box-shadow: 0 16px 50px rgba(0,0,0,.70) !important;
}

body[data-theme="dark"] .alertify .ajs-header {
    background: linear-gradient(90deg, #0a1628, #0f1e35) !important;
    border-bottom: 1px solid rgba(1,144,254,.15) !important;
    color: #c8d6f0 !important;
}

body[data-theme="dark"] .alertify .ajs-body {
    background: #0f1a2e !important;
    color: #8aa4cc !important;
}

body[data-theme="dark"] .alertify .ajs-footer {
    background: #0a1628 !important;
    border-top: 1px solid rgba(1,144,254,.12) !important;
}

body[data-theme="dark"] .alertify .ajs-footer .ajs-buttons .ajs-ok {
    background: linear-gradient(135deg, #0073e0, #0190fe) !important;
    border-color: #0073e0 !important;
    color: #fff !important;
}

body[data-theme="dark"] .alertify .ajs-footer .ajs-buttons .ajs-cancel {
    background: #1a2740 !important;
    border-color: #253550 !important;
    color: #8aa4cc !important;
}

body[data-theme="dark"] .alertify-notifier .ajs-message.ajs-success {
    background: rgba(16,185,129,.18) !important;
    border-left: 4px solid #10b981 !important;
    color: #34d399 !important;
}

body[data-theme="dark"] .alertify-notifier .ajs-message.ajs-error {
    background: rgba(239,68,68,.18) !important;
    border-left: 4px solid #ef4444 !important;
    color: #f87171 !important;
}

body[data-theme="dark"] .alertify-notifier .ajs-message.ajs-warning {
    background: rgba(245,158,11,.18) !important;
    border-left: 4px solid #f59e0b !important;
    color: #fbbf24 !important;
}

/*#endregion */

/*#region File input dark mode */

body[data-theme="dark"] .file-input .file-drop-zone,
body[data-theme="dark"] .file-input .file-preview {
    background: #0b1628 !important;
    border: 2px dashed #1e3050 !important;
    border-radius: 10px !important;
    color: #7a8fb0 !important;
}

body[data-theme="dark"] .file-input .file-preview .file-preview-frame {
    background: #0f1a2e !important;
    border: 1px solid rgba(1,144,254,.15) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.30) !important;
}

body[data-theme="dark"] .file-input .file-drop-zone .file-drop-zone-title {
    color: #3d5570 !important;
}

body[data-theme="dark"] .file-input .file-drop-zone:hover {
    background: rgba(1,144,254,.06) !important;
    border-color: rgba(1,144,254,.30) !important;
}

body[data-theme="dark"] .btn-file input[type="file"] {
    background: transparent !important;
}

/*#endregion */

/*#region jstree dark mode */

body[data-theme="dark"] .jstree-default .jstree-node,
body[data-theme="dark"] .jstree-default .jstree-leaf,
body[data-theme="dark"] .jstree-default .jstree-container-ul {
    color: #c8d6f0 !important;
}

body[data-theme="dark"] .jstree-default .jstree-anchor {
    color: #c8d6f0 !important;
}

body[data-theme="dark"] .jstree-default .jstree-anchor:hover,
body[data-theme="dark"] .jstree-default.jstree-focused .jstree-anchor:hover {
    background: rgba(1,144,254,.12) !important;
    color: #60a5fa !important;
    border-radius: 5px !important;
}

body[data-theme="dark"] .jstree-default .jstree-clicked {
    background: rgba(1,144,254,.20) !important;
    color: #60a5fa !important;
    border-radius: 5px !important;
}

body[data-theme="dark"] .jstree-wholerow-ul .jstree-wholerow-hovered {
    background: rgba(1,144,254,.10) !important;
}

body[data-theme="dark"] .jstree-wholerow-ul .jstree-wholerow-clicked {
    background: rgba(1,144,254,.18) !important;
}

/*#endregion */

/*#region CleanUI vendor components dark mode */

body[data-theme="dark"] .cui-topbar-left .dropdown-menu,
body[data-theme="dark"] .cui-topbar-right .dropdown-menu {
    background: #0f1a2e !important;
    border: 1px solid rgba(1,144,254,.15) !important;
}

/* Date picker (Bootstrap Datepicker) */
body[data-theme="dark"] .datepicker-dropdown {
    background: #0f1a2e !important;
    border: 1px solid rgba(1,144,254,.18) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,.50) !important;
}

body[data-theme="dark"] .datepicker table tr td,
body[data-theme="dark"] .datepicker table tr th {
    background: transparent !important;
    color: #c8d6f0 !important;
}

body[data-theme="dark"] .datepicker table tr td:hover,
body[data-theme="dark"] .datepicker table tr th:hover {
    background: rgba(1,144,254,.12) !important;
    color: #60a5fa !important;
}

body[data-theme="dark"] .datepicker table tr td.active,
body[data-theme="dark"] .datepicker table tr td.active:hover {
    background: linear-gradient(135deg, #0073e0, #0190fe) !important;
    color: #fff !important;
}

body[data-theme="dark"] .datepicker table tr td.today {
    background: rgba(1,144,254,.14) !important;
    color: #60a5fa !important;
}

body[data-theme="dark"] .datepicker .datepicker-switch,
body[data-theme="dark"] .datepicker .prev,
body[data-theme="dark"] .datepicker .next {
    color: #60a5fa !important;
}

body[data-theme="dark"] .datepicker table tr td.disabled,
body[data-theme="dark"] .datepicker table tr td.disabled:hover {
    color: #253550 !important;
}

/* Flatpickr / time pickers */
body[data-theme="dark"] .flatpickr-calendar {
    background: #0f1a2e !important;
    border: 1px solid rgba(1,144,254,.18) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,.50) !important;
}

body[data-theme="dark"] .flatpickr-day {
    color: #c8d6f0 !important;
}

body[data-theme="dark"] .flatpickr-day:hover {
    background: rgba(1,144,254,.14) !important;
    color: #60a5fa !important;
    border-color: transparent !important;
}

body[data-theme="dark"] .flatpickr-day.selected {
    background: linear-gradient(135deg, #0073e0, #0190fe) !important;
    border-color: transparent !important;
    color: #fff !important;
}

body[data-theme="dark"] .flatpickr-months .flatpickr-month,
body[data-theme="dark"] .flatpickr-current-month,
body[data-theme="dark"] .flatpickr-weekday {
    background: #091525 !important;
    color: #8aa4cc !important;
}

/*#endregion */

/*#region Pivot table dark mode */

body[data-theme="dark"] .pvtUi,
body[data-theme="dark"] .pvtTable {
    background: #0f1a2e !important;
    color: #c8d6f0 !important;
    border-color: rgba(1,144,254,.12) !important;
}

body[data-theme="dark"] .pvtUi td,
body[data-theme="dark"] .pvtUi th {
    background: #0f1a2e !important;
    color: #c8d6f0 !important;
    border-color: rgba(1,144,254,.10) !important;
}

body[data-theme="dark"] .pvtUi select,
body[data-theme="dark"] .pvtUi input {
    background: #0b1628 !important;
    border-color: #1e3050 !important;
    color: #c8d6f0 !important;
}

/*#endregion */

/* ═══════════════════════════════════════════════════════════════
   END THIRD-PARTY DARK MODE OVERRIDES
   ═══════════════════════════════════════════════════════════════ */







/* ═══════════════════════════════════════════════════════════════
   MOBILE / PWA RESPONSIVE FIXES
   Applied for smartphones (max-width: 767px)
   ═══════════════════════════════════════════════════════════════ */

/* ── Fix 1: Topbar overlap on small screens (mobile / PWA) ─── */
@media (max-width: 767px) {

    /* Topbar: allow 2-row wrapping on mobile so nothing overlaps */
    .cui-layout-header {
        height: auto !important;
    }

    .cui-layout-header .cui-topbar {
        padding: 2px 6px !important;
        height: auto !important;
        min-height: 50px !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
        display: flex !important;
        align-items: center !important;
        row-gap: 2px !important;
    }

    /* Left zone (payer selector + notifications): row 1, fills available space */
    .cui-topbar-left {
        display: flex !important;
        align-items: center !important;
        gap: 3px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow: visible !important;
        order: 1 !important;
    }

    /* Kill CleanUI's per-item right-margin on the left side */
    .cui-topbar-left .cui-topbar-item {
        margin-right: 0 !important;
    }

    /* Notification items: icon-only mode on mobile — collapse labels */
    .notif-group {
        padding: 0 1px !important;
        gap: 0 !important;
    }

    .notif-btn {
        padding: 2px 4px !important;
        gap: 0 !important;
        font-size: .78rem !important;
    }

    /* Hide verbose text labels; keep icon + count badge */
    .notif-tooltip-label {
        display: none !important;
    }

    /* Right zone: sits at the end of row 1 */
    .cui-topbar-right {
        display: flex !important;
        align-items: center !important;
        gap: 2px !important;
        flex: 0 0 auto !important;
        justify-content: flex-end !important;
        order: 2 !important;
    }

    /* Kill CleanUI's 1.53rem per-item left-margin on the right side */
    .cui-topbar-right .cui-topbar-item {
        margin-left: 4px !important;
    }

    /* Hide "Welcome, Name" text — takes too much width on mobile */
    .cui-topbar-right .text-primary {
        display: none !important;
    }

    /* Compact the payer selector pill on mobile — avatar + select only */
    .payer-selector {
        padding: 3px 5px 3px 4px !important;
        gap: .22rem !important;
        max-width: 140px !important;
        min-width: 0 !important;
    }

    /* Hide the "PAYER" label row, keep just the select dropdown */
    .payer-selector-label {
        display: none !important;
    }

    /* Limit select text to avoid overflow */
    .payer-selector-select {
        max-width: 90px !important;
        font-size: .7rem !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Smaller payer avatar */
    .payer-selector-avatar {
        width: 22px !important;
        height: 22px !important;
        flex-shrink: 0 !important;
    }

    /* Notification dropdowns: full-width, anchored below topbar */
    .notif-dropdown {
        min-width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        left: 10px !important;
        right: 10px !important;
        position: fixed !important;
        top: 54px !important;
    }

    /* Theme toggle: icon only — hide the label text */
    .elite-theme-toggle .toggle-label {
        display: none !important;
    }

    /* Shrink the theme toggle button itself */
    .elite-theme-toggle {
        padding: 4px 6px !important;
        font-size: .8rem !important;
        flex-shrink: 0 !important;
    }

    /* Shrink the user-menu avatar toggle — remove extra dropdown padding */
    .cui-topbar-avatar-dropdown .dropdown-toggle {
        padding-right: 0 !important;
    }

    /* Smaller user-menu avatar so it doesn't crowd */
    .cui-topbar-avatar {
        width: 28px !important;
        height: 28px !important;
        flex-shrink: 0 !important;
    }

    .cui-topbar-avatar img {
        width: 28px !important;
        height: 28px !important;
    }
}

/* ── Fix 2: Card body padding on mobile ────────────────────── */
@media (max-width: 575px) {
    .card-body {
        padding: 0.75rem !important;
    }

    .cui-utils-content {
        padding: 6px 8px 12px !important;
    }
}

/* ── Fix 3: DataTables responsive on mobile ─────────────────  */
/* When DataTables collapses columns, child rows get a toggle */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
    padding-left: 30px !important;
    cursor: pointer !important;
}

/* Responsive detail row styling */
table.dataTable > tbody > tr.child td.child {
    background: rgba(1, 144, 254, 0.04) !important;
    border-left: 3px solid #0190fe !important;
}

/* ── Fix 4: Modal full-screen on mobile ─────────────────────  */
@media (max-width: 575px) {
    .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        height: 100% !important;
    }

    .modal-content {
        border-radius: 0 !important;
        min-height: 100vh !important;
    }
}

/* ── Fix 5: Form layout on mobile ───────────────────────────  */
@media (max-width: 575px) {
    /* Row columns: force single column on xs */
    .row > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Preserve intentional 2-column layouts tagged with .row-cols-2-mobile */
    .row-cols-2-mobile > [class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* ── Fix 6: Breadcrumb area on mobile ──────────────────────── */
@media (max-width: 575px) {
    nav.cui-breadcrumbs {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: .3rem !important;
        padding: 10px 10px 4px !important;
    }

    nav.cui-breadcrumbs .float-md-end {
        align-self: flex-end !important;
        flex-wrap: wrap !important;
    }
}

/* ── Fix 7: Footer columns collapse on mobile ──────────────── */
@media (max-width: 575px) {
    .footer-main {
        grid-template-columns: 1fr !important;
        padding: .8rem 1rem .5rem !important;
    }

    .footer-col-brand {
        border-right: none !important;
        border-bottom: 1px solid rgba(0,0,0,.06) !important;
        padding-bottom: .8rem !important;
        margin-bottom: .3rem !important;
    }

    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        gap: .2rem !important;
    }
}

/* ── Fix 8: Anti-FOUC — sync body dark mode immediately ─────  */
/* body[data-theme="dark"] is set by elite-theme.js on DOMContentLoaded.
   html[data-theme="dark"] is set by the inline <head> script.
   This rule ensures dark background is visible the moment html attr is set,
   preventing any white flash before JS runs. */
html[data-theme="dark"] body {
    background: #0b1120 !important;
}

/* ═══════════════════════════════════════════════════════════════
   END MOBILE / PWA RESPONSIVE FIXES
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   RECENT PAGES — Sidebar history panel
   Matches CleanUI menu-left visual style exactly.
   ═══════════════════════════════════════════════════════════════ */

#recent-pages-section {
    margin: 0;
}

/* ── Toggle header row — styled exactly like a .cui-menu-left-item > a ── */
.recent-pages-toggle {
    display: flex;
    align-items: center;
    padding: 0 0 0 19px;          /* matches CleanUI submenu item indent */
    height: 42px;
    cursor: pointer;
    color: #b8beca;               /* CleanUI menu item text color */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
    user-select: none;
    position: relative;
}

.recent-pages-toggle:hover {
    color: #fff;
}

.recent-pages-toggle-icon {
    font-size: 1rem;
    width: 34px;                  /* matches CleanUI icon column width */
    flex-shrink: 0;
    color: #74708d;               /* CleanUI icon default color */
    transition: color 0.2s ease-in-out;
}

.recent-pages-toggle:hover .recent-pages-toggle-icon {
    color: #fff;
}

.recent-pages-toggle-text {
    flex: 1;
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

/* The chevron arrow — mirrors CleanUI's ::after pseudo on submenus */
.recent-pages-chevron {
    position: absolute;
    right: 19px;
    font-size: .7rem;
    color: #b8beca;
    transition: transform 0.2s ease-in-out, color 0.2s;
}

.recent-pages-toggle:hover .recent-pages-chevron {
    color: #fff;
}

/* Rotated when collapsed */
.recent-pages-section-collapsed .recent-pages-chevron {
    transform: rotate(-90deg);
}

/* Clear button inside toggle row */
.recent-pages-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 5px;
    margin-right: 24px;           /* sit left of the chevron */
    color: #74708d;
    font-size: .72rem;
    line-height: 1;
    border-radius: 3px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.recent-pages-clear:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.12);
}

/* ── Collapsible body ──────────────────────────────────────── */
.recent-pages-body {
    overflow: hidden;
    transition: max-height 0.25s ease-in-out, opacity 0.2s;
    max-height: 400px;
    opacity: 1;
    background: #000c17;          /* CleanUI submenu background */
}

.recent-pages-section-collapsed .recent-pages-body {
    max-height: 0;
    opacity: 0;
}

/* ── List ──────────────────────────────────────────────────── */
.recent-pages-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.recent-pages-item {
    margin: 0;
}

/* Each row styled like a CleanUI sub-menu leaf item */
.recent-pages-link {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 12px 0 19px;
    height: 36px;
    text-decoration: none !important;
    color: #b8beca;               /* CleanUI menu item text color */
    font-size: .82rem;
    transition: color 0.2s ease-in-out, background 0.15s;
}

.recent-pages-link:hover {
    color: #fff;
    background: rgba(1, 144, 254, 0.12);
}

/* Icon — matches CleanUI icon column */
.recent-pages-icon {
    flex-shrink: 0;
    width: 34px;
    font-size: .8rem;
    color: #74708d;
    transition: color 0.2s ease-in-out;
}

.recent-pages-link:hover .recent-pages-icon {
    color: #fff;
}

/* Title text */
.recent-pages-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Timestamp badge */
.recent-pages-time {
    flex-shrink: 0;
    font-size: .62rem;
    color: #74708d;
    margin-left: 6px;
    white-space: nowrap;
}

/* ── Collapsed sidebar (icon-rail mode) ─────────────────────── */
body.cui-menu-left-toggled .recent-pages-toggle-text,
body.cui-menu-left-toggled .recent-pages-clear,
body.cui-menu-left-toggled .recent-pages-chevron,
body.cui-menu-left-toggled .recent-pages-title,
body.cui-menu-left-toggled .recent-pages-time,
body.cui-menu-left-toggled .recent-pages-body {
    display: none;
}

body.cui-menu-left-toggled .recent-pages-toggle {
    justify-content: center;
    padding: 0;
}

body.cui-menu-left-toggled .recent-pages-toggle-icon {
    width: auto;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   END RECENT PAGES
   ═══════════════════════════════════════════════════════════════ */
