/* ============================================================
   Ballour Admin Theme v2 — Shell
   Topbar + Sidebar + Page wrapper + Footer + Preloader
   ============================================================ */

/* ---------- Page wrapper layout ---------- */
body.theme-v2 #main-wrapper {
    background: var(--bl-bg);
    min-height: 100vh;
}

body.theme-v2 .page-wrapper {
    background: var(--bl-bg);
    margin-top: 0 !important;
    padding-top: var(--bl-topbar-h);
    min-height: calc(100vh - 0px);
}

body.theme-v2 .page-wrapper > .container-fluid {
    padding: 24px 28px 40px;
}

/* ---------- Preloader ---------- */
body.theme-v2 .preloader {
    background: var(--bl-bg);
}

/* ============================================================
   PRELOADER  (modern v2 replacement)
   ------------------------------------------------------------
   Old markup (kept identical, JS hooks preserved):
       <div class="Custom_preloader">
           <span class="loader"></span>
           <h1>Loading…</h1>
       </div>

   We reset the legacy 3-dot box-shadow animation and replace it
   with a centered card containing a dual-ring spinner + label.
   ============================================================ */
body.theme-v2 .Custom_preloader {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
    background: rgba(15, 23, 42, 0.55) !important;
    -webkit-backdrop-filter: blur(6px) saturate(1.05);
    backdrop-filter: blur(6px) saturate(1.05);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center;
    overflow: hidden !important;
    overscroll-behavior: contain;
    touch-action: none;
}

/* Lock body scroll while preloader is active so user can't scroll
   the page underneath the overlay. */
body.theme-v2:has(> .Custom_preloader[style*="display: block"]),
body.theme-v2:has(> .Custom_preloader[style*="display:block"]),
body.theme-v2:has(.Custom_preloader[style*="display: block"]),
body.theme-v2:has(.Custom_preloader[style*="display:block"]) {
    overflow: hidden !important;
}
/* When the legacy JS sets display:block, switch to flex via the
   generic [style] rule (display:block ⇒ overridden by flex below). */
body.theme-v2 .Custom_preloader[style*="display: block"],
body.theme-v2 .Custom_preloader[style*="display:block"] {
    display: flex !important;
}

/* Wipe the legacy span.loader (3-dot box-shadow animation) so we
   can render a clean dual-ring spinner via ::before / ::after. */
body.theme-v2 .Custom_preloader .loader {
    width: auto !important;
    height: auto !important;
    color: transparent !important;
    text-indent: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
    border-radius: 0 !important;
    animation: none !important;
    background: none !important;
    box-shadow: none !important;
    display: block !important;
    position: relative !important;
    width: 64px !important;
    height: 64px !important;
}
body.theme-v2 .Custom_preloader .loader::before,
body.theme-v2 .Custom_preloader .loader::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    background: transparent !important;
    animation: bl-preloader-spin 1.1s cubic-bezier(.5,.1,.5,.9) infinite !important;
}
body.theme-v2 .Custom_preloader .loader::before {
    border: 3px solid rgba(255, 255, 255, 0.18) !important;
    border-top-color: #fff !important;
}
body.theme-v2 .Custom_preloader .loader::after {
    width: 44px !important;
    height: 44px !important;
    inset: 10px !important;
    border: 3px solid rgba(255, 255, 255, 0.12) !important;
    border-bottom-color: var(--bl-brand) !important;
    animation-direction: reverse !important;
    animation-duration: 1.4s !important;
}

/* Wrap spinner + label inside a glassy card. We can't add markup,
   so we stack the existing children (.loader + h1) and decorate
   them. */
body.theme-v2 .Custom_preloader > * {
    margin: 0 !important;
}
body.theme-v2 .Custom_preloader::before {
    /* invisible spacer that builds the card layout — we cannot
       add markup so use a sibling-flex trick instead.            */
    content: none;
}

/* Group spinner + heading vertically and centred */
body.theme-v2 .Custom_preloader {
    flex-direction: column;
    gap: 18px;
}

body.theme-v2 .Custom_preloader h1 {
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    letter-spacing: .01em;
    margin: 0 !important;
    padding: 8px 18px !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--bl-radius-pill, 999px);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
}
/* Pulsing dot before the label */
body.theme-v2 .Custom_preloader h1::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    margin-inline-end: 8px;
    vertical-align: middle;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, .7);
    animation: bl-preloader-pulse 1.4s ease-in-out infinite;
}

