* {
    box-sizing: border-box;
}

:root {
    --sidebar-width: 270px;

    --sidebar-bg: #ffffff;
    --sidebar-border: #e8edf3;

    --sidebar-text: #536273;
    --sidebar-text-dark: #1d2a39;
    --sidebar-muted: #9aa5b1;

    --sidebar-primary: #1467b2;
    --sidebar-primary-dark: #0d4f91;
    --sidebar-primary-soft: #edf5fd;

    --sidebar-hover: #f5f8fc;

    --sidebar-shadow:
        0 0 25px rgba(30, 54, 78, 0.05);
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    width: var(--sidebar-width);
    height: 100vh;

    background: var(--sidebar-bg);

    border-right: 1px solid var(--sidebar-border);

    box-shadow: var(--sidebar-shadow);

    display: flex;
    flex-direction: column;

    z-index: 1000;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    transition: transform 0.25s ease;
}


/* =========================================================
   HEADER
   ========================================================= */

.sidebar-header {
    position: relative;

    min-height: 78px;

    padding: 16px 18px;

    display: flex;
    align-items: center;

    border-bottom: 1px solid var(--sidebar-border);
}


.sidebar-logo {
    width: 42px;
    height: 42px;

    min-width: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 12px;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--sidebar-primary),
            var(--sidebar-primary-dark)
        );
}


.sidebar-logo-text {
    color: #ffffff;

    font-size: 15px;
    font-weight: 800;

    letter-spacing: 0.5px;
}


.sidebar-brand {
    min-width: 0;

    display: flex;
    flex-direction: column;
}


.sidebar-brand h1 {
    margin: 0;

    color: var(--sidebar-text-dark);

    font-size: 16px;
    font-weight: 750;

    line-height: 1.2;
}


.sidebar-brand span {
    margin-top: 4px;

    color: var(--sidebar-muted);

    font-size: 10px;

    line-height: 1.2;
}


.sidebar-close {
    display: none;

    position: absolute;

    top: 18px;
    right: 14px;

    width: 34px;
    height: 34px;

    padding: 0;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: #667382;

    font-size: 27px;
    font-weight: 300;

    line-height: 1;

    cursor: pointer;
}


.sidebar-close:hover {
    background: #f1f4f7;

    color: #263442;
}


/* =========================================================
   BODY
   ========================================================= */

.sidebar-body {
    flex: 1;

    min-height: 0;
}


.sidebar-nav {
    width: 100%;
    height: 100%;

    padding: 14px 11px 24px;

    overflow-y: auto;
    overflow-x: hidden;
}


/* =========================================================
   SCROLLBAR
   ========================================================= */

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}


.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}


.sidebar-nav::-webkit-scrollbar-thumb {
    background: #d5dce4;

    border-radius: 20px;
}


.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #bac4cf;
}


/* =========================================================
   SECTION
   ========================================================= */

.sidebar-section {
    margin-bottom: 20px;
}


.sidebar-section-main {
    margin-bottom: 14px;
}


.sidebar-section-title {
    margin: 0 10px 7px;

    color: var(--sidebar-muted);

    font-size: 9px;
    font-weight: 750;

    letter-spacing: 1px;

    text-transform: uppercase;

    white-space: nowrap;
}


/* =========================================================
   MENU
   ========================================================= */

.sidebar-menu {
    position: relative;

    width: 100%;
    min-height: 43px;

    margin-bottom: 3px;
    padding: 0 12px;

    display: flex;
    align-items: center;

    border-radius: 9px;

    color: var(--sidebar-text);

    text-decoration: none;

    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}


.sidebar-menu:hover {
    background: var(--sidebar-hover);

    color: var(--sidebar-primary);
}


.sidebar-menu.active {
    background: var(--sidebar-primary-soft);

    color: var(--sidebar-primary);

    font-weight: 650;
}


.sidebar-menu.active::before {
    content: "";

    position: absolute;

    top: 10px;
    left: 0;

    width: 4px;
    height: 23px;

    border-radius: 0 5px 5px 0;

    background: var(--sidebar-primary);
}


/* =========================================================
   ICON
   ========================================================= */

.sidebar-menu-icon {
    width: 21px;
    height: 21px;

    min-width: 21px;

    margin-right: 13px;

    display: flex;
    align-items: center;
    justify-content: center;
}


.sidebar-menu-icon svg {
    width: 19px;
    height: 19px;

    display: block;

    fill: currentColor;
}


/* =========================================================
   TEXT
   ========================================================= */

.sidebar-menu-text {
    min-width: 0;

    flex: 1;

    font-size: 13px;
    font-weight: 500;

    line-height: 1.3;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.sidebar-menu.active .sidebar-menu-text {
    font-weight: 650;
}


/* =========================================================
   FOOTER
   ========================================================= */

.sidebar-footer {
    min-height: 74px;

    padding: 12px 16px;

    border-top: 1px solid var(--sidebar-border);

    background: #ffffff;
}


.sidebar-user {
    width: 100%;

    display: flex;
    align-items: center;
}


.sidebar-user-avatar {
    width: 39px;
    height: 39px;

    min-width: 39px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 11px;

    border-radius: 50%;

    background: var(--sidebar-primary-soft);

    color: var(--sidebar-primary);

    font-size: 14px;
    font-weight: 700;
}


.sidebar-user-detail {
    min-width: 0;

    display: flex;
    flex-direction: column;
}


.sidebar-user-detail strong {
    color: var(--sidebar-text-dark);

    font-size: 12px;
    font-weight: 650;

    line-height: 1.3;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.sidebar-user-detail span {
    margin-top: 3px;

    color: var(--sidebar-muted);

    font-size: 10px;

    line-height: 1.3;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================================
   OVERLAY
   ========================================================= */

.sidebar-overlay {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(15, 23, 42, 0.45);

    z-index: 990;
}


/* =========================================================
   LAYOUT HELPER
   ========================================================= */

.main-content {
    min-height: 100vh;

    margin-left: var(--sidebar-width);

    transition: margin-left 0.25s ease;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {

    .sidebar {
        transform: translateX(-100%);

        width: 270px;
    }


    .sidebar.sidebar-open {
        transform: translateX(0);
    }


    .sidebar-close {
        display: flex;

        align-items: center;
        justify-content: center;
    }


    .sidebar-overlay.sidebar-overlay-show {
        display: block;
    }


    .main-content {
        margin-left: 0;
    }

}