﻿/* ==== Layout کل === */
.admin-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 0.875rem;
    background-color: #f3f4f6; /* bg-gray-50 */
    direction: rtl;
}

    /* ==== Header === */
    .admin-layout header {
        background-color: #ffffff;
        border-bottom: 1px solid #e5e7eb;
        padding: 1rem;
        font-weight: bold;
        font-size: 1.125rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    }

    /* ==== Container اصلی === */
    .admin-layout .content {
        display: flex;
        flex: 1;
    }

    /* ==== Sidebar === */
    .admin-layout aside {
        width: 16rem;
        background-color: #ffffff;
        border-right: 1px solid #e5e7eb;
        padding: 1rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        overflow-y: auto;
    }

        /* Scrollbar */
        .admin-layout aside::-webkit-scrollbar {
            width: 8px;
        }

        .admin-layout aside::-webkit-scrollbar-thumb {
            background-color: #cbd5e1;
            border-radius: 4px;
        }

        .admin-layout aside::-webkit-scrollbar-track {
            background-color: #f3f4f6;
        }

/* ==== NavGroup === */
.nav-group {
    display: flex;
    flex-direction: column;
    border-radius: 0.25rem;
}

.nav-group-title {
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #111827;
    border-radius: 0.25rem;
    transition: background 0.2s;
}

    .nav-group-title:hover {
        background-color: #f9fafb;
    }

.nav-group-items {
    display: none; /* پیشفرض بسته است */
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.25rem;
    padding-left: 0.5rem;
}

.nav-group.open .nav-group-items {
    display: flex;
}

.arrow {
    transition: transform 0.2s;
}

.nav-group.open .arrow {
    transform: rotate(90deg);
}

/* ==== NavItem === */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #1f2937;
    padding: 0.35rem 0.5rem;
    border-radius: 0.25rem;
    transition: background 0.2s, color 0.2s;
}

    .nav-item i {
        width: 1.25rem;
        text-align: center;
    }

    .nav-item:hover {
        background-color: #e0e7ff; /* رنگ hover روشن */
        color: #1e3a8a; /* آبی */
    }

/* ==== Main Content === */
.admin-layout main {
    flex: 1;
    padding: 1.5rem;
    background-color: #f3f4f6;
}


.admin-sidebar {
    width: 16rem;
    background-color: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    direction: rtl;
}

    /* Scrollbar */
    .admin-sidebar::-webkit-scrollbar {
        width: 8px;
    }

    .admin-sidebar::-webkit-scrollbar-thumb {
        background-color: #cbd5e1;
        border-radius: 4px;
    }

    .admin-sidebar::-webkit-scrollbar-track {
        background-color: #f3f4f6;
    }

/* NavGroup */
.nav-group {
    display: flex;
    flex-direction: column;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.nav-group-title {
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #111827;
    border-radius: 0.25rem;
    transition: background 0.2s;
}

    .nav-group-title:hover {
        background-color: #f9fafb;
    }

.nav-group-items {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.25rem;
    padding-left: 0.5rem;
}

.nav-group.open .nav-group-items {
    display: flex;
}

.arrow {
    transition: transform 0.2s;
}

.nav-group.open .arrow {
    transform: rotate(90deg);
}

/* NavItem */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #1f2937;
    padding: 0.35rem 0.5rem;
    border-radius: 0.25rem;
    transition: background 0.2s, color 0.2s;
}

    .nav-item i {
        width: 1.25rem;
        text-align: center;
    }

    .nav-item:hover {
        background-color: #e0e7ff;
        color: #1e3a8a;
    }

    .nav-item.active {
        background-color: #c7d2fe;
        color: #1e40af;
    }
