/* پوستهٔ یکسان گزارش‌های حسابداری — هم‌سبک مرور حساب و تفصیلی */

.rpt-root {
    --rpt-tone: #2BA8A2;
    --rpt-surface: #FFFFFF;
    --rpt-striped: #F4F0E5;
    --rpt-text: #0A0A0A;
    --rpt-text-secondary: #6B6B6B;
    direction: rtl;
}

.rpt-banner {
    display: inline-flex;
    align-items: center;
    margin: 0 0 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--rpt-tone);
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
}

.rpt-root .kerman-page-icon {
    color: var(--rpt-tone) !important;
}

.rpt-root .kerman-page-title {
    color: var(--rpt-tone);
}

.rpt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--rpt-tone) 22%, #e6e0d4);
    color: var(--rpt-text-secondary);
}

.rpt-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 16px;
    border-top: 2px solid var(--rpt-tone);
    background: color-mix(in srgb, var(--rpt-tone) 14%, var(--rpt-surface));
}

.rpt-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 160px;
    padding: 40px 16px;
    color: var(--rpt-text-secondary);
}

/* ── MudTable + اسکرول افقی ───────────────────────────── */
.rpt-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rpt-root .rpt-table {
    font-variant-numeric: tabular-nums;
}

/* جلوگیری از فشرده شدن ستون‌ها؛ عرض بر اساس محتوا، اسکرول در صورت نیاز */
.rpt-root .rpt-table .mud-table-root {
    width: max-content;
    min-width: 100%;
}

.rpt-root .rpt-table .mud-table-head .mud-table-cell,
.rpt-root .rpt-table .mud-table-body .mud-table-cell,
.rpt-root .rpt-table .mud-table-foot .mud-table-cell {
    white-space: nowrap;
    min-width: 5.5rem;
}

/* تراز ۸ ستونی و جداول پهن */
.rpt-root .rpt-table.rpt-table-wide .mud-table-root {
    min-width: max(100%, 80rem);
}

.rpt-root .rpt-table .mud-table-head .mud-table-cell {
    background-color: color-mix(in srgb, var(--rpt-tone) 22%, var(--rpt-surface)) !important;
    color: color-mix(in srgb, var(--rpt-tone) 80%, #000) !important;
    font-weight: 600;
    border-bottom: 2px solid var(--rpt-tone);
}

.rpt-root .rpt-table .mud-table-body .mud-table-row:nth-child(odd) > .mud-table-cell {
    background-color: #ffffff !important;
}

.rpt-root .rpt-table .mud-table-body .mud-table-row:nth-child(even) > .mud-table-cell {
    background-color: color-mix(in srgb, var(--rpt-tone, #2BA8A2) 14%, #ffffff) !important;
}

.rpt-root .rpt-table .mud-table-foot .mud-table-cell {
    background: color-mix(in srgb, var(--rpt-tone) 16%, var(--rpt-surface)) !important;
    border-top: 2px solid var(--rpt-tone);
    font-weight: 700;
    color: var(--rpt-text);
}

/* ── MudDataGrid ──────────────────────────────────────── */
.rpt-root .rpt-datagrid {
    font-variant-numeric: tabular-nums;
}

.rpt-root .rpt-datagrid .mud-table-container {
    overflow-x: auto;
}

.rpt-root .rpt-datagrid .mud-table-head .mud-table-cell {
    background-color: color-mix(in srgb, var(--rpt-tone) 22%, var(--rpt-surface)) !important;
    color: color-mix(in srgb, var(--rpt-tone) 80%, #000) !important;
    font-weight: 600;
    border-bottom: 2px solid var(--rpt-tone);
}

.rpt-root .rpt-datagrid .mud-table-body .mud-table-row:nth-child(odd):not(.rpt-total-row) > .mud-table-cell,
.rpt-root .rpt-datagrid .mud-table-body .mud-table-row.rpt-data-row:not(.rpt-row-alt) > .mud-table-cell {
    background-color: #ffffff !important;
}

.rpt-root .rpt-datagrid .mud-table-body .mud-table-row:nth-child(even):not(.rpt-total-row) > .mud-table-cell,
.rpt-root .rpt-datagrid .mud-table-body .mud-table-row.rpt-row-alt > .mud-table-cell {
    background-color: color-mix(in srgb, var(--rpt-tone, #2BA8A2) 14%, #ffffff) !important;
}

.rpt-root .rpt-datagrid .rpt-data-row {
    cursor: pointer;
}

.rpt-root .rpt-datagrid .rpt-total-row .mud-table-cell {
    background: color-mix(in srgb, var(--rpt-tone) 16%, var(--rpt-surface)) !important;
    border-top: 2px solid var(--rpt-tone);
    font-weight: 700;
    color: var(--rpt-text);
}
