/**
 * SAGEDESK PLATFORM - LIGHT GLASSY SIDEBAR V3 (FLOATING CAPSULE DESIGN)
 * File Location: /assets/css/style_sidebar.css
 */

:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 76px;
    
    /* 🌟 Palet Warna Terang & Kaca Transparan Cemerlang */
    --glass-bg: rgba(255, 255, 255, 0.75); 
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-glow: rgba(2, 132, 199, 0.15);
    
    /* Warna Teks & Hover Terang */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --sidebar-hover: rgba(2, 132, 199, 0.08);
}

body {
    padding-left: calc(var(--sidebar-width) + 1.5rem);
    transition: padding-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f1f5f9; /* Latar belakang terang cerah */
}

body.sidebar-collapsed {
    padding-left: calc(var(--sidebar-collapsed-width) + 1.5rem);
}

/* 🛡️ FLOATING LIGHT GLASSY SIDEBAR CONTAINER */
.sage-sidebar {
    position: fixed;
    top: 1rem;
    left: 1rem;
    bottom: 1rem;
    width: var(--sidebar-width);
    background: var(--glass-bg);
    
    /* Ultra Glass Backdrop Blur */
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    
    /* Border Putih Bersinar & Sudut Membulat Capsule V3 */
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    z-index: 1040;
    
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08), 
                inset 0 1px 2px rgba(255, 255, 255, 0.9);
    overflow: visible;
}

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

/* 🔴🟡🟢 MAC-STYLE DOTS HEADER & TOGGLE BUTTON */
.sidebar-header {
    padding: 1.25rem 1rem 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.mac-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 0.25rem;
}

.mac-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.mac-dot.red { background-color: #ef4444; }
.mac-dot.yellow { background-color: #f59e0b; }
.mac-dot.green { background-color: #10b981; }

/* 🔘 TOMBOL TOGGLE FLOATING BUNDAR DI TEPI KANAN */
#desktopSidebarCollapse {
    position: absolute;
    right: -12px;
    top: 24px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 1050;
}

#desktopSidebarCollapse:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    transform: scale(1.1);
}

/* BRAND LOGO AREA */
.brand-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
}

/* Teks Brand Terang & Kontras */
.brand-text .brand-title {
    color: var(--text-primary) !important;
    font-weight: 800;
}

.brand-text .brand-subtitle {
    color: #0284c7 !important;
    font-weight: 700;
}

/* SEMBUNYIKAN TEKS PADA MODE CIUT */
body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .sidebar-group-title,
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .operator-info,
body.sidebar-collapsed .status-badge-container {
    opacity: 0 !important;
    pointer-events: none !important;
    display: none !important;
}

/* 🗂️ NAVIGASI MENU ITEM */
.sidebar-nav {
    padding: 0.75rem 0.5rem;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-group-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 1rem 0 0.4rem 0.75rem;
    text-align: left;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 700;
    border-radius: 14px;
    margin-bottom: 0.35rem;
    transition: all 0.25s ease;
    white-space: nowrap;
}

body.sidebar-collapsed .sidebar-nav-item {
    justify-content: center;
    padding: 0.75rem 0;
}

.sidebar-nav-item:hover {
    color: #0284c7;
    background: var(--sidebar-hover);
    transform: translateY(-1px);
}

/* Menu Aktif dengan Efek Cyan-Blue Gradient Terang */
.sidebar-nav-item.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border: 1px solid rgba(2, 132, 199, 0.3);
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.25);
}

.sidebar-nav-item.active i {
    color: #ffffff !important;
}

.sidebar-nav-item i {
    font-size: 1.15rem;
    min-width: 22px;
    text-align: center;
}

/* 👤 FOOTER USER CARD LIGHT GLASSY */
.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 0 0 24px 24px;
}

.operator-card-sidebar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

body.sidebar-collapsed .operator-card-sidebar {
    justify-content: center;
    padding: 0.4rem;
}

.operator-avatar-sidebar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #ffffff;
    font-weight: 800;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2);
}

.operator-info .user-title {
    color: var(--text-muted) !important;
    font-size: 8px;
    font-weight: 800;
    display: block;
}

.operator-info .user-name {
    color: var(--text-primary) !important;
    font-weight: 800;
    font-size: 11px;
    display: block;
}

/* RESPONSIVE MOBILE */
@media (max-width: 991.98px) {
    body { padding-left: 0 !important; }
    .sage-sidebar {
        top: 0; left: 0; bottom: 0;
        border-radius: 0;
        transform: translateX(-100%);
        background: #ffffff;
    }
    body.sidebar-open .sage-sidebar {
        transform: translateX(0);
        width: var(--sidebar-width) !important;
    }
}