/* Apple-inspired sidebar navigation */

.vms-shell {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.vms-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.vms-sidebar-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.vms-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    width: 15.5rem;
    height: 100%;
    height: 100dvh;
    background: rgba(251, 251, 252, 0.92);
    border-right: 0.5px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.06);
}

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

@media (min-width: 1024px) {
    .vms-sidebar {
        transform: translateX(0);
        box-shadow: none;
    }

    .vms-sidebar-backdrop {
        display: none;
    }
}

.vms-sidebar-brand {
    flex-shrink: 0;
    padding: 1.125rem 1rem 0.875rem;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}

.vms-sidebar-brand > a {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #1d1d1f;
    text-decoration: none;
    line-height: 1.3;
}

.vms-sidebar-brand > a span {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #86868b;
    letter-spacing: 0.01em;
}

.vms-sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0.625rem;
    -webkit-overflow-scrolling: touch;
}

.vms-sidebar-section {
    margin-bottom: 1.25rem;
}

.vms-sidebar-section:last-child {
    margin-bottom: 0.5rem;
}

.vms-sidebar-label {
    padding: 0 0.5rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #86868b;
}

.vms-sidebar-label--icon {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    padding: 0 0.375rem 0.4375rem;
}

.vms-sidebar-label--icon svg {
    flex-shrink: 0;
    width: 0.875rem;
    height: 0.875rem;
    opacity: 0.55;
    color: #86868b;
}

.vms-sidebar-label--icon span {
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.vms-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    margin-bottom: 0.125rem;
    padding: 0.5rem 0.625rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: #1d1d1f;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    touch-action: manipulation;
}

.vms-sidebar-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1d1d1f;
}

.vms-sidebar-link.is-active {
    background: rgba(0, 122, 255, 0.12);
    color: #007aff;
    font-weight: 600;
}

.vms-sidebar-link.is-accent {
    color: #248a3d;
    font-weight: 600;
}

.vms-sidebar-link.is-accent:hover {
    background: rgba(36, 138, 61, 0.1);
    color: #1d7a34;
}

.vms-sidebar-link.is-accent.is-active {
    background: rgba(36, 138, 61, 0.14);
    color: #1d7a34;
}

.vms-sidebar-link svg {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    opacity: 0.72;
}

.vms-sidebar-link.is-active svg,
.vms-sidebar-link.is-accent svg {
    opacity: 1;
}

.vms-sidebar-submenu {
    margin: 0.125rem 0 0.375rem 1.75rem;
    padding-left: 0.625rem;
    border-left: 1.5px solid rgba(0, 0, 0, 0.08);
}

.vms-sidebar-submenu .vms-sidebar-link {
    font-size: 0.78125rem;
    padding: 0.4375rem 0.5rem;
}

.vms-sidebar-footer {
    flex-shrink: 0;
    padding: 0.75rem 0.875rem;
    border-top: 0.5px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.5);
}

.vms-sidebar-user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vms-sidebar-user-meta {
    margin-top: 0.125rem;
    font-size: 0.6875rem;
    color: #86868b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vms-sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.625rem;
    padding: 0.5rem 0.75rem;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.5rem;
    background: #fff;
    color: #1d1d1f;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.vms-sidebar-logout:hover {
    background: rgba(0, 0, 0, 0.04);
}

.vms-main {
    flex: 1;
    min-width: 0;
    min-height: 100dvh;
    background: #f5f5f7;
}

@media (min-width: 1024px) {
    .vms-main {
        margin-left: 15.5rem;
    }

    .vms-guest-shell .vms-main {
        margin-left: 0;
    }
}

.vms-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.25rem;
    padding: 0.5rem 1rem;
    background: rgba(245, 245, 247, 0.82);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

@media (min-width: 1024px) {
    .vms-topbar {
        display: none;
    }
}

.vms-topbar-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
    cursor: pointer;
    touch-action: manipulation;
}

.vms-topbar-menu:hover {
    background: rgba(0, 0, 0, 0.08);
}

.vms-topbar-title {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #1d1d1f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vms-content {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
}

@media (min-width: 640px) {
    .vms-content {
        padding: 1.5rem 1.5rem 2.5rem;
    }
}
