:root {
    --navy: #1b2a41;
    --sidebar: #152238;
    --coral: #e0603f;
    --ink: #10203a;
    --page: #f6f8fb;
    --line: #d9e2ef;
    --sidebar-width: 17.5rem;
    --font: "Segoe UI", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--page);
}

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

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    height: 100vh;
    flex: none;
    background: var(--sidebar);
    border-right: 1px solid #24344d;
    z-index: 30;
}

.brand {
    display: flex;
    align-items: center;
    padding: 1.05rem 0.9rem 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand img {
    display: block;
    width: 11.75rem;
    height: auto;
}

.member {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 0.95rem 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.member-photo {
    width: 2.5rem;
    height: 2.5rem;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: inset 0 0 0 2px var(--sidebar);
}

.member-id {
    min-width: 0;
}

.member-name,
.member-mail,
.member-roles {
    margin: 0;
}

.member-name {
    color: #fff;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.55rem;
    margin-top: 0.15rem;
    padding: 0;
    list-style: none;
    color: #f07a5a;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
}

.member-mail {
    margin-top: 0.12rem;
    color: #91a3bc;
    font-size: 0.7rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.85rem 0.55rem 1.25rem;
    overflow: auto;
}

.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-label {
    margin: 0;
    padding: 0 0.7rem 0.35rem;
    color: #91a3bc;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 2.5rem;
    margin: 0.12rem 0;
    padding: 0.35rem 0.85rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #c7d4e6;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.nav-item svg {
    width: 1rem;
    height: 1rem;
    flex: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-item.is-active {
    background: rgba(22, 99, 246, 0.18);
    color: #d8e6ff;
    box-shadow: inset 0 0 0 1px rgba(91, 148, 255, 0.18);
}

.nav-item.is-active::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    bottom: 0.45rem;
    left: 0.35rem;
    width: 2px;
    border-radius: 999px;
    background: #1663f6;
}

.main {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    background: transparent;
}

.panel-head {
    padding: 1.5rem 1.5rem 0;
    border-bottom: 0;
}

.panel-head h1 {
    margin: 0;
    color: var(--navy);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.menu-button {
    display: none;
}

.backdrop {
    display: none;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-105%);
        transition: transform 160ms ease;
    }

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

    .menu-button {
        position: fixed;
        top: 0.75rem;
        left: 0.75rem;
        z-index: 20;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        border: 1px solid #d7dee8;
        border-radius: 4px;
        background: #fff;
        color: var(--ink);
        cursor: pointer;
    }

    .menu-button svg {
        width: 1.1rem;
        height: 1.1rem;
    }

    .backdrop {
        position: fixed;
        inset: 0;
        z-index: 25;
        display: none;
        border: 0;
        background: rgba(16, 24, 38, 0.45);
    }

    body.nav-open .backdrop {
        display: block;
    }
}
