/* Sidebar */
.sidebar {
    grid-area: sidebar;
    background: var(--sys-color-background-surface);
    overflow-y: auto;
    transition: transform var(--transition-speed-normal) ease;
    position: relative;
}

/* Vertical divider for desktop mode only */
@media (min-width: 769px) {
    .sidebar::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 1px;
        background: linear-gradient(180deg, transparent 0%, var(--sys-color-border-subtle) 20%, var(--sys-color-border-subtle) 80%, transparent 100%);
    }

    [dir="rtl"] .sidebar::after {
        right: auto;
        left: 0;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: var(--header-height);
        inset-inline-start: 0;
        width: var(--sidebar-width);
        height: calc(100vh - var(--header-height));
        z-index: 50;
        transform: translateX(-100%);
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
    }

    [dir="rtl"] .sidebar {
        transform: translateX(100%);
        box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1);
    }

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