/* kerman-vouchers.css — استایل فشرده فرم سند حسابداری */

.kerman-cell-truncate {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── کارت اطلاعات سند در مشاهده (فشرده) ───────────────── */
.voucher-info-card .kerman-card-header {
    padding: 4px 12px;
    min-height: 0;
}
.voucher-info-card .kerman-card-title {
    font-size: 0.875rem !important;
    line-height: 1.3;
}
.voucher-info-card .kerman-card-icon {
    font-size: 1.1rem !important;
    width: 1.1rem;
    height: 1.1rem;
}
.voucher-info-card .kerman-card-body-small {
    padding: 4px 12px 8px;
}
.voucher-info-card .kerman-detail-field {
    padding: 2px 0;
}
.voucher-info-card .kerman-detail-field-label {
    margin-bottom: 1px;
    font-size: 0.7rem;
}
.voucher-info-card .kerman-detail-field-value {
    font-size: 0.8125rem;
    line-height: 1.3;
}

/* ── جدول ردیف‌ها ─────────────────────────────────────── */
.kerman-items-table.compact th {
    white-space: nowrap;
    font-size: 0.75rem;
    padding: 6px 8px;
    background: var(--mud-palette-background-gray, var(--kerman-surface-soft));
    color: var(--mud-palette-text-primary, var(--kerman-text-primary));
    border-bottom: 2px solid var(--mud-palette-divider);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* راهنمای بصری تراز در هدر ستون‌ها — color-mix با surface تا در دارک/روشن خوانا بماند */
.kerman-items-table.compact thead.vap-thead-balanced th {
    background: color-mix(in srgb, var(--mud-palette-success, #2e7d32) 18%, var(--mud-palette-surface, var(--kerman-surface)));
    border-bottom-color: color-mix(in srgb, var(--mud-palette-success, #2e7d32) 45%, transparent);
    color: var(--mud-palette-success, #2e7d32);
}
.kerman-items-table.compact thead.vap-thead-unbalanced th {
    background: color-mix(in srgb, var(--mud-palette-error, #c62828) 18%, var(--mud-palette-surface, var(--kerman-surface)));
    border-bottom-color: color-mix(in srgb, var(--mud-palette-error, #c62828) 45%, transparent);
    color: var(--mud-palette-error, #ef5350);
}

.kerman-items-table.compact td {
    vertical-align: middle;
    padding: 2px 4px;
}

.kerman-items-table.compact .mud-input-root {
    font-size: 0.8125rem;
}

.voucher-lines-toolbar {
    display: flex;
    align-items: center;
    gap: 4px 12px;
    min-height: 36px;
    padding: 2px 8px;
}

.voucher-lines-toolbar .mud-checkbox {
    margin: 0;
}

.voucher-lines-toolbar .voucher-add-row-btn {
    margin: 0;
    margin-inline-start: auto;
    border-radius: 999px;
    padding-inline: 14px;
    min-height: 32px;
}

.voucher-lines-table .voucher-col-account {
    width: 160px;
}

.voucher-lines-table {
    table-layout: fixed;
    width: 100%;
}

.voucher-lines-table .voucher-col-desc {
    width: auto;
}

.voucher-lines-table .voucher-col-actions {
    width: 96px;
}

.voucher-lines-table .voucher-row-actions {
    white-space: nowrap;
}

.kerman-items-table.compact.voucher-lines-table td {
    padding: 3px 4px;
}

.kerman-items-table.compact.voucher-lines-table .mud-input-control,
.kerman-items-table.compact.voucher-lines-table .mud-input-control.mud-input-control-margin-dense {
    margin-top: 0;
    margin-bottom: 0;
}

.kerman-items-table.compact.voucher-lines-table .mud-input-slot {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 28px;
}

.kerman-items-table.compact.voucher-lines-table .mud-icon-button {
    padding: 2px;
    margin: 0;
}

.kerman-items-table.compact.voucher-lines-table .vap-trigger {
    min-height: 30px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.kerman-items-table.compact.voucher-lines-table .voucher-amount-input {
    padding-top: 4px;
    padding-bottom: 4px;
}

.kerman-items-table.compact.voucher-lines-table tbody tr.voucher-line-alt > td {
    background: color-mix(in srgb, var(--kerman-primary) 6%, var(--kerman-surface));
}

.kerman-items-table.compact.voucher-lines-table tbody tr.row-invalid > td {
    background: rgba(var(--mud-palette-error-rgb), 0.06);
}

.voucher-credit-coverage {
    padding: 4px 12px 10px;
}

.voucher-credit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.voucher-credit-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 650;
    padding: 6px 0;
    cursor: pointer;
}

.voucher-row-doc td {
    padding: 2px 8px 4px !important;
    background: rgba(var(--mud-palette-primary-rgb), 0.04);
    border-top: none;
}

.voucher-row-doc-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--mud-palette-text-primary);
}

.voucher-row-doc-label {
    color: var(--mud-palette-text-secondary);
    margin-inline-end: 4px;
}

.voucher-floating-dim {
    background: rgba(46, 125, 50, 0.12);
    color: #1b5e20;
    border-radius: 999px;
    padding: 0 8px;
    line-height: 1.6;
}

.voucher-amount-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 0.8125rem;
    line-height: 1.4;
    padding: 4px 6px;
    outline: none;
    font-family: inherit;
    color: inherit;
    text-align: right;
}

.voucher-amount-input:focus {
    background: rgba(var(--mud-palette-primary-rgb), 0.06);
    border-radius: 4px;
}

.voucher-amount-input:disabled {
    opacity: 0.7;
}

.voucher-form-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px 12px;
    align-items: start;
}

.voucher-form-desc {
    grid-column: 1 / -1;
}

/* هدر فشردهٔ صورت هزینه تنخواه — دو ردیف جدا + تراز فیلدها با Mud Outlined Dense */
.pcs-header-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pcs-header-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: flex-start;
}
/* فضای برچسب شناور انتخاب حساب تا با overflow کارت بریده نشود */
.pcs-header-row-main {
    padding-top: 8px;
}
.pcs-header-row > * {
    min-width: 0;
}
.pcs-header-funding {
    flex: 2.2 1 220px;
}
.pcs-header-dim {
    flex: 1.4 1 160px;
}
.pcs-header-tracking {
    flex: 1.2 1 140px;
}
.pcs-header-docno {
    flex: 1 1 120px;
}
.pcs-header-desc {
    flex: 2.4 1 280px;
}
.pcs-header-date {
    flex: 1 1 150px;
    max-width: 220px;
}
.pcs-header-meta {
    flex: 1 1 120px;
}

/* حاشیهٔ Mud را صفر کن تا باکس‌های outline هم‌تراز شوند */
.pcs-header-grid .mud-input-control,
.pcs-header-grid .mud-input-control.mud-input-control-margin-dense {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
.pcs-header-grid .kerman-persian-date {
    width: 100%;
}

/*
 * AccountPickerField در این هدر: برچسب شناور روی لبه (هم‌سبک Mud Outlined)
 * تا لبهٔ بالای باکس با سایر فیلدها یکی شود؛ مسیر سلسله‌مراتب فقط در title می‌ماند.
 */
.pcs-header-grid .acct-picker-field {
    position: relative;
    padding-top: 0;
}
.pcs-header-grid .acct-picker-field-label {
    position: absolute;
    top: -7px;
    right: 10px;
    z-index: 1;
    margin: 0;
    padding: 0 4px;
    background: var(--mud-palette-surface);
    font-size: 0.75rem !important;
    line-height: 1.2;
    color: var(--mud-palette-text-secondary);
}
.pcs-header-grid .req-account-trigger {
    min-height: 40px;
    height: 40px;
    padding-top: 4px;
    padding-bottom: 4px;
    box-sizing: border-box;
}
.pcs-header-grid .vap-trigger-path {
    display: none;
}
.pcs-header-grid .acct-picker-field > .mud-typography {
    margin-top: 4px !important;
    line-height: 1.25;
    min-height: 1.25rem;
}

/* DetailField هم‌ارتفاع تقریبی با Mud Dense */
.pcs-header-grid .kerman-detail-field {
    min-height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 0 0;
}

@media (max-width: 900px) {
    .pcs-header-date {
        max-width: none;
    }
}
@media (max-width: 600px) {
    .pcs-header-row > * {
        flex: 1 1 100%;
        max-width: none;
    }
}

@media (max-width: 960px) {
    .voucher-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.kerman-items-table.compact .row-invalid {
    background: rgba(var(--mud-palette-error-rgb), 0.04);
}

.kerman-items-table.compact tr.credit-uncovered-row {
    background: rgba(198, 40, 40, 0.06);
}

.voucher-credit-coverage .mud-alert-message {
    line-height: 1.6;
}

/* ── نوار خلاصه مالی + دکمه‌ها (پایین کارت ردیف‌ها) ── */
.voucher-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 16px;
    background: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-divider);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.voucher-summary-bar.is-balanced {
    background: rgba(46, 125, 50, 0.06);
    border-top-color: rgba(46, 125, 50, 0.28);
}
.voucher-summary-bar.is-unbalanced {
    background: rgba(198, 40, 40, 0.05);
    border-top-color: rgba(198, 40, 40, 0.28);
}

.voucher-summary-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    min-width: 80px;
}

.voucher-summary-item .mud-typography-overline {
    line-height: 1.2;
    letter-spacing: 0;
    color: var(--mud-palette-text-secondary);
}

.voucher-summary-item .mud-typography-body2 {
    line-height: 1.3;
}

.voucher-action-btn {
    min-width: 72px;
}

/* ── انتخابگر حساب ردیف سند ─────────────────────────────── */
.vap-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s ease;
}
.vap-trigger:hover {
    background: rgba(var(--mud-palette-primary-rgb), 0.06);
}
.vap-trigger:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 1px;
}
.vap-trigger-disabled {
    cursor: default;
    opacity: 0.7;
}
.vap-trigger-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.15;
}
.vap-trigger-path {
    font-size: 0.62rem;
    color: var(--mud-palette-text-secondary);
    opacity: 0.85;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: rtl;
}
.vap-trigger-main {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.vap-trigger-code {
    font-weight: 600;
    font-size: 0.78rem;
    flex-shrink: 0;
}
.vap-trigger-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
}
.vap-trigger-icon {
    opacity: 0.45;
    flex-shrink: 0;
}

/* فیلد انتخاب حساب داخل فرم‌ها (مثلاً الزامات تفصیلی) */
.acct-picker-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}
.acct-picker-field-label {
    display: block;
    position: static;
    margin-bottom: 4px;
    color: var(--mud-palette-text-secondary);
    line-height: 1.4;
}
.req-account-trigger {
    min-height: 40px;
    padding: 6px 8px;
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.req-account-trigger .vap-trigger-main {
    flex: 1 1 auto;
    min-width: 0;
}
.req-account-trigger .vap-trigger-placeholder {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.req-account-trigger .vap-trigger-clear,
.req-account-trigger .vap-trigger-icon {
    flex-shrink: 0;
    margin-inline-start: auto;
}
.req-account-trigger:hover {
    border-color: var(--mud-palette-primary);
}

/* ── دیالوگ لیست‌باکس حساب ─────────────────────────────── */
.voucher-acct-picker-dialog,
.voucher-acct-picker-dialog .mud-dialog-title,
.voucher-acct-picker-dialog .mud-dialog-content,
.voucher-acct-picker-dialog .mud-dialog-actions {
    background: var(--mud-palette-surface, var(--kerman-surface, #fff));
    color: var(--mud-palette-text-primary, var(--kerman-text-primary, #2c2826));
}
.voucher-acct-picker-dialog .mud-dialog-content {
    padding-top: 8px;
}
.vap-root {
    outline: none;
    min-width: 360px;
    width: 100%;
    background: var(--mud-palette-surface, var(--kerman-surface, #fff));
    color: var(--mud-palette-text-primary, var(--kerman-text-primary, #2c2826));
}
.vap-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    min-height: 32px;
}
.vap-crumb {
    text-transform: none;
    min-width: 0;
    padding-inline: 6px;
}
.vap-crumb-sep {
    opacity: 0.35;
}
.vap-hint {
    letter-spacing: 0;
    min-height: 18px;
}
/* پوستهٔ ثابت تا هنگام جست‌وجو/خالی بودن، ارتفاع دیالوگ نپرد */
.vap-list-shell {
    position: relative;
    height: 380px;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.vap-list {
    height: 100%;
    overflow-y: auto;
    background: #fff;
}
.vap-list-overlay,
.vap-list-empty {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.vap-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    cursor: pointer;
    transition: background 0.1s ease;
}
.vap-row:last-child {
    border-bottom: none;
}
.vap-row,
.vap-tree-row {
    background: #fff;
}
.vap-level-group,
.vap-level-group .vap-code,
.vap-level-group .vap-name { color: #1565c0; }
.vap-level-kol,
.vap-level-kol .vap-code,
.vap-level-kol .vap-name { color: #e65100; }
.vap-level-moeen,
.vap-level-moeen .vap-code,
.vap-level-moeen .vap-name { color: #7b1fa2; }
.vap-level-leaf,
.vap-level-leaf .vap-code,
.vap-level-leaf .vap-name { color: #2e7d32; }
.vap-row.vap-level-group:hover,
.vap-tree-row.vap-level-group:hover,
.vap-row.vap-level-group.vap-row-active,
.vap-tree-row.vap-level-group.vap-row-active { background: rgba(21, 101, 192, 0.07); }
.vap-row.vap-level-kol:hover,
.vap-tree-row.vap-level-kol:hover,
.vap-row.vap-level-kol.vap-row-active,
.vap-tree-row.vap-level-kol.vap-row-active { background: rgba(230, 81, 0, 0.07); }
.vap-row.vap-level-moeen:hover,
.vap-tree-row.vap-level-moeen:hover,
.vap-row.vap-level-moeen.vap-row-active,
.vap-tree-row.vap-level-moeen.vap-row-active { background: rgba(123, 31, 162, 0.07); }
.vap-row.vap-level-leaf:hover,
.vap-tree-row.vap-level-leaf:hover,
.vap-row.vap-level-leaf.vap-row-active,
.vap-tree-row.vap-level-leaf.vap-row-active { background: rgba(46, 125, 50, 0.08); }
.vap-row-active,
.vap-tree-row.vap-row-active {
    box-shadow: inset 3px 0 0 currentColor;
}
.vap-level-group .mud-icon-root,
.vap-level-kol .mud-icon-root,
.vap-level-moeen .mud-icon-root,
.vap-level-leaf .mud-icon-root { color: inherit; }
.vap-row-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.vap-code {
    font-weight: 650;
    font-size: 0.8rem;
    flex-shrink: 0;
    color: var(--mud-palette-primary);
}
.vap-name {
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vap-row-meta {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.vap-drill {
    opacity: 0.45;
}

.vap-mode {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 8px;
    padding: 2px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6e6e6;
}

.vap-mode-btn {
    border: none;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    font: inherit;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.vap-mode-btn.is-active {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-primary);
    font-weight: 650;
    box-shadow: 0 0 0 1px var(--mud-palette-divider);
}

.vap-level-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.vap-legend {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid currentColor;
}

.vap-tree-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    padding-inline-start: calc(8px + var(--vap-depth, 0) * 18px);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    cursor: pointer;
}

.vap-tree-row:last-child {
    border-bottom: none;
}

.vap-tree-selectable .vap-name {
    font-weight: 650;
}

.vap-tree-toggle {
    width: 18px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.vap-tree-pick {
    margin-inline-start: auto;
    flex-shrink: 0;
    font-size: 0.68rem;
    color: #2e7d32;
    background: rgba(46, 125, 50, 0.12);
    border-radius: 999px;
    padding: 1px 6px;
}

@media (max-width: 768px) {
    .voucher-summary-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .voucher-summary-bar > div {
        justify-content: space-between;
    }
}

/* ── فهرست اسناد ─────────────────────────────────────────────── */
.voucher-list-context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
}

.voucher-num-link {
    font-weight: 650;
    text-decoration: none;
}

.voucher-date-cell,
.voucher-desc-cell {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    line-height: 1.25;
}

.voucher-row-actions {
    display: inline-flex;
    align-items: center;
}

/* منوی چرخه وضعیت در لیست اسناد */
.voucher-cycle-item.voucher-cycle-success {
    color: #2e7d32 !important;
}
.voucher-cycle-item.voucher-cycle-info {
    color: #0288d1 !important;
}
.voucher-cycle-item.voucher-cycle-warning {
    color: #ed6c02 !important;
}
.voucher-cycle-item.voucher-cycle-danger {
    color: #d32f2f !important;
}

/* ── مرور حساب و تفصیلی — نوار تب ───────────────────────── */
.att-tabbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #F3EFE6;
    border: 1px solid #E4DDD0;
}

.att-tabbar .att-tab-chip {
    margin: 0 !important;
    font-weight: 700 !important;
    min-height: 36px;
    cursor: pointer;
}

.att-tabbar .att-tab-chip-active {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.att-root .kerman-page-icon {
    color: var(--att-tone, #2BA8A2) !important;
}

.att-root .kerman-page-title {
    color: var(--att-tone, #2BA8A2);
}

.att-level-banner {
    display: inline-flex;
    align-items: center;
    margin: 0 0 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--att-tone, #2BA8A2);
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
}

.att-root .att-datagrid .mud-table-head .mud-table-cell {
    position: relative;
    background-color: color-mix(in srgb, var(--att-tone, #2BA8A2) 22%, #fff) !important;
    color: color-mix(in srgb, var(--att-tone, #2BA8A2) 80%, #000) !important;
    font-weight: 600;
    border-bottom: 2px solid var(--att-tone, #2BA8A2);
    /* خط عمودی کنار حاشیهٔ بالا (هدر) مخفی — ظاهر تمیزتر */
    border-inline-start: none !important;
    border-inline-end: none !important;
    user-select: none;
}

.att-root .att-datagrid .mud-table-body .mud-table-cell {
    border-inline-start: 1px solid rgba(0, 0, 0, 0.08);
}

/* ردیف یک‌درمیان — سفید / ته‌رنگ تم تب (روی MudDataGrid باید global باشد) */
.att-root .att-datagrid .mud-table-body .mud-table-row:nth-child(odd):not(.att-total-row) > .mud-table-cell,
.att-root .att-datagrid .mud-table-body .mud-table-row.att-data-row:not(.att-row-alt) > .mud-table-cell {
    background-color: #ffffff !important;
}

.att-root .att-datagrid .mud-table-body .mud-table-row:nth-child(even):not(.att-total-row) > .mud-table-cell,
.att-root .att-datagrid .mud-table-body .mud-table-row.att-row-alt > .mud-table-cell {
    background-color: color-mix(in srgb, var(--att-tone, #2BA8A2) 16%, #ffffff) !important;
}

.att-root .att-datagrid .att-total-row .mud-table-cell {
    background: color-mix(in srgb, var(--att-tone, #2BA8A2) 16%, #fff) !important;
    border-top: 2px solid var(--att-tone, #2BA8A2);
    border-inline-start: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 700;
}

/* ناحیهٔ تغییر عرض — خط فقط هنگام هاور دیده می‌شود */
.att-root .att-datagrid .mud-table-cell .mud-resizer {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 14px !important;
    z-index: 2;
    cursor: col-resize !important;
    user-select: none;
    touch-action: none;
    background: transparent;
    border: none !important;
}

.att-root .att-datagrid .mud-table-cell .mud-resizer:hover,
.att-root .att-datagrid .mud-table-cell .mud-resizer:active {
    cursor: col-resize !important;
    background: color-mix(in srgb, var(--att-tone, #2BA8A2) 18%, transparent);
    border-inline-start: 2px solid var(--att-tone, #2BA8A2) !important;
}

.att-grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
}

.att-grid-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.att-root .att-filter-toggle {
    margin: 0 !important;
}

.att-root .att-filter-toggle .mud-typography {
    font-size: 0.8rem;
    white-space: nowrap;
}

.att-root .att-datagrid .mud-table-head .mud-input-control {
    margin: 0 !important;
}

.att-root .att-simple-filter {
    padding: 2px 0 4px;
    min-width: 72px;
}

.att-root .att-simple-filter-field .mud-input-slot,
.att-root .att-simple-filter-field input {
    font-size: 0.8rem !important;
    min-height: 28px !important;
    color: #1f2937 !important;
    caret-color: #1f2937 !important;
}

.att-root .att-simple-filter-field .mud-input > input::placeholder {
    color: #374151 !important;
    opacity: 0.85 !important;
}

/* لینک سرفصل بالاتر — دابل‌کلیک برای drill-up */
.att-root .att-parent-link {
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: color-mix(in srgb, var(--att-tone, #2BA8A2) 75%, #0f172a);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    text-align: inherit;
}

.att-root .att-parent-link:hover {
    color: var(--att-tone, #2BA8A2);
    font-weight: 600;
}
