/* ============================================================================
   Valuedesign Corporate Sidebar Theme
   Purpose : Polished corporate sidebar with Valuedesign green/lime identity.
   Scope   : Applies only to .valuedesign-polished-sidebar to avoid affecting
             normal page cards, tables, forms, and dashboards.
   Notes   : The active state is controlled by static/js/valuedesign-sidebar.js
             using the .vd-sidebar-active class, because many legacy menu links
             use the mm-active class permanently.
   ============================================================================ */

:root {
    --vd-green: #20c760;
    --vd-green-dark: #0a8f42;
    --vd-lime: #a8f20f;
    --vd-lime-soft: #eaffc7;
    --vd-blue: #1f69b3;
    --vd-ink: #253142;
    --vd-muted: #6b7785;
    --vd-border: #e1edf6;
    --vd-sidebar-bg: #fbfdff;
    --vd-sidebar-soft: #f2fbff;
    --vd-shadow: 0 16px 40px rgba(21, 72, 122, 0.12);
}

.valuedesign-polished-sidebar {
    background:
        radial-gradient(circle at 8% 0%, rgba(168, 242, 15, 0.22), transparent 26%),
        radial-gradient(circle at 100% 18%, rgba(32, 199, 96, 0.16), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, var(--vd-sidebar-bg) 42%, #f7fbff 100%) !important;
    border-right: 1px solid var(--vd-border);
    box-shadow: var(--vd-shadow) !important;
    overflow: hidden;
}

.valuedesign-polished-sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--vd-lime), var(--vd-green), #21b5ea, #f36f21);
    opacity: 0.95;
    z-index: 3;
}

.valuedesign-polished-sidebar .scrollbar-sidebar {
    padding: 16px 14px 18px 14px;
}

.valuedesign-polished-sidebar .scrollbar-sidebar::-webkit-scrollbar {
    width: 7px;
}

.valuedesign-polished-sidebar .scrollbar-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--vd-lime), var(--vd-green));
    border-radius: 999px;
}

.valuedesign-polished-sidebar .app-sidebar__inner {
    padding: 0 0 20px 0 !important;
}

.valuedesign-polished-sidebar .vertical-nav-menu {
    margin: 0;
    padding: 0;
}

.valuedesign-polished-sidebar .app-sidebar__heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 18px 0 8px 0 !important;
    padding: 0 8px 0 11px !important;
    color: var(--vd-green-dark) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    opacity: 1 !important;
}

.valuedesign-polished-sidebar .app-sidebar__heading::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vd-lime), var(--vd-green));
    box-shadow: 0 0 0 4px rgba(168, 242, 15, 0.18);
    flex: 0 0 auto;
}

.valuedesign-polished-sidebar .vertical-nav-menu li {
    margin: 4px 0;
}

.valuedesign-polished-sidebar .vertical-nav-menu li a {
    position: relative;
    min-height: 46px;
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin: 0 4px;
    padding: 11px 14px 11px 16px !important;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent !important;
    color: var(--vd-ink) !important;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.2;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    white-space: normal;
}

/* Legacy neutralizer: many existing menu items have mm-active hard-coded.
   Only .vd-sidebar-active receives the visual selected state. */
.valuedesign-polished-sidebar .vertical-nav-menu li a.mm-active:not(.vd-sidebar-active) {
    background: transparent !important;
    color: var(--vd-ink) !important;
    box-shadow: none !important;
}

.valuedesign-polished-sidebar .vertical-nav-menu li a:hover {
    transform: translateX(3px);
    background: linear-gradient(90deg, rgba(168, 242, 15, 0.18), rgba(32, 199, 96, 0.08)) !important;
    border-color: rgba(32, 199, 96, 0.22);
    color: #103b26 !important;
    box-shadow: 0 10px 24px rgba(32, 199, 96, 0.10);
    text-decoration: none;
}

.valuedesign-polished-sidebar .vertical-nav-menu li a.vd-sidebar-active {
    background: linear-gradient(135deg, var(--vd-lime) 0%, #7eee1e 48%, var(--vd-green) 100%) !important;
    border-color: rgba(32, 199, 96, 0.36);
    color: #102514 !important;
    box-shadow: 0 14px 32px rgba(32, 199, 96, 0.24);
}

.valuedesign-polished-sidebar .vertical-nav-menu li a.vd-sidebar-active::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 9px;
    bottom: 9px;
    width: 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, #1f69b3, #20c760);
    box-shadow: 0 0 0 4px rgba(31, 105, 179, 0.10);
}

.valuedesign-polished-sidebar .vertical-nav-menu li a.vd-sidebar-active:hover {
    transform: translateX(2px);
}

