﻿:root {
    --sidebar-width: 260px;
    --navbar-height: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    direction: @direction;
}

/* Navbar Styles */
.main-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    z-index: 1030;
    transition: all 0.3s ease;
}

[dir="rtl"] .main-navbar {
    left: 0;
    right: 0;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    bottom: 0;
    width: var(--sidebar-width);
    background: #2c3e50;
    color: #ecf0f1;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1020;
}

[dir="ltr"] .sidebar {
    left: 0;
}

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

.sidebar.collapsed {
    width: 0;
}

/* Main Content */
.main-content {
    margin-top: var(--navbar-height);
    transition: all 0.3s ease;
    min-height: calc(100vh - var(--navbar-height));
    padding: 20px;
}

[dir="ltr"] .main-content {
    margin-left: var(--sidebar-width);
}

[dir="rtl"] .main-content {
    margin-right: var(--sidebar-width);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 0;
    margin-right: 0;
}

/* Toggle Button */
.sidebar-toggle {
    background: none;
    border: none;
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

    .sidebar-toggle:hover {
        color: #007bff;
    }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    [dir="rtl"] .sidebar {
        transform: translateX(100%);
    }

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

    .main-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1019;
    }

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

/* Scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #34495e;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

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