@keyframes bl-preloader-spin {
    to { transform: rotate(360deg); }
}
@keyframes bl-preloader-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(74, 222, 128, .55); }
    70%  { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);  }
    100% { box-shadow: 0 0 0 0   rgba(74, 222, 128, 0);  }
}

/* ============================================================
   TOPBAR
   ============================================================ */
body.theme-v2 header.topbar {
    background: var(--bl-surface);
    border-bottom: 1px solid var(--bl-border);
    box-shadow: var(--bl-shadow-xs);
    height: var(--bl-topbar-h);
    position: fixed;
    top: 0;
    /* Topbar starts AFTER the sidebar so the sidebar runs full-height.
       In RTL (start=right): right offset = sidebar width.
       In LTR (start=left):  left  offset = sidebar width. */
    inset-inline-start: var(--bl-sidebar-w);
    inset-inline-end: 0;
    z-index: 100;
    transition: inset-inline-start var(--bl-dur) var(--bl-ease);
}

body.theme-v2.mini-sidebar header.topbar {
    inset-inline-start: var(--bl-sidebar-w-collapsed);
}

body.theme-v2 header.topbar .navbar.top-navbar {
    background: transparent !important;
    height: var(--bl-topbar-h);
    padding: 0 24px;
    min-height: var(--bl-topbar-h);
    display: flex;
    align-items: center;
}

/* uber alert (subscription wait) */
body.theme-v2 header.topbar .uber_alert {
    border-radius: 0;
    margin: 0;
    background: linear-gradient(90deg, #fff7ed, #fef3c7);
    color: var(--bl-tint-yellow-fg);
    border: none;
    border-bottom: 1px solid var(--bl-border);
    padding: 10px 24px;
    font-size: 13px;
}

body.theme-v2 header.topbar .uber_alert a {
    color: var(--bl-brand);
    font-weight: 700;
}

/* ----- Logo / brand area in topbar (kept for v1 compatibility) ----- */
body.theme-v2 header.topbar .navbar-header {
    display: none !important; /* v2 uses sidebar logo, not topbar */
}

/* ----- Right-side nav (notifications, language, user) ----- */
body.theme-v2 header.topbar .navbar-collapse {
    width: 100%;
    flex: 1;
}

body.theme-v2 header.topbar .navbar-nav {
    align-items: center;
    gap: 4px;
}

body.theme-v2 header.topbar .nav-item .nav-link {
    width: 40px;
    height: 40px;
    border-radius: var(--bl-radius);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: var(--bl-text-muted) !important;
    transition: all var(--bl-dur) var(--bl-ease);
    padding: 0 !important;
    position: relative;
}

body.theme-v2 header.topbar .nav-item .nav-link:hover,
body.theme-v2 header.topbar .nav-item .nav-link:focus {
    background: var(--bl-surface-2);
    color: var(--bl-brand) !important;
}

body.theme-v2 header.topbar .nav-item .nav-link i {
    font-size: 18px;
}

/* sidebar collapse / mobile menu icons */
body.theme-v2 header.topbar .nav-toggler,
body.theme-v2 header.topbar .sidebartoggler {
    color: var(--bl-text) !important;
}

/* The legacy markup ships TWO hamburger buttons:
     .nav-toggler   → mobile drawer (only useful < md)
     .sidebartoggler → desktop "mini-sidebar" collapse (only useful >= md)
   Bootstrap-3 helper classes (hidden-md-up / hidden-sm-down) are no-ops
   in BS4, so both used to render side-by-side. We pick the right one
   per viewport here. */
body.theme-v2 header.topbar .nav-item.hideInCustomPage,
body.theme-v2 header.topbar .nav-link.nav-toggler {
    display: none !important;
}

@media (max-width: 767.98px) {
    body.theme-v2 header.topbar .nav-item.hideInCustomPage,
    body.theme-v2 header.topbar .nav-link.nav-toggler {
        display: inline-flex !important;
    }

    body.theme-v2 header.topbar .nav-link.sidebartoggler {
        display: none !important;
    }
}

/* notification bell red dot */
body.theme-v2 header.topbar .notify {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
}

body.theme-v2 header.topbar .notify .point {
    width: 8px;
    height: 8px;
    background: var(--bl-danger);
    border-radius: 50%;
    border: 2px solid var(--bl-surface);
    display: block;
}

body.theme-v2 header.topbar .notify .heartbit {
    border-color: var(--bl-danger);
}

/* subscription pill */
body.theme-v2 header.topbar .Upgrade_now {
    margin: 0 4px;
}

body.theme-v2 header.topbar .Upgrade_now .custom_but1 {
    background: var(--bl-tint-blue-bg) !important;
    color: var(--bl-brand) !important;
    border: 1px solid var(--bl-tint-blue-bg) !important;
    border-radius: var(--bl-radius-pill) !important;
    padding: 6px 14px !important;
    font-weight: 600;
    font-size: 13px;
    height: 36px;
    display: inline-flex;
    align-items: center;
}

body.theme-v2 header.topbar .Upgrade_now .custom_but1:hover {
    background: var(--bl-brand) !important;
    color: #fff !important;
    border-color: var(--bl-brand) !important;
}

/* user dropdown avatar */
body.theme-v2 header.topbar .profile-pic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--bl-border);
    object-fit: cover;
}

