:root {
    --primary-color: #4a90e2;
    --sidebar-width: 250px;
    --header-height: 60px;
    --sidebar-collapsed-width: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f6fa;
}

/* Layout */
.dashboard {
    display: grid;
    grid-template-areas:
        "sidebar header"
        "sidebar main";
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: var(--header-height) 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    background: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.sidebar-toggle:hover {
    background: #f0f2f5;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-item:hover {
    background: #f0f2f5;
    color: var(--primary-color);
}

.nav-item i {
    margin-right: 1rem;
    min-width: 16px;
}

.nav-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
    margin: 1.5rem 0 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-link {
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Header */
.header {
    grid-area: header;
    background: #fff;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Main Content */
.main {
    grid-area: main;
    padding: 2rem;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main";
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
    }

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

    .header {
        padding: 1rem;
    }

    .main {
        padding: 1rem;
    }
}

/* Utilities */
.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}