﻿/* =============================================================
 * Saidy Clinic - Preclinic theme overrides (v3.0.0)
 * Adds: theme-color token, RTL support, modern form control sizes,
 * Bootstrap 5 utility class shims (used by legacy Saidy module pages),
 * DataTables integration, and dashboard widget recolor.
 * ============================================================= */

:root {
    --primary-color: #009efb;
    --primary-dark:  #0288d1;
    --primary-light: #4fc3f7;
    --success: #55ce63;
    --warning: #ffbc34;
    --danger:  #f62d51;
    --info:    #009efb;
    --body-bg: #fafafa;
    --text-dark: #333;
    --text-muted: #888;
    --border-color: #eaeaea;
    --card-bg: #ffffff;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.10);
    --transition: all .25s cubic-bezier(.4,0,.2,1);
}

/* Website CMS: make admin navigation feel like a clear content control panel. */
body:not(.pos-page) .sidebar-menu > ul > li.submenu.active > a {
    min-height: 48px;
    margin: 6px 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: #20c997 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(32,201,151,.24);
}

body:not(.pos-page) .sidebar-menu > ul > li.submenu.active > a i,
body:not(.pos-page) .sidebar-menu > ul > li.submenu.active > a span,
body:not(.pos-page) .sidebar-menu > ul > li.submenu.active > a .menu-arrow {
    color: #fff !important;
}

body:not(.pos-page) .sidebar-menu .submenu-list.is-open {
    margin: 4px 12px 12px 34px;
    padding: 6px 0 8px;
    border-left: 2px solid #d8f7ee;
}

html[dir="rtl"] body:not(.pos-page) .sidebar-menu .submenu-list.is-open {
    margin: 4px 34px 12px 12px;
    border-left: 0;
    border-right: 2px solid #d8f7ee;
}

body:not(.pos-page) .sidebar-menu .submenu-list.is-open li a {
    min-height: 36px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: #172033;
    font-size: 14px;
    line-height: 1.25;
}

body:not(.pos-page) .sidebar-menu .submenu-list.is-open li.active a,
body:not(.pos-page) .sidebar-menu .submenu-list.is-open li a:hover {
    background: #eefbf7;
    color: #0f8f6d;
}

.cms-page-header {
    align-items: flex-start;
    gap: 16px;
}

.cms-stat-grid,
.cms-card-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.cms-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cms-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cms-stat-tile,
.cms-control-card {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 4px 16px rgba(15,23,42,.05);
}

.cms-stat-tile {
    min-height: 96px;
    padding: 16px;
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    column-gap: 12px;
}

.cms-stat-icon,
.cms-control-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: #eafaf6;
    color: #0f8f6d;
}

.cms-stat-icon {
    width: 42px;
    height: 42px;
    grid-row: span 2;
    font-size: 18px;
}

.cms-stat-tile strong {
    color: #0f172a;
    font-size: 24px;
    line-height: 1.1;
}

.cms-stat-tile span:last-child {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.cms-control-card {
    min-height: 132px;
    padding: 16px;
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 14px;
    align-items: center;
    color: inherit;
    text-decoration: none !important;
    transition: var(--transition);
}

.cms-control-card:hover {
    border-color: #20c997;
    box-shadow: 0 10px 26px rgba(15,23,42,.10);
    transform: translateY(-1px);
}

.cms-control-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
}

.cms-control-body {
    min-width: 0;
}

.cms-control-body strong,
.cms-control-body small,
.cms-control-body em {
    display: block;
}

.cms-control-body strong {
    margin-bottom: 5px;
    color: #102033;
    font-size: 16px;
}

.cms-control-body small {
    color: #64748b;
    line-height: 1.45;
}

.cms-control-body em {
    margin-top: 8px;
    color: #0f8f6d;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.cms-control-action {
    white-space: nowrap;
    color: #0f8f6d;
    font-weight: 800;
    font-size: 13px;
}

@media only screen and (max-width: 991.98px) {
    .cms-stat-grid,
    .cms-card-grid {
        grid-template-columns: 1fr;
    }

    .cms-control-card {
        grid-template-columns: 44px 1fr;
    }

    .cms-control-action {
        grid-column: 2;
    }
}

/* Mobile profile dropdown: keep it anchored under the SA/user button. */
@media only screen and (max-width: 991.98px) {
    body:not(.pos-page) .user-menu > li.has-arrow > .dropdown-menu,
    body:not(.pos-page) .user-menu > li.has-arrow.show > .dropdown-menu,
    body:not(.pos-page) .user-menu > li.has-arrow > .dropdown-menu.show,
    body:not(.pos-page) .mobile-user-menu > .dropdown-menu,
    body:not(.pos-page) .mobile-user-menu > .dropdown-menu.show {
        position: fixed !important;
        top: 56px !important;
        right: 10px !important;
        left: auto !important;
        transform: none !important;
        min-width: 168px !important;
        max-width: calc(100vw - 20px) !important;
        padding: 8px !important;
        border: 1px solid #d8e6f4 !important;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: 0 18px 36px rgba(15,23,42,.18) !important;
        z-index: 2050 !important;
    }

    body:not(.pos-page) .user-menu > li.has-arrow > .dropdown-menu .dropdown-item,
    body:not(.pos-page) .mobile-user-menu > .dropdown-menu .dropdown-item {
        min-height: 42px !important;
        display: flex !important;
        align-items: center !important;
        padding: 9px 12px !important;
        border-radius: 10px !important;
        color: #263244 !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
    }

    body:not(.pos-page) .user-menu > li.has-arrow > .dropdown-menu .dropdown-item:hover,
    body:not(.pos-page) .mobile-user-menu > .dropdown-menu .dropdown-item:hover {
        background: #eef6ff !important;
        color: #2563eb !important;
    }

    html[dir="rtl"] body:not(.pos-page) .user-menu > li.has-arrow > .dropdown-menu,
    html[dir="rtl"] body:not(.pos-page) .user-menu > li.has-arrow.show > .dropdown-menu,
    html[dir="rtl"] body:not(.pos-page) .user-menu > li.has-arrow > .dropdown-menu.show,
    html[dir="rtl"] body:not(.pos-page) .mobile-user-menu > .dropdown-menu,
    html[dir="rtl"] body:not(.pos-page) .mobile-user-menu > .dropdown-menu.show {
        left: 10px !important;
        right: auto !important;
    }
}

