:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;
    --header-height: 60px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
}

.main-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 768px) {
    .main-container {
        max-width: 83.333333%;
    }
}

/* Header */
.header {
    background: #f8f9fa;
    padding: 0 1.5rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.hamburger-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #6b7280;
    transition: color 0.2s;
}

.hamburger-btn:hover {
    color: #111827;
}

/* Sidebar */
.sidebar {
    background: #f8f9fa;
    width: var(--sidebar-width);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-section {
    padding: 0.5rem 0;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.125rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.375rem 1rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
}

.nav-link:hover {
    color: #111827;
    font-weight: 600;
}

.nav-link.active {
    color: #2563eb;
    font-weight: 700;
}

.nav-link[aria-expanded="true"] {
    color: #111827;
    font-weight: 600;
}

.nav-link i {
    font-size: 1.25rem;
    width: 28px;
    min-width: 28px;
    text-align: center;
}

.nav-link-text {
    margin-left: 0.75rem;
    transition: opacity 0.3s;
}

.sidebar.collapsed .nav-link-text {
    opacity: 0;
    width: 0;
    margin: 0;
}

.nav-link .dropdown-arrow {
    margin-left: auto;
    font-size: 0.875rem;
    transition: transform 0.2s;
}

.sidebar.collapsed .nav-link .dropdown-arrow {
    display: none;
}

.nav-link[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}

.nav-submenu .nav-link {
    padding-left: 3.25rem;
    font-size: 0.875rem;
}

.sidebar.collapsed .nav-submenu {
    display: none;
}

/* Content */
.content-wrapper {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.main-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height));
}

.content-body {
    flex: 1;
    padding: 0.50rem 0 0 0;
}

.footer {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #2563eb;
}

/* Mobile: Sidebar as dropdown */
@media (max-width: 991.98px) {
    .sidebar {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        z-index: 99;
        transition: max-height 0.3s ease;
    }

    .sidebar.show {
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    .sidebar.collapsed {
        width: 100%;
    }

    .sidebar.collapsed .nav-link-text {
        opacity: 1;
        width: auto;
        margin-left: 0.75rem;
    }

    .sidebar.collapsed .nav-section-title {
        opacity: 1;
        height: auto;
        padding: 0.5rem 1rem;
    }
}

/* Desktop: Sidebar on left */
@media (min-width: 992px) {
    .content-wrapper {
        position: relative;
    }

    .sidebar {
        position: sticky;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    .sidebar.collapsed {
        width: 0;
        opacity: 0;
        visibility: hidden;
    }
}

/* User menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}