/* /Components/Layout/MainLayout.razor.rz.scp.css */
.page[b-astxmkl3cx] {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
}

.sidebar[b-astxmkl3cx] {
    background-color: var(--mud-palette-drawer-background, rgb(5, 39, 103));
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.mud-theme-dark .sidebar[b-astxmkl3cx] {
    background-color: var(--mud-palette-drawer-background);
    background-image: linear-gradient(180deg, var(--mud-palette-drawer-background) 0%, var(--mud-palette-surface) 70%);
}

.top-row[b-astxmkl3cx] {
    background-color: var(--mud-palette-surface, #f7f7f7);
    border-bottom: 1px solid var(--mud-palette-lines-default, #d6d5d5);
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
    color: var(--mud-palette-text-primary);
}

    .top-row[b-astxmkl3cx]  a, .top-row[b-astxmkl3cx]  .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
        text-decoration: none;
    }

    .top-row[b-astxmkl3cx]  a:hover, .top-row[b-astxmkl3cx]  .btn-link:hover {
        text-decoration: underline;
    }

    .top-row[b-astxmkl3cx]  a:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }

@media (max-width: 640.98px) {
    .top-row[b-astxmkl3cx] {
        justify-content: space-between;
    }

    .top-row[b-astxmkl3cx]  a, .top-row[b-astxmkl3cx]  .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page[b-astxmkl3cx] {
        flex-direction: row;
        min-height: 100vh;
    }

    .sidebar[b-astxmkl3cx] {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
        align-self: flex-start;
    }

    .top-row[b-astxmkl3cx] {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row.auth[b-astxmkl3cx]  a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row[b-astxmkl3cx], article[b-astxmkl3cx] {
    padding-left: 2rem !important;
    padding-right: 1.5rem !important;
    background-color: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
}

    main[b-astxmkl3cx] {
        width: calc(100% - 250px); /* برای responsive بودن با sidebar */
        flex: 1;
        min-height: 100vh;
    }
}

#blazor-error-ui[b-astxmkl3cx] {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss[b-astxmkl3cx] {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

footer[b-astxmkl3cx] {
    background-color: #f8f9fa !important;
    border-top: 1px solid #dee2e6 !important;
    padding: 0.5rem 0;
    margin-top: auto;
    color: #6c757d !important;
}

    footer p[b-astxmkl3cx] {
        margin: 0;
        font-size: 0.85rem;
        color: #6c757d !important;
    }

main[b-astxmkl3cx] {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
    background-color: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
}

.content[b-astxmkl3cx] {
    flex: 1;
    background-color: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
}

/* استایل لینک‌های navbar - رنگ روشن برای پس‌زمینه تیره */
.sidebar[b-astxmkl3cx] {
    color: var(--mud-palette-drawer-text, #ffffff);
}

.sidebar .nav-link[b-astxmkl3cx] {
    color: var(--mud-palette-drawer-text, #ffffff) !important;
    transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.sidebar .nav-link:hover[b-astxmkl3cx],
.sidebar .nav-link:focus[b-astxmkl3cx] {
    color: var(--mud-palette-drawer-text, rgba(255, 255, 255, 0.8)) !important;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.sidebar .nav-link.active[b-astxmkl3cx],
.sidebar .nav-link.active:hover[b-astxmkl3cx],
.sidebar .nav-link.active:focus[b-astxmkl3cx] {
    color: var(--mud-palette-drawer-text, #ffffff) !important;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* Dark mode adjustments for sidebar */
.mud-theme-dark .sidebar .nav-link[b-astxmkl3cx] {
    color: var(--mud-palette-drawer-text, #ffffff) !important;
}

.mud-theme-dark .sidebar .nav-link:hover[b-astxmkl3cx],
.mud-theme-dark .sidebar .nav-link:focus[b-astxmkl3cx] {
    background-color: rgba(255, 255, 255, 0.15);
}

a .card[b-astxmkl3cx] {
    background-color: var(--mud-palette-surface, #ffffff);
    color: var(--mud-palette-text-primary, #1F1F1F);
    border-color: var(--mud-palette-lines-default, #E0E0E0);
}

a .card:hover[b-astxmkl3cx] {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--mud-palette-primary, #007bff) !important;
}

a .card.border-success:hover[b-astxmkl3cx] {
    border-color: var(--mud-palette-success, #28a745) !important;
}

a .card.border-info:hover[b-astxmkl3cx] {
    border-color: var(--mud-palette-info, #17a2b8) !important;
}

a .card.border-warning:hover[b-astxmkl3cx] {
    border-color: var(--mud-palette-warning, #ffc107) !important;
}

/* Login page container - full page layout */
.login-page-container[b-astxmkl3cx] {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
}

.login-content-wrapper[b-astxmkl3cx] {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    width: 100%;
}

.login-page-container[b-astxmkl3cx] {
    background-color: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
}

.login-content-wrapper[b-astxmkl3cx] {
    background-color: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
}

.login-footer[b-astxmkl3cx] {
    flex-shrink: 0;
    width: 100%;
    background-color: color !important;
    border-top: 1px solid #dee2e6 !important;
    padding: 0.5rem 0;
    text-align: center;
    margin: 0;
}

    .login-footer p[b-astxmkl3cx] {
        margin: 0;
        font-size: 0.85rem;
        padding: 0 1rem;
        color: #6c757d !important;
    }
