body {
    background: linear-gradient(180deg, #f6f4f6 0%, #eef3f8 100%);
}

.page-wrap {
    min-height: 100vh;
    padding: 76px 22px 28px 238px;
    color: #1f2937;
}

.page-inner {
    max-width: 1880px;
    margin: 0 auto;
}

.shell-masthead {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2200;
    padding: 8px 16px;
    background: rgba(246, 243, 245, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(203, 177, 186, 0.2);
}

.shell-masthead-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.shell-masthead-left,
.shell-masthead-right {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.shell-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 6px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(33, 100, 168, 0.18);
    box-shadow: 0 10px 22px rgba(91, 58, 69, 0.08);
    text-decoration: none;
}

.shell-brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    object-fit: cover;
    flex: 0 0 30px;
}

.shell-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.shell-brand-label {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
}

.shell-brand-name {
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shell-route-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.shell-route-title {
    color: #334155;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.shell-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(221, 200, 207, 0.9);
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.shell-utility,
.shell-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.shell-utility {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(221, 200, 207, 0.9);
    color: #475569;
}

.shell-logout {
    background: linear-gradient(135deg, #2164A8 0%, #0C335C 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgba(12, 51, 92, 0.14);
}

.shell-user-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(221, 200, 207, 0.9);
}

.shell-user-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(33, 100, 168, 0.12);
    color: #0C335C;
    font-size: 11px;
    font-weight: 800;
    flex: 0 0 auto;
}

.shell-user-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.shell-user-copy strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shell-user-copy span {
    color: #8c7981;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar {
    position: fixed;
    top: 76px;
    left: 18px;
    bottom: 18px;
    width: 202px;
    z-index: 2100;
    padding: 14px 12px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(33, 100, 168, 0.14);
    box-shadow: 0 22px 38px rgba(63, 41, 49, 0.12);
    backdrop-filter: blur(18px);
    transition: transform 0.3s ease;
}

.topbar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topbar-left {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topbar-left::-webkit-scrollbar {
    width: 6px;
}

.topbar-left::-webkit-scrollbar-thumb {
    background: rgba(33, 100, 168, 0.2);
    border-radius: 999px;
}

.topbar-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.topbar-group-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 6px;
    color: #0C335C;
    font-size: 12px;
    font-weight: 800;
}

.topbar-group-title i {
    width: 14px;
    text-align: center;
}

.topbar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.topbar-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 9px;
    border-radius: 14px;
    color: #475569;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.topbar-item a i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(33, 100, 168, 0.1);
    color: #0C335C;
    font-size: 13px;
    flex: 0 0 28px;
}

.topbar-item a span {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-item a:hover {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(33, 100, 168, 0.14);
    box-shadow: 0 14px 24px rgba(82, 53, 63, 0.08);
}

.topbar-item.is-active a {
    background: linear-gradient(135deg, #2164A8 0%, #0C335C 100%);
    color: #fff;
    box-shadow: 0 16px 28px rgba(12, 51, 92, 0.18);
}

.topbar-item.is-active a i {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.topbar-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(221, 200, 207, 0.9);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    font-size: 18px;
    cursor: pointer;
    flex: 0 0 42px;
}

.topbar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(33, 24, 29, 0.36);
    z-index: 2050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.topbar.is-open + .topbar-overlay {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1280px) {
    .page-wrap {
        padding-left: 272px;
    }

    .topbar {
        width: 228px;
    }
}

@media (max-width: 1080px) {
    .shell-route-meta {
        gap: 8px;
    }

    .shell-route-title {
        display: none;
    }

    .page-wrap {
        padding-left: 258px;
        padding-right: 20px;
    }

    .topbar {
        width: 214px;
    }
}

@media (max-width: 860px) {
    .shell-masthead {
        padding: 8px 12px;
    }

    .shell-route-meta,
    .shell-utility,
    .shell-user-copy span {
        display: none;
    }

    .shell-user-meta {
        padding-right: 10px;
    }
}

@media (max-width: 640px) {
    .page-wrap {
        padding: 68px 14px 18px;
    }

    .shell-masthead-right {
        gap: 8px;
    }

    .shell-user-copy,
    .shell-utility span,
    .shell-logout span {
        display: none;
    }

    .shell-utility,
    .shell-logout {
        width: 40px;
        padding: 0;
        justify-content: center;
    }

    .topbar-toggle {
        display: inline-flex;
    }

    .topbar {
        top: 68px;
        left: 12px;
        bottom: 12px;
        width: min(284px, calc(100vw - 24px));
        transform: translateX(calc(-100% - 20px));
    }

    .topbar.is-open {
        transform: translateX(0);
    }
}