/* dropdown menus from topbar */
body.theme-v2 header.topbar .dropdown-menu {
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    box-shadow: var(--bl-shadow-lg);
    padding: 8px;
    margin-top: 6px;
    min-width: 220px;
}

body.theme-v2 header.topbar .dropdown-menu .dropdown-item {
    border-radius: var(--bl-radius-sm);
    padding: 8px 12px;
    font-size: 14px;
    color: var(--bl-text);
}

body.theme-v2 header.topbar .dropdown-menu .dropdown-item:hover {
    background: var(--bl-surface-2);
    color: var(--bl-brand);
}

body.theme-v2 .dropdown-user .dw-user-box {
    padding: 8px;
}

body.theme-v2 .dropdown-user .dw-user-box .u-img img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

body.theme-v2 .dropdown-user .dw-user-box .u-text h4 {
    font-size: 14px;
    margin: 0;
    font-weight: 700;
    color: var(--bl-heading);
}

body.theme-v2 .dropdown-user .dw-user-box .u-text p {
    font-size: 12px;
    color: var(--bl-text-muted);
    margin: 2px 0 0;
}

body.theme-v2 .dropdown-user li.divider {
    height: 1px;
    background: var(--bl-border);
    margin: 6px 0;
}

/* notifications dropdown */
body.theme-v2 .custom_nav_notifcation .head .drop-title {
    background: var(--bl-brand);
    color: #fff;
    border-radius: var(--bl-radius-sm);
    padding: 10px 12px;
    font-weight: 700;
    font-size: 14px;
}

/* ============================================================
   SIDEBAR (Navy)
   ============================================================ */
body.theme-v2 aside.left-sidebar {
    background: var(--bl-sidebar-bg) !important;
    width: var(--bl-sidebar-w);
    position: fixed;
    top: 0;
    bottom: 0;
    /* Logical positioning:
       RTL (Arabic): inline-start = right → sidebar on RIGHT
       LTR (English): inline-start = left  → sidebar on LEFT */
    inset-inline-start: 0;
    z-index: 90;
    padding: 0 !important;
    color: var(--bl-sidebar-text);
    border: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: width var(--bl-dur) var(--bl-ease);
}

/* Anchor border between sidebar and main content (the "edge" of the sidebar
   that touches the page area). In RTL this edge is on the LEFT, in LTR on the RIGHT. */
body.theme-v2 aside.left-sidebar::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

