/* ── Premium sidebar (admin + seller) ───────────────────────── */
:root {
    --sb-width: 16.25rem;
    --sb-width-collapsed: 4.75rem;
    --sb-accent: #f76707;
    --sb-accent-soft: #ff922b;
    --sb-radius: 0.85rem;
    --sb-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-premium {
    --sb-bg: #0f172a;
    --sb-bg-elevated: color-mix(in srgb, #1e293b 88%, #0f172a);
    --sb-border: color-mix(in srgb, #ffffff 8%, transparent);
    --sb-text: color-mix(in srgb, #ffffff 72%, transparent);
    --sb-text-strong: #f8fafc;
    --sb-muted: color-mix(in srgb, #ffffff 42%, transparent);
    --sb-hover: color-mix(in srgb, #ffffff 7%, transparent);
    --sb-active: color-mix(in srgb, var(--sb-accent) 22%, transparent);
    --sb-shadow: 8px 0 32px rgba(2, 6, 23, 0.28);
    border-right: 1px solid var(--sb-border) !important;
    background:
        radial-gradient(120% 60% at 0% 0%, color-mix(in srgb, var(--sb-accent) 18%, transparent), transparent 55%),
        linear-gradient(180deg, var(--sb-bg-elevated), var(--sb-bg)) !important;
    box-shadow: var(--sb-shadow);
    color: var(--sb-text);
    z-index: 1030;
    overflow: visible !important;
}

html:not([data-bs-theme="dark"]) .sidebar-premium {
    --sb-bg: #ffffff;
    --sb-bg-elevated: #fffaf6;
    --sb-border: color-mix(in srgb, var(--sb-accent) 12%, #e2e8f0);
    --sb-text: #475569;
    --sb-text-strong: #0f172a;
    --sb-muted: #94a3b8;
    --sb-hover: color-mix(in srgb, var(--sb-accent) 8%, #f8fafc);
    --sb-active: color-mix(in srgb, var(--sb-accent) 14%, transparent);
    --sb-shadow: 8px 0 28px rgba(15, 23, 42, 0.06);
    background:
        radial-gradient(120% 55% at 0% 0%, color-mix(in srgb, var(--sb-accent) 10%, transparent), transparent 50%),
        linear-gradient(180deg, #ffffff, #fff8f3) !important;
}

/* Keep the logo free of a background plate in every theme */
.sidebar-premium .sidebar-brand-link {
    background: transparent !important;
    padding: 0.45rem 0.7rem;
}

body.sidebar-collapsed .sidebar-premium .sidebar-brand-link {
    padding: 0.25rem;
}

[data-bs-theme="dark"] .sidebar-premium {
    --sb-bg: #0b1220;
    --sb-bg-elevated: #121a2b;
    --sb-border: color-mix(in srgb, #ffffff 9%, transparent);
    --sb-text: color-mix(in srgb, #ffffff 70%, transparent);
    --sb-text-strong: #f1f5f9;
    --sb-muted: color-mix(in srgb, #ffffff 40%, transparent);
    --sb-hover: color-mix(in srgb, #ffffff 8%, transparent);
    --sb-active: color-mix(in srgb, var(--sb-accent) 26%, transparent);
    --sb-shadow: 10px 0 36px rgba(0, 0, 0, 0.45);
}

.sidebar-premium__inner {
    min-height: 100%;
    height: 100%;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.sidebar-premium #sidebar-menu {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sidebar-premium #sidebar-menu > .navbar-nav {
    flex: 1 1 auto;
}

/* When collapsed, allow flyouts to escape the scrollport */
@media (min-width: 992px) {
    body.sidebar-collapsed .sidebar-premium #sidebar-menu {
        overflow: visible;
    }

    body.sidebar-collapsed .sidebar-premium .sidebar-nav {
        max-height: calc(100vh - 7.5rem);
        overflow-y: auto;
        overflow-x: visible;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
}

/* Brand */
.sidebar-premium .sidebar-brand-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 0.85rem 0.85rem !important;
    border-bottom: 1px solid var(--sb-border);
}

.sidebar-premium .sidebar-brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.25rem;
    text-decoration: none;
}

.sidebar-premium .sidebar-brand-logo {
    display: block;
    width: auto;
    max-width: 9.5rem;
    max-height: 2.75rem;
    height: auto;
    object-fit: contain;
    filter: none !important;
    transition: opacity 0.25s var(--sb-ease), transform 0.25s var(--sb-ease);
}

.sidebar-premium .sidebar-brand-mark {
    display: none;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.8rem;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: #fff;
    background: linear-gradient(135deg, var(--sb-accent), var(--sb-accent-soft));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--sb-accent) 35%, transparent);
}

.sidebar-collapse-btn {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sb-border);
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--sb-accent) 10%, transparent);
    color: var(--sb-accent);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sidebar-collapse-btn:hover,
.sidebar-collapse-btn:focus-visible {
    background: color-mix(in srgb, var(--sb-accent) 18%, transparent);
    border-color: color-mix(in srgb, var(--sb-accent) 40%, var(--sb-border));
    color: var(--sb-accent-soft);
    outline: none;
    transform: translateY(-1px);
}

.sidebar-collapse-btn__icon-expand {
    display: none;
}

body.sidebar-collapsed .sidebar-collapse-btn__icon-collapse {
    display: none;
}

body.sidebar-collapsed .sidebar-collapse-btn__icon-expand {
    display: inline-block;
}

/* Nav links */
.sidebar-premium .sidebar-nav {
    padding: 0.65rem 0.65rem 1.25rem;
    gap: 0.2rem;
}

.sidebar-premium .nav-item {
    position: relative;
}

.sidebar-premium .nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 2.55rem;
    padding: 0.55rem 0.75rem !important;
    margin: 0;
    border-radius: var(--sb-radius);
    border: 1px solid transparent;
    border-left: none !important;
    color: var(--sb-text) !important;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.sidebar-premium .nav-link .nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    flex-shrink: 0;
    color: inherit;
    opacity: 0.92;
}

.sidebar-premium .nav-link .nav-link-icon i {
    font-size: 1.2rem;
    line-height: 1;
}

.sidebar-premium .nav-link .nav-link-title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.875rem;
}

.sidebar-premium .nav-link.dropdown-toggle::after {
    margin-left: auto;
    opacity: 0.55;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-premium .nav-link:hover,
.sidebar-premium .nav-link:focus-visible {
    background: var(--sb-hover) !important;
    color: var(--sb-text-strong) !important;
    border-color: color-mix(in srgb, var(--sb-accent) 18%, transparent);
}

.sidebar-premium .nav-link.active,
.sidebar-premium .nav-item.active > .nav-link,
.sidebar-premium .nav-link.dropdown-toggle.active {
    background: linear-gradient(90deg, var(--sb-active), transparent 85%) !important;
    color: var(--sb-accent-soft) !important;
    border-color: color-mix(in srgb, var(--sb-accent) 28%, transparent);
    box-shadow: inset 3px 0 0 var(--sb-accent);
}

.sidebar-premium .nav-link.active .nav-link-icon,
.sidebar-premium .nav-item.active > .nav-link .nav-link-icon {
    color: var(--sb-accent);
}

/* Sections */
.sidebar-section {
    display: flex;
    align-items: center;
    padding: 0.55rem 0.85rem 0.2rem;
    pointer-events: none;
}

.sidebar-section__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sb-muted);
    white-space: nowrap;
}

.sidebar-section__dot {
    display: none;
    width: 0.35rem;
    height: 0.35rem;
    margin: 0.35rem auto;
    border-radius: 999px;
    background: color-mix(in srgb, var(--sb-accent) 55%, var(--sb-muted));
}

/* Dropdown / flyout */
.sidebar-premium .dropdown-menu {
    margin: 0.25rem 0 0.45rem !important;
    padding: 0.35rem !important;
    border: 1px solid var(--sb-border) !important;
    border-radius: 0.85rem !important;
    background: color-mix(in srgb, var(--sb-bg-elevated) 92%, transparent) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(10px);
}

.sidebar-premium .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.7rem !important;
    border-radius: 0.65rem;
    color: var(--sb-text) !important;
    font-size: 0.84rem;
    white-space: normal;
}

.sidebar-premium .dropdown-item i {
    font-size: 1rem;
    color: var(--sb-muted);
}

.sidebar-premium .dropdown-item:hover,
.sidebar-premium .dropdown-item:focus {
    background: var(--sb-hover) !important;
    color: var(--sb-text-strong) !important;
}

.sidebar-premium .dropdown-item.active {
    background: var(--sb-active) !important;
    color: var(--sb-accent-soft) !important;
}

.sidebar-premium .dropdown-item.active i {
    color: var(--sb-accent);
}

.sidebar-flyout__title {
    padding: 0.4rem 0.7rem 0.55rem;
    margin-bottom: 0.2rem;
    border-bottom: 1px solid var(--sb-border);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sb-muted);
}

/* Version */
.sidebar-version {
    color: var(--sb-muted);
    font-size: 0.75rem;
}

.sidebar-version--desktop {
    justify-content: center;
    align-items: center;
    padding: 0.75rem 0.5rem 1.25rem;
    border-top: 1px solid var(--sb-border);
    margin-top: auto;
}

/* Desktop widths */
@media (min-width: 992px) {
    .navbar-vertical.navbar-expand-lg.sidebar-premium {
        width: var(--sb-width);
        transition: width 0.32s var(--sb-ease);
    }

    .navbar-expand-lg.navbar-vertical.sidebar-premium ~ .page-wrapper,
    .navbar-expand-lg.navbar-vertical.sidebar-premium ~ .navbar {
        margin-left: var(--sb-width);
        transition: margin-left 0.32s var(--sb-ease);
    }

    .sidebar-premium .sidebar-brand-wrap {
        padding: 1.05rem 0.85rem 0.95rem !important;
    }

    .sidebar-premium .sidebar-brand-link {
        min-height: 3.5rem;
        justify-content: flex-start;
    }

    .sidebar-premium .sidebar-brand-logo {
        max-width: 11.5rem;
        max-height: 3.5rem;
    }

    /* Collapsed / icon-rail */
    body.sidebar-collapsed .navbar-vertical.navbar-expand-lg.sidebar-premium {
        width: var(--sb-width-collapsed);
    }

    body.sidebar-collapsed .navbar-expand-lg.navbar-vertical.sidebar-premium ~ .page-wrapper,
    body.sidebar-collapsed .navbar-expand-lg.navbar-vertical.sidebar-premium ~ .navbar {
        margin-left: var(--sb-width-collapsed);
    }

    body.sidebar-collapsed .sidebar-premium .sidebar-brand-wrap {
        flex-direction: column;
        gap: 0.55rem;
        padding: 0.9rem 0.45rem 0.75rem !important;
    }

    body.sidebar-collapsed .sidebar-premium .sidebar-brand-link {
        min-height: auto;
        justify-content: center;
    }

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

    body.sidebar-collapsed .sidebar-premium .sidebar-brand-mark {
        display: inline-flex;
    }

    body.sidebar-collapsed .sidebar-premium .sidebar-nav {
        padding: 0.55rem 0.45rem 1rem;
    }

    body.sidebar-collapsed .sidebar-premium .nav-link {
        justify-content: center;
        padding: 0.65rem 0.35rem !important;
        gap: 0;
    }

    body.sidebar-collapsed .sidebar-premium .nav-link-title,
    body.sidebar-collapsed .sidebar-premium .nav-link.dropdown-toggle::after,
    body.sidebar-collapsed .sidebar-premium .sidebar-version__text {
        display: none !important;
    }

    body.sidebar-collapsed .sidebar-section {
        justify-content: center;
        padding: 0.45rem 0.2rem;
    }

    body.sidebar-collapsed .sidebar-section__label {
        display: none;
    }

    body.sidebar-collapsed .sidebar-section__dot {
        display: block;
    }

    /* Orange dot = has submenu */
    body.sidebar-collapsed .sidebar-premium .nav-item.dropdown > .nav-link {
        position: relative;
    }

    body.sidebar-collapsed .sidebar-premium .nav-item.dropdown > .nav-link .sidebar-nav-chevron {
        position: absolute;
        top: 0.45rem;
        right: 0.35rem;
        width: 0.35rem;
        height: 0.35rem;
        border-radius: 999px;
        background: var(--sb-accent);
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--sb-bg) 80%, transparent);
        display: block;
    }

    body.sidebar-collapsed .sidebar-premium .nav-link:not(.dropdown-toggle)::after {
        content: attr(data-sidebar-label);
        position: absolute;
        left: calc(100% + 0.65rem);
        top: 50%;
        transform: translateY(-50%) translateX(-4px);
        padding: 0.35rem 0.65rem;
        border-radius: 0.55rem;
        background: #0f172a;
        color: #f8fafc;
        font-size: 0.75rem;
        font-weight: 600;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
        transition: opacity 0.15s ease, transform 0.15s ease;
        z-index: 1080;
    }

    html:not([data-bs-theme="dark"]) body.sidebar-collapsed .sidebar-premium .nav-link:not(.dropdown-toggle)::after {
        background: #1e293b;
    }

    body.sidebar-collapsed .sidebar-premium .nav-link:not(.dropdown-toggle):hover::after,
    body.sidebar-collapsed .sidebar-premium .nav-link:not(.dropdown-toggle):focus-visible::after {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* Portaled flyout (appended to body — never clipped by sidebar overflow) */
.dropdown-menu.sidebar-flyout--portal,
.dropdown-menu.sidebar-flyout--fixed {
    position: fixed !important;
    inset: auto !important;
    margin: 0 !important;
    transform: none !important;
    min-width: 14.5rem !important;
    max-width: 18rem;
    max-height: min(70vh, 26rem);
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 4000 !important;
    padding: 0.4rem !important;
    border-radius: 0.9rem !important;
    border: 1px solid color-mix(in srgb, #f76707 22%, rgba(148, 163, 184, 0.35)) !important;
    background: #121a2b !important;
    color: #e2e8f0 !important;
    box-shadow: 0 22px 55px rgba(2, 6, 23, 0.5) !important;
    pointer-events: auto !important;
}

html:not([data-bs-theme="dark"]) .dropdown-menu.sidebar-flyout--portal,
html:not([data-bs-theme="dark"]) .dropdown-menu.sidebar-flyout--fixed {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: color-mix(in srgb, #f76707 18%, #e2e8f0) !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16) !important;
}

.dropdown-menu.sidebar-flyout--portal .sidebar-flyout__title,
.dropdown-menu.sidebar-flyout--fixed .sidebar-flyout__title {
    display: block !important;
}

.dropdown-menu.sidebar-flyout--portal .dropdown-item,
.dropdown-menu.sidebar-flyout--fixed .dropdown-item {
    color: inherit !important;
}

.dropdown-menu.sidebar-flyout--portal .dropdown-item:hover,
.dropdown-menu.sidebar-flyout--fixed .dropdown-item:hover {
    background: color-mix(in srgb, #f76707 12%, transparent) !important;
    color: #ff922b !important;
}

@media (max-width: 991.98px) {
    .sidebar-collapse-btn {
        display: none !important;
    }

    body.admin-mobile-shell {
        --mobile-topbar-height: 4.25rem;
        --mobile-nav-height: 4.75rem;
        background: #f5f7fb;
    }

    [data-bs-theme="dark"] body.admin-mobile-shell {
        background: #080f1d;
    }

    body.admin-mobile-shell.mobile-sidebar-open {
        overflow: hidden;
        touch-action: none;
    }

    body.admin-mobile-shell .page {
        min-height: 100dvh;
        overflow: visible !important;
    }

    body.admin-mobile-shell .sidebar-premium {
        position: fixed;
        inset: 0 0 auto 0;
        width: 100%;
        min-height: var(--mobile-topbar-height);
        height: var(--mobile-topbar-height);
        padding-top: env(safe-area-inset-top);
        border: 0 !important;
        border-bottom: 1px solid var(--sb-border) !important;
        box-shadow: 0 10px 32px rgba(15, 23, 42, 0.16);
        overflow: visible !important;
        z-index: 1050;
    }

    body.admin-mobile-shell .sidebar-premium::after {
        content: "";
        position: absolute;
        inset: auto 0 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--sb-accent) 48%, transparent), transparent);
        pointer-events: none;
    }

    body.admin-mobile-shell .sidebar-premium__inner {
        min-height: var(--mobile-topbar-height);
        height: var(--mobile-topbar-height);
        padding: 0.55rem 0.8rem !important;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    body.admin-mobile-shell .sidebar-premium .sidebar-brand-wrap {
        order: 1;
        width: 5.8rem;
        min-width: 0;
        flex: 0 0 5.8rem;
        padding: 0 !important;
        border: 0;
    }

    body.admin-mobile-shell .sidebar-premium .sidebar-brand-link {
        min-height: 2.8rem;
        justify-content: flex-start;
        gap: 0.48rem;
        padding: 0 !important;
    }

    body.admin-mobile-shell .sidebar-premium .sidebar-brand-logo {
        width: 2.35rem;
        height: 2.35rem;
        max-width: 2.35rem;
        max-height: 2.35rem;
        flex: 0 0 2.35rem;
        padding: 0.1rem;
        border: 1px solid color-mix(in srgb, var(--sb-accent) 25%, var(--sb-border));
        border-radius: 0.72rem;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 7px 18px rgba(2, 6, 23, 0.2);
    }

    body.admin-mobile-shell .mobile-brand-copy {
        display: grid !important;
        min-width: 0;
        line-height: 1.05;
    }

    body.admin-mobile-shell .mobile-brand-copy strong {
        max-width: 3rem;
        overflow: hidden;
        color: var(--sb-text-strong);
        font-size: 0.78rem;
        font-weight: 750;
        letter-spacing: -0.015em;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.admin-mobile-shell .mobile-brand-copy small {
        margin-top: 0.16rem;
        color: var(--sb-accent);
        font-size: 0.57rem;
        font-weight: 750;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    body.admin-mobile-shell .mobile-sidebar-trigger {
        display: none !important;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        padding: 0;
        border: 1px solid color-mix(in srgb, var(--sb-accent) 24%, var(--sb-border));
        border-radius: 0.9rem;
        background: color-mix(in srgb, var(--sb-accent) 10%, transparent);
        color: var(--sb-accent);
        box-shadow: 0 7px 18px color-mix(in srgb, var(--sb-accent) 14%, transparent);
    }

    body.admin-mobile-shell .mobile-sidebar-trigger i {
        font-size: 1.45rem;
    }

    body.admin-mobile-shell .sidebar-premium #sidebar-menu {
        position: fixed;
        inset: 0 auto 0 0;
        display: flex !important;
        width: min(88vw, 22rem);
        height: 100dvh;
        padding: calc(0.9rem + env(safe-area-inset-top)) 0 env(safe-area-inset-bottom);
        border-right: 1px solid var(--sb-border);
        background:
            radial-gradient(100% 45% at 0 0, color-mix(in srgb, var(--sb-accent) 20%, transparent), transparent 60%),
            linear-gradient(180deg, var(--sb-bg-elevated), var(--sb-bg));
        box-shadow: 24px 0 60px rgba(2, 6, 23, 0.32);
        transform: translate3d(-105%, 0, 0);
        visibility: hidden;
        pointer-events: none;
        transition:
            transform 0.32s var(--sb-ease),
            visibility 0s linear 0.32s;
        z-index: 1060;
    }

    body.admin-mobile-shell .sidebar-premium #sidebar-menu.show,
    body.admin-mobile-shell.mobile-sidebar-open .sidebar-premium #sidebar-menu.collapsing {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        pointer-events: auto;
        transition:
            transform 0.32s var(--sb-ease),
            visibility 0s linear 0s;
    }

    body.admin-mobile-shell .sidebar-premium #sidebar-menu.collapsing {
        height: 100dvh !important;
    }

    body.admin-mobile-shell .mobile-sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0 1rem 0.9rem;
        border-bottom: 1px solid var(--sb-border);
    }

    body.admin-mobile-shell .mobile-sidebar-head__identity {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        min-width: 0;
        color: var(--sb-text-strong);
    }

    body.admin-mobile-shell .mobile-sidebar-head__identity > span:last-child {
        display: grid;
        min-width: 0;
    }

    body.admin-mobile-shell .mobile-sidebar-head__identity strong {
        overflow: hidden;
        font-size: 0.95rem;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.admin-mobile-shell .mobile-sidebar-head__identity small {
        color: var(--sb-muted);
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    body.admin-mobile-shell .mobile-sidebar-head__mark {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.65rem;
        height: 2.65rem;
        flex: 0 0 auto;
        border-radius: 0.9rem;
        background: linear-gradient(135deg, var(--sb-accent), var(--sb-accent-soft));
        color: #fff;
        font-size: 1.1rem;
        font-weight: 800;
        box-shadow: 0 9px 22px color-mix(in srgb, var(--sb-accent) 35%, transparent);
    }

    body.admin-mobile-shell .mobile-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        flex: 0 0 auto;
        border: 1px solid var(--sb-border);
        border-radius: 0.8rem;
        background: var(--sb-hover);
        color: var(--sb-text-strong);
    }

    body.admin-mobile-shell .mobile-sidebar-close i {
        font-size: 1.25rem;
    }

    body.admin-mobile-shell .sidebar-premium .sidebar-nav {
        width: 100%;
        padding: 0.8rem 0.75rem 1.5rem;
        gap: 0.28rem;
    }

    body.admin-mobile-shell .sidebar-premium .nav-link {
        min-height: 3.15rem;
        padding: 0.72rem 0.85rem !important;
        border-radius: 0.95rem;
    }

    body.admin-mobile-shell .sidebar-premium .nav-link .nav-link-icon {
        width: 1.8rem;
        height: 1.8rem;
    }

    body.admin-mobile-shell .sidebar-premium .nav-link .nav-link-icon i {
        font-size: 1.3rem;
    }

    body.admin-mobile-shell .sidebar-premium .nav-link .nav-link-title {
        font-size: 0.91rem;
        font-weight: 600;
    }

    body.admin-mobile-shell .sidebar-premium .dropdown-menu {
        position: static !important;
        inset: auto !important;
        width: auto;
        transform: none !important;
        box-shadow: none;
    }

    body.admin-mobile-shell .mobile-sidebar-backdrop {
        position: fixed;
        inset: 0;
        display: block !important;
        padding: 0;
        border: 0;
        background: rgba(2, 6, 23, 0.58);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        backdrop-filter: blur(5px);
        transition:
            opacity 0.25s ease,
            visibility 0s linear 0.25s;
        z-index: 1045;
    }

    body.admin-mobile-shell.mobile-sidebar-open .mobile-sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
    }

    body.admin-mobile-shell .page-wrapper {
        min-height: 100dvh;
        padding-top: calc(var(--mobile-topbar-height) + env(safe-area-inset-top));
        padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 0.75rem);
    }

    body.admin-mobile-shell .page-wrapper > .page-header {
        margin: 0 !important;
        min-height: 0;
        border: 0;
        background: transparent;
    }

    body.admin-mobile-shell .admin-header-tools {
        position: fixed;
        top: env(safe-area-inset-top);
        right: 0.55rem;
        display: flex;
        align-items: center !important;
        justify-content: flex-end !important;
        width: auto;
        height: var(--mobile-topbar-height);
        min-height: var(--mobile-topbar-height);
        padding: 0 !important;
        border: 0;
        background: transparent;
        z-index: 1055;
    }

    body.admin-mobile-shell .admin-header-tools > div,
    body.admin-mobile-shell .admin-header-tools .col-auto {
        display: flex;
        align-items: center;
        min-width: 0;
        height: 100%;
    }

    body.admin-mobile-shell .admin-header-actions {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.02rem;
        padding: 0.18rem;
        border: 1px solid rgba(148, 163, 184, 0.13);
        border-radius: 0.92rem;
        background: rgba(15, 23, 42, 0.18);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
        backdrop-filter: blur(12px);
    }

    html:not([data-bs-theme="dark"]) body.admin-mobile-shell .admin-header-actions {
        background: rgba(255, 255, 255, 0.48);
        border-color: rgba(148, 163, 184, 0.2);
    }

    body.admin-mobile-shell .admin-header-actions > .nav-item,
    body.admin-mobile-shell .admin-header-actions > .gs-trigger,
    body.admin-mobile-shell .admin-header-actions > .header-notifications {
        margin-right: 0 !important;
    }

    body.admin-mobile-shell .admin-header-actions .gs-trigger,
    body.admin-mobile-shell .admin-header-actions > .nav-item > .nav-link,
    body.admin-mobile-shell .admin-header-actions .header-notifications-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.02rem;
        min-width: 2.02rem;
        height: 2.02rem;
        padding: 0 !important;
        border-radius: 0.68rem;
    }

    body.admin-mobile-shell .admin-header-actions .gs-trigger {
        border-color: transparent;
        background: color-mix(in srgb, var(--sb-accent) 15%, transparent);
    }

    body.admin-mobile-shell .admin-header-actions > .nav-item > .nav-link,
    body.admin-mobile-shell .admin-header-actions .header-notifications-trigger {
        color: var(--tblr-secondary-color, #94a3b8);
    }

    body.admin-mobile-shell .admin-header-actions > .nav-item > .nav-link:hover,
    body.admin-mobile-shell .admin-header-actions > .nav-item > .nav-link:focus,
    body.admin-mobile-shell .admin-header-actions .header-notifications-trigger:hover {
        background: color-mix(in srgb, var(--sb-accent) 9%, transparent);
        color: var(--sb-accent);
    }

    body.admin-mobile-shell .admin-header-actions .avatar {
        width: 1.9rem;
        height: 1.9rem;
        border: 1px solid color-mix(in srgb, var(--sb-accent) 44%, var(--tblr-border-color, #334155));
        border-radius: 0.64rem;
        font-size: 0.65rem;
        box-shadow: 0 4px 12px color-mix(in srgb, var(--sb-accent) 18%, transparent);
    }

    body.admin-mobile-shell .admin-header-actions i.fs-2 {
        font-size: 1.08rem !important;
    }

    body.admin-mobile-shell .admin-header-actions .header-notifications-badge {
        top: -0.18rem;
        right: -0.18rem;
    }

    body.admin-mobile-shell .admin-header-actions .dropdown-menu {
        margin-top: 0.55rem !important;
    }

    body.admin-mobile-shell .page-body {
        margin-top: 0.85rem;
    }

    body.admin-mobile-shell .page-body > .container-xl {
        padding-inline: 0.8rem;
    }

    body.admin-mobile-shell .card {
        border-color: rgba(148, 163, 184, 0.18);
        border-radius: 1.15rem;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
        overflow: hidden;
    }

    [data-bs-theme="dark"] body.admin-mobile-shell .card {
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    }

    body.admin-mobile-shell .card-header {
        padding: 1rem;
    }

    body.admin-mobile-shell .mobile-admin-nav {
        position: fixed;
        inset: auto 0 0;
        display: flex !important;
        align-items: stretch;
        justify-content: space-around;
        min-height: var(--mobile-nav-height);
        padding: 0.48rem 0.45rem calc(0.42rem + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(148, 163, 184, 0.2);
        background: color-mix(in srgb, var(--tblr-body-bg, #fff) 90%, transparent);
        box-shadow: 0 -12px 35px rgba(15, 23, 42, 0.1);
        backdrop-filter: blur(20px) saturate(150%);
        z-index: 1038;
    }

    body.admin-mobile-shell .mobile-admin-nav__item {
        position: relative;
        display: flex;
        min-width: 0;
        flex: 1 1 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.17rem;
        padding: 0.25rem 0.15rem;
        border: 0;
        border-radius: 0.9rem;
        background: transparent;
        color: var(--tblr-secondary-color, #64748b);
        font: inherit;
        font-size: 0.64rem;
        font-weight: 650;
        line-height: 1.1;
        text-align: center;
        text-decoration: none;
        transition: color 0.18s ease, transform 0.18s ease;
    }

    body.admin-mobile-shell .mobile-admin-nav__item::before {
        content: "";
        position: absolute;
        top: -0.48rem;
        width: 1.7rem;
        height: 0.2rem;
        border-radius: 0 0 999px 999px;
        background: var(--sb-accent);
        opacity: 0;
        transform: scaleX(0.4);
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    body.admin-mobile-shell .mobile-admin-nav__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.15rem;
        height: 2rem;
        border-radius: 0.78rem;
        font-size: 1.3rem;
        transition: background 0.18s ease, box-shadow 0.18s ease;
    }

    body.admin-mobile-shell .mobile-admin-nav__item.active {
        color: var(--sb-accent);
    }

    body.admin-mobile-shell .mobile-admin-nav__item.active::before {
        opacity: 1;
        transform: scaleX(1);
    }

    body.admin-mobile-shell .mobile-admin-nav__item.active .mobile-admin-nav__icon {
        background: color-mix(in srgb, var(--sb-accent) 13%, transparent);
        box-shadow: 0 6px 16px color-mix(in srgb, var(--sb-accent) 12%, transparent);
    }

    body.admin-mobile-shell .mobile-admin-nav__item:active {
        transform: scale(0.94);
    }

    body.admin-mobile-shell .footer {
        margin-bottom: 0;
    }
}

@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
    body.admin-mobile-shell .sidebar-premium #sidebar-menu,
    body.admin-mobile-shell .mobile-sidebar-backdrop,
    body.admin-mobile-shell .mobile-admin-nav__item,
    body.admin-mobile-shell .mobile-admin-nav__icon {
        transition: none !important;
    }
}

/* Override older orange active styles that fight the premium rail */
body.layout-fluid .sidebar-premium .nav-link.active,
body.layout-fluid .sidebar-premium .nav-item.active > .nav-link {
    border-radius: var(--sb-radius) !important;
}

.sidebar-nav-chevron {
    display: none;
}
