@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/vazirmatn.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

html, body, input, select, textarea, button {
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif !important;
  letter-spacing: 0;
}

/* ==================================================================
   Design system v2 (v9.20) - flat, minimal, consistent
   ================================================================== */
:root {
  --mt-brand: #0b6a93; --mt-brand-d: #085877; --mt-brand-soft: #e6f3f9;
  --mt-ink: #1b2a3a; --mt-mute: #64748b; --mt-line: #dbe3ec; --mt-soft: #f4f7fa;
  --mt-ok: #0a7a52; --mt-ok-bg: #e7f5ee; --mt-ok-line: #bfe3d0;
  --mt-warn: #8a5a00; --mt-warn-bg: #fff4dc; --mt-warn-line: #f2d99b;
  --mt-danger: #b42318; --mt-danger-bg: #fdecea; --mt-danger-line: #f3c2bd;
  --mt-radius: 8px;
}

/* ---- buttons: one look everywhere (special widgets keep their own) ---- */
button:where(:not(.menu-btn):not(.menu-button):not(.mt-menu-button):not(.menu-close):not(.mt-menu-close):not(.sidebar-close):not(.menu-action):not(.mtn-fab):not(.modal-close):not(.fullscreen):not(.score-button):not(.preset-btn):not(.toggle-pass):not(.x):not(.jfp-close):not(.add-row):not(.tab):not(.mt-ab-btn):not(.mt-plain):not([id^="jfp"]):not([id^="cal"]):not([id^="mtn"]):not(.jfp-days *):not(.cal-days *)),
.btn, a.nav, a.navbtn, a.manage-btn, a.primary, a.secondary, a.back, .small-action, input[type="submit"] {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 16px !important; margin: 0;
  background: var(--mt-brand) !important; background-image: none !important; color: #fff !important;
  border: 1px solid var(--mt-brand) !important; border-radius: var(--mt-radius) !important;
  font-size: 13px !important; font-weight: 600 !important; line-height: 1.3; letter-spacing: 0;
  box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  text-decoration: none !important; cursor: pointer; width: auto;
  /* v13.5.2: a long label wraps inside its button instead of running out of a narrow form or grid (was nowrap) */
  white-space: normal; overflow-wrap: break-word; max-width: 100%; text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease !important;
}
button:where(:not(.menu-btn):not(.menu-button):not(.mt-menu-button):not(.menu-close):not(.mt-menu-close):not(.sidebar-close):not(.menu-action):not(.mtn-fab):not(.modal-close):not(.fullscreen):not(.score-button):not(.preset-btn):not(.toggle-pass):not(.x):not(.jfp-close):not(.add-row):not(.tab):not(.mt-ab-btn):not(.mt-plain):not([id^="jfp"]):not([id^="cal"]):not([id^="mtn"]):not(.jfp-days *):not(.cal-days *)):hover,
.btn:hover, a.nav:hover, a.navbtn:hover, a.manage-btn:hover, a.primary:hover, a.secondary:hover, a.back:hover, .small-action:hover, input[type="submit"]:hover {
  background: var(--mt-brand-d) !important; border-color: var(--mt-brand-d) !important; transform: none; filter: none; box-shadow: none !important;
}
button:active, .btn:active, .small-action:active, input[type="submit"]:active { transform: none; }
button[disabled], .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* compact inside tables / toolbars */
td button, td .btn, td a.btn, td .small-action, .acts button, .acts .btn, .inv-actions .small-action, .uacts button {
  min-height: 30px; padding: 0 11px !important; font-size: 12px !important;
}

