:root {
    --sidebar-width: 250px;
    --navbar-height: 60px;
    --transition-speed: 0.3s;
    --primary-color: #4a6fa5;
    --secondary-color: #166d67;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --sidebar-bg: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.dashboard-container.rtl {
    direction: rtl;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    transition: margin var(--transition-speed) ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content:not(.expanded) {
    margin-inline-start: var(--sidebar-width);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: transform var(--transition-speed) ease;
    overflow-y: auto;
}

.sidebar.left {
    left: 0;
}

.sidebar.right {
    right: 0;
}

.sidebar.hidden.left {
    transform: translateX(calc(-1 * var(--sidebar-width)));
}

.sidebar.hidden.right {
    transform: translateX(var(--sidebar-width));
}

.sidebar-content {
    padding: 1rem;
}

/* User Info */
.user-info {
    text-align: center;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.username {
    font-weight: 600;
    margin: 0;
    font-size: 1.1rem;
}

/* Navigation Links */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link,
.nav-sublink {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-sublink:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.nav-link .icon {
    margin-inline-end: 0.75rem;
    font-size: 1.1rem;
}

.nav-sublink {
    padding-inline-start: 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Navbar Styles */
.navbar {
    background-color: var(--primary-color);
    color: white;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    box-shadow: var(--shadow);
    z-index: 900;
    position: relative;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 auto;
}

.menu-btn,
.language-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.menu-btn:hover,
.language-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-icon {
    font-size: 1.2rem;
}

/* Content Area */
.content-area {
    flex-grow: 1;
    padding: 1rem;
}

.content-wrapper {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

/* Overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-content {
        margin-inline-start: 0 !important;
    }
}