.valuedesign-polished-sidebar .metismenu-icon {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eef8ff;
    color: var(--vd-blue) !important;
    font-size: 14px !important;
    box-shadow: inset 0 0 0 1px rgba(31, 105, 179, 0.10);
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.valuedesign-polished-sidebar .vertical-nav-menu li a:hover .metismenu-icon {
    background: #ffffff;
    color: var(--vd-green-dark) !important;
    box-shadow: 0 8px 18px rgba(32, 199, 96, 0.12);
}

.valuedesign-polished-sidebar .vertical-nav-menu li a.vd-sidebar-active .metismenu-icon {
    background: rgba(255, 255, 255, 0.95);
    color: var(--vd-green-dark) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
}

.valuedesign-polished-sidebar .vertical-nav-menu ul {
    padding: 6px 0 6px 18px !important;
    margin: 2px 0 4px 18px !important;
    border-left: 1px dashed rgba(32, 199, 96, 0.28);
}

.valuedesign-polished-sidebar .vertical-nav-menu ul li a {
    min-height: 38px;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 12px !important;
    border-radius: 11px;
}

.valuedesign-polished-sidebar .sidebar-brand-card {
    margin: 6px 4px 18px 4px;
    padding: 14px 14px 12px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff, #f5fff0);
    border: 1px solid rgba(32, 199, 96, 0.20);
    box-shadow: 0 14px 35px rgba(31, 105, 179, 0.09);
}

.valuedesign-polished-sidebar .sidebar-brand-card__name {
    margin: 0;
    color: var(--vd-ink);
    font-size: 14px;
    font-weight: 900;
}

.valuedesign-polished-sidebar .sidebar-brand-card__tagline {
    margin: 3px 0 0 0;
    color: var(--vd-muted);
    font-size: 11px;
    font-weight: 700;
}

.closed-sidebar .valuedesign-polished-sidebar .app-sidebar__heading,
.closed-sidebar .valuedesign-polished-sidebar .sidebar-brand-card {
    display: none !important;
}

.closed-sidebar .valuedesign-polished-sidebar .vertical-nav-menu li a {
    justify-content: center;
    padding: 10px !important;
    margin: 0 6px;
}

.closed-sidebar .valuedesign-polished-sidebar .vertical-nav-menu li a .metismenu-icon {
    margin: 0 !important;
}

@media (max-width: 991px) {
    .valuedesign-polished-sidebar .scrollbar-sidebar {
        padding: 14px 12px 18px 12px;
    }

    .valuedesign-polished-sidebar .vertical-nav-menu li a {
        min-height: 44px;
        font-size: 14px;
    }
}


/* Context-specific icon colours.
   These are assigned by static/js/valuedesign-sidebar.js based on the menu label. */
.valuedesign-polished-sidebar .vd-sidebar-icon--dashboard {
    background: #eef8ff;
    color: #1f69b3 !important;
    box-shadow: inset 0 0 0 1px rgba(31, 105, 179, 0.16);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--sales {
    background: linear-gradient(135deg, #ffffff, #e8ffd6);
    color: #0a8f42 !important;
    box-shadow: inset 0 0 0 1px rgba(32, 199, 96, 0.20);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--finance {
    background: #fff7df;
    color: #c06a00 !important;
    box-shadow: inset 0 0 0 1px rgba(243, 111, 33, 0.18);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--wallet {
    background: #ecfff4;
    color: #0a8f42 !important;
    box-shadow: inset 0 0 0 1px rgba(32, 199, 96, 0.20);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--products {
    background: #f2ecff;
    color: #6f42c1 !important;
    box-shadow: inset 0 0 0 1px rgba(111, 66, 193, 0.18);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--distributor {
    background: #eaf6ff;
    color: #0077b6 !important;
    box-shadow: inset 0 0 0 1px rgba(0, 119, 182, 0.18);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--orders {
    background: #fff2e8;
    color: #df6c18 !important;
    box-shadow: inset 0 0 0 1px rgba(223, 108, 24, 0.18);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--operations {
    background: #eff5ff;
    color: #3858d6 !important;
    box-shadow: inset 0 0 0 1px rgba(56, 88, 214, 0.16);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--reports {
    background: #eef8ff;
    color: #1f69b3 !important;
    box-shadow: inset 0 0 0 1px rgba(31, 105, 179, 0.16);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--quality {
    background: #ecfff4;
    color: #128a43 !important;
    box-shadow: inset 0 0 0 1px rgba(18, 138, 67, 0.20);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--card {
    background: #f0fff0;
    color: #168a2f !important;
    box-shadow: inset 0 0 0 1px rgba(22, 138, 47, 0.16);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--customer {
    background: #eaf6ff;
    color: #1f69b3 !important;
    box-shadow: inset 0 0 0 1px rgba(31, 105, 179, 0.16);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--merchant {
    background: #f3fff0;
    color: #0a8f42 !important;
    box-shadow: inset 0 0 0 1px rgba(32, 199, 96, 0.18);
}
.valuedesign-polished-sidebar .vd-sidebar-icon--risk {
    background: #fff0f0;
    color: #c0392b !important;
    box-shadow: inset 0 0 0 1px rgba(192, 57, 43, 0.18);
}

.valuedesign-polished-sidebar .vertical-nav-menu li a:hover .vd-sidebar-icon,
.valuedesign-polished-sidebar .vertical-nav-menu li a.vd-sidebar-active .vd-sidebar-icon {
    background: rgba(255, 255, 255, 0.96) !important;
    color: var(--vd-green-dark) !important;
}