/* neutral (outline) */
button.gray, button.secondary, button.reopen, button.no, button.ghost, .btn.gray, a.nav.secondary, a.secondary, .nav.secondary,
button.okbtn.neutral {
  background: #fff !important; color: #334155 !important; border-color: var(--mt-line) !important;
}
button.gray:hover, button.secondary:hover, button.reopen:hover, button.no:hover, button.ghost:hover, .btn.gray:hover, a.nav.secondary:hover, a.secondary:hover, .nav.secondary:hover {
  background: var(--mt-soft) !important; border-color: #c4d0dd !important; color: #1b2a3a !important;
}
/* success / approve */
button.ok, button.okbtn, button.approve, .btn.ok { background: var(--mt-ok-bg) !important; color: var(--mt-ok) !important; border-color: var(--mt-ok-line) !important; }
button.ok:hover, button.okbtn:hover, button.approve:hover, .btn.ok:hover { background: #d6eee1 !important; border-color: #a6d6bf !important; }
/* caution */
button.warn, .btn.warn { background: var(--mt-warn-bg) !important; color: var(--mt-warn) !important; border-color: var(--mt-warn-line) !important; }
button.warn:hover, .btn.warn:hover { background: #ffeac2 !important; border-color: #ecc979 !important; }
/* destructive */
button.danger, button.reject, button.bad, .btn.danger { background: var(--mt-danger-bg) !important; color: var(--mt-danger) !important; border-color: var(--mt-danger-line) !important; }
button.danger:hover, button.reject:hover, button.bad:hover, .btn.danger:hover { background: #fbdcd8 !important; border-color: #eba9a2 !important; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(11,106,147,.45) !important; outline-offset: 2px;
}

/* ---- form controls: same border, radius and focus ring ---- */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not(.jalali-filter-input):not([type="submit"]),
select, textarea {
  border: 1px solid var(--mt-line) !important; border-radius: var(--mt-radius) !important; background-color: #fff; color: var(--mt-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="submit"]):focus, select:focus, textarea:focus {
  border-color: var(--mt-brand) !important; box-shadow: 0 0 0 3px rgba(11,106,147,.14); outline: none !important;
}
.jalali-filter-input { border: 1px solid var(--mt-line) !important; border-radius: var(--mt-radius) !important; }
label { color: #475569; }

/* ---- cards and tables ---- */
/* card surface: see "Design system v3" below */
.card table th, .panel table th, .tablebox table th {
  background: rgba(10,41,65,.055); color: var(--mt-ink-2, #3a4f63); font-size: 12px; font-weight: 700;
  border-bottom: 1px solid #e3e9f0 !important; padding: 11px 10px;
}
.card table td, .panel table td, .tablebox table td { border-bottom: 1px solid #eef2f6 !important; }
.card table tbody tr:hover td, .panel table tbody tr:hover td { background-color: #fafcfe; }

/* ---- tabs, badges, chips ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 4px; background: var(--mt-soft); border-radius: 10px; width: fit-content; max-width: 100%; }
.tabs a { padding: 7px 14px; border-radius: 8px; color: #475569; text-decoration: none; font-size: 12.5px; font-weight: 600; background: transparent; }
.tabs a.on { background: #fff; color: var(--mt-brand); box-shadow: 0 1px 2px rgba(16,24,40,.1); }

/* Access lists scroll in one isolated surface; opaque headers never mix with row controls. */
.access-account-table { overflow-x: auto; overflow-y: visible; position: relative; isolation: isolate; }
.access-account-table.fits { overflow: visible; }
.access-account-table table { border-collapse: separate; border-spacing: 0; width: 100%; }
.access-account-table .scroll { overflow: visible !important; max-height: none !important; }
.access-account-table thead th { position: sticky; top: var(--mt-sticky-top, 0px); z-index: 3; background: #f1f5f8 !important; background-clip: padding-box; box-shadow: 0 1px 0 var(--mt-line, #dce6ef); }
.access-account-table tbody td { position: relative; z-index: 0; }
.pf-tabs a:focus-visible { outline: 3px solid var(--mt-brand, #007f88); outline-offset: 2px; }
.badge, .ubadge, .status { letter-spacing: 0; }
.status-card.bad { background: var(--mt-danger-bg) !important; border-color: var(--mt-danger-line) !important; color: #7a1a12 !important; }
.status-card.ok { background: #fff !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ------------------------------------------------------------------
   v9.18 visual polish - additive only (no structure / layout changes)
   ------------------------------------------------------------------ */
:root { accent-color: #0878a8; }
::placeholder { color: #93a1b3; opacity: 1; }
::selection { background: #cfe9f5; }

/* checkboxes / radios must never inherit "input { width:100% }" from page styles */
input[type="checkbox"]:not([class]),
input[type="radio"]:not([class]) {
  width: auto !important; min-width: 0 !important; height: auto !important;
  padding: 0 !important; flex: 0 0 auto;
}
label.perm { display: flex !important; align-items: center; gap: 10px; cursor: pointer; line-height: 1.7; }
label.perm input[type="checkbox"] { width: 18px !important; height: 18px !important; margin: 0; }

.inv-actions .small-action, td form button { white-space: nowrap; }
.table-wrap, .panel, .card { scrollbar-width: thin; scrollbar-color: #b9c8d6 transparent; }

/* small screens: wide tables scroll inside their card instead of pushing the whole page sideways */
@media (max-width: 820px) {
  .panel, .card, .table-wrap, section.live-overview {
    overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%;
  }
  .table-wrap table { min-width: 520px; }
  select, textarea,
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]) { min-height: 42px; }
}
@media print { .mt-backbar { display: none !important; } }

/* form controls sized inside their cell (prevents inputs poking out of cards) */
form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]),
form select, form textarea { box-sizing: border-box; max-width: 100%; }

/* phone: the seller's invoice tables become one card per row, actions always visible */
@media (max-width: 640px) {
  .table-wrap table.inv-table { min-width: 0; }
  table.inv-table, .inv-table thead, .inv-table tbody, .inv-table tr, .inv-table td { display: block; width: 100%; box-sizing: border-box; }
  .inv-table thead { display: none; }
  .inv-table tr { border: 1px solid #e3ebf3; border-radius: 14px; margin: 0 0 10px; padding: 6px 4px; background: #fff; overflow: hidden; }
  .inv-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 10px !important; border: 0 !important; text-align: right; }
  .inv-table td[data-l]::before { content: attr(data-l); font-weight: 900; color: #64748b; font-size: 11px; flex: 0 0 auto; }
  .inv-table td[data-l="عملیات"] { display: block; padding-top: 10px !important; border-top: 1px dashed #d8e3ee !important; }
  .inv-table td[data-l="عملیات"]::before { display: block; margin-bottom: 6px; }
  .inv-table td[colspan] { display: block; text-align: center; }
}

/* ---- action groups: buttons sit in one tidy, wrapping row ---- */
.acts, .uacts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.acts form, .uacts form { margin: 0; display: inline-flex; }
td .acts, td .uacts { justify-content: center; }

/* ==================================================================
   Design system v3 (v12.0) - one glass shell for every panel
   ------------------------------------------------------------------
   * Tokens first; components read only tokens.
   * Glass (translucency + blur) is used where it helps orientation:
     the header, the menu, dialogs and popovers.  Content cards are
     translucent WITHOUT blur, so long pages stay light and text stays
     crisp.  Readability of text, tables and forms wins over effects.
   * Browsers without backdrop-filter, and users who ask for reduced
     transparency, get solid surfaces of the same colours.
   ================================================================== */
:root {
  --mt-navy: #0a2941; --mt-navy-2: #102b48; --mt-petrol: #0a7491;
  --mt-brand: #0b6a93; --mt-brand-d: #085877; --mt-brand-soft: #e6f3f9;
  --mt-ink: #14273a; --mt-ink-2: #3a4f63; --mt-mute: #56677a;
  --mt-line: #d3dde8; --mt-line-soft: #e4ebf2;
  --mt-bg: #eaf0f6;
  --mt-glass: rgba(255,255,255,.78); --mt-glass-strong: rgba(255,255,255,.9); --mt-glass-line: rgba(255,255,255,.75);
  --mt-glass-dark: linear-gradient(120deg, rgba(10,41,65,.93), rgba(7,94,120,.9));
  --mt-blur: 14px;
  --mt-shadow-sm: 0 1px 2px rgba(10,41,65,.06);
  --mt-shadow: 0 1px 2px rgba(10,41,65,.05), 0 6px 18px rgba(10,41,65,.07);
  --mt-shadow-lg: 0 18px 48px rgba(10,41,65,.22);
  --mt-r-sm: 8px; --mt-r: 10px; --mt-r-lg: 14px;
  --mt-s1: 4px; --mt-s2: 8px; --mt-s3: 12px; --mt-s4: 16px; --mt-s5: 24px;
  --mt-ctl: 40px;
  --mt-fs-xs: 11.5px; --mt-fs-sm: 12.5px; --mt-fs: 14px; --mt-fs-lg: 16px; --mt-fs-h: 18px;
  --mt-focus: 0 0 0 3px rgba(11,106,147,.28);
  --mt-radius: var(--mt-r);
}

/* ---- page canvas ---- */
/* pages with their own full-page picture (the portal login, body.home-entry) keep it */
html body.mt-ds:not(.mt-tv):not(.home-entry) {
  background:
    radial-gradient(1100px 520px at 100% -8%, rgba(10,116,145,.15), transparent 62%),
    radial-gradient(900px 520px at -6% 6%, rgba(16,43,72,.11), transparent 60%),
    linear-gradient(180deg, #eef3f8, #e7edf4);
  background-repeat: no-repeat; min-height: 100vh;
  color: var(--mt-ink);
  font-size: var(--mt-fs);
}
body.mt-ds:not(.mt-tv):not(.home-entry) h1 { font-size: 20px; } body.mt-ds:not(.mt-tv):not(.home-entry) h2 { font-size: var(--mt-fs-h); color: var(--mt-ink); }
body.mt-ds:not(.mt-tv):not(.home-entry) h3 { font-size: 15px; color: var(--mt-ink); }

/* ---- content surfaces: translucent, no blur (cheap and crisp) ---- */
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, section.card, .password-card, .filter-panel, .mt-card) {
  background: var(--mt-glass);
  border: 1px solid var(--mt-glass-line);
  box-shadow: var(--mt-shadow), inset 0 1px 0 rgba(255,255,255,.85);
  border-radius: var(--mt-r-lg);
}
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.kpi, .stat, .live-mini, .mini) {
  background: rgba(255,255,255,.62); border: 1px solid var(--mt-line-soft); border-radius: var(--mt-r); box-shadow: none;
}
html body.mt-ds:not(.mt-tv):not(.home-entry) .kpi small, html body.mt-ds:not(.mt-tv):not(.home-entry) .stat small { color: var(--mt-mute); }

/* ---- tables: plain and readable on the glass ---- */
html body.mt-ds:not(.mt-tv):not(.home-entry) table th { background: rgba(10,41,65,.055); color: var(--mt-ink-2); font-size: var(--mt-fs-sm); font-weight: 700; }
html body.mt-ds:not(.mt-tv):not(.home-entry) table td { color: var(--mt-ink); }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel) table tbody tr:hover td { background-color: rgba(11,106,147,.045); }

/* ---- form controls: solid white so text always reads ---- */
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="submit"]), select, textarea) {
  background-color: #fff; color: var(--mt-ink); font-family: inherit; font-size: var(--mt-fs);
}
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="submit"]), select) { min-height: var(--mt-ctl); }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(input, select, textarea):focus { box-shadow: var(--mt-focus); }
html body.mt-ds:not(.mt-tv):not(.home-entry) label { color: var(--mt-ink-2); font-weight: 600; font-size: var(--mt-fs-sm); }

/* ---- status: always a word, never colour alone ---- */
.mt-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: var(--mt-fs-xs); font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.mt-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.mt-status.s-wait { color: #7a4d00; background: #fff4dc; border-color: #f2d99b; }
.mt-status.s-work { color: #0b5a7d; background: #e6f3f9; border-color: #bfdfee; }
.mt-status.s-ok { color: #0a6a47; background: #e7f5ee; border-color: #bfe3d0; }
.mt-status.s-bad { color: #9b1c12; background: #fdecea; border-color: #f3c2bd; }
.mt-status.s-mute { color: #485a6c; background: #eef2f6; border-color: #dbe3ec; }

/* ==================================================================
   The application header (one for every signed-in page)
   ================================================================== */
.mt-ic { flex: 0 0 auto; }
.mt-appbar {
  position: sticky; top: 0; z-index: 9000; color: #fff; display: block; margin: 0; padding: 0; border-radius: 0;
  background: var(--mt-glass-dark);
  -webkit-backdrop-filter: blur(var(--mt-blur)) saturate(150%); backdrop-filter: blur(var(--mt-blur)) saturate(150%);
  border-bottom: 1px solid rgba(255,255,255,.12); box-shadow: 0 4px 18px rgba(10,41,65,.16);
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
}
.mt-appbar-in { max-width: 1480px; margin: 0 auto; min-height: 60px; padding: 8px 16px; display: flex; align-items: center; gap: 10px; direction: rtl; }
.mt-ab-btn, .mt-appbar summary.mt-ab-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; min-width: 38px; padding: 0 12px; margin: 0;
  border-radius: var(--mt-r); border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #eef6fb;
  font: 600 13px/1 "Vazirmatn", Tahoma, Arial, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; list-style: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.mt-appbar summary.mt-ab-btn::-webkit-details-marker { display: none; }
.mt-appbar .mt-ab-btn, .mt-drawer .mt-ab-btn { width: auto; max-width: none; flex: 0 0 auto; box-shadow: none; transform: none; }
.mt-appbar .mt-ab-icon, .mt-drawer .mt-ab-icon { width: 38px; }
.mt-appbar .mt-ab-brand { flex: 0 1 auto; }
.mt-ab-btn:hover { background: rgba(255,255,255,.17); border-color: rgba(255,255,255,.4); color: #fff; }
.mt-ab-btn:focus-visible { outline: 2px solid #9ed6ec; outline-offset: 2px; }
.mt-ab-btn[aria-current="page"] { background: rgba(255,255,255,.2); }
.mt-ab-icon { padding: 0; width: 38px; }
.mt-ab-return { background: #f6c453; border-color: #f6c453; color: #3a2a00; }
.mt-ab-return:hover { background: #ffd36e; border-color: #ffd36e; color: #3a2a00; }
.mt-ab-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff; text-decoration: none; }
.mt-logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto;
  font: 700 19px/1 Georgia, "Times New Roman", serif; color: #fff; background: linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.35); }
.mt-ab-names { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mt-ab-title { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* v13.5.9: the page title is never cut (phones, 125-150% zoom): it wraps; the sticky offset follows the bar's real height */
.mt-ab-title { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.35; }
.mt-ab-names small { font-size: 11px; color: #bfe0ec; }
.mt-ab-status { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; justify-content: flex-end; min-width: 0; flex-wrap: wrap; }
.mt-ab-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
/* v13.1.8: the badge is positioned on its own bell button (the element the appbar renders), never on the page corner */
.mt-ab-bell, .mt-ab-btn[data-mt-bell] { position: relative; overflow: visible; }
.mt-ab-badge { position: absolute; top: -5px; left: -5px; z-index: 1; box-sizing: border-box; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; border: 2px solid #fff; background: #d92d20; color: #fff; font: 800 10.5px/15px Tahoma, Arial, sans-serif; text-align: center; white-space: nowrap; direction: ltr; pointer-events: none; }
.mt-ab-badge[hidden], .mt-ab-btn[hidden] { display: none; }
.mt-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; font: 700 12px/1 "Vazirmatn", Tahoma, sans-serif; color: #eef6fb;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); white-space: nowrap; }
.mt-pill.live { background: #0e7f55; border-color: rgba(255,255,255,.2); }
.mt-pill.live.disconnected { background: #b42318; } .mt-pill.live.connecting { background: rgba(255,255,255,.14); }

/* account popover */
.mt-ab-account { position: relative; }
.mt-ab-pop { position: absolute; top: 46px; left: 0; min-width: 230px; z-index: 9100; padding: 8px; border-radius: var(--mt-r-lg);
  background: var(--mt-glass-strong); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--mt-glass-line); box-shadow: var(--mt-shadow-lg); color: var(--mt-ink); }
.mt-ab-pop-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--mt-line-soft); margin-bottom: 6px; display: flex; flex-direction: column; gap: 2px; }
.mt-ab-pop-head small { color: var(--mt-mute); font-size: var(--mt-fs-xs); }
.mt-ab-pop a { display: flex; align-items: center; min-height: 38px; padding: 0 10px; border-radius: var(--mt-r-sm); color: var(--mt-ink); text-decoration: none; font-weight: 600; font-size: 13px; }
.mt-ab-pop a:hover, .mt-ab-pop a:focus-visible { background: rgba(11,106,147,.08); outline: none; }
.mt-ab-pop a[href$="logout"] { color: #b42318; }

/* ---- the menu drawer: one scroll area, groups never scroll on their own ---- */
.mt-drawer { position: fixed; inset: 0; z-index: 30000; }
.mt-drawer[hidden] { display: none; }
html.mt-drawer-open, html.mt-drawer-open body { overflow: hidden; }
.mt-dr-shade { position: absolute; inset: 0; background: rgba(6,24,39,.42); }
.mt-drawer .mt-dr-panel { display: block; margin: 0; }
.mt-dr-panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(330px, 88vw); overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 12px 28px; color: var(--mt-ink); direction: rtl;
  background: var(--mt-glass-strong); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border-left: 1px solid var(--mt-glass-line); box-shadow: var(--mt-shadow-lg); animation: mt-drawer-in .22s cubic-bezier(.2,.8,.2,1); }
@keyframes mt-slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.mt-dr-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; border-bottom: 1px solid var(--mt-line-soft); }
.mt-dr-head b { font-size: 15px; }
.mt-dr-head .mt-ab-btn { color: var(--mt-ink-2); background: rgba(10,41,65,.05); border-color: var(--mt-line-soft); }
.mt-dr-group { display: block; margin: 0; padding: 0; border: 0; background: none; }
.mt-drawer .mt-dr-group h3 { margin: 14px 10px 4px; font-size: var(--mt-fs-xs); font-weight: 700; color: var(--mt-mute); }
/* collapsible groups (v12.1) */
.mt-drawer details.mt-dr-group { border-bottom: 1px solid var(--mt-line-soft); padding: 2px 0 6px; }
.mt-drawer details.mt-dr-group > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 4px 10px; margin: 4px 0 2px;
  border-radius: var(--mt-r); cursor: pointer; font-size: 13px; font-weight: 800; color: var(--mt-ink-2); user-select: none; }
.mt-drawer details.mt-dr-group > summary::-webkit-details-marker { display: none; }
.mt-drawer details.mt-dr-group > summary:hover { background: rgba(11,106,147,.06); }
.mt-drawer details.mt-dr-group > summary:focus-visible { outline: 2px solid var(--mt-brand); outline-offset: -2px; }
.mt-drawer details.mt-dr-group > summary .mt-chev { transition: transform .15s ease; color: var(--mt-mute); }
.mt-drawer details.mt-dr-group[open] > summary .mt-chev { transform: rotate(180deg); }
.mt-drawer details.mt-dr-group.is-current > summary { color: var(--mt-brand-d); }
.mt-drawer .mt-dr-items { padding: 0 0 2px; }
.mt-drawer .mt-dr-group a { display: flex; align-items: center; min-height: 38px; padding: 6px 12px; margin: 1px 0; border-radius: var(--mt-r);
  color: var(--mt-ink); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.mt-dr-group a:hover { background: rgba(11,106,147,.08); }
.mt-dr-group a:focus-visible { outline: 2px solid var(--mt-brand); outline-offset: -2px; }
.mt-dr-group a[aria-current="page"] { background: var(--mt-brand); color: #fff; }
.mt-dr-group a[aria-current="page"]::after { content: "صفحه فعلی"; margin-inline-start: auto; font-size: 10.5px; font-weight: 600; opacity: .85; }
.mt-dr-group a.mt-dr-return { background: #fff4dc; color: #6b4600; border: 1px solid #f2d99b; }

/* ---- the notification button lives in the header; its panel opens under it ---- */
body.mt-shell #mtnFab { display: none !important; }
body.mt-shell #mtnPanel { top: 68px !important; bottom: auto !important; left: 12px !important; }

/* ---- page body under the header ---- */
body.mt-shell main.mt-shell-main { margin-top: var(--mt-s5); }

/* ---- phones: icons with accessible names, status on its own row ---- */
.mt-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) {
  .mt-appbar-in { padding: 6px 10px; gap: 6px; flex-wrap: wrap; min-height: 54px; }
  .mt-ab-actions .mt-ab-btn > span:not(.mt-ab-badge), .mt-ab-menu > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mt-ab-actions .mt-ab-btn, .mt-ab-menu { width: 38px; padding: 0; }
  .mt-appbar .mt-ab-brand { flex: 1 1 0; min-width: 0; } .mt-ab-brand > * { min-width: 0; } .mt-logo { width: 32px; height: 32px; font-size: 17px; flex: 0 0 auto; }
  /* v13.5.2: the brand never gets narrower than its logo (it collapsed to 0 and the logo slid under the back button on a narrow
     header, e.g. a phone at 150 % zoom); when menu + logo + the four actions do not fit one row, the actions wrap to a second
     row, kept at the end of the bar as on one row. Only the page title may shrink away. */
  /* logo (34) + gap (10) + a readable bit of the title (56, with …); not min-content, which is the whole unwrappable title */
  .mt-appbar .mt-ab-brand { min-width: 100px; } .mt-appbar .mt-ab-names { min-width: 56px; }
  .mt-appbar .mt-ab-actions { margin-inline-start: auto; }
  .mt-ab-status { order: 10; flex-basis: 100%; justify-content: flex-start; }
  .mt-ab-status:empty { display: none; }
  body.mt-shell #mtnPanel { top: 60px !important; left: 6px !important; right: 6px !important; }
  /* v13.1.4 mobile header: one row, title shrinks; account menu inside the screen */
  .mt-appbar .mt-ab-pop { position: fixed; top: 58px; left: 8px; right: 8px; min-width: 0; max-height: calc(100dvh - 70px); overflow-y: auto; }
}

/* ---- browsers without backdrop-filter, or users asking for less transparency: solid surfaces ---- */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .mt-appbar { background: linear-gradient(120deg, #0a2941, #075e78); }
  .mt-dr-panel, .mt-ab-pop { background: #fff; }
}
@media (prefers-reduced-transparency: reduce) {
  .mt-appbar { background: linear-gradient(120deg, #0a2941, #075e78); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .mt-dr-panel, .mt-ab-pop { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, section.card, .password-card, .filter-panel, .mt-card) { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { .mt-dr-panel, .mt-dr-shade, .mt-drawer.mt-closing .mt-dr-panel, .mt-drawer.mt-closing .mt-dr-shade { animation: none; } }
@media print { .mt-appbar, .mt-drawer { display: none !important; } html body.mt-ds { background: #fff !important; } }

/* ==================================================================
   Notifications (v12.1): one component for manager, seller and agent
   panels. Scoped to #mtNotif so page-level rules (e.g. the seller
   panel's full-width buttons) can never reshape it.
   ================================================================== */
#mtNotif .mtn-panel { background: var(--mt-glass-strong); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--mt-glass-line); border-radius: var(--mt-r-lg); box-shadow: var(--mt-shadow-lg); color: var(--mt-ink);
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif; width: min(380px, calc(100vw - 24px)); }
#mtNotif .mtn-head { background: var(--mt-glass-dark); padding: 10px 12px; gap: 10px; min-height: 52px; }
#mtNotif .mtn-head b { font-size: 14px; font-weight: 800; }
#mtNotif .mtn-head > span { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
#mtNotif button { width: auto; min-width: 0; max-width: none; flex: 0 0 auto; margin: 0; box-shadow: none; display: inline-flex; align-items: center; justify-content: center;
  font: 700 12px/1 "Vazirmatn", Tahoma, Arial, sans-serif; cursor: pointer; white-space: nowrap; }
#mtNotif .mtn-head button { height: 30px; padding: 0 10px; border-radius: var(--mt-r-sm); background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.22); }
#mtNotif .mtn-head button:hover { background: rgba(255,255,255,.24); }
#mtNotif #mtnClose { width: 30px; padding: 0; font-size: 16px; }
#mtNotif .mtn-list { background: transparent; }
#mtNotif .mtn-item { padding: 11px 14px; border-bottom: 1px solid var(--mt-line-soft); color: var(--mt-ink); }
#mtNotif .mtn-item.unread { background: rgba(11,106,147,.07); border-right: 4px solid var(--mt-brand); }
#mtNotif .mtn-item small { color: var(--mt-mute); }
#mtNotif .mtn-empty { padding: 28px 16px; color: var(--mt-mute); font-size: 13px; }
#mtNotif .mtn-foot { padding: 10px 12px; border-top: 1px solid var(--mt-line-soft); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--mt-ink-2); }
#mtNotif .mtn-foot:empty { display: none; }
#mtNotif .mtn-foot button { height: 34px; padding: 0 16px; border-radius: var(--mt-r-sm); }
@media (prefers-reduced-transparency: reduce) { #mtNotif .mtn-panel { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { #mtNotif .mtn-panel { background: #fff; } }

/* v13.1 form clarity (ui-ux-pro-max: visible labels, units inside fields, help on demand, grouped fields) */
.lbl{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px}
.hint{font-weight:400;font-size:12px;color:var(--mt-ink-2,#5b6b7d);line-height:1.6}
.in-unit{position:relative;display:block}
.in-unit>input{padding-left:58px!important}
.in-unit>i{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-style:normal;font-size:12px;color:var(--mt-ink-2,#5b6b7d);pointer-events:none}
details.help{margin:8px 0 12px;border:1px solid var(--mt-line-soft,#e4ebf2);border-radius:var(--mt-r,10px);background:#f8fbfd}
details.help>summary{cursor:pointer;padding:8px 12px;font-weight:700;font-size:13px;color:#174a63;list-style-position:inside;min-height:24px}
details.help>div{padding:0 12px 10px;font-size:12.5px;line-height:2;color:#334155}
fieldset.group{border:1px solid var(--mt-line-soft,#e4ebf2);border-radius:var(--mt-r,10px);padding:10px 12px 12px;margin:0 0 12px;min-width:0}
fieldset.group>legend{font-weight:800;font-size:13px;padding:0 6px;color:#1f3347}
.kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;align-items:stretch}
.kpi-row .kpi{display:flex;flex-direction:column;justify-content:flex-start;min-height:84px}
@media(max-width:640px){.kpi-row{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v13.1.3 seller home: finance summary and grade (scoped to .fin-home only) */
.fin-home .fin-home-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.fin-home .fin-home-head h2{margin:0}
.fin-home .fin-home-head small{color:var(--mt-ink-2,#5b6b7d);font-size:12px}
.fin-home .fin-home-kpis,.fin-home .fin-home-grade{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.fin-home .fin-home-kpis>div,.fin-home .fin-home-grade>div{background:#fff;border:1px solid var(--mt-line-soft,#e4ebf2);border-radius:var(--mt-r,10px);padding:12px 14px;display:flex;flex-direction:column;gap:6px;min-width:0}
.fin-home .fin-home-kpis span,.fin-home .fin-home-grade span{font-size:12px;color:var(--mt-ink-2,#5b6b7d)}
.fin-home .fin-home-amt{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;font-size:20px;color:var(--mt-brand,#0878a8);font-variant-numeric:tabular-nums}
.fin-home .fin-home-amt small{font-size:12px;font-weight:600;color:var(--mt-ink-2,#5b6b7d)}
.fin-home .fin-home-grade b{font-size:18px;color:var(--mt-brand,#0878a8)}
@media(max-width:640px){.fin-home .fin-home-kpis,.fin-home .fin-home-grade{grid-template-columns:repeat(2,minmax(0,1fr))}.fin-home .fin-home-amt{font-size:17px}}
.fin-home .fin-home-grade .fin-grade{align-self:flex-start}

/* v13.1.9 touch targets: buttons and button-links inside table cells are at least 36px high on phones */
@media (max-width:700px){td button,td a.btn,td .btn{min-height:36px;display:inline-flex;align-items:center;justify-content:center}}

/* ==================================================================
   v13.1.11 motion: ONE small shared set for every panel (seller, representative, checking, management). Only transform and
   opacity move; nothing runs forever except a real wait. Reduced motion: no movement, the wait is said in words.
   ================================================================== */
@keyframes mt-loading-spin { to { transform: rotate(360deg); } }
@keyframes mt-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes mt-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes mt-drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes mt-drawer-out { from { transform: none; } to { transform: translateX(100%); } }
@keyframes mt-skel-pulse { from { opacity: .55; } to { opacity: 1; } }
@keyframes mt-pop-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes mt-tick { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.mt-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* (a) action buttons waiting for the server: same ring, same size, the button keeps its box */
.mt-busy-btn { position: relative; }
.mt-busy-btn[aria-busy="true"] { pointer-events: none; cursor: progress; color: transparent !important; opacity: 1 !important; }
.mt-busy-btn[aria-busy="true"] > * { visibility: hidden; }
.mt-busy-btn[aria-busy="true"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; box-sizing: border-box;
  border: 2px solid var(--mt-busy-ring, #fff); border-inline-start-color: transparent; border-radius: 50%; animation: mt-loading-spin .75s linear infinite; }

/* (b) tables waiting for their first data: a few quiet rows in the place of the table (never fake numbers) */
.mt-skel { display: grid; gap: 10px; padding: 4px 0; }
.mt-skel i { display: block; height: 40px; border-radius: 8px; background: #e9eff4; animation: mt-skel-pulse .9s ease-in-out infinite alternate; }
.mt-skel i:first-child { height: 22px; width: 38%; }
.mt-skel i:nth-child(odd):not(:first-child) { background: #eef3f7; }

/* (c) the menu drawer opens from the right; the shade fades; closing plays the same way back (see the shell script) */
.mt-dr-shade { animation: mt-fade-in .22s ease-out; }
.mt-drawer.mt-closing .mt-dr-panel { animation: mt-drawer-out .2s ease-in forwards; }
.mt-drawer.mt-closing .mt-dr-shade { animation: mt-fade-out .2s ease-in forwards; }

/* (d) invoice details and the other existing windows: fade with a very small growth, in and out */
dialog#modal, dialog.pf-dlg { opacity: 0; transform: scale(.98);
  transition: opacity .2s ease, transform .2s ease, overlay .2s ease allow-discrete, display .2s ease allow-discrete; }
dialog#modal[open], dialog.pf-dlg[open] { opacity: 1; transform: none; }
dialog#modal::backdrop, dialog.pf-dlg::backdrop { opacity: 0; transition: opacity .2s ease, overlay .2s ease allow-discrete, display .2s ease allow-discrete; }
dialog#modal[open]::backdrop, dialog.pf-dlg[open]::backdrop { opacity: 1; }
@starting-style {
  dialog#modal[open], dialog.pf-dlg[open] { opacity: 0; transform: scale(.98); }
  dialog#modal[open]::backdrop, dialog.pf-dlg[open]::backdrop { opacity: 0; }
}

/* (e) a confirmed success (only after the server answered): the existing message appears softly with a short green tick */
.mt-ok-msg { animation: mt-pop-in .2s ease-out; }
.mt-ok-msg::before { content: "✓"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-end: 8px; border-radius: 50%;
  background: #0a7a52; color: #fff; font-size: 12px; font-weight: 800; vertical-align: middle; animation: mt-tick .25s ease-out .05s both; }
.mt-toast { position: fixed; inset-inline: 16px; bottom: max(16px, env(safe-area-inset-bottom)); margin: 0 auto; width: fit-content; max-width: calc(100% - 32px);
  z-index: 100030; padding: 10px 16px; border-radius: 12px; background: #e7f5ee; color: #0a5a36; border: 1px solid #bfe3d0;
  box-shadow: 0 10px 30px rgba(10,41,65,.16); font-weight: 700; font-size: 13px; line-height: 1.8; pointer-events: none; }
.mt-toast[hidden] { display: none; }

/* (f) target progress: the bar follows a real change of the count in about .4s; a plain refresh does not replay it */
.mt-progress { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: rgba(10,41,65,.1); overflow: hidden; }
.mt-progress > i { display: block; height: 100%; background: var(--mt-ok, #0a7a52); transform-origin: right center; transform: scaleX(var(--p, 0));
  transition: transform .4s cubic-bezier(.2,.8,.2,1); }

@media (prefers-reduced-motion: reduce) {
  .mt-busy-btn[aria-busy="true"]::after { content: attr(data-busy-text); animation: none; width: auto; height: auto; border: 0; border-radius: 0;
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--mt-busy-ring, #fff); }
  .mt-skel i, .mt-ok-msg, .mt-ok-msg::before, .mt-progress > i { animation: none; transition: none; }
  dialog#modal, dialog.pf-dlg, dialog#modal::backdrop, dialog.pf-dlg::backdrop { transition: none; }
}

/* v13.3 target state, gift rows, status correction ------------------------------------------------------------- */
.tgt-state { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.7;
  white-space: nowrap; border: 1px solid transparent; }
.tgt-achieved { background: #dcfce7; color: #166534; border-color: #86efac; }
.tgt-in_progress { background: #e0f2fe; color: #075985; border-color: #7dd3fc; }
.tgt-ended_pending { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.tgt-expired { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.gift-tag { display: inline-block; padding: 0 8px; border-radius: 999px; background: #f3e8ff; color: #6b21a8; border: 1px solid #d8b4fe;
  font-size: 12px; font-weight: 700; margin-inline-start: 4px; }
.inv-line.is-gift { background: #faf5ff; }
.inv-line.is-gift .inv-disc { visibility: hidden; }
.sfix-effects { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 13.5px; }
.sfix-effects li { margin: 2px 0; }
@media (max-width: 640px) { .tgt-state { white-space: normal; } .inv-line.is-gift .inv-disc { display: none; } }

/* ==================================================================
   Design system v4 (13.4.0) — "signal line"
   ------------------------------------------------------------------
   * Mahoor navy and teal, matured; a flat light canvas; white surfaces with a hairline; colour only for meaning.
   * Radii by hierarchy: panel 16, tile 12, control 10, chip 999, tooltip 8.
   * Motion tokens: 120/180/260 ms for answers, one page entrance <= 600 ms. Only transform and opacity move.
   * Components are scoped (mt-panel, mt-kpis, mt-chart, mt-seg, mt-flash, ...). No new global rule on table/input/button.
   * Appended last on purpose: older pages keep working and only pick up the new tokens.
   ================================================================== */
:root {
  --mt-navy: #0F2B46; --mt-navy-6: #2A4A6B; --mt-navy-1: #E8EEF4;
  --mt-teal: #0E7C86; --mt-teal-d: #0A636B; --mt-teal-3: #43C6BE; --mt-teal-soft: #E3F3F3;
  --mt-brand: #0E7C86; --mt-brand-d: #0A636B; --mt-brand-soft: #E3F3F3; --mt-petrol: #0E7C86; --mt-navy-2: #16385A;
  --mt-bg: #F2F5F8; --mt-surface: #FFFFFF;
  --mt-ink: #13283D; --mt-ink-2: #3B5167; --mt-mute: #5B6E82;
  --mt-line: #DCE3EA; --mt-line-soft: #E8EDF2;
  --mt-ok: #127A55; --mt-ok-bg: #E6F4EE; --mt-ok-line: #BCE0CF;
  --mt-warn: #8F5A00; --mt-warn-bg: #FFF3D9; --mt-warn-line: #F0D69A;
  --mt-danger: #B3261E; --mt-danger-bg: #FCE9E7; --mt-danger-line: #F1C3BE;
  --mt-info: #1F5FA8; --mt-info-bg: #E7F0FB;
  --mt-c1: #1C4467; --mt-c2: #0E9A9A; --mt-c3: #B5523B; --mt-c0: #C9D5E1;
  --mt-r-panel: 16px; --mt-r-tile: 12px; --mt-r-ctl: 10px; --mt-r-tip: 8px;
  --mt-r-sm: 8px; --mt-r: 10px; --mt-r-lg: 16px; --mt-radius: 10px;
  --mt-e1: 0 1px 2px rgba(15,43,70,.06); --mt-e2: 0 8px 24px rgba(15,43,70,.12); --mt-e3: 0 24px 60px rgba(15,43,70,.28);
  --mt-shadow-sm: var(--mt-e1); --mt-shadow: var(--mt-e1); --mt-shadow-lg: var(--mt-e3);
  --mt-glass: #fff; --mt-glass-strong: #fff; --mt-glass-line: var(--mt-line); --mt-glass-dark: #0F2B46;
  --mt-focus: 0 0 0 3px rgba(14,124,134,.26);
  --mt-d1: 120ms; --mt-d2: 180ms; --mt-d3: 260ms; --mt-d-enter: 480ms;
  --mt-ease-out: cubic-bezier(.2,.8,.2,1); --mt-ease-in: cubic-bezier(.4,0,1,1);
  accent-color: #0E7C86;
}
::selection { background: #CDEDEA; }

/* ---- canvas: flat, light ---- */
html body.mt-ds:not(.mt-tv):not(.home-entry) { background: var(--mt-bg); }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, section.card, .password-card, .filter-panel, .mt-card) {
  background: #fff; border: 1px solid var(--mt-line); box-shadow: var(--mt-e1); border-radius: var(--mt-r-panel);
}
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.kpi, .stat, .live-mini, .mini) { background: #fff; border-color: var(--mt-line-soft); border-radius: var(--mt-r-tile); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--mt-teal) !important; outline-offset: 2px;
}

/* ---- the header: flat navy, one row on phones ---- */
.mt-appbar {
  background: var(--mt-navy); -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom: 1px solid rgba(255,255,255,.08); box-shadow: 0 1px 0 rgba(15,43,70,.2), 0 6px 18px rgba(15,43,70,.10);
  transition: transform var(--mt-d3) var(--mt-ease-out);
}
.mt-appbar.mt-ab-hide { transform: translateY(calc(-100% - 2px)); }
.mt-appbar-in { min-height: 58px; }
.mt-appbar details.mt-ab-account { margin: 0; }
.mt-appbar, .mt-appbar *, .mt-drawer, .mt-drawer * { box-sizing: border-box; }   /* the same header height on every page */   /* page rules such as details{margin} never reach the header */
.mt-ab-btn, .mt-appbar summary.mt-ab-btn { height: 40px; min-width: 40px; border-radius: var(--mt-r-ctl); border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06);
  transition: background-color var(--mt-d2) ease, border-color var(--mt-d2) ease, transform var(--mt-d1) ease; }
.mt-ab-btn:active { transform: scale(.96); }
.mt-ab-btn:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.mt-ab-btn:focus-visible { outline: 2px solid var(--mt-teal-3) !important; outline-offset: 2px; }
.mt-ab-btn[aria-current="page"] { background: rgba(67,198,190,.16); border-color: rgba(67,198,190,.45); }
.mt-logo { width: 38px; height: 38px; border-radius: var(--mt-r-ctl); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); font: 700 19px/1 Georgia, serif; }
.mt-logo svg { width: 26px; height: 26px; display: block; }
.mt-ab-title { font-size: 16px; }
.mt-ab-names small { color: #A9C6D8; }
.mt-pill.live { background: #0F6E4E; }
.mt-ab-pop { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--mt-line); box-shadow: var(--mt-e2); border-radius: var(--mt-r-tile);
  transform-origin: top left; animation: mt-pop-in var(--mt-d2) var(--mt-ease-out); }
.mt-ab-pop a { min-height: 42px; border-radius: var(--mt-r-sm); }
.mt-ab-pop a:hover, .mt-ab-pop a:focus-visible { background: var(--mt-teal-soft); }
@media (max-width: 760px) {
  .mt-appbar-in { min-height: 54px; padding: 6px 8px; gap: 6px; }
  .mt-ab-btn, .mt-appbar summary.mt-ab-btn { height: 44px; min-width: 44px; }
  .mt-ab-actions .mt-ab-btn, .mt-ab-menu { width: 44px; }
  .mt-ab-actions { gap: 4px; }
  .mt-logo { width: 34px; height: 34px; } .mt-logo svg { width: 24px; height: 24px; }
  .mt-ab-names small { display: none; }
  .mt-appbar .mt-ab-brand { min-height: 44px; }
  .mt-ab-title { font-size: 15px; }
  /* the only status a page may still put in the header (a preview / return link) becomes one slim strip, not a second tall row */
  .mt-ab-status:not(:empty) { margin: 6px -8px -6px; padding: 0; flex-basis: calc(100% + 16px); }
  .mt-ab-status .mt-ab-return { width: 100%; height: 44px; border-radius: 0; justify-content: center; border-width: 1px 0 0; }
  .mt-appbar .mt-ab-pop { top: 60px; }
}

/* ---- the menu drawer: solid, with a local search ---- */
.mt-dr-panel { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; border-left: 1px solid var(--mt-line); box-shadow: var(--mt-e3); padding: 10px 10px 28px; width: min(340px, 90vw);
  animation: mt-drawer-in var(--mt-d3) var(--mt-ease-out); }
.mt-dr-shade { background: rgba(9,26,42,.46); }
.mt-dr-head { gap: 10px; padding: 6px 4px 10px; border-bottom: 0; }
.mt-dr-head .mt-dr-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; color: var(--mt-navy); }
.mt-dr-head .mt-dr-brand svg { width: 30px; height: 30px; }
.mt-dr-head .mt-ab-btn { color: var(--mt-ink-2); background: var(--mt-bg); border-color: var(--mt-line); }
.mt-dr-search { position: relative; display: block; margin: 2px 2px 8px; }
.mt-dr-search input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 0 40px 0 12px !important; border-radius: var(--mt-r-ctl) !important; background: var(--mt-bg) !important; border: 1px solid var(--mt-line) !important; font-size: 14px; }
.mt-dr-search svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--mt-mute); pointer-events: none; }
.mt-dr-empty { margin: 10px 8px; color: var(--mt-mute); font-size: 13px; }
.mt-dr-empty[hidden] { display: none; }
.mt-drawer details.mt-dr-group { border-bottom: 1px solid var(--mt-line-soft); }
.mt-drawer details.mt-dr-group > summary { min-height: 44px; font-size: 13.5px; color: var(--mt-navy); }
.mt-drawer details.mt-dr-group > summary .mt-chev { transition: transform var(--mt-d2) var(--mt-ease-out); }
.mt-drawer details.mt-dr-group[open] > .mt-dr-items { animation: mt-pop-in var(--mt-d2) var(--mt-ease-out); }
.mt-drawer .mt-dr-group a { min-height: 42px; position: relative; color: var(--mt-ink); }
.mt-dr-group a:hover { background: var(--mt-teal-soft); }
.mt-dr-group a[aria-current="page"] { background: var(--mt-teal-soft); color: var(--mt-teal-d); font-weight: 800; box-shadow: inset -3px 0 0 var(--mt-teal); }
.mt-dr-group a[aria-current="page"]::after { content: "صفحه فعلی"; font-weight: 600; color: var(--mt-teal-d); opacity: 1; }
.mt-drawer.mt-searching details.mt-dr-group > .mt-dr-items { animation: none; }
.mt-drawer .mt-dr-group a[hidden], .mt-drawer details.mt-dr-group[hidden] { display: none; }
@media (max-width: 760px) { .mt-drawer .mt-dr-group a { min-height: 46px; } }

/* ---- shared surfaces and type ---- */
.mt-panel { background: #fff; border: 1px solid var(--mt-line); border-radius: var(--mt-r-panel); box-shadow: var(--mt-e1); padding: 16px 18px; min-width: 0; }
.mt-panel > h2, .mt-h { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: var(--mt-navy); line-height: 1.5; }
.mt-h small, .mt-panel > h2 small { font-size: 12px; font-weight: 500; color: var(--mt-mute); margin-inline-start: 6px; }
@media (max-width: 760px) { .mt-h small, .mt-panel > h2 small { display: block; margin: 2px 0 0; } }
.mt-num { font-variant-numeric: tabular-nums; }
.mt-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.mt-unit { font-size: 12px; font-weight: 500; color: var(--mt-mute); margin-inline-start: 4px; }

/* ---- KPI band: one surface, cells separated by hairlines (not a card per number) ---- */
.mt-kpis { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); background: #fff; border: 1px solid var(--mt-line); border-radius: var(--mt-r-panel); box-shadow: var(--mt-e1); overflow: hidden; }
.mt-kpi { position: relative; padding: 14px 18px 14px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mt-kpi + .mt-kpi { border-inline-start: 1px solid var(--mt-line-soft); }
.mt-kpi > span { font-size: 13px; font-weight: 600; color: var(--mt-ink-2); }
.mt-kpi > b { font-size: 28px; line-height: 1.15; font-weight: 800; color: var(--mt-navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-kpi > small { font-size: 12px; color: var(--mt-mute); }
.mt-kpi .mt-meter { margin-top: 4px; }
.mt-kpis-2 { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 10px 18px; border-top: 1px solid var(--mt-line-soft); background: #FAFCFD; font-size: 13px; color: var(--mt-ink-2); }
.mt-kpis-2 > span { display: inline-flex; align-items: baseline; gap: 6px; }
.mt-kpis-2 > span b { color: var(--mt-navy); font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .mt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-kpi { padding: 11px 12px; }
  .mt-kpi + .mt-kpi { border-inline-start: 0; }
  .mt-kpi:nth-child(even) { border-inline-start: 1px solid var(--mt-line-soft); }
  .mt-kpi:nth-child(n+3) { border-top: 1px solid var(--mt-line-soft); }
  .mt-kpi > b { font-size: 22px; }
  .mt-kpi > span { font-size: 12.5px; }
  .mt-kpis-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px 12px; gap: 6px 12px; font-size: 12.5px; }
  .mt-kpis-2 > span { display: flex; justify-content: space-between; gap: 6px; }
}
@media (max-width: 340px) { .mt-kpis, .mt-kpis-2 { grid-template-columns: 1fr; } .mt-kpi:nth-child(even) { border-inline-start: 0; } .mt-kpi:nth-child(n+2) { border-top: 1px solid var(--mt-line-soft); } }

/* a small proportion meter (only drawn when the denominator is valid) */
.mt-meter { display: block; height: 6px; border-radius: 999px; background: var(--mt-navy-1); overflow: hidden; }
.mt-meter > i { display: block; height: 100%; background: var(--mt-teal); transform-origin: right center; transform: scaleX(var(--p, 0)); transition: transform var(--mt-d3) var(--mt-ease-out); border-radius: inherit; }

/* ---- segmented switch (period tabs and the like) ---- */
.mt-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--mt-navy-1); max-width: 100%; overflow-x: auto; }
.mt-seg button { all: unset; box-sizing: border-box; cursor: pointer; min-height: 36px; padding: 0 16px; border-radius: 999px; font: 600 13px/36px Vazirmatn, Tahoma, sans-serif; color: var(--mt-ink-2); white-space: nowrap;
  transition: background-color var(--mt-d2) ease, color var(--mt-d2) ease; }
.mt-seg button[aria-selected="true"] { background: #fff; color: var(--mt-teal-d); box-shadow: 0 1px 2px rgba(15,43,70,.12); font-weight: 800; }
.mt-seg button:focus-visible { outline: 2px solid var(--mt-teal) !important; outline-offset: 1px; }
@media (max-width: 760px) { .mt-seg button { min-height: 44px; line-height: 44px; } }

/* ---- charts (inline SVG drawn by window.mtChart) ---- */
.mt-chart { margin: 0; position: relative; min-width: 0; }
.mt-chart figcaption { font-size: 12.5px; color: var(--mt-mute); margin-top: 8px; line-height: 1.8; }
.mt-chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; font-size: 12.5px; color: var(--mt-ink-2); }
.mt-chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.mt-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.mt-chart svg text { font-family: Vazirmatn, Tahoma, sans-serif; fill: var(--mt-ink-2); }
.mt-chart .mc-axis { stroke: var(--mt-line); stroke-width: 1; }
.mt-chart .mc-grid { stroke: var(--mt-line-soft); stroke-width: 1; }
.mt-chart .mc-d { cursor: pointer; outline: none; }
.mt-chart .mc-d:focus-visible .mc-hit { stroke: var(--mt-teal); stroke-width: 2; }
.mt-chart .mc-hit { fill: transparent; }
.mt-chart .mc-d.is-on .mc-hit, .mt-chart .mc-d:hover .mc-hit { fill: rgba(14,124,134,.07); }
.mt-chart .mc-bar { transform-box: fill-box; }
.mt-chart .mc-band { opacity: .55; }
.mt-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 120px; max-width: 240px; padding: 8px 10px; border-radius: var(--mt-r-tip); background: var(--mt-navy); color: #fff; font-size: 12.5px; line-height: 1.8;
  box-shadow: var(--mt-e2); opacity: 0; transform: translateY(4px); transition: opacity var(--mt-d2) ease, transform var(--mt-d2) var(--mt-ease-out); }
.mt-tip.on { opacity: 1; transform: none; }
.mt-tip b { display: block; font-weight: 800; }
.mt-chart-state { padding: 14px; border-radius: var(--mt-r-tile); background: var(--mt-bg); color: var(--mt-ink-2); font-size: 13px; line-height: 1.9; }
.mt-chart-state.is-error { background: var(--mt-danger-bg); color: #7A1A12; }
.mt-chart-state.is-thin { background: var(--mt-warn-bg); color: #6B4600; }
.mt-chart-table summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--mt-teal-d); min-height: 32px; display: inline-flex; align-items: center; }
/* draw-in: bars grow from their baseline, once, on first paint only */
.mt-enter .mt-chart .mc-bar { animation: mt-grow-y var(--mt-d-enter) var(--mt-ease-out) both; animation-delay: calc(var(--i, 0) * 30ms); }
.mt-enter .mt-chart .mc-hbar { animation: mt-grow-x var(--mt-d-enter) var(--mt-ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes mt-grow-y { from { transform: scaleY(0); } to { transform: none; } }
@keyframes mt-grow-x { from { transform: scaleX(0); } to { transform: none; } }

/* ---- one orchestrated entrance per page (first paint only, never on live refresh) ---- */
.mt-enter .mt-rise { animation: mt-rise var(--mt-d-enter) var(--mt-ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes mt-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- a changed live value: a short highlight, then nothing ---- */
.mt-flash { position: relative; }
.mt-flash::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(67,198,190,.28); pointer-events: none; animation: mt-flash 900ms ease-out forwards; }
@keyframes mt-flash { from { opacity: 1; } to { opacity: 0; } }

/* ---- loading skeleton with a real sweep, and a worded fallback ---- */
.mt-skel i { background: linear-gradient(90deg, #E9EFF4 0%, #F5F8FA 50%, #E9EFF4 100%); background-size: 200% 100%; }

@media (prefers-reduced-motion: reduce) {
  .mt-appbar, .mt-meter > i, .mt-tip, .mt-seg button, .mt-ab-pop, .mt-dr-panel, .mt-drawer details.mt-dr-group[open] > .mt-dr-items { transition: none; animation: none; }
  .mt-enter .mt-rise, .mt-enter .mt-chart .mc-bar, .mt-enter .mt-chart .mc-hbar, .mt-flash::after { animation: none; }
}
html.mt-still .mt-enter .mt-rise, html.mt-still .mt-enter .mt-chart .mc-bar, html.mt-still .mt-enter .mt-chart .mc-hbar, html.mt-still .mt-flash::after { animation: none; }
@media print { .mt-tip, .mt-seg { display: none !important; } .mt-kpis, .mt-panel { box-shadow: none; border-color: #999; } }

/* ==================================================================
   v13.4.0 phase 2a: shell everywhere
   ================================================================== */
/* «حرکت‌های رابط» off (html.mt-still, a per-browser choice): like reduced motion, but a real wait keeps its spinner */
html.mt-still *, html.mt-still *::before, html.mt-still *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
html.mt-still .mt-busy-btn[aria-busy="true"]::after { animation-duration: .75s !important; animation-iteration-count: infinite !important; }
.mt-ab-pop .mt-ab-still { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 10px; border-radius: var(--mt-r-sm); cursor: pointer; font: 600 13px/1.4 Vazirmatn, Tahoma, sans-serif; color: var(--mt-ink); margin-top: 4px; border-top: 1px solid var(--mt-line-soft); }
.mt-ab-pop .mt-ab-still:hover, .mt-ab-pop .mt-ab-still:focus-visible { background: var(--mt-teal-soft); }
.mt-ab-pop .mt-ab-still:focus-visible { outline: 2px solid var(--mt-teal) !important; outline-offset: -2px; }
.mt-ab-still span { flex: 1 1 auto; }
.mt-switch { position: relative; width: 36px; height: 20px; border-radius: 999px; background: #C9D5E1; flex: 0 0 auto; transition: background-color var(--mt-d2) ease; }
.mt-switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform var(--mt-d2) var(--mt-ease-out); }
.mt-ab-still[aria-checked="true"] .mt-switch { background: var(--mt-teal); }
.mt-ab-still[aria-checked="true"] .mt-switch::after { transform: translateX(-16px); }
/* acting for someone else / previewing a representative: a clear badge with the existing return link */
.mt-ab-return { gap: 8px; font-weight: 800; }
.mt-ab-return::before { content: "ورود جانشین"; order: -1; padding: 2px 8px; border-radius: 999px; background: #3A2A00; color: #FFE6A3; font-size: 11px; font-weight: 800; line-height: 1.6; }
.mt-ab-return[href$="/return-manager"]::before { content: "پیش‌نمایش نماینده"; }
@media (max-width: 760px) { .mt-ab-status .mt-ab-return { gap: 10px; } }
/* the lock-up (login pages): tile mark + Persian name */
.mt-lockup { display: inline-flex; align-items: center; gap: 12px; direction: rtl; margin: 0 0 16px; color: var(--mt-navy); }
.mt-lockup .mt-lockup-mark svg { display: block; width: 48px; height: 48px; }
.mt-lockup b { font: 800 26px/1.2 Vazirmatn, Tahoma, sans-serif; letter-spacing: 0; }
.mt-lockup.on-dark { color: #fff; text-shadow: 0 2px 14px rgba(0,25,39,.6); }
.mt-lockup.on-dark .mt-lockup-mark svg { box-shadow: 0 6px 18px rgba(0,25,39,.35); border-radius: 11px; }
/* the Jalali date field (13.4.1): the calendar icon is drawn INSIDE the field itself (a background of the input, left = the end
   side in RTL, vertically centred), so it can never sit outside the frame, below it or beside a narrower input; the clear «×»
   keeps the start side. The wrapper only positions the clear button; the old floating ::after icon is retired. */
html body .jalali-filter-wrap::after { content: none !important; display: none !important; }
html body .jalali-filter-wrap { position: relative; }
html body .jalali-filter-input, html body input.jalali-date.date-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E7C86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: left 12px center !important; background-size: 18px 18px !important;
  padding-left: 40px !important; min-height: 40px; cursor: pointer; box-sizing: border-box; max-width: 100%;
}
html body .jalali-filter-wrap:has(> .x) .jalali-filter-input, html body .jalali-filter-wrap:has(> button.x) .jalali-filter-input { padding-right: 44px !important; }
/* the clear button: centred on the field (not on a label above it), a 40px touch area around the 30px visible circle */
html body .jalali-filter-wrap > button.x { top: 50% !important; transform: translateY(-50%) !important; width: 30px !important; height: 30px !important; line-height: 30px !important; right: 6px !important; }
html body .jalali-filter-wrap > button.x::before { content: ""; position: absolute; inset: -5px; }
html body .jalali-filter-wrap > button.x:focus-visible { outline: 2px solid var(--mt-teal, #0E7C86) !important; outline-offset: 1px; }
/* keyboard focus: the global «input:focus{outline:none}» rule has a long :not() chain; the never-matching id in :is() only lifts
   specificity so the teal ring wins on the date field */
html:is(:root, #mt-jf-focus) body .jalali-filter-input:focus-visible, html:is(:root, #mt-jf-focus) body input.jalali-date.date-input:focus-visible { outline: 2px solid var(--mt-teal, #0E7C86) !important; outline-offset: 2px; }
/* the auto-built field (a hidden input next to it): the wrapper never grows wider than its field */
html body span.jalali-filter-wrap { display: block; width: 100%; max-width: 100%; }
html body .jalali-filter-wrap > .jalali-filter-input { margin: 0; width: 100%; }
.jalali-filter-input { font-variant-numeric: tabular-nums; text-overflow: clip; }
@media (max-width: 760px) {
  html body .jalali-filter-input, html body input.jalali-date.date-input { min-height: 44px; font-size: 16px; }
}
.mt-appbar .mt-ab-btn.mt-ab-return { background: #F6C453; border-color: #F6C453; color: #3A2A00; }
.mt-appbar .mt-ab-btn.mt-ab-return:hover { background: #FFD36E; border-color: #FFD36E; color: #3A2A00; }
.mt-appbar .mt-ab-btn.mt-ab-return:focus-visible { outline-color: #FFE6A3 !important; }

/* v13.4.0 shared responsive tables (mtTable in _MT_CHART_JS): phones get one card per row with the actions visible and
   «جزئیات» for the rest; «نمایش جدول کامل» brings the real table back with horizontal scroll inside its box */
.mt-rtw{position:relative;min-width:0}
.mt-rt-full{display:none}
/* v13.5.4: no second vertical scroll inside a page — long lists use the PAGE scroll; a table scrolls sideways only when it
   is really wider than its box (.fits is set by the shared script when it is not), its header stays under the app bar */
.scroll.is-long{max-height:none}
.scroll.fits{overflow:visible}
/* v13.5.9: a shared table never clips itself (a page-local table{overflow:hidden} made it the sticky header's box) */
table.mt-rt-t{overflow:visible}
.mt-rt-t thead th{position:sticky;top:var(--mt-sticky-top,0px);z-index:1;background:#F5F8FB;color:var(--mt-ink-2);font-size:12.5px;font-weight:700;border-bottom:1px solid var(--mt-line);white-space:nowrap}
/* v13.5.6: inside a box with overflow the header must not use the app-bar offset (it would sit over the first row): a box that
   scrolls vertically itself keeps it at its own top; a box that only clips gets a static header the shared script moves with the page */
.mt-rt-t.mt-rt-box thead th{top:0}
.mt-rt-t.mt-rt-clip thead th{position:static}
.mt-rt-t tbody tr:hover td{background:#F7FAFC}
.mt-rt-t td.rt-x{display:none}
.mt-rt-t td.rt-empty{color:var(--mt-mute);text-align:center;padding:18px}
@media(max-width:640px){
 .mt-rt-many .mt-rt-full{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;margin:0 0 8px;border-radius:var(--mt-r-ctl);border:1px solid var(--mt-line);background:#fff;font:700 13px Vazirmatn,Tahoma,sans-serif;color:var(--mt-teal-d)}
 .mt-rt-many .mt-rt-full:focus-visible{outline:2px solid var(--mt-teal)!important;outline-offset:2px}
 .mt-rt-many:not(.is-full) .scroll{overflow:visible;max-height:none}
 .mt-rt-many:not(.is-full) .mt-rt-t,.mt-rt-many:not(.is-full) .mt-rt-t tbody{display:block;min-width:0;width:auto}
 .mt-rt-many:not(.is-full) .mt-rt-t thead{display:none}
 .mt-rt-many:not(.is-full) .mt-rt-t tr{display:flex;flex-direction:row;flex-wrap:wrap;column-gap:8px;row-gap:2px;margin:0 0 10px;padding:10px 12px;background:#fff;border:1px solid var(--mt-line);border-radius:var(--mt-r-tile);box-shadow:var(--mt-e1)}
 .mt-rt-many:not(.is-full) .mt-rt-t tr.is-open{border-color:#B8D9DA}
 .mt-rt-many:not(.is-full) .mt-rt-t td{flex:1 1 100%;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:5px 0!important;border:0!important;white-space:normal!important;text-align:left;width:auto!important;background:none!important;min-width:0;overflow-wrap:anywhere}
 .mt-rt-many:not(.is-full) .mt-rt-t td::before{content:attr(data-l);flex:0 0 auto;max-width:45%;text-align:right;color:var(--mt-ink-2);font-size:12px;font-weight:700}
 .mt-rt-many:not(.is-full) .mt-rt-t td[data-l=""]::before,.mt-rt-many:not(.is-full) .mt-rt-t td.rt-x::before,.mt-rt-many:not(.is-full) .mt-rt-t td.rt-empty::before{content:none}
 .mt-rt-many:not(.is-full) .mt-rt-t td.rt-t{font-weight:800;font-size:14.5px;color:var(--mt-navy);justify-content:flex-start;text-align:right}
 .mt-rt-many:not(.is-full) .mt-rt-t td.rt-t::before{content:attr(data-l);font-size:12px;color:var(--mt-mute);font-weight:600;max-width:none}
 .mt-rt-many:not(.is-full) .mt-rt-t tr{position:relative}
 .mt-rt-many:not(.is-full) .mt-rt-t td[data-l="انتخاب"]{position:absolute;top:6px;left:8px;padding:0!important}
 .mt-rt-many:not(.is-full) .mt-rt-t td[data-l="انتخاب"]::before{content:none}
 .mt-rt-many:not(.is-full) .mt-rt-t td[data-l="انتخاب"] input{width:24px;height:24px;margin:10px}
 .mt-rt-many:not(.is-full) .mt-rt-t td.rt-d:not(.rt-a){display:none}
 .mt-rt-many:not(.is-full) .mt-rt-t tr.is-open td.rt-d{display:flex;border-top:1px dashed var(--mt-line-soft)!important;animation:mt-pop-in var(--mt-d2) var(--mt-ease-out)}
 .mt-rt-many:not(.is-full) .mt-rt-t td.rt-a{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px;border-top:1px solid var(--mt-line-soft)!important;padding-top:8px!important;margin-top:4px}
 .mt-rt-many:not(.is-full) .mt-rt-t td.rt-a::before{content:none}
 .mt-rt-many:not(.is-full) .mt-rt-t td.rt-a button,.mt-rt-many:not(.is-full) .mt-rt-t td.rt-a .btn{flex:1 1 auto;min-height:44px}
 .mt-rt-many:not(.is-full) .mt-rt-t td.rt-a{flex:1 1 55%}
 .mt-rt-many:not(.is-full) .mt-rt-t td.rt-x{display:flex;align-items:flex-end;order:99;flex:1 1 30%;padding-top:8px!important;margin-top:4px;border-top:1px solid var(--mt-line-soft)!important}
 .mt-rt-many:not(.is-full) .mt-rt-more{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;width:100%;min-height:44px;border-radius:var(--mt-r-ctl);background:var(--mt-bg);color:var(--mt-ink-2);font:700 13px Vazirmatn,Tahoma,sans-serif}
 .mt-rt-many:not(.is-full) .mt-rt-more:focus-visible{outline:2px solid var(--mt-teal)!important;outline-offset:1px}
 .mt-rt-many.is-full .scroll{overflow:auto;max-height:none}
}
@media(prefers-reduced-motion:reduce){.mt-rt-t tr.is-open td.rt-d{animation:none!important}}

/* v13.4.0 key/value list (system and push status) and inline status tags */
.mt-kv{margin:0;display:grid;gap:0;border:1px solid var(--mt-line-soft);border-radius:var(--mt-r);overflow:hidden;background:#fff}
.mt-kv-row{display:grid;grid-template-columns:minmax(150px,34%) 1fr;gap:12px;padding:11px 14px;border-top:1px solid var(--mt-line-soft);align-items:baseline}
.mt-kv-row:first-child{border-top:0}
.mt-kv dt{font-weight:700;color:var(--mt-ink-2);font-size:13px}
.mt-kv dd{margin:0;color:var(--mt-ink);min-width:0;overflow-wrap:anywhere}
.mt-tag{display:inline-flex;align-items:center;gap:5px;padding:2px 10px;border-radius:999px;font-size:12px;font-weight:700;line-height:1.7;border:1px solid var(--mt-line);background:var(--mt-soft);color:var(--mt-ink-2);vertical-align:baseline}
.mt-tag::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.85}
.mt-tag.ok{background:var(--mt-ok-bg);border-color:var(--mt-ok-line);color:var(--mt-ok)}
.mt-tag.bad{background:var(--mt-danger-bg);border-color:var(--mt-danger-line);color:var(--mt-danger)}
.mt-tag.warn{background:var(--mt-warn-bg);border-color:var(--mt-warn-line);color:var(--mt-warn)}
.mt-code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;background:var(--mt-soft);border-radius:6px;padding:1px 6px;unicode-bidi:isolate}
@media(max-width:640px){.mt-kv-row{grid-template-columns:1fr;gap:3px}}
/* public portal header: the lock-up replaces the Latin script name */
.portal-script-brand .mt-lockup-portal{margin:0 auto;justify-content:center}
.portal-script-brand .mt-lockup-portal .mt-lockup-mark svg{width:38px;height:38px}
.portal-script-brand .mt-lockup-portal b{font-size:22px}
/* notification button, medals and confirmation icons drawn as SVG (no emoji in chrome) */
.mtn-fab{display:grid!important;place-items:center}
.medal{display:inline-block;width:14px;height:14px;border-radius:50%;border:3px solid;box-sizing:border-box;vertical-align:-2px;margin-inline-end:4px}
.medal.m1{border-color:#D4A017;background:#F6E3A1}.medal.m2{border-color:#9AA8B6;background:#E3E8ED}.medal.m3{border-color:#C27C4B;background:#F1D3BC}
.mt-done-ic{display:grid;place-items:center;width:72px;height:72px;margin:0 auto 10px;border-radius:50%;background:#E7F5EE;color:#0A7A52}
.mt-done-ic .mt-ic{width:38px;height:38px;stroke-width:2.4}
.alert-card .mt-ic{vertical-align:-3px;color:#8a5a00;margin-inline-end:4px}
.gate-icon .mt-ic{width:30px;height:30px}
/* an empty table (one message row) on a phone: the message alone, without a header row that cannot fit */
@media(max-width:640px){table.mt-rt-none{min-width:0!important;width:100%}table.mt-rt-none thead{display:none}table.mt-rt-none td.rt-empty{display:block;text-align:center;color:var(--mt-mute);padding:18px 10px}}

/* v13.4.0 one entrance per server-rendered page: the first cards rise in order, once (CSS only; nothing re-renders them) */
@media (prefers-reduced-motion: no-preference) {
  html:not(.mt-still) body.mt-shell:not(.mh-dash):not(.sp-home) .wrap > :is(.card, section, .note):nth-child(-n+7),
  html:not(.mt-still) body.mt-shell .pf > :is(.pf-card, .pf-seg, .pf-tabs, .pf-head):nth-child(-n+7) {
    animation: mt-rise var(--mt-d-enter) var(--mt-ease-out) both;
  }
  html:not(.mt-still) body.mt-shell .wrap > :nth-child(2), html:not(.mt-still) body.mt-shell .pf > :nth-child(2) { animation-delay: 40ms; }
  html:not(.mt-still) body.mt-shell .wrap > :nth-child(3), html:not(.mt-still) body.mt-shell .pf > :nth-child(3) { animation-delay: 80ms; }
  html:not(.mt-still) body.mt-shell .wrap > :nth-child(4), html:not(.mt-still) body.mt-shell .pf > :nth-child(4) { animation-delay: 120ms; }
  html:not(.mt-still) body.mt-shell .wrap > :nth-child(n+5), html:not(.mt-still) body.mt-shell .pf > :nth-child(n+5) { animation-delay: 160ms; }
}

/* people: the list is a responsive grid of person tiles with a quiet hover lift */
.pf-list{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:8px}
.pf-item{transition:border-color var(--mt-d1) ease,box-shadow var(--mt-d2) ease,transform var(--mt-d2) var(--mt-ease-out)}
.pf-item:hover{box-shadow:var(--mt-shadow);transform:translateY(-1px)}
.pf-item:focus-visible{outline:2px solid var(--mt-teal,#0E7C86);outline-offset:2px}
.pf-item b{color:var(--mt-navy,#0F2B46)}
.pf-seg a{transition:background var(--mt-d1) ease,color var(--mt-d1) ease}
@media (max-width:640px){.pf-list{grid-template-columns:1fr}}
@media (prefers-reduced-motion: reduce){.pf-item,.pf-item:hover{transition:none;transform:none}}
html.mt-still .pf-item:hover{transform:none}
@media (max-width:640px){.pf-kv{gap:6px}.pf-kv div{padding:6px 10px}.pf-kv b{margin-top:1px;font-size:13.5px}}
/* the dark «today» panel of the seller profile keeps its glass tiles (the light-tile rule above is for light surfaces) */
html body.mt-ds:not(.mt-tv):not(.home-entry) .day-main .mini { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); color: #fff; box-shadow: none; }
html body.mt-ds .day-main .mini span { color: #d6ecef; font-size: 11px; }
html body.mt-ds .day-main .mini b { color: #fff; }
/* the push page note: a quiet paragraph, not a box */
.wrap p.mini { background: none; border: 0; padding: 0; color: var(--mt-ink-2); line-height: 1.9; }

/* v13.5.2 account forms: the seller and the management password pages share one width, rhythm and button */
.mt-acct{width:min(520px,calc(100% - 24px));margin:24px auto 32px;box-sizing:border-box}
.mt-acct.password-wrap{margin:24px auto 32px}
.mt-acct>.card,.mt-acct>.password-card{background:#fff;border:1px solid var(--mt-line-soft);border-radius:var(--mt-r-lg);box-shadow:var(--mt-shadow-sm);padding:22px 24px;margin:0}
.mt-acct h2{margin:0 0 6px;font-size:var(--mt-fs-lg);font-weight:800;color:var(--mt-navy)}
.mt-acct p{margin:0 0 4px;color:var(--mt-mute);font-size:var(--mt-fs-sm);line-height:1.9}
.mt-acct form label{display:block;margin:14px 0 6px;font-size:var(--mt-fs-sm);font-weight:700;color:var(--mt-ink-2)}
.mt-acct form input{display:block;width:100%;box-sizing:border-box;height:46px;margin:0;border:1px solid var(--mt-line);border-radius:var(--mt-r-ctl);padding:0 12px;font:inherit;background:#fff}
.mt-acct form input:focus-visible{outline:2px solid var(--mt-focus);outline-offset:1px}
.mt-acct form button[type=submit]{display:block;width:100%;height:46px;margin:20px 0 0;border:0;border-radius:var(--mt-r-ctl);background:var(--mt-teal);color:#fff;font:inherit;font-weight:800;cursor:pointer}
.mt-acct form button[type=submit]:hover{background:var(--mt-teal-d)}
.mt-acct .mt-acct-msg{margin:0 0 12px;padding:11px 14px;border-radius:var(--mt-r);font-size:var(--mt-fs-sm);font-weight:700}
.mt-acct .mt-acct-msg.ok{background:var(--mt-ok-bg);color:var(--mt-ok);border:1px solid var(--mt-ok-line)}
.mt-acct .mt-acct-msg.bad{background:var(--mt-danger-bg);color:var(--mt-danger);border:1px solid var(--mt-danger-line)}

/* v13.5.3 access accounts (/admin/agent-access): one shared grid. Every row has the same three areas in the same columns
   (person, login, account actions); inside the login area the labels sit above their fields and the fields and the save
   button share rows (subgrid), so fields and buttons line up from row to row whatever the length of a name or a label. */
.acc-wrap{container-type:inline-size}
.acc-list{display:grid;grid-template-columns:minmax(190px,1fr) minmax(0,2.3fr) minmax(176px,.8fr);column-gap:20px;margin:0}
.acc-head,.acc-row{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:start}
.acc-head{padding:10px 14px;background:var(--mt-soft,#f4f7fa);border:1px solid var(--mt-line-soft);border-radius:var(--mt-r) var(--mt-r) 0 0;font-size:var(--mt-fs-sm);font-weight:800;color:var(--mt-ink-2)}
.acc-row{padding:16px 14px;border:1px solid var(--mt-line-soft);border-top:0;background:#fff}
.acc-row:last-child{border-radius:0 0 var(--mt-r) var(--mt-r)}
.acc-row:target{box-shadow:inset -3px 0 0 var(--mt-teal)}
.acc-row :is(input,button,a,summary){scroll-margin-top:104px;scroll-margin-bottom:24px}
.acc-who{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.acc-name{margin:0;font-size:15px;font-weight:800;line-height:1.6;overflow-wrap:anywhere;color:var(--mt-navy)}
.acc-name a{color:var(--mt-brand-d);text-decoration:none}
.acc-name a:hover{text-decoration:underline}
.acc-badge{display:inline-flex;align-items:center;min-height:24px;padding:0 10px;border-radius:999px;font-size:var(--mt-fs-xs);font-weight:800;border:1px solid transparent}
.acc-badge.ok{background:var(--mt-ok-bg);color:var(--mt-ok);border-color:var(--mt-ok-line)}
.acc-badge.warn{background:var(--mt-warn-bg);color:var(--mt-warn);border-color:var(--mt-warn-line)}
.acc-badge.off{background:#eef1f4;color:var(--mt-mute);border-color:var(--mt-line)}
.acc-badge.none{background:var(--mt-danger-bg);color:var(--mt-danger);border-color:var(--mt-danger-line)}
.acc-ext{list-style:none;margin:2px 0 0;padding:0;display:flex;flex-direction:column;gap:3px;font-size:var(--mt-fs-sm)}
.acc-ext li{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline}
.acc-ext b{font-variant-numeric:tabular-nums;color:var(--mt-ink)}
.acc-ext small{color:var(--mt-mute);font-size:var(--mt-fs-xs)}
.acc-hist{font-size:var(--mt-fs-xs);color:var(--mt-mute)}
.acc-hist summary{cursor:pointer;min-height:28px;display:inline-flex;align-items:center;color:var(--mt-brand-d);font-weight:700}
.acc-cred{min-width:0;display:flex;flex-direction:column;gap:10px}
.acc-pw{display:flex;flex-wrap:wrap;gap:2px 12px;font-size:var(--mt-fs-xs);color:var(--mt-mute);line-height:1.7}
.acc-pw b{color:var(--mt-ok);font-weight:800}
.acc-pw.none b{color:var(--mt-danger)}
.acc-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;grid-template-rows:auto auto auto;column-gap:10px;row-gap:6px;margin:0}
.acc-f{display:grid;grid-row:span 2;grid-template-rows:subgrid;row-gap:6px;margin:0;min-width:0}
.acc-f>span{font-size:var(--mt-fs-sm);font-weight:700;color:var(--mt-ink-2);align-self:end;line-height:1.5}
.acc-f>input{box-sizing:border-box;width:100%;min-width:0;height:var(--mt-ctl,40px);margin:0;border:1px solid var(--mt-line);border-radius:var(--mt-r-ctl);padding:0 12px;font:inherit;font-size:var(--mt-fs);background:#fff;color:var(--mt-ink)}
.acc-f>input[dir=ltr]{text-align:left}
.acc-f>input:focus-visible{outline:none;border-color:var(--mt-teal);box-shadow:var(--mt-focus)}
.acc-hint{grid-column:1/-1;margin:0;font-size:var(--mt-fs-xs);color:var(--mt-mute);line-height:1.7}
.acc-ro{display:flex;flex-direction:column;gap:2px}
.acc-ro small{font-size:var(--mt-fs-sm);color:var(--mt-ink-2);font-weight:700}
.acc-ro b{font-size:var(--mt-fs);text-align:start}
.acc-ro p{margin:4px 0 0;font-size:var(--mt-fs-xs);color:var(--mt-mute)}
.acc-dup{border:1px solid var(--mt-warn-line);background:var(--mt-warn-bg);color:var(--mt-warn);border-radius:var(--mt-r);padding:10px 12px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;align-items:center}
.acc-dup b{font-size:var(--mt-fs-sm)}
.acc-dup p{grid-column:1;margin:0;font-size:var(--mt-fs-xs);line-height:1.7;color:var(--mt-ink-2)}
.acc-dup form{grid-column:2;grid-row:1/span 2;margin:0}
.acc-acts{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0}
.acc-acts form{margin:0;display:block}
.acc-btn{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:var(--mt-ctl,40px);
  padding:6px 14px;margin:0;border-radius:var(--mt-r-ctl);border:1px solid var(--mt-line);background:#fff;color:var(--mt-ink);font:inherit;font-size:var(--mt-fs-sm);
  font-weight:800;line-height:1.4;text-align:center;text-decoration:none;cursor:pointer;white-space:normal;overflow-wrap:break-word;box-shadow:none}
.acc-btn:hover{background:var(--mt-soft,#f4f7fa)}
.acc-btn:focus-visible{outline:none;box-shadow:var(--mt-focus)}
.acc-btn.primary{background:var(--mt-teal);border-color:var(--mt-teal);color:#fff}
.acc-btn.primary:hover{background:var(--mt-teal-d)}
.acc-btn.warn{background:var(--mt-warn-bg);border-color:var(--mt-warn-line);color:var(--mt-warn)}
.acc-btn.ok{background:var(--mt-ok-bg);border-color:var(--mt-ok-line);color:var(--mt-ok)}
.acc-btn.danger-ghost{background:#fff;border-color:var(--mt-danger-line);color:var(--mt-danger)}
.acc-btn.danger-ghost:hover{background:var(--mt-danger-bg)}
.acc-acts .access-archive{margin:0}
.acc-form .acc-save{grid-row:2;grid-column:3;align-self:end;width:auto;min-width:96px}
.acc-muted{color:var(--mt-mute)}
.acc-empty{margin:0;padding:24px;text-align:center;color:var(--mt-mute);border:1px solid var(--mt-line-soft);border-top:0;border-radius:0 0 var(--mt-r) var(--mt-r);grid-column:1/-1}
@container (max-width:860px){
  .acc-list{grid-template-columns:minmax(0,1fr)}
  .acc-head{display:none}
  .acc-row{grid-template-columns:minmax(0,1fr);row-gap:14px;border-top:1px solid var(--mt-line-soft);border-radius:var(--mt-r);margin-bottom:12px}
  .acc-acts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
}
@container (max-width:560px){
  .acc-form{grid-template-columns:minmax(0,1fr);grid-template-rows:none}
  .acc-f{grid-row:auto;grid-template-rows:auto auto}
  .acc-form .acc-save{grid-row:auto;grid-column:auto;width:100%}
  .acc-dup{grid-template-columns:minmax(0,1fr)}
  .acc-dup form{grid-column:1;grid-row:auto}
}
/* the one-time view of a newly issued temporary password */
.acc-issued{max-width:560px;margin:24px auto;background:#fff;border:1px solid var(--mt-line-soft);border-radius:var(--mt-r-lg);padding:22px 24px;box-shadow:var(--mt-shadow-sm)}
.acc-issued h2{margin:0 0 12px;font-size:var(--mt-fs-lg);color:var(--mt-navy)}
.acc-issued-warn{margin:0 0 14px;padding:10px 12px;border-radius:var(--mt-r);background:var(--mt-warn-bg);border:1px solid var(--mt-warn-line);color:var(--mt-ink);font-size:var(--mt-fs-sm);line-height:1.8}
.acc-issued-kv{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;margin:0 0 12px;font-size:var(--mt-fs-sm)}
.acc-issued-kv dt{color:var(--mt-ink-2);font-weight:700}
.acc-issued-kv dd{margin:0;font-weight:800;text-align:left}
.acc-secret{display:grid;gap:8px;margin:0 0 12px}
.acc-secret-label{font-size:var(--mt-fs-sm);font-weight:700;color:var(--mt-ink-2)}
.acc-secret code{display:block;font:800 24px/1.6 Consolas,Menlo,monospace;letter-spacing:2px;background:#f4f9fc;border:2px dashed var(--mt-teal);border-radius:var(--mt-r);padding:10px 14px;text-align:center;overflow-wrap:anywhere}
.acc-secret code[hidden]{display:none}
.acc-secret-acts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.acc-secret-status{margin:0;min-height:1.6em;font-size:var(--mt-fs-sm);color:var(--mt-ok);font-weight:700}
.acc-issued .acc-hint{margin:0 0 14px}
.acc-issued-acts{display:flex;justify-content:flex-start}
.acc-issued-acts .acc-btn{width:auto}

/* v13.5.4 contextual help: one «?» control beside a section title or a field label (click/tap/keyboard, never hover only);
   the panel is placed inside the viewport by the shared script (_MT_HELP_JS), so a table or card never clips it */
.mt-help-w{display:inline-flex;align-items:center;vertical-align:middle;margin-inline-start:6px;position:relative}
/* doubled class: page-local «.pf button» style rules must not reshape the shared control */
button.mt-help.mt-help{box-sizing:border-box;display:inline-grid;place-items:center;width:28px;height:28px;min-width:28px;min-height:28px;padding:0;margin:0;
  border-radius:999px;border:1px solid var(--mt-line);background:#fff;color:var(--mt-brand-d);font:inherit;font-size:14px;font-weight:800;
  line-height:1;cursor:pointer;box-shadow:none;flex:none}
button.mt-help.mt-help:hover{background:var(--mt-brand-soft)}
button.mt-help.mt-help:focus-visible{outline:none;box-shadow:var(--mt-focus)}
button.mt-help.mt-help[aria-expanded="true"]{background:var(--mt-brand-d);border-color:var(--mt-brand-d);color:#fff}
.mt-help-pop{position:fixed;z-index:10050;box-sizing:border-box;display:block;padding:12px 14px;border-radius:var(--mt-r);
  background:#fff;color:var(--mt-ink);border:1px solid var(--mt-line);box-shadow:var(--mt-shadow-lg);font-size:var(--mt-fs-sm);
  font-weight:500;line-height:1.9;text-align:start;white-space:normal;overflow-wrap:anywhere;direction:rtl}
.mt-help-pop[hidden]{display:none}
@media print{.mt-help-w{display:none}}
/* one shared row of actions (a decision form and its sibling buttons): equal heights, one gap, wraps as a group */
.mt-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px}
.mt-actions>form{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin:0}
.mt-actions button,.mt-actions .btn,.mt-actions a.nav{min-height:var(--mt-ctl,40px);margin:0}
.acc-title{display:flex;align-items:center;gap:4px;margin:4px 0 12px}
.acc-title h2{margin:0;font-size:var(--mt-fs-lg);color:var(--mt-navy)}
/* a shared action row inside a phone card: its buttons join the card's own action row (one height, one gap, full width) */
@media(max-width:640px){.mt-rt-many:not(.is-full) .mt-rt-t td.rt-a .mt-actions,.mt-rt-many:not(.is-full) .mt-rt-t td.rt-a .mt-actions>form{display:contents}
 .mt-rt-many:not(.is-full) .mt-rt-t td.rt-a:has(.mt-actions){flex-basis:100%}}
/* the «جزئیات» toggle of a phone card never breaks inside its word (the card cells allow breaking anywhere) */
@media(max-width:640px){.mt-rt-many:not(.is-full) .mt-rt-t td.rt-x{min-width:max-content}.mt-rt-many:not(.is-full) .mt-rt-more{white-space:nowrap;overflow-wrap:normal}}
/* a left-to-right value cell (phone, path) keeps its label on the right like every other card line */
@media(max-width:640px){.mt-rt-many:not(.is-full) .mt-rt-t td[dir="ltr"]{flex-direction:row-reverse}}
/* v13.5.4 the state of call data when Issabel cannot be reached: «stale» (the last data read, with its time) or «unavailable»
   (nothing in place of the call figures). One shared notice for the dashboard, the seller home and the call-only pages. */
.mt-cdr-state{display:flex;flex-direction:column;gap:4px;box-sizing:border-box;margin:0 0 14px;padding:12px 16px;border-radius:var(--mt-r-tile);
  border:1px solid var(--mt-danger-line);background:var(--mt-danger-bg);color:var(--mt-ink);font-size:var(--mt-fs-sm,13px);line-height:1.9}
.mt-cdr-state b{color:var(--mt-danger);font-size:14.5px;font-weight:800}
.mt-cdr-state.is-stale{border-color:var(--mt-warn-line);background:var(--mt-warn-bg)}
.mt-cdr-state.is-stale b{color:var(--mt-warn,#8a5a00)}
/* v13.5.4: an open modal dialog owns the scroll: the page behind it is locked at its position (restored on close) and the
   dialog's own scroll never chains to the page */
html.mt-scroll-lock body{position:fixed;left:0;right:0;width:100%;overflow:hidden}
dialog[open]{overscroll-behavior:contain}
/* v13.5.4: a help control where a panel or block has no title of its own */
.mt-help-line{display:flex;align-items:center;gap:6px;margin:6px 0 10px;color:var(--mt-ink-2);font-size:var(--mt-fs-sm,13px)}
.mt-help-line .mt-help-w{margin-inline-start:0}
/* a table wider than its box scrolls sideways in its own box; its header is moved down with the page by the shared script
   (a sticky header cannot stick to the page from inside a sideways scroll box) */
.mt-thead-follow{position:relative;z-index:2;will-change:transform}
.mt-thead-follow th{box-shadow:0 1px 0 var(--mt-line)}
/* a sticky/following table header is opaque (the same tint on white): rows pass under it, never through it */
.mt-rt-t thead th,.mt-thead-follow th{background-color:#F2F4F6!important;background-image:none!important}

/* ==================================================================
   v13.5.8 extension management (/admin/extension): one person = one identity; rows sorted into current / ended / hidden /
   needs review / voided. Operate mode: tokens of the design system, no page-local styles.
   ================================================================== */
.ext-page{background:var(--mt-soft);color:var(--mt-ink);margin:0}
.ext-wrap{max-width:1080px;margin:0 auto;padding:20px 16px 48px;display:grid;gap:16px}
.ext-head h1{margin:0;font-size:22px;font-weight:800;line-height:1.4}
.ext-sub{margin:4px 0 0;color:var(--mt-mute);font-size:14px}
.ext-panel{background:#fff;border:1px solid var(--mt-line);border-radius:12px;padding:16px;display:grid;gap:12px;min-width:0}
.ext-panel h2{margin:0;font-size:16px;font-weight:700}
.ext-panel-h{display:flex;align-items:center;gap:4px}
.ext-flash{border-radius:var(--mt-radius);padding:10px 14px;font-size:14px;line-height:1.8}
.ext-flash.ok{background:var(--mt-ok-bg);border:1px solid var(--mt-ok-line);color:var(--mt-ok)}
.ext-flash.bad{background:var(--mt-danger-bg);border:1px solid var(--mt-danger-line);color:var(--mt-danger)}
.ext-tabs{display:flex;flex-wrap:wrap;gap:6px;border-bottom:1px solid var(--mt-line);padding-bottom:10px}
.ext-tab{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 12px;border-radius:999px;border:1px solid var(--mt-line);
  color:var(--mt-ink);text-decoration:none;font-size:13px;font-weight:600;background:#fff}
.ext-tab:hover{background:var(--mt-soft)}
.ext-tab.on{background:var(--mt-brand);border-color:var(--mt-brand);color:#fff}
.ext-count{font-variant-numeric:tabular-nums;min-width:20px;text-align:center;border-radius:999px;padding:0 6px;font-size:12px;
  background:var(--mt-soft);color:var(--mt-mute)}
.ext-tab.on .ext-count{background:rgba(255,255,255,.2);color:#fff}
.ext-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.ext-row{border:1px solid var(--mt-line);border-radius:10px;padding:12px 14px;display:grid;grid-template-columns:1fr auto;gap:8px 12px;align-items:start;min-width:0}
.ext-row.is-void{background:var(--mt-soft)}
.ext-row-main{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;min-width:0}
.ext-name{font-size:15px;font-weight:700}
.ext-period{display:inline-flex;flex-wrap:wrap;gap:6px;color:var(--mt-ink);font-size:13px;font-variant-numeric:tabular-nums}
.ext-shift{color:var(--mt-mute);font-size:13px}
.ext-row-side{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.ext-row-acts{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px}
.ext-row-acts:empty{display:none}
.ext-row > .ext-edit,.ext-row > .ext-note,.ext-row > form{grid-column:1/-1}
.ext-badge{display:inline-flex;align-items:center;min-height:24px;padding:0 9px;border-radius:999px;font-size:12px;font-weight:700;border:1px solid transparent;white-space:nowrap}
.ext-badge.ok{background:var(--mt-ok-bg);color:var(--mt-ok);border-color:var(--mt-ok-line)}
.ext-badge.warn{background:var(--mt-warn-bg);color:var(--mt-warn);border-color:var(--mt-warn-line)}
.ext-badge.danger{background:var(--mt-danger-bg);color:var(--mt-danger);border-color:var(--mt-danger-line)}
.ext-badge.mute{background:var(--mt-soft);color:var(--mt-mute);border-color:var(--mt-line)}
.ext-note{margin:0;color:var(--mt-mute);font-size:13px;line-height:1.9}
.ext-empty{margin:0;color:var(--mt-mute);padding:12px 0}
.ext-edit{border-top:1px dashed var(--mt-line);padding-top:8px}
.ext-edit > summary{cursor:pointer;font-weight:600;font-size:13px;color:var(--mt-brand);min-height:32px;display:flex;align-items:center;gap:6px}
.ext-edit > summary:focus-visible{outline:2px solid rgba(11,106,147,.45);outline-offset:2px;border-radius:6px}
.ext-danger-zone > summary{color:var(--mt-danger)}
.ext-new{border:1px solid var(--mt-warn-line);background:var(--mt-warn-bg);border-radius:10px;padding:8px 12px}
.ext-new > summary{color:var(--mt-warn)}
.ext-form{display:grid;gap:12px;padding-top:8px}
.ext-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 12px;align-items:end}
.ext-grid[hidden]{display:none}
.ext-wide{grid-column:1/-1}
.ext-f{display:grid;gap:4px;min-width:0;font-size:13px}
.ext-f > span,.ext-l{color:var(--mt-mute);font-weight:600;display:flex;align-items:center;gap:2px;min-height:24px}
.ext-l label{color:inherit}
.ext-f input,.ext-f select{width:100%;min-height:38px;padding:0 10px;font-size:14px;box-sizing:border-box}
.ext-check{display:flex;align-items:center;gap:6px;font-size:14px;flex-wrap:wrap}
.ext-check label{display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.ext-check input[type=checkbox]{width:18px;height:18px;accent-color:var(--mt-brand)}
.ext-presets{display:flex;flex-wrap:wrap;gap:6px}
.ext-chip{min-height:30px!important;font-size:12px!important;padding:0 10px!important;font-variant-numeric:tabular-nums}
.ext-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start}
.ext-inline{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.ext-grow{flex:1 1 220px}
.ext-sm{min-height:30px!important;font-size:12px!important;padding:0 11px!important}
@media (max-width:900px){.ext-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:520px){
  .ext-wrap{padding:14px 12px 40px}
  .ext-grid{grid-template-columns:1fr}
  .ext-row{grid-template-columns:1fr}
  .ext-row-side{justify-content:flex-start}
  .ext-actions button,.ext-inline button{width:100%}
}
.ext-table{width:100%;border-collapse:collapse;font-size:13px}
.ext-table th{text-align:start;color:var(--mt-mute);font-weight:700;padding:8px 10px;border-bottom:1px solid var(--mt-line);background:#F2F4F6}
.ext-table td{padding:8px 10px;border-bottom:1px solid var(--mt-line);vertical-align:middle}
.ext-table td:last-child{display:flex;flex-wrap:wrap;gap:6px}
/* v13.5.9 ownership conflicts: the persistent attention chip in the management app bar and the conflicts page */
.mt-ab-alert{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 12px;border-radius:999px;background:var(--mt-danger-bg);
  color:var(--mt-danger)!important;border:1px solid var(--mt-danger-line);font-size:12.5px;font-weight:700;text-decoration:none;white-space:nowrap}
.mt-ab-alert:hover{background:#fbdcd8}
.mt-ab-alert:focus-visible{outline:2px solid rgba(180,35,24,.45);outline-offset:2px}
.oc-pair{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.oc-side{display:flex;flex-direction:column;gap:4px;border:1px solid var(--mt-line);border-radius:8px;padding:10px;min-width:0}
.oc-side .muted{color:var(--mt-mute);font-size:12px}
.oc-hist{margin:0;padding:0 18px;color:var(--mt-mute);font-size:13px;line-height:2}
@media (max-width:520px){.oc-pair{grid-template-columns:1fr}}

/* v13.5.9 (UI review A02): while the finance view loads a newer person/range/tab, the old content is dimmed and its actions wait */
#view[aria-busy="true"] { opacity: .6; pointer-events: none; transition: opacity .15s ease; }
#view[data-stale="1"] { opacity: .5; pointer-events: none; filter: grayscale(.5); }
@media (prefers-reduced-motion: reduce) { #view[aria-busy="true"] { transition: none; } }

/* ==================================================================
   Design system v5 (13.6.0) — «رنگ بخش‌ها»
   ------------------------------------------------------------------
   * One hue per domain, for wayfinding: the band under the header, the menu chips, active tabs, primary buttons, table heads and
     links read --mt-section*. The older --mt-brand/--mt-teal tokens are remapped to it, so every page inherits it.
   * Status colours keep their meaning (--mt-ok/warn/danger/info) and always come with a word.
   * One button system: one filled primary per form, outline secondary, quiet tinted row actions, danger distinct.
   * Type floor: body 14-15, secondary >=13 in a darker ink, table heads 13 bold; no text under 12 on phones.
   * Appended last on purpose; specificity is raised with «html body» only where page-local styles would win otherwise.
   ================================================================== */
:root, [data-mt-section="sales"], [data-sec="sales"] { --mt-section: #0E7C86; --mt-section-soft: #D8F0F0; --mt-section-ink: #0A5F67; --mt-section-line: #A9D6D8; --mt-section-glow: #43C6BE; --mt-section-wash: #EEF8F8; --mt-section-mid: #BDE5E6; --mt-on-section: #FFFFFF; }
[data-mt-section="home"], [data-sec="home"] { --mt-section: #1D5FA8; --mt-section-soft: #E0ECFA; --mt-section-ink: #164A85; --mt-section-line: #B4CDEA; --mt-section-glow: #6FA8E8; --mt-section-wash: #F0F5FC; --mt-section-mid: #C7DBF5; --mt-on-section: #FFFFFF; }
[data-mt-section="dispatch"], [data-sec="dispatch"] { --mt-section: #E0B000; --mt-section-soft: #FBEFB0; --mt-section-ink: #5C4400; --mt-section-line: #E6C94F; --mt-section-glow: #F5C518; --mt-section-wash: #FFFAE6; --mt-section-mid: #F6DF7E; --mt-on-section: #3A2B00; }
[data-mt-section="finance"], [data-sec="finance"], .fin-home { --mt-section: #35620F; --mt-section-soft: #E5EED9; --mt-section-ink: #26470A; --mt-section-line: #B9D19C; --mt-section-glow: #8DBF55; --mt-section-wash: #F4F8EE; --mt-section-mid: #CFE0BC; --mt-on-section: #FFFFFF; }
[data-mt-section="stock"], [data-sec="stock"] { --mt-section: #A9531B; --mt-section-soft: #F9E9DC; --mt-section-ink: #7F3D0E; --mt-section-line: #E8C6AB; --mt-section-glow: #E9A06B; --mt-section-wash: #FCF5EF; --mt-section-mid: #F2D5BD; --mt-on-section: #FFFFFF; }
[data-mt-section="people"], [data-sec="people"] { --mt-section: #A62E8C; --mt-section-soft: #F9E4F4; --mt-section-ink: #84236F; --mt-section-line: #EDBFE0; --mt-section-glow: #E67FD0; --mt-section-wash: #FCF3FA; --mt-section-mid: #F2CCE9; --mt-on-section: #FFFFFF; }
[data-mt-section="reports"], [data-sec="reports"] { --mt-section: #5E3AA8; --mt-section-soft: #ECE5F8; --mt-section-ink: #45287F; --mt-section-line: #CDBDEB; --mt-section-glow: #A88AE8; --mt-section-wash: #F6F2FC; --mt-section-mid: #DCD0F3; --mt-on-section: #FFFFFF; }
[data-mt-section="comms"], [data-sec="comms"] { --mt-section: #25D366; --mt-section-soft: #DCF8C6; --mt-section-ink: #075E54; --mt-section-line: #A8E6B8; --mt-section-glow: #25D366; --mt-section-wash: #F0FBF3; --mt-section-mid: #BDEFC9; --mt-on-section: #053B33; }
[data-mt-section="settings"], [data-sec="settings"] { --mt-section: #4A5B6E; --mt-section-soft: #E5EAF0; --mt-section-ink: #384655; --mt-section-line: #C9D2DC; --mt-section-glow: #A5B6C8; --mt-section-wash: #F2F4F7; --mt-section-mid: #D0D9E3; --mt-on-section: #FFFFFF; }
:root {
  --mt-ink: #13283D; --mt-ink-2: #34485C; --mt-mute: #4A5A6B; --mt-line: #D5DDE6; --mt-line-soft: #E4EAF0;
  --mt-fs-xs: 12px; --mt-fs-sm: 13px; --mt-fs: 14px; --mt-fs-lg: 16px; --mt-fs-h: 17px;
  --mt-page-w: 1480px; --mt-gutter: 18px; --mt-ctl: 40px; --mt-btn: 38px; --mt-row-btn: 32px;
  --mt-focus: 0 0 0 3px rgba(19,40,61,.18);
}
html[data-mt-section] {
  --mt-brand: var(--mt-section); --mt-brand-d: var(--mt-section-ink); --mt-brand-soft: var(--mt-section-soft); --mt-petrol: var(--mt-section);
  --mt-teal: var(--mt-section); --mt-teal-d: var(--mt-section-ink); --mt-teal-soft: var(--mt-section-soft);
  accent-color: var(--mt-section);
}
::selection { background: var(--mt-section-soft); color: var(--mt-ink); }
::placeholder { color: #66768A; }
html { scrollbar-color: #B4C0CD transparent; }
.mt-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
body.mt-ds { font-variant-numeric: tabular-nums; }
html body.mt-ds:not(.mt-tv):not(.home-entry) { line-height: 1.7; }
:where(body.mt-ds:not(.mt-tv):not(.home-entry)) :where(main, .wrap, .container, .pf, .card) a:not([class]) { color: var(--mt-section-ink); text-underline-offset: 3px; }
html.mt-drawer-open .mtn-toasts { display: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline-color: var(--mt-section, #0E7C86) !important; }

/* ---- app bar: quiet, evenly weighted actions; the section's colour runs along its lower edge ---- */
.mt-appbar { border-bottom: 3px solid var(--mt-section-glow); box-shadow: 0 6px 18px rgba(15,43,70,.12); }
.mt-appbar-in { max-width: var(--mt-page-w); min-height: 56px; padding: 7px var(--mt-gutter); gap: 8px; }
.mt-ab-btn, .mt-appbar summary.mt-ab-btn { background: transparent; border-color: transparent; color: #E6EFF6; font-weight: 600; }
.mt-ab-btn:hover { background: rgba(255,255,255,.12); border-color: transparent; }
.mt-ab-btn[aria-current="page"] { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.mt-appbar summary.mt-ab-btn { background: rgba(255,255,255,.09); }
.mt-ab-actions { gap: 2px; }
.mt-ab-menu { background: rgba(255,255,255,.09); }
/* the page title moved to the band under the header (the node stays: mtShell.setTitle and assistive tech keep it) */
.mt-appbar .mt-ab-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-ab-names small { font-size: 15px; font-weight: 800; color: #fff; white-space: nowrap; }
.mt-ab-status { gap: 8px; }
.mt-ab-alert { min-height: 34px; background: #FCE9E7; }
.mt-ab-alert .mt-ic { width: 16px; height: 16px; }
.mt-ab-badge { font-family: "Vazirmatn", Tahoma, Arial, sans-serif; font-size: 12px; border-color: var(--mt-navy); }
@media (max-width: 760px) {
  .mt-appbar-in { padding: 5px 6px; gap: 2px; flex-wrap: nowrap; min-height: 52px; }
  .mt-appbar:has(.mt-ab-return) .mt-appbar-in { flex-wrap: wrap; }
  .mt-appbar .mt-ab-brand { flex: 0 0 auto; min-width: 0; margin-inline-start: 2px; }
  .mt-appbar .mt-ab-names { display: none; min-width: 0; }
  .mt-appbar .mt-ab-status:not(:has(.mt-ab-return)) { order: 0; flex: 0 0 auto; margin: 0 auto 0 0; padding: 0; flex-basis: auto; }
  .mt-appbar .mt-ab-actions { gap: 0; margin-inline-start: 0; }
  .mt-appbar:has(.mt-ab-status:empty) .mt-ab-actions, .mt-appbar:has(.mt-ab-return) .mt-ab-actions { margin-inline-start: auto; }
  .mt-ab-btn, .mt-appbar summary.mt-ab-btn { background: transparent; }
  .mt-ab-actions .mt-ab-btn, .mt-ab-menu, .mt-appbar .mt-ab-icon { width: 44px; min-width: 44px; }
  .mt-ab-alert { padding: 0 8px; min-height: 40px; gap: 3px; }
  .mt-ab-alert-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mt-ab-status .mt-ab-return { height: 34px; min-height: 34px; font-size: 13px; }
  .mt-ab-return::before { font-size: 12px; }
}
@media (max-width: 372px) { .mt-appbar .mt-logo { width: 30px; height: 30px; } .mt-appbar .mt-logo svg { width: 22px; height: 22px; } .mt-ab-actions .mt-ab-btn, .mt-ab-menu, .mt-appbar .mt-ab-icon { width: 42px; min-width: 42px; } }
/* a phone at 150% zoom is about 260px wide: with the «تداخل داخلی» chip the bar needs 300px, so its buttons narrow (still 34px tall targets, enlarged by the zoom) */
@media (max-width: 300px) { .mt-appbar-in { padding: 4px; } .mt-ab-actions .mt-ab-btn, .mt-ab-menu, .mt-appbar .mt-ab-icon { width: 34px; min-width: 34px; } .mt-ab-alert { padding: 0 5px; } }

/* ---- the page band: where am I, at a glance ---- */
.mt-pagehead { background: var(--mt-section-soft); border-bottom: 1px solid var(--mt-section-line); }
.mt-ph-in { max-width: var(--mt-page-w); margin: 0 auto; padding: 10px var(--mt-gutter); min-height: 58px; box-sizing: border-box; display: flex; align-items: center; gap: 12px; direction: rtl; }
.mt-ph-chip { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--mt-section); color: var(--mt-on-section, #fff); }
.mt-ph-chip .mt-ic { width: 21px; height: 21px; }
.mt-ph-title { min-width: 0; font-size: 19px; font-weight: 800; line-height: 1.35; color: var(--mt-section-ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.mt-ph-sec { flex: 0 0 auto; margin-inline-start: auto; padding: 3px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--mt-section-line); font-size: 13px; font-weight: 700; color: var(--mt-section-ink); white-space: nowrap; }
.mt-ph-sec[hidden] { display: none; }
body.mt-shell main.mt-shell-main { margin-top: 16px; }
/* the print action of a report: a secondary button at the end of the band, not a filled row of its own */
body.mt-shell .mt-print-bar { position: relative; z-index: 2; height: 0; max-width: var(--mt-page-w); margin: 0 auto; padding: 0 var(--mt-gutter); overflow: visible; }
body.mt-shell .mt-print-bar .mt-print-btn { position: relative; top: 10px; height: 38px; min-height: 38px; font-size: 13px; background: #fff !important; color: var(--mt-section-ink) !important; border: 1px solid var(--mt-section-line) !important; border-radius: 10px !important; }
body.mt-shell:has(> .mt-print-bar) .mt-ph-in { padding-inline-end: 190px; }
@media (max-width: 760px) {
  :root { --mt-gutter: 12px; }
  .mt-ph-in { padding: 7px var(--mt-gutter); min-height: 50px; gap: 10px; }
  .mt-ph-chip { width: 34px; height: 34px; border-radius: 10px; } .mt-ph-chip .mt-ic { width: 19px; height: 19px; }
  .mt-ph-title { font-size: 16px; }
  .mt-ph-sec { display: none; }
  body.mt-shell main.mt-shell-main { margin-top: 12px; }
  body.mt-shell .mt-print-bar .mt-print-btn { top: 7px; height: 44px; min-height: 44px; font-size: 12.5px; padding: 0 8px !important; }
  body.mt-shell:has(> .mt-print-bar) .mt-ph-in { padding-inline-end: 142px; min-height: 58px; }
}
@media print { .mt-pagehead, .mt-sprite { display: none !important; } body.mt-shell .mt-print-bar { display: none !important; } }

/* ---- the menu: chips in each group's hue, headings clearly above their items ---- */
.mt-dr-panel { padding: 12px 12px 28px; width: min(348px, 90vw); }
.mt-drawer details.mt-dr-group, .mt-drawer details.mt-dr-group[open] { border-bottom: 0; padding: 0; margin: 0 0 2px; }
.mt-drawer details.mt-dr-group > summary { min-height: 48px; padding: 6px 8px; margin: 0; gap: 10px; justify-content: flex-start; font-size: 14.5px; font-weight: 800; color: var(--mt-navy); border-radius: 12px; }
.mt-drawer details.mt-dr-group > summary:hover { background: var(--mt-section-soft); }
.mt-drawer details.mt-dr-group > summary:focus-visible { outline-color: var(--mt-section) !important; }
.mt-drawer details.mt-dr-group > summary .mt-chev { margin-inline-start: auto; color: var(--mt-mute); }
.mt-drawer details.mt-dr-group.is-current > summary { color: var(--mt-section-ink); }
.mt-dr-chip { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--mt-section-soft); color: var(--mt-section-ink); transition: background-color var(--mt-d2) ease, color var(--mt-d2) ease; }
.mt-dr-group[open] > summary .mt-dr-chip, .mt-dr-group.is-current > summary .mt-dr-chip { background: var(--mt-section); color: var(--mt-on-section, #fff); }
.mt-dr-gt { min-width: 0; }
.mt-drawer .mt-dr-items { padding: 0 44px 8px 0; }
html body .mt-drawer .mt-dr-group a { min-height: 42px; padding: 6px 12px; margin: 1px 0; font-size: 14px; font-weight: 500; border-radius: 10px; color: var(--mt-ink); text-decoration: none; transition: background-color var(--mt-d1) ease; }
.mt-drawer .mt-dr-group a:hover { background: var(--mt-section-soft); }
.mt-drawer .mt-dr-group a:focus-visible { outline-color: var(--mt-section) !important; }
html body .mt-drawer .mt-dr-group a[aria-current="page"] { background: var(--mt-section); color: var(--mt-on-section, #fff); font-weight: 800; box-shadow: none; }
.mt-drawer .mt-dr-group a[aria-current="page"]::after { color: #fff; font-size: 12px; font-weight: 600; }
.mt-dr-search input { border-radius: 12px !important; }
@media (max-width: 760px) { .mt-drawer .mt-dr-group a { min-height: 46px; } .mt-drawer .mt-dr-items { padding-inline-start: 36px; } }
.mt-ab-pop a:hover, .mt-ab-pop a:focus-visible, .mt-ab-pop .mt-ab-still:hover, .mt-ab-pop .mt-ab-still:focus-visible { background: var(--mt-section-soft); }
.mt-ab-pop a, .mt-ab-pop .mt-ab-still { font-size: 14px; }

/* ---- one page width, one surface ---- */
html body.mt-shell :is(.wrap:not(.wz-main .wrap), .container, .cv-wrap, main.mt-shell-main, main.pf, .ext-wrap) { max-width: var(--mt-page-w); width: 100%; box-sizing: border-box; margin-inline: auto; padding-inline: var(--mt-gutter); }
html body.mt-shell .fm-page, html body.mt-shell[data-embed] main { max-width: none; }
html body[data-mt-panel=finance] main > #tabs { margin-inline-start: 0; }
.fm-preview-note { max-width: none !important; }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, section.card, .password-card, .filter-panel, .mt-card, .pf-card, .fm-card, .ext-panel) { border-color: var(--mt-line); border-radius: 14px; box-shadow: var(--mt-e1); }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .pf-card, .fm-card, .ext-panel, .mt-panel) :is(.kpi, .stat, .fm-stat, .mini) { box-shadow: none; }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(h1, h2, h3) { color: var(--mt-navy); }
html body.mt-ds:not(.mt-tv):not(.home-entry) .card > h2:first-child, .pf-card h2, .fm-card h2, .ext-panel h2 { font-size: 16px; font-weight: 800; }
html body.mt-ds:not(.mt-tv):not(.home-entry) .muted, .pf-muted, .ext-note, .hint, small.hint { color: var(--mt-mute); }
html body.mt-ds:not(.mt-tv):not(.home-entry) small { font-size: max(12px, .86em); }
html body.mt-ds:not(.mt-tv):not(.home-entry) label { font-size: 13px; color: var(--mt-ink-2); }
/* the staggered rise on every server page was one identical entrance everywhere: gone (charts and the live strip keep their own) */
html:not(.mt-still) body.mt-shell .wrap > :is(.card, section, .note), html:not(.mt-still) body.mt-shell .pf > :is(.pf-card, .pf-seg, .pf-tabs, .pf-head) { animation: none; }

/* ---- buttons: one system ---- */
/* default = secondary: an outline in the section's ink */
html body button:where(:not(.menu-btn):not(.menu-button):not(.mt-menu-button):not(.menu-close):not(.mt-menu-close):not(.sidebar-close):not(.menu-action):not(.mtn-fab):not(.modal-close):not(.fullscreen):not(.score-button):not(.preset-btn):not(.toggle-pass):not(.x):not(.jfp-close):not(.add-row):not(.tab):not(.mt-ab-btn):not(.mt-plain):not([id^="jfp"]):not([id^="cal"]):not([id^="mtn"]):not(.jfp-days *):not(.cal-days *)),
html body .btn, html body a.nav, html body a.navbtn, html body a.manage-btn, html body a.secondary, html body a.back, html body .small-action, html body a.pf-btn {
  min-height: var(--mt-btn); padding: 0 14px !important; font-size: 14px !important; font-weight: 700 !important; line-height: 1.35;
  background: #fff !important; color: var(--mt-section-ink, #0A5F67) !important; border: 1px solid var(--mt-section-line, #A9D6D8) !important; border-radius: 10px !important;
  transition: background-color var(--mt-d2) ease, border-color var(--mt-d2) ease, transform var(--mt-d1) ease !important;
}
html body button:where(:not(.mt-ab-btn):not(.mt-plain):not(.mtn-fab):not(.tab):not(.x):not([id^="jfp"]):not([id^="cal"]):not([id^="mtn"])):hover, html body .btn:hover, html body a.nav:hover, html body a.navbtn:hover, html body a.manage-btn:hover, html body a.secondary:hover, html body a.back:hover, html body .small-action:hover {
  background: var(--mt-section-soft, #E3F3F3) !important; border-color: var(--mt-section, #0E7C86) !important; color: var(--mt-section-ink, #0A5F67) !important;
}
html body button:where(:not(.mt-ab-btn):not(.mt-plain):not(.tab):not([id^="jfp"]):not([id^="cal"])):active:not(:disabled), html body .btn:active { transform: scale(.98); }
/* the action of a form (its first submit button) and anything named primary: one filled button */
html body :where(form) button:where(:not([type="button"]):not(.secondary):not(.gray):not(.reopen):not(.no):not(.ghost):not(.ok):not(.okbtn):not(.approve):not(.warn):not(.danger):not(.reject):not(.bad):not(.b-danger):not(.b-warn):not(.b-info):not(.b-ok):not(.acc-btn):not(.mt-plain):not(.mt-ab-btn):not(.x):not(.toggle-pass):not(.tab):not([id^="jfp"]):not([id^="cal"]):not([id^="mtn"])),
html body button.b-primary, html body a.b-primary, html body a.primary, html body .btn.b-primary, html body button.pf-primary, html body input[type="submit"], html body .mt-primary {
  background: var(--mt-section, #0E7C86) !important; border-color: var(--mt-section, #0E7C86) !important; color: var(--mt-on-section, #fff) !important;
}
html body :where(form) button:where(:not([type="button"]):not(.secondary):not(.gray):not(.reopen):not(.no):not(.ghost):not(.ok):not(.okbtn):not(.approve):not(.warn):not(.danger):not(.reject):not(.bad):not(.b-danger):not(.b-warn):not(.b-info):not(.b-ok):not(.acc-btn):not(.mt-plain):not(.mt-ab-btn):not(.x):not(.toggle-pass):not(.tab):not([id^="jfp"]):not([id^="cal"]):not([id^="mtn"])):hover,
html body button.b-primary:hover, html body a.b-primary:hover, html body a.primary:hover, html body button.pf-primary:hover, html body input[type="submit"]:hover, html body .mt-primary:hover {
  background: var(--mt-section-ink, #0A5F67) !important; border-color: var(--mt-section-ink, #0A5F67) !important; color: #fff !important;
}
/* a second submit of the same form is not a second primary */
html body :where(form) button:where(:not([type="button"])) ~ button:where(:not([type="button"]):not(.b-primary):not(.ok):not(.okbtn):not(.approve):not(.warn):not(.danger):not(.reject):not(.bad):not(.b-danger):not(.b-warn):not(.b-ok)) {
  background: #fff !important; color: var(--mt-section-ink, #0A5F67) !important; border-color: var(--mt-section-line, #A9D6D8) !important;
}
/* the commanding green of collection/approval stays where it is the one decision of a form */
html body button.b-ok, html body a.b-ok { background: var(--mt-ok) !important; border-color: var(--mt-ok) !important; color: #fff !important; }
html body button.b-ok:hover, html body a.b-ok:hover { background: #0D5F42 !important; border-color: #0D5F42 !important; color: #fff !important; }
/* S-1355 item 5 (owner): view, edit and information are blue in every section; the section hue never replaces a meaning colour */
html body button.b-info, html body a.b-info, html body a.btn.b-info { background: #fff !important; color: #1A47AC !important; border-color: #A9C1EE !important; }
html body button.b-danger, html body button.pf-danger, html body button.danger, html body button.reject, html body button.bad, html body .btn.danger { background: #fff !important; color: #A82218 !important; border-color: #E8A7A0 !important; }
html body button.b-danger:hover, html body button.pf-danger:hover, html body button.danger:hover, html body button.reject:hover, html body button.bad:hover, html body .btn.danger:hover { background: var(--mt-danger-bg) !important; color: #8E1C13 !important; border-color: #D8857C !important; }
html body button.b-warn { background: #fff !important; color: #7A4D00 !important; border-color: #E0BE78 !important; }
html body button.b-warn:hover { background: var(--mt-warn-bg) !important; }
html body button.ok, html body button.okbtn, html body button.approve, html body .btn.ok { color: #0D5F42 !important; }
html body button.b-sm, html body .b-sm { min-height: 34px; padding: 0 12px !important; font-size: 13px !important; }
button[disabled], .btn[disabled], html body button:disabled { opacity: .55; cursor: not-allowed; }
/* repeated actions of a row: quiet, tinted, one height; danger stays distinct */
html body :is(td, .uacts, .acts, .inv-actions, .act-group, .ext-row-acts, .oc-side) :is(button:where(:not(.x):not(.mt-plain):not(.mt-help):not(.tab):not([id^="jfp"]):not([id^="cal"])), a.btn, a.nav, a.navbtn, a.manage-btn, a.secondary, .small-action, a.pf-btn) {
  min-height: var(--mt-row-btn); padding: 0 10px !important; font-size: 13px !important; font-weight: 700 !important; gap: 5px; white-space: nowrap;
  background: var(--mt-section-soft, #E3F3F3) !important; color: var(--mt-section-ink, #0A5F67) !important; border: 1px solid transparent !important;
}
html body :is(td, .uacts, .acts, .inv-actions, .act-group, .ext-row-acts, .oc-side) :is(button:where(:not(.x):not(.mt-plain):not(.mt-help):not(.tab)), a.btn, a.nav, a.navbtn, a.manage-btn, a.secondary, .small-action, a.pf-btn):hover { border-color: var(--mt-section, #0E7C86) !important; background: var(--mt-section-soft, #E3F3F3) !important; }
html body :is(td, .uacts, .acts, .inv-actions, .act-group, .ext-row-acts) :is(button.b-danger, button.danger, button.reject, button.bad, button.pf-danger, button.act-delete, .btn.danger) { background: transparent !important; color: #A82218 !important; border-color: #E8A7A0 !important; }
html body :is(td, .uacts, .acts, .inv-actions, .act-group, .ext-row-acts) :is(button.b-danger, button.danger, button.reject, button.bad, button.pf-danger, button.act-delete, .btn.danger):hover { background: var(--mt-danger-bg) !important; border-color: #D8857C !important; color: #8E1C13 !important; }
html body :is(td, .uacts, .acts, .act-group) :is(button.b-ok, button.ok, button.okbtn, button.approve, .btn.ok, a.b-ok) { background: var(--mt-ok-bg) !important; color: #0D5F42 !important; border-color: transparent !important; }
html body :is(td, .uacts, .acts, .act-group) button.b-warn { background: var(--mt-warn-bg) !important; color: #6E4500 !important; border-color: transparent !important; }
html body :is(td, .uacts, .acts, .inv-actions, .act-group, .oc-side) :is(button.b-info, a.b-info, .btn.b-info) { background: #E7EEFC !important; color: #1A47AC !important; border-color: transparent !important; }
html body :is(td, .uacts, .acts, .inv-actions, .act-group, .oc-side) :is(button.b-info, a.b-info, .btn.b-info):hover { background: #E7EEFC !important; border-color: #1A47AC !important; }
html body .act-more > summary { min-height: var(--mt-row-btn); border-color: transparent; background: var(--mt-bg); color: var(--mt-ink-2); font-size: 13px; font-weight: 700; }
.act-group .ic, td button .ic { width: 15px; height: 15px; }
/* tidy rows of controls: one gap, one height, aligned on the baseline of the fields */
.row, .fm-acts, .pf-acts, .ext-actions, .ext-inline { gap: 8px; }
.row > :is(button, .btn, a.btn), .fm-acts > :is(button, a), .pf-acts > :is(button, a) { margin: 0; }
.fm-acts button, .fm-actrow > button { height: auto; min-height: var(--mt-ctl); }
@media (max-width: 760px) {
  html body button:where(:not(.mt-ab-btn):not(.mt-plain):not(.mtn-fab):not(.x):not(.tab):not(.menu-btn):not([id^="jfp"]):not([id^="cal"]):not([id^="mtn"]):not(.mt-help)), html body .btn, html body a.nav, html body a.navbtn, html body a.manage-btn, html body a.secondary, html body a.back, html body .small-action, html body a.pf-btn { min-height: 44px; }
  html body :is(td, .uacts, .acts, .inv-actions, .act-group, .ext-row-acts, .oc-side) :is(button:where(:not(.x):not(.mt-plain):not(.mt-help):not(.tab)), a.btn, a.nav, a.navbtn, a.manage-btn, a.secondary, .small-action, a.pf-btn), html body .act-more > summary { min-height: 44px; }
}

/* ---- tabs: the section's hue marks the active one; a long row scrolls on a phone and wraps on a desktop ---- */
html body :is(.tabs, .fsub, .pf-tabs, .ext-tabs) { display: flex; flex-wrap: wrap; gap: 2px 4px; width: auto; max-width: 100%; margin: 0 0 14px; padding: 0 0 0; background: transparent; border: 0; border-bottom: 1px solid var(--mt-line); border-radius: 0; box-shadow: none; }
html body .tabs :is(button, a), html body .fsub button, html body .pf-tabs a, html body .ext-tab {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px !important; padding: 0 14px !important; margin: 0 0 -1px; font-size: 14px !important; font-weight: 600 !important; white-space: nowrap;
  background: transparent !important; color: var(--mt-ink-2) !important; border: 0 !important; border-bottom: 3px solid transparent !important; border-radius: 10px 10px 0 0 !important; box-shadow: none !important; text-decoration: none;
  transition: background-color var(--mt-d2) ease, color var(--mt-d2) ease, border-color var(--mt-d2) ease !important;
}
html body .tabs :is(button, a):hover, html body .fsub button:hover, html body .pf-tabs a:hover, html body .ext-tab:hover { background: var(--mt-section-soft) !important; color: var(--mt-section-ink) !important; }
html body .tabs :is(button.active, a.on), html body .fsub button.active, html body .pf-tabs a.on, html body .ext-tab.on {
  background: var(--mt-section-soft) !important; color: var(--mt-section-ink) !important; border-bottom-color: var(--mt-section) !important; font-weight: 800 !important;
}
.ext-tab.on .ext-count { background: var(--mt-section); color: var(--mt-on-section, #fff); }
.ext-count { color: var(--mt-ink-2); font-size: 12px; background: var(--mt-bg); }
html body .pf-seg { gap: 6px; }
html body .pf-seg a { min-height: 38px; padding: 0 14px; font-size: 14px; color: var(--mt-ink-2); }
html body .pf-seg a.on { background: var(--mt-section); border-color: var(--mt-section); color: var(--mt-on-section, #fff); }
.mt-seg { background: var(--mt-bg); border: 1px solid var(--mt-line); }
.mt-seg button { font-size: 14px; }
html body .mt-seg button[aria-selected="true"] { background: var(--mt-section); color: var(--mt-on-section, #fff); box-shadow: none; }
@media (max-width: 760px) {
  html body :is(.tabs, .fsub, .pf-tabs, .ext-tabs) { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  html body :is(.tabs, .fsub, .pf-tabs, .ext-tabs)::-webkit-scrollbar { display: none; }
  html body .tabs :is(button, a), html body .fsub button, html body .pf-tabs a, html body .ext-tab { min-height: 44px !important; flex: 0 0 auto; }
}

/* ---- tables ---- */
html body.mt-ds:not(.mt-tv):not(.home-entry) table :is(th) { background-color: var(--mt-section-soft); color: var(--mt-section-ink); font-size: 13px; font-weight: 700; }
html body.mt-ds:not(.mt-tv):not(.home-entry) .mt-rt-t thead th, html body.mt-ds:not(.mt-tv):not(.home-entry) .mt-thead-follow th, html body.mt-ds:not(.mt-tv):not(.home-entry) .access-account-table thead th, html body.mt-ds .ext-table th, html body.mt-ds .pf th { background-color: var(--mt-section-soft) !important; color: var(--mt-section-ink); border-bottom: 1px solid var(--mt-section-line); font-size: 13px; }
html body.mt-ds:not(.mt-tv):not(.home-entry) table { font-size: 14px; }
html body.mt-ds:not(.mt-tv):not(.home-entry) table td { line-height: 1.65; }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel) table tbody tr:hover td, .mt-rt-t tbody tr:hover td { background-color: #F6F8FA; }
/* a table wider than its box says so: a visible scrollbar and soft edge shadows while there is more to see (attached to the scroll position) */
.scroll:not(.fits), .table-wrap, .pf-scroll {
  scrollbar-width: auto; scrollbar-color: #8FA0B2 #EEF2F6;
  background: linear-gradient(to left, #fff 12px, rgba(255,255,255,0)) right / 28px 100% no-repeat local, linear-gradient(to right, #fff 12px, rgba(255,255,255,0)) left / 28px 100% no-repeat local,
    linear-gradient(to left, rgba(15,43,70,.14), rgba(15,43,70,0)) right / 12px 100% no-repeat scroll, linear-gradient(to right, rgba(15,43,70,.14), rgba(15,43,70,0)) left / 12px 100% no-repeat scroll;
}
.scroll.fits { background: none; }

/* ---- empty states: an icon and the same words ---- */
:is(td.rt-empty, .acc-empty, .ext-empty, .mtn-empty, .pf-empty, .fm-empty, .empty) { color: var(--mt-mute); font-size: 14px; }
:is(td.rt-empty, .acc-empty, .ext-empty, .pf-empty, .fm-empty, .empty)::before {
  content: ""; display: block; width: 26px; height: 26px; margin: 2px auto 6px; background: var(--mt-section, #4A5B6E); opacity: .75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13l3-8h12l3 8v6H3z'/%3E%3Cpath d='M3 13h5l1.5 2.5h5L16 13h5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13l3-8h12l3 8v6H3z'/%3E%3Cpath d='M3 13h5l1.5 2.5h5L16 13h5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mt-rt-t td.rt-empty { padding: 14px; }
/* a table with no rows drops its head: the stack of empty tables becomes titles with one quiet line */
table.mt-rt-none thead, table:has(> tbody > tr:only-child > td.rt-empty) thead, table:has(> tbody > tr:only-child > td[colspan]:only-child) thead { display: none; }
html body td.rt-empty { border-bottom: 0 !important; }

/* ---- key numbers: amounts large and heavy enough that «۰» reads as a digit, a clear gap before the unit ---- */
.mt-kpi > b, .kpi b { font-weight: 800; }
html body .kgrid .kpi b, html body .fm-amt, html body .fin-home .fin-home-amt { font-size: 22px; font-weight: 800; line-height: 1.35; gap: 8px; }
.fm-amt small, .fin-home .fin-home-amt small, .mt-unit { font-size: 13px; font-weight: 600; margin-inline-start: 2px; color: var(--mt-ink-2); }
.fm-stat > span, .fin-home .fin-home-kpis span, .fin-home .fin-home-grade span, .fm-grade-row span, .fm-pay span, .pf-kv small { font-size: 13px; }
.fm-stat > small { font-size: 12px; color: var(--mt-mute); }
html body .fm-stat, html body .fin-home .fin-home-kpis > div, html body .fin-home .fin-home-grade > div, html body .pf-kv div { background: #fff; border-color: var(--mt-line); }
.fm-stat.ok { background: var(--mt-ok-bg); border-color: var(--mt-ok-line); }
.fm-stat.warn { background: var(--mt-warn-bg); border-color: var(--mt-warn-line); }
.fm-stat.bad { background: var(--mt-danger-bg); border-color: var(--mt-danger-line); }
html body .kpi[data-tone] > small:first-child { display: flex; align-items: center; gap: 6px; }
html body .kpi[data-tone="ok"] > small:first-child::before, html body .kpi[data-tone="wait"] > small:first-child::before, html body .kpi[data-tone="bad"] > small:first-child::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
html body .kpi[data-tone="ok"] > small:first-child::before { color: var(--mt-ok); }
html body .kpi[data-tone="wait"] > small:first-child::before { color: #C98A00; }
html body .kpi[data-tone="bad"] > small:first-child::before { color: var(--mt-danger); }
#ana .acards .kpi-link[data-tone="ok"]:nth-child(-n+2) { background: var(--mt-ok-bg) !important; border-color: var(--mt-ok-line) !important; }
html body .kpi[data-tone="ok"] b, .fm-stat.ok .fm-amt { color: var(--mt-ok) !important; }
html body .kpi[data-tone="wait"] b, .fm-stat.warn .fm-amt { color: var(--mt-warn) !important; }
html body .kpi[data-tone="bad"] b, .fm-stat.bad .fm-amt { color: var(--mt-danger) !important; }
html body .kpi b, .fm-amt, .fin-home .fin-home-amt, .fin-home .fin-home-grade b, .fm-grade-row b { color: var(--mt-navy); }
/* the sales dashboard tiles: the two that matter lead, the rest stay compact; the link line only speaks on hover (the tile itself is the button) */
#ana .acards { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
#ana .acards .kpi-link { padding: 10px 12px !important; }
#ana .acards .kpi-link:nth-child(-n+2) { grid-column: span 3; padding: 14px 16px !important; }
#ana .acards .kpi-link:nth-child(-n+2) b { font-size: 30px !important; }
#ana .acards .kpi-link b { font-size: 22px !important; font-weight: 800; }
#ana .acards .kpi-link small { font-size: 13px; color: var(--mt-ink-2); }
#ana .acards .kpi-link .kpi-go { position: absolute; inset-inline-end: 10px; top: 10px; font-size: 12px; opacity: 0; color: var(--mt-section-ink); transition: opacity var(--mt-d2) ease; }
#ana .acards .kpi-link { position: relative; }
#ana .acards .kpi-link:is(:hover, :focus-visible) .kpi-go { opacity: 1; }
#ana .acards .kpi-link:hover { border-color: var(--mt-section) !important; background: #fff !important; }
@media (max-width: 1100px) { #ana .acards { grid-template-columns: repeat(4, minmax(0, 1fr)); } #ana .acards .kpi-link:nth-child(-n+2) { grid-column: span 2; } }
@media (max-width: 640px) { #ana .acards { grid-template-columns: repeat(2, minmax(0, 1fr)); } #ana .acards .kpi-link:nth-child(-n+2) { grid-column: span 1; } #ana .acards .kpi-link:nth-child(-n+2) b { font-size: 26px !important; } #ana .acards .kpi-link { padding: 9px 10px !important; } }
.kpi b + small { line-height: 1.55; }

/* ---- filters: the collapsed toggle at every width on the long invoice filters; full dates always readable ---- */
.mflt-t { display: inline-flex; width: auto; margin: 0 0 10px; }
#filters:not(.open) .grid > :not(:first-child), #dpf:not(.open) .grid > :not(:first-child) { display: none; }
#filters .grid, #dpf .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 12px; align-items: end; }
html body #anaf .mflt-ana { display: none !important; }
#anaf { margin-bottom: 12px; align-items: flex-end; }
#anaf > button, #anaf > a { align-self: flex-end; min-height: var(--mt-ctl); }
@media (max-width: 640px) {
  .mflt-t { display: flex; width: 100%; }
  html body #anaf .mflt-ana { display: flex !important; flex: 1 1 100%; margin: 0; }
  html body #anaf:not(.open) > :not(.mflt-ana) { display: none !important; }
  .anaf label { flex: 1 1 calc(50% - 6px); min-width: 0; }
  #anaf button[type="submit"], #anaf button.secondary, #anaf a.btn { flex: 1 1 calc(50% - 6px); }
}
/* two date fields in a phone row: the words of the date come before the calendar picture */
@media (max-width: 480px) {
  :is(.anaf, .fm-filter, .pf-filter, .mt-datepair) .jalali-filter-input { background-image: none !important; padding: 0 8px 0 30px !important; font-size: 15px; }
  :is(.anaf, .fm-filter, .pf-filter, .mt-datepair) .jalali-filter-wrap:has(> button.x) .jalali-filter-input { padding-right: 34px !important; padding-left: 6px !important; }
  html body .jalali-filter-input { text-overflow: clip; text-align: center; }
}

/* ---- status chips and pills keep one line ---- */
.mt-status, .badge, .ubadge, .ext-badge, .acc-badge, .pf-badge { font-size: 12.5px; }
.mt-status { line-height: 1.6; }

/* ---- forms and notices ---- */
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="submit"]):not([type="file"]), select, textarea) { border-color: #B9C5D1 !important; }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(input, select, textarea):focus { border-color: var(--mt-section) !important; box-shadow: 0 0 0 3px var(--mt-section-soft); }
details.help { background: var(--mt-section-soft); border-color: var(--mt-section-line); }
details.help > summary { color: var(--mt-section-ink); font-size: 14px; }
details.help > div { color: var(--mt-ink); font-size: 13px; }
fieldset.group { border-color: var(--mt-line); }
fieldset.group > legend { color: var(--mt-navy); font-size: 14px; }
button.mt-help.mt-help { color: var(--mt-section-ink); }
button.mt-help.mt-help:hover { background: var(--mt-section-soft); }
button.mt-help.mt-help[aria-expanded="true"] { background: var(--mt-section); border-color: var(--mt-section); }
.acc-btn { font-size: 13px; }
.acc-btn.primary { background: var(--mt-section); border-color: var(--mt-section); }
.acc-btn.primary:hover { background: var(--mt-section-ink); }
.acc-btn:not(.primary):not(.warn):not(.ok):not(.danger-ghost) { color: var(--mt-section-ink); border-color: var(--mt-section-line); }
.acc-head { background: var(--mt-section-soft); color: var(--mt-section-ink); border-color: var(--mt-section-line); font-size: 13px; }
.acc-hint, .acc-pw, .acc-hist, .acc-ext small { font-size: 12.5px; color: var(--mt-mute); }
.mt-acct form button[type=submit] { background: var(--mt-section); }
.mt-acct form button[type=submit]:hover { background: var(--mt-section-ink); }

/* ---- notifications: no side stripes; a toast never covers the header and a phone shows at most two ---- */
#mtNotif .mtn-item.unread { border-right: 0; background: var(--mt-section-soft, #E8F0FA); }
#mtNotif .mtn-item.unread b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mt-section, #1D5FA8); margin-inline-end: 6px; vertical-align: 1px; }
#mtNotif .mtn-item small, #mtNotif .mtn-dismiss, #mtNotif .mtn-foot button { font-size: 12px; }
#mtNotif .mtn-item b { font-size: 14px; } #mtNotif .mtn-item span { font-size: 13px; }
@media (max-width: 760px) { .mtn-toasts .mtn-toast:nth-child(n+3) { display: none; } .mtn-toast span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } }
@media print { .mt-appbar { border: 0; } }

/* ---- person lists (finance): the whole name, a legible balance, a row that is clearly tappable; the current one is filled ---- */
html body .plist { max-height: none; overflow: visible; gap: 4px; }
html body .plist button { flex: 0 0 auto; height: auto; min-height: 52px; padding: 8px 12px !important; align-items: center; border-radius: 10px !important; border: 1px solid var(--mt-line-soft) !important; color: var(--mt-ink) !important; background: #fff !important; font-weight: 700 !important; text-align: right; white-space: normal; }
html body .plist button small { font-size: 12.5px; font-weight: 500; }
html body .plist button .money { flex: 0 0 auto; font-size: 17px; font-weight: 800; color: var(--mt-navy); min-width: 2ch; text-align: left; }
html body .plist button:hover { background: var(--mt-section-soft) !important; border-color: var(--mt-section-line) !important; }
html body .plist button.on { background: var(--mt-section-soft) !important; border-color: var(--mt-section) !important; box-shadow: none !important; color: var(--mt-section-ink) !important; }
html body .plist button.on .money { color: var(--mt-section-ink); }
@media (min-width: 901px) { .split > section.card:first-child:has(.plist) { position: sticky; top: calc(var(--mt-sticky-top, 58px) + 10px); max-height: calc(100vh - var(--mt-sticky-top, 58px) - 24px); overflow-y: auto; } }
@media (max-width: 900px) { .split > section.card:has(.plist) { order: 2; } .split > div { scroll-margin-top: calc(var(--mt-sticky-top, 58px) + 8px); } }

/* ---- the invoice filter's outputs and the selection block ---- */
.mt-more { margin: 0; display: inline-block; }
.mt-more > summary { display: none; list-style: none; }
.mt-more > summary::-webkit-details-marker { display: none; }
.mt-more-in { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 760px) {
  #filters p.row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
  #filters p.row .mt-more { grid-column: 1 / -1; }
  .mt-more > summary { display: flex; align-items: center; justify-content: center; min-height: 44px; font-size: 14px; font-weight: 700; color: var(--mt-section-ink); cursor: pointer; }
  .mt-more-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 4px; }
  .mt-more-in > .btn { width: 100%; font-size: 13px !important; padding: 4px 8px !important; }
}
html body .bulk-toolbar { background: #fff; border-color: var(--mt-line); border-radius: 12px; padding: 8px 12px; margin: 10px 0; }
.bulk-toolbar:not(.has-sel) .row > :not(label):not([onclick^="selectEvery"]), .bulk-toolbar:not(.has-sel) .bulk-assign { display: none !important; }
.bulk-toolbar.has-sel { background: var(--mt-section-soft); border-color: var(--mt-section-line); }
.bulk-toolbar .row { gap: 8px 10px; }
.bulk-assign { margin-top: 8px; }
html body .bulk-toolbar a#selection-export:not([href]) { display: none; }

/* ---- the invoice panel: one step, a routine group, the final actions apart ---- */
.od-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.od-act-group { width: 100%; }
html body .od-act-main button { min-height: 44px; font-size: 15px !important; padding: 0 20px !important; }
html body .od-act-routine :is(button, a.btn) { min-height: 36px; padding: 0 12px !important; font-size: 13px !important; background: var(--mt-section-soft) !important; color: var(--mt-section-ink) !important; border: 1px solid transparent !important; }
html body .od-act-routine :is(button, a.btn):hover { border-color: var(--mt-section) !important; background: var(--mt-section-soft) !important; color: var(--mt-section-ink) !important; }
/* S-1355 item 5: the routine group of an invoice keeps the colour of each action's meaning */
html body .od-act-routine :is(button.b-info, a.btn.b-info), html body .od-act-routine :is(button.b-info, a.btn.b-info):hover { background: #E7EEFC !important; color: #1A47AC !important; }
html body .od-act-routine button.b-warn, html body .od-act-routine button.b-warn:hover { background: var(--mt-warn-bg) !important; color: #6E4500 !important; }
html body .od-act-routine :is(button.b-ok, a.btn.b-ok), html body .od-act-routine :is(button.b-ok, a.btn.b-ok):hover { background: var(--mt-ok-bg) !important; color: #0D5F42 !important; }
html body .od-act-routine button.b-info:hover, html body .od-act-routine a.btn.b-info:hover, html body .od-act-routine button.b-warn:hover, html body .od-act-routine button.b-ok:hover { border-color: currentColor !important; }
html body .od-act-danger { padding: 10px 0 0; border: 0; border-top: 1px dashed #E8A7A0; }
.od-act-danger > span { flex: 1 1 100%; font-size: 13px !important; }
html body .od-act-danger :is(button) { min-height: 36px; padding: 0 12px !important; font-size: 13px !important; background: #fff !important; color: #A82218 !important; border: 1px solid #E8A7A0 !important; }
html body .od-act-danger button:hover { background: var(--mt-danger-bg) !important; }
@media (max-width: 760px) {
  .od-actions { position: static; }
  html body .od-act-main button { flex: 1 1 100%; min-height: 48px; }
  html body .od-act-routine, html body .od-act-danger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .od-act-danger > span { grid-column: 1 / -1; }
  html body .od-act-routine :is(button, a.btn), html body .od-act-danger button { min-height: 44px; width: 100%; white-space: normal; padding: 4px 8px !important; }
}

/* ---- product rows: one quiet style, delete and «بیشتر» on the far side; a phone card gets one clear first action ---- */
html body td:has(> .act-group) { min-width: 290px; }
html body .act-group { gap: 6px; }
html body .act-group button.act { min-height: var(--mt-row-btn) !important; font-weight: 700 !important; font-size: 13px !important; }
html body .act-group button.act:not(.act-edit):not(.act-new):not(.act-delete) { background: var(--mt-brand) !important; color: #fff !important; border-color: var(--mt-brand) !important; }
html body .act-group button.act.act-edit { background: #2563EB !important; color: #fff !important; border-color: #2563EB !important; }
html body .act-group button.act.act-edit:hover { background: #1D4ED8 !important; border-color: #1D4ED8 !important; }
html body .act-group button.act.act-new { background: #0A7A52 !important; color: #fff !important; border-color: #0A7A52 !important; }
html body .act-group button.act.act-new:hover { background: #086444 !important; border-color: #086444 !important; }
html body .act-group button.act.act-delete { background: #fff !important; color: #B42318 !important; border-color: #E8A7A0 !important; margin-inline-start: auto; }
html body .act-group button.act.act-delete:hover { background: var(--mt-danger-bg) !important; }
@media (max-width: 760px) {
  html body .act-group button.act { min-height: 44px !important; flex: 1 1 calc(50% - 6px); }
  html body .act-group button.act:first-child { flex: 1 1 100%; }
  html body .act-more > summary { min-height: 44px; }
  html body td:has(> .act-group) { min-width: 0; }
}

/* ---- phone row cards: one primary, «جزئیات» a quiet text button ---- */
@media (max-width: 640px) {
  html body .mt-rt-many:not(.is-full) .mt-rt-more { background: transparent; color: var(--mt-ink-2); font-size: 13px; font-weight: 600; }
  .mt-rt-many:not(.is-full) .mt-rt-t tr { box-shadow: none; border-radius: 12px; }
  .mt-rt-many:not(.is-full) .mt-rt-t td::before { font-size: 12.5px; color: var(--mt-mute); font-weight: 600; }
  html body .mt-rt-many .mt-rt-full { color: var(--mt-section-ink); font-size: 13px; min-height: 44px; }
  /* a phone page never spends its width on the card frame around a list */
  html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .pf-card, .fm-card, .ext-panel) { padding: 12px; }
}

/* ---- touch: small visible marks with a full-size target ---- */
@media (max-width: 760px) {
  button.mt-help.mt-help { position: relative; width: 30px; height: 30px; min-width: 30px; min-height: 30px; }
  button.mt-help.mt-help::before { content: ""; position: absolute; inset: -7px; }
  html body .jalali-filter-wrap > button.x::before { inset: -7px; }
  .mt-print-btn { min-height: 44px; }
  html body .b-sm, html body button.b-sm, html body button.pf-sm, html body .ext-sm, html body .ext-chip, html body .pf-sm { min-height: 44px !important; }
  .acc-btn, .acc-f > input { min-height: 44px; }
  .acc-hist summary { min-height: 44px; }
  /* a single form on a phone: its action is a full-width primary */
  html body :is(form) > button:only-of-type:where(:not(.x):not(.mt-plain):not(.acc-btn)), html body :is(.pf-acts, .ext-actions) > button:only-child { width: 100%; min-height: 46px; }
  html body select { max-width: 100%; text-overflow: ellipsis; }
}

/* ---- the invoice filter on a desktop: toggle, search field and its buttons on one line until opened ---- */
@media (min-width: 761px) {
  #filters:not(.open), #dpf:not(.open) { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; }
  #filters:not(.open) .mflt-t, #dpf:not(.open) .mflt-t { order: 3; margin: 0; }
  #filters:not(.open) .grid, #dpf:not(.open) .grid { flex: 1 1 300px; display: block; }
  #filters:not(.open) p.row, #dpf:not(.open) p.row { margin: 0; order: 2; }
  #filters p.row { margin: 10px 0 0; align-items: center; }
}
/* ---- key figures on a phone: heavy enough that a zero reads as a digit ---- */
@media (max-width: 640px) {
  html body .kgrid .kpi b, html body .kgrid:has(> .kpi:nth-child(5)) > .kpi b { font-size: 24px; font-weight: 900; }
  html body .kgrid:has(> .kpi:nth-child(5)) > .kpi { padding: 8px 10px; column-gap: 8px; }
  html body .kgrid .kpi small { font-size: 13px; }
  html body .kgrid .kpi b + small { font-size: 12px; line-height: 1.5; }
  html body .fm-amt, html body .fin-home .fin-home-amt { font-size: 22px; font-weight: 900; }
}
/* ---- access accounts: compact, aligned actions under the content; deactivation distinct but small ---- */
html body .acc-acts { gap: 6px; }
html body .acc-btn { min-height: 34px; padding: 4px 10px; font-size: 13px; font-weight: 700; border-radius: 9px; }
html body .acc-btn:not(.primary):not(.warn):not(.ok):not(.danger-ghost) { background: var(--mt-section-soft); color: var(--mt-section-ink); border-color: transparent; }
html body .acc-btn:not(.primary):not(.warn):not(.ok):not(.danger-ghost):hover { border-color: var(--mt-section); background: var(--mt-section-soft); }
html body .acc-btn.warn { background: var(--mt-warn-bg); color: #6E4500; border-color: var(--mt-warn-line); }
html body .acc-btn.ok { color: #0D5F42; }
html body .acc-form .acc-save { min-width: 84px; min-height: var(--mt-ctl); background: var(--mt-section-soft); color: var(--mt-section-ink); border-color: var(--mt-section-line); }
html body .acc-form .acc-save:hover { background: var(--mt-section); color: var(--mt-on-section, #fff); }
.acc-row { padding: 12px 14px; }
.acc-list { grid-template-columns: minmax(180px, 1fr) minmax(0, 2.4fr) minmax(150px, .62fr); }
@media (max-width: 760px) { html body .acc-btn, html body .acc-form .acc-save { min-height: 44px; } }

/* ---- person lists outside the split view (payroll, opening): a grid of rows at full height, the balance beside each name ---- */
html body .card > .plist, html body section > .plist:only-of-type { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 6px; }
html body .split .plist { display: flex; }

/* ---- status cards: a tinted chip carries the state (no side stripes) ---- */
html body .status-card, html body .status-card.ok, html body .status-card.warn, html body .status-card.bad { background: #fff !important; border: 1px solid var(--mt-line) !important; border-radius: 12px; box-shadow: var(--mt-e1); color: var(--mt-ink) !important; }
html body .status-card span { font-size: 13px; color: var(--mt-ink-2); }
html body .status-card small { font-size: 12.5px; color: var(--mt-mute); }
html body .status-card:is(.ok, .warn, .bad) b { display: inline-block; padding: 1px 12px; border-radius: 999px; font-size: 15px; border: 1px solid transparent; }
html body .status-card.ok b { background: var(--mt-ok-bg); color: var(--mt-ok); border-color: var(--mt-ok-line); }
html body .status-card.warn b { background: var(--mt-warn-bg); color: var(--mt-warn); border-color: var(--mt-warn-line); }
html body .status-card.bad b { background: var(--mt-danger-bg); color: var(--mt-danger); border-color: var(--mt-danger-line); }

/* ---- other old side stripes ---- */
html body .message-card, html body .chat-out, html body .chat-in, html body .notice, html body .management-summary, html body .alert-card, html body .warning-card { border-right-width: 1px !important; border-left-width: 1px !important; }
html body .cv-quote { border-inline-start-width: 1px; padding-inline-start: 8px; color: var(--mt-mute); }

/* ---- recruitment: status tiles speak by tone; the same surfaces as everywhere ---- */
html body .stats .stat { background: #fff; border-color: var(--mt-line); font-size: 13.5px; font-weight: 600; color: var(--mt-ink-2); }
html body .stats .stat b { color: var(--mt-navy); font-weight: 800; }
html body .stats .stat:nth-child(1) b, html body .stats .stat:nth-child(2) b { color: var(--mt-warn); }
html body .stats .stat:nth-child(3) b, html body .stats .stat:nth-child(5) b { color: var(--mt-danger); }
html body .stats .stat:nth-child(4) b { color: var(--mt-ok); }
html body main.section { padding-block: 0 32px; }
html body main.section > .wrap { width: 100%; }
html body .eyebrow { font-size: 12px; font-weight: 700; }
html body .detailgrid { gap: 8px; }
html body .detail { background: #fff; border-color: var(--mt-line); padding: 8px 12px; }
html body .detail b { font-size: 13px; color: var(--mt-ink-2); }

/* ---- the seller profile joins the system: section hue, no gradient wash ---- */
html body.mt-shell .hero { background: var(--mt-section-soft); color: var(--mt-section-ink); padding: 14px 18px 56px; border-bottom: 1px solid var(--mt-section-line); }
html body.mt-shell .hero :is(h1, h2, b, strong) { color: var(--mt-section-ink); }
html body.mt-shell .hero :is(p, small, span) { color: var(--mt-ink-2); }
html body.mt-shell .hero .avatar, html body.mt-shell .hero-avatar { background: var(--mt-section); color: var(--mt-on-section, #fff); border-color: var(--mt-section); }
html body.mt-shell .day-main { background: var(--mt-section); box-shadow: none; }
html body.mt-shell .day-main small, html body.mt-ds .day-main .mini span { color: #fff; font-size: 12.5px; }
html body .delta, html body .absent-badge { font-size: 12px; }

/* ---- messages ---- */
html body .cv-hub { align-items: stretch; }
html body .cv-thread { scrollbar-width: thin; scrollbar-color: #B4C0CD transparent; }
html body .cv-thread::-webkit-scrollbar { width: 8px; }
html body .cv-thread::-webkit-scrollbar-thumb { background: #B4C0CD; border-radius: 8px; }
html body .cv-thread::-webkit-scrollbar-track { background: transparent; }
html body .cv-block { margin: 0; }
html body .cv-block button { min-height: 34px; padding: 0 10px; background: transparent !important; border: 1px solid var(--mt-line) !important; color: var(--mt-ink-2) !important; font-size: 13px; font-weight: 600; border-radius: 9px; cursor: pointer; }
html body .cv-block button:hover { background: var(--mt-bg) !important; }
html body .cv-reply { background: transparent; color: var(--mt-section-ink); font-weight: 600; }
.cv-empty { color: var(--mt-mute); font-size: 14px; }

/* ---- documents: a status that reads, a quiet native file control, a quiet action until it is the one action ---- */
.pf-doc { border-color: var(--mt-line); }
html body .pf-badge.off { background: var(--mt-warn-bg); color: #6E4500; border: 1px solid var(--mt-warn-line); }
html body .pf-badge.warn { background: var(--mt-warn-bg); color: #6E4500; border: 1px solid var(--mt-warn-line); }
input[type="file"]::file-selector-button { font: inherit; font-size: 13px; font-weight: 700; min-height: 32px; margin-inline-end: 8px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--mt-section-line, #A9D6D8); background: var(--mt-section-soft, #E3F3F3); color: var(--mt-section-ink, #0A5F67); cursor: pointer; }
html body .pf-doc-up button { background: var(--mt-section-soft) !important; color: var(--mt-section-ink) !important; border: 1px solid var(--mt-section-line) !important; }
html body .pf-doc-up:has(input[type="file"]:valid) button { background: var(--mt-section) !important; color: var(--mt-on-section, #fff) !important; }
html body .pf-card > p, html body .pf-doc small { color: var(--mt-mute); font-size: 13px; }

/* ---- helper texts and small notes ---- */
html body .helper, html body .help-text, html body .note, html body .sub, html body .muted-text { font-size: 13px; color: var(--mt-mute); }
html body .ext-sub, html body .ext-note { font-size: 13.5px; color: var(--mt-mute); }
html body .oc-side > a, html body .oc-side > .btn { align-self: flex-start; width: auto; }
html body .oc-side .muted { font-size: 12.5px; color: var(--mt-mute); }
.mt-status, html body .ubadge, html body .ext-badge { white-space: nowrap; }

/* ---- the info banner of a preview: one compact line ---- */
.fm-preview-note { padding: 7px 12px; font-size: 13px; line-height: 1.7; }

/* ---- TV Live keeps its dark look; a phone only tidies its small print and pager ---- */
@media (max-width: 760px) {
  html body.mt-tv :is(small, .tv-rank-sub) { font-size: 12px; }
  html body.mt-tv .tv-pager, html body.mt-tv [class*="pager"] { flex-wrap: wrap; gap: 8px; justify-content: space-between; }
}

/* ---- the access summary: a quiet list where the counts that exist stand out ---- */
html body .access-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 0 18px; }
html body .access-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 2px 4px; background: none; border: 0; border-bottom: 1px solid var(--mt-line-soft); border-radius: 0; font-size: 13.5px; color: var(--mt-ink); }
html body .access-chip b { min-width: 28px; text-align: center; padding: 0 8px; border-radius: 999px; background: var(--mt-section); color: var(--mt-on-section, #fff); font-weight: 800; font-size: 13px; }
html body .access-chip.is-zero { color: var(--mt-mute); }
html body .access-chip.is-zero b { background: transparent; color: var(--mt-mute); font-weight: 600; }

/* ---- a phone: compact forms before the list; every select as wide as its field ---- */
@media (max-width: 760px) {
  html body form select { width: 100%; }
  html body .panel { padding: 12px; margin-bottom: 12px; }
  html body .panel > h2 { margin: 0 0 8px; font-size: 15px; }
  html body form.quick { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
  html body form.quick > div { min-width: 0; }
  html body form.quick input { width: 100%; }
  html body form.quick button { width: auto; min-height: 44px; padding: 0 12px !important; white-space: nowrap; }
}

/* ---- small tidying ---- */
html body .ext-empty { text-align: center; padding: 8px 0; }
html body .ext-wrap a:not([class]), html body .ext-note a { color: var(--mt-section-ink); text-underline-offset: 3px; }
html body .oc-side .ext-badge { align-self: flex-start; }
html body main.section { padding-block: 14px 32px; }
html body .timeline { border-right-width: 1px; }
html body .note { border-right-width: 1px !important; border-left-width: 1px !important; }
.delta { font-size: 12px !important; }
/* prepayment filter pills: one pill style, the current one in the section's hue */
html body .dp-seg { gap: 6px; flex-wrap: wrap; }
html body .dp-seg button { min-height: 34px; padding: 0 12px !important; font-size: 13px !important; font-weight: 600 !important; border-radius: 999px !important; background: #fff !important; color: var(--mt-ink-2) !important; border: 1px solid var(--mt-line) !important; }
html body .dp-seg button:is(.on, .active, [aria-pressed="true"], [aria-current]) { background: var(--mt-section) !important; color: var(--mt-on-section, #fff) !important; border-color: var(--mt-section) !important; font-weight: 800 !important; }
@media (max-width: 760px) { html body .dp-seg button { min-height: 44px; } }
/* chart labels stay readable on a phone */
@media (max-width: 640px) { .mt-chart svg text { font-size: 12px; } html body details > summary { min-height: 44px; display: flex; align-items: center; } }
/* TV Live on a phone: only the tiny labels grow; its dark look stays */
@media (max-width: 760px) { html body.mt-tv :is(.record-title, .sh, .tv-chart-cap) { font-size: 12px; } html body.mt-tv .record-title { line-height: 1.5; } }

@media (max-width: 760px) {
  html body .cv-block button { min-height: 44px; }
  html body .cv-msg a { min-height: 44px; display: inline-flex; align-items: center; }
  html body .cv-picks label, html body .cv-quick button { min-height: 44px; }
}
/* ---- a phone toolbar: two even columns instead of mixed widths on uneven rows ---- */
@media (max-width: 760px) {
  html body main .row > :is(button, a.btn), html body .wrap .row > :is(button, a.btn) { flex: 1 1 calc(50% - 4px); min-width: 0; white-space: normal; }
  html body .pf-acts > :is(button, a.pf-btn) { flex: 1 1 calc(50% - 4px); }
}
/* ---- print stays plain: black on white, no tints, no chrome ---- */
@media print {
  html body, html body.mt-ds:not(.mt-tv):not(.home-entry) { background: #fff !important; color: #000 !important; }
  html body.mt-ds:not(.mt-tv):not(.home-entry) table th, html body.mt-ds:not(.mt-tv):not(.home-entry) .mt-rt-t thead th, html body.mt-ds:not(.mt-tv):not(.home-entry) .mt-thead-follow th, html body.mt-ds:not(.mt-tv):not(.home-entry) .access-account-table thead th, html body.mt-ds .ext-table th, html body.mt-ds .pf th { background: #fff !important; background-color: #fff !important; color: #000 !important; border-bottom: 1px solid #000 !important; }
  :is(td.rt-empty, .acc-empty, .ext-empty, .pf-empty, .fm-empty, .empty)::before { display: none !important; }
  html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, .pf-card, .fm-card, .ext-panel, .mt-card) { box-shadow: none !important; border-color: #999 !important; background: #fff !important; }
  html body :is(h1, h2, h3, a, td, small, .muted) { color: #000 !important; }
  html body .kpi b, html body .fm-amt { color: #000 !important; }
  .scroll, .table-wrap, .pf-scroll { background: none !important; overflow: visible !important; }
}
/* ---- the seller profile on a very narrow screen (a phone at 150% zoom): the three figures of today's panel stack ---- */
html body .day-head > * { min-width: 0; }
@media (max-width: 340px) { html body .day-main .mini-grid { grid-template-columns: minmax(0, 1fr); } }
html body .fin-home .fin-home-grade .fin-grade, html body .fm-grade-row .fin-grade { border-radius: 10px; font-size: 13px; line-height: 1.5; padding: 3px 10px; direction: rtl; }
/* a note inside a narrow table cell stays one box (two lines of an inline box overlapped each other) */
html body td .warning { display: inline-block; max-width: 100%; }
@media (max-width: 760px) { html body .mt-appbar .mt-ab-status:has(.mt-ab-return) { margin: 5px -6px -5px; flex-basis: calc(100% + 12px); } }
/* the dot of a live status stays beside its word in a narrow column; a running timer may still take its own line */
html body .live-status:not(:has(> :nth-child(2))) { flex-wrap: nowrap; white-space: nowrap; max-width: none; padding-inline: 8px; }
/* the bell has no box of its own any more: its count sits on the corner of the bell icon, inside the bar */
html body .mt-ab-bell .mt-ab-badge { top: calc(50% - 17px); left: calc(50% - 18px); min-width: 17px; height: 17px; padding: 0 3px; line-height: 13px; }

/* ==================================================================
   Design system v5.1: the owner lifted the limit on colour. The section is obvious at first glance: a filled band, the section in
   the top bar, a tinted page, coloured card heads, table heads, tabs, pagers and figures. Action and status colours keep their
   meaning (rule S-1355 item 5); a section hue never replaces them.
   ================================================================== */
:root { --mt-c1: #1D5FA8; --mt-c2: #0F9D6B; --mt-c3: #D1432F; --mt-c0: #F0B24A; }
html body.mt-ds:not(.mt-tv):not(.home-entry):has(> .mt-pagehead) { background: var(--mt-section-wash); }

/* top bar: the logo tile and the menu button in the section's colour, a bright edge underneath */
.mt-appbar { border-bottom: 4px solid var(--mt-section-glow); }
html body .mt-appbar .mt-ab-menu, html body .mt-appbar .mt-logo { background: var(--mt-section); border-color: var(--mt-section-glow); color: var(--mt-on-section, #fff); }
html body .mt-appbar .mt-ab-menu:hover { background: var(--mt-section-ink); }

/* the page band: filled, white title and a white icon tile */
.mt-pagehead { background: var(--mt-section); border-bottom: 0; }
.mt-ph-chip { background: #fff; color: var(--mt-section-ink); }
.mt-ph-title { color: #fff; }
.mt-ph-sec { background: transparent; border-color: #fff; color: #fff; }

/* card heads: a tinted strip that names the card */
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, .pf-card, .fm-card, .mt-panel, .ext-panel) { border-color: var(--mt-section-line); }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, .pf-card, .fm-card, .mt-panel, .ext-panel):has(> :is(h2, .pf-h, .fm-h, .ext-panel-h, .fin-home-head, .sp-pers-h):first-child) { padding: 0 18px 16px; overflow: visible; }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, .pf-card, .fm-card, .mt-panel, .ext-panel) > :is(h2, .pf-h, .fm-h, .ext-panel-h, .fin-home-head, .sp-pers-h):first-child { margin: 0 -18px 14px; padding: 10px 18px; min-height: 44px; box-sizing: border-box; background: var(--mt-section-soft); color: var(--mt-section-ink); border-radius: 13px 13px 0 0; border-bottom: 1px solid var(--mt-section-line); font-size: 16px; font-weight: 800; }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, .pf-card, .fm-card, .mt-panel, .ext-panel) > :is(.pf-h, .fm-h, .ext-panel-h, .fin-home-head, .sp-pers-h):first-child :is(h2, small) { color: var(--mt-section-ink); }
@media (max-width: 640px) {
  html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, .pf-card, .fm-card, .mt-panel, .ext-panel):has(> :is(h2, .pf-h, .fm-h, .ext-panel-h, .fin-home-head, .sp-pers-h):first-child) { padding: 0 12px 12px; }
  html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, .pf-card, .fm-card, .mt-panel, .ext-panel) > :is(h2, .pf-h, .fm-h, .ext-panel-h, .fin-home-head, .sp-pers-h):first-child { margin: 0 -12px 12px; padding: 8px 12px; }
}
html body dialog > .row { background: var(--mt-section-soft); }
html body dialog > .row h2 { color: var(--mt-section-ink); }

/* table heads */
html body.mt-ds:not(.mt-tv):not(.home-entry) table th, html body.mt-ds:not(.mt-tv):not(.home-entry) .mt-rt-t thead th, html body.mt-ds:not(.mt-tv):not(.home-entry) .mt-thead-follow th, html body.mt-ds:not(.mt-tv):not(.home-entry) .access-account-table thead th, html body.mt-ds .ext-table th, html body.mt-ds .pf th { background-color: var(--mt-section-mid) !important; color: var(--mt-section-ink); border-bottom: 1px solid var(--mt-section); }
.acc-head { background: var(--mt-section-mid); }

/* tabs: each one in the hue of the section it leads to; the current one filled */
html body .tabs :is(button, a), html body .fsub button, html body .pf-tabs a, html body .ext-tab { background: var(--mt-section-soft) !important; color: var(--mt-section-ink) !important; border-bottom: 0 !important; margin-bottom: 4px; border-radius: 10px !important; font-weight: 700 !important; }
html body .tabs :is(button, a):hover, html body .fsub button:hover, html body .pf-tabs a:hover, html body .ext-tab:hover { background: var(--mt-section-mid) !important; color: var(--mt-section-ink) !important; }
html body .tabs :is(button.active, a.on), html body .fsub button.active, html body .pf-tabs a.on, html body .ext-tab.on { background: var(--mt-section) !important; color: var(--mt-on-section, #fff) !important; font-weight: 800 !important; }
html body :is(.tabs, .fsub, .pf-tabs, .ext-tabs) { border-bottom: 2px solid var(--mt-section); gap: 4px 6px; }
/* v13.5.14 (owner): a tab bar the page hides (one tab of its section left) stays hidden; the display:flex above must not override it */
html body :is(.tabs, .fsub, .pf-tabs, .ext-tabs, #tabs)[hidden], html body #tabs:empty { display: none !important; }

/* pagers */
html body :is(.spager, .pager, .pagination) :is(a, button) { background: var(--mt-section-soft) !important; color: var(--mt-section-ink) !important; border: 1px solid var(--mt-section-line) !important; }
html body :is(.spager, .pager, .pagination) :is(a, button):is(.on, .active, [aria-current]) { background: var(--mt-section) !important; color: var(--mt-on-section, #fff) !important; }
html body :is(.spager, .pager, .pagination) :is(a, button):disabled { background: #fff !important; color: var(--mt-mute) !important; }

/* figures: real colour. A tile takes its meaning when it has one, else the section; the number is always coloured */
html body :is(.kpi, .stat, .fm-stat, .live-mini, .fin-home .fin-home-kpis > div, .fin-home .fin-home-grade > div, .fm-grade-row > div, .pf-kv div) { background: var(--mt-section-soft); border-color: var(--mt-section-line); }
html body :is(.kpi b, .stat b, .fm-amt, .fin-home .fin-home-amt, .fin-home .fin-home-grade b, .fm-grade-row b) { color: var(--mt-section-ink); }
html body .kpi[data-tone="ok"], html body .fm-stat.ok, html body #ana .acards .kpi-link[data-tone="ok"] { background: var(--mt-ok-bg) !important; border-color: var(--mt-ok-line) !important; }
html body .kpi[data-tone="wait"], html body .fm-stat.warn, html body #ana .acards .kpi-link[data-tone="wait"] { background: var(--mt-warn-bg) !important; border-color: var(--mt-warn-line) !important; }
html body .kpi[data-tone="bad"], html body .fm-stat.bad, html body #ana .acards .kpi-link[data-tone="bad"] { background: var(--mt-danger-bg) !important; border-color: var(--mt-danger-line) !important; }
html body #ana .acards .kpi-link:not([data-tone="ok"]):not([data-tone="wait"]):not([data-tone="bad"]) { background: var(--mt-section-soft) !important; border-color: var(--mt-section-line) !important; }
html body #ana .acards .kpi-link:hover { border-color: var(--mt-section) !important; }
html body .kpi[data-tone="ok"] b, html body .fm-stat.ok .fm-amt { color: #0F6A49 !important; }
html body .kpi[data-tone="wait"] b, html body .fm-stat.warn .fm-amt { color: #7A4D00 !important; }
html body .kpi[data-tone="bad"] b, html body .fm-stat.bad .fm-amt { color: #A82218 !important; }
/* the call dashboard band: each figure its own colour */
html body .mh-kpis .mt-kpi:nth-child(1) { background: #E0ECFA; } html body .mh-kpis .mt-kpi:nth-child(1) > b { color: #164A85; }
html body .mh-kpis .mt-kpi:nth-child(2) { background: #DCF0FA; } html body .mh-kpis .mt-kpi:nth-child(2) > b { color: #085A83; }
html body .mh-kpis .mt-kpi:nth-child(3) { background: var(--mt-ok-bg); } html body .mh-kpis .mt-kpi:nth-child(3) > b { color: #0F6A49; }
html body .mh-kpis .mt-kpi:nth-child(4) { background: #E6E6FB; } html body .mh-kpis .mt-kpi:nth-child(4) > b { color: #363A9E; }
html body .mh-kpis .mt-kpi > span, html body .mh-kpis .mt-kpi > small { color: var(--mt-ink); }
html body .mh-rec { background: var(--mt-section-soft); border-color: var(--mt-section-line); }
html body .stats .stat:nth-child(1), html body .stats .stat:nth-child(2) { background: var(--mt-warn-bg); border-color: var(--mt-warn-line); }
html body .stats .stat:nth-child(3), html body .stats .stat:nth-child(5) { background: var(--mt-danger-bg); border-color: var(--mt-danger-line); }
html body .stats .stat:nth-child(4) { background: var(--mt-ok-bg); border-color: var(--mt-ok-line); }
html body .stats .stat:nth-child(1) b, html body .stats .stat:nth-child(2) b { color: #7A4D00; }
html body .stats .stat:nth-child(3) b, html body .stats .stat:nth-child(5) b { color: #A82218; }
html body .stats .stat:nth-child(4) b { color: #0F6A49; }
html body .pf-item { background: var(--mt-section-soft); border-color: var(--mt-section-line); }
html body .pf-item:hover { border-color: var(--mt-section); }
html body .plist button { background: var(--mt-section-soft) !important; border-color: var(--mt-section-line) !important; }
html body .plist button:hover { background: var(--mt-section-mid) !important; }
html body .plist button.on { background: var(--mt-section) !important; color: var(--mt-on-section, #fff) !important; }
html body .plist button.on :is(.money, small) { color: #fff !important; }
html body .access-chip:not(.is-zero) { background: var(--mt-section-soft); }
html body .mt-kpis-2 { background: var(--mt-section-soft); }
.mt-meter > i { background: var(--mt-c2); }

/* the menu: every group a block in its own hue */
html body .mt-drawer details.mt-dr-group { background: var(--mt-section-wash); border: 1px solid var(--mt-section-line); border-radius: 12px; margin: 0 0 6px; }
html body .mt-drawer details.mt-dr-group > summary { color: var(--mt-section-ink); }
html body .mt-drawer details.mt-dr-group[open] > summary { background: var(--mt-section-soft); border-radius: 11px 11px 0 0; }
html body .mt-drawer details.mt-dr-group > summary .mt-chev { color: var(--mt-section-ink); }
html body .mt-dr-chip { background: var(--mt-section); color: var(--mt-on-section, #fff); }
html body .mt-drawer .mt-dr-items { padding: 4px 8px 8px; }
html body .mt-drawer .mt-dr-group a { color: var(--mt-section-ink); font-weight: 600; }
html body .mt-drawer .mt-dr-group a:hover { background: var(--mt-section-mid); }
html body .mt-drawer .mt-dr-group a[aria-current="page"] { background: var(--mt-section); color: var(--mt-on-section, #fff); }

/* login and the public pages carry the brand */
html body .entry-submit { background: #0E7C86 !important; border-color: #0E7C86 !important; }
html body .entry-submit:hover { background: #0A5F67 !important; }

/* TV Live: the same dark wall, with a coloured edge per figure (legible at a distance; the numbers keep their own colours) */
html body.mt-tv .tv-kpis > :nth-child(1) { border-top: 3px solid #6FA8E8; }
html body.mt-tv .tv-kpis > :nth-child(2) { border-top: 3px solid #43C6BE; }
html body.mt-tv .tv-kpis > :nth-child(3) { border-top: 3px solid #F0B24A; }
html body.mt-tv .tv-kpis > :nth-child(4) { border-top: 3px solid #C08FE0; }
html body.mt-tv .tv-kpis > :nth-child(5) { border-top: 3px solid #5CBBE8; }

@media print {
  html body.mt-ds:not(.mt-tv):not(.home-entry) { background: #fff !important; }
  html body.mt-ds:not(.mt-tv):not(.home-entry) table th, html body.mt-ds:not(.mt-tv):not(.home-entry) .mt-rt-t thead th, html body.mt-ds:not(.mt-tv):not(.home-entry) .mt-thead-follow th, html body.mt-ds:not(.mt-tv):not(.home-entry) .access-account-table thead th, html body.mt-ds .ext-table th, html body.mt-ds .pf th { background-color: #fff !important; color: #000 !important; border-bottom: 1px solid #000 !important; }
  html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, .pf-card, .fm-card, .mt-panel, .ext-panel) > :is(h2, .pf-h, .fm-h, .ext-panel-h, .fin-home-head, .sp-pers-h):first-child { background: #fff !important; color: #000 !important; border-bottom: 1px solid #000; }
  html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.card, .panel, .pf-card, .fm-card, .mt-panel, .ext-panel) { border-color: #999 !important; }
  html body :is(.kpi, .stat, .fm-stat, .live-mini, .mt-kpi, .mh-rec, .mt-kpis-2, .pf-item, .pf-kv div, .access-chip) { background: #fff !important; border-color: #999 !important; }
  html body :is(.kpi b, .stat b, .mt-kpi > b, .fm-amt) { color: #000 !important; }
}
/* v5.1 corrections: page-local tab rules and the older tile rule are more specific */
html body .tabs :is(button.secondary, a), html body .fsub button.secondary { background: var(--mt-section-soft) !important; color: var(--mt-section-ink) !important; border-color: transparent !important; }
html body .tabs button.secondary:hover, html body .fsub button.secondary:hover { background: var(--mt-section-mid) !important; }
html body .tabs button.active, html body .fsub button.active { background: var(--mt-section) !important; color: var(--mt-on-section, #fff) !important; border-color: transparent !important; box-shadow: none !important; }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.kpi, .stat, .live-mini, .fm-stat, .fin-home .fin-home-kpis > div, .fin-home .fin-home-grade > div, .fm-grade-row > div, .pf-kv div) { background-color: var(--mt-section-soft); border-color: var(--mt-section-line); }
html body.mt-ds:not(.mt-tv):not(.home-entry) .fm-stat.ok { background-color: var(--mt-ok-bg); } html body.mt-ds:not(.mt-tv):not(.home-entry) .fm-stat.warn { background-color: var(--mt-warn-bg); } html body.mt-ds:not(.mt-tv):not(.home-entry) .fm-stat.bad { background-color: var(--mt-danger-bg); }
html body .mt-appbar .mt-logo { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); }
/* public pages: the line under the brand stays legible on the dark header */
html body .top :is(p, small, .muted, .sub) { color: #D7EDF4; }
@media print { html body .mt-chart-state, html body .mt-chart-state.is-thin, html body .mt-chart-state.is-error { background: #fff !important; color: #000 !important; border: 1px solid #999; } html body .mt-kpis-2 { background: #fff !important; } }

/* ==================================================================
   Design system v5.2 (13.5.13): the owner's palette. Finance is dollar green, dispatch golden yellow, communications WhatsApp
   green, reports violet; every section is distinct at a glance. On a light filled colour (yellow, WhatsApp green) text is dark
   (--mt-on-section); text on white uses the section's ink. Action and status colours keep their meaning (S-1355 item 5).
   ================================================================== */
/* a light section colour must never be used as text or as the only focus mark: the older brand tokens follow its ink there */
html[data-mt-section="dispatch"], html[data-mt-section="comms"] { --mt-brand: var(--mt-section-ink); --mt-brand-d: var(--mt-section-ink); --mt-teal: var(--mt-section-ink); --mt-teal-d: var(--mt-section-ink); accent-color: var(--mt-section-ink); }
html[data-mt-section="dispatch"] :focus-visible, html[data-mt-section="comms"] :focus-visible, [data-sec="dispatch"] :focus-visible, [data-sec="comms"] :focus-visible { outline-color: var(--mt-section-ink) !important; }
.acc-btn.primary, button.mt-help.mt-help[aria-expanded="true"] { color: var(--mt-on-section, #fff); }
/* the band, the menu button and the chips carry the on-section text */
.mt-ph-title { color: var(--mt-on-section, #fff); }
.mt-ph-sec { border-color: var(--mt-on-section, #fff); color: var(--mt-on-section, #fff); }
html body .mt-appbar .mt-ab-menu { color: var(--mt-on-section, #fff); }
html body .mt-drawer .mt-dr-group a[aria-current="page"]::after { color: var(--mt-on-section, #fff); }
/* the yellow band gets a thin dark edge so it reads as a band and not as a warning strip */
[data-mt-section="dispatch"] .mt-pagehead { box-shadow: inset 0 -2px 0 rgba(58,43,0,.25); }
/* warning chips and tiles keep a clear difference from dispatch yellow: an amber line and the word with its dot */
html[data-mt-section="dispatch"] :is(.mt-status.s-wait, .acc-badge.warn, .ext-badge.warn, .mt-tag.warn) { background: #FFF1DC; border-color: #E8A54A; color: #6B3E00; }
html[data-mt-section="dispatch"] .kpi[data-tone="wait"] { background: #FFF1DC !important; border-color: #E8A54A !important; }
/* finance green stays apart from approve green: approve keeps its own bluish green and its check icon; finance buttons are leaf green */
html[data-mt-section="finance"] :is(button.b-ok, a.b-ok) { background: #0A7A52 !important; border-color: #075C3D !important; }

/* approve stays green on person-file decisions (S-1355 item 5) */
html body .pf button.pf-ok, html body .pf button.pf-primary.pf-ok { background: #0A7A52 !important; border-color: #0A7A52 !important; color: #fff !important; }
html body .pf button.pf-ok:hover { background: #086444 !important; border-color: #086444 !important; }

/* the bell count sits on the icon's corner and grows away from the icon (two or three digits never cover it) */
html body .mt-ab-bell .mt-ab-badge { left: auto; right: calc(50% + 3px); top: calc(50% - 17px); }

/* ---- staff chat: a WhatsApp-like conversation (presentation only) ---- */
.cv .sr-only, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html body .cv-card.cv-chat { padding: 0 !important; overflow: hidden; border-color: #CFD8DC; }
html body .cv-chat > .cv-head { margin: 0; padding: 10px 14px; min-height: 60px; background: #075E54; color: #fff; display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; border-radius: 0; }
html body .cv-chat .cv-head h2 { margin: 0; color: #fff; font-size: 16px; font-weight: 800; background: none; padding: 0; border: 0; min-height: 0; }
html body .cv-chat .cv-role { color: #D3F2EA; font-size: 12.5px; }
.cv-av { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #25D366; color: #053B33; font-size: 18px; font-weight: 800; line-height: 1; }
.cv-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
html body .cv-chat .cv-head .cv-block button { background: transparent !important; color: #fff !important; border: 1px solid rgba(255,255,255,.55) !important; }
html body .cv-chat .cv-head .cv-block button:hover { background: rgba(255,255,255,.12) !important; }
html body .cv-chat .cv-thread { gap: 4px; padding: 12px 12px 8px; max-height: min(64vh, 680px); background-color: #EFE7DE;
  background-image: radial-gradient(rgba(84,101,111,.10) 1px, transparent 1.2px), radial-gradient(rgba(84,101,111,.07) 1px, transparent 1.2px);
  background-size: 22px 22px, 22px 22px; background-position: 0 0, 11px 11px; scrollbar-width: thin; scrollbar-color: rgba(84,101,111,.35) transparent; }
html body .cv-chat .cv-msg { border: 0; border-radius: 10px; padding: 6px 10px 4px; max-width: min(540px, 82%); line-height: 1.75; box-shadow: 0 1px .5px rgba(11,20,26,.14); }
html body .cv-chat .cv-msg.me { background: #D9FDD3; border-start-start-radius: 2px; }
html body .cv-chat .cv-msg.them { background: #fff; border-start-end-radius: 2px; }
html body .cv-chat .cv-msg.failed { background: #FDECEA; }
html body .cv-chat .cv-msg.me .cv-meta b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html body .cv-chat .cv-msg.me .cv-meta:not(:has(.cv-tag)) { display: none; }
html body .cv-chat .cv-meta b { color: #0B7A6E; font-size: 13px; }
html body .cv-chat .cv-body { font-size: 14.5px; color: #111B21; }
html body .cv-chat .cv-foot { margin-top: 0; justify-content: flex-start; gap: 8px; font-size: 12px; color: #54656F; }
.cv-when { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 3px; color: #54656F; font-size: 12px; white-space: nowrap; direction: ltr; }
.cv-ticks { display: inline-flex; color: #667781; }
.cv-ticks.is-read { color: #0277B4; }
.cv-st-bad { color: #A82218; font-weight: 700; }
html body .cv-chat .cv-reply-btn { color: #075E54; font-size: 12.5px; min-height: 28px; padding: 0 4px; }
.cv-day { align-self: center; margin: 8px 0 4px; }
.cv-day span { display: inline-block; padding: 3px 12px; border-radius: 8px; background: #fff; color: #54656F; font-size: 12.5px; font-weight: 600; box-shadow: 0 1px .5px rgba(11,20,26,.12); direction: ltr; }
html body .cv-chat .cv-quote { border-inline-start-width: 3px; border-color: #25D366; background: rgba(7,94,84,.06); }
html body .cv-chat .cv-empty { background: rgba(255,255,255,.85); border-radius: 10px; align-self: center; margin: 24px 0; }
/* the composer: a bar at the bottom with a pill field and a round send button */
html body .cv-chat .cv-form { position: sticky; bottom: 0; z-index: 2; margin: 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #F0F2F5; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; border-top: 1px solid #DDE3E7; }
html body .cv-chat .cv-form .cv-replying { flex: 1 1 100%; order: -1; background: #fff; }
html body .cv-chat .cv-form textarea { flex: 1 1 200px; min-height: 46px; max-height: 160px; border-radius: 22px !important; border: 1px solid #D1D7DB !important; padding: 11px 16px; resize: none; background: #fff; font-size: 15px; line-height: 1.6; }
html body .cv-chat .cv-form .cv-row { flex: 0 0 auto; }
html body .cv-chat .cv-form button.cv-send { width: 48px; min-width: 48px; height: 48px; min-height: 48px; padding: 0 !important; border-radius: 50% !important; background: #008069 !important; border-color: #008069 !important; color: #fff !important; display: grid !important; place-items: center; }
html body .cv-chat .cv-form button.cv-send:hover { background: #006D59 !important; }
html body .cv-chat .cv-form button.cv-send[disabled] { width: auto; border-radius: 24px !important; padding: 0 16px !important; }
html body .cv-chat .cv-note { margin: 10px; }
/* the conversation list: rows like a chat list, the open one tinted (no side stripe) */
html body .cv-list a { min-height: 52px; border-color: #E4EAF0; }
html body .cv-list a.on { box-shadow: none; background: #DCF8C6; border-color: #A8E6B8; }
html body .cv-list a.unread { background: #F0FBF3; }
html body .cv-list .who b { font-size: 14px; color: #111B21; }
@media (max-width: 760px) {
  html body .cv-chat .cv-thread { max-height: none; min-height: calc(100dvh - 330px); }
  html body .cv-chat .cv-msg { max-width: 88%; }
  html body .cv-chat > .cv-head { padding: 8px 10px; }
}
@media print { html body .cv-chat .cv-thread, html body .cv-chat .cv-msg { background: #fff !important; box-shadow: none; } html body .cv-chat > .cv-head { background: #fff; color: #000; } html body .cv-chat .cv-form { display: none; } }

/* ---- the notification panel: a tidy dropdown under the header ---- */
html body.mt-shell #mtnPanel { top: calc(var(--mt-sticky-top, 58px) + 6px) !important; }
html body #mtNotif .mtn-panel { width: min(400px, calc(100vw - 16px)); max-height: min(78vh, 620px); border-radius: 16px; background: #fff; border: 1px solid #D5DDE6; box-shadow: 0 18px 50px rgba(15,43,70,.26); font-family: "Vazirmatn", Tahoma, Arial, sans-serif; }
html body #mtNotif .mtn-head { background: #fff; color: #0F2B46; border-bottom: 1px solid #E4EAF0; padding: 10px 12px; min-height: 56px; }
html body #mtNotif .mtn-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
html body #mtNotif .mtn-title b { font-size: 16px; font-weight: 800; }
html body #mtNotif .mtn-count { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; background: #D92D20; color: #fff; font-size: 12px; font-weight: 800; white-space: nowrap; }
html body #mtNotif .mtn-count[hidden] { display: none; }
html body #mtNotif .mtn-head button { height: 34px; padding: 0 10px; background: transparent; color: #1A47AC; border: 0; border-radius: 8px; font: 700 13px/1 "Vazirmatn", Tahoma, sans-serif; }
html body #mtNotif .mtn-head button:hover { background: #E7EEFC; }
html body #mtNotif #mtnClear { color: #A82218; }
html body #mtNotif #mtnClear:hover { background: #FCE9E7; }
html body #mtNotif #mtnClose { width: 34px; padding: 0; color: #4A5A6B; }
html body #mtNotif #mtnClose:hover { background: #EEF2F6; }
html body #mtNotif .mtn-day { position: sticky; top: 0; z-index: 1; padding: 6px 14px; background: #F4F6F9; color: #4A5A6B; font-size: 12.5px; font-weight: 800; border-bottom: 1px solid #EEF2F6; }
html body #mtNotif .mtn-row { position: relative; }
html body #mtNotif .mtn-item, html body #mtNotif .mtn-row .mtn-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px 11px 48px; border-bottom: 1px solid #EEF2F6; background: #fff; border-right: 0; text-decoration: none; color: #13283D; transition: background-color .15s ease; }
html body #mtNotif .mtn-item:hover { background: #F6F8FA; }
html body #mtNotif .mtn-item.unread { background: #F2F7FE; }
html body #mtNotif .mtn-item.unread b::before { content: none; }
html body #mtNotif .mtn-ic { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #EEF2F6; color: #34485C; }
html body #mtNotif .mtn-k-chat { background: #DCF8C6; color: #075E54; }
html body #mtNotif .mtn-k-money { background: #E5EED9; color: #26470A; }
html body #mtNotif .mtn-k-calendar, html body #mtNotif .mtn-k-user { background: #F9E4F4; color: #84236F; }
html body #mtNotif .mtn-k-clock { background: #FFF3D9; color: #7A4D00; }
html body #mtNotif .mtn-k-doc { background: #D8F0F0; color: #0A5F67; }
html body #mtNotif .mtn-k-alert { background: #FCE9E7; color: #A82218; }
html body #mtNotif .mtn-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
html body #mtNotif .mtn-txt b { font-size: 14px; font-weight: 700; margin: 0; color: #13283D; }
html body #mtNotif .mtn-item.unread .mtn-txt b { font-weight: 800; }
html body #mtNotif .mtn-txt span { font-size: 13px; color: #34485C; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html body #mtNotif .mtn-txt small { font-size: 12px; color: #5B6B7D; margin: 0; }
html body #mtNotif .mtn-dot { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; background: #1A6FD8; }
html body #mtNotif .mtn-dismiss { position: absolute; left: 8px; top: 9px; width: 34px; height: 34px; min-height: 34px !important; display: grid !important; place-items: center; padding: 0 !important; border: 0 !important; border-radius: 9px !important; background: transparent !important; color: #5B6B7D !important; cursor: pointer; }
html body #mtNotif .mtn-dismiss:hover { background: #FCE9E7 !important; color: #A82218 !important; }
html body #mtNotif .mtn-head { flex-wrap: wrap; row-gap: 4px; }
html body #mtNotif .mtn-head > span { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin-inline-start: auto; }
html body #mtNotif .mtn-dismiss:focus-visible, html body #mtNotif .mtn-head button:focus-visible { outline: 2px solid #1A47AC !important; outline-offset: 1px; }
html body #mtNotif .mtn-empty { display: grid; justify-items: center; gap: 10px; padding: 36px 16px; color: #4A5A6B; font-size: 14px; }
html body #mtNotif .mtn-empty .mtn-ic { width: 48px; height: 48px; border-radius: 50%; }
html body #mtNotif .mtn-foot { background: #FAFBFC; font-size: 12.5px; }
@media (max-width: 760px) {
  html body.mt-shell #mtnPanel { left: 6px !important; right: 6px !important; width: auto; }
  html body #mtNotif .mtn-dismiss { width: 40px; height: 40px; min-height: 40px !important; top: 7px; }
  html body #mtNotif .mtn-title { flex: 1 1 100%; }
  html body #mtNotif #mtnClose { position: absolute; left: 10px; top: 10px; }
  html body #mtNotif .mtn-head { position: relative; padding-left: 52px; }
  html body #mtNotif .mtn-head button { height: 40px; }
  html body #mtNotif .mtn-item, html body #mtNotif .mtn-row .mtn-item { padding-left: 52px; }
}
/* an open notification panel is never covered by the arrival toasts */
html body #mtNotif:has(.mtn-panel.open) .mtn-toasts { display: none; }

/* ---- login: a calmer, more legible card over the office picture ---- */
html body.home-entry .home-login { background: rgba(7,30,46,.72); -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%); border: 1px solid rgba(255,255,255,.28); box-shadow: 0 24px 60px rgba(0,18,30,.45); padding: 30px 32px 24px; }
html body.home-entry .home-login:before, html body.home-entry .home-login:after { content: none; }
html body.home-entry .home-login h2 { font-size: 22px; margin: 4px 0 18px; text-shadow: none; }
html body.home-entry .entry-form { gap: 14px; }
html body.home-entry .entry-form label { font-size: 13.5px; font-weight: 700; color: #E8F4F8; text-shadow: none; }
html body.home-entry .entry-form input { height: 50px; background: #fff; color: #13283D; border: 1px solid rgba(255,255,255,.6) !important; border-radius: 12px !important; font-size: 15px; }
html body.home-entry .entry-form input::placeholder { color: #66768A; }
html body.home-entry .entry-form input:focus { box-shadow: 0 0 0 3px rgba(67,198,190,.55) !important; border-color: #43C6BE !important; }
html body.home-entry .entry-submit { height: 52px; border-radius: 12px !important; font-size: 15px !important; background: #0E7C86 !important; border-color: #0E7C86 !important; box-shadow: 0 10px 24px rgba(0,30,40,.35) !important; }
html body.home-entry .entry-submit:hover { background: #0A5F67 !important; }
html body.home-entry .interview-link { min-height: 50px; border-radius: 12px !important; background: #F2C14E !important; color: #2E2200 !important; border-color: #F2C14E !important; font-size: 15px !important; box-shadow: none !important; }
html body.home-entry .interview-link:hover { background: #F7D27A !important; }
html body.home-entry .entry-note { font-size: 12.5px; color: #D7E7EE; text-shadow: none; }
html body.home-entry .mt-lockup.on-dark { text-shadow: none; }
@media (max-width: 720px) {
  html body.home-entry .home-shell { align-items: flex-start; padding: 28px 12px; }
  html body.home-entry .home-login { padding: 24px 18px 20px; background: rgba(7,30,46,.8); }
}

/* ---- recruitment (public form and the management pages) ---- */
html body .gate-shell .gate-card, html body .gate-card { box-shadow: 0 18px 44px rgba(15,43,70,.12); border-radius: 18px; }
html body .gate-card h1, html body .gate-card h2 { font-size: 22px; line-height: 1.5; }
html body .gate-card input { min-height: 50px; font-size: 16px; border-radius: 12px !important; }
html body .gate-card button[type="submit"] { min-height: 50px; border-radius: 12px !important; font-size: 15px !important; }
/* the queue: the delete button only when there is something to select */
html body .access-queue:not(:has(tbody input[type="checkbox"])) #removeAccess { display: none; }
/* status tiles keep their meaning colour (the generic tile tint is less specific than this) */
html body.mt-ds:not(.mt-tv):not(.home-entry) .stats .stat:nth-child(1), html body.mt-ds:not(.mt-tv):not(.home-entry) .stats .stat:nth-child(2) { background-color: var(--mt-warn-bg); border-color: var(--mt-warn-line); }
html body.mt-ds:not(.mt-tv):not(.home-entry) .stats .stat:nth-child(3), html body.mt-ds:not(.mt-tv):not(.home-entry) .stats .stat:nth-child(5) { background-color: var(--mt-danger-bg); border-color: var(--mt-danger-line); }
html body.mt-ds:not(.mt-tv):not(.home-entry) .stats .stat:nth-child(4) { background-color: var(--mt-ok-bg); border-color: var(--mt-ok-line); }
html body .stats .stat { color: #13283D; }
/* the application file: a quiet two-column list of label and value instead of one heavy box per field */
html body .detailgrid { gap: 0 24px; }
html body .detail { background: none; border: 0; border-bottom: 1px solid var(--mt-line-soft); border-radius: 0; padding: 9px 2px; line-height: 1.8; }
html body .detail b { display: block; font-size: 12.5px; color: var(--mt-mute); font-weight: 700; margin-bottom: 1px; }
@media (max-width: 640px) {
  html body .detail { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; }
  html body .detail b { flex: 0 0 auto; max-width: 45%; margin: 0; }
  html body .stats { gap: 8px; }
}
/* settings: comfortable fields */
html body main.section textarea { min-height: 120px; line-height: 1.9; }
html body.mt-ds:not(.mt-tv) .cv-chat > .cv-head h2 { color: #fff; }
html body.mt-ds:not(.mt-tv) .cv-chat > .cv-head .cv-role { color: #D3F2EA; }
html body .cv-chat .cv-form textarea { height: 48px; field-sizing: content; }

/* ---- the notification panel, minimal (13.5.13b): one quiet header line, plain rows, hairlines, the actions as quiet text ---- */
html body #mtNotif .mtn-panel { width: min(380px, calc(100vw - 16px)); border-radius: 14px; border: 1px solid #E1E6EC; box-shadow: 0 12px 36px rgba(15,43,70,.16); }
html body #mtNotif .mtn-head { position: relative; flex-wrap: nowrap; min-height: 52px; padding: 10px 16px 10px 52px; border-bottom: 1px solid #EEF1F4; background: #fff; }
html body #mtNotif .mtn-title { flex: 1 1 auto; gap: 6px; align-items: baseline; }
html body #mtNotif .mtn-title b { font-size: 15px; font-weight: 800; color: #13283D; }
html body #mtNotif .mtn-count, html body #mtNotif .mtn-count:not([hidden]) { display: inline; min-height: 0; padding: 0; background: none; color: #5B6B7D; font-size: 13px; font-weight: 600; border-radius: 0; }
html body #mtNotif .mtn-count[hidden] { display: none; }
html body #mtNotif .mtn-head > span { flex: 0 0 auto; margin: 0; flex-wrap: nowrap; }
html body #mtNotif .mtn-head button#mtnAll { height: 32px; padding: 0 6px; color: #1A47AC; background: none; font-size: 13px; font-weight: 600; }
html body #mtNotif .mtn-head button#mtnAll:hover { background: none; text-decoration: underline; text-underline-offset: 3px; }
html body #mtNotif .mtn-head #mtnClose { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; color: #7A8796; border-radius: 50%; }
html body #mtNotif .mtn-head #mtnClose:hover { background: #F1F4F7; color: #13283D; }
html body #mtNotif .mtn-list { padding: 4px 0; }
html body #mtNotif .mtn-day { position: static; padding: 14px 16px 4px; background: none; border: 0; color: #7A8796; font-size: 12px; font-weight: 600; }
html body #mtNotif .mtn-item, html body #mtNotif .mtn-row .mtn-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px 12px 44px; margin: 0; border: 0; background: none; }
html body #mtNotif .mtn-row + .mtn-row .mtn-item { border-top: 1px solid #EEF1F4; }
html body #mtNotif .mtn-item:hover, html body #mtNotif .mtn-item:focus-visible { background: #F7F9FB; }
html body #mtNotif .mtn-item.unread { background: none; }
html body #mtNotif .mtn-item.unread:hover { background: #F7F9FB; }
html body #mtNotif .mtn-ic:not(.mtn-empty .mtn-ic) { display: none; }
html body #mtNotif .mtn-txt { gap: 3px; }
html body #mtNotif .mtn-txt b { font-size: 14px; font-weight: 600; color: #34485C; line-height: 1.6; }
html body #mtNotif .mtn-item.unread .mtn-txt b { font-weight: 800; color: #13283D; }
html body #mtNotif .mtn-txt span { font-size: 13px; color: #4A5A6B; line-height: 1.75; }
html body #mtNotif .mtn-txt small { font-size: 12px; color: #6B7A8B; }
html body #mtNotif .mtn-dot { order: -1; width: 7px; height: 7px; margin: 9px 0 0; background: #1A6FD8; }
html body #mtNotif .mtn-item.unread .mtn-txt { margin-inline-start: 0; }
html body #mtNotif .mtn-item:not(.unread) { padding-inline-start: 33px; }
/* dismiss: a light «×» that appears on hover or focus; on touch screens it stays visible but faint */
html body #mtNotif .mtn-dismiss { left: 8px; top: 10px; width: 30px; height: 30px; min-height: 30px !important; border-radius: 50% !important; color: #8A97A6 !important; opacity: 0; transition: opacity .15s ease, background-color .15s ease; }
html body #mtNotif .mtn-row:hover .mtn-dismiss, html body #mtNotif .mtn-row:focus-within .mtn-dismiss, html body #mtNotif .mtn-dismiss:focus-visible { opacity: 1; }
html body #mtNotif .mtn-dismiss:hover { background: #F1F4F7 !important; color: #A82218 !important; }
@media (hover: none) { html body #mtNotif .mtn-dismiss { opacity: .7; } }
html body #mtNotif .mtn-empty { padding: 40px 16px; gap: 8px; color: #6B7A8B; }
html body #mtNotif .mtn-empty .mtn-ic { background: #F4F6F8; color: #8A97A6; width: 44px; height: 44px; }
html body #mtNotif .mtn-empty b { font-weight: 600; font-size: 14px; color: #4A5A6B; }
/* bottom: two quiet text actions on one line */
html body #mtNotif .mtn-tools { display: flex; justify-content: flex-start; padding: 6px 12px; border-top: 1px solid #EEF1F4; }
html body #mtNotif .mtn-tools:has(+ .mtn-foot:not(:empty)) { border-bottom: 0; }
html body #mtNotif .mtn-list:has(> .mtn-empty) + .mtn-tools { display: none; }
html body #mtNotif .mtn-tools button { height: 34px; padding: 0 6px; background: none; border: 0; color: #8E2A20; font: 600 12.5px/1 "Vazirmatn", Tahoma, sans-serif; cursor: pointer; border-radius: 6px; }
html body #mtNotif .mtn-tools button:hover { text-decoration: underline; text-underline-offset: 3px; }
html body #mtNotif .mtn-foot { flex-direction: row; justify-content: flex-start; flex-wrap: wrap; gap: 4px 10px; padding: 0 12px 8px; border: 0; background: none; font-size: 12px; color: #6B7A8B; }
html body #mtNotif .mtn-foot div { margin: 0 !important; font-size: 12px !important; color: #6B7A8B !important; }
html body #mtNotif .mtn-foot button { height: 34px !important; padding: 0 6px !important; background: none !important; border: 0 !important; color: #1A47AC !important; font: 600 12.5px/1 "Vazirmatn", Tahoma, sans-serif !important; border-radius: 6px; }
html body #mtNotif .mtn-foot button:hover { text-decoration: underline; text-underline-offset: 3px; }
html body #mtNotif .mtn-tools button:focus-visible, html body #mtNotif .mtn-foot button:focus-visible, html body #mtNotif .mtn-head button:focus-visible { outline: 2px solid #1A47AC !important; outline-offset: 1px; }
@media (max-width: 760px) {
  html body #mtNotif .mtn-head { padding-left: 52px; }
  html body #mtNotif .mtn-head #mtnClose { width: 40px; height: 40px; }
  html body #mtNotif .mtn-head button#mtnAll, html body #mtNotif .mtn-tools button, html body #mtNotif .mtn-foot button { height: 40px !important; }
  html body #mtNotif .mtn-dismiss { width: 40px; height: 40px; min-height: 40px !important; top: 6px; }
  html body #mtNotif .mtn-item, html body #mtNotif .mtn-row .mtn-item { padding-left: 52px; }
  html body #mtNotif .mtn-title { flex: 1 1 auto; }
}
html body #mtNotif .mtn-tools { padding: 4px 12px 0; }
html body #mtNotif .mtn-list:not(:has(> .mtn-empty)) + .mtn-tools + .mtn-foot:not(:empty) { padding-top: 0; }
html body #mtNotif .mtn-tools button, html body #mtNotif .mtn-foot button { min-height: 34px !important; }
@media (max-width: 760px) { html body #mtNotif .mtn-tools button, html body #mtNotif .mtn-foot button { min-height: 40px !important; } }
/* v13.5.14 (owner): the number of an earlier invoice in «سوابق ثبت قبلی» opens it; a link look (blue = view, S-1355) */
html body .od-sec button.link { background: none !important; border: 0 !important; box-shadow: none !important; padding: 2px 0 !important; min-height: 0 !important; color: #1D5FA8 !important; text-decoration: underline; text-underline-offset: 3px; font: inherit; font-weight: 700; cursor: pointer; }
html body .od-sec button.link:focus-visible { outline: 2px solid #1D5FA8; outline-offset: 2px; }
/* v13.5.14 r3 (owner, 1405/08/17: «وقتی اسکرول می‌کنیم بالای صفحه فریز شده است… دکمه‌ها جایشان خوب است، فقط فریز نشوند»): in the
   invoice view nothing stays fixed while it scrolls, on any width: not the action buttons, not the title row, not the follow-up form's buttons */
html body dialog:has(.od-sec) .od-actions, html body dialog:has(.od-sec) > .row, html body dialog:has(.od-sec) .form-actions { position: static !important; }
/* v13.5.14 r3 (owner: «هر دو آزاد شوند»): the invoice form (new and edit) keeps nothing fixed either: not the title row, not the summary, not the bar with the save button */
html body dialog:has(.inv-form) > .row, html body .inv-form .inv-bar, html body .inv-bar, html body .inv-summary { position: static !important; }

/* ==================================================================
   v13.5.14 r4 (owner, 1405/08/17): a button's colour is its function
   «در هیچ بخشی وقتی چند دکمه وجود دارد رنگ دکمه‌ها تکراری نباشد… بدون خواندن بر اساس رنگ هم بتوان دکمه درست را انتخاب کرد».
   One class per colour of the owner's table (bg / text / border). The pages pick the class by function: commerce.js `FC` and
   `actionColor`, and the markup of finance.py, app.py and people.py. One function keeps one colour everywhere; inside one group no two
   buttons share a colour (a second button of the same function takes the outline variant). Labels and icons stay; every text pair is
   at least 4.5:1. `:not(#fc-a):not(#fc-b)` lifts these rules above the section hues, the row and toolbar tints and the inline CSS of
   the Python pages. Exempt and untouched: KPI tiles, filter chips, status filters, pagination, date clear, tab bars, the menu drawer.
   ================================================================== */
html body :is(button, a, input, summary).fc-green:not(#fc-a):not(#fc-b) { --fc-bg: #127A55; --fc-fg: #fff; --fc-bd: #127A55; --fc-hv: #0D5F42; --fc-hb: #0D5F42; --fc-ring: #127A55; }
html body :is(button, a, input, summary).fc-green-l:not(#fc-a):not(#fc-b) { --fc-bg: #DDF3E6; --fc-fg: #0D5F42; --fc-bd: transparent; --fc-hv: #C8EBD6; --fc-hb: #0D5F42; --fc-ring: #0D5F42; }
html body :is(button, a, input, summary).fc-green-o:not(#fc-a):not(#fc-b) { --fc-bg: #fff; --fc-fg: #0D5F42; --fc-bd: #2E9A6E; --fc-hv: #EAF7EF; --fc-hb: #0D5F42; --fc-ring: #0D5F42; }
html body :is(button, a, input, summary).fc-yellow:not(#fc-a):not(#fc-b) { --fc-bg: #FFEF9E; --fc-fg: #5C4A00; --fc-bd: transparent; --fc-hv: #FFE57A; --fc-hb: #5C4A00; --fc-ring: #5C4A00; }
html body :is(button, a, input, summary).fc-amber:not(#fc-a):not(#fc-b) { --fc-bg: #FFDFA8; --fc-fg: #7A4A00; --fc-bd: transparent; --fc-hv: #FFD38A; --fc-hb: #7A4A00; --fc-ring: #7A4A00; }
html body :is(button, a, input, summary).fc-orange:not(#fc-a):not(#fc-b) { --fc-bg: #FFD3B5; --fc-fg: #9A3412; --fc-bd: transparent; --fc-hv: #FFC6A0; --fc-hb: #9A3412; --fc-ring: #9A3412; }
html body :is(button, a, input, summary).fc-red:not(#fc-a):not(#fc-b) { --fc-bg: #C8261B; --fc-fg: #fff; --fc-bd: #C8261B; --fc-hv: #A51F16; --fc-hb: #A51F16; --fc-ring: #C8261B; }
html body :is(button, a, input, summary).fc-red-o:not(#fc-a):not(#fc-b) { --fc-bg: #fff; --fc-fg: #B42318; --fc-bd: #D9483B; --fc-hv: #FDECEA; --fc-hb: #B42318; --fc-ring: #B42318; }
html body :is(button, a, input, summary).fc-maroon:not(#fc-a):not(#fc-b), html body button.action-danger:not(#fc-a):not(#fc-b), html body button.act.act-delete:not(#fc-a):not(#fc-b) { --fc-bg: #5E0E0A; --fc-fg: #fff; --fc-bd: #5E0E0A; --fc-hv: #430806; --fc-hb: #430806; --fc-ring: #5E0E0A; }
/* v13.5.14 r4 (rule 7و: a repeated function in one group, the second is outlined): «حذف دائمی» in the product «بیشتر» menu is a maroon outline beside the solid «حذف» */
html body .act-more-menu button.act.act-delete.act-purge:not(#fc-a):not(#fc-b) { --fc-bg: #fff; --fc-fg: #5E0E0A; --fc-bd: #5E0E0A; --fc-hv: #F7E6E5; --fc-hb: #430806; --fc-ring: #5E0E0A; }
html body :is(button, a, input, summary).fc-pink:not(#fc-a):not(#fc-b) { --fc-bg: #FCDDEB; --fc-fg: #9D174D; --fc-bd: transparent; --fc-hv: #F9CBE0; --fc-hb: #9D174D; --fc-ring: #9D174D; }
html body :is(button, a, input, summary).fc-pink-o:not(#fc-a):not(#fc-b) { --fc-bg: #fff; --fc-fg: #9D174D; --fc-bd: #D9629A; --fc-hv: #FDF0F6; --fc-hb: #9D174D; --fc-ring: #9D174D; }
html body :is(button, a, input, summary).fc-magenta:not(#fc-a):not(#fc-b) { --fc-bg: #F6D5FB; --fc-fg: #86198F; --fc-bd: transparent; --fc-hv: #F0C3F7; --fc-hb: #86198F; --fc-ring: #86198F; }
html body :is(button, a, input, summary).fc-purple:not(#fc-a):not(#fc-b) { --fc-bg: #EADCFD; --fc-fg: #5B21B6; --fc-bd: transparent; --fc-hv: #DECBFB; --fc-hb: #5B21B6; --fc-ring: #5B21B6; }
html body :is(button, a, input, summary).fc-indigo:not(#fc-a):not(#fc-b), html body button.act.act-edit:not(#fc-a):not(#fc-b) { --fc-bg: #E0E3FF; --fc-fg: #3730A3; --fc-bd: transparent; --fc-hv: #CFD4FF; --fc-hb: #3730A3; --fc-ring: #3730A3; }
html body :is(button, a, input, summary).fc-indigo-o:not(#fc-a):not(#fc-b) { --fc-bg: #fff; --fc-fg: #3730A3; --fc-bd: #6366F1; --fc-hv: #F0F1FF; --fc-hb: #3730A3; --fc-ring: #3730A3; }
html body :is(button, a, input, summary).fc-blue:not(#fc-a):not(#fc-b), html body button.act.act-new:not(#fc-a):not(#fc-b) { --fc-bg: #1D5FA8; --fc-fg: #fff; --fc-bd: #1D5FA8; --fc-hv: #164A85; --fc-hb: #164A85; --fc-ring: #1D5FA8; }
html body :is(button, a, input, summary).fc-blue-l:not(#fc-a):not(#fc-b) { --fc-bg: #DCEBFC; --fc-fg: #144E8C; --fc-bd: transparent; --fc-hv: #C8DFFA; --fc-hb: #144E8C; --fc-ring: #144E8C; }
html body :is(button, a, input, summary).fc-blue-o:not(#fc-a):not(#fc-b) { --fc-bg: #fff; --fc-fg: #144E8C; --fc-bd: #4F86C6; --fc-hv: #EEF5FD; --fc-hb: #144E8C; --fc-ring: #144E8C; }
html body :is(button, a, input, summary).fc-sky:not(#fc-a):not(#fc-b) { --fc-bg: #D5F1FC; --fc-fg: #075985; --fc-bd: transparent; --fc-hv: #BFE8F9; --fc-hb: #075985; --fc-ring: #075985; }
html body :is(button, a, input, summary).fc-turq:not(#fc-a):not(#fc-b), html body button.act.b-primary:not(#fc-a):not(#fc-b) { --fc-bg: #D9F5F7; --fc-fg: #0E6170; --fc-bd: transparent; --fc-hv: #C3EDF1; --fc-hb: #0E6170; --fc-ring: #0E6170; }
html body :is(button, a, input, summary).fc-turq-o:not(#fc-a):not(#fc-b) { --fc-bg: #fff; --fc-fg: #0E6170; --fc-bd: #2AA3B3; --fc-hv: #EBF8F9; --fc-hb: #0E6170; --fc-ring: #0E6170; }
html body :is(button, a, input, summary).fc-teal:not(#fc-a):not(#fc-b) { --fc-bg: #0F5F5C; --fc-fg: #fff; --fc-bd: #0F5F5C; --fc-hv: #0A4744; --fc-hb: #0A4744; --fc-ring: #0F5F5C; }
html body :is(button, a, input, summary).fc-teal-o:not(#fc-a):not(#fc-b) { --fc-bg: #fff; --fc-fg: #0F5F5C; --fc-bd: #2C8C86; --fc-hv: #E8F4F3; --fc-hb: #0F5F5C; --fc-ring: #0F5F5C; }
html body :is(button, a, input, summary).fc-olive:not(#fc-a):not(#fc-b) { --fc-bg: #E9F0C7; --fc-fg: #4A5A0E; --fc-bd: transparent; --fc-hv: #DDE7AF; --fc-hb: #4A5A0E; --fc-ring: #4A5A0E; }
html body :is(button, a, input, summary).fc-brown:not(#fc-a):not(#fc-b) { --fc-bg: #EEDFCE; --fc-fg: #6B4423; --fc-bd: transparent; --fc-hv: #E5D0B8; --fc-hb: #6B4423; --fc-ring: #6B4423; }
html body :is(button, a, input, summary).fc-brown-o:not(#fc-a):not(#fc-b) { --fc-bg: #fff; --fc-fg: #6B4423; --fc-bd: #A07850; --fc-hv: #F8F1EA; --fc-hb: #6B4423; --fc-ring: #6B4423; }
html body :is(button, a, input, summary).fc-grey:not(#fc-a):not(#fc-b) { --fc-bg: #E4E6E9; --fc-fg: #3F4650; --fc-bd: transparent; --fc-hv: #D5D9DE; --fc-hb: #3F4650; --fc-ring: #3F4650; }
html body :is(button, a, input, summary).fc-grey-d:not(#fc-a):not(#fc-b) { --fc-bg: #4B5563; --fc-fg: #fff; --fc-bd: #4B5563; --fc-hv: #374151; --fc-hb: #374151; --fc-ring: #4B5563; }
html body :is(button, a, input, summary).fc-navy-o:not(#fc-a):not(#fc-b) { --fc-bg: #fff; --fc-fg: #1E3A5F; --fc-bd: #4A6A8F; --fc-hv: #EDF2F7; --fc-hb: #1E3A5F; --fc-ring: #1E3A5F; }
html body :is(button, a, input, summary).fc-plain:not(#fc-a):not(#fc-b) { --fc-bg: #fff; --fc-fg: #334155; --fc-bd: #CBD5E1; --fc-hv: #F3F5F8; --fc-hb: #334155; --fc-ring: #334155; }
/* the product rows keep their markup (.act-edit / .act-delete / .act-new / .act.b-primary) and take the same vocabulary */
html body :is(button, a, input, summary):is(.fc-green, .fc-green-l, .fc-green-o, .fc-yellow, .fc-amber, .fc-orange, .fc-red, .fc-red-o, .fc-maroon, .fc-pink, .fc-pink-o, .fc-magenta, .fc-purple, .fc-indigo, .fc-indigo-o, .fc-blue, .fc-blue-l, .fc-blue-o, .fc-sky, .fc-turq, .fc-turq-o, .fc-teal, .fc-teal-o, .fc-olive, .fc-brown, .fc-brown-o, .fc-grey, .fc-grey-d, .fc-navy-o, .fc-plain):not(#fc-a):not(#fc-b), html body button.action-danger:not(#fc-a):not(#fc-b), html body button.act.act-delete:not(#fc-a):not(#fc-b), html body button.act.act-edit:not(#fc-a):not(#fc-b), html body button.act.act-new:not(#fc-a):not(#fc-b), html body button.act.b-primary:not(#fc-a):not(#fc-b) {
  background: var(--fc-bg) !important; color: var(--fc-fg) !important; border: 1px solid var(--fc-bd) !important;
  box-shadow: none !important; text-decoration: none !important; font-weight: 700 !important;
}
html body :is(button, a, input, summary):is(.fc-green, .fc-green-l, .fc-green-o, .fc-yellow, .fc-amber, .fc-orange, .fc-red, .fc-red-o, .fc-maroon, .fc-pink, .fc-pink-o, .fc-magenta, .fc-purple, .fc-indigo, .fc-indigo-o, .fc-blue, .fc-blue-l, .fc-blue-o, .fc-sky, .fc-turq, .fc-turq-o, .fc-teal, .fc-teal-o, .fc-olive, .fc-brown, .fc-brown-o, .fc-grey, .fc-grey-d, .fc-navy-o, .fc-plain):not(#fc-a):not(#fc-b):hover:not(:disabled), html body button.action-danger:not(#fc-a):not(#fc-b):hover:not(:disabled), html body button.act.act-delete:not(#fc-a):not(#fc-b):hover:not(:disabled), html body button.act.act-edit:not(#fc-a):not(#fc-b):hover:not(:disabled), html body button.act.act-new:not(#fc-a):not(#fc-b):hover:not(:disabled), html body button.act.b-primary:not(#fc-a):not(#fc-b):hover:not(:disabled) { background: var(--fc-hv) !important; border-color: var(--fc-hb) !important; color: var(--fc-fg) !important; }
html body :is(button, a, input, summary):is(.fc-green, .fc-green-l, .fc-green-o, .fc-yellow, .fc-amber, .fc-orange, .fc-red, .fc-red-o, .fc-maroon, .fc-pink, .fc-pink-o, .fc-magenta, .fc-purple, .fc-indigo, .fc-indigo-o, .fc-blue, .fc-blue-l, .fc-blue-o, .fc-sky, .fc-turq, .fc-turq-o, .fc-teal, .fc-teal-o, .fc-olive, .fc-brown, .fc-brown-o, .fc-grey, .fc-grey-d, .fc-navy-o, .fc-plain):not(#fc-a):not(#fc-b):focus-visible, html body button.action-danger:not(#fc-a):not(#fc-b):focus-visible, html body button.act.act-delete:not(#fc-a):not(#fc-b):focus-visible, html body button.act.act-edit:not(#fc-a):not(#fc-b):focus-visible, html body button.act.act-new:not(#fc-a):not(#fc-b):focus-visible, html body button.act.b-primary:not(#fc-a):not(#fc-b):focus-visible { outline: 2px solid var(--fc-ring) !important; outline-offset: 2px !important; }
/* a toggle of this vocabulary (e.g. «نرخ‌های فعال کالاها» / «سوابق قیمت و پورسانت») shows its pressed state with a ring, not a colour swap */
html body :is(button, a, input, summary):is(.fc-green, .fc-green-l, .fc-green-o, .fc-yellow, .fc-amber, .fc-orange, .fc-red, .fc-red-o, .fc-maroon, .fc-pink, .fc-pink-o, .fc-magenta, .fc-purple, .fc-indigo, .fc-indigo-o, .fc-blue, .fc-blue-l, .fc-blue-o, .fc-sky, .fc-turq, .fc-turq-o, .fc-teal, .fc-teal-o, .fc-olive, .fc-brown, .fc-brown-o, .fc-grey, .fc-grey-d, .fc-navy-o, .fc-plain):not(#fc-a):not(#fc-b)[aria-pressed="true"], html body button.action-danger:not(#fc-a):not(#fc-b)[aria-pressed="true"], html body button.act.act-delete:not(#fc-a):not(#fc-b)[aria-pressed="true"], html body button.act.act-edit:not(#fc-a):not(#fc-b)[aria-pressed="true"], html body button.act.act-new:not(#fc-a):not(#fc-b)[aria-pressed="true"], html body button.act.b-primary:not(#fc-a):not(#fc-b)[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--fc-ring) !important; }

/* ==================================================================
   v13.5.14 r4 (owner, 1405/08/17: «فقط فونت‌ها کمی خواناتر و بهتر بشه»): type, globally and modestly
   Same Vazirmatn face (Tahoma/Arial fallback). One step larger body and table text, a calmer Persian line height, no text thinner
   than regular, darker secondary text, nothing under 13px on a desktop or a phone, and table numbers in fixed-width figures.
   Before: body 14px / 1.7, tables 14px, heads and labels 13px, small max(12px,.86em), xs 12px, mute #4A5A6B, ink-2 #34485C.
   ================================================================== */
html:root { --mt-fs: 15px; --mt-fs-sm: 13.5px; --mt-fs-xs: 13px; --mt-mute: #3E4D5E; --mt-ink-2: #2A3C4F; }
/* screens only: the print views keep their own plain sizes */
@media screen {
html body.mt-ds:not(.mt-tv):not(.home-entry) { font-size: 15px; line-height: 1.8; font-weight: 400; text-rendering: optimizeLegibility; font-kerning: normal; }
html body.mt-ds:not(.mt-tv):not(.home-entry) table { font-size: 14.5px; }
html body.mt-ds:not(.mt-tv):not(.home-entry) table td { line-height: 1.65; font-variant-numeric: tabular-nums lining-nums; }
html body.mt-ds:not(.mt-tv):not(.home-entry) table th { font-size: 13.5px !important; }
html body.mt-ds:not(.mt-tv):not(.home-entry) label { font-size: 13.5px; }
html body.mt-ds:not(.mt-tv):not(.home-entry) small { font-size: max(13px, .86em); }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.muted, .pf-muted, .ext-note, .hint, small.hint, .mt-help-line) { color: var(--mt-mute); }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="submit"]), select, textarea) { font-size: 15px; }
html body.mt-ds:not(.mt-tv):not(.home-entry) :is(.od-dl dt, .mt-kpi > small, .kpi small, .stat small) { color: var(--mt-mute); }
/* the small print that was 10.5 to 12.5px: 13px (count dots on icons keep their size) */
html body :is(.hint, .in-unit > i, details.help > div, .mt-h small, .mt-panel > h2 small, .mt-unit, .mt-kpi > small, .mt-kpi > span,
  .mt-kpis-2, .mt-chart figcaption, .mt-chart-legend, .mt-tip, .mt-chart-table summary, .mt-tag, .tgt-state, .g-n, .fm-stat > small,
  .mt-status, .badge, .ubadge, .ext-badge, .acc-badge, .pf-badge, .acc-hint, .acc-pw, .acc-hist, .acc-ext small, .ext-chip, .ext-sm,
  .oc-side .muted, .eyebrow, .delta, .absent-badge, .status-card small, .plist button small, .cv-chat .cv-role, .cv-chat .cv-foot,
  .cv-when, .cv-chat .cv-reply-btn, .cv-day span, #mtNotif .mtn-day, #mtNotif .mtn-txt small, #mtNotif .mtn-item small,
  #mtNotif .mtn-dismiss, #mtNotif .mtn-foot, #mtNotif .mtn-foot button, #mtNotif .mtn-foot div, .detail b, .fin-home small,
  .fin-home .fin-home-kpis span, .fin-home .fin-home-grade span, .kgrid .kpi b + small, .entry-note, .tabs a) { font-size: 13px !important; }
html body .mt-rt-t thead th { font-size: 13.5px !important; }
html body :is(.mt-rt-t td, .inv-table td)::before { font-size: 13px !important; }
html body.mt-tv :is(small, .tv-rank-sub) { font-size: 13px !important; }
@media (max-width: 760px) {
  html body.mt-ds:not(.mt-tv):not(.home-entry) { font-size: 15px; line-height: 1.75; }
  html body.mt-ds:not(.mt-tv):not(.home-entry) table { font-size: 14px; }
  /* 16px keeps iOS from zooming into a field */
  html body.mt-ds:not(.mt-tv):not(.home-entry) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="submit"]), select, textarea) { font-size: 16px; }
}
}
/* v13.5.14 r3: with the larger text the chat hub's single column took its content's minimum width and pushed the page 7px sideways at
   390px wide and 150% zoom; the column may shrink and its cards wrap instead */
@media (max-width: 860px) { html body .cv-hub { grid-template-columns: minmax(0, 1fr); } html body .cv-hub > *, html body .cv > * { min-width: 0; } }

/* ==== v13.5.16 (owner, live review 1405/08/18; release/ui_upgrade/LIVE_REVIEW_v13_5_15_FA.md): button layout, menus, empty states ==== */
/* «کالا و نرخ»: view tabs on one side, the two create actions on the other; names on one line; one even action line per row */
html body .cat-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
html body .cat-views, html body .cat-new { display: inline-flex; flex-wrap: wrap; gap: 8px; }
html body .cat-name { white-space: nowrap; font-weight: 700; }
html body :is(.cat-com, .cat-valid) { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
html body :is(.cat-com, .cat-valid) small { color: var(--mt-ink-2); font-size: 13px; margin-inline-end: 4px; }
html body td:has(> .act-group) { min-width: 360px; }
html body .act-group { flex-wrap: nowrap; align-items: flex-start; }
html body .act-group > .act-more { margin: 0; align-self: flex-start; }
html body .act-group > .act-more > summary { min-height: var(--mt-row-btn, 36px); margin: 0; }
html body .act-group button.act.act-delete { margin-inline-start: 0; }
html body .act-more-menu { flex-direction: column; align-items: stretch; }
html body .act-more-menu button.act { justify-content: flex-start; }
@media (max-width: 760px) {
  html body .act-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  html body .act-group button.act, html body .act-group button.act:first-child { flex: none; width: 100%; }
  html body .act-more > summary { width: 100%; justify-content: center; box-sizing: border-box; }
  html body .act-more[open] { grid-column: 1 / -1; }
  html body .act-more-menu { flex-direction: row; }
  html body .act-more-menu button.act { flex: 1 1 0; justify-content: center; }
  html body td:has(> .act-group) { min-width: 0; }
  html body .cat-bar { align-items: stretch; }
  html body :is(.cat-views, .cat-new) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
}
/* the invoice view keeps nothing fixed (BUSINESS_RULES 7و): the items table header scrolls with its rows inside the dialog too */
html body dialog :is(.mt-rt-t, table) thead th { position: static !important; top: auto !important; }
/* the invoice view: the everyday actions in labelled groups (status / editing / print), one line each */
html body .od-act-routine { flex-direction: column; align-items: stretch; gap: 8px; }
html body .od-act-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
html body .od-act-cap { flex: 0 0 96px; color: var(--mt-ink-2); font-size: 13px; font-weight: 700; }
@media (max-width: 640px) { html body .od-act-cap { flex-basis: 100%; } }
/* invoice search: search field, «جست‌وجو», «پاک کردن» and «فیلترها» together; outputs in their own quieter row */
html body .flt-out { display: flex; justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--mt-line); }
html body .mflt-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-inline-start: 6px; border-radius: 10px; background: var(--mt-section, #0B6A93); color: #fff; font-size: 13px; }
@media (min-width: 761px) {
  html body #filters:not(.open) .flt-out { order: 4; flex-basis: 100%; }
  html body #filters.open p.row { justify-content: flex-start; }
}
@media (max-width: 760px) { html body .flt-out { justify-content: stretch; } html body .flt-out .mt-more { width: 100%; } }
/* «پیش‌واریزی»: decisions first, «جزئیات» last, on an even two-column grid; «بایگانی»: both actions on one line */
html body .dp-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; min-width: 230px; }
html body .dp-acts > button { width: 100%; justify-content: center; white-space: nowrap; }
html body .arc-acts { display: flex; flex-wrap: nowrap; gap: 6px; }
html body td:has(> .arc-acts) { min-width: 240px; }
/* «حساب پنل فروشنده»: the main action first, the deactivation set apart at the end (DOM order and colours unchanged) */
html body .acc-acts form:has(button.fc-teal) { order: -1; }
html body .acc-acts form:has(button.warn), html body .acc-acts form:has(button.ok), html body .acc-acts .access-archive { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--mt-line); }
/* seller panel: the print button is a button, not a bar over the page title; the show button sits beside the dates */
html body .mt-print-bar .mt-print-btn { width: auto; margin-top: 0; display: inline-flex; }
@media (min-width: 641px) { html body .sp-go { width: auto; min-width: 160px; } }
html body .sp-narrow { max-width: 680px; }
html body .sp-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
html body .sp-quick .btn { width: auto; margin: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; }
@media (max-width: 640px) { html body .sp-quick .btn { flex: 1 1 0; justify-content: center; } }
/* sales dashboard: every key-figure tile the same height, «مشاهده فاکتورها» on one baseline */
html body .acards { grid-auto-rows: 1fr; }
html body .acards .kpi-link { height: 100%; }
html body .acards .kpi-go { margin-top: auto; }
/* a zero amount reads as a digit (the Persian zero is a small dot) */
html body .money.is-zero { font-weight: 900; font-size: 1.12em; }
/* an empty message list says so */
html body .mt-empty-line { margin: 10px 0 0; color: var(--mt-ink-2); }
/* the file chooser in Persian; the real input stays on top (keyboard, screen reader, drag and drop) */
html body .mt-file-ui { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 4px 4px 12px; border: 1px dashed var(--mt-line); border-radius: 10px; background: #fff; }
html body .mt-file-ui > input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
html body .mt-file-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 8px; background: var(--mt-bg, #F2F5F8); color: var(--mt-ink); font-weight: 700; font-size: 13px; white-space: nowrap; }
html body .mt-file-names { color: var(--mt-ink-2); font-size: 13px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; min-width: 0; }
html body .mt-file-ui:focus-within { box-shadow: var(--mt-focus, 0 0 0 3px rgba(11,106,147,.35)); }
