/* Navbar icons (search + settings) sized up by 2px from the hugeicons
   default (16px -> 18px), matching the bell/mail inline SVGs at 20px. */
.navbar-custom .hgi:after {
    width: 18px;
    height: 18px;
}

/* Navbar icon buttons (messages, notifications, settings) grey instead of
   default black text color - covers both the hugeicons mask-based icons
   (which read currentColor) and the inline SVGs (stroke="currentColor").
   The search icon and location chevron already set their own grey inline. */
.navbar-custom .icons-nav-btn {
    color: #98a2b3 !important;
}

.navbar-custom .icons-nav-btn:hover {
    color: #475467 !important;
}

:root {
    /* Primary Colors */
    --color-primary: #146C94;
    --color-primary-hover: #0258da;
    --color-primary-dark: #034b6d;
    --color-primary-darker: #084298;
    --color-primary-light: #85a9de;

    /* Success/Danger/Warning States */
    --color-success: #157347;
    --color-success-hover: #0a5532;
    --color-success-light: #daffd3;
    --color-danger: #dc3545;
    --color-danger-hover: #bb2d3b;
    --color-danger-dark: #8d0000;
    --color-danger-darker: #b02a37;
    --color-danger-logout: #b20000;
    --color-danger-logout-hover: #810000;
    --color-warning: #ffc107;
    --color-warning-hover: #ffca2c;
    --color-warning-text: #362900;

    /* Background Colors */
    --color-bg-light-grey: #e4fdd9;
    --color-bg-hover: #f0f0f0;
    --color-bg-light: #f6f6f6;
    --color-bg-lighter: #F6F1F1;
    --color-bg-danger-light: #fcf0f1;
    --color-bg-light-grey-alt: #e4fdd9;
    --color-bg-danger-red: rgb(255, 230, 230);
    --color-bg-danger-red-hover: rgb(206, 0, 0);
    --color-bg-white: #ffffff;
    --color-bg-transparent: transparent;
    --color-bg-sidebar: #AFD3E2;
    --color-bg-sidebar-dark: #38414A;
    --color-bg-logout: rgb(249, 211, 211);
    --color-bg-logout-hover: rgb(176, 0, 0);
    --color-bg-profile: #e5efff;
    --color-bg-green-card: #daffd3;
    --color-bg-search: #ffffff;

    /* Border & Divider Colors */
    --color-border-grey: grey;
    --color-border-dashed: #ececec;
    --color-border-light: #ccc;
    --color-border-primary: #146C94;
    --color-border-dark: rgb(54, 50, 50);
    --color-divider: #dee2e6;
    --color-border-black: #000000;
    --color-border-divider: #ddd;

    /* Text Colors */
    --color-text-black: #000000;
    --color-text-danger: rgb(206, 0, 0);
    --color-text-white: #ffffff;
    --color-text-gray: #707070;
    --color-text-light-gray: #CCCCCC;
    --color-text-medium-gray: #444;
    --color-text-dark-gray: #333;
    --color-text-sidebar-gray: #6a7784;
    --color-text-icon-gray: #6c6c6c;
    --color-text-gray-medium: #6a6a6a;
    --color-text-gray-light: #9ca3af;
    --color-text-gray-lighter: #e3e3e3;

    /* Button States */
    --color-btn-primary: #0b5ed7;
    --color-btn-primary-border: #0a58ca;
    --color-btn-secondary: #6c757d;
    --color-btn-secondary-hover: #5c636a;

    /* Animation & UI Colors */
    --color-animation-stroke: rgba(54, 95, 160, 1);
    --color-ui-hover: #e7e7e7;
    --color-ui-light: #F2F2F2;

    /* Other Colors */
    --color-transparent: rgba(72, 138, 20, 0);
    --color-secondary: #6c757d;
    --color-info: #146C94;
    --color-cyan: var(--bs-cyan);
    --color-green-add: #00712D;
    --color-whatsapp-hover: rgb(10, 83, 0);

    /* Scrollbar Colors */
    --color-scrollbar-thumb: rgb(132, 142, 151);
    --color-scrollbar-hover: rgb(56, 65, 74);
    --color-scrollbar-light: #9ca3af;
    --color-scrollbar-dark: #6b7280;
}

/* =========================================================================
   NAVBAR - single source of truth for the topbar layout.
   Visual order (left to right): [sidebar toggle] [logo] [Oncordia name]
   | divider | [search] .......................... [location] [icon buttons]
   ========================================================================= */

.navbar-custom {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1001 !important;
    height: 62px !important;
    background: var(--color-bg-white);
    box-shadow: none !important;
    border-bottom: 1px solid var(--color-border-dashed);
    display: flex;
    align-items: center;
    /* NOT overflow:hidden - the location/notification/settings dropdown
       panels are absolutely-positioned descendants that extend well below
       this 65px bar; overflow:hidden here clips them to invisible. */
    overflow: visible;
    padding: 0;
}

/* .container-fluid's direct children, in DOM order:
   1. div.topnav-menu-left   plain flex wrapper for the whole left side,
        containing:
        1a. div.nav-brand-group  (toggle -> logo -> name -> mobile toggle)
        1b. the divider (border-left on .serch-li, sits between 1a and 1c)
        1c. div.serch-li         (search box)
      None of this is a menu list, so no <li> wrapping.
   2. ul.topnav-menu         (location -> folder -> notifications -> settings)
      - a real list of dropdown-menu triggers, kept as <ul>/<li>, pushed to
      the far right edge below. */
.navbar-custom > .container-fluid {
    display: flex;
    align-items: center;
    height: 100%;
}

.topnav-menu-left {
    display: flex;
    align-items: center;
    align-self: stretch;
    height: 100%;
    flex: 0 0 auto;
}

.nav-brand-group {
    display: flex;
    align-items: center;
    gap: 12px !important;
}

.serch-li {
    position: relative;
    /* anchors #search-dropdown to the search box itself */
    height: 62px !important;
    align-self: stretch;
    display: flex;
    align-items: center;
    margin: 0 auto 0 0 !important;
    /* !important beats the base theme's `.navbar-custom .app-search { margin-right: 20px }`,
       which has higher specificity and was silently overriding this */
    padding: 0 0 0 20px !important;
    border-left: 1px solid var(--color-border-dashed) !important;
}

.logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px !important;
    height: 62px !important;
}

.topnav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Right-aligns whichever icons are actually visible at the current
       breakpoint. Previously relied only on .serch-li's margin-right:auto
       below to push everything right - but that item is display:none on
       mobile/tablet, so its margin has no effect once hidden and the icon
       group collapsed to the left. justify-content here keeps the group
       right-aligned regardless of which items are hidden. */
    height: 62px !important;
    margin: 0 !important;
    /* zeroes out the markup's mt-0/mt-md-2 */
    padding-right: 10px !important;
    flex: 1 !important;
    /* stretches to fill the remaining navbar width (instead of shrink-
       wrapping), so .serch-li's margin-right:auto below has actual empty
       space to expand into and push the rest of the group to the right */
    gap: 10px !important;
}

/* Vertical divider between the location button and the icon-button group
   (folder / notifications / settings) on the right side of the navbar. */
.nav-right-divider {
    padding-left: 14px !important;
    margin-left: 4px !important;
    border-left: 1px solid var(--color-border-dashed) !important;
    height: 32px !important;
}

