/* ============================================================================
   mui.css — اجزای Material UI v4، عیناً با همان اندازه‌ها، رنگ‌ها و انیمیشن‌ها.

   منبعِ هر عدد: سورسِ @material-ui/core 4.12 (makeStyles هر جزء) + تمِ پنلِ
   قدیمی (Theme/overrides، typography.js، UI/Button.jsx، UI/Popup.jsx).
   پایهٔ قلم ۱۳px است (typography.body1)، پس اندازه‌هایی که MUI با em می‌دهد
   (ارتفاعِ ورودی، legend) از همین ۱۳ حساب می‌شوند — همان چیزی که پنلِ قدیمی
   روی صفحه داشت.

   رفتارها (موجِ کلیک، برچسبِ شناور، منوی سلکت، تول‌تیپ، نشانگرِ زبانه) در mui.js.
   RTL: همهٔ فاصله‌ها منطقی‌اند؛ جاهایی که MUI با translateX کار می‌کند،
   jss-rtl آن را قرینه می‌کرد و این‌جا با [dir=rtl] قرینه شده.

   فهرست: ۱ موجِ کلیک · ۲ دکمه · ۳ دکمهٔ آیکنی · ۴ فیلدِ متنی · ۵ سلکت و منو
          ۶ چک‌باکس، رادیو، سوییچ · ۷ زبانه · ۸ تول‌تیپ · ۹ دیالوگ
   ============================================================================ */