body.theme-v2 .scroll-sidebar {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

body.theme-v2 .bl-sidebar-footer {
    flex-shrink: 0;
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,.07);
    text-align: center;
}
body.theme-v2 .bl-sidebar-footer p {
    margin: 0;
    font-size: 11px;
    color: rgba(255,255,255,.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.theme-v2.mini-sidebar .bl-sidebar-footer {
    display: none;
}

body.theme-v2 .sidebar-nav {
    background: transparent !important;
    padding: 8px 12px 24px;
}

/* sidebar brand block */
body.theme-v2 .bl-sidebar-brand {
    padding: 16px;
    border-bottom: 1px solid var(--bl-sidebar-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.theme-v2 .bl-sidebar-brand__row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

body.theme-v2 .bl-sidebar-brand__logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

body.theme-v2 .bl-sidebar-brand__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.theme-v2 .bl-sidebar-brand__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.theme-v2 .bl-sidebar-brand__name {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-v2 .bl-sidebar-brand__code {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 3px 8px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .4px;
    width: fit-content;
}

body.theme-v2 .bl-sidebar-brand__code button {
    background: transparent;
    border: 0;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    transition: color .15s;
}

body.theme-v2 .bl-sidebar-brand__code button:hover {
    color: #fff;
}

/* visit store link — full-width pill button */
body.theme-v2 .bl-sidebar-brand__visit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    padding: 7px 12px;
    transition: all .15s ease;
}

body.theme-v2 .bl-sidebar-brand__visit:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
    border-color: rgba(255,255,255,.18);
}

/* Section labels — removed from sidebar; keep rule as safety net */
body.theme-v2 .sidebar-nav .bl-section-label {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    color: var(--bl-sidebar-section);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 12px 6px;
    list-style: none;
    margin: 0;
}

/* ----- nav items ----- */
body.theme-v2 #sidebarnav {
    width: 100%;
    margin: 0 !important;
    padding: 0;
}

body.theme-v2 #sidebarnav > li {
    margin: 2px 0;
    list-style: none;
    position: relative;
}

body.theme-v2 #sidebarnav > li > a {
    color: var(--bl-sidebar-text) !important;
    background: transparent;
    border-radius: var(--bl-radius);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--bl-dur) var(--bl-ease);
    position: relative;
    white-space: nowrap;
}

body.theme-v2 #sidebarnav > li > a:hover {
    background: var(--bl-sidebar-hover-bg) !important;
    color: #fff !important;
}

body.theme-v2 #sidebarnav > li > a > i {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-size: 16px;
    flex-shrink: 0;
}

body.theme-v2 #sidebarnav > li > a > svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

body.theme-v2 #sidebarnav > li > a .hide-menu {
    flex: 1;
    color: inherit;
}

/* Active state */
body.theme-v2 #sidebarnav > li.active > a,
body.theme-v2 #sidebarnav > li > a.active {
    background: var(--bl-sidebar-bg-2) !important;
    color: #fff !important;
    font-weight: 600;
}

body.theme-v2 #sidebarnav > li.active > a::before,
body.theme-v2 #sidebarnav > li > a.active::before {
    content: "";
    position: absolute;
    inset-inline-end: -12px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--bl-brand);
    border-radius: 4px;
}

body.theme-v2 #sidebarnav > li.active > a > i,
body.theme-v2 #sidebarnav > li > a.active > i {
    color: #fff !important;
}

/* arrow for sub-menu */
body.theme-v2 #sidebarnav > li > a.has-arrow::after {
    border-color: var(--bl-sidebar-text);
    width: 7px;
    height: 7px;
    border-width: 0 1.5px 1.5px 0;
    margin-inline-start: auto;
    margin-inline-end: 0;
    transform: rotate(45deg) translate(-2px, -2px);
}

body.theme-v2 #sidebarnav > li > a.has-arrow[aria-expanded="true"]::after {
    transform: rotate(-135deg) translate(-2px, -2px);
}

/* sub menu */
body.theme-v2 #sidebarnav ul.collapse,
body.theme-v2 #sidebarnav ul.collapsing {
    background: transparent;
    padding: 4px 0 4px 12px;
    list-style: none;
    margin: 0;
}

body.theme-v2 #sidebarnav ul.collapse li,
body.theme-v2 #sidebarnav ul.collapsing li {
    list-style: none;
    margin: 1px 0;
}

body.theme-v2 #sidebarnav ul.collapse li a,
body.theme-v2 #sidebarnav ul.collapsing li a {
    color: var(--bl-sidebar-text);
    padding: 8px 12px 8px 32px;
    display: block;
    border-radius: var(--bl-radius-sm);
    font-size: 13px;
    transition: all var(--bl-dur) var(--bl-ease);
    text-decoration: none;
    position: relative;
}

body.theme-v2 #sidebarnav ul.collapse li a:hover,
body.theme-v2 #sidebarnav ul.collapsing li a:hover {
    background: var(--bl-sidebar-hover-bg);
    color: #fff;
}

body.theme-v2 #sidebarnav ul.collapse li a::before,
body.theme-v2 #sidebarnav ul.collapsing li a::before {
    content: "";
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    width: 4px;
    height: 4px;
    background: var(--bl-sidebar-text);
    border-radius: 50%;
    opacity: 0.5;
    transform: translateY(-50%);
}