/* Tablet/mobile: brand text, search and location are already hidden below
   `lg` via d-none/d-lg-* utilities in topbar.blade.php - here we just tighten
   the remaining icon group's spacing so it doesn't sit loosely once those
   wider elements are gone. */
@media (max-width: 991.98px) {
    .nav-brand-group {
        gap: 8px !important;
    }

    .topnav-menu {
        gap: 6px !important;
        padding-right: 6px !important;
    }

    .nav-right-divider {
        padding-left: 8px !important;
        margin-left: 2px !important;
    }
}

/* :not(.d-none) matters: any <li> using Bootstrap's d-none/d-lg-*
   pattern for responsive hiding (search box, location button) was being
   forced visible at every width, because this rule's higher specificity
   (class + child combinator) beat d-none's !important. Every <li> here
   already carries its own d-flex/d-lg-inline-block/d-md-flex utility in
   the markup, so this rule only needs to add the shared alignment. */
.topnav-menu > li {
    align-items: center;
}

.topnav-menu > li:not(.d-none) {
    display: flex !important;
}

/* Search never stretches or centers - its inner wrapper div has bootstrap's
   justify-content-end, which only matters if the div is wider than its
   content, so pin it to its natural (auto) width explicitly. */
.serch-li {
    flex: 0 0 auto !important;
}

.serch-li > div {
    width: auto !important;
    justify-content: flex-start !important;
}

/* ---- Icon buttons: 42x42, 4px radius, flat with a soft teal hover tint ---- */

.icons-nav-btn,
.img-size-top-nav {
    width: 42px !important;
    height: 42px !important;
    border-radius: 4px !important;
    border: none !important;
    outline: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.icons-nav-btn-l,
.icons-nav-btn-ls {
    height: 42px !important;
    border-radius: 4px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 13px !important;
    border: none !important;
    transition: background-color 0.2s ease;
}

/* Fixed width so the location button never resizes on hover/active/text
   change - box-sizing keeps the 15px side padding inside that fixed width. */
.icons-nav-btn-ls {
    width: 220px !important;
    box-sizing: border-box !important;
}

.icons-nav-btn-ls > div {
    overflow: hidden;
    min-width: 0;
}

.icons-nav-btn-ls p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icons-nav-btn:hover,
.img-size-top-nav:hover {
    background-color: rgba(20, 108, 148, 0.08) !important;
    color: var(--color-primary) !important;
    border-radius: 4px !important;
}

.icons-nav-btn-ls:hover {
    background-color: rgba(20, 108, 148, 0.06) !important;
    color: var(--color-primary) !important;
    border-radius: 4px !important;
    /* no transform/translate here - hover only changes color, nothing shifts position */
}

/* Dropdown chevron - rotates when Bootstrap adds .show to the toggle (this
   span) while its dropdown-menu is open, no extra JS needed. */
.loc-chevron {
    margin-left: 8px;
    font-size: 12px;
    color: var(--color-text-gray-medium);
    transition: transform 0.2s ease;
}

#userloc-sec > .show .loc-chevron,
button.show .loc-chevron {
    transform: rotate(180deg);
}

/* Remove the default 1px border Bootstrap's .dropdown-menu applies to the
   location / inventory / notification / settings dropdown panels in the
   navbar. The search box and its mega-menu results panel keep their border. */
#user-loc-div,
#user-loc-div .dropdown-menu,
#notification_list .dropdown-menu,
#dropdown-menu-setting {
    border: none !important;
}

.icons-nav-btn-l:hover {
    background-color: transparent !important;
    color: var(--color-primary) !important;
}

.icons-nav-btn:hover>.text-center>.svg-ico-t>i,
.icons-nav-btn-l:hover>.text-center>.svg-ico-t>i,
.icons-nav-btn-ls:hover>.text-center>.svg-ico-t>i {
    color: var(--color-primary) !important;
}

.icons-nav-btn:hover .nav-ico-size::after,
.icons-nav-btn-ls:hover .nav-ico-size::after,
.img-size-top-nav:hover .nav-ico-size::after {
    background-color: var(--color-primary) !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

/* ---- Location button text (inline style="font-size:17px" on the markup
   is too tall for the compact 42px button, so it's overridden here) ---- */
#userloc-sec .navbar-text {
    font-size: 13px !important;
    font-weight: 500;
}

/* Title (SBU name) 16px, branch line 10px */
#userloc-sec .navbar-text p:first-child {
    font-size: 14px !important;
    font-weight: normal !important;
    line-height: 1.2 !important;
}

#userloc-sec .navbar-text p:last-child {
    font-size: 10px !important;
    line-height: 1.2 !important;
}

/* ---- Search input: flat rounded rectangle, teal focus ring ---- */

.input-search {
    height: 42px !important;
    min-width: 305px !important;
    width: 305px !important;
    border-radius: 4px !important;
    border: 1px solid #f5f3f4 !important;
    background-color: var(--color-bg-white) !important;
    color: var(--color-text-black) !important;
    font-size: 13px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box !important;
}

.input-search:focus {
    background-color: var(--color-bg-white) !important;
    border: 1px solid var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(20, 108, 148, 0.12) !important;
}

@media (max-width: 992px) {
    .input-search {
        min-width: 220px !important;
    }
}

.toglle-btn-nav>div>i {
    scale: 0.8 !important;
}

.noti-icon {
    position: relative;
}

/* Badge */
.noti-icon::before {
    content: attr(data-count);
    position: absolute;
    top: -6px;
    right: 0 !important;
    background: #dc3545; /* Bootstrap danger */
    color: #fff;
    min-width: 18px;
    height: 18px;
    font-size: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide badge if count is 0 */
.noti-icon[data-count="0"]::before {
    display: none;
}

@media (max-width: 992px) {
    .noti-icon::before {
        top: -4px;
        right: 4px;
    }
}

@media (max-width: 576px) {
    .noti-icon::before {
        min-width: 16px;
        height: 16px;
        font-size: 10px;
    }
}



@media (min-width: 993px) {
    .toglle-btn-nav {
        display: none !important;
    }

}

@media (max-width: 993px) {
    .add-mobile-center {
        margin-top: 12px !important;
        /* same as Bootstrap mt-2 */
        text-align: center;
        /* optional: center alignment */
    }

}

@media (max-width: 576px) {
    .add-mobile-center {
        margin-top: 12px !important;
        /* same as Bootstrap mt-2 */
        text-align: center;
        /* optional: center alignment */
    }
}

.fs-7 {
    font-size: 10px !important;
}

/* Mega-menu panel: consistent 4px radius, clean shadow, breathing gap below
   the search box instead of sitting flush against it. */
#search-dropdown {
    border-radius: 4px !important;
    border: 1px solid var(--color-border-dashed) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12) !important;
    margin-top: 8px !important;
}

/* When #mredetissection has the show class, set search-dropdown wider */
#search-dropdown:has(#mredetissection.show) {
    min-width: 850px !important;
}

/* When #mredetissection does NOT have show, set smaller width */
#search-dropdown:not(:has(#mredetissection.show)) {
    min-width: 650px !important;
}

/* When #mredetissection does NOT have the show class */
#search-dropdown:not(:has(#mredetissection.show)) .col-12.col-lg-5 {
    width: 100%;
    /* full width */
}

#mredetissection>h5 {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

#mredetissection {
    background-color: var(--color-bg-lighter) !important;
    border-radius: 4px !important;
    padding: 20px 10px !important;
}

