:root {
    --app-page-bg: #f3f4f7;
}

html,
body {
    min-height: 100%;
    font-family: Vazirmatn, Tahoma, sans-serif;
}

body {
    overflow-x: hidden;
    background: var(--app-page-bg);
}

.app-sidebar {
    --cui-sidebar-width: 16rem;
}

/*
 * CoreUI مقدار فضای اشغال‌شده Sidebar را روی sibling آن قرار می‌دهد.
 * استفاده از این متغیرها باعث می‌شود محتوا در RTL زیر Sidebar نرود و
 * با باز و بسته‌شدن منو نیز خودکار جابه‌جا شود.
 */
.app-wrapper {
    width: 100%;
    min-width: 0;
    padding-inline-start: var(--cui-sidebar-occupy-start, 0);
    padding-inline-end: var(--cui-sidebar-occupy-end, 0);
    background: var(--app-page-bg);
    transition: padding 0.15s ease-in-out;
}

.app-header {
    margin-bottom: 0;
    min-height: 4rem;
    background: var(--cui-body-bg);
    border-bottom: 1px solid var(--cui-border-color);
}

.app-header > .container-fluid {
    min-height: 4rem;
}

.app-main,
.app-main > .container-fluid,
.body,
.card,
.table-responsive,
.table-responsive-lg {
    min-width: 0;
}

.app-footer {
    margin-top: auto;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    background: var(--cui-body-bg);
    border-top: 1px solid var(--cui-border-color);
}

.min-w-0 {
    min-width: 0 !important;
}

.page-title {
    font-weight: 700;
}

.card {
    box-shadow: 0 1px 2px rgba(8, 10, 12, 0.04);
}

.dashboard-stat-card .card-body {
    min-height: 9rem;
}

.dashboard-stat-card .display-6 {
    font-variant-numeric: tabular-nums;
}

.dashboard-students-table th,
.dashboard-students-table td {
    vertical-align: middle;
}

.dashboard-attention-list .list-group-item {
    padding-block: 1rem;
}

.table-actions {
    white-space: nowrap;
}

.status-badge {
    font-weight: 500;
    white-space: nowrap;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 700;
}

.required::after {
    content: ' *';
    color: var(--cui-danger);
}

.table-responsive,
.table-responsive-lg {
    overflow-x: auto;
}

.floating-action-menu {
    position: fixed;
    z-index: 1080;
    min-width: 190px;
}

.timeline {
    border-inline-start: 2px solid var(--cui-border-color);
    padding-inline-start: 1.25rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.25rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    inset-inline-start: -1.63rem;
    top: 0.35rem;
    width: 0.75rem;
    height: 0.75rem;
    background: var(--cui-primary);
    border-radius: 50%;
}

.jalali-picker {
    position: absolute;
    z-index: 1090;
    width: 290px;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid var(--cui-border-color);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(8, 10, 12, 0.15);
}

.jalali-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.2rem;
    text-align: center;
}

.jalali-picker button {
    padding: 0.35rem;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
}

.jalali-picker button:hover {
    background: var(--cui-primary-bg-subtle);
}

@media (max-width: 991.98px) {
    .app-wrapper {
        padding-inline-start: 0;
        padding-inline-end: 0;
    }

    .app-main > .container-fluid {
        padding-top: 1rem !important;
    }

    .dashboard-stat-card .card-body {
        min-height: auto;
    }

    .mobile-card-table thead {
        display: none;
    }

    .mobile-card-table tbody,
    .mobile-card-table tr,
    .mobile-card-table td {
        display: block;
        width: 100%;
    }

    .mobile-card-table tr {
        margin: 0.75rem;
        width: calc(100% - 1.5rem);
        padding: 0.5rem;
        border: 1px solid var(--cui-border-color);
        border-radius: 0.5rem;
        background: var(--cui-body-bg);
    }

    .mobile-card-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0.45rem 0.35rem;
        border: 0;
        text-align: end;
    }

    .mobile-card-table td::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-weight: 600;
        color: var(--cui-secondary-color);
    }

    .mobile-card-table td:last-child {
        padding-top: 0.75rem;
        border-top: 1px solid var(--cui-border-color);
    }

    .desktop-actions {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .app-header .container-fluid,
    .app-main > .container-fluid,
    .app-footer {
        padding-inline: 1rem !important;
    }

    .dashboard-attention-list .list-group-item {
        align-items: flex-start !important;
    }
}
