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

body {
    font-family: var(--font-family-sans);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Base Layout Structure (From Reference Image) */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--color-sidebar);
    color: var(--color-text-inverse);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-6) 0;
    flex-shrink: 0;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    margin: var(--spacing-4) 0 var(--spacing-4) var(--spacing-4);
    height: calc(100vh - calc(var(--spacing-4) * 2));
}

.app-sidebar-logo {
    margin-bottom: var(--spacing-10);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    font-weight: bold;
}

.app-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);
    flex-grow: 1;
}

.nav-item {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-surface);
}

.nav-item.active {
    background-color: var(--color-surface);
    color: var(--color-text-main);
}

/* Main Content Area */
.app-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-8) var(--spacing-10);
    overflow-y: auto;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-8);
}

.header-title-container {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-size: var(--font-size-3xl);
    font-weight: 600;
}

.header-subtitle {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
}

.icon-button {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--color-surface);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--color-accent-light);
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Generic Card */
.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--spacing-6);
    box-shadow: var(--shadow-sm);
}

/* Mobile Utilities */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-text-main);
    cursor: pointer;
    padding: var(--spacing-2);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.mobile-overlay.active {
    display: block;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .app-main {
        padding: var(--spacing-6);
    }

    .header-title {
        font-size: var(--font-size-2xl);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 80px;
        margin: 0;
        border-radius: 0;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

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

    .app-main {
        padding: var(--spacing-4);
        width: 100vw;
    }

    .app-header {
        margin-bottom: var(--spacing-4);
        gap: var(--spacing-2);
    }

    .header-title-container {
        flex-grow: 1;
        overflow: hidden;
    }

    .header-title {
        font-size: var(--font-size-xl);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-subtitle {
        display: none;
    }
}