/* ----- sidebar user card (bottom) ----- */
body.theme-v2 .bl-sidebar-user {
    margin: 0 12px 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--bl-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

body.theme-v2 .bl-sidebar-user:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
}

body.theme-v2 .bl-sidebar-user__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bl-brand);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

body.theme-v2 .bl-sidebar-user__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.theme-v2 .bl-sidebar-user__avatar .dot {
    position: absolute;
    bottom: 0;
    inset-inline-end: 0;
    width: 10px;
    height: 10px;
    background: var(--bl-success);
    border-radius: 50%;
    border: 2px solid var(--bl-sidebar-bg);
}

body.theme-v2 .bl-sidebar-user__info {
    flex: 1;
    min-width: 0;
    line-height: 1.2;
}

body.theme-v2 .bl-sidebar-user__info .nm {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-v2 .bl-sidebar-user__info .em {
    font-size: 11px;
    color: var(--bl-sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   PAGE WRAPPER OFFSETS (because sidebar fixed + topbar fixed)
   The page content sits OPPOSITE the sidebar.
   Sidebar at inline-start  →  content needs margin-inline-start.
   ============================================================ */
body.theme-v2 .page-wrapper {
    margin-inline-start: var(--bl-sidebar-w);
    margin-inline-end: 0;
    transition: margin-inline-start var(--bl-dur) var(--bl-ease);
}

/* mini-sidebar collapsed state used by legacy js */
body.theme-v2.mini-sidebar aside.left-sidebar {
    width: var(--bl-sidebar-w-collapsed);
}

body.theme-v2.mini-sidebar .page-wrapper {
    margin-inline-start: var(--bl-sidebar-w-collapsed);
}

body.theme-v2.mini-sidebar #sidebarnav > li > a .hide-menu,
body.theme-v2.mini-sidebar .bl-sidebar-brand__name,
body.theme-v2.mini-sidebar .bl-sidebar-brand__sub,
body.theme-v2.mini-sidebar .bl-sidebar-brand__code,
body.theme-v2.mini-sidebar .bl-sidebar-brand__visit,
body.theme-v2.mini-sidebar .bl-sidebar-user__info,
body.theme-v2.mini-sidebar .bl-section-label {
    display: none !important;
}

body.theme-v2.mini-sidebar #sidebarnav > li > a {
    justify-content: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
body.theme-v2 .footer {
    background: transparent;
    border: none;
    padding: 18px 0 4px;
    color: var(--bl-text-muted) !important;
}

body.theme-v2 .footer p {
    color: var(--bl-text-muted) !important;
    font-size: 12px;
}

body.theme-v2 .footer .admin_virion {
    color: var(--bl-text-soft);
    font-weight: 500;
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 767.98px) {
    /* Sidebar slides off-screen on mobile.
       RTL: sidebar lives on right → slide right (translateX(100%))
       LTR: sidebar lives on left  → slide left  (translateX(-100%)) */
    body.theme-v2 aside.left-sidebar {
        transform: translateX(-100%);
        transition: transform var(--bl-dur) var(--bl-ease);
    }

    html[dir="rtl"] body.theme-v2 aside.left-sidebar {
        transform: translateX(100%);
    }

    body.theme-v2.show-sidebar aside.left-sidebar,
    html[dir="rtl"] body.theme-v2.show-sidebar aside.left-sidebar {
        transform: translateX(0);
    }

    body.theme-v2 .page-wrapper {
        margin-inline-start: 0 !important;
        margin-inline-end: 0 !important;
    }

    body.theme-v2 header.topbar {
        inset-inline-start: 0 !important;
    }

    body.theme-v2 header.topbar .navbar.top-navbar {
        padding: 0 12px;
        position: relative;
        padding-inline-start: 50px;
    }

    /* Menu toggle: fixed to inline-start edge (right in RTL, left in LTR) */
    body.theme-v2 header.topbar .nav-item.hideInCustomPage {
        position: absolute;
        inset-inline-start: 8px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        margin: 0 !important;
    }

    body.theme-v2 header.topbar .nav-item.hideInCustomPage > .nav-link.nav-toggler {
        margin: 0 !important;
    }

    body.theme-v2 .page-wrapper > .container-fluid {
        padding: 16px 14px 32px;
    }
}