#mredetails-list {
    background-color: var(--color-bg-lighter) !important;
}

.vr {
    width: 1px !important;
    background-color: var(--color-border-divider) !important;
    height: 100% !important;
    margin: 0 15px !important;
}

.item-name-search {
    white-space: normal !important;
}

.size-col-5 {
    min-width: 250px !important;
}

.size-col-7 {
    min-width: 350px !important;
}

.serch-li>#search-dropdown {
    width: auto !important;
}

@media (max-width: 768px) {
    #search-dropdown {
        position: static !important;
        width: 100% !important;
    }

    .showMoreAvailbility h5,
    #mredetails-list,
    #serchbody {
        padding-left: 5px;
    }

    .border-start {
        border-left: none !important;
        padding-left: 0 !important;
    }

    .input-search {
        font-size: 14px;
    }
}

.bg-light-grey-search {
    background-color: var(--color-bg-search) !important;
}

#mredetails-list>h6 {
    margin: 0 !important;
    padding: 4px 10px 4px 10px !important;
    margin-top: 4px !important;
}

#mredetails-list {
    padding: 10px !important;
}

#mredetails-list>p {
    margin-bottom: 6px !important;
}

.btn-primary {
    background-color: var(--color-primary) !important;
    color: var(--color-text-white) !important;
    border: none !important;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark) !important;
    color: var(--color-text-white) !important;
    border: none !important;
}

#user-loc-div,
#notification_list>.dropdown-menu,
#dropdown-logout {
    transform: translateY(12px) !important;
}

#user-loc-div,
#notification_list>.dropdown-menu {
    border-radius: 4px !important;
    overflow: hidden !important;
}

#user-loc-div>#user-locs-body {
    min-height: 260px !important;
    max-height: 340px !important;
}

#user-loc-div>#user-locs-body>ul {
    list-style-type: none;
    /* removes default bullets */
    padding-left: 0;
    /* removes left padding */
    margin-left: 0;
    /* optional: remove left margin */
    padding-left: 0.8rem;
    padding-right: 0.8rem;
}

#user-loc-div>#user-locs-body>ul>li {
    padding: 4px 8px !important;
    background: rgba(20, 108, 148, 0.08);
    border-radius: 4px !important;
}

#user-loc-div>#user-locs-body>ul>li:hover {
    background: rgba(20, 108, 148, 0.2) !important;
}

#user-loc-div>#user-locs-body>ul>li>a {
    color: var(--color-primary) !important;
}

/* ---- Compact size for the 3 topbar dropdown panels (location,
   calendar/notifications, profile/settings) ---- */
#user-loc-div,
#notification_list > .dropdown-menu {
    width: 300px !important;
    font-size: 12px;
}

/* Profile/settings menu only has 2 short rows (Profile, Logout) - the
   shared 300px is far too wide for it, so it gets its own narrower width. */
#dropdown-menu-setting {
    width: 220px !important;
    font-size: 12px;
}

/* On phones a fixed 300px panel anchored to a 42px trigger icon (via
   Popper) ends up sitting almost flush against the left edge with no
   consistent margin on either side. Pin it with an even gap from both
   screen edges instead of chasing the trigger's exact position. */
@media (max-width: 575.98px) {
    #user-loc-div,
    #notification_list > .dropdown-menu,
    #dropdown-menu-setting {
        position: fixed !important;
        top: 70px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
        max-height: calc(100vh - 90px) !important;
        overflow-y: auto !important;
    }
}

/* Mobile/tablet search: .serch-li is normally d-none below `lg`. When the
   search icon toggles it open, show it as a full-width dropdown panel
   (input on top, results/mega-menu below) instead of its desktop inline
   layout, which assumes room in the navbar it doesn't have here. */
@media (max-width: 991.98px) {
    .serch-li.mobile-search-open {
        display: block !important;
        position: fixed !important;
        top: 62px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
        /* base theme's .navbar-custom .app-search sets max-width:180px,
           which otherwise caps this panel regardless of the width/left/right
           set here. */
        height: auto !important;
        padding: 12px !important;
        margin: 0 !important;
        background: var(--color-bg-white);
        border: 1px solid var(--color-border-dashed) !important;
        border-radius: 4px !important;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
        z-index: 1005;
    }

    .serch-li.mobile-search-open .input-search {
        width: 100% !important;
        min-width: 0 !important;
    }

    .serch-li.mobile-search-open #search-kbd-hint {
        display: none !important;
    }

    /* #search-dropdown repeated: the desktop mega-menu rules this overrides
       (min-width: 650px/850px) are keyed off `#search-dropdown:not(:has(#id))`
       - two ids' worth of specificity - which otherwise beats a single-id
       selector regardless of !important, so this needs the same weight. */
    .serch-li.mobile-search-open #search-dropdown#search-dropdown {
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin-top: 25px !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }

    /* The mega-menu's own min-width rules (650px/850px, for desktop) would
       otherwise force this wider than the mobile panel it now sits in. */
    .serch-li.mobile-search-open #search-dropdown .col-12 {
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}

#user-loc-div .p-2,
#notification_list > .dropdown-menu .p-2,
#dropdown-menu-setting .p-2 {
    padding: 6px !important;
}

#user-loc-div h4,
#dropdown-menu-setting p {
    font-size: 12px !important;
}

#dropdown-menu-setting .form-text {
    font-size: 10px !important;
}

/* Location + Calendar dropdowns keep a 14px minimum everywhere (only the
   compact profile/settings menu stays at 10-12px). */
#user-loc-div .form-text,
#notification_list > .dropdown-menu .form-text,
#notification_list > .dropdown-menu h6 {
    font-size: 14px !important;
}

/* Except the "This section displays..." helper text at the bottom of the
   Calendar dropdown - kept smaller since it's secondary/explanatory copy. */
#notification_list > .dropdown-menu > .border-top .form-text {
    font-size: 12px !important;
}

#user-loc-div>#user-locs-body>ul>li {
    padding: 4px 8px !important;
}

#user-loc-div>#user-locs-body>ul>li>a {
    font-size: 14px !important;
}

/* ---- Custom thin scrollbar for all 3 dropdown panels' scrollable areas ---- */
#user-loc-div #user-locs-body,
#notification_list > .dropdown-menu [data-simplebar],
#dropdown-menu-setting {
    scrollbar-width: thin;
    scrollbar-color: #b7c2c6 #f1f1f1;
}

#user-loc-div #user-locs-body::-webkit-scrollbar,
#notification_list > .dropdown-menu [data-simplebar]::-webkit-scrollbar,
#dropdown-menu-setting::-webkit-scrollbar {
    width: 6px;
}

#user-loc-div #user-locs-body::-webkit-scrollbar-track,
#notification_list > .dropdown-menu [data-simplebar]::-webkit-scrollbar-track,
#dropdown-menu-setting::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#user-loc-div #user-locs-body::-webkit-scrollbar-thumb,
#notification_list > .dropdown-menu [data-simplebar]::-webkit-scrollbar-thumb,
#dropdown-menu-setting::-webkit-scrollbar-thumb {
    background: #b7c2c6;
    border-radius: 4px;
}

#user-loc-div #user-locs-body::-webkit-scrollbar-thumb:hover,
#notification_list > .dropdown-menu [data-simplebar]::-webkit-scrollbar-thumb:hover,
#dropdown-menu-setting::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

#dropdown-menu-setting {
    border-radius: 4px !important;
}

