﻿.parent-shell {
    min-height: 100vh;
    background: #f8fafc;
    direction: rtl;
}

.parent-topbar {
    height: 70px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.parent-topbar-start {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.parent-brand {
    display: flex;
    flex-direction: column;
    color: #fff;
    min-width: 0;
}

.parent-brand-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.parent-brand-sub {
    font-size: 12px;
    opacity: .88;
    margin-top: 2px;
}

.parent-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.parent-icon-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: .2s ease;
    backdrop-filter: blur(6px);
}

    .parent-icon-btn:hover {
        background: rgba(255,255,255,.2);
        transform: translateY(-1px);
    }

    .parent-icon-btn .bi {
        font-size: 18px;
    }

.parent-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,.18);
}

.parent-layout-body {
    display: flex;
    position: relative;
    min-height: calc(100vh - 70px);
}

.parent-sidebar {
    width: 300px;
    min-width: 300px;
    transition: transform .25s ease, width .25s ease, min-width .25s ease;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
    z-index: 1030;
}

.parent-sidebar-inner {
    height: 100%;
    overflow-y: auto;
    padding-bottom: 18px;
}

.parent-sidebar-header {
    padding: 18px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,.10);
    margin-bottom: 8px;
    color: #fff;
}

.parent-sidebar-title {
    font-size: 18px;
    font-weight: 800;
}

.parent-sidebar-sub {
    font-size: 13px;
    opacity: .78;
    margin-top: 4px;
}

.parent-main {
    flex: 1;
    min-width: 0;
    padding: 0;
}

.parent-sidebar-overlay {
    position: fixed;
    inset: 70px 0 0 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1025;
}

.nav-tree {
    padding: 0 0 14px;
}

/* Sections */
.nav-section {
    margin-bottom: 4px;
}

.nav-section-header {
    width: calc(100% - 16px);
    margin: 3px 8px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.96);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

    .nav-section-header:hover {
        background: rgba(255,255,255,.09);
        color: #fff;
    }

    .nav-section-header.open {
        background: rgba(255,255,255,.12);
        color: #fff;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
    }

.nav-section-title {
    font-size: 15px;
    line-height: 1.35;
    flex: 1;
    font-weight: 800;
}

.nav-caret {
    font-size: 14px;
    opacity: .9;
    transition: transform .22s ease, opacity .22s ease;
}

    .nav-caret.open {
        transform: rotate(180deg);
        opacity: 1;
    }

.nav-sub {
    margin: 2px 8px 10px;
    padding: 4px 0 8px;
    border-right: 2px solid rgba(255,255,255,.10);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .28s ease, opacity .22s ease;
}

    .nav-sub.open {
        max-height: 2000px;
        opacity: 1;
    }

.nav-sub-link {
    color: rgba(255,255,255,.92);
    padding: 10px 14px;
    border-radius: 10px;
    margin: 2px 14px;
    display: block;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    transition: background .18s ease, color .18s ease, transform .12s ease;
}

    .nav-sub-link:hover {
        background: rgba(255,255,255,.08);
        color: #fff;
        transform: translateX(-1px);
        text-decoration: none;
    }

    .nav-sub-link.active {
        background: rgba(255,255,255,.15);
        color: #fff;
        font-weight: 800;
    }

.nav-sub .nav-section {
    margin: 4px 0 2px;
}

.nav-sub .nav-section-header {
    width: auto;
    margin: 4px 10px 2px 14px;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 10px;
    background: rgba(255,255,255,.035);
}

    .nav-sub .nav-section-header:hover {
        background: rgba(255,255,255,.07);
    }

    .nav-sub .nav-section-header.open {
        background: rgba(255,255,255,.09);
    }

.nav-sub .nav-sub {
    margin: 2px 10px 8px 18px;
    padding: 4px 0 6px;
    border-right: 1px solid rgba(255,255,255,.10);
}

    .nav-sub .nav-sub .nav-sub-link {
        margin: 2px 10px;
        padding: 9px 12px;
        font-size: 13px;
        font-weight: 700;
        color: rgba(255,255,255,.9);
    }

        .nav-sub .nav-sub .nav-sub-link:hover,
        .nav-sub .nav-sub .nav-sub-link.active {
            color: #fff;
        }

.nav-login-wrap {
    margin-top: 12px;
    padding-inline: 10px;
}

/* Desktop collapsed */
@media (min-width: 992px) {
    .parent-sidebar.desktop-collapsed {
        width: 0;
        min-width: 0;
        overflow: hidden;
        box-shadow: none;
    }
}

/* Mobile */
@media (max-width: 991.98px) {
    .parent-topbar {
        height: 64px;
        padding: 0 12px;
    }

    .parent-layout-body {
        min-height: calc(100vh - 64px);
    }

    .parent-sidebar {
        position: fixed;
        top: 64px;
        right: 0;
        bottom: 0;
        transform: translateX(100%);
        width: 290px;
        min-width: 290px;
    }

        .parent-sidebar.open {
            transform: translateX(0);
        }

        .parent-sidebar.desktop-collapsed {
            width: 290px;
            min-width: 290px;
        }

    .parent-sidebar-overlay {
        inset: 64px 0 0 0;
    }

    .parent-brand-title {
        font-size: 16px;
    }

    .parent-brand-sub {
        font-size: 11px;
    }

    .parent-icon-btn {
        width: 38px;
        height: 38px;
    }
}

.parent-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1050;
}

.modal.show {
    z-index: 1060;
}

.modal-dialog-right {
    max-width: 560px;
    margin-inline: auto;
}

@media (max-width: 768px) {
    .modal-dialog-right {
        max-width: calc(100% - 20px);
        margin: 10px auto;
    }
}
