:root {
    --navigation-ink: #172033;
    --navigation-line: #e4e8f0;
    --navigation-primary-soft: #fff3d6;
    --navigation-primary: #9a5a00;
    --navigation-danger: #c63f4f;
}

body {
    min-width: 320px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.app-shell {
    display: grid !important;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.app-shell > main {
    min-width: 0;
    width: 100%;
    padding: 42px clamp(24px, 4vw, 64px) 64px !important;
    overflow-y: visible !important;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    height: 100vh;
    flex-direction: column;
    padding: 28px 22px 22px;
    border-right: 1px solid var(--navigation-line);
    background: rgba(255, 255, 255, 0.96);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 34px;
    color: var(--navigation-ink);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.brand-logo {
    display: block;
    width: 34px;
    height: 34px;
    flex: none;
    object-fit: contain;
}

.session-user {
    min-width: 0;
    margin: -20px 0 22px;
    padding: 0 12px;
}

.session-user-label {
    display: block;
    color: #98a2b3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.session-user-name {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    color: #4f5a70;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

.nav a {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 11px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    color: #667085;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.nav a:hover {
    background: #f2f4f8;
    color: var(--navigation-ink);
}

.nav a[aria-current="page"] {
    background: var(--navigation-primary-soft);
    color: var(--navigation-primary);
    font-weight: 700;
}

.nav a i {
    flex: none;
    font-size: 18px;
}

.logout-button {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--navigation-line);
    border-radius: 8px;
    background: #fff;
    color: #4f5a70;
    font-weight: 600;
}

.logout-button:hover {
    background: #fafbfc;
    color: var(--navigation-danger);
}

.mobile-header,
.drawer-scrim {
    display: none;
}

@media (max-width: 899px) {
    .app-shell {
        display: block !important;
    }

    .mobile-header {
        position: sticky;
        top: 0;
        z-index: 35;
        display: flex;
        height: 60px;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        border-bottom: 1px solid var(--navigation-line);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(14px);
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 9px;
        color: var(--navigation-ink);
        font-family: Helvetica, Arial, sans-serif;
        font-size: 14px;
        font-weight: 700;
    }

    .mobile-menu {
        display: grid;
        width: 39px;
        height: 39px;
        place-items: center;
        padding: 0;
        border: 1px solid var(--navigation-line);
        border-radius: 8px;
        background: #fff;
        color: var(--navigation-ink);
        font-size: 20px;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(290px, 86vw);
        transform: translateX(-102%);
        transition: transform 220ms ease;
        box-shadow: 20px 0 45px rgba(21, 30, 50, 0.14);
    }

    body.drawer-open {
        overflow: hidden;
    }

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

    .drawer-scrim {
        position: fixed;
        inset: 0;
        z-index: 45;
        border: 0;
        background: rgba(20, 28, 45, 0.38);
    }

    body.drawer-open .drawer-scrim {
        display: block;
    }

    .app-shell > main {
        padding: 27px 16px 48px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar {
        transition-duration: 0.01ms;
    }
}
