﻿/* ظاهر مدرن MDM (D-048): رنگ قالب انتخابی کاربر، کارت‌ها و مودال‌های مدرن، فهرست کشویی راست‌به‌چپ، صفحه‌شمار و درخت.
   پس از site.css بارگذاری می‌شود تا قواعد آن را کامل کند. */

/* ───────── رنگ قالب انتخابی کاربر ─────────
   هر کاربر از منوی بالا رنگی برمی‌گزیند؛ data-mdm-color روی html می‌نشیند و فقط رنگ اصلی و رنگ‌های وابسته را عوض می‌کند.
   رنگ‌های وضعیت اعتبار (تأییدشده، ردشده و ...) ثابت می‌مانند تا معنایشان با رنگ قالب عوض نشود. */
:root, [data-mdm-color="blue"] { --tblr-primary: #1A6FD1; --tblr-primary-rgb: 26, 111, 209; --mdm-navy: #0F2A4A; --mdm-accent: #6FA8EA; }
[data-mdm-color="teal"] { --tblr-primary: #0F8B8D; --tblr-primary-rgb: 15, 139, 141; --mdm-navy: #0B3536; --mdm-accent: #5CC8C9; }
[data-mdm-color="green"] { --tblr-primary: #2E8B57; --tblr-primary-rgb: 46, 139, 87; --mdm-navy: #12321F; --mdm-accent: #7CCB9C; }
[data-mdm-color="purple"] { --tblr-primary: #6D4BC3; --tblr-primary-rgb: 109, 75, 195; --mdm-navy: #241A45; --mdm-accent: #A992E8; }
[data-mdm-color="orange"] { --tblr-primary: #D9701A; --tblr-primary-rgb: 217, 112, 26; --mdm-navy: #3D2410; --mdm-accent: #F1A866; }
[data-mdm-color="red"] { --tblr-primary: #C23B3B; --tblr-primary-rgb: 194, 59, 59; --mdm-navy: #3B1515; --mdm-accent: #E68A8A; }
[data-mdm-color="slate"] { --tblr-primary: #4A5B70; --tblr-primary-rgb: 74, 91, 112; --mdm-navy: #1C232C; --mdm-accent: #9DB0C6; }

.mdm-sidebar .nav-link-icon, .mdm-brand .fa-certificate { color: var(--mdm-accent); }
.mdm-sidebar .nav-link.active, .mdm-sidebar .nav-link:hover { background: rgba(var(--tblr-primary-rgb), .35); }
.btn-primary {
    --tblr-btn-bg: var(--tblr-primary); --tblr-btn-border-color: var(--tblr-primary);
    --tblr-btn-hover-bg: color-mix(in srgb, var(--tblr-primary) 85%, #000); --tblr-btn-hover-border-color: color-mix(in srgb, var(--tblr-primary) 85%, #000);
    --tblr-btn-active-bg: color-mix(in srgb, var(--tblr-primary) 75%, #000);
}
.btn-outline-primary { --tblr-btn-color: var(--tblr-primary); --tblr-btn-border-color: var(--tblr-primary); --tblr-btn-hover-bg: var(--tblr-primary); --tblr-btn-hover-border-color: var(--tblr-primary); }
.btn-ghost-primary { --tblr-btn-color: var(--tblr-primary); --tblr-btn-hover-bg: rgba(var(--tblr-primary-rgb), .1); --tblr-btn-hover-color: var(--tblr-primary); }
.text-primary { color: var(--tblr-primary) !important; }
.bg-primary { background-color: var(--tblr-primary) !important; }
a { color: var(--tblr-primary); }
.mdm-swatch { width: 1.1rem; height: 1.1rem; border-radius: 50%; display: inline-block; vertical-align: middle; margin-inline-end: .55rem; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.dropdown-item.active .mdm-swatch { outline: 2px solid #fff; outline-offset: 1px; }

/* ───────── کارت‌های مدرن: آیکن در نشان رنگی + عنوان + زیرعنوان، با فاصله‌ی یکسان ───────── */
.card {
    border-radius: 14px; border-color: rgba(var(--tblr-primary-rgb), .09);
    box-shadow: 0 1px 2px rgba(15, 42, 74, .04), 0 6px 20px rgba(15, 42, 74, .05);
}
.page-body .card + .card, .page-body .card + .row, .page-body .row + .card, .page-body form + .card, .page-body .card + form { margin-top: 1.25rem; }
.card-header { border-bottom-color: rgba(var(--tblr-primary-rgb), .09); padding-block: .9rem; gap: .5rem; }
.card-title { display: flex; align-items: center; gap: .7rem; font-weight: 600; font-size: 1rem; margin: 0; }
.card-title > .fa-solid, .card-title > .fa-regular {
    width: 2.15rem; height: 2.15rem; border-radius: 10px; flex: none; margin-inline-end: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(var(--tblr-primary-rgb), .12); color: var(--tblr-primary); font-size: .95rem;
}
.card-subtitle { display: block; margin: .1rem 0 0; font-size: .78rem; font-weight: 400; color: var(--tblr-secondary); }
.card-footer { background: rgba(var(--tblr-primary-rgb), .025); border-top-color: rgba(var(--tblr-primary-rgb), .09); border-radius: 0 0 14px 14px; }
.card-body { padding: 1.15rem 1.25rem; }
[data-bs-theme="dark"] .card { border-color: rgba(255, 255, 255, .07); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }

/* کاشی آماری داشبورد و کاشی پیوند صفحه‌ی تنظیمات */
.mdm-tile { display: flex; gap: .95rem; align-items: center; padding: 1.1rem 1.2rem; color: inherit; text-decoration: none !important; transition: transform .15s ease, box-shadow .15s ease; height: 100%; }
a.mdm-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(var(--tblr-primary-rgb), .2); color: inherit; }
.mdm-tile-icon {
    width: 3rem; height: 3rem; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
    background: linear-gradient(135deg, var(--tblr-primary), color-mix(in srgb, var(--tblr-primary) 55%, #fff)); color: #fff;
    box-shadow: 0 6px 16px rgba(var(--tblr-primary-rgb), .3);
}
.mdm-tile-icon > i { margin: 0 !important; }
.mdm-tile-title { font-weight: 600; }
.mdm-tile-value { font-size: 1.45rem; font-weight: 700; line-height: 1.2; }
.mdm-tile-text { font-size: .8rem; color: var(--tblr-secondary); line-height: 1.7; }

/* ───────── مودال مدرن ───────── */
.modal-content { border: 0; border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 42, 74, .3); overflow: hidden; }
.modal-header { background: linear-gradient(135deg, rgba(var(--tblr-primary-rgb), .12), transparent 70%); border-bottom: 1px solid rgba(var(--tblr-primary-rgb), .1); }
.modal-title { display: flex; align-items: center; gap: .7rem; font-weight: 600; }
.modal-title > .fa-solid {
    width: 2.15rem; height: 2.15rem; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; margin: 0;
    background: var(--tblr-primary); color: #fff; font-size: .95rem;
}
.modal-header .btn-close { margin-inline-start: auto; margin-inline-end: 0; }
.modal-footer { background: rgba(var(--tblr-primary-rgb), .03); }

/* ───────── فهرست کشویی و جستجوی راست‌به‌چپ ─────────
   متن از راست با فاصله‌ی کافی، پیکان سمت چپ؛ دکمه‌ی بومی پاک‌کردن جستجو (×) که روی آیکن سمت راست می‌افتاد و خوانایی را می‌برد پنهان است. */
.form-select {
    direction: rtl; text-align: right; line-height: 1.6;
    padding-right: .85rem !important; padding-left: 2.4rem !important;
    background-position: left .8rem center !important; background-size: 14px 10px;
    text-overflow: ellipsis;
}
.form-select option { direction: rtl; text-align: right; font-family: var(--tblr-font-sans-serif); }
.form-select-sm { padding-left: 2rem !important; }
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
input[type="search"] { -webkit-appearance: none; appearance: none; }
.form-label { font-weight: 500; }
.form-hint { font-size: .78rem; }

/* ───────── صفحه‌شمار ───────── */
.mdm-pager { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.mdm-pager-info { color: var(--tblr-secondary); font-size: .85rem; }
.mdm-pager-info strong { color: var(--tblr-body-color); font-weight: 600; }
.mdm-pager nav { margin-inline-start: auto; }
.mdm-pager .page-link { min-width: 2.25rem; text-align: center; border-radius: 8px !important; margin-inline: 2px; }
.mdm-pager .page-item.active .page-link { background: var(--tblr-primary); border-color: var(--tblr-primary); color: #fff; box-shadow: 0 4px 12px rgba(var(--tblr-primary-rgb), .35); }
.mdm-pager-jump { display: flex; align-items: center; gap: .4rem; font-size: .85rem; }
.mdm-pager-jump .form-control { width: 4.75rem; }
@media (max-width: 767.98px) {
    .mdm-pager nav { margin-inline-start: 0; width: 100%; }
    .mdm-pager .pagination { justify-content: center; flex-wrap: wrap; }
}

/* ───────── درخت (نوع کالا، رده‌بندی، ناحیه) ───────── */
.mdm-tree, .mdm-tree ul { list-style: none; margin: 0; }
.mdm-tree { padding-inline-start: 0; }
.mdm-tree ul { padding-inline-start: 1.1rem; border-inline-start: 1px dashed rgba(var(--tblr-primary-rgb), .3); margin-inline-start: .55rem; }
.mdm-tree li { padding: .1rem 0; }
.mdm-tree summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .4rem; padding: .3rem .45rem; border-radius: 8px; }
.mdm-tree summary::-webkit-details-marker { display: none; }
.mdm-tree summary:hover, .mdm-tree .mdm-leaf:hover { background: rgba(var(--tblr-primary-rgb), .07); }
.mdm-tree summary > .fa-chevron-left { transition: transform .15s; font-size: .7rem; color: var(--tblr-secondary); }
.mdm-tree details[open] > summary > .fa-chevron-left { transform: rotate(-90deg); }
.mdm-tree .mdm-leaf { display: flex; align-items: center; gap: .4rem; padding: .3rem .45rem; padding-inline-start: 1.4rem; border-radius: 8px; }
.mdm-tree .badge { font-weight: 500; }

/* کادر راهنمای صفحه (D-051) */
.mdm-help > summary { list-style: none; cursor: pointer; display: flex; align-items: center; }
.mdm-help > summary::-webkit-details-marker { display: none; }
.mdm-help:not([open]) > summary { border-bottom: 0; }
.mdm-help[open] .mdm-help-arrow { transform: rotate(180deg); }
.mdm-help .mdm-help-arrow { transition: transform .15s; }
.mdm-help .card-body { line-height: 1.9; }

/* فرهنگ ویژگی‌ها و پرونده‌ی یادداشت (D-052، D-053) */
.mdm-clamp { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 32rem; }
.mdm-note-body { white-space: pre-line; line-height: 1.9; }
.mdm-note { scroll-margin-top: 5rem; }
.mdm-notes { scroll-margin-top: 5rem; }
.mdm-guide li { margin-bottom: .35rem; }
.mdm-guide .mdm-guide-best li::marker { color: var(--tblr-success); }

/* ═════════ بازطراحی خوانایی (D-056، قواعد ثابت UI/UX مدیر پروژه، ۱۳ آبان ۱۴۰۵) ═════════
   ۱. زمینه‌ی صفحه کمی تیره‌تر از کارت تا مرز کارت‌ها دیده شود؛ لبه‌ی کارت نازک و روشن، سرکارت با رنگ ملایم قالب.
   ۲. سربرگ صفحه یک کارت است: عنوان و توضیح در یک ستون، دکمه‌ها در ستون جدا که در صفحه‌ی کوچک زیر عنوان می‌روند (نه چندسطحی درهم).
   ۳. عنوان کارت هرگز به خاطر دکمه‌ی کنارش له نمی‌شود: دکمه‌ها به سطر بعد می‌روند.
   ۴. جدول‌ها در صفحه‌ی کوچک کارتی (هر ردیف یک کارت با برچسب ستون) و در صفحه‌ی بزرگ با فاصله و برش متن بلند؛ پیوندها نشانه‌ی کلیک‌پذیری دارند.
   ۵. فرم‌ها: ورودی بلندتر و خواناتر، راهنمای فیلد با نماد و رنگ و قلم متفاوت؛ فرم تک‌ستونی وسط صفحه. */
:root { --mdm-page-bg: #eef2f7; --mdm-card-border: color-mix(in srgb, var(--tblr-primary) 16%, #dde3ec); --mdm-hint: #5b6b82; --mdm-head-bg: rgba(var(--tblr-primary-rgb), .055); }
[data-bs-theme="dark"] { --mdm-page-bg: #121820; --mdm-card-border: rgba(255, 255, 255, .11); --mdm-hint: #9fb1c8; --mdm-head-bg: rgba(var(--tblr-primary-rgb), .14); }
body, .page, .page-wrapper { background-color: var(--mdm-page-bg); }
.page-body { margin-top: 1.1rem; }

.card { border: 1px solid var(--mdm-card-border) !important; }
.card > .card-header { background: var(--mdm-head-bg); border-radius: 13px 13px 0 0; flex-wrap: wrap; row-gap: .65rem; column-gap: .75rem; min-height: 3.6rem; }
.card > .card-header:last-child { border-radius: 13px; }
.card-header > .card-title { flex: 1 1 15rem; min-width: 0; }
.card-title > span { min-width: 0; line-height: 1.55; overflow-wrap: anywhere; text-wrap: balance; }
.card-header > :not(.card-title):not(.mdm-help-arrow) { flex: 0 0 auto; }
.card-header > .ms-auto { margin-inline-start: auto !important; }
.card-subtitle { line-height: 1.7; margin-top: .15rem; text-wrap: pretty; }
.mdm-toolbar { background: transparent !important; }

/* سربرگ صفحه */
.page-header { margin: 1.1rem 0 0; padding: 0; min-height: 0; }
.page-header > .container-xl > .row {
    margin: 0; padding: 1rem 1.25rem; row-gap: .9rem; align-items: center;
    background: var(--tblr-bg-surface); border: 1px solid var(--mdm-card-border); border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 42, 74, .04), 0 6px 20px rgba(15, 42, 74, .05);
    background-image: linear-gradient(90deg, transparent 60%, rgba(var(--tblr-primary-rgb), .06));
}
.page-header > .container-xl > .row > .col { flex: 1 1 18rem; min-width: 0; padding: 0; }
.page-header > .container-xl > .row > .col-auto { padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.page-pretitle { display: flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--tblr-secondary); line-height: 1.7; margin-bottom: .2rem; }
.page-pretitle::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--tblr-primary); flex: none; box-shadow: 0 0 0 3px rgba(var(--tblr-primary-rgb), .18); }
.page-title { font-size: 1.35rem; font-weight: 700; line-height: 1.55; text-wrap: balance; overflow-wrap: anywhere; margin: 0; }
.page-header .btn { white-space: nowrap; }
.page-header form { margin: 0; }
@media (max-width: 991.98px) {
    .page-header > .container-xl > .row > .col-auto { flex: 1 1 100%; justify-content: flex-start; padding-top: .8rem; border-top: 1px dashed var(--mdm-card-border); }
}
@media (max-width: 575.98px) {
    .page-header > .container-xl > .row { padding: .85rem 1rem; }
    .page-title { font-size: 1.15rem; }
    .page-header > .container-xl > .row > .col-auto .btn { flex: 1 1 auto; }
}

/* جدول‌ها */
.card-table > :not(caption) > * > * { padding: .75rem .9rem; }
.card-table thead th { background: var(--mdm-head-bg); white-space: nowrap; font-size: .76rem; font-weight: 600; color: var(--tblr-secondary); letter-spacing: 0; text-transform: none; }
.card-table td { line-height: 1.75; vertical-align: middle; }
.card-table td.text-nowrap, .card-table td .mdm-code { white-space: nowrap; }
.mdm-list td { min-width: 6rem; }
.mdm-list td:first-child { min-width: 14rem; }
.mdm-list td .mdm-clamp { max-width: 26rem; }
/* داده‌ی کلیک‌پذیر: رنگ قالب، وزن بیشتر و نماد پیوند تا کاربر بداند کجا کلیک کند */
.card-table td a:not(.btn):not(.badge):not(.dropdown-item) { font-weight: 500; text-decoration: none; color: var(--tblr-primary) !important; border-bottom: 1px dashed rgba(var(--tblr-primary-rgb), .35); }
.card-table td a:not(.btn):not(.badge):not(.dropdown-item):hover { border-bottom-style: solid; }
.card-table td a:not(.btn):not(.badge):not(.dropdown-item):not(:has(i))::before {
    font-family: var(--fa-family-classic, "Font Awesome 7 Free"); font-weight: 900; content: "\f0c1"; font-size: .68em; opacity: .65; margin-inline-end: .35rem; display: inline-block;
}
/* در صفحه‌ی کوچک هر ردیف یک کارت با برچسب ستون (برچسب‌ها را site.js از سرستون می‌گذارد)؛ دیگر اسکرول افقی لازم نیست */
@media (max-width: 767.98px) {
    .card-table.mdm-stack thead { display: none; }
    .card-table.mdm-stack, .card-table.mdm-stack tbody, .card-table.mdm-stack tr, .card-table.mdm-stack td { display: block; width: 100%; max-width: none; }
    .card-table.mdm-stack tr { width: auto; margin: .7rem .75rem; padding: .35rem 0; border: 1px solid var(--mdm-card-border); border-radius: 12px; background: var(--tblr-bg-surface); box-shadow: 0 2px 8px rgba(15, 42, 74, .05); }
    .card-table.mdm-stack.table-striped > tbody > tr:nth-of-type(odd) > * { --tblr-table-bg-type: transparent; }
    /* خانه بلوکی می‌ماند تا محتوای چندبخشی (پیوند، نشان، توضیح) زیر هم بیاید؛ برچسب ستون در حاشیه‌ی آغاز می‌نشیند */
    .card-table.mdm-stack td { position: relative; padding: .45rem .85rem !important; padding-inline-start: calc(34% + 1rem) !important; border: 0 !important; text-align: start; min-height: 2rem; overflow-wrap: anywhere; }
    .card-table.mdm-stack td[data-label]::before { content: attr(data-label); position: absolute; inset-inline-start: .85rem; top: .5rem; width: 34%; color: var(--tblr-secondary); font-size: .76rem; font-weight: 600; line-height: 1.6; }
    .card-table.mdm-stack td:not([data-label]), .card-table.mdm-stack td[data-label=""] { padding-inline-start: .85rem !important; }
    .card-table.mdm-stack td:first-child { font-size: .95rem; }
    .card-table.mdm-stack td .mdm-clamp { max-width: none; }
    .card-table.mdm-stack td:empty { display: none; }
}

/* فرم‌ها */
.form-control, .form-select { min-height: 2.65rem; padding-top: .55rem; padding-bottom: .55rem; border-radius: 10px; font-size: .92rem; }
.form-control-sm, .form-select-sm { min-height: 2.15rem; padding-top: .3rem; padding-bottom: .3rem; font-size: .85rem; }
textarea.form-control { line-height: 1.85; }
.form-label { margin-bottom: .45rem; font-size: .88rem; }
.form-hint {
    display: flex; align-items: flex-start; gap: .45rem; margin-top: .45rem;
    font-size: .76rem; font-weight: 350; line-height: 1.75; color: var(--mdm-hint);
}
.form-hint::before { font-family: var(--fa-family-classic, "Font Awesome 7 Free"); font-weight: 900; content: "\f05a"; color: var(--tblr-info); font-size: .78rem; line-height: 1.75; flex: none; }
.form-hint:empty { display: none; }
@media (max-width: 767.98px) {
    /* ۱۶ پیکسل جلوی بزرگ‌نمایی خودکار مرورگر گوشی را می‌گیرد */
    .form-control, .form-select { min-height: 2.9rem; font-size: 1rem; }
    .card-body { padding: 1rem; }
}
/* فرم تک‌ستونی وسط صفحه با پهنای خوانا */
.page-body > .container-xl > form.card,
.page-body > .container-xl > form.card ~ .mt-3,
.page-body > .container-xl > .mdm-narrow { max-width: 940px; margin-inline: auto; }

/* راهنما و آموزش صفحه به‌طور پیش‌فرض بسته‌اند */
.mdm-help > summary.card-header { border-radius: 13px; }
.mdm-help[open] > summary.card-header { border-radius: 13px 13px 0 0; }

/* Tom Select: فهرست انتخابی با جستجو، گروه و قالب متن (D-056) */
.ts-wrapper.form-select, .ts-wrapper.form-control { padding: 0 !important; min-height: 2.65rem; border: 0; background: none; box-shadow: none; }
.ts-wrapper.form-select .ts-control, .ts-wrapper.form-control .ts-control, .ts-wrapper .ts-control { border: 1px solid var(--tblr-border-color) !important; box-shadow: 0 1px 2px rgba(15, 42, 74, .04); min-height: 2.65rem; border-radius: 10px; padding: .5rem .85rem; padding-left: 2.2rem; border-color: var(--tblr-border-color); background-color: var(--tblr-bg-forms, var(--tblr-bg-surface)); color: var(--tblr-body-color); font-size: .92rem; direction: rtl; }
.ts-wrapper.form-select-sm .ts-control { min-height: 2.15rem; padding-top: .25rem; padding-bottom: .25rem; font-size: .85rem; }
.ts-wrapper.single .ts-control::after { left: .85rem !important; right: auto !important; }
.ts-wrapper.form-select.focus .ts-control, .ts-wrapper.focus .ts-control { border-color: var(--tblr-primary) !important; box-shadow: 0 0 0 .2rem rgba(var(--tblr-primary-rgb), .18); }
.ts-dropdown { direction: rtl; text-align: right; border-radius: 12px; border-color: var(--mdm-card-border); box-shadow: 0 12px 32px rgba(15, 42, 74, .16); overflow: hidden; background: var(--tblr-bg-surface); color: var(--tblr-body-color); z-index: 1080; }
.ts-dropdown .option, .ts-dropdown .optgroup-header { padding: .5rem .85rem; line-height: 1.7; }
.ts-dropdown .optgroup-header { font-weight: 700; font-size: .78rem; color: var(--tblr-primary); background: var(--mdm-head-bg); }
.ts-dropdown .active { background: rgba(var(--tblr-primary-rgb), .12); color: inherit; }
.ts-dropdown .ts-hint { font-size: .74rem; color: var(--mdm-hint); line-height: 1.6; }
.ts-dropdown .dropdown-input { border-radius: 8px; margin: .5rem; width: calc(100% - 1rem); direction: rtl; }
.ts-dropdown .no-results { padding: .6rem .85rem; color: var(--tblr-secondary); }
@media (max-width: 767.98px) { .ts-wrapper .ts-control { min-height: 2.9rem; font-size: 1rem; } }

/* چاپ: جدول خوانا با سرستون تکرارشونده */
@media print {
    body, .page, .page-wrapper { background: #fff !important; }
    .card { border: 0 !important; box-shadow: none !important; }
    .card-table { font-size: 9.5pt; }
    .card-table thead { display: table-header-group; }
    .card-table thead th { background: #1A6FD1 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .card-table tbody tr:nth-of-type(even) td { background: #f2f6fb !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .card-table td, .card-table th { border: 1px solid #d5dce6 !important; padding: 4pt 6pt !important; }
    .card-table td a { border: 0 !important; color: #000 !important; }
    .card-table td a::before { content: none !important; }
    .mdm-print-header h2 { font-weight: 800; color: #0F2A4A; }
    tr { page-break-inside: avoid; }
}
.ts-wrapper.single .ts-control { background-image: none; }
.ts-wrapper.single .ts-control::after { content: ""; position: absolute; top: 50%; width: .5rem; height: .5rem; margin-top: -.35rem; border: solid var(--tblr-secondary); border-width: 0 0 2px 2px; transform: rotate(-45deg); border-color: var(--tblr-secondary) !important; }
.ts-wrapper.single.dropdown-active .ts-control::after { transform: rotate(135deg); margin-top: -.1rem; }

/* کارت‌بدنه‌ای که خودش row است حاشیه‌ی منفی نگیرد (عامل اسکرول افقی در گوشی) */
.card-body.row { margin-left: 0; margin-right: 0; }
.mdm-toolbar .btn-list { flex-wrap: wrap !important; }
@media (max-width: 575.98px) { .mdm-toolbar .btn-list { width: 100%; } .mdm-toolbar .btn-list > * { flex: 1 1 auto; } }
@media (max-width: 767.98px) { .card-table.mdm-stack td[dir="ltr"] { direction: rtl; unicode-bidi: plaintext; } }
/* فرم یک‌سطری (فهرست + دکمه‌ها) در گوشی به سطر بعد می‌رود به‌جای بیرون زدن */
.card-body.d-flex, form.d-flex { flex-wrap: wrap; }
.card-body.d-flex > .ts-wrapper, .card-body.d-flex > .form-select, .card-body.d-flex > .form-control { flex: 1 1 12rem; min-width: 0; }
