﻿/* ===============================
   ISoft ERP – TOP STRIP
   (ReMeBox Inspired)
   =============================== */

.erp-topbar {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    background: linear-gradient( to right, #1e40af, #2563eb, #0d9488 );
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.erp-topbar-left {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.erp-topbar-center {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.95;
}

.erp-topbar-right {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
}


/* ===============================
   SIDEBAR – TREE MENU (FINAL)
   Dark–Light Professional ERP
   =============================== */

.inv-main {
    flex: 1; /* take remaining space */
    min-width: 0; /* prevent overflow bug */
    padding: 12px;
    overflow-y: auto;
}

/* RESET */
.inv-menu,
.inv-menu ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

    /* TOP-LEVEL MODULE TITLE
   Dashboard, Masters, Inventory, Accounts */
    .inv-menu > li > .menu-parent {
        display: block;
        background: #e5e7eb; /* light dark-grey */
        color: #111827; /* near black */
        font-weight: 600;
        padding: 8px 10px;
        margin: 6px 4px 4px 4px;
        border-radius: 4px;
        border-left: 4px solid #4b5563; /* neutral dark */
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: 0.4px;
    }

    /* SECOND-LEVEL PARENT
   Item, Business, Transactions, Reports */
    .inv-menu li li > .menu-parent {
        background: #f3f4f6;
        color: #1f2937;
        border-left: 3px solid #9ca3af;
        font-weight: 500;
        padding: 7px 10px;
        margin-left: 8px;
        border-radius: 4px;
    }

    /* MENU LINKS */
    .inv-menu a {
        display: block;
        padding: 6px 10px 6px 22px;
        color: #1f2937;
        text-decoration: none;
        font-size: 12px;
        border-radius: 4px;
    }

    /* THIRD LEVEL LINKS */
    .inv-menu li li li a {
        padding-left: 34px;
        font-size: 11.5px;
        color: #374151;
    }

    /* HOVER – DARK BUT SOFT */
    .inv-menu a:hover {
        background: #d1d5db;
        color: #111827;
    }

    /* SPACING BETWEEN MODULES */
    .inv-menu > li {
        margin-bottom: 8px;
    }
/* FIX: Sidebar independent scroll */
.inv-sidebar {
    width: 220px;
    min-width: 220px;
    max-width: 220px; /* 🔒 prevent expansion */
    flex-shrink: 0; /* 🔒 do not shrink */
    overflow-y: auto;
    overflow-x: hidden;
}
.inv-menu a {
    padding: 5px 10px 5px 22px; /* reduced height */
}

.inv-menu > li > .menu-parent {
    padding: 7px 10px;
}
/* ===============================
   MAIN LAYOUT SHELL (FIX)
   =============================== */
.inv-shell {
    display: flex; /* 🔥 THIS IS THE KEY */
    width: 100%;
    height: calc(100vh - 48px); /* minus header */
}
/* ===============================
   TREE MENU – COLLAPSE MODE
   =============================== */

/* hide all submenus by default */
.inv-menu ul {
    display: none;
}

/* show when active */
.inv-menu li.open > ul {
    display: block;
}

/* cursor indicator for expandable items */
.menu-parent {
    cursor: pointer;
    position: relative;
}

    /* arrow indicator */
    .menu-parent::after {
        content: "▸";
        position: absolute;
        right: 10px;
        font-size: 12px;
        transition: transform 0.2s ease;
    }

/* arrow down when open */
.inv-menu li.open > .menu-parent::after {
    transform: rotate(90deg);
}
