.app-layout {
    display: flex;
    min-height: calc(100vh - 68px);
    position: relative;
}

.app-content-shell {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-sidebar-modern {
    width: 320px;
    min-width: 320px;
    background:
        radial-gradient(circle at top left, rgba(48, 84, 174, 0.26), transparent 34%),
        linear-gradient(180deg, #081224 0%, #0a1730 50%, #09152a 100%);
    color: #dbe7ff;
    border-right: 1px solid rgba(124, 150, 213, 0.16);
    position: sticky;
    top: 68px;
    height: calc(100vh - 68px);
    z-index: 1040;
    box-shadow: 20px 0 40px rgba(2, 6, 23, 0.22);
}

.app-sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.app-sidebar-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem 0;
}

.app-sidebar-brandline {
    padding: 1.1rem 1.15rem 0.35rem;
}

.app-sidebar-kicker {
    color: rgba(191, 208, 255, 0.7);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.app-sidebar-title {
    color: #f6fbff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 0.3rem;
}

.app-sidebar-scroll {
    overflow-y: auto;
    padding: 0.6rem 0.85rem 1.2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 144, 212, 0.42) transparent;
}

.app-sidebar-scroll::-webkit-scrollbar {
    width: 7px;
}

.app-sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(120, 144, 212, 0.38);
    border-radius: 999px;
}

.sidebar-group-card {
    margin-bottom: 0.7rem;
    border-radius: 18px;
    border: 1px solid rgba(120, 144, 212, 0.11);
    background: rgba(11, 23, 48, 0.56);
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-group-card.is-active,
.sidebar-group-card.is-open {
    background: rgba(11, 25, 52, 0.78);
    border-color: rgba(110, 146, 255, 0.2);
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.18);
}

.sidebar-parent {
    width: 100%;
    border: 0;
    background: transparent;
    color: #e4edff;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    text-align: left;
    font-size: 0.98rem;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-parent:hover {
    background: rgba(56, 101, 214, 0.1);
    color: #ffffff;
}

.sidebar-parent-icon,
.sidebar-child-icon,
.sidebar-chevron-icon,
.sidebar-toggle-icon,
.sidebar-close-icon {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

.sidebar-parent-icon {
    color: rgba(211, 225, 255, 0.88);
}

.sidebar-parent-label {
    flex: 1;
    min-width: 0;
}

.sidebar-parent-chevron {
    color: rgba(173, 192, 241, 0.72);
    display: inline-flex;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar-group-card.is-open .sidebar-parent-chevron {
    transform: rotate(90deg);
    color: #f8fbff;
}

.sidebar-children {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.22s ease, opacity 0.22s ease;
}

.sidebar-group-card.is-collapsed .sidebar-children {
    grid-template-rows: 0fr;
    opacity: 0;
}

.sidebar-children-inner {
    min-height: 0;
    overflow: hidden;
    padding: 0 0.95rem 0.95rem 0.95rem;
}

.sidebar-child-rail {
    border-left: 1px solid rgba(116, 142, 206, 0.16);
    margin-left: 1.15rem;
    padding-left: 0.95rem;
    display: grid;
    gap: 0.3rem;
}

.sidebar-child {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 42px;
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    color: rgba(212, 224, 255, 0.84);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-child:hover {
    background: rgba(56, 101, 214, 0.12);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-child.is-active {
    background: linear-gradient(135deg, rgba(34, 126, 255, 0.98), rgba(38, 103, 228, 0.94));
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(35, 106, 224, 0.28);
}

.sidebar-child-icon {
    color: rgba(196, 213, 255, 0.82);
}

.sidebar-child.is-active .sidebar-child-icon {
    color: #f8fbff;
}

.app-sidebar-toggle,
.app-sidebar-close {
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fbff;
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 12px;
}

.app-sidebar-toggle:hover,
.app-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.app-sidebar-backdrop {
    position: fixed;
    inset: 68px 0 0 0;
    background: rgba(2, 6, 23, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1035;
}

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

.app-main {
    flex: 1;
    padding: 1.35rem 1.6rem 2rem;
}

.app-main.app-main-full {
    max-width: 100%;
}

.app-topbar-inner {
    min-height: 68px;
}

.app-brand {
    color: #f6fbff !important;
    letter-spacing: 0.01em;
}

.app-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ebf2ff;
    font-size: 0.88rem;
    font-weight: 600;
}

@media (max-width: 1199.98px) {
    .app-sidebar-modern {
        width: 290px;
        min-width: 290px;
    }
}

@media (max-width: 991.98px) {
    .app-sidebar-modern {
        position: fixed;
        top: 68px;
        left: 0;
        transform: translateX(-100%);
        height: calc(100vh - 68px);
        transition: transform 0.24s ease;
        border-right-color: rgba(120, 144, 212, 0.22);
    }

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

    .app-sidebar-header {
        display: flex;
    }

    .app-main {
        padding: 1.1rem 1rem 1.6rem;
    }
}

@media (max-width: 575.98px) {
    .app-sidebar-modern {
        width: min(92vw, 320px);
        min-width: min(92vw, 320px);
    }

    .app-user-chip {
        display: none;
    }

    .app-brand {
        font-size: 0.98rem;
    }
}
