/* App header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(to right, var(--color-primary-light) 0%, var(--color-primary-dark) 100%);
    padding: 0 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: var(--shadow-header);
}

.app-header a {
    color: white;
    text-decoration: none;
}

.app-header a:hover {
    text-decoration: underline;
}

.app-header__left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Sidebar */
.app-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100% - var(--header-height));
    background: linear-gradient(to right, var(--color-primary-light) 0%, var(--color-primary-dark) 100%);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    z-index: 900;
    transition: transform 0.2s ease;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.nav-list li {
    margin: 10px 0;
    padding: 0 20px;
}

.nav-list li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-family);
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
}

.nav-list li a:hover {
    background: linear-gradient(to right, var(--color-primary-light) 0%, var(--color-primary-gradient-end) 100%);
    color: black;
    text-decoration: none;
}

.nav-list li a.is-active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-bottom {
    margin-top: auto;
    padding-bottom: 20px;
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 850;
}

.sidebar-overlay.is-visible {
    display: block;
}

/* Main content area */
.main-content {
    margin-left: var(--sidebar-width);
    padding: calc(var(--header-height) + 40px) var(--space-xl) var(--space-xl);
    max-width: 1100px;
    box-sizing: border-box;
}

.main-content--wide {
    max-width: 100%;
}

.main-content--narrow {
    max-width: 900px;
}

/* Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: calc(var(--header-height) + 20px) var(--space-md) var(--space-md);
    }
}

/* Legacy header/sidebar support during transition */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(to right, var(--color-primary-light) 0%, var(--color-primary-dark) 100%);
    padding: 0 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: var(--shadow-header);
}

.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100% - var(--header-height));
    background: linear-gradient(to right, var(--color-primary-light) 0%, var(--color-primary-dark) 100%);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    z-index: 900;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.table-actions button,
.table-actions a {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 5px;
    white-space: nowrap;
}

.table-actions .ban-btn {
    background: var(--color-danger);
    color: white;
    border: none;
}

.table-actions .promote-btn {
    background: var(--color-info);
    color: white;
    border: none;
}