#dropdown-menu-setting .profile-img-size {
    width: 28px !important;
    height: 28px !important;
}

#dropdown-menu-setting .dropdown-item {
    padding: 12px 10px !important;
    border-radius: 4px !important;
}

#dropdown-menu-setting .dropdown-item:hover {
    background: rgba(20, 108, 148, 0.2) !important;
}

/* Calendar dropdown list items - same 20% primary hover language */
#notification_list > .dropdown-menu .bg-day {
    background: rgba(20, 108, 148, 0.08) !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
}

#notification_list > .dropdown-menu .bg-day p {
    font-size: 14px !important;
}

/* ---- Calendar dropdown: full UI/UX pass, matching the location/profile
   dropdowns (14px min text, 4px radius, 20%-primary accents, subtle
   primary-tinted dividers instead of default grey) ---- */
#notification_list > .dropdown-menu .font-16 {
    font-size: 15px !important;
    font-weight: 600;
    color: var(--color-primary);
}

#notification_list > .dropdown-menu h6 ~ p,
#notification_list > .dropdown-menu p {
    font-size: 14px !important;
}

#notification_list > .dropdown-menu .border-bottom,
#notification_list > .dropdown-menu .border-top {
    border-color: rgba(20, 108, 148, 0.15) !important;
}

#notification_list > .dropdown-menu .add-new-calander > a {
    width: 26px !important;
    height: 26px !important;
}

/* Simplebar draws its own thumb (not a native ::-webkit-scrollbar) -
   recolor it to match the shared primary-accent scrollbar language. */
#notification_list > .dropdown-menu .simplebar-scrollbar:before {
    background: var(--color-primary) !important;
    opacity: 0.35;
    border-radius: 4px !important;
}

#notification_list > .dropdown-menu .simplebar-scrollbar.simplebar-hover:before,
#notification_list > .dropdown-menu .simplebar-scrollbar:hover:before {
    opacity: 0.6;
}

.ico-scale-up {
    scale: 1.2 !important;
    color: var(--color-text-black) !important;
}

#dropdown-logout {
    border-radius: 10px !important;
}

.icons-nav-btn.show {
    background: var(--color-primary) !important;
}

.svg-ico-t>i {
    color: var(--color-text-black) !important;
}

.icons-nav-btn.show>.svg-ico-t>i {
    color: var(--color-text-white) !important;
}

.icons-nav-btn-l.show,
.icons-nav-btn-ls.show,
.icons-nav-btn-l:active,
.icons-nav-btn-ls:active,
.icons-nav-btn-l:focus,
.icons-nav-btn-ls:focus {
    background: var(--color-primary) !important;
    border: none !important;
    border-radius: 4px !important;
    outline: none !important;
    box-shadow: none !important;
}

.icons-nav-btn-l.show>div>p,
.icons-nav-btn-ls.show>div>p {
    color: var(--color-text-gray-lighter) !important;
}

.icons-nav-btn-l.show>div>p:first-child {
    color: var(--color-text-white) !important;
}

.icons-nav-btn-l.show>.svg-ico-t>i {
    color: var(--color-text-white) !important;
}

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

.set-size-height-unlist {
    height: 62px !important;
}

.logo-box {
    width: 62px !important;
    min-width: 62px !important;
    height: 62px !important;
}

.wlcomd-text {
    min-width: 150px !important;
}

@media (max-width: 993px) {
    .wlcomd-text {
        display: none !important;
    }
}

.nav-ico-size::after {
    content: "";
    position: relative;
    width: 18px;
    height: 18px;
    display: inline-block;
    background-color: var(--color-text-icon-gray);
    /* default icon color */
    transition: background-color 0.3s ease-in-out;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

/* top:50% + translateY(-50%) centers these regardless of #top-search's
   height, instead of the old hardcoded pixel offsets tuned for one height. */
.search-button,
.clear-button {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 18px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* an explicit box matching the 18px icon guarantees the translateY(-50%)
       above centers the icon exactly, instead of the label's own inherited
       line-height (which is taller than the icon) throwing it off-center */
}

/* display:flex !important above always beats an inline style="display:none"
   or a JS-set el.style.display, so hiding/showing the clear icon has to go
   through this class instead of inline styles. */
.clear-button.d-none-force {
    display: none !important;
}

/* Search icon on the LEFT side of the box (standard search-bar convention) */
.search-button {
    left: 14px !important;
}

/* Clear icon stays on the right, just left of the Ctrl+K hint */
.clear-button {
    right: 66px !important;
    /* sits before (to the left of) the Ctrl+K badge, no overlap */
}

/* Ctrl+K hint badge - sits at the very right end of the search box, hides
   once the box has focus or text in it (standard "command palette" UX). */
.search-kbd-hint {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--color-text-gray-medium);
    background: transparent;
    border: 1px solid var(--color-border-dashed);
    border-radius: 4px;
    padding: 2px 6px;
    pointer-events: none;
    line-height: 1.4;
}

#top-search:focus ~ .search-kbd-hint,
#top-search:not(:placeholder-shown) ~ .search-kbd-hint {
    display: none;
}

.search-button {
    cursor: pointer;
}

.search-button::after {
    background-color: var(--color-text-gray-medium);
    -webkit-mask-image: url("./../../images/icons/search-01-stroke-rounded.svg");
    mask-image: url("./../../images/icons/search-01-stroke-rounded.svg");
}

/* Search icon picks up the brand teal while the input is focused */
#top-search:focus ~ .search-button::after {
    background-color: var(--color-primary) !important;
}

.clear-button::after {
    cursor: pointer !important;
    background-color: var(--color-text-gray-medium);
    -webkit-mask-image: url("./../../images/icons/cancel-01-stroke-rounded.svg");
    mask-image: url("./../../images/icons/cancel-01-stroke-rounded.svg");
}

.clear-button:hover::after {
    background-color: var(--color-danger) !important;
}

#top-search {
    padding-left: 40px !important;
    /* room for the search icon on the left */
    padding-right: 72px !important;
    /* room for the clear icon + Ctrl+K badge on the right */
}

#top-search:focus {
    padding-right: 36px !important;
    /* the Ctrl+K badge hides on focus, so the input can reclaim that space */
}

.location-button::after {
    transform: translate(0px, 4px) !important;
    -webkit-mask-image: url("./../../images/icons/navbar/location-05-stroke-rounded.svg");
    mask-image: url("./../../images/icons/navbar/location-05-stroke-rounded.svg");
}

#userloc-sec>.show>.location-button::after {
    background-color: var(--color-text-white) !important;
}

.folder-button::after {
    transform: translate(0px, 4px) !important;
    cursor: pointer !important;
    -webkit-mask-image: url("./../../images/icons/navbar/folders-stroke-rounded.svg");
    mask-image: url("./../../images/icons/navbar/folders-stroke-rounded.svg");
}

.calendar-button::after {
    transform: translate(0px, 2px) !important;
    cursor: pointer !important;
    -webkit-mask-image: url("./../../images/icons/navbar/calendar-01-stroke-rounded.svg");
    mask-image: url("./../../images/icons/navbar/calendar-01-stroke-rounded.svg");
}

.logout-button::after {
    transform: translate(0px, 4px) !important;
    cursor: pointer !important;
    -webkit-mask-image: url("./../../images/icons/sidebar/sidebarprofile/logout-circle-02-stroke-rounded.svg");
    mask-image: url("./../../images/icons/sidebar/sidebarprofile/logout-circle-02-stroke-rounded.svg");
}