/* ══ ۱. موجِ کلیک — ButtonBase/TouchRipple ═════════════════════════════════ */
.m-ripple { position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.m-ripple > span { position: absolute; opacity: .3; transform: scale(1); animation: m-ripple-enter 550ms var(--ease); }
.m-ripple > span > i { display: block; width: 100%; height: 100%; border-radius: 50%; background: currentColor; opacity: 1; }
.m-ripple > span > i.leave { opacity: 0; animation: m-ripple-exit 550ms var(--ease); }
.m-ripple > span.pulse { animation-duration: 200ms; }
.m-ripple > span.pulse > i { animation: m-ripple-pulse 2500ms var(--ease) 200ms infinite; }
@keyframes m-ripple-enter { 0% { transform: scale(0); opacity: .1; } 100% { transform: scale(1); opacity: .3; } }
@keyframes m-ripple-exit  { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes m-ripple-pulse { 0% { transform: scale(1); } 50% { transform: scale(.92); } 100% { transform: scale(1); } }

/* ══ ۲. دکمه — Button ═══════════════════════════════════════════════════════
   .m-btn          متنی (variant="text")
   .m-btn.outlined دورخط
   .m-btn.contained پُر؛ بی‌رنگ = سفید با هاورِ neutral (overrides/MuiButton.js)
   رنگ: .primary .success .warning .danger — هاور = palette.*.dark (UI/Button.jsx)
   اندازه: .small */
.m-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-width: 64px; margin: 0; padding: 6px 8px; border: 0; border-radius: var(--radius); outline: 0;
  background: transparent; color: var(--text); cursor: pointer; user-select: none; vertical-align: middle;
  -webkit-tap-highlight-color: transparent; text-decoration: none !important; white-space: nowrap;
  font: 500 var(--fs-body)/1.75 var(--font); letter-spacing: normal; text-transform: uppercase;
  transition: background-color 250ms var(--ease), box-shadow 250ms var(--ease), border-color 250ms var(--ease), color 250ms var(--ease); }
.m-btn > .m-lbl { display: inherit; align-items: inherit; justify-content: inherit; width: 100%; }
.m-btn:hover { background: var(--action-hover); }
.m-btn.primary { color: var(--primary); } .m-btn.primary:hover { background: rgba(0, 147, 255, .04); }
.m-btn.danger  { color: var(--danger); }  .m-btn.danger:hover  { background: rgba(237, 71, 64, .04); }
.m-btn.success { color: var(--success); } .m-btn.warning { color: var(--warning); }
.m-btn .start { display: inherit; margin-inline: -4px 8px; }
.m-btn .end   { display: inherit; margin-inline: 8px -4px; }
.m-btn .start .ico, .m-btn .end .ico, .m-btn .start .ico::before, .m-btn .end .ico::before { width: 20px; height: 20px; font-size: 20px; }

.m-btn.outlined { padding: 5px 15px; border: 1px solid var(--outline); }
.m-btn.outlined.primary { border-color: rgba(0, 147, 255, .5); } .m-btn.outlined.primary:hover { border-color: var(--primary); }
.m-btn.outlined.danger  { border-color: rgba(237, 71, 64, .5); }  .m-btn.outlined.danger:hover  { border-color: var(--danger); }
/* انصراف: زردِ توخالی (قاعدهٔ مالکِ محصول). متن کمی تیره‌تر از زرد تا روی سفید خوانا بماند. */
.m-btn.outlined.warning { border-color: var(--warning); color: color-mix(in oklab, var(--warning), #000 32%); background: transparent; }
.m-btn.outlined.warning:hover { background: var(--warning-soft); border-color: var(--warning-dark); }

.m-btn.contained { padding: 6px 16px; background: var(--paper); color: rgba(0, 0, 0, .87); box-shadow: var(--shadow-2); }
.m-btn.contained:hover { background: var(--neutral); box-shadow: var(--shadow-4); }
.m-btn.contained:active { box-shadow: var(--shadow-8); }
.m-btn.contained:focus-visible { box-shadow: var(--shadow-6); }
.m-btn.contained.primary { background: var(--primary); color: #fff; } .m-btn.contained.primary:hover { background: var(--primary-dark); }
.m-btn.contained.success { background: var(--success); color: #fff; } .m-btn.contained.success:hover { background: var(--success-dark); }
.m-btn.contained.warning { background: var(--warning); color: #fff; } .m-btn.contained.warning:hover { background: var(--warning-dark); }
.m-btn.contained.danger  { background: var(--danger);  color: #fff; } .m-btn.contained.danger:hover  { background: var(--danger-dark); }

.m-btn.small { padding: 4px 5px; font-size: var(--fs-body); }
.m-btn.small.outlined { padding: 3px 9px; }
.m-btn.small.contained { padding: 4px 10px; }
.m-btn.small .start .ico, .m-btn.small .start .ico::before { width: 18px; height: 18px; font-size: 18px; }

.m-btn:disabled { color: var(--action-disabled); cursor: default; pointer-events: none; }
.m-btn.contained:disabled { background: var(--action-disabled-bg); box-shadow: none; }
.m-btn.outlined:disabled { border-color: var(--action-disabled-bg); }

/* ══ ۳. دکمهٔ آیکنی — IconButton (overrides/MuiIconButton.js: پدینگِ ۱۰، هاورِ .03) ══ */
.m-ibtn { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; box-sizing: border-box;
  margin: 0; padding: 10px; border: 0; border-radius: 50%; outline: 0; background: transparent; color: var(--text-2);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; font-size: 24px; text-align: center;
  transition: background-color 150ms var(--ease); text-decoration: none !important; }
.m-ibtn > .ico, .m-ibtn > .ico::before { width: 24px; height: 24px; font-size: 24px; }
.m-ibtn:hover { background: rgba(0, 0, 0, .03); }
.m-ibtn.small { padding: 3px; }
.m-ibtn.small > .ico, .m-ibtn.small > .ico::before { width: 18px; height: 18px; font-size: 18px; }
.m-ibtn.tool { padding: 5px; }                                   /* نوارِ ابزارِ جدول: Toolbar/index.jsx، padding 5 + آیکنِ ۲۴ */
.m-ibtn.primary { color: var(--primary); }
.m-ibtn:disabled { color: var(--action-disabled); background: transparent; cursor: default; pointer-events: none; }

/* ══ ۴. فیلدِ متنی — TextField variant="outlined" size="small" ═════════════
   ساختار (mui.js قاب و legend را خودش می‌سازد):
     <div class="m-tf [is-error] [is-disabled]">
       <label for="x">برچسب <span class="req">*</span></label>
       <input id="x"> | <textarea> | <select>
       <p class="help">متنِ راهنما یا خطا</p>
     </div>
   حالت‌ها را mui.js می‌گذارد: is-focused، is-shrink (برچسب بالا رفته). */
.m-tf { position: relative; display: inline-flex; flex-direction: column; min-width: 0; width: 100%; margin: 0; padding: 0;
  border: 0; vertical-align: top; --tx: 14px; }
[dir="rtl"] .m-tf { --tx: -14px; }

.m-tf > label { position: absolute; top: 0; inset-inline-start: 0; z-index: 1; display: block; padding: 0; pointer-events: none;
  color: var(--text); font: var(--fs-field)/1 var(--font); letter-spacing: -.05px; white-space: nowrap;   /* typography.body1.color ِتمِ قدیمی بر text.secondary ِFormLabel می‌نشیند */
  transform-origin: top left; transform: translate(var(--tx), 12px) scale(1);
  transition: color 200ms var(--ease), transform 260ms var(--ease-emph); }   /* نرم و آرام بالا می‌رود؛ نه پرشِ ۲۰۰ms */
[dir="rtl"] .m-tf > label { transform-origin: top right; }
.m-tf.is-shrink > label { transform: translate(var(--tx), -6px) scale(.75); }
.m-tf.is-focused > label { color: var(--primary); }
.m-tf.is-error > label { color: var(--danger); }
.m-tf.is-disabled > label { color: var(--text-disabled); }

.m-tf .box { position: relative; display: inline-flex; align-items: center; box-sizing: border-box; width: 100%;
  border-radius: var(--radius); color: var(--text); cursor: text;   /* متنِ ورودی = text.primary (تمِ قدیمی خاکستری #66788A داشت) */ font: var(--fs-field)/1.1876em var(--font); letter-spacing: -.05px; }
.m-tf .box > input, .m-tf .box > textarea, .m-tf .box > .select {
  display: block; box-sizing: content-box; width: 100%; min-width: 0; height: 1.1876em; margin: 0; padding: 10.5px 14px;
  border: 0; outline: 0; background: none; color: currentColor; font: inherit; letter-spacing: inherit;
  -webkit-tap-highlight-color: transparent; }
.m-tf .box > input::placeholder, .m-tf .box > textarea::placeholder { color: currentColor; opacity: .42; transition: opacity 200ms var(--ease); }
.m-tf:not(.is-shrink) .box > input::placeholder, .m-tf:not(.is-shrink) .box > textarea::placeholder { opacity: 0; }
.m-tf .box > input:disabled { opacity: 1; }
/* autofillِ مرورگر: زمینهٔ آبیِ کروم فقط پشتِ متن می‌نشست و فیلد دورنگ می‌شد؛ همان سطحِ فیلد می‌ماند و رنگِ متن همان متن.
   انیمیشنِ خالی فقط نشانه است تا mui.js برچسب را بالا ببرد (همان mui-auto-fillِ MUI v4). */
@keyframes m-autofill { from { display: block; } }
@keyframes m-autofill-cancel { from { display: block; } }
.m-tf .box > input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px var(--paper) inset; -webkit-text-fill-color: var(--text); caret-color: var(--text);
  border-radius: inherit; animation-name: m-autofill; animation-duration: 5000s; }
.m-tf .box > input:not(:-webkit-autofill) { animation-name: m-autofill-cancel; animation-duration: 10ms; }
.m-tf .box.multiline { padding: 10.5px 14px; }
.m-tf .box.multiline > textarea { height: auto; padding: 0; resize: none; overflow: hidden; }
.m-tf .box.has-end { padding-inline-end: 14px; }
.m-tf .box.has-end > input { padding-inline-end: 0; }
.m-tf .box > .adorn { display: flex; align-items: center; height: .01em; max-height: 2em; margin-inline-start: 8px; white-space: nowrap; color: var(--action); }
.m-tf .box > .adorn > .ico, .m-tf .box > .adorn > .ico::before { width: 24px; height: 24px; font-size: 24px; }
/* دکمهٔ آیکنیِ داخلِ فیلدِ small (چشمِ کلمهٔ عبور): ۲۸px با آیکنِ ۲۰، تا از ارتفاعِ فیلد بیرون نزند */
.m-tf .box > .adorn > .m-ibtn { padding: 4px; }
.m-tf .box > .adorn > .m-ibtn > .ico, .m-tf .box > .adorn > .m-ibtn > .ico::before { width: 20px; height: 20px; font-size: 20px; }
/* آرایه (چشمِ کلمهٔ عبور و …) همیشه سمتِ چپِ فیلد است، حتی برای فیلدِ چپ‌به‌راست. */

.m-tf fieldset { position: absolute; inset: -5px 0 0 0; min-width: 0; margin: 0; padding: 0 8px; overflow: hidden;
  border: 1px solid var(--outline); border-radius: inherit; pointer-events: none; text-align: start; font: inherit; }
.m-tf fieldset > legend { display: block; width: auto; height: 11px; max-width: .01px; padding: 0; visibility: hidden;
  font-size: .75em; text-align: start; transition: max-width 50ms var(--ease-out); }
.m-tf fieldset > legend > span { display: inline-block; padding-inline: 5px; }
.m-tf.is-shrink fieldset > legend { max-width: 1000px; transition: max-width 140ms var(--ease-out) 70ms; }   /* شکافِ قاب همراهِ برچسب باز می‌شود */
.m-tf.is-quiet > label, .m-tf.is-quiet fieldset > legend, .m-tf.is-quiet .box > input::placeholder { transition: none !important; }
.m-tf .box:hover > fieldset { border-color: var(--text); }
@media (hover: none) { .m-tf .box:hover > fieldset { border-color: var(--outline); } }
.m-tf.is-focused fieldset, .m-tf.is-focused .box:hover > fieldset { border-color: var(--primary); border-width: calc(2px / var(--zoom, 1) + .05px); }   /* فوکوس بر هاور می‌چربد (Mui-focused)؛ ۲px پس از zoom (۱٫۸ به ۱ گرد می‌شد) */
.m-tf.is-error fieldset, .m-tf.is-error .box:hover > fieldset { border-color: var(--danger); }
.m-tf.is-disabled .box { color: var(--text-disabled); cursor: default; }
.m-tf.is-disabled fieldset, .m-tf.is-disabled .box:hover > fieldset { border-color: var(--action-disabled); }

.m-tf > .help { margin: 4px 14px 0; color: var(--text-2); font: var(--fs-caption)/16px var(--font); letter-spacing: .3px; text-align: start; }
.m-tf.is-error > .help { color: var(--danger); }
.m-tf.is-disabled > .help { color: var(--text-disabled); }

/* ══ ۵. سلکت و منو — Select (غیرِ native) + Menu/Popover/MenuItem ═══════════
   <select> اصلی برای مقدار می‌ماند و پنهان است؛ mui.js جای آن div[role=button] می‌گذارد. */
.m-tf .box > select { position: absolute; inset: auto 0 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; box-sizing: border-box; }
.m-tf .box > .select { padding-inline-end: 32px; min-height: 1.1876em; overflow: hidden; border-radius: var(--radius);
  white-space: nowrap; text-overflow: ellipsis; cursor: pointer; user-select: none; }
.m-tf .box > .arrow { position: absolute; top: calc(50% - 12px); inset-inline-end: 7px; pointer-events: none; color: var(--action);
  transition: transform 0ms; }
.m-tf .box > .arrow, .m-tf .box > .arrow::before { width: 24px; height: 24px; font-size: 24px; }
.m-tf.is-open .box > .arrow { transform: rotate(180deg); }
.m-tf.is-disabled .box > .arrow { color: var(--action-disabled); }
.m-tf.is-disabled .box > .select { cursor: default; }

.m-menu-back { position: fixed; inset: 0; z-index: 1501; }               /* theme.zIndex.modal ِپنلِ قدیمی */
.m-menu { position: fixed; z-index: 1501; min-width: 16px; min-height: 16px; max-width: calc(100% - 32px); max-height: calc(100% - 96px);
  overflow-x: hidden; overflow-y: auto; outline: 0; background: var(--paper); color: var(--text); border-radius: var(--radius);
  box-shadow: var(--shadow-8); opacity: 0; transform: scale(.75, .5625); }
.m-menu > ul { position: relative; margin: 0; padding: 8px 0; list-style: none; outline: 0; }
.m-item { position: relative; display: flex; align-items: center; justify-content: flex-start; box-sizing: border-box; min-height: auto;
  padding: 6px 16px; overflow: hidden; white-space: nowrap; color: var(--text); cursor: pointer; outline: 0;
  font: var(--fs-body)/1.5 var(--font); letter-spacing: -.05px; text-align: start;
  transition: background-color 150ms var(--ease); -webkit-tap-highlight-color: transparent; }
.m-item:hover { background: var(--action-hover); }
.is-kb .m-item:focus-visible { background: var(--action-focus); }
.m-item[aria-selected="true"] { background: var(--selected); }
.m-item[aria-selected="true"]:hover { background: var(--selected-hover); }
.is-kb .m-item[aria-selected="true"]:focus-visible { background: var(--selected-focus); }
@media (hover: none) { .m-item:hover { background: none; } .m-item[aria-selected="true"]:hover { background: var(--selected); } }
.m-item .ico { min-width: 32px; color: var(--action); }
@media (max-width: 599px) { .m-item { min-height: 48px; } }
/* فهرستِ سلکت (Autocomplete): Paper elevation 1، listbox با padding 8 و maxHeight 40vh؛
   گزینه 6/16 با قلمِ فیلد؛ برجسته (ماوس/صفحه‌کلید) = action.hover، انتخاب‌شده = آبیِ ۸٪، هر دو = ۱۲٪ */
.m-menu.ac { overflow: hidden; max-height: none; max-width: none; box-shadow: var(--shadow-1); }
.m-menu.ac > ul { max-height: 40vh; overflow: auto; overscroll-behavior: contain; }
.m-menu.ac .m-item { font-size: var(--fs-field); white-space: normal; transition: none; }
.m-menu.ac .m-item:hover { background: none; }
.m-menu.ac .m-item[aria-selected="true"], .m-menu.ac .m-item[aria-selected="true"]:hover { background: var(--selected); }
.m-menu.ac .m-item.is-focus { background: var(--action-hover); }
.m-menu.ac .m-item.is-focus[aria-selected="true"] { background: var(--selected-hover); }

/* ══ ۶. چک‌باکس، رادیو، سوییچ — SwitchBase (IconButton با پدینگِ ۹) ════════
   <label class="m-fcl"><span class="m-check"><input type="checkbox"></span>متن</label>
   ورودیِ اصلی شفاف روی آیکن می‌نشیند (همان کارِ MUI)، پس صفحه‌کلید و فرم دست‌نخورده‌اند. */
.m-fcl { display: inline-flex; align-items: center; margin-inline: -11px 16px; cursor: pointer; vertical-align: middle;
  -webkit-tap-highlight-color: transparent; font: var(--fs-body)/21px var(--font); letter-spacing: -.05px; color: var(--text); }
.m-fcl.is-disabled { cursor: default; color: rgba(0, 0, 0, .38); }

.m-check { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  padding: 9px; border-radius: 50%; color: var(--text-2); transition: background-color 150ms var(--ease); }
.m-check:hover { background: rgba(0, 0, 0, .03); }
.m-check > input, .m-switch .base > input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  margin: 0; padding: 0; opacity: 0; cursor: inherit; }
.m-check::before { content: "\F0131"; position: relative; display: block; width: 24px; height: 24px;
  font: normal 24px/1 "Material Design Icons"; transition: none; }
.m-check:has(> input:checked) { color: var(--primary); }
.m-check:has(> input:checked):hover { background: rgba(0, 147, 255, .04); }
.m-check:has(> input:checked)::before { content: "\F0132"; }
.m-check:has(> input:indeterminate)::before { content: "\F0375"; }
.m-check:has(> input:disabled) { color: var(--action-disabled); background: none; }

/* سوییچ — Switch (اندازهٔ عادی ۵۸×۳۸، کوچک ۴۰×۲۴) */
.m-switch { position: relative; z-index: 0; display: inline-flex; flex-shrink: 0; box-sizing: border-box; width: 58px; height: 38px;
  padding: 12px; overflow: hidden; vertical-align: middle; --sx: 20px; }
[dir="rtl"] .m-switch { --sx: -20px; }
.m-switch .base { position: absolute; top: 0; inset-inline-start: 0; z-index: 1; display: inline-flex; padding: 9px; border-radius: 50%;
  color: #fafafa; transition: transform 150ms var(--ease), background-color 150ms var(--ease); }
.m-switch .base:hover { background: var(--action-hover); }
.m-switch .thumb { width: 20px; height: 20px; border-radius: 50%; background: currentColor; box-shadow: var(--shadow-1); }
.m-switch .track { display: block; width: 100%; height: 100%; border-radius: 7px; z-index: -1; background: #000; opacity: .38;
  transition: opacity 150ms var(--ease), background-color 150ms var(--ease); }
.m-switch:has(input:checked) .base { transform: translateX(var(--sx)); color: var(--primary); }
.m-switch:has(input:checked) .base:hover { background: rgba(0, 147, 255, .04); }
.m-switch:has(input:checked) .track { background: var(--primary); opacity: .5; }
.m-switch:has(input:disabled) .base { color: #bdbdbd; }
.m-switch:has(input:disabled) .track { opacity: .12; }
.m-switch.small { width: 40px; height: 24px; padding: 7px; --sx: 16px; }
[dir="rtl"] .m-switch.small { --sx: -16px; }
.m-switch.small .base { padding: 4px; }
.m-switch.small .thumb { width: 16px; height: 16px; }

/* ══ ۷. زبانه — Tabs/Tab (overrides: ارتفاعِ ۵۰، قلمِ ۱۴، نشانگرِ ۴) ═══════ */
.m-tabs { position: relative; display: flex; min-height: 48px; overflow: hidden; border-bottom: 1px solid var(--border); }
.m-tabs > .scroller { position: relative; display: flex; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.m-tabs > .scroller::-webkit-scrollbar { display: none; }
.m-tab { position: relative; display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; box-sizing: border-box;
  height: 50px; min-width: 72px; max-width: 264px; min-height: 48px; margin: 0; padding: 6px 12px; overflow: hidden;
  border: 0; outline: 0; background: transparent; color: var(--text-2); cursor: pointer;
  font: 400 var(--sc-label)/1.75 var(--font); text-transform: none; text-align: center; -webkit-tap-highlight-color: transparent; }
.m-tab[aria-selected="true"] { color: var(--primary); font-weight: 500; }
@media (min-width: 600px) { .m-tab { min-width: 160px; } }
@media (min-width: 960px) { .m-tab { min-width: 100px; } }
.m-tabs .ind { position: absolute; bottom: 0; height: 4px; background: var(--primary); transition: all 300ms var(--ease); }

/* ══ ۸. تول‌تیپ — Tooltip arrow (UI/Tooltip.jsx) ════════════════════════════ */
.m-tip { position: fixed; z-index: 1502; max-width: 300px; padding: 4px 8px; border-radius: var(--radius); pointer-events: none;
  background: rgba(97, 97, 97, .92); color: #fff; font: 500 var(--fs-tip)/1.4em var(--font); word-wrap: break-word;
  opacity: 0; transform: scale(.75, .5625); transform-origin: center top;
  transition: opacity 200ms var(--ease), transform 133ms var(--ease); }
.m-tip.is-in { opacity: 1; transform: none; }
.m-tip.top { transform-origin: center bottom; }
.m-tip > b { position: absolute; left: calc(var(--arrow-x, 50%) - 5px); width: 1em; height: .71em; overflow: hidden; color: rgba(97, 97, 97, .9); }
.m-tip > b::before { content: ""; display: block; width: 100%; height: 100%; margin: auto; background: currentColor; transform: rotate(45deg); }
.m-tip:not(.top) > b { top: 0; margin-top: -.71em; }
.m-tip:not(.top) > b::before { transform-origin: 0 100%; }
.m-tip.top > b { bottom: 0; margin-bottom: -.71em; }
.m-tip.top > b::before { transform-origin: 100% 0; }

/* ══ ۹. دیالوگ — Dialog (UI/Popup.jsx: Grow ۳۵۰، عنوانِ h5، محتوا با خط) ══
   .m-dlg.alert  هشدار/تأیید با Lottie — UI/DialogBox.jsx */
.m-scrim { position: fixed; inset: 0; z-index: 1501; display: none; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
.m-scrim.is-open { display: flex; }
/* باز شدنِ نرم: پس‌زمینه جدا از خودِ دیالوگ محو می‌شود (لایهٔ ::before با کمی تاری)، و دیالوگ از ۱۴px پایین‌تر و ۹۶٪
   با منحنیِ «آرام‌نشستن» (expo-out) بالا می‌آید؛ بستن کوتاه‌تر و بی‌جهش. جای Growِ ناهم‌مقیاسِ MUI (.75×.5625) که پرشی بود. */
.m-scrim::before { content: ""; position: absolute; inset: 0; background: var(--scrim); opacity: 0;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); transition: opacity 300ms cubic-bezier(.2, 0, 0, 1); }
.m-scrim.is-in::before { opacity: 1; }
.m-scrim.is-out::before { opacity: 0; transition-duration: 220ms; transition-timing-function: cubic-bezier(.4, 0, 1, 1); }
.m-dlg { position: relative; z-index: 1; display: flex; flex-direction: column; max-width: calc(100% - 64px); max-height: calc(100% - 64px);
  margin: 32px; overflow: hidden; background: var(--paper); color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow-24);
  opacity: 0; transform: translateY(14px) scale(.96); transform-origin: 50% 60%;
  transition: opacity 240ms cubic-bezier(.2, 0, 0, 1), transform 460ms cubic-bezier(.16, 1, .3, 1); }
.m-scrim.is-in .m-dlg { opacity: 1; transform: none; }
.m-scrim.is-out .m-dlg { opacity: 0; transform: translateY(8px) scale(.98);
  transition: opacity 180ms cubic-bezier(.4, 0, 1, 1), transform 220ms cubic-bezier(.4, 0, 1, 1); }
/* محتوای دیالوگ یک لحظه بعد از قاب می‌رسد (۶۰ms) تا باز شدن لایه‌لایه حس شود، نه یک‌باره */
.m-scrim .m-dlg > :is(.m-dlg-content, .m-dlg-actions) { opacity: 0; transform: translateY(6px); transition: opacity 260ms cubic-bezier(.2, 0, 0, 1) 60ms, transform 420ms cubic-bezier(.16, 1, .3, 1) 60ms; }
.m-scrim.is-in .m-dlg > :is(.m-dlg-content, .m-dlg-actions) { opacity: 1; transform: none; }
.m-scrim.is-out .m-dlg > :is(.m-dlg-content, .m-dlg-actions) { transition: none; }
.m-dlg.form { width: 960px; }

.m-dlg-title { position: relative; z-index: 1001; display: flex; align-items: center; flex: 0 0 auto; margin: 0; padding: 4px; padding-inline-start: 14px; }
.m-dlg-title > h2 { flex: 1; margin: 0; font: 500 var(--fs-h5)/20px var(--font); letter-spacing: -.05px; color: var(--text); }
.m-dlg-content { flex: 1 1 auto; padding: 16px 24px; overflow-y: auto; border-block: 1px solid var(--border); -webkit-overflow-scrolling: touch; }
.m-dlg-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; padding: 8px; }
.m-dlg-actions > :not(:first-child) { margin-inline-start: 8px; }

/* شبکهٔ فرم — DevExtreme Form colCount: 3 در پنلِ قدیمی؛ فاصله‌ها همان margin="dense"ِ MUI */
.m-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 16px; padding-top: 6px; }
.m-form.one { grid-template-columns: minmax(0, 1fr); }
.m-form > .all { grid-column: 1 / -1; }
.m-form > .m-form-h { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; margin-top: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.m-form > .m-form-h:first-child { margin-top: 0; }
.m-form > .m-form-h h3 { position: relative; margin: 0; padding-inline-start: 10px; color: var(--text); font: 700 var(--fs-body, 13px)/20px var(--font); }
.m-form > .m-form-h h3::before { content: ""; position: absolute; inset-inline-start: 0; top: 3px; width: 3px; height: 14px; background: var(--primary); }
.m-form > .m-form-h span { color: var(--text-2); font: var(--fs-caption)/16px var(--font); }
.m-form > .note { grid-column: 1 / -1; margin-top: -8px; color: var(--text-2); font: var(--fs-caption)/16px var(--font); }

/* چک‌باکس و سوییچ به‌عنوانِ یک خانهٔ شبکه (Filament Checkbox/Toggle): هم‌قدِ فیلد، خطا زیرش */
.m-ctl { display: flex; flex-direction: column; justify-content: center; min-height: 40px; padding-inline-start: 11px; }
.m-ctl > .help { margin: 0; color: var(--text-2); font: var(--fs-caption)/16px var(--font); letter-spacing: .3px; }
.m-ctl.is-error > .help { color: var(--danger); }
@media (max-width: 959px) { .m-form { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 599px) { .m-dlg { margin: 16px; max-width: calc(100% - 32px); max-height: calc(100% - 32px); } }
@media (prefers-reduced-motion: reduce) {
  .m-ripple > span, .m-ripple > span > i { animation-duration: 1ms !important; }
  .m-dlg, .m-scrim, .m-scrim::before, .m-dlg > *, .m-menu, .m-tip, .m-tf > label, .m-switch .base { transition-duration: 1ms !important; transition-delay: 0s !important; }
}
