/* =========================================================
   SIMFAR SIDEBAR
   FINAL LAYOUT
   ========================================================= */

:root {
    --simfar-sidebar-bg: #0d4f56;
    --simfar-sidebar-bg-dark: #0a444a;
    --simfar-sidebar-text: #ffffff;
    --simfar-sidebar-muted: #b9d7d9;
    --simfar-sidebar-accent: #f4e84a;
    --simfar-sidebar-hover: rgba(255,255,255,0.08);
    --simfar-sidebar-active: rgba(255,255,255,0.14);
}


/* =========================================================
   SIDEBAR UTAMA
   ========================================================= */

.simfar-sidebar {
    position: fixed;
    top: 0;
    left: 0;

    width: 230px;
    height: 100vh;

    background: var(--simfar-sidebar-bg);
    color: var(--simfar-sidebar-text);

    display: flex;
    flex-direction: column;

    z-index: 1000;

    overflow: hidden;

    border-right: 1px solid rgba(255,255,255,0.08);

    box-sizing: border-box;
}


/* =========================================================
   BRAND
   ========================================================= */

.sidebar-brand {
    min-height: 128px;

    padding: 22px 18px 18px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    border-bottom: 1px solid rgba(255,255,255,0.10);

    box-sizing: border-box;
}


.brand-logo {
    width: 52px;
    height: 52px;

    margin-bottom: 9px;

    display: flex;
    align-items: center;
    justify-content: center;
}


.brand-logo img {
    width: 48px;
    height: 48px;

    object-fit: contain;

    display: block;
}


.brand-text {
    width: 100%;
}


.brand-name {
    color: #ffffff;

    font-size: 18px;
    font-weight: 800;

    line-height: 1.1;

    letter-spacing: 0.4px;

    margin-bottom: 5px;
}


.brand-subtitle {
    color: #d9eeee;

    font-size: 10px;
    font-weight: 500;

    line-height: 1.45;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.sidebar-nav {
    flex: 1;

    padding: 14px 10px;

    overflow-y: auto;
    overflow-x: hidden;

    box-sizing: border-box;
}


/* scrollbar */

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 10px;
}


/* =========================================================
   SECTION TITLE
   ========================================================= */

.nav-section-title {
    color: #bfe0e2;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.9px;

    padding: 15px 12px 7px;

    text-transform: uppercase;
}


/* =========================================================
   NAV ITEM
   ========================================================= */

.nav-item {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    min-height: 43px;

    padding: 0 12px;
    margin: 2px 0;

    box-sizing: border-box;

    color: #ffffff;

    text-decoration: none;

    border-radius: 8px;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}


.nav-item:hover {
    background: var(--simfar-sidebar-hover);

    color: #ffffff;

    text-decoration: none;
}


.nav-item.active {
    background: var(--simfar-sidebar-active);

    color: var(--simfar-sidebar-accent);

    font-weight: 700;
}


.nav-item.active::before {
    content: "";

    position: absolute;

    left: 0;
    top: 7px;
    bottom: 7px;

    width: 4px;

    background: var(--simfar-sidebar-accent);

    border-radius: 0 4px 4px 0;
}


/* =========================================================
   ICON
   ========================================================= */

.nav-icon {
    width: 28px;
    min-width: 28px;

    margin-right: 7px;

    display: flex;
    align-items: center;
    justify-content: center;
}


.nav-icon svg {
    width: 19px;
    height: 19px;

    stroke-width: 2;
}


.nav-item {
    color: #ffffff;
}


.nav-item .nav-icon {
    color: #d9eeee;
}


.nav-item:hover .nav-icon {
    color: #ffffff;
}


.nav-item.active .nav-icon {
    color: var(--simfar-sidebar-accent);
}


/* =========================================================
   LABEL
   ========================================================= */

.nav-label {
    flex: 1;

    font-size: 13px;
    font-weight: 600;

    line-height: 1.2;

    white-space: nowrap;

    color: inherit;
}


/* =========================================================
   BADGE NOTIFIKASI
   ========================================================= */

.nav-badge {
    min-width: 20px;
    height: 20px;

    padding: 0 5px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #ef4444;
    color: #ffffff;

    border-radius: 10px;

    font-size: 10px;
    font-weight: 800;
}


/* =========================================================
   USER FOOTER
   ========================================================= */

.sidebar-footer {
    padding: 12px 10px 14px;

    border-top: 1px solid rgba(255,255,255,0.10);

    background: var(--simfar-sidebar-bg-dark);

    box-sizing: border-box;
}


/* =========================================================
   USER CARD
   ========================================================= */

.sidebar-user-card {
    display: flex;
    align-items: center;

    min-height: 58px;

    padding: 8px 9px;

    margin-bottom: 8px;

    background: rgba(255,255,255,0.07);

    border-radius: 9px;

    box-sizing: border-box;
}


.sidebar-user-avatar {
    width: 34px;
    height: 34px;

    min-width: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 9px;

    background: var(--simfar-sidebar-accent);

    color: #16474c;

    border-radius: 50%;

    font-size: 11px;
    font-weight: 800;
}


.sidebar-user-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}


.sidebar-user-info strong {
    color: #ffffff;

    font-size: 11px;
    font-weight: 700;

    line-height: 1.3;

    white-space: nowrap;
}


.sidebar-user-info span {
    color: #b9d7d9;

    font-size: 9px;

    line-height: 1.3;

    white-space: nowrap;
}


/* =========================================================
   LOGOUT
   ========================================================= */

.logout-link {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 39px;

    padding: 0 11px;

    box-sizing: border-box;

    color: #ffd6d6;

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;

    border-radius: 7px;

    transition: background 0.18s ease;
}


.logout-link:hover {
    background: rgba(255,255,255,0.08);

    color: #ffffff;

    text-decoration: none;
}


.logout-icon {
    width: 25px;
    min-width: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 5px;
}


.logout-icon svg {
    width: 17px;
    height: 17px;
}


/* =========================================================
   FIX AGAR LINK TIDAK MENJADI BIRU DEFAULT BROWSER
   ========================================================= */

.simfar-sidebar a {
    color: inherit;
}


.simfar-sidebar a:visited {
    color: inherit;
}


.simfar-sidebar a:focus {
    outline: none;
}


/* =========================================================
   DESKTOP MAIN CONTENT
   ========================================================= */

.simfar-main {
    margin-left: 230px;
    width: calc(100% - 230px);

    min-height: 100vh;

    box-sizing: border-box;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .simfar-sidebar {
        width: 215px;
    }

    .simfar-main {
        margin-left: 215px;
        width: calc(100% - 215px);
    }

    .nav-label {
        font-size: 12px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .simfar-sidebar {
        width: 240px;

        transform: translateX(-100%);

        transition: transform 0.25s ease;
    }


    .simfar-sidebar.open {
        transform: translateX(0);
    }


    .simfar-main {
        margin-left: 0;
        width: 100%;
    }

}