.setting-button::after {
    transform: translate(0px, 4px) !important;
    cursor: pointer !important;
    -webkit-mask-image: url("./../../images/icons/navbar/settings-03-stroke-rounded.svg");
    mask-image: url("./../../images/icons/navbar/settings-03-stroke-rounded.svg");
}

#notification_list>.show>.calendar-button::after {
    background-color: var(--color-text-white) !important;
}

.dropdown-toggle.show>label::after {
    background-color: var(--color-text-white) !important;
}

.folder-button,
.logout-button,
.calendar-button {
    cursor: pointer !important;
}

.icons-nav-btn.show>.logout-button::after {
    background-color: var(--color-text-white) !important;
}

#dropdown-logout {
    padding: 0px !important;
}

#dropdown-logout>form>a {
    height: 38px !important;
}

#user-loc-div {
    border: none !important;
}

/* When simplebar-content has NO data */
/* Empty search state */
#serchbody .simplebar-content:not(:has(.search-item)) {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    /* vertical layout: text on top, icon below */
    gap: 6px;
    /* space between text and icon */
    min-height: 160px;
    font-size: 14px;
    color: var(--color-text-gray-light);
}

/* Text on top */
#serchbody .simplebar-content:not(:has(.search-item))::after {
    content: "Search";
}

/* Icon below text */
#serchbody .simplebar-content:not(:has(.search-item))::before {
    content: "";
    width: 24px;
    /* adjust size as needed */
    height: 24px;
    display: block;
    background-color: var(--color-text-gray-light);
    -webkit-mask-image: url("./../../images/icons/search-01-stroke-rounded.svg");
    mask-image: url("./../../images/icons/search-01-stroke-rounded.svg");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

#btn-reodr {
    color: var(--color-text-black) !important;
}

#btn-reodr:focus,
#btn-reodr:focus-visible {
    background-color: var(--color-success) !important;
    color: var(--color-text-white) !important;
    box-shadow: none !important;
}

#mredtilsbtn {
    color: var(--color-text-black) !important;
}

#mredtilsbtn:focus,
#mredtilsbtn:focus-visible {
    background-color: var(--color-primary) !important;
    color: var(--color-text-white) !important;
    box-shadow: none !important;
}

.profile-img-icon::after {
    content: "";
    width: 20px;
    /* adjust size as needed */
    height: 20px;
    display: block;
    background-color: var(--color-text-gray-light);
    -webkit-mask-image: url("./../../images/icons/navbar/user-02-stroke-rounded.svg");
    mask-image: url("./../../images/icons/navbar/user-02-stroke-rounded.svg");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

#dropdown-menu-setting {
    transform: translateY(10px) !important;
    padding: 0 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}

#dropdown-menu-setting>a,
#dropdown-menu-setting>form>a {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.profile-img-size {
    width: 30px !important;
    height: 30px !important;
}



.brand-name {
    background: linear-gradient(90deg,
            #19A7CE,
            #146C94,
            #034b6d,
            #19A7CE);
    background-size: 300% 300%;
    animation: gradientMove 4s ease-in-out infinite;

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animation */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.topnav-menu>li>a {
    border: none !important;
}

/* Topbar dropdowns (location / messages / profile): open flush below the bar,
   no shadow, #f5f3f4 border. data-bs-display="static" stops Popper from
   positioning them, so they anchor to the .dropdown wrapper instead. */
.navbar-custom .dropdown-menu.nav-dd {
    top: calc(100% + 10px) !important;
    right: 0;
    left: auto;
    margin: 0 !important;
    transform: none !important;
    border: 1px solid #f5f3f4 !important;
    border-top: none !important;
    border-radius: 0 0 4px 4px !important;
    box-shadow: none !important;
}

/* Right-side navbar items: breathing room on the right edge, and the profile
   avatar pulled 10px further in from it. */
.navbar-custom .nav-right {
    padding-right: 10px;
}

.navbar-custom .nav-profile {
    margin-right: 15px;
}

/* The 30px avatar is shorter than the 42px icon buttons, so its menu needs a
   bigger offset to start at the same line (bottom of the navbar) as theirs. */
.navbar-custom .nav-profile .dropdown-menu.nav-dd {
    top: calc(100% + 16px) !important;
}

/* Location button is shorter than the 62px bar, so stretch its wrapper to the
   full bar height - its menu then starts exactly at the bottom of the navbar. */
.navbar-custom .nav-right {
    align-self: stretch;
}

.navbar-custom .nav-loc {
    align-self: stretch;
    display: flex;
    align-items: center;
}

.navbar-custom .nav-loc .dropdown-menu.nav-dd {
    top: calc(100% + 1px) !important;
}

/* All navbar dropdowns share the location menu's width and row styling. */
.navbar-custom .dropdown-menu.nav-dd {
    min-width: 310px !important;
}

.navbar-custom .dropdown-menu.nav-dd .dropdown-header {
    font-weight: 600;
    color: var(--color-text-black, #344054);
}

.navbar-custom .dropdown-menu.nav-dd .dropdown-item {
    white-space: normal;
}

/* Scrollable list area inside the navbar dropdowns - same thin custom
   scrollbar as the rest of the navbar panels. */
.nav-dd-scroll {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #b7c2c6 #f1f1f1;
}

.nav-dd-scroll::-webkit-scrollbar {
    width: 6px;
}

.nav-dd-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.nav-dd-scroll::-webkit-scrollbar-thumb {
    background: #b7c2c6;
    border-radius: 4px;
}

.nav-dd-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Navbar icon button while its dropdown is open: primary fill, white icon.
   Overrides the grey icon colour and the inline transparent background. */
.navbar-custom .icons-nav-btn.show,
.navbar-custom .icons-nav-btn[aria-expanded="true"] {
    background: var(--color-primary) !important;
    color: #ffffff !important;
}

/* Settings menu is 80px narrower than the other navbar dropdowns (310 -> 230). */
.navbar-custom .dropdown-menu.nav-dd#nav-settings-menu,
.navbar-custom .dropdown-menu.nav-dd#nav-profile-menu {
    min-width: 230px !important;
}

/* Link buttons inside the settings dropdown: icon + text aligned to the start. */
#nav-settings-menu .btn {
    justify-content: flex-start !important;
    text-align: left !important;
}

/* Settings menu: 10px inner padding; buttons fill the remaining width. */
#nav-settings-menu {
    padding: 10px !important;
    box-sizing: border-box;
}

#nav-settings-menu .btn {
    width: 100%;
}

/* Settings buttons: white by default, tinted on hover, tight stack separated
   by a hairline. Other dropdown rows get the same hover tint. */
#nav-settings-menu .btn {
    background-color: #ffffff !important;
    border: none !important;
    border-bottom: 1px solid #efefef !important;
    border-radius: 0 !important;
    color: var(--color-text-black, #344054) !important;
}

#nav-settings-menu .btn:last-child {
    border-bottom: none !important;
}

#nav-settings-menu .btn:hover,
.navbar-custom .dropdown-menu.nav-dd .dropdown-item:hover {
    background-color: #e8f1f6 !important;
    color: var(--color-primary) !important;
}

/* Profile menu uses the same button-list style as the settings menu. */
#nav-profile-menu {
    padding: 10px !important;
    box-sizing: border-box;
}

