:root {
    --header-height: 56px;
    --sidebar-width: 230px;
    --sidebar-collapsed-width: 80px;
    --border: rgba(0,0,0,.08);
}

/* ================= BASE ================= */
body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
}

/* ================= SIDEBAR ================= */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: width .25s ease, left .25s ease;
    z-index: 1020;
}

#sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    color: #000;
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-menu a:hover {
     background-color: rgba(13, 110, 253, 0.1); 
    color: #ff0000;
}

.sidebar-menu i {
    min-width: 24px;
    text-align: center;
}

/* submenu */
.sidebar-menu ul {
    list-style: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
}

.has-submenu.active > ul {
    max-height: 500px;
}

.submenu-arrow {
    margin-left: auto;
    transition: transform .25s ease;
}

.has-submenu.active .submenu-arrow {
    transform: rotate(-180deg);
}

/* collapsed */
#sidebar.collapsed .menu-text,
#sidebar.collapsed .submenu-arrow {
    display: none;
}

#sidebar.collapsed a {
    justify-content: center;
    padding: 12px 0;
}

.sidebar-logout {
    border-top: 1px solid var(--border);
}
/* Center header text when sidebar is collapsed */
#sidebar.collapsed .sidebar-header {
    justify-content: center;
    text-align: center;
    padding: 0;
}
/* ================= HEADER ================= */
.header {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    transition: left .25s ease;
    z-index: 1030;
}

#sidebar.collapsed ~ .header {
    left: var(--sidebar-collapsed-width);
}

/* ================= CONTENT ================= */
#content {
    margin-left: var(--sidebar-width);
    padding: calc(var(--header-height) + 20px) 20px 20px;
    transition: margin-left .25s ease;
}

#sidebar.collapsed ~ #content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ================= MOBILE ================= */
#sidebarOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: none;
    z-index: 1015;
}

#sidebarOverlay.show {
    display: block;
}

@media (max-width: 991.98px) {
    #sidebar {
        left: -100%;
        width: var(--sidebar-width);
    }

    #sidebar.active {
        left: 0;
    }

    .header {
        left: 0;
    }

    #content {
        margin-left: 0;
    }
}
/*footer*/
/* ================= FOOTER ================= */
.page-footer {
    margin-top: 40px;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: #fff;
}

.footer-inner {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}
/* ================= COLLAPSED ICON SIZE ================= */
#sidebar.collapsed .sidebar-menu i {
    font-size: 20px;        /* increase icon size */
    line-height: 1;
}

/* Optional: make collapsed items taller & nicer */
#sidebar.collapsed .sidebar-menu a {
    padding: 16px 0;
}

/* Optional: smooth icon scaling */
.sidebar-menu i {
    transition: font-size 0.25s ease;
}
/* Sidebar menu active - light background */
.sidebar-menu a.active {
    background-color: rgba(13, 110, 253, 0.1); /* very light blue */
    color: #0b5ed7;                             /* primary blue text */
    font-weight: 500;                           /* semi-bold */
}

.sidebar-menu a.active i {
    color: #0b5ed7;                             /* primary blue icon */
}

.sidebar-menu a.active:hover {
    background-color: rgba(13, 110, 253, 0.15); /* slightly darker light blue on hover */
}
