/* =====================================================
   SIDEBAR COMPONENT (TEMA SOKKOOL)
===================================================== */

.sidebar {
    width: 260px; /* Sedikit dilebarkan agar teks "Coliving & Coworking Canggu" muat */
    height: 100vh;
    background: #FFFFFF; /* Background Putih Bersih */
    border-right: 1px solid #FEF3C7; /* Border Kuning Pastel */
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 2px 0 15px rgba(180, 83, 9, 0.03); /* Shadow warm tipis */
}

.sidebar-header {
    height: 76px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #FEF3C7;
}

.sidebar-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: transparent; /* Transparan karena pakai gambar PNG */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-brand { 
    margin-left: 12px; 
    min-width: 0; 
}

.sidebar-title {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    color: #171717; /* Teks Gelap */
    white-space: nowrap;
}

.sidebar-subtitle {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 500;
    color: #6B7280; /* Abu-abu Netral */
    line-height: 14px;
    white-space: nowrap;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

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

.sidebar-menu-item {
    width: 100%;
    height: 44px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    cursor: pointer;
    color: #4B5563; /* Abu-abu gelap */
    font-family: inherit;
    transition: background .15s ease, color .15s ease;
    margin-bottom: 2px;
}

.sidebar-menu-item:hover { 
    background: #FFFBEB; /* Kuning Soft saat hover */
    color: #FE8A3B; /* Teks jadi Oranye */
}

.sidebar-menu-item.active { 
    background: #FE8A3B; /* Tombol aktif solid Oranye */
    color: #FFFFFF; 
}

.sidebar-menu-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-menu-label {
    margin-left: 12px;
    font-size: 13px;
    font-weight: 600;
    flex: 1;
    text-align: left;
}

.sidebar-menu-item.active .sidebar-menu-label { font-weight: 700; }

/* =====================================================
   PARENT ITEM (has submenu)
===================================================== */

.sidebar-menu-item-parent {
    position: relative;
}

.sidebar-menu-item-parent.has-active-child {
    color: #FE8A3B;
    background: #FFFBEB;
}

.sidebar-menu-item-parent.has-active-child:hover {
    background: #FEEA93;
}

.sidebar-menu-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #9CA3AF;
    transition: transform 0.2s ease, color 0.15s ease;
    flex-shrink: 0;
}

.sidebar-menu-item-parent:hover .sidebar-menu-chevron { 
    color: #FE8A3B; 
}

.sidebar-menu-group.expanded .sidebar-menu-chevron {
    transform: rotate(180deg);
    color: #FE8A3B;
}

/* =====================================================
   SUBMENU
===================================================== */

.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    padding-left: 8px;
    margin-left: 12px;
    border-left: 2px solid #FEF3C7; /* Garis vertikal kuning pastel */
}

.sidebar-menu-group.expanded .sidebar-submenu {
    max-height: 250px; /* Diperbesar agar submenu tidak terpotong */
    margin-bottom: 4px;
}

.sidebar-submenu-item {
    width: 100%;
    height: 38px;
    border: 0;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: pointer;
    color: #6B7280;
    font-family: inherit;
    transition: background .15s ease, color .15s ease;
    margin-bottom: 2px;
}

.sidebar-submenu-item:hover {
    background: #FFFBEB;
    color: #FE8A3B;
}

.sidebar-submenu-item.active {
    background: #FE8A3B;
    color: #FFFFFF;
}

.sidebar-submenu-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.85;
}

.sidebar-submenu-icon svg {
    width: 14px;
    height: 14px;
}

.sidebar-submenu-label {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 500;
    flex: 1;
    text-align: left;
}

.sidebar-submenu-item.active .sidebar-submenu-label { font-weight: 600; }

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

.sidebar-user {
    padding: 16px;
    border-top: 1px solid #FEF3C7;
    background: #FFFFFF;
    flex-shrink: 0;
}

.sidebar-user-info { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 12px; 
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #FEEA93; /* Kuning */
    color: #FE8A3B; /* Oranye */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.sidebar-user-details { min-width: 0; flex: 1; }

.sidebar-user-name {
    color: #171717;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: #6B7280;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    background: #FFFFFF;
    color: #6B7280;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sidebar-logout-btn:hover { 
    background: #FEF2F2; /* Merah soft untuk peringatan logout */
    border-color: #FECACA; 
    color: #DC2626; 
}

.sidebar-logout-btn:active { 
    transform: scale(0.98); 
}

.sidebar-logout-btn svg { flex-shrink: 0; }

/* =====================================================
   SCROLLBAR (Khusus Sidebar)
===================================================== */
.sidebar-menu::-webkit-scrollbar { width: 6px; }
.sidebar-menu::-webkit-scrollbar-track { background: transparent; }
.sidebar-menu::-webkit-scrollbar-thumb { 
    background: #E5E7EB; 
    border-radius: 10px; 
}
.sidebar-menu::-webkit-scrollbar-thumb:hover { 
    background: #FE8A3B; 
}

/* =====================================================
   RESPONSIVE — COLLAPSED SIDEBAR
===================================================== */
@media (max-width: 768px) {
    .sidebar { width: 72px; }
    .sidebar-brand { display: none; }
    .sidebar-header { justify-content: center; padding: 0; }
    .sidebar-menu-label { display: none; }
    .sidebar-menu-item { justify-content: center; padding: 0; }
    .sidebar-menu-chevron { display: none; }
    .sidebar-submenu { display: none; }
}