#nav-profile-menu .btn,
#nav-profile-menu form {
    width: 100%;
}

#nav-profile-menu .btn {
    justify-content: flex-start !important;
    text-align: left !important;
    background-color: #ffffff !important;
    border: none !important;
    border-bottom: 1px solid #efefef !important;
    border-radius: 0 !important;
    color: var(--color-text-black, #344054) !important;
}

#nav-profile-menu form .btn {
    border-bottom: none !important;
}

#nav-profile-menu .btn:hover {
    background-color: #e8f1f6 !important;
    color: var(--color-primary) !important;
}

/* Logout: red text/icon, light red tint on hover. */
#nav-profile-menu form .btn,
#nav-profile-menu form .btn:hover {
    color: var(--color-danger, #dc3545) !important;
}

#nav-profile-menu form .btn:hover {
    background-color: #fdecee !important;
}

/* Settings + profile dropdown inner padding: 6px. */
#nav-settings-menu,
#nav-profile-menu {
    padding: 6px !important;
}

/* Location list: hairline between rows (none after the last). */
.nav-dd-scroll > .dropdown-item {
    border-bottom: 1px solid #efefef;
}

.nav-dd-scroll > .dropdown-item:last-child {
    border-bottom: none;
}

/* Currently selected location: grey row, black name, grey SBU text. */
.nav-dd-scroll > .dropdown-item.nav-loc-current,
.nav-dd-scroll > .dropdown-item.nav-loc-current:hover {
    background-color: #f2f4f7 !important;
    color: #000000 !important;
}

.nav-dd-scroll > .dropdown-item.nav-loc-current .form-text {
    color: #98a2b3 !important;
}

/* ---- Rich search dropdown (follows docs/design_home_v1.html) ---- */
.nav-sd-kbd {
    position: absolute;
    right: 10px;
    display: inline-flex;
    gap: 3px;
    pointer-events: none;
}

.nav-sd-kbd kbd,
.nav-sd-shortcuts kbd {
    font-family: inherit;
    font-size: 11px;
    background: #ffffff;
    border: 1px solid #e2e6e8;
    border-radius: 3px;
    padding: 1px 5px;
    color: #445054;
}

.nav-sd {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 420px;
    max-height: 70vh;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #efefef;
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 8px 0;
    box-shadow: none;
    display: none;
    z-index: 1050;
    scrollbar-width: thin;
    scrollbar-color: #b7c2c6 #f1f1f1;
}

.nav-sd.open {
    display: block;
}

.nav-sd-section {
    padding: 6px 0;
    border-top: 1px solid #efefef;
}

.nav-sd-section:first-child {
    border-top: none;
    padding-top: 0;
}

.nav-sd-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #a3adb0;
    padding: 6px 16px 4px;
}

.nav-sd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    margin: 2px 8px;
    font-size: 14px;
    color: #445054;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #efefef;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.nav-sd-item:hover,
.nav-sd-item.selected {
    background: #e8f1f6;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.nav-sd-item i {
    flex-shrink: 0;
    color: var(--color-primary);
}

.nav-sd-title {
    flex: 1;
    font-weight: 500;
}

.nav-sd-cat {
    font-size: 11px;
    color: #a3adb0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-sd-empty {
    display: none;
    padding: 18px 16px;
    text-align: center;
    font-size: 13px;
    color: #98a2b3;
}

.nav-sd-footer {
    padding: 10px 16px 2px;
    font-size: 12px;
    color: #a3adb0;
    border-top: 1px solid #efefef;
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-sd-shortcuts {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-sd-shortcuts span {
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 992px) {
    .nav-sd {
        width: min(420px, 92vw);
    }

    .nav-sd-kbd {
        display: none;
    }
}

/* Vertical divider around the location button (search | location | messages). */
.navbar-custom .nav-divider {
    width: 1px;
    height: 24px;
    margin: 0 8px;
    background-color: #e5e7eb;
    flex-shrink: 0;
    align-self: center;
}

/* Item search results: expandable detail panel under a result row. */
.nav-sd-detail {
    margin: 0 8px 4px;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #efefef;
    border-radius: 6px;
    font-size: 12px;
    color: #667085;
}

.nav-sd-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
}

.nav-sd-detail-row span:last-child {
    color: #344054;
    text-align: right;
}

.nav-sd-detail-more {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #efefef;
    color: #344054;
}

.nav-sd-detail-more > span {
    display: block;
    color: #667085;
    margin-bottom: 2px;
}

/* Settings / Learn sections: titled sections whose items are horizontal cards. */
.nav-sd-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 8px;
}

.nav-sd-cards .nav-sd-label {
    flex: 0 0 100%;
    padding: 6px 8px 0;
}

.nav-sd-cards .nav-sd-item {
    flex: 1 1 0;
    min-width: 110px;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px;
}

.nav-sd-cards .nav-sd-item i {
    font-size: 18px;
}

.nav-sd-cards .nav-sd-title {
    flex: none;
}

/* Search dropdown: scrollable body between a fixed footer, with side padding
   and hairlines between rows. */
.nav-sd {
    overflow: hidden;
    padding: 8px 0 0;
}

.nav-sd.open {
    display: flex;
    flex-direction: column;
}

.nav-sd-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(70vh - 56px);
    overflow-y: auto;
    padding: 0 14px;
    scrollbar-width: thin;
    scrollbar-color: #b7c2c6 #f1f1f1;
}

.nav-sd-body::-webkit-scrollbar {
    width: 6px;
}

.nav-sd-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.nav-sd-body::-webkit-scrollbar-thumb {
    background: #b7c2c6;
    border-radius: 4px;
}

.nav-sd-body::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

.nav-sd-footer {
    flex: 0 0 auto;
    padding: 10px 14px;
    margin-top: 0;
}

/* List rows: flat with a line underneath instead of boxed. */
.nav-sd-section:not(.nav-sd-cards) .nav-sd-item {
    margin: 0;
    border: none;
    border-bottom: 1px solid #efefef;
    border-radius: 0;
}

.nav-sd-section:not(.nav-sd-cards) .nav-sd-item:last-child {
    border-bottom: none;
}

.nav-sd-section:not(.nav-sd-cards) .nav-sd-item:hover,
.nav-sd-section:not(.nav-sd-cards) .nav-sd-item.selected {
    border-bottom-color: #efefef;
}

.nav-sd-detail {
    margin: 4px 0;
}

.nav-sd-label {
    padding-left: 0;
    padding-right: 0;
}

.nav-sd-cards {
    padding-left: 0;
    padding-right: 0;
}

.nav-sd-cards .nav-sd-label {
    padding-left: 0;
}

/* Search dropdown cards: 4px radius. */
.nav-sd-cards .nav-sd-item,
.nav-sd-detail {
    border-radius: 4px;
}

/* ======================= Responsive navbar ======================= */

/* Hidden on desktop. */
.nav-toggle,
.nav-search-toggle,
.nav-backdrop {
    display: none;
}

.nav-toggle {
    width: 42px;
    height: 42px;
    margin-left: 8px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #667085;
}

.nav-toggle:hover,
body.nav-sidebar-open .nav-toggle {
    background: var(--color-primary);
    color: #ffffff;
}

