﻿.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-content {
    flex: 1;
    min-width: 0;
    padding: 32px 36px;
}

/* ---------- Sidebar ---------- */

.nav-menu {
    width: 232px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    min-height: 100vh;
    position: sticky;
    top: 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 26px;
    font-weight: 650;
    font-size: 14.5px;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.nav-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.nav-section {
    margin-bottom: 18px;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--graphite);
    padding: 0 10px;
    margin: 4px 0 8px;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--graphite);
    text-decoration: none;
    margin-bottom: 2px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .nav-link i {
        font-size: 15px;
        width: 16px;
        text-align: center;
    }

    .nav-link:hover {
        background: var(--surface-muted);
        color: var(--ink);
    }

    .nav-link.active {
        background: var(--accent-soft);
        color: #8a5a1a;
        font-weight: 600;
    }

        .nav-link.active::before {
            content: "";
            position: absolute;
            left: 0;
            top: 8px;
            bottom: 8px;
            width: 3px;
            border-radius: 3px;
            background: var(--accent);
        }

.nav-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--hairline);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 12px;
}

.nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: #8a5a1a;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-username {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: none;
    color: var(--graphite);
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .nav-logout:hover {
        background: var(--surface-muted);
        color: var(--danger);
    }

/* ---------- Login layout ---------- */

.login-layout {
    min-height: 100vh;
}

@media (max-width: 860px) {
    .app-shell {
        flex-direction: column;
    }

    .nav-menu {
        width: 100%;
        min-height: auto;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 14px 16px;
    }

    .nav-brand {
        padding: 0 12px 0 0;
    }

    .nav-section {
        display: flex;
        gap: 4px;
        margin-bottom: 0;
    }

    .nav-section-title {
        display: none;
    }

    .nav-footer {
        margin-left: auto;
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }

    .app-content {
        padding: 20px;
    }
}