/* Mobile sidebar hard reset: the toggle opens a full usable menu, not an icon rail. */
@media only screen and (max-width: 991.98px) {
    body:not(.pos-page):not(.mobile-menu-open) .main-wrapper:not(.slide-nav) #sidebar,
    html:not(.menu-opened) body:not(.pos-page):not(.mobile-menu-open) #sidebar {
        width: 285px !important;
        min-width: 285px !important;
        max-width: 285px !important;
        transform: translateX(-105%) !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    html[dir="rtl"] body:not(.pos-page):not(.mobile-menu-open) .main-wrapper:not(.slide-nav) #sidebar,
    html[dir="rtl"]:not(.menu-opened) body:not(.pos-page):not(.mobile-menu-open) #sidebar {
        transform: translateX(105%) !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar,
    html.menu-opened body:not(.pos-page) #sidebar.opened,
    body.mobile-menu-open:not(.pos-page) #sidebar,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened,
    body.mobile-rail-open:not(.pos-page) #sidebar,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened {
        top: 50px !important;
        left: 0 !important;
        right: auto !important;
        width: 285px !important;
        min-width: 285px !important;
        max-width: 285px !important;
        height: calc(100vh - 50px) !important;
        margin: 0 !important;
        padding: 10px !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateX(0) !important;
        overflow: hidden !important;
        background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 52%, #eafaf6 100%) !important;
        border-right: 1px solid #d8e6f4 !important;
        border-left: 0 !important;
        box-shadow: 16px 0 34px rgba(15,23,42,.18) !important;
        z-index: 1041 !important;
    }

    html[dir="rtl"].menu-opened body:not(.pos-page) #sidebar,
    html[dir="rtl"].menu-opened body:not(.pos-page) #sidebar.opened,
    html[dir="rtl"] body.mobile-menu-open:not(.pos-page) #sidebar,
    html[dir="rtl"] body.mobile-menu-open:not(.pos-page) #sidebar.opened,
    html[dir="rtl"] body.mobile-rail-open:not(.pos-page) #sidebar,
    html[dir="rtl"] body.mobile-rail-open:not(.pos-page) #sidebar.opened,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper.slide-nav #sidebar,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened {
        right: 0 !important;
        left: auto !important;
        border-right: 0 !important;
        border-left: 1px solid #d8e6f4 !important;
        box-shadow: -16px 0 34px rgba(15,23,42,.18) !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .slimScrollDiv,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-inner,
    body.mobile-menu-open:not(.pos-page) #sidebar .slimScrollDiv,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-inner,
    body.mobile-rail-open:not(.pos-page) #sidebar .slimScrollDiv,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-inner,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .slimScrollDiv,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-inner {
        width: 265px !important;
        max-width: 265px !important;
        height: calc(100vh - 70px) !important;
        overflow-x: hidden !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .menu-title,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu a span,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu .menu-arrow,
    body.mobile-menu-open:not(.pos-page) #sidebar .menu-title,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu a span,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu .menu-arrow,
    body.mobile-rail-open:not(.pos-page) #sidebar .menu-title,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu a span,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu .menu-arrow,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .menu-title,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu a span,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu .menu-arrow {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        overflow: visible !important;
        clip: auto !important;
        position: static !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .menu-title,
    body.mobile-menu-open:not(.pos-page) #sidebar .menu-title,
    body.mobile-rail-open:not(.pos-page) #sidebar .menu-title,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .menu-title {
        display: block !important;
        padding: 12px 12px 6px !important;
        color: #64748b !important;
        font-size: 13px !important;
        font-weight: 700 !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu > ul > li > a {
        width: 100% !important;
        min-height: 46px !important;
        height: auto !important;
        margin: 5px 0 !important;
        padding: 9px 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        border-radius: 12px !important;
        background: #fff !important;
        color: #172033 !important;
        box-shadow: 0 4px 14px rgba(15,23,42,.06) !important;
        text-align: left !important;
        white-space: normal !important;
    }

    html[dir="rtl"].menu-opened body:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    html[dir="rtl"] body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    html[dir="rtl"] body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu > ul > li > a {
        text-align: right !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu ul li a i,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu ul li a i,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu ul li a i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu ul li a i {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 11px !important;
        background: #eef6ff !important;
        color: #2563eb !important;
        box-shadow: none !important;
        font-size: 16px !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu > ul > li > a span,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a span,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a span,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu > ul > li > a span {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        color: inherit !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu ul ul,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu ul ul,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu ul ul,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu ul ul {
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        margin: 4px 0 8px 44px !important;
        padding: 5px !important;
        border: 1px solid #d8e6f4 !important;
        border-radius: 12px !important;
        background: rgba(255,255,255,.74) !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: hidden !important;
    }

    html[dir="rtl"].menu-opened body:not(.pos-page) #sidebar .sidebar-menu ul ul,
    html[dir="rtl"] body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu ul ul,
    html[dir="rtl"] body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu ul ul,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu ul ul {
        margin: 4px 44px 8px 0 !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu a.subdrop + ul,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu a.subdrop + ul,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu a.subdrop + ul,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu a.subdrop + ul {
        display: block !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu ul ul a,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu ul ul a,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu ul ul a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu ul ul a {
        min-height: 38px !important;
        margin: 3px 0 !important;
        padding: 8px 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        border-radius: 9px !important;
        background: #fff !important;
        color: #334155 !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        text-align: left !important;
        white-space: normal !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu li.active > a,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu li a:hover,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu li.active > a,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu li a:hover,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li.active > a,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li a:hover,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu li.active > a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu li a:hover,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu > ul > li.submenu > a.subdrop {
        color: #fff !important;
        background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
        box-shadow: 0 10px 22px rgba(37,99,235,.22) !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu li.active > a i,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu li a:hover i,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop i,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu li.active > a i,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu li a:hover i,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop i,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li.active > a i,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li a:hover i,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu li.active > a i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu li a:hover i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu > ul > li.submenu > a.subdrop i {
        background: rgba(255,255,255,.22) !important;
        color: #fff !important;
    }

    html.menu-opened body:not(.pos-page) .page-wrapper,
    body.mobile-menu-open:not(.pos-page) .page-wrapper,
    body.mobile-rail-open:not(.pos-page) .page-wrapper,
    body:not(.pos-page) .main-wrapper.slide-nav .page-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Absolute final mobile header dropdown positions. */
@media only screen and (max-width: 991.98px) {
    body:not(.pos-page) .user-menu .notifications,
    body:not(.pos-page) .user-menu .notifications.show,
    body:not(.pos-page) .user-menu #open_msg_box + .dropdown-menu,
    body:not(.pos-page) .user-menu #open_msg_box + .dropdown-menu.show {
        position: fixed !important;
        top: 56px !important;
        right: 10px !important;
        left: auto !important;
        transform: none !important;
        width: min(340px, calc(100vw - 20px)) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 72px) !important;
        overflow: hidden !important;
        padding: 0 !important;
        border: 1px solid #d8e6f4 !important;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: 0 18px 36px rgba(15,23,42,.18) !important;
        z-index: 2050 !important;
    }

    body:not(.pos-page) .user-menu .notifications .topnav-dropdown-header,
    body:not(.pos-page) .user-menu .notifications .topnav-dropdown-footer {
        height: auto !important;
        padding: 10px 12px !important;
        background: #f8fbff !important;
        border-color: #e2edf8 !important;
        color: #172033 !important;
        font-weight: 800 !important;
    }

    body:not(.pos-page) .user-menu .notifications .drop-scroll {
        max-height: calc(100vh - 170px) !important;
        overflow-y: auto !important;
    }

    body:not(.pos-page) .user-menu .notifications .notification-list,
    body:not(.pos-page) .user-menu .notifications .notification-list li {
        width: 100% !important;
        max-width: 100% !important;
    }

    body:not(.pos-page) .user-menu .notifications .notification-message {
        padding: 12px !important;
        white-space: normal !important;
    }

    html[dir="rtl"] body:not(.pos-page) .user-menu .notifications,
    html[dir="rtl"] body:not(.pos-page) .user-menu .notifications.show,
    html[dir="rtl"] body:not(.pos-page) .user-menu #open_msg_box + .dropdown-menu,
    html[dir="rtl"] body:not(.pos-page) .user-menu #open_msg_box + .dropdown-menu.show {
        left: 10px !important;
        right: auto !important;
    }
}

/* Absolute final mobile profile dropdown position. */
@media only screen and (max-width: 991.98px) {
    body:not(.pos-page) .user-menu > li.has-arrow > .dropdown-menu,
    body:not(.pos-page) .user-menu > li.has-arrow.show > .dropdown-menu,
    body:not(.pos-page) .user-menu > li.has-arrow > .dropdown-menu.show,
    body:not(.pos-page) .mobile-user-menu > .dropdown-menu,
    body:not(.pos-page) .mobile-user-menu > .dropdown-menu.show {
        position: fixed !important;
        top: 56px !important;
        right: 10px !important;
        left: auto !important;
        transform: none !important;
        min-width: 168px !important;
        max-width: calc(100vw - 20px) !important;
        padding: 8px !important;
        border: 1px solid #d8e6f4 !important;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: 0 18px 36px rgba(15,23,42,.18) !important;
        z-index: 2050 !important;
    }

    body:not(.pos-page) .user-menu > li.has-arrow > .dropdown-menu .dropdown-item,
    body:not(.pos-page) .mobile-user-menu > .dropdown-menu .dropdown-item {
        min-height: 42px !important;
        display: flex !important;
        align-items: center !important;
        padding: 9px 12px !important;
        border-radius: 10px !important;
        color: #263244 !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
    }

    body:not(.pos-page) .user-menu > li.has-arrow > .dropdown-menu .dropdown-item:hover,
    body:not(.pos-page) .mobile-user-menu > .dropdown-menu .dropdown-item:hover {
        background: #eef6ff !important;
        color: #2563eb !important;
    }

    html[dir="rtl"] body:not(.pos-page) .user-menu > li.has-arrow > .dropdown-menu,
    html[dir="rtl"] body:not(.pos-page) .user-menu > li.has-arrow.show > .dropdown-menu,
    html[dir="rtl"] body:not(.pos-page) .user-menu > li.has-arrow > .dropdown-menu.show,
    html[dir="rtl"] body:not(.pos-page) .mobile-user-menu > .dropdown-menu,
    html[dir="rtl"] body:not(.pos-page) .mobile-user-menu > .dropdown-menu.show {
        left: 10px !important;
        right: auto !important;
    }
}

/* ---------- Body / typography ---------- */
body { font-family: 'Rubik', 'Vazirmatn', sans-serif; }
[dir="rtl"] body { font-family: 'Vazirmatn', 'Rubik', sans-serif; }

/* ---------- Theme color overrides (when set by session) ---------- */
.bg-primary, .badge-primary,
.btn-primary, .btn-primary:hover, .btn-primary:focus,
.btn-primary:active, .btn-primary.active,
.btn-outline-primary:hover, .btn-outline-primary:focus,
.btn-outline-primary.active:not(:disabled):not(.disabled),
.show > .btn-primary.dropdown-toggle,
.bg-info, .badge-info,
.btn-info, .btn-info:hover,
.text-primary,
.dropdown-menu > li > a.text-primary,
.header,
.sidebar-menu li.active a,
.sidebar-menu li a:hover,
.sidebar-menu ul ul a.active,
.pagination > .active > a,
.pagination > .active > a:focus,
.pagination > .active > a:hover,
.pagination > .active > span,
.pagination > .active > span:focus,
.pagination > .active > span:hover,
.page-item.active .page-link,
a:hover, a:active, a:focus,
.form-control:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary { background-color: var(--primary-color) !important; border-color: transparent; }
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark);
}
.btn-outline-primary { color: var(--primary-color); border-color: var(--primary-color); }
.btn-outline-primary:hover { background-color: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.text-primary { color: var(--primary-color) !important; background-color: transparent !important; }
a { color: var(--primary-color); }
.form-control:focus { border-color: var(--primary-color); box-shadow: 0 0 0 .2rem rgba(0,158,251,.15); outline: 0; }
.sidebar-menu li.active a { background-color: #f3f3f3; color: var(--primary-color); }
.sidebar-menu li a:hover { color: var(--primary-color); }

/* ---------- Header (uses theme color) ---------- */
.header { background-color: var(--primary-color); }
.user-menu.nav > li > a:hover, .user-menu.nav > li > a:focus { background-color: rgba(0,0,0,.15); }
.user-menu .bg-primary { background-color: var(--primary-color) !important; }

/* ---------- Stat cards (Preclinic dash-widget) - make them pop ---------- */
.dash-widget {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
    transition: var(--transition);
    height: 100%;
}
.dash-widget:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.dash-widget-bg1, .dash-widget-bg2, .dash-widget-bg3, .dash-widget-bg4 {
    width: 70px; height: 70px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin-right: 15px;
}
.dash-widget-bg1 { background: linear-gradient(135deg, #009efb, #0288d1); }
.dash-widget-bg2 { background: linear-gradient(135deg, #55ce63, #4ab657); }
.dash-widget-bg3 { background: linear-gradient(135deg, #ffbc34, #e9ab2e); }
.dash-widget-bg4 { background: linear-gradient(135deg, #f62d51, #e6294b); }
.dash-widget-info h3 { margin: 0; font-size: 1.875rem; font-weight: 600; color: #333; }
.dash-widget-info span { display: block; color: #888; font-size: .875rem; }

/* ---------- Cards / general utilities ---------- */
.card { border-radius: var(--radius-md); border: 0; box-shadow: var(--shadow-sm); margin-bottom: 25px; }
.card .card-header { background: #fff; border-bottom: 1px solid var(--border-color); padding: 15px 20px; }
.card .card-header .card-title { color: #333; font-size: 1rem; font-weight: 500; margin: 0; }
.card-body { padding: 20px; }
.page-title { color: #333; font-size: 1.5rem; font-weight: 500; margin: 0 0 10px; }

/* ---------- Buttons: round, modern ---------- */
.btn { border-radius: var(--radius-sm); padding: 8px 18px; font-size: .875rem; transition: var(--transition); }
.btn.btn-primary { box-shadow: 0 2px 8px rgba(0,158,251,.25); }
.btn.btn-primary:hover { box-shadow: 0 4px 14px rgba(0,158,251,.35); transform: translateY(-1px); }
.btn.btn-rounded { border-radius: 50px; }
.btn.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn-sm { padding: 4px 12px; font-size: .75rem; }
.btn-xs { padding: 2px 8px; font-size: .6875rem; }

/* ---------- Form controls: slightly rounded, modern ---------- */
.form-control {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: .469rem .75rem;
    font-size: .875rem;
    min-height: 38px;
    transition: var(--transition);
}
.form-control:focus { border-color: var(--primary-color); box-shadow: 0 0 0 .2rem rgba(0,158,251,.12); }
.form-group { margin-bottom: 15px; }
.form-label, .form-group > label { font-weight: 500; color: #333; font-size: .875rem; margin-bottom: .375rem; display: block; }
.input-group-text { background: #f8f9fa; border-color: var(--border-color); border-radius: var(--radius-sm); }

/* ---------- Tables: clean borders, hover ---------- */
.table { color: #333; border: 1px solid #f0f0f0; margin: 0; }
.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
    color: #666;
    font-weight: 600;
    font-size: .8125rem;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 12px 15px;
    white-space: nowrap;
}
.table tbody td { padding: 12px 15px; vertical-align: middle; border-top: 1px solid #f3f3f3; }
.table tbody tr { transition: background .15s; }
.table-hover tbody tr:hover { background: #f8fbff; }
.table-striped > tbody > tr:nth-of-type(2n+1) { background-color: #fafbfc; }
table.table td h2 { font-size: .9rem; font-weight: 500; margin: 0; color: #555; }
table.table td h2 a { color: #555; }
table.table td h2 a:hover { color: var(--primary-color); }

/* ---------- Badges ---------- */
.badge { padding: .35em .6em; font-weight: 600; font-size: .6875rem; border-radius: 4px; }
.badge-success { background-color: var(--success); }
.badge-warning { background-color: var(--warning); color: #fff; }
.badge-danger  { background-color: var(--danger); }
.badge-info    { background-color: var(--info); }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-progress { background: #dbeafe; color: #1e40af; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-verified { background: #cffafe; color: #155e75; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-unpaid { background: #fee2e2; color: #991b1b; }
.badge-partial { background: #fef3c7; color: #92400e; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-low-stock { background: #fee2e2; color: #991b1b; }

/* ---------- Avatar (Preclinic-style round initial) ---------- */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    font-size: 13px;
    margin-right: 5px;
}

/* ---------- Stat-card class (legacy Saidy pages keep working) ---------- */
.stat-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: var(--primary-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 12px;
}
.stat-card .stat-label { color: #888; font-size: .75rem; font-weight: 600; margin: 0; text-transform: uppercase; letter-spacing: .5px; }
.stat-card .stat-value { font-size: 1.875rem; font-weight: 700; margin: 4px 0 0; color: #333; line-height: 1.2; }
.stat-card.success .stat-icon { background: var(--success); }
.stat-card.warning .stat-icon { background: var(--warning); }
.stat-card.danger  .stat-icon { background: var(--danger); }
.stat-card.info    .stat-icon { background: var(--info); }

/* ---------- Page header (legacy Saidy markup) ---------- */
.page-header {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-header h2 { font-weight: 600; margin: 0; font-size: 1.25rem; color: #333; }
.page-header .subtitle { color: #888; font-size: .8125rem; margin: 4px 0 0; }

/* ---------- Bootstrap 5 utility shims (so legacy Saidy pages keep working) ---------- */
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-1 { margin-left: .25rem !important; }
.ms-2 { margin-left: .5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-3 { margin-top: 1rem !important; }
.g-3 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
.g-3 > * { padding-right: .5rem; padding-left: .5rem; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.p-0 { padding: 0 !important; }
.text-end { text-align: right !important; }
.text-start { text-align: left !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.text-decoration-none { text-decoration: none !important; }
.text-white-50 { color: rgba(255,255,255,.6) !important; }
.bg-light { background-color: #f8f9fa !important; }
.bg-dark { background-color: #343a40 !important; }
.bg-white { background-color: #fff !important; }
.rounded-circle { border-radius: 50% !important; }
.h-100 { height: 100% !important; }
[data-bs-toggle] { /* alias BS5 toggle for BS4 */
    /* Bootstrap 4 uses data-toggle; legacy pages that emit data-bs-toggle still need to work */
}
[data-bs-toggle="collapse"] { cursor: pointer; }
[data-bs-toggle="dropdown"] { cursor: pointer; }
[data-bs-toggle="modal"] { cursor: pointer; }

/* FontAwesome 6 alias: fas -> fa, far -> fa (so legacy BS5 markup still finds FA6 icons) */
.fas, .far, .fab {
    display: inline-block;
    font: normal normal normal 14px/1 FontAwesome;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.fa-calendar-day::before,
.fa-calendar-alt::before,
.fa-calendar-week::before { content: "\f073"; }
.fa-calendar-plus::before { content: "\f271"; }
.fa-money-bill::before,
.fa-money-bill-wave::before,
.fa-money-bill-trend-up::before { content: "\f0d6"; }
.fa-hand-holding-usd::before { content: "\f0d6"; }
.fa-walking::before { content: "\f183"; }
.fa-vials::before { content: "\f0c3"; }
.fa-prescription::before { content: "\f0f6"; }
.fa-file-invoice::before,
.fa-file-invoice-dollar::before { content: "\f0f6"; }
.fa-user-lock::before { content: "\f023"; }
.fa-eye-slash::before { content: "\f070"; }
.fa.fa-tachometer-alt::before { content: "\f3fd"; } /* fa6 tachometer-alt */
.fa.fa-heart-pulse::before { content: "\f21e"; }
.fa.fa-x-ray::before { content: "\f497"; }
.fa.fa-flask::before { content: "\f0c3"; }
.fa.fa-pills::before { content: "\f484"; }
.fa.fa-prescription-bottle-medical::before { content: "\f486"; }
.fa.fa-warehouse::before { content: "\f494"; }
.fa.fa-cubes::before { content: "\f1b3"; }
.fa.fa-money-bill-wave::before { content: "\f53a"; }
.fa.fa-chart-pie::before { content: "\f200"; }
.fa.fa-chart-line::before { content: "\f201"; }
.fa.fa-users-cog::before { content: "\f4fe"; }
.fa.fa-user-shield::before { content: "\f505"; }
.fa.fa-cogs::before { content: "\f085"; }
.fa.fa-hand-holding-usd::before { content: "\f4c0"; }
.fa.fa-cash-register::before { content: "\f788"; }
.fa.fa-calendar-check::before { content: "\f274"; }
.fa.fa-user-md::before { content: "\f0f0"; }
.fa.fa-wheelchair::before { content: "\f193"; }
.fa.fa-users::before { content: "\f0c0"; }
.fa.fa-bars::before { content: "\f0c9"; }
.fa.fa-tachometer-alt::before { content: "\f3fd"; }

/* ---------- Patient-management external helpers ---------- */
.status-inline-select {
    width: auto;
    display: inline-block;
}
.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}
.col-day { width: 160px; }
.col-status { width: 120px; }
.doctor-mini-stat {
    padding: .25rem;
    border-radius: 4px;
}
.doctor-mini-stat.is-indigo { background: #eef2ff; color: #009efb; }
.doctor-mini-stat.is-sky { background: #e0f2fe; color: #0284c7; }
.doctor-mini-stat.is-green { background: #d1fae5; color: #059669; }
.doctor-mini-stat.is-amber { background: #fef3c7; color: #d97706; }
.doctor-mini-stat.is-red { background: #fee2e2; color: #dc2626; }
.doctor-mini-stat.is-gray { background: #f3f4f6; color: #6b7280; }
.doctor-mini-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: currentColor;
}

/* ---------- DataTables Bootstrap 4 - keep header bg ---------- */
table.dataTable thead { background-color: #f8f9fa; }
table.dataTable thead th { border-bottom: 2px solid var(--border-color) !important; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    margin-left: 8px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

/* ---------- RTL overrides ---------- */
[dir="rtl"] .header .header-left { float: right; }
[dir="rtl"] .header .nav.user-menu { float: left !important; }
[dir="rtl"] .mobile-user-menu { left: 0; right: auto; text-align: left; }
[dir="rtl"] .sidebar { left: auto; right: 0; }
[dir="rtl"] .page-wrapper { margin-left: 0; margin-right: 230px; }
[dir="rtl"] .sidebar-menu .menu-arrow { right: auto; left: 15px; }
[dir="rtl"] .sidebar-menu li a.subdrop .menu-arrow { transform: rotate(-90deg); }
[dir="rtl"] .dash-widget-bg1, [dir="rtl"] .dash-widget-bg2, [dir="rtl"] .dash-widget-bg3, [dir="rtl"] .dash-widget-bg4 { margin-right: 0; margin-left: 15px; }
[dir="rtl"] .avatar { margin-right: 0; margin-left: 5px; }
[dir="rtl"] .float-right { float: left !important; }
[dir="rtl"] .float-left { float: right !important; }
[dir="rtl"] .text-right { text-align: left !important; }
[dir="rtl"] .text-left { text-align: right !important; }
[dir="rtl"] .ml-auto, [dir="rtl"] .ml-3, [dir="rtl"] .ml-2, [dir="rtl"] .ml-1 { margin-left: 0 !important; margin-right: auto !important; }
[dir="rtl"] .mr-auto, [dir="rtl"] .mr-3, [dir="rtl"] .mr-2, [dir="rtl"] .mr-1 { margin-right: 0 !important; margin-left: auto !important; }
[dir="rtl"] .me-1, [dir="rtl"] .me-2, [dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: .25rem; }
[dir="rtl"] .ms-1, [dir="rtl"] .ms-2, [dir="rtl"] .ms-3 { margin-left: 0 !important; margin-right: .25rem; }

/* ---------- Sidebar (Preclinic white, slightly modernized) ---------- */
.sidebar { background-color: #fff; box-shadow: 1px 0 4px rgba(0,0,0,.05); }
.sidebar-menu li a { padding: 12px 20px; font-size: .9rem; color: #666; border-left: 3px solid transparent; transition: var(--transition); }
[dir="rtl"] .sidebar-menu li a { border-left: 0; border-right: 3px solid transparent; }
.sidebar-menu li.active a { border-left-color: var(--primary-color); background: #f3f7ff; }
[dir="rtl"] .sidebar-menu li.active a { border-right-color: var(--primary-color); }
.sidebar-menu li a:hover { background: #f8fbff; color: var(--primary-color); }
.sidebar-menu ul ul a { padding-left: 50px; }
[dir="rtl"] .sidebar-menu ul ul a { padding-left: 20px; padding-right: 50px; }
.sidebar-menu ul li a i { font-size: 18px; color: var(--primary-color); opacity: .7; }
.sidebar-menu li.active a i, .sidebar-menu li a:hover i { opacity: 1; }

/* ---------- Mobile responsive ---------- */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.opened { transform: translateX(0); }
    [dir="rtl"] .sidebar { transform: translateX(100%); }
    [dir="rtl"] .sidebar.opened { transform: translateX(0); }
    .page-wrapper { margin-left: 0 !important; margin-right: 0 !important; }
    .header .header-left { width: auto; }
}

/* ---------- Print styles ---------- */
body.report-print-page {
    --report-ink: #102033;
    --report-muted: #667085;
    --report-line: #dbe7f2;
    --report-teal: #0f766e;
    --report-teal-dark: #0b4f49;
    --report-soft: #f7fbfd;
}

body.report-print-page .content > .page-title-row {
    display: none;
}

body.report-print-page .page-header {
    align-items: stretch;
    border: 1px solid var(--report-line);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .08), rgba(30, 136, 229, .06)),
        #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
    padding: 16px 18px;
    margin-bottom: 14px;
}

body.report-print-page .page-header .page-title {
    color: var(--report-ink);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0;
    margin: 0;
}

body.report-print-page .page-header .page-title i {
    color: var(--report-teal) !important;
}

body.report-print-page .page-header .page-subtitle,
body.report-print-page .page-header .subtitle {
    color: var(--report-muted) !important;
    font-size: .85rem;
    margin: 5px 0 0;
}

body.report-print-page .page-header .btn,
body.report-print-page .page-header .dropdown-toggle,
body.report-print-page .card form .btn {
    border-radius: 8px;
    font-weight: 800;
    min-height: 38px;
    box-shadow: none;
}

body.report-print-page .btn-primary,
body.report-print-page .btn-success {
    background: var(--report-teal) !important;
    border-color: var(--report-teal) !important;
    color: #fff !important;
}

body.report-print-page .btn-outline-primary {
    border-color: var(--report-teal) !important;
    color: var(--report-teal) !important;
}

body.report-print-page .btn-outline-primary:hover {
    background: var(--report-teal) !important;
    color: #fff !important;
}

body.report-print-page .card {
    border: 1px solid var(--report-line);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
}

body.report-print-page .card-header {
    background: #fff !important;
    border-bottom: 1px solid var(--report-line);
    color: var(--report-ink) !important;
    font-weight: 900;
}

body.report-print-page .card:has(form) {
    background: var(--report-soft);
}

body.report-print-page .card form label,
body.report-print-page .form-label {
    color: var(--report-muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

body.report-print-page .form-control,
body.report-print-page .form-select {
    border-color: #bfd6ec;
    border-radius: 8px;
    box-shadow: none;
}

body.report-print-page .form-control:focus,
body.report-print-page .form-select:focus {
    border-color: var(--report-teal);
    box-shadow: 0 0 0 .18rem rgba(15, 118, 110, .12);
}

body.report-print-page .row.g-3 > [class*="col-"] > .card.bg-primary,
body.report-print-page .row.g-3 > [class*="col-"] > .card.bg-success,
body.report-print-page .row.g-3 > [class*="col-"] > .card.bg-info,
body.report-print-page .row.g-3 > [class*="col-"] > .card.bg-warning,
body.report-print-page .row.g-3 > [class*="col-"] > .card.bg-danger,
body.report-print-page .row.g-3 > [class*="col-"] > .card.border-primary,
body.report-print-page .row.g-3 > [class*="col-"] > .card.border-success,
body.report-print-page .row.g-3 > [class*="col-"] > .card.border-info,
body.report-print-page .row.g-3 > [class*="col-"] > .card.border-warning,
body.report-print-page .row.g-3 > [class*="col-"] > .card.border-danger {
    background: #fff !important;
    color: var(--report-ink) !important;
    border: 1px solid var(--report-line) !important;
    border-top: 4px solid var(--report-teal) !important;
}

body.report-print-page .row.g-3 > [class*="col-"] > .card .small,
body.report-print-page .row.g-3 > [class*="col-"] > .card .text-white-50 {
    color: var(--report-muted) !important;
    font-weight: 800;
}

body.report-print-page .row.g-3 > [class*="col-"] > .card h3,
body.report-print-page .row.g-3 > [class*="col-"] > .card h4,
body.report-print-page .row.g-3 > [class*="col-"] > .card .fs-4 {
    color: var(--report-ink) !important;
    font-weight: 900;
}

body.report-print-page .row.g-3 > [class*="col-"] > .card i.fa-2x,
body.report-print-page .row.g-3 > [class*="col-"] > .card i.fas.fa-2x {
    color: var(--report-teal) !important;
    opacity: .28 !important;
}

body.report-print-page .table-responsive {
    border-radius: 0;
}

body.report-print-page .table {
    color: var(--report-ink);
}

body.report-print-page .table thead th,
body.report-print-page .table-light th {
    background: #eef7f5 !important;
    color: #0f3f3a !important;
    border-bottom: 1px solid var(--report-line) !important;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

body.report-print-page .table td {
    border-color: #edf2f7;
    vertical-align: middle;
}

body.report-print-page .table tbody tr:hover {
    background: #f8fafc;
}

body.report-print-page .badge {
    border-radius: 7px;
    font-weight: 800;
}

body.report-print-page h5 {
    color: var(--report-ink);
    font-weight: 900;
}

body.report-print-page h5 i {
    color: var(--report-teal) !important;
}

body.report-print-page .card:has(canvas) {
    display: none !important;
}

@media print {
    .header, .sidebar, .sidebar-overlay, .no-print, .btn, .dataTables_filter, .dt-buttons,
    #toggle_btn, #mobile_btn, .mobile-user-menu, .user-menu { display: none !important; }
    .page-wrapper { margin: 0 !important; padding-top: 0 !important; }
    .content { padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
    body { background: #fff !important; }
}

/* ---------- Chart.js canvas safety ---------- */
/* When Chart.js is initialised with maintainAspectRatio: false, the canvas
   expands to fill its parent. If the parent has no fixed height, the canvas
   grows infinitely. This rule gives every canvas a sensible default height
   via its parent - wrap your <canvas> in <div class="chart-wrap">...</div>.
   Pages can still override with their own inline height for specific charts. */
.chart-wrap {
    position: relative;
    width: 100%;
    height: 280px;
}
.chart-wrap canvas { width: 100% !important; height: 100% !important; }

/* ---------- Flash messages ---------- */
.alert { border-radius: var(--radius-md); padding: 12px 20px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: #d4edda; border-color: #c3e6cb; color: #155724; }
.alert-danger  { background: #f8d7da; border-color: #f5c6cb; color: #721c24; }
.alert-warning { background: #fff3cd; border-color: #ffeeba; color: #856404; }
.alert-info    { background: #d1ecf1; border-color: #bee5eb; color: #0c5460; }

/* ---------- Dropdown menu tweaks ---------- */
.dropdown-menu { border-radius: var(--radius-sm); box-shadow: 0 4px 14px rgba(0,0,0,.10); border: 1px solid #eee; padding: 0; }
.dropdown-item { padding: 8px 16px; font-size: .875rem; color: #333; }
.dropdown-item:hover { background: #f8f9fa; color: var(--primary-color); }

/* ---------- Login page (account-box) ---------- */
.account-page { background: linear-gradient(135deg, #009efb 0%, #0288d1 100%); min-height: 100vh; display: flex; align-items: center; }
.account-box { box-shadow: 0 10px 40px rgba(0,0,0,.15); border-radius: var(--radius-lg); padding: 30px; width: 100%; max-width: 420px; }
.account-logo img { max-height: 60px; }

/* ---------- Modal ---------- */
.modal-content { border-radius: var(--radius-md); border: 0; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-header { border-bottom: 1px solid var(--border-color); padding: 15px 20px; }
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid var(--border-color); padding: 15px 20px; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: #888; }
.empty-state i { font-size: 3.5rem; color: #ddd; margin-bottom: 15px; }
.empty-state h4 { color: #666; margin-bottom: 5px; }
.empty-state p { font-size: .875rem; }

/* ---------- Sidebar logo badge (Preclinic logo) ---------- */
.logo img { width: 35px; height: 35px; }

/* ---------- Avatar list (Preclinic contact-list pattern) ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 8px 0; border-bottom: 1px solid #f3f3f3; }
.contact-list li:last-child { border-bottom: 0; }

/* ---------- Tag input ---------- */
.bootstrap-tagsinput { display: block; padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); }

/* ---------- Tabs ---------- */
.nav-tabs { border-bottom: 1px solid var(--border-color); }
.nav-tabs .nav-link { color: #888; border-radius: 0; padding: 10px 20px; border: 0; }
.nav-tabs .nav-link.active { color: var(--primary-color); background: transparent; border-bottom: 2px solid var(--primary-color); }

/* ---------- Utility: cursor pointer ---------- */
.cursor-pointer { cursor: pointer; }

/* ---------- Tooltip cleanup ---------- */
.tooltip-inner { border-radius: 4px; padding: 6px 10px; font-size: .75rem; }

/* ---------- Background gradient helpers (dashboard banner) ---------- */
.bg-gradient-primary { background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important; color: #fff; }
.bg-gradient-success { background: linear-gradient(135deg, #55ce63, #4ab657) !important; color: #fff; }
.bg-gradient-warning { background: linear-gradient(135deg, #ffbc34, #e9ab2e) !important; color: #fff; }
.bg-gradient-danger  { background: linear-gradient(135deg, #f62d51, #e6294b) !important; color: #fff; }
.bg-gradient-info    { background: linear-gradient(135deg, #009efb, #0288d1) !important; color: #fff; }
.bg-gradient-purple  { background: linear-gradient(135deg, #7460ee, #5e4dd6) !important; color: #fff; }

/* =============================================================
 * Bootstrap 5 -> Bootstrap 4 compatibility shims
 * (so legacy Saidy module pages work without rewriting markup)
 * ============================================================= */

/* form-select -> form-control (BS4 doesn't have form-select) */
.form-select {
    display: block;
    width: 100%;
    padding: .469rem .75rem;
    font-size: .875rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 8px 10px;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 38px;
    transition: var(--transition);
}
[dir="rtl"] .form-select {
    background-position: left .75rem center;
    padding-left: 1.75rem;
    padding-right: .75rem;
}
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 .2rem rgba(0,158,251,.12);
    outline: 0;
}
.form-select-sm { padding: .25rem .5rem; font-size: .75rem; min-height: auto; }
.form-select-lg { padding: .5rem 1rem; font-size: 1rem; min-height: auto; }

/* btn-close (BS5) - alias as a small x button */
.btn-close {
    box-sizing: content-box;
    width: 14px; height: 14px;
    padding: .25em .25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: .25rem;
    opacity: .5;
    cursor: pointer;
}
.btn-close:hover { opacity: .75; }

/* data-bs-dismiss aliases - allow BS5 markup to work with BS4 JS */
[data-bs-dismiss="alert"] { cursor: pointer; }
[data-bs-dismiss="modal"] { cursor: pointer; }
[data-bs-dismiss="dropdown"] { cursor: pointer; }

/* user-avatar class (used by legacy Saidy pages) */
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    font-weight: 600;
    font-size: .8rem;
    flex-shrink: 0;
}

/* search-box class (used by legacy Saidy pages) */
.search-box { position: relative; }
.search-box i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 12px;
    color: #888;
    font-size: .875rem;
    pointer-events: none;
}
[dir="rtl"] .search-box i { left: auto; right: 12px; }
.search-box .form-control { padding-left: 36px; }
[dir="rtl"] .search-box .form-control { padding-left: .75rem; padding-right: 36px; }

/* d-flex shim (Bootstrap 4 already has this, but BS5 sometimes uses d-grid) */
.d-grid { display: grid; gap: 0.5rem; }

/* g-* row gap shims */
.g-1 { --bs-gutter-x: .25rem; --bs-gutter-y: .25rem; }
.g-2 { --bs-gutter-x: .5rem;  --bs-gutter-y: .5rem; }
.g-4 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }
.g-5 { --bs-gutter-x: 3rem;   --bs-gutter-y: 3rem; }

/* col-auto shim */
.col-auto { flex: 0 0 auto; width: auto; max-width: 100%; }

/* form-check-input (BS5) -> form-check-input as BS4 styled */
.form-check-input {
    width: 16px; height: 16px;
    margin-top: .25rem;
    margin-right: .5rem;
    vertical-align: top;
    background-color: #fff;
    border: 1px solid #adb5bd;
    border-radius: .25em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.form-check-input:checked { background-color: var(--primary-color); border-color: var(--primary-color); }
.form-check-input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}
.form-check-input[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

/* form-text helper (BS5) */
.form-text { display: block; margin-top: .25rem; font-size: .8125rem; color: #888; }

/* text-secondary / text-success / etc. - Preclinic uses muted for these */
.text-secondary { color: #888 !important; }
.text-success   { color: #55ce63 !important; }
.text-warning   { color: #ffbc34 !important; }
.text-danger    { color: #f62d51 !important; }
.text-info      { color: #009efb !important; }

/* btn-outline-secondary (BS5) */
.btn-outline-secondary { color: #6c757d; border-color: #ced4da; }
.btn-outline-secondary:hover { color: #fff; background-color: #6c757d; border-color: #6c757d; }

/* border-0 helper */
.border-0 { border: 0 !important; }

/* shadow-sm / shadow / shadow-lg */
.shadow-sm { box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important; }
.shadow    { box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important; }

/* rounded helpers */
.rounded    { border-radius: .25rem !important; }
.rounded-2  { border-radius: .5rem !important; }
.rounded-3  { border-radius: 1rem !important; }
.rounded-top { border-top-left-radius: .25rem !important; border-top-right-radius: .25rem !important; }
.rounded-bottom { border-bottom-left-radius: .25rem !important; border-bottom-right-radius: .25rem !important; }

/* small, mute helpers */
.text-reset { color: inherit !important; }
.lead { font-size: 1.125rem; font-weight: 300; }
.small, small { font-size: 80%; }

/* dropdown-menu-end (BS5) -> dropdown-menu-right (BS4) */
.dropdown-menu-end { right: 0; left: auto; }

/* Toast (BS5) - minimal stub */
.toast { background: #fff; border-radius: .25rem; box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); padding: .75rem 1rem; }
.toast-header { display: flex; align-items: center; padding: .25rem .5rem; }

/* spinner-border (BS5) */
.spinner-border {
    display: inline-block;
    width: 1.5rem; height: 1.5rem;
    vertical-align: text-bottom;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}
.spinner-border-sm { width: 1rem; height: 1rem; border-width: .15em; }
@keyframes spinner-border { to { transform: rotate(360deg); } }

/* collapse.show (BS4) - ensure toggling works */
.collapse:not(.show) { display: none; }

/* accordion-button (BS5) - basic */
.accordion-button { padding: .75rem 1.25rem; cursor: pointer; }

/* position-fixed / position-absolute aliases */
.position-static   { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed    { position: fixed !important; }
.position-sticky   { position: sticky !important; }

/* top-0 / start-0 / end-0 / bottom-0 (BS5) */
.top-0    { top: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.start-0  { left: 0 !important; }
.start-50 { left: 50% !important; }
.start-100{ left: 100% !important; }
.end-0    { right: 0 !important; }
.end-50   { right: 50% !important; }
.end-100  { right: 100% !important; }
[dir="rtl"] .start-0 { left: auto !important; right: 0 !important; }
[dir="rtl"] .end-0   { right: auto !important; left: 0 !important; }

/* translate-middle (BS5) */
.translate-middle { transform: translate(-50%, -50%) !important; }

/* w-100 / h-100 (BS4 has these already, but reinforce) */
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.w-auto { width: auto !important; }

/* z-index helpers */
.z-index-1 { z-index: 1; }
.z-index-10 { z-index: 10; }
.z-index-100 { z-index: 100; }

/* gap utility */
.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }

/* link class (BS5) */
.link-primary { color: var(--primary-color); text-decoration: none; }
.link-primary:hover { color: var(--primary-dark); text-decoration: underline; }

/* =============================================================
 * Saidy Luxe UI refresh
 * Broad visual upgrade only: keeps existing Bootstrap structure,
 * breakpoints, form names, routes, scripts, and responsive behavior.
 * ============================================================= */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e3a8a;
    --primary-light: #38bdf8;
    --accent-gold: #f7c948;
    --accent-rose: #fb7185;
    --accent-teal: #14b8a6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --body-bg: #f4f7fb;
    --text-dark: #162033;
    --text-muted: #6b7280;
    --border-color: #dbe4f0;
    --card-bg: rgba(255,255,255,.94);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 8px 24px rgba(15,23,42,.06);
    --shadow-md: 0 14px 36px rgba(15,23,42,.10);
    --shadow-lg: 0 24px 64px rgba(15,23,42,.16);
    --lux-gradient: linear-gradient(135deg, #0f172a 0%, #1e3a8a 42%, #14b8a6 100%);
    --lux-gradient-soft: linear-gradient(135deg, rgba(37,99,235,.14), rgba(20,184,166,.12), rgba(247,201,72,.16));
    --transition: all .22s ease;
}

html { background: #0f172a; }
body {
    color: var(--text-dark);
    background:
        radial-gradient(circle at top left, rgba(56,189,248,.18), transparent 30rem),
        radial-gradient(circle at top right, rgba(247,201,72,.16), transparent 26rem),
        linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}
.main-wrapper { min-height: 100%; }

.header {
    min-height: 58px;
    background: var(--lux-gradient) !important;
    border-bottom: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 18px 40px rgba(15,23,42,.18);
}
.header .header-left {
    height: 58px;
    background: rgba(255,255,255,.08);
    border-right: 1px solid rgba(255,255,255,.14);
}
.header .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 58px;
}
.header .logo img {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #fff;
    padding: 3px;
    box-shadow: 0 8px 20px rgba(0,0,0,.22);
}
.header .logo span {
    color: #fff;
    font-weight: 800;
    letter-spacing: .2px;
}
#toggle_btn, .mobile_btn, .mobile-user-menu > a,
.user-menu.nav > li > a {
    color: rgba(255,255,255,.92) !important;
}
#toggle_btn { line-height: 58px; }
.user-menu.nav > li > a {
    height: 58px;
    line-height: 58px;
}
.user-menu.nav > li > a:hover,
.user-menu.nav > li > a:focus {
    background: rgba(255,255,255,.12);
}
.user-img .avatar,
.avatar {
    background: linear-gradient(135deg, var(--accent-gold), #f97316) !important;
    color: #111827 !important;
}

.global-search-wrapper {
    display: inline-flex;
    align-items: center;
    margin-left: 20px;
    margin-top: 10px !important;
    vertical-align: middle;
    width: 380px;
    max-width: 40vw;
    position: relative;
}
.global-search-wrapper .input-group {
    width: 100%;
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 999px;
    padding: 3px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}
#globalSearchInput {
    height: 34px !important;
    color: #fff !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 999px 0 0 999px !important;
}
#globalSearchInput::placeholder { color: rgba(255,255,255,.70); }
#globalSearchBtn {
    width: 40px;
    height: 34px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, var(--accent-gold), #fb923c) !important;
    color: #111827 !important;
    box-shadow: 0 8px 18px rgba(251,146,60,.28);
}
#globalSearchResults,
.dropdown-menu,
.notifications {
    border: 1px solid rgba(219,228,240,.95) !important;
    border-radius: 14px !important;
    box-shadow: var(--shadow-lg) !important;
}
#globalSearchResults {
    display: none;
    position: absolute;
    top: 42px;
    left: 0;
    right: 0;
    background: #fff;
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
}
.gsr-section {
    padding: 6px 14px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #009efb;
    background: #f0f8ff;
    border-bottom: 1px solid #e0f0ff;
}
.gsr-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    text-decoration: none;
    color: #1e293b;
    transition: .15s;
}
.gsr-item:hover { background: #f0f8ff; }
.gsr-item:last-child { border-bottom: none; }
.gsr-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #10b981);
}
.gsr-info {
    flex: 1;
    min-width: 0;
}
.gsr-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gsr-sub {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gsr-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}
.gsr-message {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
.gsr-message-sm {
    padding: 14px;
    font-size: 12px;
}
.gsr-empty-icon {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
    opacity: .4;
}

.sidebar {
    top: 58px;
    background:
        linear-gradient(180deg, rgba(15,23,42,.98), rgba(30,58,138,.96) 58%, rgba(19,78,74,.98)) !important;
    border-right: 1px solid rgba(255,255,255,.10);
    box-shadow: 18px 0 38px rgba(15,23,42,.18);
}
.sidebar-inner {
    scrollbar-color: rgba(247,201,72,.9) rgba(255,255,255,.10);
}
.sidebar-inner::-webkit-scrollbar-track { background: rgba(255,255,255,.10); }
.sidebar-inner::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent-gold), var(--accent-teal)); }
.sidebar .slimScrollDiv .slimScrollBar {
    background: linear-gradient(180deg, var(--accent-gold), var(--accent-teal)) !important;
}
.sidebar .slimScrollDiv .slimScrollRail {
    background: rgba(255,255,255,.12) !important;
}
.menu-title {
    color: rgba(255,255,255,.48) !important;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 16px 18px 7px;
    font-size: 11px;
}
.sidebar-menu li a,
.sidebar-menu > ul > li.submenu > a,
.sidebar-menu ul ul a {
    color: rgba(255,255,255,.74) !important;
    border-radius: 12px;
    margin: 3px 10px;
    transition: var(--transition) !important;
}
.sidebar-menu > ul > li > a {
    padding: 11px 14px !important;
}
.sidebar-menu ul li a i {
    width: 28px;
    min-width: 28px;
    height: 28px;
    border-radius: 9px;
    justify-content: center;
    color: #fff !important;
    background: rgba(255,255,255,.10);
}
.sidebar-menu > ul > li.submenu > a {
    border-left: 0 !important;
    font-weight: 700;
}
.sidebar-menu li a:hover,
.sidebar-menu li.active > a,
.sidebar-menu > ul > li.submenu.active > a,
.sidebar-menu > ul > li.submenu > a.subdrop,
.sidebar-menu ul ul a.active {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(37,99,235,.72), rgba(20,184,166,.62)) !important;
    box-shadow: 0 12px 26px rgba(8,47,73,.22);
}
.sidebar-menu li a:hover i,
.sidebar-menu li.active > a i,
.sidebar-menu > ul > li.submenu > a.subdrop i {
    background: rgba(255,255,255,.22);
    color: var(--accent-gold) !important;
}
.sidebar-menu ul ul {
    background: rgba(255,255,255,.07) !important;
    border-left: 1px solid rgba(255,255,255,.13) !important;
    margin: 4px 12px 8px 20px !important;
    border-radius: 14px !important;
    padding: 6px 0;
}
.sidebar-menu ul ul a {
    padding: 8px 12px 8px 40px !important;
    font-size: 13px;
}
.sidebar-menu ul ul li a {
    background: rgba(15,23,42,.24) !important;
    color: rgba(255,255,255,.88) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
}
.sidebar-menu ul ul a:hover { padding-left: 44px !important; }
.sidebar-menu .menu-arrow { color: rgba(255,255,255,.62); }
.submenu-list.is-open {
    display: block;
}
.submenu-list.is-closed {
    display: none;
}
.is-hidden {
    display: none !important;
}
.user-initial-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    font-size: 13px;
}
.dashboard-local-date {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}
.dashboard-local-date strong {
    color: #2563eb;
}
.page-wrapper {
    padding-top: 58px;
    background: transparent;
}
.page-wrapper > .content {
    padding-top: 26px;
}
.page-title {
    color: var(--text-dark);
    font-weight: 800;
    letter-spacing: 0;
}
.page-wrapper .content > .row:first-child {
    align-items: center;
}
.page-title-row {
    margin-bottom: 8px;
}
.page-title-row .page-title {
    margin-bottom: 0;
}
.card,
.page-header,
.stat-card,
.dash-widget,
.dash-lux-card,
.modal-content,
.invoice-box,
.profile-view,
.settings-card,
.settings-section,
.white-box,
.panel,
.box,
.widget {
    background: var(--card-bg) !important;
    border: 1px solid rgba(219,228,240,.86) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm) !important;
}
.card,
.stat-card,
.dash-widget,
.dash-lux-card {
    overflow: hidden;
}
.card:hover,
.stat-card:hover,
.dash-widget:hover,
.dash-lux-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
}
.card .card-header,
.card-header,
.modal-header,
.panel-heading,
.box-header {
    background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,251,255,.88)) !important;
    border-bottom: 1px solid rgba(219,228,240,.9) !important;
}
.card-title,
.page-header h2,
.dash-section-title {
    color: var(--text-dark) !important;
    font-weight: 800 !important;
    letter-spacing: 0;
}

.btn {
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0;
}
.btn-primary,
.bg-primary,
.badge-primary {
    background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
    border-color: transparent !important;
    color: #fff !important;
}
.btn-primary {
    box-shadow: 0 10px 22px rgba(37,99,235,.22) !important;
}
.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #1d4ed8, #0f766e) !important;
    transform: translateY(-1px);
}
.btn-success, .bg-success, .badge-success { background: linear-gradient(135deg, #10b981, #059669) !important; border-color: transparent !important; }
.btn-warning, .bg-warning, .badge-warning { background: linear-gradient(135deg, #f7c948, #f59e0b) !important; border-color: transparent !important; color: #111827 !important; }
.btn-danger, .bg-danger, .badge-danger { background: linear-gradient(135deg, #fb7185, #ef4444) !important; border-color: transparent !important; }
.btn-info, .bg-info, .badge-info { background: linear-gradient(135deg, #38bdf8, #2563eb) !important; border-color: transparent !important; }
.btn-light {
    background: #fff !important;
    border-color: rgba(219,228,240,.92) !important;
    color: var(--text-dark) !important;
}

.form-control,
.form-select,
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    background-color: #fff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    color: var(--text-dark);
    box-shadow: inset 0 1px 0 rgba(15,23,42,.02);
}
.form-control:focus,
.form-select:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default .select2-selection--single:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 .2rem rgba(56,189,248,.16) !important;
}
.form-group > label,
.form-label {
    color: #334155;
    font-weight: 700;
}
.input-group-text {
    background: #f8fbff;
    border-color: var(--border-color);
    color: #475569;
}
.content .row > [class*="col-"] > .card,
.content .row > [class*="col-"] > .stat-card,
.content .row > [class*="col-"] > .dash-widget,
.content .row > [class*="col-"] > .dash-lux-card {
    height: calc(100% - 25px);
}

.table {
    color: var(--text-dark);
    border-color: rgba(219,228,240,.86) !important;
}
.table thead th {
    background: linear-gradient(180deg, #f8fbff, #eef5fb) !important;
    color: #475569 !important;
    border-bottom: 1px solid rgba(203,213,225,.9) !important;
    font-weight: 800;
    letter-spacing: .04em;
}
.table tbody td {
    border-top-color: rgba(226,232,240,.85) !important;
}
.table-hover tbody tr:hover,
.table-striped > tbody > tr:nth-of-type(2n+1) {
    background: rgba(37,99,235,.045) !important;
}

.badge {
    border-radius: 999px;
    letter-spacing: .02em;
}
.alert {
    border: 0;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}
.pagination .page-link {
    border-color: var(--border-color);
    color: var(--primary-color);
}
.page-item.active .page-link {
    background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
    border-color: transparent !important;
}

.dash-lux-card {
    position: relative;
    min-height: 160px;
    padding: 22px 20px 18px 76px !important;
    overflow: hidden;
    isolation: isolate;
}
.dash-lux-card:before,
.stat-card:before,
.dash-widget:before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #14b8a6, #f7c948, #fb7185);
}
.dash-lux-card .lux-icon,
.stat-card .stat-icon,
.dash-widget-bg1,
.dash-widget-bg2,
.dash-widget-bg3,
.dash-widget-bg4 {
    border-radius: 16px !important;
    box-shadow: 0 14px 28px rgba(15,23,42,.16) !important;
}
.dash-lux-card .lux-icon {
    position: absolute;
    top: 24px;
    left: 22px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 19px;
    line-height: 1;
    z-index: 2;
}
.dash-lux-card .lux-icon i {
    color: #fff !important;
    font-size: 19px !important;
    line-height: 1 !important;
}
.dash-lux-card .lux-value,
.stat-card .stat-value,
.dash-widget-info h3 {
    color: #0f172a !important;
    font-weight: 900 !important;
    font-size: 1.8rem;
    line-height: 1.05;
    margin: 0 0 8px;
}
.dash-lux-card .lux-label,
.stat-card .stat-label,
.dash-widget-info span {
    color: #64748b !important;
    display: block;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 8px;
}
.dash-lux-card .lux-sub {
    color: #0f172a !important;
    display: block;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.35;
}
.dash-lux-card .lux-sub i {
    margin-right: 4px;
}
.dash-lux-card .lux-value-money {
    font-size: 1.5rem;
}
.dash-lux-card .lux-wave {
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    border-radius: 16px 16px 0 0;
    z-index: 1;
}
.bg-grad-blue,
.dash-widget-bg1 { background: linear-gradient(135deg, #2563eb, #38bdf8) !important; }
.bg-grad-green,
.dash-widget-bg2 { background: linear-gradient(135deg, #059669, #2dd4bf) !important; }
.bg-grad-amber,
.dash-widget-bg3 { background: linear-gradient(135deg, #f59e0b, #f7c948) !important; }
.bg-grad-red,
.dash-widget-bg4 { background: linear-gradient(135deg, #ef4444, #fb7185) !important; }
.bg-grad-purple { background: linear-gradient(135deg, #7c3aed, #38bdf8) !important; }
.bg-grad-cyan { background: linear-gradient(135deg, #0891b2, #14b8a6) !important; }
.dashboard-welcome-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 42%, #14b8a6 100%) !important;
    color: #fff;
    border: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15,23,42,.20) !important;
}
.dashboard-welcome-card .card-body {
    color: #fff;
}
.dashboard-welcome-title {
    margin: 0;
    color: #fff !important;
    font-weight: 800;
    font-size: 1.5rem;
}
.dashboard-welcome-meta {
    margin: 4px 0 0;
    color: rgba(255,255,255,.9) !important;
    font-size: .875rem;
}
.dashboard-welcome-count {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}
.dashboard-welcome-count-label {
    color: rgba(255,255,255,.9);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.tabular-time {
    font-variant-numeric: tabular-nums;
}
.dashboard-panel-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.dashboard-panel-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 16px 16px 0 0;
}
.dashboard-panel-title {
    font-size: 1rem;
    font-weight: 700;
}
.dashboard-chart-frame {
    position: relative;
    height: 280px;
    width: 100%;
}
.dashboard-order-cell {
    min-width: 180px;
}
.pending-balance-card {
    border-left: 5px solid #55ce63;
}
.pending-balance-card.is-danger {
    border-left-color: #f62d51;
}
.pending-balance-card.is-success {
    border-left-color: #55ce63;
}
.dashboard-section-link {
    font-size: .85rem;
}
.dashboard-empty-icon {
    font-size: 2rem;
    opacity: .4;
}

.topnav-dropdown-header,
.topnav-dropdown-footer {
    background: #f8fbff;
    border-color: var(--border-color);
}
.gsr-section {
    color: var(--primary-color) !important;
    background: #eff6ff !important;
}
.gsr-item:hover { background: #f0fdfa !important; }

html[dir="rtl"] .header .header-left {
    border-right: 0;
    border-left: 1px solid rgba(255,255,255,.14);
}
html[dir="rtl"] #globalSearchInput {
    border-radius: 0 999px 999px 0 !important;
}
html[dir="rtl"] .sidebar-menu ul ul {
    border-left: 0 !important;
    border-right: 1px solid rgba(255,255,255,.13) !important;
    margin: 4px 20px 8px 12px !important;
}
html[dir="rtl"] .sidebar-menu ul ul a {
    padding: 8px 40px 8px 12px !important;
}
html[dir="rtl"] .sidebar-menu ul ul a:hover {
    padding-right: 44px !important;
    padding-left: 12px !important;
}

@media only screen and (min-width: 991px) {
    .mini-sidebar .page-wrapper { margin-left: 60px; }
    .mini-sidebar.expand-menu .sidebar { width: 230px; }
}
@media only screen and (max-width: 991.98px) {
    .header {
        min-height: 72px;
        display: flex;
        align-items: center;
        padding: 0 10px;
    }
    .header .header-left {
        position: relative !important;
        width: auto !important;
        flex: 1 1 auto;
        padding: 0 52px 0 8px;
        background: transparent;
        border: 0;
    }
    .header .logo,
    #toggle_btn,
    .user-menu.nav > li > a {
        height: 72px;
        line-height: 72px;
    }
    .header .logo img {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }
    .header .logo span {
        display: inline-block !important;
        max-width: 170px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    #toggle_btn { display: none !important; }
    a.mobile_btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 14px;
        top: 13px;
        width: 44px;
        height: 44px;
        line-height: 44px;
        border-radius: 14px;
        background: rgba(255,255,255,.16);
        color: #fff !important;
        font-size: 24px;
    }
    .user-menu {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        flex: 0 0 auto;
        margin: 0;
    }
    .user-menu .nav-item.d-none.d-sm-block {
        display: block !important;
    }
    .user-menu.nav > li > a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 42px;
        padding: 0 8px;
        font-size: 17px;
    }
    .user-menu.nav > li.has-arrow > a > span:nth-child(2),
    .user-menu.nav > li.has-arrow > a:after {
        display: none !important;
    }
    .user-menu.nav > li > a .badge {
        top: 8px;
        right: 2px;
    }
    .mobile-user-menu {
        display: none !important;
    }
    .global-search-wrapper {
        width: 300px !important;
        max-width: 34vw !important;
    }
    .sidebar {
        top: 72px;
        margin-left: -225px;
    }
    .slide-nav .sidebar { margin-left: 0; }
    .page-wrapper { padding-top: 72px; }
}
@media only screen and (max-width: 767.98px) {
    .header {
        min-height: 112px;
        flex-wrap: wrap;
        align-content: flex-start;
        padding-top: 0;
    }
    .header .header-left {
        flex: 1 1 100%;
        height: 62px;
        padding-right: 58px;
    }
    .header .logo {
        height: 62px;
        line-height: 62px;
    }
    .header .logo img {
        width: 46px;
        height: 46px;
    }
    .header .logo span {
        max-width: calc(100vw - 130px);
        font-size: 18px;
    }
    a.mobile_btn {
        top: 9px;
        right: 12px;
    }
    .global-search-wrapper { display: none !important; }
    .user-menu {
        flex: 1 1 100%;
        height: 48px;
        justify-content: space-around;
        padding: 0 8px 8px;
    }
    .user-menu.nav > li > a {
        height: 40px;
        line-height: 40px;
        min-width: 44px;
        border-radius: 14px;
        background: rgba(255,255,255,.12);
    }
    .user-menu .dropdown-menu {
        position: absolute !important;
        right: 8px !important;
        left: auto !important;
        top: 104px !important;
        max-width: calc(100vw - 16px);
    }
    .notifications {
        width: calc(100vw - 20px) !important;
        max-width: 330px;
    }
    .sidebar {
        top: 112px;
    }
    .page-wrapper {
        padding-top: 112px;
    }
    .page-title { font-size: 1.25rem; }
    .card-body { padding: 16px; }
}
@media only screen and (max-width: 575.98px) {
    .page-wrapper > .content { padding: 15px; }
    .dash-lux-card { min-height: 150px; }
    .btn { padding-left: 12px; padding-right: 12px; }
    .header .logo span {
        font-size: 17px;
        max-width: calc(100vw - 122px);
    }
    .user-menu.nav > li > a {
        min-width: 40px;
        padding: 0 6px;
    }
}

/* =============================================================
 * Project-wide Health UI System
 * This final layer intentionally overrides old page-by-page module
 * styles so every module reads as the same modern clinical product.
 * ============================================================= */
:root {
    --health-ink: #102033;
    --health-muted: #607086;
    --health-line: #d9e6f2;
    --health-surface: rgba(255,255,255,.96);
    --health-surface-2: #f7fbff;
    --health-mint: #10b981;
    --health-cyan: #06b6d4;
    --health-blue: #2563eb;
    --health-navy: #0f172a;
    --health-gold: #f7c948;
    --health-red: #ef4444;
}

body:after {
    content: "";
    position: fixed;
    inset: 58px 0 auto 230px;
    height: 180px;
    pointer-events: none;
    z-index: -1;
    background:
        linear-gradient(135deg, rgba(224,242,254,.72), rgba(220,252,231,.60) 52%, rgba(240,253,250,.66)),
        radial-gradient(circle at 18% 30%, rgba(37,99,235,.16), transparent 28rem),
        radial-gradient(circle at 88% 20%, rgba(16,185,129,.18), transparent 25rem);
}
.mini-sidebar body:after { left: 60px; }

.content {
    color: var(--health-ink);
}
.content a:not(.btn):not(.page-link):not(.dropdown-item) {
    color: #1d4ed8;
    font-weight: 700;
}
.content a:not(.btn):hover {
    color: #0f766e;
}

.page-header,
.content > .page-header,
.content > .card:first-of-type.page-header {
    position: relative;
    overflow: hidden;
    padding: 22px 26px !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(240,253,250,.92)) !important;
    border: 1px solid rgba(191,219,254,.85) !important;
    border-radius: 20px !important;
    box-shadow: 0 18px 46px rgba(15,23,42,.09) !important;
}
.page-header:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--health-blue), var(--health-cyan), var(--health-mint), var(--health-gold));
}
.page-header .page-title,
.page-header h1,
.page-header h2,
.content > h1,
.content > h2,
.content > h3 {
    color: var(--health-ink) !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}
.page-header .subtitle,
.page-header .page-subtitle,
.page-subtitle,
.text-muted {
    color: var(--health-muted) !important;
}

.card,
.panel,
.box,
.white-box,
.widget,
.settings-card,
.settings-section,
.member-panel,
.profile-widget,
.doctor-widget,
.invoice-card,
.dc-card,
.lux-card,
.report-card,
.filter-card {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.96)) !important;
    border: 1px solid rgba(217,230,242,.96) !important;
    border-radius: 20px !important;
    box-shadow: 0 14px 38px rgba(15,23,42,.075) !important;
}
.card:after,
.panel:after,
.box:after,
.white-box:after,
.widget:after,
.dc-card:after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
}
.card-header,
.panel-heading,
.box-header,
.modal-header,
.dc-head,
.card .card-header.bg-primary,
.card .card-header.bg-success,
.card .card-header.bg-danger,
.card .card-header.bg-dark,
.card .card-header.bg-warning,
.card .card-header.bg-info {
    color: var(--health-ink) !important;
    background:
        linear-gradient(135deg, rgba(240,249,255,.98), rgba(236,253,245,.94)) !important;
    border-bottom: 1px solid rgba(217,230,242,.96) !important;
    border-radius: 20px 20px 0 0 !important;
    font-weight: 900 !important;
}
.card-header i,
.panel-heading i,
.box-header i {
    color: var(--health-blue) !important;
}
.card-body {
    color: var(--health-ink);
}
.card-footer,
.modal-footer {
    background: rgba(248,251,255,.94) !important;
    border-top: 1px solid rgba(217,230,242,.96) !important;
    border-radius: 0 0 20px 20px !important;
}

.bg-primary,
.bg-info,
.bg-success,
.bg-danger,
.bg-dark,
.bg-warning {
    color: #fff !important;
    border: 0 !important;
}
.bg-primary { background: linear-gradient(135deg, #2563eb, #06b6d4) !important; }
.bg-info { background: linear-gradient(135deg, #0891b2, #38bdf8) !important; }
.bg-success { background: linear-gradient(135deg, #059669, #10b981) !important; }
.bg-danger { background: linear-gradient(135deg, #ef4444, #fb7185) !important; }
.bg-dark { background: linear-gradient(135deg, #0f172a, #334155) !important; }
.bg-warning { background: linear-gradient(135deg, #f59e0b, #f7c948) !important; color: #111827 !important; }

.card[style*="#009efb"],
.card[style*="#0288d1"],
.card[style*="#55ce63"],
.card[style*="#4ab657"] {
    background: linear-gradient(135deg, #0f172a 0%, #2563eb 48%, #10b981 100%) !important;
    color: #fff !important;
}

.table-responsive {
    border-radius: 0 0 18px 18px;
}
.table,
.dataTable {
    background: transparent !important;
    border: 0 !important;
}
.table thead th,
.dataTable thead th {
    position: relative;
    background: linear-gradient(180deg, #f0f9ff, #eaf7f3) !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: .055em;
    border-top: 0 !important;
    border-bottom: 1px solid rgba(203,213,225,.9) !important;
}
.table tbody tr,
.dataTable tbody tr {
    background: rgba(255,255,255,.76) !important;
}
.table tbody tr:nth-child(even),
.dataTable tbody tr:nth-child(even) {
    background: rgba(248,251,255,.84) !important;
}
.table tbody tr:hover,
.dataTable tbody tr:hover {
    background: rgba(224,242,254,.72) !important;
}
.table tbody td,
.dataTable tbody td {
    color: #1f2937;
    border-color: rgba(226,232,240,.78) !important;
}
.table-sm td,
.table-sm th {
    padding: .64rem .75rem !important;
}

.btn,
button.btn,
a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    min-height: 38px;
    border-radius: 12px !important;
    border-width: 1px;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    box-shadow: none;
}
.btn-sm {
    min-height: 32px;
    border-radius: 10px !important;
}
.btn-lg {
    min-height: 46px;
    border-radius: 14px !important;
}
.btn-group > .btn {
    border-radius: 10px !important;
    margin-right: 4px;
}
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-info,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning {
    background: rgba(255,255,255,.88) !important;
    border-color: rgba(37,99,235,.28) !important;
    color: #1e40af !important;
}
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-info:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-outline-warning:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #2563eb, #10b981) !important;
}
.btn-secondary {
    color: #334155 !important;
    background: #eaf2fb !important;
    border-color: #d9e6f2 !important;
}

.form-control,
.form-select,
select.form-control,
textarea.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    min-height: 42px;
    background: #fff !important;
    border: 1px solid rgba(191,219,254,.95) !important;
    border-radius: 13px !important;
    color: var(--health-ink) !important;
    box-shadow: inset 0 1px 0 rgba(15,23,42,.025) !important;
}
textarea.form-control {
    min-height: 88px;
}
.form-control::placeholder {
    color: #94a3b8 !important;
}
.search-box .form-control {
    padding-left: 42px !important;
}
.search-box i {
    color: #2563eb !important;
}
.input-group {
    border-radius: 14px;
}
.input-group .form-control:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.input-group .btn:last-child,
.input-group-append .btn {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.nav-tabs {
    gap: 8px;
    border-bottom: 0 !important;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(217,230,242,.9);
    border-radius: 16px;
    padding: 7px;
}
.nav-tabs .nav-link {
    border: 0 !important;
    border-radius: 12px !important;
    color: #475569 !important;
    font-weight: 800;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: #fff !important;
    background: linear-gradient(135deg, #2563eb, #10b981) !important;
    box-shadow: 0 10px 20px rgba(37,99,235,.18);
}

.badge,
.label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    border-radius: 999px !important;
    padding: .28rem .62rem !important;
    font-weight: 900 !important;
}
.badge.bg-light,
.badge-light {
    color: #1f2937 !important;
    background: #eef6ff !important;
    border: 1px solid rgba(191,219,254,.88);
}
.badge.bg-secondary,
.badge-secondary {
    color: #334155 !important;
    background: #e2e8f0 !important;
}

.alert {
    border-radius: 16px !important;
    border: 1px solid transparent !important;
    box-shadow: 0 12px 30px rgba(15,23,42,.07) !important;
}
.alert-success { background: #ecfdf5 !important; color: #065f46 !important; border-color: #a7f3d0 !important; }
.alert-danger { background: #fff1f2 !important; color: #9f1239 !important; border-color: #fecdd3 !important; }
.alert-warning { background: #fffbeb !important; color: #92400e !important; border-color: #fde68a !important; }
.alert-info { background: #eff6ff !important; color: #1e40af !important; border-color: #bfdbfe !important; }

.modal-content {
    border-radius: 22px !important;
    overflow: hidden;
}
.modal-title {
    font-weight: 900;
    color: var(--health-ink);
}
.close,
.btn-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background-color: #eef6ff;
}

.pagination {
    gap: 6px;
}
.pagination .page-link {
    min-width: 36px;
    border-radius: 10px !important;
    border: 1px solid rgba(191,219,254,.9) !important;
    color: #1d4ed8 !important;
    font-weight: 800;
}
.page-item.active .page-link {
    color: #fff !important;
}

.user-avatar,
.profile-img,
.avatar {
    background: linear-gradient(135deg, #2563eb, #10b981) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(37,99,235,.18);
}
.contact-list li,
.list-group-item,
.notification-message,
.activity-box .activity-list,
.timeline-item {
    background: rgba(255,255,255,.76) !important;
    border-color: rgba(217,230,242,.86) !important;
}

.dataTables_wrapper .row:first-child,
.dataTables_wrapper .row:last-child,
form.row,
.card-body > form,
.filter-row,
.search-filter,
.table-search {
    align-items: center;
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--health-muted) !important;
    font-weight: 700;
}

.dc-card {
    overflow: hidden;
}
.dc-card .dc-head {
    background: linear-gradient(135deg, #2563eb, #10b981) !important;
    color: #fff !important;
}
.dc-card .dc-body {
    background: rgba(255,255,255,.94);
}
.row.g-3 > [class*="col-"],
.row > [class*="col-md-"],
.row > [class*="col-lg-"] {
    min-width: 0;
}
.content .card.mb-3[style],
.content .card.no-print[style],
.content .dc-card[style],
.content .stat-card[style],
.content .dash-lux-card[style] {
    border-radius: 20px !important;
    box-shadow: 0 16px 42px rgba(15,23,42,.09) !important;
}
.content .card.mb-3[style*="linear-gradient"],
.content .card.no-print[style*="linear-gradient"] {
    background: linear-gradient(135deg, #0f172a 0%, #2563eb 45%, #10b981 100%) !important;
    color: #fff !important;
}
.content .card.mb-3[style*="linear-gradient"] .btn-light,
.content .card.no-print[style*="linear-gradient"] .btn-light {
    background: rgba(255,255,255,.94) !important;
    color: #0f172a !important;
}
.content .card.mb-3[style*="linear-gradient"] small,
.content .card.no-print[style*="linear-gradient"] small,
.content .card.mb-3[style*="linear-gradient"] p,
.content .card.no-print[style*="linear-gradient"] p {
    color: rgba(255,255,255,.86) !important;
}
.content .card .card-header.text-white,
.content .card-header.text-white {
    color: #fff !important;
}
.content .card .card-header.text-white i,
.content .card-header.text-white i {
    color: #fff !important;
}
.action-buttons,
.actions,
.form-actions,
.card-actions,
.page-header > div:last-child,
.btn-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.page-header > div:first-child {
    min-width: 0;
}
.page-header .badge {
    white-space: nowrap;
}
.table td .btn,
.table td .badge {
    vertical-align: middle;
}
.table td .btn-group {
    gap: 4px;
}
.table td .btn-group .btn {
    flex: 0 0 auto;
}
.card-body.p-0 .table {
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}
.content .fa,
.content .fas,
.content .far,
.content .fab {
    line-height: 1;
}
.content h4,
.content h5,
.content h6 {
    color: var(--health-ink);
    font-weight: 850;
}
.content .small,
.content small {
    color: var(--health-muted);
}
.dropdown-item {
    color: #334155 !important;
    font-weight: 700;
}
.dropdown-item:hover,
.dropdown-item:focus {
    color: #0f766e !important;
    background: #ecfdf5 !important;
}

@media only screen and (max-width: 991.98px) {
    body:after {
        inset: 72px 0 auto 0;
    }
}
@media only screen and (max-width: 767.98px) {
    body:after {
        inset: 112px 0 auto 0;
        height: 130px;
    }
    .page-header,
    .content > .page-header {
        padding: 18px !important;
        border-radius: 18px !important;
        gap: 12px;
    }
    .page-header .btn,
    .page-header .btn-group {
        width: 100%;
    }
    .card,
    .panel,
    .box,
    .white-box,
    .widget,
    .dc-card {
        border-radius: 18px !important;
    }
    .card-header,
    .card-footer {
        border-radius: 18px 18px 0 0 !important;
    }
    .btn-group {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .table-responsive {
        border-radius: 0 0 16px 16px;
    }
    .table thead th,
    .table tbody td {
        white-space: nowrap;
    }
}

/* Chat + mobile header final fixes */
#chatHeaderBadge {
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px !important;
    font-size: 10px;
    line-height: 18px;
}
#open_msg_box {
    position: relative;
}
#open_msg_box #chatHeaderBadge {
    position: absolute;
    top: 8px;
    right: 4px;
}
.saidy-developer-credit {
    margin: 18px 0 6px;
    padding: 10px 14px;
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.12));
    color: #0f766e;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0;
}
@media only screen and (max-width: 991.98px) {
    .header {
        overflow: visible;
    }
    .global-search-wrapper {
        display: none !important;
    }
    .user-menu {
        position: relative;
        z-index: 4;
    }
    .user-menu .nav-item.d-none.d-sm-block {
        display: block !important;
    }
    .user-menu.nav > li > a {
        position: relative;
    }
    .user-menu.nav > li > a > i {
        line-height: 1;
    }
}
@media only screen and (max-width: 767.98px) {
    .header {
        min-height: 108px;
    }
    .header .header-left {
        height: 58px;
    }
    .header .logo {
        height: 58px;
        line-height: 58px;
    }
    .user-menu {
        height: 46px;
        gap: 6px;
    }
    .user-menu.nav > li > a {
        width: 42px;
        min-width: 42px;
        height: 38px;
        line-height: 38px;
        padding: 0 !important;
    }
    .user-menu .has-arrow .user-img {
        margin: 0;
    }
    .user-menu .has-arrow .status {
        right: 0;
    }
    .sidebar {
        top: 108px;
    }
    .page-wrapper {
        padding-top: 108px;
    }
    .saidy-developer-credit {
        margin-top: 14px;
        padding: 9px 10px;
        font-size: 11px;
    }
}
@media only screen and (max-width: 420px) {
    .header .logo span {
        max-width: calc(100vw - 132px);
        font-size: 15px;
    }
    .user-menu.nav > li > a {
        width: 39px;
        min-width: 39px;
    }
}

/* ---------- Internal team chat ---------- */
.clinic-chat-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 280px;
    gap: 18px;
    min-height: calc(100vh - 180px);
}
.clinic-chat-panel {
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(217,230,242,.95);
    border-radius: 22px;
    box-shadow: 0 18px 46px rgba(15,23,42,.09);
    overflow: hidden;
    min-height: 0;
}
.clinic-chat-sidebar,
.clinic-chat-members {
    display: flex;
    flex-direction: column;
}
.clinic-chat-head {
    padding: 18px;
    background: linear-gradient(135deg, #0f172a, #2563eb 55%, #10b981);
    color: #fff;
}
.clinic-chat-head h4 {
    margin: 0;
    color: #fff;
    font-weight: 900;
}
.clinic-chat-head small {
    color: rgba(255,255,255,.78);
}
.clinic-chat-search {
    padding: 12px;
    border-bottom: 1px solid #d9e6f2;
}
.clinic-room-list,
.clinic-member-list {
    overflow-y: auto;
    padding: 10px;
}
.clinic-room {
    width: 100%;
    border: 0;
    background: transparent;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    color: #102033;
}
.clinic-room:hover,
.clinic-room.active {
    background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(16,185,129,.12));
}
.clinic-room-avatar,
.clinic-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, #2563eb, #10b981);
    color: #fff;
    font-weight: 900;
}
.clinic-room-main {
    min-width: 0;
    flex: 1;
}
.clinic-room-title,
.clinic-member-name {
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.clinic-room-sub,
.clinic-member-role,
.clinic-message-meta {
    color: #607086;
    font-size: 12px;
}
.clinic-room-badge {
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}
.clinic-chat-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.clinic-chat-toolbar {
    padding: 16px 18px;
    border-bottom: 1px solid #d9e6f2;
    background: linear-gradient(135deg, #f0f9ff, #ecfdf5);
    display: flex;
    align-items: center;
    gap: 12px;
}
.clinic-chat-toolbar .title {
    font-weight: 900;
    color: #102033;
}
.clinic-chat-toolbar .subtitle {
    font-size: 12px;
    color: #607086;
}
.clinic-chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.08), transparent 26rem),
        radial-gradient(circle at bottom right, rgba(16,185,129,.10), transparent 24rem),
        #f7fbff;
}
.clinic-empty-chat {
    height: 100%;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #607086;
}
.clinic-empty-chat-icon {
    font-size: 42px;
    opacity: .35;
}
.clinic-chat-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: flex-end;
}
.clinic-chat-row.mine {
    justify-content: flex-end;
}
.clinic-chat-row.mine .clinic-chat-avatar {
    display: none;
}
.clinic-bubble {
    max-width: min(680px, 78%);
    padding: 12px 14px;
    border-radius: 18px 18px 18px 6px;
    background: #fff;
    border: 1px solid #d9e6f2;
    box-shadow: 0 10px 24px rgba(15,23,42,.06);
    color: #102033;
}
.clinic-chat-row.mine .clinic-bubble {
    border-radius: 18px 18px 6px 18px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #10b981);
    border-color: transparent;
}
.clinic-chat-row.mine .clinic-message-meta {
    color: rgba(255,255,255,.78);
}
.clinic-message-body {
    overflow-wrap: anywhere;
}
.clinic-chat-image-preview {
    display: block;
    width: 150px;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    cursor: zoom-in;
}
.clinic-chat-compose {
    padding: 14px;
    border-top: 1px solid #d9e6f2;
    background: #fff;
}
.clinic-chat-compose form {
    display: flex;
    gap: 10px;
}
.clinic-emoji-wrap {
    position: relative;
}
.clinic-emoji-picker {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(6, 36px);
    gap: 4px;
    padding: 10px;
    border: 1px solid #d9e6f2;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .18);
}
.clinic-emoji-picker[hidden] {
    display: none;
}
.clinic-emoji-picker button {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 22px;
    line-height: 36px;
    cursor: pointer;
}
.clinic-emoji-picker button:hover {
    background: #eef6ff;
}
.clinic-chat-compose input[type="text"] {
    flex: 1;
}
.clinic-member-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
}
.clinic-member-card:hover {
    background: #f0f9ff;
}
.clinic-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
    display: inline-block;
}
.clinic-status-dot.online {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16,185,129,.12);
}
.clinic-chat-error {
    margin: 12px;
}
@media (max-width: 1199.98px) {
    .clinic-chat-shell {
        grid-template-columns: 280px minmax(0, 1fr);
    }
    .clinic-chat-members {
        display: none;
    }
}
@media (max-width: 767.98px) {
    .clinic-chat-shell {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 210px);
    }
    .clinic-chat-sidebar {
        max-height: 260px;
    }
    .clinic-chat-main {
        min-height: 520px;
    }
    .clinic-chat-toolbar {
        padding: 12px;
    }
    .clinic-chat-log {
        padding: 14px;
    }
    .clinic-bubble {
        max-width: 86%;
    }
    .clinic-chat-compose form {
        gap: 8px;
    }
    .clinic-chat-compose .btn {
        min-width: 44px;
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* ---------- Normal app shell restore ---------- */
body:not(.pos-page) .main-wrapper > .header {
    position: fixed !important;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    display: flex !important;
    align-items: center !important;
    height: 50px !important;
    min-height: 50px !important;
    overflow: visible !important;
    background: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(15,23,42,.08);
}
body:not(.pos-page) .main-wrapper > .header .header-left {
    float: none !important;
    flex: 0 0 230px !important;
    width: 230px !important;
    height: 50px !important;
    background: rgba(255,255,255,.08);
    padding: 0 16px !important;
    text-align: left !important;
}
body:not(.pos-page) .main-wrapper > .header .logo {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start !important;
    width: 100%;
    height: 50px !important;
    line-height: 50px !important;
    padding-left: 0;
    gap: 10px;
}
body:not(.pos-page) .main-wrapper > .header .logo img {
    flex: 0 0 auto;
    width: 34px !important;
    height: 34px !important;
}
body:not(.pos-page) .main-wrapper > .header .logo span {
    display: inline-block !important;
    max-width: 150px;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body:not(.pos-page) #toggle_btn {
    float: none !important;
    flex: 0 0 46px !important;
    width: 46px;
    height: 50px !important;
    line-height: 50px !important;
    color: #fff !important;
    text-align: center;
}
body:not(.pos-page) .global-search-wrapper {
    float: none !important;
    flex: 1 1 320px !important;
    display: flex !important;
    align-items: center;
    width: auto !important;
    max-width: 560px !important;
    min-width: 180px;
    height: 50px;
    margin: 0 12px !important;
    position: relative;
}
body:not(.pos-page) .global-search-wrapper .input-group {
    width: 100%;
    flex-wrap: nowrap;
}
body:not(.pos-page) .global-search-wrapper .form-control {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 4px 0 0 4px !important;
}
body:not(.pos-page) .global-search-wrapper .btn {
    width: 46px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 0 4px 4px 0 !important;
}
body:not(.pos-page) .user-menu {
    float: right !important;
    flex: 0 1 auto !important;
    height: 50px !important;
    margin: 0 8px 0 auto !important;
    display: flex !important;
    align-items: center !important;
    min-width: 0;
}
body:not(.pos-page) .user-menu.nav > li > a {
    height: 50px !important;
    line-height: 50px !important;
    color: #fff !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
}
body:not(.pos-page) .sidebar {
    position: fixed !important;
    top: 50px !important;
    bottom: 0;
    left: 0;
    z-index: 1029;
    width: 230px;
}
body:not(.pos-page) .page-wrapper {
    margin-left: 230px !important;
    padding-top: 50px !important;
    min-height: 100vh;
}
body:not(.pos-page) .page-wrapper > .content {
    padding-top: 20px !important;
}
html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header .header-left {
    float: right !important;
}
html[dir="rtl"] body:not(.pos-page) #toggle_btn,
html[dir="rtl"] body:not(.pos-page) .global-search-wrapper {
    float: right;
}
html[dir="rtl"] body:not(.pos-page) .sidebar {
    right: 0;
    left: auto;
}
html[dir="rtl"] body:not(.pos-page) .page-wrapper {
    margin-right: 230px !important;
    margin-left: 0 !important;
}
@media only screen and (max-width: 991.98px) {
    body:not(.pos-page) .main-wrapper > .header {
        height: 50px !important;
        min-height: 50px !important;
    }
    body:not(.pos-page) .global-search-wrapper {
        display: none !important;
    }
    body:not(.pos-page) .sidebar {
        top: 50px !important;
    }
    body:not(.pos-page) .page-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-top: 50px !important;
    }
}
@media only screen and (max-width: 767.98px) {
    body:not(.pos-page) .main-wrapper > .header {
        height: 50px !important;
        min-height: 50px !important;
        flex-wrap: nowrap !important;
    }
    body:not(.pos-page) .main-wrapper > .header .header-left {
        width: auto !important;
        flex: 0 1 190px !important;
        min-width: 150px;
        height: 50px !important;
    }
    body:not(.pos-page) .main-wrapper > .header .logo {
        height: 50px !important;
        line-height: 50px !important;
    }
    body:not(.pos-page) .user-menu {
        height: 50px !important;
        flex: initial !important;
    }
}

/* ---------- Pharmacy POS mockup layout ---------- */
body.pos-page {
    overflow: hidden !important;
    background: #f4f8fd !important;
}
body.pos-page .main-wrapper > .header,
body.pos-page .sidebar,
body.pos-page .sidebar-overlay,
body.pos-page .page-title-row,
body.pos-page .page-wrapper > .content > .alert,
body.pos-page .saidy-developer-credit {
    display: none !important;
}
body.pos-page .main-wrapper,
body.pos-page .page-wrapper,
body.pos-page .page-wrapper > .content {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    max-width: none !important;
}
body.pos-page .page-wrapper {
    padding-top: 0 !important;
}
.pos-desktop {
    --pos-navy: #061a38;
    --pos-navy-2: #08234b;
    --pos-blue: #1457e6;
    --pos-blue-2: #263cff;
    --pos-green: #08a84f;
    --pos-orange: #ff8a00;
    --pos-purple: #5b2bd6;
    --pos-line: #e4ebf6;
    --pos-ink: #061a38;
    --pos-muted: #586987;
    display: grid !important;
    grid-template-columns: 202px minmax(0, 1fr);
    grid-template-rows: 68px minmax(0, 1fr) 82px;
    width: 100vw !important;
    min-width: 1180px;
    height: 100vh !important;
    overflow: hidden;
    background: #f4f8fd !important;
    color: var(--pos-ink) !important;
}
.pos-desktop .pos-side-nav {
    grid-column: 1;
    grid-row: 1 / 4;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 18px 14px;
    background: linear-gradient(180deg, #061a38 0%, #061f45 48%, #03152f 100%);
    color: #fff;
}
.pos-side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.05;
}
.pos-side-logo {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #04c96f, #1864ff);
    font-size: 18px;
}
.pos-side-brand strong { color: #fff; }
.pos-side-nav nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 0;
}
.pos-side-nav nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 47px;
    padding: 0 17px;
    border-radius: 6px;
    color: rgba(255,255,255,.9);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}
.pos-side-nav nav a i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}
.pos-side-nav nav a.active,
.pos-side-nav nav a:hover {
    background: linear-gradient(135deg, #2245ff, #3049ef);
    color: #fff;
}
.pos-quick-tip {
    margin-top: auto;
    padding: 18px 16px;
    border-radius: 8px;
    background: rgba(31,68,198,.65);
    display: grid;
    gap: 10px;
    font-size: 12px;
    line-height: 1.45;
}
.pos-quick-tip i {
    color: #facc15;
    font-size: 22px;
}
.pos-quick-tip strong {
    font-size: 16px;
}
.pos-quick-tip button {
    border: 0;
    border-radius: 6px;
    padding: 10px;
    color: #fff;
    background: #2448d9;
    font-weight: 800;
}
.pos-desktop .pos-header {
    grid-column: 2;
    grid-row: 1;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    padding: 0 24px;
    background: linear-gradient(135deg, #061a38, #071f45) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: none !important;
}
.pos-desktop .pos-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0;
    color: #fff;
}
.pos-desktop .pos-header .brand i {
    display: none;
}
.pos-desktop .pos-header .brand small {
    margin-left: 28px;
    color: #fff;
    opacity: 1;
    font-size: 13px;
    font-weight: 700;
}
.pos-desktop .pos-header .brand small:before {
    content: "\f15c";
    font-family: "Font Awesome 5 Free";
    margin-right: 9px;
}
.pos-desktop .pos-header .nav-tabs {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0;
    border: 0 !important;
    background: transparent;
}
.pos-desktop .pos-header .nav-tabs a {
    display: none !important;
}
.pos-desktop .pos-header .nav-tabs .btn-pos,
.pos-desktop #themeToggle {
    min-height: 42px !important;
    padding: 0 16px !important;
    border-radius: 6px !important;
    border: 1px solid #d9e4f5 !important;
    background: #fff !important;
    color: #0f4de5 !important;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    font-size: 13px !important;
    font-weight: 900 !important;
}
.pos-desktop .pos-header .nav-tabs .btn-remove {
    color: #f00 !important;
}
.pos-desktop #themeToggle {
    width: 42px;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #061b3d !important;
    color: #fff !important;
    border-color: rgba(255,255,255,.12) !important;
}
.pos-desktop #themeToggle span { display: none; }
.pos-desktop #saleForm {
    display: contents;
}
.pos-desktop .pos-body {
    grid-column: 2;
    grid-row: 2;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 315px !important;
    gap: 14px;
    min-height: 0;
    overflow: hidden;
    padding: 18px 16px 12px 14px;
    background: #f4f8fd !important;
}
.pos-desktop .pos-form,
.pos-desktop .pos-summary {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    overflow: auto;
}
.pos-desktop .pos-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pos-desktop .pos-form > h3:first-child {
    display: none;
}
.pos-desktop .pos-header-row,
.pos-desktop .new-sale-box,
.pos-desktop .items-section,
.pos-desktop .pos-summary {
    border: 1px solid var(--pos-line) !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: 0 10px 28px rgba(18,37,70,.07) !important;
}
.pos-desktop .pos-header-row {
    display: grid !important;
    grid-template-columns: 195px minmax(190px, 1fr) 148px 164px 148px;
    gap: 24px;
    padding: 18px 14px;
    margin: 0 !important;
    overflow: visible !important;
}
.pos-desktop .pos-field label,
.pos-desktop .form-group label {
    color: #173566 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    margin-bottom: 10px !important;
}
.pos-desktop .pos-field input,
.pos-desktop .pos-field select,
.pos-desktop .form-group input,
.pos-desktop .form-group select,
.pos-desktop .select2-container--bootstrap4 .select2-selection {
    height: 46px !important;
    min-height: 46px !important;
    border: 1px solid #d8e2ef !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: var(--pos-ink) !important;
    font-size: 14px !important;
    font-weight: 700;
}
.pos-desktop .new-sale-box {
    padding: 14px !important;
}
.pos-desktop .new-sale-box .form-row:first-child {
    display: block !important;
    margin: 0 0 16px !important;
}
.pos-desktop .new-sale-box .form-row:first-child label {
    font-size: 13px !important;
    color: #041d49 !important;
}
.pos-desktop .new-sale-box .form-row:nth-child(2) {
    display: grid !important;
    grid-template-columns: 74px 92px 132px 94px 120px !important;
    gap: 16px;
    align-items: end;
}
.pos-desktop .btn-pos.btn-add {
    min-height: 38px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: linear-gradient(180deg, #11b65e, #079548) !important;
    color: #fff !important;
    font-weight: 900 !important;
}
.pos-desktop .pos-form > h3:not(:first-child) {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 18px 14px 0;
    border: 0 !important;
    color: #051d49 !important;
    font-size: 15px !important;
}
.pos-desktop .pos-form > h3:not(:first-child) + .items-section {
    flex: 1;
    min-height: 250px;
    margin-top: -14px;
    padding-top: 52px;
    overflow: auto !important;
}
.pos-desktop .items-table {
    border-collapse: separate !important;
    border-spacing: 0;
    min-width: 840px;
}
.pos-desktop .items-table thead th {
    height: 48px;
    background: linear-gradient(135deg, #2134c8, #143fb8) !important;
    color: #fff !important;
    border: 0 !important;
    font-size: 12px !important;
    text-transform: uppercase;
}
.pos-desktop .items-table tbody td {
    height: 78px;
    border-color: var(--pos-line) !important;
    color: var(--pos-ink) !important;
    font-size: 13px !important;
    background: #fff;
}
.pos-desktop .items-table .qty-input,
.pos-desktop .items-table .price-input {
    height: 36px !important;
    width: 74px !important;
}
.pos-desktop .items-table .empty td {
    height: 180px;
    color: #8a9ab4 !important;
}
.pos-desktop .pos-summary {
    padding: 0 !important;
    overflow: hidden;
}
.pos-desktop .pos-summary h3 {
    height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    padding: 0 15px !important;
    border-bottom: 1px solid var(--pos-line) !important;
    color: #061a38 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}
.pos-desktop .summary-row,
.pos-desktop .summary-input {
    min-height: 50px;
    padding: 0 15px !important;
    border-bottom: 1px solid var(--pos-line) !important;
    align-items: center;
    color: #061a38 !important;
}
.pos-desktop .summary-row .lbl,
.pos-desktop .summary-input .lbl {
    color: #061a38 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}
.pos-desktop .summary-row .val {
    color: #061a38 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}
.pos-desktop .summary-input input {
    width: 114px !important;
    height: 34px !important;
    border: 1px solid #d8e2ef !important;
    border-radius: 6px !important;
    text-align: right;
    font-weight: 900;
}
.pos-desktop .summary-row.total {
    margin: 12px 14px 0;
    min-height: 40px;
    border: 0 !important;
    border-radius: 6px !important;
    background: linear-gradient(135deg, #2035cd, #143fb8) !important;
    color: #fff !important;
}
.pos-desktop .summary-row.total .lbl,
.pos-desktop .summary-row.total .val { color: #fff !important; }
.pos-desktop .summary-row.paid .val { color: #00a651 !important; }
.pos-desktop .summary-row.due .val { color: #ff1919 !important; }
.pos-desktop #walkinWarning {
    margin: 16px 14px !important;
    padding: 12px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: #fff0b8 !important;
}
.pos-desktop .pos-summary .btn-pos {
    width: calc(100% - 28px);
    min-height: 48px !important;
    margin: 0 14px 8px;
    border: 0 !important;
    border-radius: 6px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}
.pos-desktop .pos-summary .btn-pos:nth-of-type(2) { background: linear-gradient(135deg, #1157de, #0756d9) !important; }
.pos-desktop .pos-summary .btn-pos:nth-of-type(3) { background: linear-gradient(135deg, #6d3be8, #5329c8) !important; }
.pos-desktop .pos-summary .btn-pos:nth-of-type(4) { background: linear-gradient(135deg, #ff9b09, #ff8700) !important; }
.pos-desktop .pos-footer {
    grid-column: 2;
    grid-row: 3;
    min-height: 82px;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 22px 0 30px !important;
    border-radius: 8px 0 0 0;
    background: #fff !important;
    color: #061a38 !important;
    box-shadow: 0 -8px 28px rgba(18,37,70,.09);
}
.pos-desktop .pos-footer .item-count {
    font-size: 14px !important;
    color: #061a38;
}
.pos-desktop .footer-actions {
    gap: 20px !important;
}
.pos-desktop .btn-footer {
    min-width: 170px;
    height: 48px;
    border-radius: 6px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff !important;
    color: #061a38 !important;
    border: 1px solid #c8d4e4 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}
.pos-desktop .btn-footer.btn-cancel {
    color: #ff1515 !important;
    border-color: #ff6b6b !important;
}
.pos-desktop .btn-footer.btn-print {
    background: #0756d9 !important;
    color: #fff !important;
    border-color: #0756d9 !important;
}
.pos-desktop .dev-bar {
    display: none !important;
}
@media (max-width: 1180px) {
    .pos-desktop {
        grid-template-columns: 86px minmax(0, 1fr);
    }
    .pos-side-brand span:not(.pos-side-logo),
    .pos-side-nav nav a span,
    .pos-quick-tip { display: none; }
    .pos-side-nav nav a { justify-content: center; padding: 0; }
    .pos-desktop .pos-body { grid-template-columns: 1fr; overflow: auto; }
    .pos-desktop .pos-summary { overflow: visible; }
}

/* ---------- Pharmacy POS rollback restore ----------
 * The mockup shell was too aggressive and broke the medicine workflow.
 * Keep POS fullscreen, but restore the original compact POS layout.
 */
body.pos-page .pos-side-nav {
    display: none !important;
}
body.pos-page .pos-desktop {
    display: flex !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    width: 100vw !important;
    min-width: 0 !important;
    height: 100vh !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: var(--pos-bg) !important;
    color: var(--pos-text) !important;
}
body.pos-page .pos-desktop #saleForm {
    display: flex !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    flex-direction: column !important;
}
body.pos-page .pos-desktop .pos-header {
    grid-column: auto !important;
    grid-row: auto !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 42px !important;
    padding: 6px 10px !important;
    background: linear-gradient(135deg, #1e3a5f, #0f1f3a) !important;
    color: #fff !important;
}
body.pos-page .pos-desktop .pos-header .brand {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}
body.pos-page .pos-desktop .pos-header .brand i {
    display: inline-block !important;
}
body.pos-page .pos-desktop .pos-header .brand small {
    margin-left: 6px !important;
    color: rgba(255,255,255,.72) !important;
    opacity: 1 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
}
body.pos-page .pos-desktop .pos-header .brand small:before {
    content: none !important;
}
body.pos-page .pos-desktop .pos-header .nav-tabs {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
body.pos-page .pos-desktop .pos-header .nav-tabs a {
    display: inline-flex !important;
    color: #cbd5e0 !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
body.pos-page .pos-desktop .pos-header .nav-tabs a.active,
body.pos-page .pos-desktop .pos-header .nav-tabs a:hover {
    background: rgba(255,255,255,.15) !important;
    color: #fff !important;
}
body.pos-page .pos-desktop .pos-header .nav-tabs .btn-pos,
body.pos-page .pos-desktop #themeToggle {
    min-height: 0 !important;
    height: auto !important;
    width: auto !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    border: 1px solid rgba(255,255,255,.25) !important;
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}
body.pos-page .pos-desktop #themeToggle span {
    display: inline !important;
}
body.pos-page .pos-desktop .pos-body {
    grid-column: auto !important;
    grid-row: auto !important;
    flex: 1 1 auto !important;
    display: grid !important;
    grid-template-columns: 2fr 1fr !important;
    gap: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    background: var(--pos-bg) !important;
}
body.pos-page .pos-desktop .pos-form {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    overflow: hidden !important;
    border-right: 1px solid var(--pos-border) !important;
    background: var(--pos-surface) !important;
    padding: 8px 12px !important;
}
body.pos-page .pos-desktop .pos-summary {
    flex: 0 0 250px !important;
    overflow-y: hidden !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #f8fafc !important;
    padding: 6px 10px !important;
}
body.pos-page .pos-desktop .pos-form > h3:first-child {
    display: block !important;
}
body.pos-page .pos-desktop .pos-summary h3 {
    margin: 0 0 4px !important;
    padding-bottom: 4px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
}
body.pos-page .pos-desktop .pos-form h3 {
    flex: 0 0 auto !important;
    display: block !important;
    color: var(--pos-accent) !important;
    margin: 0 0 6px !important;
    padding: 0 0 4px !important;
    border-bottom: 2px solid var(--pos-accent) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}
body.pos-page .pos-desktop .pos-header-row {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 0 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}
body.pos-page .pos-desktop .pos-header-row .pos-field {
    flex: 1 1 0 !important;
    min-width: 0 !important;
}
body.pos-page .pos-desktop .pos-header-row .pos-field.pos-field-sm {
    flex: 0 0 auto !important;
    min-width: 110px !important;
}
body.pos-page .pos-desktop .pos-field label,
body.pos-page .pos-desktop .form-group label {
    color: var(--pos-text-muted) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: .3px !important;
    margin-bottom: 3px !important;
}
body.pos-page .pos-desktop .pos-field input,
body.pos-page .pos-desktop .pos-field select,
body.pos-page .pos-desktop .form-group input,
body.pos-page .pos-desktop .form-group select {
    height: auto !important;
    min-height: 0 !important;
    padding: 8px 10px !important;
    border: 2px solid var(--pos-input-border) !important;
    border-radius: 8px !important;
    background: var(--pos-input-bg) !important;
    color: var(--pos-text) !important;
    font-size: 13px !important;
}
body.pos-page .pos-desktop .new-sale-box {
    flex: 0 0 auto !important;
    padding: 8px !important;
    margin: 0 0 6px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    background: #f8fafc !important;
}
body.pos-page .pos-desktop .new-sale-box .form-row:first-child,
body.pos-page .pos-desktop .new-sale-box .form-row:nth-child(2),
body.pos-page .pos-desktop .form-row {
    display: grid !important;
    margin-bottom: 5px !important;
    gap: 8px !important;
}
body.pos-page .pos-desktop .new-sale-box .form-row:first-child {
    grid-template-columns: 1fr !important;
}
body.pos-page .pos-desktop .new-sale-box .form-row:nth-child(2) {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr !important;
    margin-top: 6px !important;
}
body.pos-page .pos-desktop .select2-container--bootstrap4 .select2-selection {
    min-height: 38px !important;
    height: auto !important;
    border: 2px solid var(--pos-input-border) !important;
    border-radius: 8px !important;
}
body.pos-page .pos-desktop .items-section {
    flex: 1 1 auto !important;
    min-height: 100px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: auto !important;
    border: 1px solid var(--pos-border) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    background: var(--pos-surface) !important;
}
body.pos-page .pos-desktop .items-table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
}
body.pos-page .pos-desktop .items-table thead th {
    height: auto !important;
    padding: 8px 10px !important;
    background: linear-gradient(135deg, var(--pos-accent), var(--pos-accent-2)) !important;
    color: #fff !important;
    font-size: 11px !important;
}
body.pos-page .pos-desktop .items-table tbody td {
    height: auto !important;
    padding: 7px 10px !important;
    border-bottom: 1px solid var(--pos-border) !important;
    background: transparent !important;
    color: var(--pos-text) !important;
    font-size: 13px !important;
}
body.pos-page .pos-desktop .items-table .empty td {
    height: auto !important;
    padding: 40px 20px !important;
}
body.pos-page .pos-desktop .summary-row,
body.pos-page .pos-desktop .summary-input {
    min-height: 0 !important;
    padding: 3px 0 !important;
    border-bottom: 1px dashed #cbd5e0 !important;
    font-size: 11px !important;
}
body.pos-page .pos-desktop .summary-row.total {
    margin: 4px 0 !important;
    padding: 6px !important;
    border-radius: 6px !important;
    background: #1e3a5f !important;
}
body.pos-page .pos-desktop .summary-input input {
    width: 86px !important;
    padding: 2px 5px !important;
    font-size: 11px !important;
}
body.pos-page .pos-desktop #walkinWarning {
    margin: 5px 0 !important;
    padding: 5px 7px !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
}
body.pos-page .pos-desktop #walkinWarning + div {
    margin-top: 5px !important;
    gap: 3px !important;
}
body.pos-page .pos-desktop .pos-summary .btn-pos {
    min-height: 0 !important;
    height: 28px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 3px 6px !important;
    border-radius: 5px !important;
    font-size: 11px !important;
    line-height: 1 !important;
}
body.pos-page .pos-desktop .pos-summary .btn-pos i {
    font-size: 11px !important;
}
body.pos-page .pos-desktop .pos-footer {
    grid-column: auto !important;
    grid-row: auto !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 4px 10px !important;
    background: #1e3a5f !important;
    color: #fff !important;
    box-shadow: none !important;
}
body.pos-page .pos-desktop .pos-footer .item-count {
    flex: 0 0 auto !important;
    min-width: 145px !important;
}
body.pos-page .pos-desktop .pos-footer .footer-save-actions {
    flex: 1 1 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
}
body.pos-page .pos-desktop .pos-footer .footer-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 6px !important;
}
body.pos-page .pos-desktop .btn-footer {
    min-width: 0 !important;
    height: auto !important;
    padding: 4px 10px !important;
    border-radius: 3px !important;
    background: transparent !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.3) !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}
body.pos-page .pos-desktop .btn-footer.btn-save {
    background: #10b981 !important;
    border-color: #10b981 !important;
}
body.pos-page .pos-desktop .btn-footer.btn-print {
    background: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
}
body.pos-page .pos-desktop .btn-footer.btn-a4 {
    background: #6d35d9 !important;
    border-color: #6d35d9 !important;
}
body.pos-page .pos-desktop .btn-footer.btn-add-new {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
}
body.pos-page .pos-desktop .btn-footer.btn-cancel {
    color: #fff !important;
    border-color: rgba(255,255,255,.42) !important;
}
body.pos-page .pos-desktop .btn-footer:hover {
    filter: brightness(1.06) !important;
}
body.pos-page .pos-desktop .dev-bar {
    display: block !important;
}
@media (max-width: 992px) {
    body.pos-page .pos-desktop .pos-body {
        grid-template-columns: 1fr !important;
        overflow: auto !important;
    }
    body.pos-page .pos-desktop .pos-summary {
        flex: 0 0 auto !important;
        max-height: 40vh !important;
    }
    body.pos-page .pos-desktop .pos-footer {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    body.pos-page .pos-desktop .pos-footer .item-count,
    body.pos-page .pos-desktop .pos-footer .footer-save-actions,
    body.pos-page .pos-desktop .pos-footer .footer-actions {
        flex: 0 1 auto !important;
    }
}


/* ---------- Nurse module externalized styles ---------- */
/* Source: modules\Nurse\index.php */
/* ===== Nurse Vitals Page - Modern Health Organization UI ===== */
.nurse-stage {
    padding: 0;
}
.nurse-stats-row {
    align-items: stretch;
}
.nurse-stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 1px 8px rgba(15,23,42,0.06);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
    min-height: 72px;
    height: 100%;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nurse-stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15,23,42,0.1);
}
.nurse-stat-card .stat-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(15,23,42,0.12);
}
.nurse-stat-card .stat-value {
    font-size: 1.15rem; font-weight: 800; color: #1a1a2e;
    line-height: 1.1;
}
.nurse-stat-card .stat-label {
    font-size: 0.68rem; color: #64748b;
    font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.3px; margin-top: 1px;
}
.bg-grad-teal { background: linear-gradient(135deg, #0d9488, #0f766e); }
.bg-grad-blue { background: linear-gradient(135deg, #009efb, #0288d1); }
.bg-grad-green { background: linear-gradient(135deg, #55ce63, #4ab657); }
.bg-grad-amber { background: linear-gradient(135deg, #ffbc34, #e9ab2e); }
.bg-grad-rose { background: linear-gradient(135deg, #f43f5e, #e11d48); }

.nurse-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 8px rgba(15,23,42,0.06);
    border: 1px solid #f0f0f0;
    overflow: hidden;
}
.nurse-card-header {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}
.nurse-card-header h3 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nurse-card-header h3 i {
    color: #0d9488;
}
.nurse-card-body {
    padding: 14px;
}

/* Form fields */
.vitals-field-label {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 4px;
    display: block;
}
.vitals-input {
    width: 100%;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12px;
    color: #1e293b;
    transition: all 0.2s;
    outline: none;
    font-family: 'Segoe UI', system-ui, sans-serif;
}
.vitals-input:focus {
    border-color: #0d9488;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(13,148,136,0.12);
}
.vitals-input[readonly] {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}
.nurse-form-card .vitals-separator {
    margin: 10px 0;
}
.nurse-form-card .vitals-separator.is-compact {
    margin: 8px 0;
}
.nurse-form-card .input-group {
    align-items: stretch;
}
.nurse-form-card .input-group .vitals-input,
.nurse-form-card .input-group .input-group-text,
.nurse-form-card .input-group .vitals-unit-select {
    min-height: 34px;
}
.nurse-form-card .vitals-joined-right,
.nurse-form-card .vitals-unit-select {
    font-size: 0.7rem;
    border-radius: 0 8px 8px 0;
    padding: 7px 10px;
}
.nurse-form-actions {
    align-items: center;
}
.vitals-btn-primary {
    background: linear-gradient(135deg, #0d9488, #0f766e);
    color: #fff;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    border: 0;
    transition: all 0.2s;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(13,148,136,0.3);
}
.vitals-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(13,148,136,0.4);
    background: linear-gradient(135deg, #0f766e, #115e59);
}
.vitals-btn-ghost {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    border: 0;
    transition: all 0.15s;
}
.vitals-btn-ghost:hover {
    background: #e2e8f0;
}

/* BP category badge */
.bp-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bp-normal { background: #dcfce7; color: #166534; }
.bp-elevated { background: #fef3c7; color: #92400e; }
.bp-high1 { background: #fed7aa; color: #9a3412; }
.bp-high2 { background: #fecaca; color: #991b1b; }
.bp-crisis { background: #fca5a5; color: #7f1d1d; }

/* Thermal Receipt (80mm) */
.receipt-wrap {
    display: flex;
    justify-content: center;
    background: repeating-linear-gradient(45deg, #f1f5f9 0 8px, #e2e8f0 8px 16px);
    padding: 24px 12px;
    border-radius: 12px;
}
.receipt {
    width: 80mm;
    background: #fff;
    color: #000;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.45;
    padding: 5mm 4mm 6mm;
    box-shadow: 0 20px 40px -20px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}
.receipt::before {
    content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 8px;
    background: radial-gradient(circle at 4mm 8px, transparent 3px, #fff 3.5px);
    background-size: 8mm 8px; background-repeat: repeat-x;
}
.receipt::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 8px;
    background: radial-gradient(circle at 4mm 0px, transparent 3px, #fff 3.5px);
    background-size: 8mm 8px; background-repeat: repeat-x;
}
.r-divider { border-top: 1px dashed #000; margin: 6px 0; }
.r-center { text-align: center; }
.r-bold { font-weight: 700; }
.r-row { display: flex; justify-content: space-between; gap: 8px; }
.r-label { color: #000; opacity: 0.75; }
.r-val { font-weight: 600; text-align: right; }
.pulse-dot {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: #b42318; margin-right: 4px; animation: pulse 1.2s infinite ease-in-out;
    vertical-align: middle;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(1.6); opacity: 0.4 } }

/* Recent vitals table */
.recent-vitals-table {
    width: 100%;
    border-collapse: collapse;
}
.recent-vitals-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
}
.recent-vitals-table td {
    padding: 12px;
    font-size: 0.85rem;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}
.recent-vitals-table tr:last-child td {
    border-bottom: 0;
}
.recent-vitals-table tr:hover {
    background: #f8fafc;
}

.nurse-duty-name {
    font-size: 1rem !important;
    line-height: 1.3 !important;
}
.nurse-alert {
    border-radius: 12px;
}
.vitals-label-note {
    color: #64748b;
    text-transform: none;
}
.vitals-label-note.is-teal {
    color: #0d9488;
}
.vitals-required {
    color: #ef4444;
}
.vitals-separator {
    border-color: #f1f5f9;
    margin: 24px 0;
}
.vitals-separator.is-compact {
    margin: 16px 0;
}
.vitals-joined-left {
    border-radius: 10px 0 0 10px;
}
.vitals-joined-right,
.vitals-unit-select {
    border: 2px solid #e2e8f0;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
}
.vitals-unit-select {
    width: auto;
    color: #1e293b;
    font-size: 0.8rem;
}
.nurse-card-body-flush {
    padding: 0;
}
.recent-vitals-date {
    font-size: 0.75rem;
    color: #64748b;
}
.recent-vitals-print {
    font-size: 0.7rem;
    padding: 2px 8px;
}
.nurse-live-label {
    font-size: 0.7rem;
    color: #64748b;
    font-family: monospace;
}

/* Extra compact nurse triage workstation */
.nurse-form-card,
.nurse-form-card + .nurse-card,
.nurse-preview-card {
    border-radius: 8px;
}
.nurse-form-card .nurse-card-header,
.nurse-preview-card .nurse-card-header {
    min-height: 40px;
    padding: 8px 14px;
}
.nurse-form-card .nurse-card-header h3,
.nurse-preview-card .nurse-card-header h3 {
    font-size: 0.86rem;
}
.nurse-form-card .nurse-card-body,
.nurse-preview-card .nurse-card-body {
    padding: 10px 14px;
}
.nurse-form-card .row {
    --bs-gutter-y: 0.45rem;
}
.nurse-form-card .vitals-field-label {
    margin-bottom: 3px;
    font-size: 0.62rem;
    line-height: 1.15;
}
.nurse-form-card .vitals-input {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 11.5px;
    border-width: 1px;
    border-radius: 7px;
}
.nurse-form-card .input-group {
    display: flex;
    flex-wrap: nowrap;
}
.nurse-form-card .input-group .vitals-input {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 7px 0 0 7px;
}
.nurse-form-card .input-group .input-group-text,
.nurse-form-card .input-group .vitals-unit-select {
    width: 44px;
    min-height: 30px;
    padding: 5px 8px;
    font-size: 0.66rem;
    border-width: 1px;
    border-left: 0;
    border-radius: 0 7px 7px 0;
    justify-content: center;
}
.nurse-form-card .vitals-separator,
.nurse-form-card .vitals-separator.is-compact {
    margin: 7px 0;
}
.nurse-form-card .nurse-form-actions {
    margin-top: 10px !important;
}
.nurse-form-card .vitals-btn-primary,
.nurse-form-card .vitals-btn-ghost {
    min-height: 30px;
    padding: 6px 11px;
    font-size: 11.5px;
    border-radius: 7px;
}
.nurse-preview-card .receipt-wrap {
    padding: 14px 10px;
    border-radius: 8px;
}
.nurse-preview-card .receipt {
    transform: scale(0.86);
    transform-origin: top center;
    margin-bottom: -54px;
    font-size: 10px;
    line-height: 1.32;
    padding: 4mm 4mm 5mm;
}
.nurse-preview-card .r-divider {
    margin: 4px 0;
}
.nurse-preview-card .nurse-print-note {
    display: none;
}

/* Final mobile header/logo fit */
body:not(.pos-page) .main-wrapper > .header .logo img {
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    background: #fff;
}

@media only screen and (max-width: 767.98px) {
    body:not(.pos-page) .main-wrapper > .header {
        height: 50px;
        min-height: 50px;
        overflow: hidden;
    }

    body:not(.pos-page) .main-wrapper > .header .header-left {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: calc(100vw - 54px);
        min-width: 0;
        height: 50px;
        padding: 0 8px 0 48px;
        background: transparent;
    }

    body:not(.pos-page) .main-wrapper > .header .logo {
        height: 50px;
        max-width: 100%;
        display: flex !important;
        align-items: center;
        gap: 8px;
        overflow: hidden;
    }

    body:not(.pos-page) .main-wrapper > .header .logo img {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px;
    }

    body:not(.pos-page) .main-wrapper > .header .logo span {
        display: block !important;
        max-width: calc(100vw - 112px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 16px;
        line-height: 1;
    }

    body:not(.pos-page) #mobile_btn.mobile_btn {
        position: absolute;
        left: 0;
        top: 0;
        width: 44px;
        height: 50px;
        line-height: 50px;
        z-index: 5;
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin: 0;
        color: #fff;
    }

    html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header .header-left {
        padding: 0 48px 0 8px;
    }

    html[dir="rtl"] body:not(.pos-page) #mobile_btn.mobile_btn {
        right: 0;
        left: auto;
    }
}
.receipt-clinic-name {
    font-size: 13px;
    letter-spacing: 0.02em;
}
.receipt-clinic-address,
.receipt-signature {
    font-size: 10px;
}
.receipt-title {
    font-size: 12px;
}
.receipt-date-row {
    margin-top: 4px;
}
.receipt-signature-box {
    margin-top: 14px;
}
.receipt-signature-line {
    border-top: 1px dashed #000;
    width: 55%;
    margin-left: auto;
}
.receipt-signature-label {
    font-size: 9px;
    margin-top: 2px;
}
.receipt-thanks {
    font-size: 9px;
    opacity: 0.7;
}
.nurse-print-note {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 12px;
    line-height: 1.5;
}
.nurse-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    opacity: 0;
    transition: all 0.3s;
    background: #1e293b;
    color: #fff;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 9999;
    pointer-events: none;
}

.fade-in { animation: fadeIn 0.5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }

@media print {
    @page { size: 80mm auto; margin: 0; }
    .no-print { display: none !important; }
    .receipt-wrap { background: #fff !important; padding: 0 !important; border-radius: 0 !important; }
    .receipt { width: 80mm; box-shadow: none !important; padding: 3mm 4mm 5mm; margin: 0; }
    .receipt::before, .receipt::after { display: none; }
    .sidebar, .header, .topbar, .footer, .main-header { display: none !important; }
    .content { margin: 0 !important; padding: 0 !important; }
}
/* Source: modules\Nurse\history.php */
.vh-wrap { max-width: 1200px; margin: 0 auto; padding: 16px 0; }
.vh-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    box-shadow: 0 2px 14px rgba(0,0,0,0.04); overflow: hidden; margin-bottom: 20px;
}
.vh-card-head {
    padding: 14px 20px; background: linear-gradient(135deg,#0d6e6e 0%, #0f1f1c 100%);
    color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.vh-card-head h5 { margin: 0; font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.vh-search {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 8px 14px; font-size: 0.9rem; min-width: 240px; color: #0f1f1c;
}
.vh-search:focus { outline: none; border-color: #0d6e6e; box-shadow: 0 0 0 3px rgba(13,110,110,.12); }
.vh-table { width: 100%; border-collapse: collapse; }
.vh-table th {
    background: #f8fafc; color: #64748b; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 14px;
    text-align: left; border-bottom: 1px solid #e2e8f0;
}
.vh-table td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; font-size: 0.88rem; }
.vh-table tr:hover { background: #f8fafc; }
.vh-table tr:last-child td { border-bottom: none; }
.vh-empty {
    padding: 60px 20px; text-align: center; color: #64748b;
}
.vh-empty i { font-size: 3rem; opacity: 0.4; margin-bottom: 12px; }
.vh-btn {
    background: #0f1f1c; color: #fff; border: none; padding: 6px 12px;
    border-radius: 7px; font-size: 0.78rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.vh-btn:hover { background: #0d6e6e; color: #fff; }
.vh-head-actions { display: flex; gap: 10px; align-items: center; }
.vh-search-form { display: inline; margin: 0; }
.vh-empty-title { font-size: 0.95rem; font-weight: 600; }
.vh-empty-text { font-size: 0.85rem; margin-top: 4px; }
.vh-code { font-family: monospace; font-size: 0.78rem; color: #64748b; }
.vh-patient { font-weight: 600; }
.vh-date { font-size: 0.78rem; color: #64748b; }
.vh-pain {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}
.vh-pain.is-high { background: #fee2e2; color: #b91c1c; }
.vh-pain.is-mid { background: #fef3c7; color: #b45309; }
.vh-pain.is-low { background: #dcfce7; color: #15803d; }
.vh-pager { display: flex; gap: 6px; justify-content: center; padding: 14px; }
.vh-pager a, .vh-pager span {
    padding: 6px 12px; border-radius: 7px; font-size: 0.85rem; font-weight: 600;
    text-decoration: none; border: 1px solid #e2e8f0; color: #0f1f1c;
}
.vh-pager .active { background: #0d6e6e; color: #fff; border-color: #0d6e6e; }
.vh-pager a:hover { background: #f1f5f9; }


/* Final normal-page background cleanup: remove dark strips/cards below content */
html,
body:not(.pos-page),
body:not(.pos-page) .main-wrapper,
body:not(.pos-page) .page-wrapper,
body:not(.pos-page) .page-wrapper > .content {
    background: #f5f8fc !important;
}

body:not(.pos-page) .saidy-developer-credit {
    background: #f8fbff !important;
    border-color: #d8e6f4 !important;
    color: #0f766e !important;
    box-shadow: none !important;
}

/* Final mobile sidebar toggle: compact polished icon rail */
@media only screen and (max-width: 767.98px) {
    body.mobile-rail-open:not(.pos-page) #sidebar,
    body:not(.pos-page).slide-nav .sidebar,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar,
    .slide-nav body:not(.pos-page) .sidebar {
        width: 72px !important;
        min-width: 72px !important;
        margin-left: 0 !important;
        top: 50px !important;
        padding: 10px 6px 12px !important;
        background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 54%, #eafaf6 100%) !important;
        border-right: 1px solid #d8e6f4 !important;
        box-shadow: 8px 0 22px rgba(15,23,42,.12) !important;
        overflow-x: hidden !important;
    }

    body.mobile-rail-open:not(.pos-page) #sidebar .slimScrollDiv,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-inner,
    body:not(.pos-page).slide-nav .sidebar .slimScrollDiv,
    body:not(.pos-page).slide-nav .sidebar-inner,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar .slimScrollDiv,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-inner {
        width: 60px !important;
        overflow-x: hidden !important;
    }

    body.mobile-rail-open:not(.pos-page) #sidebar .menu-title,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu a span,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu .menu-arrow,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu ul ul,
    body:not(.pos-page).slide-nav .sidebar .menu-title,
    body:not(.pos-page).slide-nav .sidebar-menu a span,
    body:not(.pos-page).slide-nav .sidebar-menu .menu-arrow,
    body:not(.pos-page).slide-nav .sidebar-menu ul ul,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar .menu-title,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-menu a span,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-menu .menu-arrow,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-menu ul ul {
        display: none !important;
    }

    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a,
    body:not(.pos-page).slide-nav .sidebar-menu > ul > li > a,
    body:not(.pos-page).slide-nav .sidebar-menu > ul > li.submenu > a,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-menu > ul > li > a,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-menu > ul > li.submenu > a {
        width: 52px !important;
        height: 52px !important;
        min-height: 52px !important;
        margin: 6px auto !important;
        padding: 0 !important;
        border-radius: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu ul li a i,
    body:not(.pos-page).slide-nav .sidebar-menu ul li a i,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-menu ul li a i {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        margin: 0 !important;
        border-radius: 14px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ffffff !important;
        color: #2563eb !important;
        box-shadow: 0 6px 16px rgba(37,99,235,.14) !important;
        font-size: 17px !important;
    }

    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li a:hover,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li.active > a,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop,
    body:not(.pos-page).slide-nav .sidebar-menu li a:hover,
    body:not(.pos-page).slide-nav .sidebar-menu li.active > a,
    body:not(.pos-page).slide-nav .sidebar-menu > ul > li.submenu > a.subdrop,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-menu li a:hover,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-menu li.active > a,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-menu > ul > li.submenu > a.subdrop {
        background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
        box-shadow: 0 10px 22px rgba(37,99,235,.22) !important;
    }

    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li a:hover i,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li.active > a i,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop i,
    body:not(.pos-page).slide-nav .sidebar-menu li a:hover i,
    body:not(.pos-page).slide-nav .sidebar-menu li.active > a i,
    body:not(.pos-page).slide-nav .sidebar-menu > ul > li.submenu > a.subdrop i,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-menu li a:hover i,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-menu li.active > a i,
    body:not(.pos-page) .main-wrapper.slide-nav .sidebar-menu > ul > li.submenu > a.subdrop i {
        background: rgba(255,255,255,.2) !important;
        color: #fff !important;
        box-shadow: none !important;
    }

    body.mobile-rail-open:not(.pos-page) .page-wrapper,
    body:not(.pos-page).slide-nav .page-wrapper,
    body:not(.pos-page) .main-wrapper.slide-nav .page-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    html[dir="rtl"] body.mobile-rail-open:not(.pos-page) #sidebar,
    html[dir="rtl"] body:not(.pos-page).slide-nav .sidebar,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper.slide-nav .sidebar {
        right: 0 !important;
        left: auto !important;
        border-right: 0 !important;
        border-left: 1px solid #d8e6f4 !important;
        box-shadow: -8px 0 22px rgba(15,23,42,.12) !important;
    }

    html[dir="rtl"] body.mobile-rail-open:not(.pos-page) .page-wrapper,
    html[dir="rtl"] body:not(.pos-page).slide-nav .page-wrapper,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper.slide-nav .page-wrapper {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

/* Mobile menu final override: collapse the actual opened sidebar state */
@media only screen and (max-width: 991.98px) {
    html.menu-opened body:not(.pos-page) #sidebar.opened,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened {
        width: 72px !important;
        min-width: 72px !important;
        max-width: 72px !important;
        margin-left: 0 !important;
        transform: none !important;
        overflow: hidden !important;
        background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 54%, #eafaf6 100%) !important;
        border-right: 1px solid #d8e6f4 !important;
        box-shadow: 8px 0 22px rgba(15,23,42,.12) !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .slimScrollDiv,
    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-inner,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .slimScrollDiv,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .sidebar-inner,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .slimScrollDiv,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-inner {
        width: 60px !important;
        max-width: 60px !important;
        overflow-x: hidden !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .slimScrollBar,
    html.menu-opened body:not(.pos-page) #sidebar.opened .slimScrollRail,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .slimScrollBar,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .slimScrollRail,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .slimScrollBar,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .slimScrollRail {
        display: none !important;
        width: 0 !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .menu-title,
    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu a span,
    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu .menu-arrow,
    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu ul ul,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .menu-title,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .sidebar-menu a span,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .sidebar-menu .menu-arrow,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .sidebar-menu ul ul,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .menu-title,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu a span,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu .menu-arrow,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu ul ul {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu > ul > li > a,
    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu > ul > li.submenu > a,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .sidebar-menu > ul > li > a,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .sidebar-menu > ul > li.submenu > a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu > ul > li > a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu > ul > li.submenu > a {
        width: 52px !important;
        height: 52px !important;
        margin: 6px auto !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 16px !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu ul li a i,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .sidebar-menu ul li a i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu ul li a i {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        margin: 0 !important;
        border-radius: 14px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ffffff !important;
        color: #2563eb !important;
        box-shadow: 0 6px 16px rgba(37,99,235,.14) !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu li.active > a,
    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu li a:hover,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .sidebar-menu li.active > a,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .sidebar-menu li a:hover,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu li.active > a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu li a:hover {
        background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
        box-shadow: 0 10px 22px rgba(37,99,235,.22) !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu li.active > a i,
    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu li a:hover i,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .sidebar-menu li.active > a i,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened .sidebar-menu li a:hover i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu li.active > a i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu li a:hover i {
        background: rgba(255,255,255,.22) !important;
        color: #fff !important;
        box-shadow: none !important;
    }

    html.menu-opened body:not(.pos-page) .sidebar-overlay.opened,
    body.mobile-rail-open:not(.pos-page) .sidebar-overlay.opened {
        display: none !important;
    }

    html.menu-opened body:not(.pos-page) .page-wrapper,
    body.mobile-rail-open:not(.pos-page) .page-wrapper,
    body:not(.pos-page) .main-wrapper.slide-nav .page-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    html[dir="rtl"].menu-opened body:not(.pos-page) #sidebar.opened,
    html[dir="rtl"] body.mobile-rail-open:not(.pos-page) #sidebar.opened,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened {
        right: 0 !important;
        left: auto !important;
        border-right: 0 !important;
        border-left: 1px solid #d8e6f4 !important;
        box-shadow: -8px 0 22px rgba(15,23,42,.12) !important;
    }

    html[dir="rtl"].menu-opened body:not(.pos-page) .page-wrapper,
    html[dir="rtl"] body.mobile-rail-open:not(.pos-page) .page-wrapper,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper.slide-nav .page-wrapper {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

/* Mobile sidebar is hidden until the toggle is opened; when open it overlays content. */
@media only screen and (max-width: 991.98px) {
    html:not(.menu-opened) body:not(.pos-page):not(.mobile-rail-open) #sidebar,
    body:not(.pos-page):not(.mobile-rail-open) .main-wrapper:not(.slide-nav) #sidebar {
        transform: translateX(-100%) !important;
        margin-left: 0 !important;
        visibility: hidden !important;
    }

    html[dir="rtl"]:not(.menu-opened) body:not(.pos-page):not(.mobile-rail-open) #sidebar,
    html[dir="rtl"] body:not(.pos-page):not(.mobile-rail-open) .main-wrapper:not(.slide-nav) #sidebar {
        transform: translateX(100%) !important;
        margin-right: 0 !important;
        visibility: hidden !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened,
    body.mobile-rail-open:not(.pos-page) #sidebar.opened,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened {
        visibility: visible !important;
        transform: translateX(0) !important;
        z-index: 1041 !important;
    }

    html.menu-opened body:not(.pos-page) .page-wrapper,
    html.menu-opened body:not(.pos-page) .main-wrapper.slide-nav .page-wrapper,
    body.mobile-rail-open:not(.pos-page) .page-wrapper,
    body:not(.pos-page) .main-wrapper.slide-nav .page-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
}

/* Last mobile sidebar override: full menu on toggle, hidden when closed. */
@media only screen and (max-width: 991.98px) {
    body:not(.pos-page):not(.mobile-menu-open) .main-wrapper:not(.slide-nav) #sidebar,
    html:not(.menu-opened) body:not(.pos-page):not(.mobile-menu-open) #sidebar {
        width: 285px !important;
        min-width: 285px !important;
        max-width: 285px !important;
        transform: translateX(-105%) !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    html[dir="rtl"] body:not(.pos-page):not(.mobile-menu-open) .main-wrapper:not(.slide-nav) #sidebar,
    html[dir="rtl"]:not(.menu-opened) body:not(.pos-page):not(.mobile-menu-open) #sidebar {
        transform: translateX(105%) !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar,
    body.mobile-menu-open:not(.pos-page) #sidebar,
    body.mobile-rail-open:not(.pos-page) #sidebar,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar {
        top: 50px !important;
        left: 0 !important;
        right: auto !important;
        width: 285px !important;
        min-width: 285px !important;
        max-width: 285px !important;
        height: calc(100vh - 50px) !important;
        margin: 0 !important;
        padding: 10px !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateX(0) !important;
        overflow: hidden !important;
        background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 52%, #eafaf6 100%) !important;
        border-right: 1px solid #d8e6f4 !important;
        border-left: 0 !important;
        box-shadow: 16px 0 34px rgba(15,23,42,.18) !important;
        z-index: 1041 !important;
    }

    html[dir="rtl"].menu-opened body:not(.pos-page) #sidebar,
    html[dir="rtl"] body.mobile-menu-open:not(.pos-page) #sidebar,
    html[dir="rtl"] body.mobile-rail-open:not(.pos-page) #sidebar,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper.slide-nav #sidebar {
        right: 0 !important;
        left: auto !important;
        border-right: 0 !important;
        border-left: 1px solid #d8e6f4 !important;
        box-shadow: -16px 0 34px rgba(15,23,42,.18) !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .slimScrollDiv,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-inner,
    body.mobile-menu-open:not(.pos-page) #sidebar .slimScrollDiv,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-inner,
    body.mobile-rail-open:not(.pos-page) #sidebar .slimScrollDiv,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-inner,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .slimScrollDiv,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-inner {
        width: 265px !important;
        max-width: 265px !important;
        height: calc(100vh - 70px) !important;
        overflow-x: hidden !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .menu-title,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu a span,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu .menu-arrow,
    body.mobile-menu-open:not(.pos-page) #sidebar .menu-title,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu a span,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu .menu-arrow,
    body.mobile-rail-open:not(.pos-page) #sidebar .menu-title,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu a span,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu .menu-arrow,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .menu-title,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu a span,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu .menu-arrow {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        overflow: visible !important;
        clip: auto !important;
        position: static !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .menu-title,
    body.mobile-menu-open:not(.pos-page) #sidebar .menu-title,
    body.mobile-rail-open:not(.pos-page) #sidebar .menu-title,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .menu-title {
        display: block !important;
        padding: 12px 12px 6px !important;
        color: #64748b !important;
        font-size: 13px !important;
        font-weight: 700 !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu > ul > li > a {
        width: 100% !important;
        min-height: 46px !important;
        height: auto !important;
        margin: 5px 0 !important;
        padding: 9px 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        border-radius: 12px !important;
        background: #fff !important;
        color: #172033 !important;
        box-shadow: 0 4px 14px rgba(15,23,42,.06) !important;
        text-align: left !important;
        white-space: normal !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu ul li a i,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu ul li a i,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu ul li a i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu ul li a i {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 11px !important;
        background: #eef6ff !important;
        color: #2563eb !important;
        box-shadow: none !important;
        font-size: 16px !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu > ul > li > a span,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a span,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a span,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu > ul > li > a span {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        color: inherit !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu ul ul,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu ul ul,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu ul ul,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu ul ul {
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        margin: 4px 0 8px 44px !important;
        padding: 5px !important;
        border: 1px solid #d8e6f4 !important;
        border-radius: 12px !important;
        background: rgba(255,255,255,.74) !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: hidden !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu a.subdrop + ul,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu a.subdrop + ul,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu a.subdrop + ul,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu a.subdrop + ul {
        display: block !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu ul ul a,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu ul ul a,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu ul ul a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu ul ul a {
        min-height: 38px !important;
        margin: 3px 0 !important;
        padding: 8px 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        border-radius: 9px !important;
        background: #fff !important;
        color: #334155 !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        text-align: left !important;
        white-space: normal !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu li.active > a,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu li a:hover,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu li.active > a,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu li a:hover,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li.active > a,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li a:hover,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu li.active > a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu li a:hover,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu > ul > li.submenu > a.subdrop {
        color: #fff !important;
        background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
        box-shadow: 0 10px 22px rgba(37,99,235,.22) !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu li.active > a i,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu li a:hover i,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop i,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu li.active > a i,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu li a:hover i,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop i,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li.active > a i,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li a:hover i,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu li.active > a i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu li a:hover i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu > ul > li.submenu > a.subdrop i {
        background: rgba(255,255,255,.22) !important;
        color: #fff !important;
    }

    html.menu-opened body:not(.pos-page) .page-wrapper,
    body.mobile-menu-open:not(.pos-page) .page-wrapper,
    body.mobile-rail-open:not(.pos-page) .page-wrapper,
    body:not(.pos-page) .main-wrapper.slide-nav .page-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Mobile toggle final behavior: open a full usable overlay menu */
@media only screen and (max-width: 991.98px) {
    html.menu-opened body:not(.pos-page) #sidebar.opened,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened {
        width: 285px !important;
        min-width: 285px !important;
        max-width: 285px !important;
        top: 50px !important;
        left: 0 !important;
        right: auto !important;
        padding: 10px 10px 14px !important;
        visibility: visible !important;
        transform: translateX(0) !important;
        overflow: hidden !important;
        background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 52%, #eafaf6 100%) !important;
        border-right: 1px solid #d8e6f4 !important;
        box-shadow: 16px 0 34px rgba(15,23,42,.18) !important;
        z-index: 1041 !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .slimScrollDiv,
    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-inner,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .slimScrollDiv,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .sidebar-inner,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .slimScrollDiv,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-inner {
        width: 265px !important;
        max-width: 265px !important;
        overflow-x: hidden !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .menu-title,
    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu a span,
    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu .menu-arrow,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .menu-title,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .sidebar-menu a span,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .sidebar-menu .menu-arrow,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .menu-title,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu a span,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu .menu-arrow {
        display: inline-flex !important;
        visibility: visible !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .menu-title,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .menu-title,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .menu-title {
        display: block !important;
        color: #64748b !important;
        padding: 12px 12px 6px !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu > ul > li > a,
    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu > ul > li.submenu > a,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .sidebar-menu > ul > li > a,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .sidebar-menu > ul > li.submenu > a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu > ul > li > a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu > ul > li.submenu > a {
        width: auto !important;
        height: auto !important;
        min-height: 46px !important;
        margin: 5px 0 !important;
        padding: 9px 12px !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        color: #172033 !important;
        background: #fff !important;
        box-shadow: 0 4px 14px rgba(15,23,42,.06) !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu ul li a i,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .sidebar-menu ul li a i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu ul li a i {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        margin: 0 !important;
        border-radius: 11px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #eef6ff !important;
        color: #2563eb !important;
        box-shadow: none !important;
        font-size: 16px !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu > ul > li > a span,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .sidebar-menu > ul > li > a span,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu > ul > li > a span {
        flex: 1 1 auto !important;
        color: inherit !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu ul ul,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .sidebar-menu ul ul,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu ul ul {
        width: auto !important;
        height: auto !important;
        margin: 4px 0 8px 44px !important;
        padding: 5px !important;
        border: 1px solid #d8e6f4 !important;
        border-radius: 12px !important;
        background: rgba(255,255,255,.7) !important;
        visibility: visible !important;
        overflow: hidden !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu ul ul a,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .sidebar-menu ul ul a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu ul ul a {
        min-height: 38px !important;
        padding: 8px 10px !important;
        margin: 3px 0 !important;
        border-radius: 9px !important;
        background: #fff !important;
        color: #334155 !important;
        justify-content: flex-start !important;
        font-size: 13px !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu li.active > a,
    html.menu-opened body:not(.pos-page) #sidebar.opened .sidebar-menu li a:hover,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .sidebar-menu li.active > a,
    body.mobile-menu-open:not(.pos-page) #sidebar.opened .sidebar-menu li a:hover,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu li.active > a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar.opened .sidebar-menu li a:hover {
        color: #fff !important;
        background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
        box-shadow: 0 10px 22px rgba(37,99,235,.22) !important;
    }

    html.menu-opened body:not(.pos-page) .page-wrapper,
    body.mobile-menu-open:not(.pos-page) .page-wrapper,
    body:not(.pos-page) .main-wrapper.slide-nav .page-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
}

/* Absolute final mobile sidebar behavior. Keep this after all older rail rules. */
@media only screen and (max-width: 991.98px) {
    body:not(.pos-page):not(.mobile-menu-open) .main-wrapper:not(.slide-nav) #sidebar,
    html:not(.menu-opened) body:not(.pos-page):not(.mobile-menu-open) #sidebar {
        width: 285px !important;
        min-width: 285px !important;
        max-width: 285px !important;
        transform: translateX(-105%) !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar,
    body.mobile-menu-open:not(.pos-page) #sidebar,
    body.mobile-rail-open:not(.pos-page) #sidebar,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar {
        top: 50px !important;
        left: 0 !important;
        right: auto !important;
        width: 285px !important;
        min-width: 285px !important;
        max-width: 285px !important;
        height: calc(100vh - 50px) !important;
        margin: 0 !important;
        padding: 10px !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateX(0) !important;
        overflow: hidden !important;
        background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 52%, #eafaf6 100%) !important;
        border-right: 1px solid #d8e6f4 !important;
        box-shadow: 16px 0 34px rgba(15,23,42,.18) !important;
        z-index: 1041 !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .slimScrollDiv,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-inner,
    body.mobile-menu-open:not(.pos-page) #sidebar .slimScrollDiv,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-inner,
    body.mobile-rail-open:not(.pos-page) #sidebar .slimScrollDiv,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-inner,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .slimScrollDiv,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-inner {
        width: 265px !important;
        max-width: 265px !important;
        height: calc(100vh - 70px) !important;
        overflow-x: hidden !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .menu-title,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu a span,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu .menu-arrow,
    body.mobile-menu-open:not(.pos-page) #sidebar .menu-title,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu a span,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu .menu-arrow,
    body.mobile-rail-open:not(.pos-page) #sidebar .menu-title,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu a span,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu .menu-arrow,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .menu-title,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu a span,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu .menu-arrow {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        overflow: visible !important;
        clip: auto !important;
        position: static !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .menu-title,
    body.mobile-menu-open:not(.pos-page) #sidebar .menu-title,
    body.mobile-rail-open:not(.pos-page) #sidebar .menu-title,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .menu-title {
        display: block !important;
        padding: 12px 12px 6px !important;
        color: #64748b !important;
        font-size: 13px !important;
        font-weight: 700 !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu > ul > li > a {
        width: 100% !important;
        min-height: 46px !important;
        height: auto !important;
        margin: 5px 0 !important;
        padding: 9px 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        border-radius: 12px !important;
        background: #fff !important;
        color: #172033 !important;
        box-shadow: 0 4px 14px rgba(15,23,42,.06) !important;
        text-align: left !important;
        white-space: normal !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu ul li a i,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu ul li a i,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu ul li a i,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu ul li a i {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 11px !important;
        background: #eef6ff !important;
        color: #2563eb !important;
        box-shadow: none !important;
        font-size: 16px !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu > ul > li > a span,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a span,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li > a span,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu > ul > li > a span {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        color: inherit !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu ul ul,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu ul ul,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu ul ul,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu ul ul {
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        margin: 4px 0 8px 44px !important;
        padding: 5px !important;
        border: 1px solid #d8e6f4 !important;
        border-radius: 12px !important;
        background: rgba(255,255,255,.74) !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: hidden !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu a.subdrop + ul,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu a.subdrop + ul,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu a.subdrop + ul,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu a.subdrop + ul {
        display: block !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu ul ul a,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu ul ul a,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu ul ul a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu ul ul a {
        min-height: 38px !important;
        margin: 3px 0 !important;
        padding: 8px 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        border-radius: 9px !important;
        background: #fff !important;
        color: #334155 !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        text-align: left !important;
        white-space: normal !important;
    }

    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu li.active > a,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu li a:hover,
    html.menu-opened body:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu li.active > a,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu li a:hover,
    body.mobile-menu-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li.active > a,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu li a:hover,
    body.mobile-rail-open:not(.pos-page) #sidebar .sidebar-menu > ul > li.submenu > a.subdrop,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu li.active > a,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu li a:hover,
    body:not(.pos-page) .main-wrapper.slide-nav #sidebar .sidebar-menu > ul > li.submenu > a.subdrop {
        color: #fff !important;
        background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
        box-shadow: 0 10px 22px rgba(37,99,235,.22) !important;
    }

    html.menu-opened body:not(.pos-page) .page-wrapper,
    body.mobile-menu-open:not(.pos-page) .page-wrapper,
    body.mobile-rail-open:not(.pos-page) .page-wrapper,
    body:not(.pos-page) .main-wrapper.slide-nav .page-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}


/* Absolute EOF mobile header dropdown positions. */
@media only screen and (max-width: 991.98px) {
    body:not(.pos-page) .user-menu .notifications,
    body:not(.pos-page) .user-menu .notifications.show,
    body:not(.pos-page) .user-menu #open_msg_box + .dropdown-menu,
    body:not(.pos-page) .user-menu #open_msg_box + .dropdown-menu.show {
        position: fixed !important;
        top: 56px !important;
        right: 10px !important;
        left: auto !important;
        transform: none !important;
        width: min(340px, calc(100vw - 20px)) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 72px) !important;
        overflow: hidden !important;
        padding: 0 !important;
        border: 1px solid #d8e6f4 !important;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: 0 18px 36px rgba(15,23,42,.18) !important;
        z-index: 2050 !important;
    }

    body:not(.pos-page) .user-menu .notifications .topnav-dropdown-header,
    body:not(.pos-page) .user-menu .notifications .topnav-dropdown-footer {
        height: auto !important;
        padding: 10px 12px !important;
        background: #f8fbff !important;
        border-color: #e2edf8 !important;
        color: #172033 !important;
        font-weight: 800 !important;
    }

    body:not(.pos-page) .user-menu .notifications .drop-scroll {
        max-height: calc(100vh - 170px) !important;
        overflow-y: auto !important;
    }

    body:not(.pos-page) .user-menu .notifications .notification-list,
    body:not(.pos-page) .user-menu .notifications .notification-list li {
        width: 100% !important;
        max-width: 100% !important;
    }

    body:not(.pos-page) .user-menu .notifications .notification-message {
        padding: 12px !important;
        white-space: normal !important;
    }

    html[dir="rtl"] body:not(.pos-page) .user-menu .notifications,
    html[dir="rtl"] body:not(.pos-page) .user-menu .notifications.show,
    html[dir="rtl"] body:not(.pos-page) .user-menu #open_msg_box + .dropdown-menu,
    html[dir="rtl"] body:not(.pos-page) .user-menu #open_msg_box + .dropdown-menu.show {
        left: 10px !important;
        right: auto !important;
    }
}

/* Payroll period form header: readable on the modern light card surface. */
.payroll-period-header {
    color: #10233f !important;
    background: linear-gradient(135deg, #f8fbff 0%, #ecfdf5 100%) !important;
    border-bottom: 1px solid #d8e6f4 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

.payroll-period-header i {
    color: #2563eb !important;
    opacity: 1 !important;
}

/* Header language switcher. */
body:not(.pos-page) .main-wrapper > .header .lang-switcher {
    display: flex !important;
    align-items: center;
}

body:not(.pos-page) .main-wrapper > .header .lang-switcher-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 96px;
    max-width: 150px;
    height: 36px;
    margin: 7px 6px;
    padding: 0 12px !important;
    border: 1px solid rgba(37,99,235,.18);
    border-radius: 8px;
    background: #fff;
    color: #1f2f46 !important;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(15,23,42,.06);
}

body:not(.pos-page) .main-wrapper > .header .lang-switcher-toggle:hover,
body:not(.pos-page) .main-wrapper > .header .lang-switcher.show .lang-switcher-toggle {
    border-color: rgba(37,99,235,.35);
    color: #2563eb !important;
    text-decoration: none;
}

body:not(.pos-page) .main-wrapper > .header .lang-switcher-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 800;
}

body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu {
    min-width: 168px;
    padding: 8px;
    border: 1px solid #d8e6f4;
    border-radius: 10px;
    box-shadow: 0 18px 36px rgba(15,23,42,.18);
}

body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #263244;
    font-weight: 700;
    line-height: 1.2;
}

body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu .dropdown-item:hover,
body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu .dropdown-item.active {
    background: #eef6ff;
    color: #2563eb;
}

body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu .dropdown-item i {
    font-size: 12px;
}

/* Absolute EOF mobile language dropdown position. */
@media only screen and (max-width: 991.98px) {
    body:not(.pos-page) .main-wrapper > .header .lang-switcher-toggle {
        min-width: 88px;
        max-width: 112px;
        height: 34px;
        margin: 8px 5px;
        padding: 0 10px !important;
    }

    body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu,
    body:not(.pos-page) .main-wrapper > .header .lang-switcher.show .lang-switcher-menu,
    body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu.show {
        position: fixed !important;
        top: 56px !important;
        right: 58px !important;
        left: auto !important;
        transform: none !important;
        min-width: 168px !important;
        max-width: calc(100vw - 20px) !important;
        padding: 8px !important;
        border: 1px solid #d8e6f4 !important;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: 0 18px 36px rgba(15,23,42,.18) !important;
        z-index: 2050 !important;
    }

    body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu .dropdown-item {
        min-height: 42px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 9px 12px !important;
        border-radius: 10px !important;
        color: #263244 !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        white-space: normal !important;
    }

    body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu .dropdown-item:hover,
    body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu .dropdown-item.active {
        background: #eef6ff !important;
        color: #2563eb !important;
    }

    html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header .lang-switcher.show .lang-switcher-menu,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu.show {
        left: 58px !important;
        right: auto !important;
    }
}

@media only screen and (max-width: 575.98px) {
    body:not(.pos-page) .main-wrapper > .header .lang-switcher-toggle {
        min-width: 72px;
        max-width: 98px;
        padding: 0 8px !important;
    }

    body:not(.pos-page) .main-wrapper > .header .lang-switcher-toggle .fa-globe {
        display: none;
    }

    body:not(.pos-page) .main-wrapper > .header .lang-switcher-label {
        font-size: 12px;
    }

    body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu,
    body:not(.pos-page) .main-wrapper > .header .lang-switcher.show .lang-switcher-menu,
    body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu.show {
        right: 48px !important;
        min-width: 150px !important;
    }

    html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header .lang-switcher.show .lang-switcher-menu,
    html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header .lang-switcher-menu.show {
        left: 48px !important;
        right: auto !important;
    }
}

/* Absolute EOF mobile header brand spacing: separate menu button from logo. */
@media only screen and (max-width: 767.98px) {
    body:not(.pos-page) .main-wrapper > .header {
        padding-left: 0 !important;
        gap: 0 !important;
    }

    body:not(.pos-page) #mobile_btn.mobile_btn,
    body:not(.pos-page) a#mobile_btn.mobile_btn {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 44px !important;
        min-width: 44px !important;
        height: 50px !important;
        margin: 0 !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 44px !important;
        order: 0 !important;
        z-index: 3 !important;
    }

    body:not(.pos-page) .main-wrapper > .header .header-left {
        flex: 0 1 198px !important;
        min-width: 0 !important;
        width: auto !important;
        margin-left: 0 !important;
        order: 1 !important;
    }

    body:not(.pos-page) .main-wrapper > .header .logo {
        padding-left: 0 !important;
        gap: 9px !important;
    }

    body:not(.pos-page) .main-wrapper > .header .logo img {
        width: 40px !important;
        height: 40px !important;
        margin-left: 0 !important;
        flex: 0 0 40px !important;
    }

    body:not(.pos-page) .main-wrapper > .header .logo span {
        max-width: 138px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header .header-left {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

/* Absolute EOF mobile header order: menu, brand, actions. */
@media only screen and (max-width: 767.98px) {
    body:not(.pos-page) .main-wrapper > .header {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        height: 50px !important;
        min-height: 50px !important;
        padding: 0 !important;
    }

    body:not(.pos-page) #mobile_btn.mobile_btn,
    body:not(.pos-page) a#mobile_btn.mobile_btn {
        order: 0 !important;
        flex: 0 0 40px !important;
        width: 40px !important;
        min-width: 40px !important;
        height: 50px !important;
    }

    body:not(.pos-page) .main-wrapper > .header .header-left {
        order: 1 !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 50px !important;
    }

    body:not(.pos-page) .main-wrapper > .header .logo {
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-width: 0 !important;
    }

    body:not(.pos-page) .main-wrapper > .header .logo img {
        width: 38px !important;
        height: 38px !important;
        flex: 0 0 38px !important;
    }

    body:not(.pos-page) .main-wrapper > .header .logo span {
        display: block !important;
        min-width: 0 !important;
        max-width: 120px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    body:not(.pos-page) .main-wrapper > .header .user-menu {
        order: 2 !important;
        flex: 0 0 auto !important;
        margin-left: auto !important;
        margin-right: 4px !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
    }

    body:not(.pos-page) .user-menu.nav > li > a {
        width: 40px !important;
        min-width: 40px !important;
        height: 50px !important;
        border-radius: 0 !important;
    }

    html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header .user-menu {
        margin-right: auto !important;
        margin-left: 4px !important;
    }
}

/* Absolute EOF mobile compact brand: logo only, no project text. */
@media only screen and (max-width: 767.98px) {
    body:not(.pos-page) .main-wrapper > .header .logo span {
        display: none !important;
    }

    body:not(.pos-page) .main-wrapper > .header .header-left {
        flex: 0 0 54px !important;
        width: 54px !important;
        max-width: 54px !important;
        min-width: 54px !important;
    }

    body:not(.pos-page) .main-wrapper > .header .logo {
        width: 54px !important;
        justify-content: center !important;
        padding: 0 !important;
        gap: 0 !important;
    }

    body:not(.pos-page) #mobile_btn.mobile_btn,
    body:not(.pos-page) a#mobile_btn.mobile_btn {
        flex: 0 0 44px !important;
        width: 44px !important;
        min-width: 44px !important;
    }

    body:not(.pos-page) .main-wrapper > .header .user-menu {
        margin-left: auto !important;
    }
}

/* Absolute EOF mobile logo square shape. */
@media only screen and (max-width: 767.98px) {
    body:not(.pos-page) .main-wrapper > .header .logo {
        width: 48px !important;
        height: 48px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    body:not(.pos-page) .main-wrapper > .header .logo img {
        width: 40px !important;
        height: 40px !important;
        object-fit: cover !important;
        border-radius: 8px !important;
        padding: 0 !important;
        background: #fff !important;
        border: 2px solid rgba(255,255,255,.9) !important;
        box-shadow: 0 6px 14px rgba(15,23,42,.18) !important;
    }
}

/* Absolute EOF mobile header no clipping: full toggle + compact square logo. */
@media only screen and (max-width: 767.98px) {
    body:not(.pos-page) .main-wrapper > .header {
        padding-left: 6px !important;
        padding-right: 4px !important;
    }

    body:not(.pos-page) #mobile_btn.mobile_btn,
    body:not(.pos-page) a#mobile_btn.mobile_btn {
        flex: 0 0 42px !important;
        width: 42px !important;
        min-width: 42px !important;
        height: 50px !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        overflow: visible !important;
    }

    body:not(.pos-page) #mobile_btn.mobile_btn i,
    body:not(.pos-page) a#mobile_btn.mobile_btn i {
        font-size: 24px !important;
        line-height: 1 !important;
    }

    body:not(.pos-page) .main-wrapper > .header .header-left {
        flex: 0 0 44px !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        margin-left: 2px !important;
    }

    body:not(.pos-page) .main-wrapper > .header .logo {
        width: 44px !important;
        height: 50px !important;
    }

    body:not(.pos-page) .main-wrapper > .header .logo img {
        width: 36px !important;
        height: 36px !important;
        border-radius: 7px !important;
    }

    html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header {
        padding-right: 6px !important;
        padding-left: 4px !important;
    }

    html[dir="rtl"] body:not(.pos-page) .main-wrapper > .header .header-left {
        margin-right: 2px !important;
        margin-left: 0 !important;
    }
}


@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    body.report-print-page {
        background: #fff !important;
        color: #102033 !important;
        font-size: 10px !important;
    }

    body.report-print-page .header,
    body.report-print-page .sidebar,
    body.report-print-page .sidebar-overlay,
    body.report-print-page .saidy-developer-credit,
    body.report-print-page .page-header .btn,
    body.report-print-page .page-header .dropdown,
    body.report-print-page .alert,
    body.report-print-page .modal,
    body.report-print-page .toast,
    body.report-print-page .toast-container,
    body.report-print-page .offline-banner,
    body.report-print-page .offline-status,
    body.report-print-page .sync-status,
    body.report-print-page #offlineBanner,
    body.report-print-page #syncStatus,
    body.report-print-page #syncToast,
    body.report-print-page .fixed-top,
    body.report-print-page .fixed-bottom {
        display: none !important;
    }

    body.report-print-page .main-wrapper,
    body.report-print-page .page-wrapper,
    body.report-print-page .content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        min-height: auto !important;
        background: #fff !important;
    }

    body.report-print-page .page-title-row {
        display: none !important;
    }

    body.report-print-page .page-header {
        display: block !important;
        margin: 0 0 8px !important;
        padding: 0 0 7px !important;
        border-bottom: 2px solid #0f766e !important;
        text-align: center !important;
    }

    body.report-print-page .page-header h1,
    body.report-print-page .page-header h2,
    body.report-print-page .page-header h3,
    body.report-print-page .page-title {
        margin: 0 !important;
        color: #102033 !important;
        font-size: 17px !important;
        font-weight: 900 !important;
        line-height: 1.15 !important;
    }

    body.report-print-page .page-subtitle {
        margin: 3px 0 0 !important;
        color: #475467 !important;
        font-size: 9px !important;
    }

    body.report-print-page .card:has(form),
    body.report-print-page .card:has(canvas) {
        display: none !important;
    }

    body.report-print-page .row,
    body.report-print-page .col,
    body.report-print-page [class*="col-"],
    body.report-print-page [class*="col-md-"],
    body.report-print-page [class*="col-lg-"] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    body.report-print-page .row.g-3,
    body.report-print-page .row.mb-4 {
        margin-bottom: 6px !important;
    }

    body.report-print-page .card {
        border: 0 !important;
        box-shadow: none !important;
        margin: 0 0 7px !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.report-print-page .card-header {
        display: none !important;
    }

    body.report-print-page .card-body {
        padding: 0 !important;
    }

    body.report-print-page .table-responsive {
        overflow: visible !important;
    }

    body.report-print-page table {
        width: 100% !important;
        border-collapse: collapse !important;
        table-layout: fixed !important;
        margin: 0 !important;
    }

    body.report-print-page th,
    body.report-print-page td {
        border: 1px solid #bcd0df !important;
        padding: 5px 6px !important;
        font-size: 9px !important;
        line-height: 1.2 !important;
        color: #102033 !important;
        background: #fff !important;
        vertical-align: middle !important;
        word-break: normal !important;
    }

    body.report-print-page th,
    body.report-print-page tfoot td {
        background: #e8f5f2 !important;
        color: #073f3a !important;
        font-weight: 900 !important;
        text-transform: uppercase !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body.report-print-page .badge {
        border: 0 !important;
        background: transparent !important;
        color: inherit !important;
        padding: 0 !important;
        font-size: inherit !important;
    }
}

/* Final compact language switcher: icon + code, no white pill. */
body:not(.pos-page) .main-wrapper > .header .lang-switcher-toggle,
body:not(.pos-page) .main-wrapper > .header .lang-switcher-toggle:hover,
body:not(.pos-page) .main-wrapper > .header .lang-switcher.show .lang-switcher-toggle {
    min-width: 48px !important;
    max-width: 58px !important;
    width: 54px !important;
    height: 50px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    gap: 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
}

body:not(.pos-page) .main-wrapper > .header .lang-switcher-toggle .fa-globe {
    display: inline-block !important;
    color: #fff !important;
    font-size: 15px !important;
}

body:not(.pos-page) .main-wrapper > .header .lang-switcher-label {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
}

body:not(.pos-page) .main-wrapper > .header .lang-switcher-toggle:after {
    display: none !important;
}

body:not(.pos-page) .main-wrapper > .header .lang-switcher-toggle:hover {
    background: rgba(255,255,255,.12) !important;
}

/* Final polished global search in header. */
body:not(.pos-page) .main-wrapper > .header .global-search-wrapper {
    flex: 1 1 420px !important;
    max-width: 620px !important;
    min-width: 260px !important;
    height: 50px !important;
    margin: 0 16px !important;
    display: flex !important;
    align-items: center !important;
}

body:not(.pos-page) .main-wrapper > .header .global-search-wrapper .input-group {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 40px !important;
    padding: 3px 4px 3px 16px !important;
    border: 1px solid rgba(255,255,255,.30) !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.13) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.20), 0 8px 20px rgba(0,38,88,.12) !important;
    overflow: hidden !important;
}

body:not(.pos-page) .main-wrapper > .header #globalSearchInput {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 12px 0 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

body:not(.pos-page) .main-wrapper > .header #globalSearchInput::placeholder {
    color: rgba(255,255,255,.72) !important;
}

body:not(.pos-page) .main-wrapper > .header #globalSearchBtn {
    flex: 0 0 34px !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg,#ffca55,#ff982f) !important;
    color: #102033 !important;
    box-shadow: 0 6px 15px rgba(255,152,47,.35) !important;
}

body:not(.pos-page) .main-wrapper > .header #globalSearchBtn i {
    font-size: 15px !important;
}

/* Final print guard: report pages must print the report, never the app shell. */
@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    .header,
    .sidebar,
    .sidebar-overlay,
    .saidy-developer-credit,
    .offline-banner,
    .offline-status,
    .sync-status,
    #offlineBanner,
    #syncStatus,
    #syncToast,
    .toast,
    .toast-container,
    .fixed-top,
    .fixed-bottom {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .main-wrapper,
    .page-wrapper,
    .content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        background: #fff !important;
        transform: none !important;
    }

    body.report-print-page .page-header {
        break-after: avoid;
        page-break-after: avoid;
    }
}

/* Shared desktop navigation control beside every page title. */
.page-title-with-back {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title-with-back .page-title {
    margin-bottom: 10px;
}

.page-back-button {
    width: 34px;
    height: 34px;
    min-width: 34px;
    margin: 0 0 10px;
    padding: 0;
    border: 1px solid #d6e1ef;
    border-radius: 6px;
    background: #fff;
    color: #07589d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.page-back-button:hover,
.page-back-button:focus {
    background: #07589d;
    border-color: #07589d;
    color: #fff;
    outline: 0;
}

html[dir="rtl"] .page-back-button i {
    transform: rotate(180deg);
}

@media (max-width: 767.98px) {
    .page-back-button {
        display: none;
    }
}