/* ---- Tablet (<= 991px): sidebar becomes an off-canvas drawer ---- */
@media (max-width: 991.98px) {
    .nav-toggle {
        display: inline-flex;
    }

    .navbar-custom .nav-divider {
        margin: 0 4px;
    }

    .input-search,
    .input-search:focus {
        min-width: 200px !important;
        width: 220px !important;
    }

    .nav-sd-kbd {
        display: none;
    }

    .left-side-menu {
        display: block !important;
    }

    .left-side-menu .container-s {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 1040;
        background: #ffffff;
    }

    body.nav-sidebar-open .left-side-menu .container-s {
        transform: translateX(0);
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        top: 62px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(16, 24, 40, 0.35);
        z-index: 1030;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease;
    }

    body.nav-sidebar-open .nav-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .content-page {
        margin-left: 0 !important;
    }
}

/* ---- Mobile (<= 767px): compact bar, search collapses to an icon ---- */
@media (max-width: 767.98px) {
    .navbar-custom .nav-right {
        gap: 0 !important;
        padding-right: 4px;
    }

    .navbar-custom .nav-divider {
        display: none;
    }

    .navbar-custom .nav-profile {
        margin-right: 4px;
    }

    .nav-loc button {
        max-width: 96px !important;
        padding: 0 4px !important;
    }

    .nav-loc button p:last-child {
        display: none;
    }

    .nav-search-toggle {
        display: flex;
    }

    .nav-search {
        display: none !important;
    }

    .navbar-custom.nav-search-open .nav-search {
        display: flex !important;
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        height: 62px;
        padding: 0 12px;
        background: #ffffff;
        border-bottom: 1px solid #efefef;
        z-index: 1100;
        align-items: center;
    }

    .navbar-custom.nav-search-open .nav-search .input-search {
        width: 100% !important;
        min-width: 0 !important;
    }

    .navbar-custom.nav-search-open .nav-sd {
        left: 12px;
        right: 12px;
        width: auto;
    }

    /* Dropdown menus: even gap from both screen edges. */
    .navbar-custom .dropdown-menu.nav-dd {
        position: fixed !important;
        top: 62px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        min-width: 0 !important;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .nav-sd-cards .nav-sd-item {
        min-width: 90px;
    }
}

/* Location button: icon-only on mobile. */
@media (max-width: 767.98px) {
    .nav-loc button {
        width: 42px;
        height: 42px;
        max-width: 42px !important;
        justify-content: center;
        padding: 0 !important;
        border-radius: 4px;
    }

    .nav-loc button .text-start,
    .nav-loc button .loc-chevron {
        display: none !important;
    }

    .nav-loc button.show {
        background: var(--color-primary) !important;
    }

    .nav-loc button.show .nav-loc-icon {
        color: #ffffff !important;
    }

    /* Dropdowns span the full navbar width, directly under the bar. */
    .navbar-custom .dropdown-menu.nav-dd {
        left: 0 !important;
        right: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-radius: 0 !important;
    }

    .navbar-custom.nav-search-open .nav-sd {
        left: 0;
        right: 0;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
}

/* Mobile fix: the location / profile menus had their own `top: calc(100% + Npx)`
   offsets (written for absolute positioning under the button). Once the menus are
   position:fixed, 100% means the whole viewport height and pushes them off-screen,
   so they never appeared. Pin every menu directly under the 62px bar instead. */
@media (max-width: 767.98px) {
    .navbar-custom .dropdown-menu.nav-dd,
    .navbar-custom .nav-loc .dropdown-menu.nav-dd,
    .navbar-custom .nav-profile .dropdown-menu.nav-dd {
        top: 62px !important;
        left: 0 !important;
        right: 0 !important;
    }

    .navbar-custom .dropdown-menu.nav-dd#nav-settings-menu,
    .navbar-custom .dropdown-menu.nav-dd#nav-profile-menu {
        min-width: 0 !important;
    }
}

/* Mobile: even 6px gap between navbar items; buttons trimmed to 36px so the
   whole row (menu toggle, logo, search, location, messages, notifications,
   settings, profile) still fits a 375px screen. */
@media (max-width: 767.98px) {
    .navbar-custom .nav-right {
        gap: 6px !important;
        padding-right: 8px;
    }

    .navbar-custom .nav-right .icons-nav-btn,
    .navbar-custom .nav-loc button {
        width: 36px !important;
        height: 36px !important;
        max-width: 36px !important;
    }

    .navbar-custom .nav-toggle {
        width: 36px;
        height: 36px;
        margin-left: 6px;
    }

    .navbar-custom .nav-profile {
        margin-right: 0;
    }
}

/* Mobile search: tapping the icon drops a search bar directly BELOW the navbar
   (the navbar stays visible) and the rich search menu opens right under it. */
@media (max-width: 767.98px) {
    .navbar-custom.nav-search-open .nav-search {
        top: 62px;
        height: 56px;
        border-top: none;
        border-bottom: 1px solid #efefef;
        z-index: 1000;
    }

    .navbar-custom.nav-search-open .nav-search .nav-sd {
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        max-height: calc(100vh - 62px - 56px - 8px);
        border-top: 1px solid #efefef;
    }

    .navbar-custom.nav-search-open .nav-search .nav-sd-body {
        max-height: calc(100vh - 62px - 56px - 64px);
    }
}

/* Drawer clicks: .left-side-menu is its own stacking context (position:fixed
   from the base theme, low z-index), so the 1040 on .container-s never competed
   with the backdrop (1030) - the backdrop sat on top and swallowed every tap.
   Lift the whole sidebar wrapper above the backdrop on tablet/mobile. */
@media (max-width: 991.98px) {
    .left-side-menu {
        z-index: 1040 !important;
        pointer-events: none;
    }

    .left-side-menu .container-s {
        pointer-events: auto;
    }
}

/* Mobile: 6px more breathing room at the left and right edges of the navbar. */
@media (max-width: 767.98px) {
    .navbar-custom .nav-right {
        padding-right: 14px;
    }

    .navbar-custom .nav-toggle {
        margin-left: 12px;
    }
}

/* Menu toggle: hamburger <-> cut (X) icon, cross-fading with a quarter turn. */
.nav-toggle {
    position: relative;
}

.nav-toggle i {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-toggle .nav-toggle-open {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.nav-toggle .nav-toggle-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

body.nav-sidebar-open .nav-toggle .nav-toggle-open {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

body.nav-sidebar-open .nav-toggle .nav-toggle-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.nav-toggle i::after {
    margin-left: 0 !important;
    transform: none !important;
}

/* Tablet widths too: every navbar dropdown (incl. settings and profile) is pinned
   under the bar and spans the full width, not just on phones. */
@media (max-width: 991.98px) {
    .navbar-custom .dropdown-menu.nav-dd,
    .navbar-custom .nav-loc .dropdown-menu.nav-dd,
    .navbar-custom .nav-profile .dropdown-menu.nav-dd,
    .navbar-custom .dropdown-menu.nav-dd#nav-settings-menu,
    .navbar-custom .dropdown-menu.nav-dd#nav-profile-menu {
        position: fixed !important;
        top: 62px !important;
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
        min-width: 0 !important;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        border-left: none !important;
        border-right: none !important;
        border-radius: 0 !important;
    }
}

/* Open animation for every navbar dropdown + the search menu: slides down from
   the top edge while fading in. Uses the `translate` property because these menus
   already pin `transform: none !important`, which would block a transform animation. */
@keyframes nav-dd-open {
    from {
        opacity: 0;
        translate: 0 -10px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

.navbar-custom .dropdown-menu.nav-dd.show,
.nav-sd.open {
    animation: nav-dd-open 0.22s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .navbar-custom .dropdown-menu.nav-dd.show,
    .nav-sd.open {
        animation: none;
    }
}

/* Settings + profile menus keep their desktop width (230px) on tablet/mobile
   instead of stretching edge to edge: pinned under the bar, right-aligned. */
@media (max-width: 991.98px) {
    .navbar-custom .dropdown-menu.nav-dd#nav-settings-menu,
    .navbar-custom .dropdown-menu.nav-dd#nav-profile-menu {
        left: auto !important;
        right: 8px !important;
        width: 230px !important;
        min-width: 230px !important;
        max-width: calc(100vw - 16px) !important;
        border: 1px solid #efefef !important;
        border-top: none !important;
        border-radius: 0 0 4px 4px !important;
    }
}

/* Location button hover: light blue tint with a primary-coloured icon. */
.nav-loc button .nav-loc-icon {
    transition: color 0.2s ease;
}

.nav-loc button:hover {
    background-color: #e8f1f6 !important;
    border-radius: 4px;
}

.nav-loc button:hover .nav-loc-icon {
    color: var(--color-primary) !important;
}

/* Keep the open (pressed) state solid primary with a white icon on mobile. */
.nav-loc button.show,
.nav-loc button.show:hover {
    background-color: var(--color-primary) !important;
}

.nav-loc button.show .nav-loc-icon,
.nav-loc button.show:hover .nav-loc-icon {
    color: #ffffff !important;
}

/* Settings + profile menu buttons: grey text/icon by default, black when
   hovered / pressed / focused. Logout keeps its red. */
#nav-settings-menu .btn,
#nav-profile-menu .btn {
    color: #667085 !important;
}

#nav-settings-menu .btn:hover,
#nav-settings-menu .btn:active,
#nav-settings-menu .btn:focus,
#nav-profile-menu .btn:hover,
#nav-profile-menu .btn:active,
#nav-profile-menu .btn:focus {
    color: #000000 !important;
}

#nav-profile-menu form .btn,
#nav-profile-menu form .btn:hover,
#nav-profile-menu form .btn:active,
#nav-profile-menu form .btn:focus {
    color: var(--color-danger, #dc3545) !important;
}

/* Search collapses to the icon button on tablet widths too (<= 991px), where the
   input no longer fits comfortably next to the other navbar items. */
@media (max-width: 991.98px) {
    .nav-search-toggle {
        display: flex;
    }

    .nav-search {
        display: none !important;
    }

    .navbar-custom.nav-search-open .nav-search {
        display: flex !important;
        position: fixed !important;
        top: 62px;
        left: 0;
        right: 0;
        height: 56px;
        padding: 0 12px;
        background: #ffffff;
        border-bottom: 1px solid #efefef;
        z-index: 1000;
        align-items: center;
    }

    .navbar-custom.nav-search-open .nav-search .input-search {
        width: 100% !important;
        min-width: 0 !important;
    }

    .navbar-custom.nav-search-open .nav-search .nav-sd {
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        max-height: calc(100vh - 62px - 56px - 8px);
        border-top: 1px solid #efefef;
    }

    .navbar-custom.nav-search-open .nav-search .nav-sd-body {
        max-height: calc(100vh - 62px - 56px - 64px);
    }
}

/* Location: shown as text in the navbar on mobile too (no icon). Shows the SBU
   name (truncated) with the chevron; the branch line is dropped to save space. */
@media (max-width: 767.98px) {
    .navbar-custom .nav-right .nav-loc button {
        width: auto !important;
        height: 36px !important;
        max-width: 110px !important;
        padding: 0 6px !important;
        justify-content: flex-start;
    }

    .navbar-custom .nav-right .nav-loc button .text-start {
        display: block !important;
        min-width: 0;
    }

    .navbar-custom .nav-right .nav-loc button .loc-chevron {
        display: inline-block !important;
    }
}

/* The search icon button and the search input must never show together.
   `.icons-nav-btn` forces `display: flex !important`, which kept the icon button
   visible on desktop beside the input - so hide it with !important too, and only
   reveal it (while the input is hidden) at 991px and below. */
.navbar-custom .nav-search-toggle {
    display: none !important;
}

@media (max-width: 991.98px) {
    .navbar-custom .nav-search-toggle {
        display: flex !important;
    }
}

/* Location: text (no icon) on desktop, icon-only on tablet/mobile. */
.nav-loc .nav-loc-icon {
    display: none !important;
}

@media (max-width: 767.98px) {
    .navbar-custom .nav-right .nav-loc button {
        width: 36px !important;
        height: 36px !important;
        max-width: 36px !important;
        padding: 0 !important;
        justify-content: center;
    }

    .navbar-custom .nav-right .nav-loc button .nav-loc-icon {
        display: inline-block !important;
    }

    .navbar-custom .nav-right .nav-loc button .text-start,
    .navbar-custom .nav-right .nav-loc button .loc-chevron {
        display: none !important;
    }
}

/* Desktop (text) location button: no coloured fill when clicked / open.
   The solid primary open state stays only on mobile, where it is icon-only. */
@media (min-width: 768px) {
    .nav-loc button.show,
    .nav-loc button:focus,
    .nav-loc button:active {
        background-color: transparent !important;
        outline: none;
        box-shadow: none;
    }

    .nav-loc button.show:hover {
        background-color: #e8f1f6 !important;
    }
}

/* Last row of the search menu: horizontal icon buttons that visit pages. */
.nav-sd-icon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 6px;
}

.nav-sd-icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #efefef;
    border-radius: 4px;
    background: #ffffff;
    color: #667085;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-sd-icon-btn i::after {
    margin-left: 0 !important;
    transform: none !important;
}

.nav-sd-icon-btn:hover,
.nav-sd-icon-btn:focus {
    background: #e8f1f6;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* The folder button is hidden on small phones so the navbar row still fits. */
@media (max-width: 575.98px) {
    .navbar-custom .nav-folder {
        display: none;
    }
}

/* Notification bell: count badge + ring animation while there are notifications. */
#nav-notification-btn {
    position: relative;
}

.nav-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #e5484d;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    border: 1.5px solid #ffffff;
    box-sizing: content-box;
    pointer-events: none;
}

.nav-badge[hidden] {
    display: none;
}

@keyframes nav-bell-ring {
    0%, 55%, 100% { transform: rotate(0); }
    8%   { transform: rotate(14deg); }
    16%  { transform: rotate(-12deg); }
    24%  { transform: rotate(9deg); }
    32%  { transform: rotate(-7deg); }
    40%  { transform: rotate(4deg); }
    48%  { transform: rotate(-2deg); }
}

@keyframes nav-badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

#nav-notification-btn.has-notifications > svg {
    transform-origin: 50% 8%;
    animation: nav-bell-ring 3s ease-in-out infinite;
}

#nav-notification-btn.has-notifications .nav-badge {
    animation: nav-badge-pulse 1.6s ease-in-out infinite;
}

#nav-notification-btn.show > svg,
#nav-notification-btn.show .nav-badge {
    animation: none;
}

#nav-notification-btn.show .nav-badge {
    border-color: var(--color-primary);
}

@media (prefers-reduced-motion: reduce) {
    #nav-notification-btn.has-notifications > svg,
    #nav-notification-btn.has-notifications .nav-badge {
        animation: none;
    }
}
