/* ============================================================================
   components.css — پوسته و الگوهای صفحهٔ پنل. فقط توکن‌های tokens.css را می‌خواند.
   اجزای Material (دکمه، فیلد، سلکت، چک‌باکس، سوییچ، زبانه، دیالوگ) در mui.css‌اند
   و جدول در grid.css؛ این‌جا تکرار نمی‌شوند.

   ترتیب: ۱ پایه · ۲ آیکن · ۳ پوسته · ۴ سطح و تایپوگرافی · ۵ نمایش
          ۶ لایه‌ها (هشدار، منو، اعلان، لودر، لودینگ) · ۷ الگوها · ۸ واکنش‌گرا
   ============================================================================ */

/* ══ ۱. پایه ══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; background: var(--canvas); color: var(--text); font-family: var(--font); font-size: var(--fs-body); line-height: 21px; letter-spacing: -.05px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6, p { margin: 0; font-weight: normal; }
:focus { outline: none; }
/* فوکوسِ صفحه‌کلید: دکمه‌های Material موجِ تپنده دارند (mui.js)؛ بقیه یک خطِ آبی */
:where(a, .acc-sum, .ad-cmd > button, .m-tab, [tabindex]:not(.select, .m-item)):focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: var(--radius); }
.topbar :focus-visible { outline-color: #fff; }
.ltr { direction: ltr; unicode-bidi: plaintext; }
.preload, .preload * { transition: none !important; }

/* ══ ۲. آیکن — Material Design Icons (mdi-material-ui در پنلِ قدیمی) ══════ */
.ico { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: var(--icon); height: var(--icon); font-size: var(--icon); line-height: 1; }
.ico::before { font: normal normal normal var(--icon)/1 "Material Design Icons"; }
.ico.s18, .ico.s18::before { width: 18px; height: 18px; font-size: 18px; }
.ico.s24, .ico.s24::before { width: 24px; height: 24px; font-size: 24px; }

/* ── مقیاسِ ۹۰٪ (--zoom): پوسته، دیالوگ، منو، تول‌تیپ و اعلان کوچک می‌شوند.
   منوهای خودِ DevExtreme عمداً بیرونِ مقیاس‌اند: جایشان را از اندازهٔ دیدنی حساب می‌کنند و با zoom جابه‌جا می‌افتادند. */
.shell, .m-dlg, .m-menu, .m-menu-back, .m-tip, .snacks { zoom: var(--zoom); }
.lg-card { zoom: .9; }                           /* کارتِ ورود همان ۹۰٪ِ کیت می‌ماند */
.m-menu-back { zoom: 1; }
.shell .m-dlg { zoom: 1; }                       /* دیالوگی که داخلِ پوسته (کامپوننتِ Livewire) مانده، zoom را از پوسته دارد؛ دوبار کوچک نشود */

/* ══ ۳. پوسته (قالبِ ۱.۱) ══════════════════════════════════════════════════
   نوارِ بالا گرادیانِ برند؛ سایدبار روشن با کارتِ کاربر و منوی قرصی؛ گوشهٔ
   داخلیِ سایدبار گرد است و نوارِ بالا زیرِ آن ادامه دارد تا آبی پشتِ گوشه دیده شود. */
.topbar { position: fixed; top: 0; inset-inline-start: 0; z-index: 1100; width: 100%; height: var(--topbar-h);
  display: flex; align-items: center; padding: 0 var(--space-3); background: var(--primary); color: #fff;
  box-shadow: 0 2px 10px color-mix(in oklab, var(--primary) 30%, transparent);
  transition: margin 195ms var(--ease), width 195ms var(--ease), padding 195ms var(--ease); }
/* عرض با دو لبه (نه 100vw): 100vw نوارِ اسکرول را هم می‌شمارد و در RTL انتهای نوار و آواتار زیرِ اسکرول‌بار می‌رفت */
.topbar { width: auto; inset-inline-end: 0; }
.is-pinned .topbar { margin-inline-start: var(--sidebar-w); }
.topbar .tb-head { display: flex; flex-direction: column; justify-content: center; min-width: 0; margin-inline-start: var(--space-3); line-height: 1.25; }
.topbar .title { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; font-size: 19px; font-weight: bold; white-space: nowrap; }
.topbar .title a { color: #fff; opacity: .8; text-decoration: none; transition: opacity var(--dur-2) var(--ease); }
.topbar .title a:hover { opacity: 1; text-decoration: underline; }
.topbar .title .sep { margin: 0 8px; opacity: .6; font-weight: normal; }
.topbar .actions { flex: 0 0 auto; display: flex; justify-content: flex-end; align-items: center; gap: 2px; margin-inline-start: 12px; }

/* رفتن به صفحه (Ctrl+K): روی آبی نیمه‌شفاف، با فوکوس سفید */
.tb-find { position: relative; flex: 0 1 280px; min-width: 0; margin-inline-start: auto; }
.tb-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; box-sizing: border-box; border: 1px solid transparent;
  border-radius: var(--radius); background: rgba(255, 255, 255, .14); color: #fff; cursor: text;
  transition: background-color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.tb-search:hover { background: rgba(255, 255, 255, .2); }
.tb-search .ico, .tb-search .ico::before { width: 18px; height: 18px; font-size: 18px; }
.tb-search input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; color: inherit; font: 13px var(--font); }
.tb-search input::-webkit-search-cancel-button { display: none; }
.tb-search input::placeholder { color: rgba(255, 255, 255, .78); opacity: 1; }
.tb-search kbd { flex: 0 0 auto; padding: 0 5px; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8);
  font: 10px/14px var(--font); direction: ltr; white-space: nowrap; }
.tb-search:focus-within { background: #fff; border-color: #fff; color: var(--text); box-shadow: var(--shadow-2); }
.tb-search:focus-within .ico { color: var(--primary); }
.tb-search:focus-within input::placeholder { color: rgba(0, 0, 0, .45); }
.tb-search:focus-within kbd { display: none; }
.topbar .tb-search :focus-visible { outline: 0; }
.tb-results { position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 2; max-height: 360px; overflow-y: auto; padding: 6px 0;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-8); color: var(--text); }
.tb-results[hidden] { display: none; }
.tb-opt { display: flex; align-items: center; gap: 12px; padding: 8px 14px; color: var(--text); text-decoration: none; font-size: 13px; }
.tb-opt:hover { background: var(--action-hover); text-decoration: none; }
.tb-opt.is-cur { background: rgba(0, 147, 255, .08); color: var(--primary); }
.tb-opt .ico { color: var(--text-2); } .tb-opt.is-cur .ico { color: var(--primary); }
.tb-opt .ico, .tb-opt .ico::before { width: 20px; height: 20px; font-size: 20px; }
.tb-opt .t { flex: 1 1 auto; }
.tb-opt .g { color: var(--text-2); font-size: 11px; }
.tb-none { padding: 12px 16px; color: var(--text-2); font-size: 13px; }

/* کاربر: فقط آواتار با حلقهٔ سفید (نام در سایدبار و منو هست)؛ منوی «حساب و تنظیمات» (پین، تمام‌صفحه، خروج) */
.tb-user { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-inline: 4px 2px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: #fff; cursor: pointer; transition: background-color var(--dur-2) var(--ease); }
.tb-user:hover, .tb-user[aria-expanded="true"] { background: rgba(255, 255, 255, .14); }
.tb-av { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 30px; height: 30px; overflow: hidden; border-radius: 50%;
  background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); font-size: 13px; font-weight: bold; }
.tb-av img { width: 100%; height: 100%; object-fit: cover; }   /* عکس بی حلقهٔ بیرونی؛ خطِ داخلیِ ظریف فقط برای حرفِ اول */
.topbar .tb-av:has(img) { box-shadow: none; }
.popover .pop-user { display: flex; align-items: center; gap: 12px; padding: 6px var(--space-4) 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.popover .pop-user .tb-av { width: 40px; height: 40px; background: var(--primary); color: #fff; box-shadow: none; font-size: 16px; }
.popover .pop-user .name { font-weight: bold; font-size: 14px; }
.popover .pop-user .sub { color: var(--text-2); font-size: 12px; }
.popover hr { margin: 4px 0; border: 0; border-top: 1px solid var(--border); }
.popover button.item { width: 100%; border: 0; background: none; font: inherit; text-align: start; cursor: pointer; }
.popover button.item:hover { background: var(--action-hover); }
.popover .item.danger { color: var(--danger); }
.popover .item.danger .nav-ico { color: var(--danger); }
#pop-theme { min-width: 260px; }
.topbar .m-ibtn { color: #fff; }
.topbar .m-ibtn:hover { background: rgba(255, 255, 255, .12); }

/* سایدبار */
.sidebar { position: fixed; top: 0; inset-inline-start: 0; z-index: 1200; width: var(--sidebar-w); height: calc(100vh / var(--zoom));
  display: flex; flex-flow: column; overflow: hidden; background: var(--paper); border-inline-end: 1px solid var(--border);
  box-shadow: 0 0 20px rgba(16, 40, 90, .06); transition: transform 195ms var(--ease); }
.shell:not(.is-pinned) .sidebar { transform: translateX(100%); }
[dir="ltr"] .shell:not(.is-pinned) .sidebar { transform: translateX(-100%); }

/* کارتِ هویت: کسب‌وکار و کاربر در یک کارت، روی **یک سطحِ پیوسته** (نه جلدِ جدا با لبه): رنگِ برند از بالا آرام
   به سفید می‌رسد، لوگوی کامل بالا، آواتار و نام زیرش، همه روی یک محور. نشانهٔ بزرگِ خیلی کم‌رنگ فقط بافتِ گوشه است.
   اصولِ لوگو: حریمِ خالیِ دورش ≥ نصفِ ارتفاعِ نشانه، نشانه پیش از نوشته (چپ‌به‌راست، مثلِ خودِ لوگو)،
   ارتفاعِ نوشته ≈ ۰٫۵۵ نشانه تا هم‌وزن دیده شوند. */
.usermenu { position: relative; flex-shrink: 0; overflow: hidden; padding: 22px 16px 18px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--primary) 7%, #fff), var(--paper) 78%); border-bottom: 1px solid var(--nav-line); }
.id-cover { display: flex; justify-content: center; }
.id-water { position: absolute; top: -14px; inset-inline-end: -30px; height: 130px; width: auto; opacity: .045; transform: rotate(-12deg); pointer-events: none; }
.id-logo { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; height: 32px; direction: ltr; text-decoration: none; }
.id-logo:hover { text-decoration: none; }
.id-logo .b-mark { height: 30px; width: auto; }
.id-logo .b-word { height: 16.5px; width: auto; }
/* کارتِ هویتِ ۱.۱۱ (همان پنلِ تاکینو): نشانه + نامِ لاتین روی هم، زیرش کارتِ برجستهٔ مدیر که به پروفایل می‌رود */
.usermenu.pk-id { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 14px 12px;
  background: linear-gradient(180deg, #eef7ff, var(--paper) 85%); }
.pk-id-logo { display: flex; direction: ltr; align-items: center; gap: 6px; text-decoration: none !important; }
.pk-id-logo img { width: 52px; height: auto; transition: transform .25s; }
.pk-id-logo:hover img { transform: scale(1.06) rotate(-4deg); }
.pk-id-word { position: relative; top: .125em; font: 800 32px/1 var(--font); letter-spacing: -1px; color: #0a84f0; }
.pk-id-word span { color: #ff6a00; }
.pk-id-card { align-self: stretch; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px;
  background: var(--paper); box-shadow: 0 1px 2px rgba(16,40,90,.08), 0 8px 22px rgba(16,40,90,.12); color: var(--text); text-decoration: none !important; transition: box-shadow .2s, transform .2s; }
a.pk-id-card:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(16,40,90,.1), 0 12px 28px rgba(16,40,90,.16); }
.pk-id-av { width: 36px; height: 36px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(160deg, #0093ff, #0067d6); color: #fff; font-weight: 700; }
.pk-id-av img { width: 100%; height: 100%; object-fit: cover; }
.pk-id-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pk-id-who b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-id-who small { font-size: 12px; color: var(--text-2); }
.pk-id-card > .ico { color: var(--text-2); }
/* منوی کاربر: ردیف‌ها متن‌اند، نه پیوند */
.popover a.item { color: var(--text); text-decoration: none; }
.popover a.item:hover { background: var(--action-hover); }
.usermenu .row { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; text-align: center; }
.usermenu .av { width: 62px; height: 62px; background: linear-gradient(160deg, #8496b0, #5f718c);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--primary), 0 6px 14px rgba(16, 40, 90, .16); }
.usermenu .av .ico, .usermenu .av .ico::before { width: 30px; height: 30px; font-size: 30px; }
.usermenu .name { font-size: 14px; font-weight: bold; color: var(--text); }

.nav { flex: 1; overflow-y: auto; padding: 0 0 12px; margin-bottom: 76px; scrollbar-width: thin; }
/* آکاردئونِ MUI: سرگروهِ تمام‌عرض با زمینهٔ خاکستریِ روشن و خطِ بالا و پایین؛ زیرمنو روی سفید */
.acc { position: relative; }
.acc-sum { position: relative; display: flex; align-items: center; width: 100%; height: 46px; margin: 0; padding: 0 16px 0 10px;
  border: 0; border-top: 1px solid var(--nav-line); border-radius: 0; background: var(--nav-head-bg); cursor: pointer; text-align: start; }
.acc:first-child .acc-sum { border-top: 0; }
.acc:last-child .acc-sum, .acc.is-open .acc-sum { border-bottom: 1px solid var(--nav-line); }
.acc-sum:hover { background: var(--nav-head-hover); }
.acc-sum .grow { flex: 1; display: flex; align-items: center; min-width: 0; }
.acc-sum .nav-ico { min-width: 36px; color: var(--nav-item-ink); }
.acc-sum .nav-ico .ico, .acc-sum .nav-ico .ico::before { width: 24px; height: 24px; font-size: 24px; }
.acc-sum .lbl { font-size: 14px; font-weight: bold; color: var(--text-2); margin: 0; }      /* گروهِ بسته خاکستری، باز تیره (تصویرِ مرجع) */
.acc.is-open .acc-sum .lbl { color: var(--nav-head-ink); }
.acc-sum .exp { padding: 4px; color: var(--nav-item-ink); transition: transform var(--dur-5) var(--ease); }
.acc-sum .exp .ico, .acc-sum .exp .ico::before { width: 20px; height: 20px; font-size: 20px; }
/* گروهِ باز: زمینه همان می‌ماند؛ فقط آیکن و پیکان آبی می‌شوند */
.acc.is-open .acc-sum .exp { transform: rotate(180deg); }
.acc.is-open .acc-sum .nav-ico, .acc.is-open .acc-sum .exp { color: var(--primary); }
/* زیرمنو: ردیف‌های فشرده روی سفید */
.acc-pad { padding: 14px 0 18px; background: var(--paper); }      /* باز/بسته‌شدنِ .acc-det در motion.css */
.nav-ico { min-width: 34px; display: inline-flex; color: var(--nav-item-ink); }
/* آیکن: سرگروه و زیرمنو هر دو همیشه پُر (تصویرِ مرجع) */
.nav-ico:has(.on) .off { display: none; }
.lbl { color: var(--text-2); margin: var(--space-1) 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-item { position: relative; display: flex; align-items: center; height: 34px; margin: 3px 12px; padding-inline: 12px;
  border-radius: var(--radius); text-decoration: none !important; }
.nav-item .lbl { margin: 0; font-size: 13px; font-weight: bold; color: var(--text-2); }
.nav-item .nav-ico { min-width: 34px; color: var(--nav-item-ink); }
.nav-item .nav-ico .ico, .nav-item .nav-ico .ico::before { width: 22px; height: 22px; font-size: 22px; }
.nav-item:hover { background: var(--nav-hover); }
/* صفحهٔ فعال: نوارِ پُرِ آبیِ اصلی، آیکن و برچسبِ سفید (هاور رنگ را تیره نمی‌کند) */
.nav-item.is-active, .nav-item.is-active:hover { background: var(--primary); }
.nav-item.is-active .nav-ico, .nav-item.is-active .lbl { color: #fff; font-weight: bold; }

/* پانویس: دو موجِ همان آبی (پشتی کم‌رنگ‌تر) */
.side-foot { position: absolute; bottom: 0; inset-inline: 0; height: 76px; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 14px; isolation: isolate; color: #fff; font-size: 12px; font-weight: bold; }
.side-foot::before, .side-foot::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--primary);
  -webkit-mask: var(--wave) 0 0 / 100% 100% no-repeat; mask: var(--wave) 0 0 / 100% 100% no-repeat; }
.side-foot::before { opacity: .35;
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 76' preserveAspectRatio='none'%3E%3Cpath d='M0 26C70 4 150 30 280 2V76H0Z'/%3E%3C/svg%3E"); }
.side-foot::after {
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 76' preserveAspectRatio='none'%3E%3Cpath d='M0 30C90 12 170 44 280 16V76H0Z'/%3E%3C/svg%3E"); }
[dir="ltr"] .side-foot::before, [dir="ltr"] .side-foot::after { transform: scaleX(-1); }

/* محتوا */
.content { position: relative; margin-top: var(--topbar-h); min-height: calc(100vh / var(--zoom) - var(--topbar-h)); transition: margin 195ms var(--ease); }
.is-pinned .content { margin-inline-start: var(--sidebar-w); }
.content > main { padding: 20px; }
.backdrop { display: none; }

/* ══ ۴. سطح و تایپوگرافی ═══════════════════════════════════════════════════ */
.paper { position: relative; min-width: 0; background: var(--paper); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.m-dlg { border-radius: var(--radius-card); }
.page { padding: 20px; }
main > * + *, .pk-page > * + * { margin-top: 20px; }       /* .pk-page: ریشهٔ کامپوننتِ Livewire داخلِ main */
.pk-page > .m-scrim { margin: 0; }                          /* دیالوگِ داخلِ کامپوننت فاصلهٔ کارت نمی‌گیرد (fixed است) */
.ad-row { display: grid; gap: 20px; }
.ad-row.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ad-row.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ad-row.c21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.ad-col { display: grid; gap: 20px; align-content: start; min-width: 0; }      /* ستون‌های مستقل: فاصلهٔ عمودی همه‌جا یکی */
.card-h { display: flex; align-items: center; gap: var(--space-2); padding: 16px 20px; border-bottom: 1px solid var(--hairline); }
.card-h > .t-title { flex: 1; }
/* امضای ۱.۴: خطِ کوتاهِ آبی پیش از عنوانِ کارت — همان «لنگرِ راست»ِ RTL، تخت و ۴px نه گرد */
.card-h > .t-title, .paper.page > .t-title { position: relative; padding-inline-start: 11px; }
.card-h > .t-title::before, .paper.page > .t-title::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 3px; height: 14px;
  margin-top: -7px; background: var(--primary); border-radius: 1px; }
.grid-page { display: flex; flex-direction: column; height: calc(100vh / var(--zoom) - var(--topbar-h) - 40px); padding: 20px; }
.grid-page > .ad-grid { flex: 1 1 auto; min-height: 0; }

.t-stat    { font-size: var(--fs-h3); line-height: 28px; font-weight: 500; letter-spacing: -.06px; }
.t-heading { font-size: var(--fs-h4); line-height: 24px; font-weight: 500; letter-spacing: -.06px; }
.t-title   { font-size: var(--fs-h5); line-height: 20px; font-weight: bold; }
.t-body    { font-size: var(--fs-body); line-height: 21px; }
.t-caption { font-size: var(--fs-caption); line-height: 16px; letter-spacing: .3px; color: var(--text-2); }
.t-muted   { color: var(--text-2); }

/* ══ ۵. نمایش ══════════════════════════════════════════════════════════════ */
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 var(--space-2); border-radius: var(--radius-pill);
  background: var(--primary); color: #fff; font-size: var(--fs-caption); font-weight: bold; white-space: nowrap; }
.chip.accent { background: var(--accent); }                     /* شمارشِ «نیاز به توجه» — هم‌خانوادهٔ نشانِ زنگ */

/* برچسبِ وضعیت — زمینهٔ soft، متن به رنگِ خودِ وضعیت */
.tag { display: inline-block; padding: 1px 7px; border-radius: var(--radius); font-size: var(--fs-caption); line-height: 18px; font-weight: bold; white-space: nowrap; }
.tag.success { background: var(--success-soft); color: var(--success); }
.tag.warning { background: var(--warning-soft); color: var(--warning); }
.tag.danger  { background: var(--danger-soft);  color: var(--danger); }
.tag.info    { background: var(--info-soft);    color: var(--info); }
.tag.accent  { background: var(--accent-soft);  color: var(--accent); }
.tag.neutral { background: var(--bg); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }

.av { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
  width: 40px; height: 40px; border-radius: 50%; background: #bdbdbd; color: #fafafa; }
.av.s24 { width: 24px; height: 24px; } .av.s32 { width: 32px; height: 32px; } .av.s80 { width: 80px; height: 80px; }
.av.primary { background: var(--primary); } .av.success { background: var(--success); } .av.warning { background: var(--warning); }
.av.danger { background: var(--danger); } .av.info { background: var(--info); } .av.accent { background: var(--accent); }

.progress { height: 4px; overflow: hidden; border-radius: 3px; background: var(--track); }
.progress > i { display: block; height: 100%; background: var(--primary); }
.progress.accent > i { background: var(--accent); }

/* ══ ۶. لایه‌ها ══════════════════════════════════════════════════════════════ */
/* هشدار و تأیید — UI/DialogBox.jsx: نوارِ ۸pxِ رنگی، Lottie */
.m-dlg.alert { --tone: var(--info); width: 400px; max-width: calc(100% - 32px); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 48px rgba(16, 24, 40, .18), 0 4px 12px rgba(16, 24, 40, .08); }
.m-dlg.alert .m-dlg-content { display: flex; flex-direction: column; align-items: center; padding: 28px 28px 8px; border: 0; text-align: center; }
.m-dlg.alert .anim { width: 72px; height: 72px; margin-bottom: 14px; border-radius: 50%;
  background: color-mix(in oklab, var(--tone) 10%, #fff); box-shadow: 0 0 0 8px color-mix(in oklab, var(--tone) 5%, #fff); }
.m-dlg.alert .anim svg { width: 72px !important; height: 72px !important; }
.m-dlg.alert h3 { margin: 0 0 6px; font-size: 18px; line-height: 28px; font-weight: 700; color: var(--text); }
.m-dlg.alert .t-body { max-width: 320px; font-size: 14px; line-height: 24px; color: var(--text-2); overflow-wrap: anywhere; }
.m-dlg.alert .m-dlg-actions { justify-content: center; gap: 10px; padding: 20px 28px 24px; }
.m-dlg.alert .m-dlg-actions > * { margin: 0 !important; flex: 1 1 0; max-width: 160px; height: 40px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.m-dlg.alert .m-dlg-actions > :only-child { max-width: 200px; }
.m-dlg.alert [data-dlg="cancel"] { border-color: var(--border) !important; color: var(--text) !important; background: #fff !important; }
.m-dlg.alert [data-dlg="cancel"]:hover { background: var(--bg) !important; }
.m-dlg.alert.warning { --tone: var(--warning); }
.m-dlg.alert.error { --tone: var(--danger); } .m-dlg.alert.info, .m-dlg.alert.question { --tone: var(--info); }

/* منوی شناور — UI/Popover.jsx */
.popover { position: fixed; z-index: 1300; min-width: 200px; padding: var(--space-2) 0; background: var(--paper);
  border-radius: var(--radius); box-shadow: var(--shadow-8); }
.popover .item { display: flex; align-items: center; min-height: 40px; padding: 0 var(--space-4); }
.popover .item .grow { flex: 1; }

/* اعلانِ پایینِ صفحه — notistack */
.snacks { position: fixed; bottom: 14px; inset-inline-end: 20px; z-index: 1400; display: grid; gap: 6px; }
.snack { display: flex; align-items: center; gap: var(--space-2); min-width: 288px; min-height: 48px; padding: 6px var(--space-4);
  border-radius: var(--radius); background: #313131; color: #fff; box-shadow: var(--shadow-6); overflow: hidden; }
.snack.success { background: #43a047; } .snack.error { background: #d32f2f; } .snack.info { background: #2196f3; } .snack.warning { background: #ff9800; }
.snack .ico, .snack .ico::before { width: 20px; height: 20px; font-size: 20px; }

/* لودرِ صفحه — public/index.html + scss/loader.scss */
.loader { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; background: #f1f1f1; }
.loader.loaded { visibility: hidden; opacity: 0; }
.loader .pulse { width: 150px; height: 150px; border-radius: 50%; box-shadow: 0 0 0 0 var(--primary);
  background: var(--primary) url("../assets/loader-mark.png") no-repeat 50% 50% / 150px;
  animation: ad-fade 1.2s ease, ad-pulse 1.5s infinite cubic-bezier(.66, 0, 0, 1); }
@keyframes ad-pulse { to { box-shadow: 0 0 0 45px transparent; } }
@keyframes ad-fade { from { opacity: 0; } }

/* لودینگ و خطای روی جدول — UI/Transition.jsx */
.busy { position: absolute; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; background: rgba(255, 255, 255, .9); color: var(--text-2); text-align: center; }
.busy .ico, .busy .ico::before { width: 30px; height: 30px; font-size: 30px; }
.busy .acts { display: flex; gap: var(--space-2); }
.spin { position: relative; width: 32px; height: 32px; }
.spin svg { position: absolute; inset: 0; width: 32px; height: 32px; }
.spin circle { fill: none; stroke: currentColor; stroke-width: 3; }
.spin .track { color: var(--primary-soft); }
.spin .run { color: var(--primary); animation: ad-rot 550ms linear infinite; }
.spin .run circle { stroke-dasharray: 80px, 200px; }
@keyframes ad-rot { to { transform: rotate(360deg); } }

/* ══ ۷. الگوهای صفحه ════════════════════════════════════════════════════ */
.kpi { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); }
.kpi .grow { flex: 1; min-width: 0; }
.kpi .t-stat { font-variant-numeric: tabular-nums; }
/* ۱.۴: آیکنِ KPI کاشیِ کم‌رنگِ ۴px به‌جای دایرهٔ پُرِ اشباع؛ عدد چشم را می‌گیرد، نه آیکن */
.kpi .av, .list .av:is(.primary, .success, .warning, .danger, .info, .accent) {
  border-radius: var(--radius); background: color-mix(in oklab, var(--c) 13%, #fff); color: var(--c); }
.kpi .av { width: 52px; height: 52px; }
.kpi .av .ico, .kpi .av .ico::before { width: 26px; height: 26px; font-size: 26px; color: var(--c); }
.list .av:is(.primary, .success, .warning, .danger, .info, .accent) .ico { color: var(--c); }
.kpi .av, .list .av { --c: var(--text-2); }
:is(.kpi, .list) .av.primary { --c: var(--primary); } :is(.kpi, .list) .av.success { --c: var(--success); }
:is(.kpi, .list) .av.warning { --c: var(--warning); } :is(.kpi, .list) .av.danger { --c: var(--danger); }
:is(.kpi, .list) .av.info { --c: var(--info); } :is(.kpi, .list) .av.accent { --c: var(--accent); }
.delta { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-1); }
.delta .ico, .delta .ico::before { width: 14px; height: 14px; font-size: 14px; }
/* تغییر: قرصِ کوچکِ کم‌رنگ (فلش + درصد)، جدا از توضیح */
.chg { display: inline-flex; align-items: center; gap: 1px; height: 18px; padding: 0 5px 0 4px; border-radius: var(--radius);
  font-weight: bold; font-variant-numeric: tabular-nums; }
.chg.up { background: var(--success-soft); } .chg.down { background: var(--danger-soft); }
.up { color: var(--success); } .down { color: var(--danger); }
.list { margin: 0; padding: var(--space-2) 0; list-style: none; }
.list > li { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-2) var(--space-4); }
.list > li .grow { flex: 1; min-width: 0; }
.list > li .grow > * { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.list .av .ico { color: #fff; }
/* نمودار: ظرف و کارتِ خوانش (adChart) */
.chart-box { position: relative; outline: 0; }
.chart-box:focus-visible { box-shadow: 0 0 0 2px var(--primary); border-radius: var(--radius); }
.chart-tip { position: absolute; top: 4px; z-index: 2; min-width: 128px; padding: 8px 10px; border-radius: var(--radius); background: var(--paper);
  box-shadow: 0 0 0 1px var(--hairline), 0 8px 20px rgba(25, 43, 64, .12); font-size: var(--fs-caption); line-height: 18px; white-space: nowrap; }
.chart-tip b { display: block; margin-bottom: 4px; color: var(--text); font-size: var(--fs-caption); }
.chart-tip .row { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.chart-tip .row i { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.chart-tip .row em { margin-inline-start: auto; padding-inline-start: 12px; color: var(--text); font-style: normal; font-weight: bold; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: var(--space-3); align-items: center; }
.legend > span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-inline-end: 4px; border-radius: 2px; background: var(--c); }
.meter { display: grid; gap: 6px; }
.meter > div:first-child { display: flex; justify-content: space-between; }

/* صفحهٔ رکورد (user.html): سربرگِ پروفایل و فهرستِ کلید/مقدار */
.profile { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); flex-wrap: wrap; }
.profile .meta { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.profile .acts { display: flex; gap: var(--space-2); margin-inline-start: auto; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); margin: 0; padding: 0 var(--space-4); }
.kv > * { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kv dt { color: var(--text-2); }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }
[x-cloak] { display: none !important; }

/* حالتِ خالی: کارت یا جدولی که هنوز داده ندارد — آرام، بی رنگ، وسط */
/* ۱.۴: حالتِ خالی با کاشیِ آیکن، تا «خالی» عمدی دیده شود نه خراب */
.pk-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 112px; padding: var(--space-4);
  color: var(--text-2); font-size: var(--fs-body); text-align: center; }
.pk-empty > .ico { width: 36px; height: 36px; border-radius: var(--radius); background: var(--bg); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--text-2); }
.pk-empty > .ico::before { width: 20px; height: 20px; font-size: 20px; }
.pk-empty > .ico.ok { background: var(--success-soft); box-shadow: none; color: var(--success); }

/* خوش‌آمدِ میزکار (امضای ۱.۴): سلام به وقتِ روز + تاریخِ شمسی، بی کارتِ اضافه */
.pk-hello { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: -4px; }
.pk-hello .t-heading { font-weight: bold; }
.pk-hello .t-caption { font-size: var(--fs-body); }

/* دکمهٔ در حالِ کار (wire:loading.class="is-busy"): برچسب می‌ماند تا عرض نپرد، چرخنده رویش */
.m-btn.is-busy { pointer-events: none; color: transparent !important; }
.m-btn.is-busy::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border: 2px solid currentColor; border-radius: 50%; color: #fff; border-inline-end-color: transparent; animation: ad-rot 700ms linear infinite; }
.m-btn.is-busy:not(.contained)::after, .m-btn.contained.is-busy:not(.primary, .success, .warning, .danger)::after { color: var(--primary); }
/* دکمه با برچسبِ «در حال…» (wire:loading.class="is-loading"): آیکنِ آغاز جایش را به چرخنده می‌دهد و برچسب عوض می‌شود.
   Livewire دکمهٔ submit را در حینِ درخواست disabled می‌کند؛ رنگ همان می‌ماند تا خاکستری نپرد. */
.m-busy { display: none; width: 14px; height: 14px; box-sizing: border-box; border: 2px solid currentColor; border-inline-end-color: transparent;
  border-radius: 50%; animation: ad-rot 700ms linear infinite; }
.m-btn .t-busy { display: none; }
.m-btn.is-loading { pointer-events: none; cursor: progress; }
.m-btn.is-loading .start .ico { display: none; }
.m-btn.is-loading .start .m-busy { display: inline-block; margin: 2px; }
.m-btn.is-loading .t-idle { display: none; }
.m-btn.is-loading .t-busy { display: inline; }
.m-btn.contained.primary.is-loading:disabled { background: var(--primary); color: #fff; box-shadow: var(--shadow-2); }

/* ══ ۸. واکنش‌گرا — Main/index.jsx: زیرِ ۹۶۰ سایدبار موقت می‌شود ═══════ */
@media (max-width: 1279px) { .ad-row.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ad-row.c21 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1199px) { .tb-find { flex-basis: 240px; } }
@media (max-width: 959px) {
  .tb-find { display: none; }
  .topbar .actions { margin-inline-start: auto; }
  .is-pinned .topbar { margin-inline-start: 0; padding-inline-start: var(--space-2); }
  .is-pinned .content { margin-inline-start: 0; }
  .shell.is-open .sidebar { box-shadow: var(--shadow-24); }
  .shell:not(.is-open) .sidebar { transform: translateX(100%); }
  [dir="ltr"] .shell:not(.is-open) .sidebar { transform: translateX(-100%); }
  .shell.is-open .sidebar { transform: none; }
  .ad-row.c2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .ad-row.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { align-items: flex-start; gap: 10px; padding: 12px; }
  .kpi .av { width: 40px; height: 40px; }
  .kpi .av .ico, .kpi .av .ico::before { width: 22px; height: 22px; font-size: 22px; }
  .delta { flex-wrap: wrap; row-gap: 2px; }
  .content > main { padding: var(--space-2); }
}

/* ══ ۹. صفحهٔ ورود — core/auth/login.jsx (۱.۵) ═════════════════════════════
   همان اسکلت: زمینهٔ آبی با مربع‌های شناور، کارتِ سفیدِ دوستونه (نشانه | فرم)، همان فیلدها.
   ریشه زومِ پوسته را ندارد؛ فقط کارت (.lg-card) ۹۰٪ است. حرکت‌ها در motion.css (§۵). */
.lg-root { position: fixed; inset: 0; background: #2c78b9; display: flex; align-items: center; justify-content: center; overflow: hidden; }
/* شبکهٔ نقطه‌ایِ سفید دورِ کارت که به سمتِ لبه‌ها محو می‌شود؛ رنگِ زمینه تخت می‌ماند */
.lg-root::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(rgba(255, 255, 255, .17) 1px, transparent 1.6px) 0 0 / 24px 24px;
  -webkit-mask: radial-gradient(ellipse 62% 58% at 50% 50%, #000 35%, transparent 78%); mask: radial-gradient(ellipse 62% 58% at 50% 50%, #000 35%, transparent 78%); }
.lg-card { position: relative; z-index: 1; width: min(66vw, 880px); min-height: 470px; display: flex; overflow: hidden; background: #fff; border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(10, 40, 80, .08), 0 4px 10px rgba(10, 40, 80, .08), 0 16px 32px rgba(10, 40, 80, .12), 0 40px 80px rgba(10, 40, 80, .16); }

/* ستونِ نشانه: آبیِ خیلی روشن، لوگو وسط با درخششِ سفیدِ نرم و «مدارِ» دو حلقه دورش، تاریخِ امروز پایین */
.lg-brand { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px 72px; isolation: isolate; overflow: hidden;
  background: var(--primary-soft); border-inline-end: 1px solid color-mix(in oklab, var(--primary) 10%, #fff); }
.lg-brand::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(circle at 50% 44%, #fff 0, rgba(255, 255, 255, .7) 22%, rgba(255, 255, 255, 0) 52%); }
/* مدار: دو حلقهٔ مویی؛ روی هر کدام یک نقطه با دنباله‌ای کوتاه آرام می‌چرخد (خلافِ هم). رنگ‌ها rgba ِ همان آبی */
.lg-orbit { position: absolute; top: 50%; left: 50%; z-index: -1; width: 400px; height: 400px; translate: -50% -50%; pointer-events: none; overflow: visible; }
/* «orb» نه «spin»: .spin کلاسِ چرخندهٔ بارگذاری است و به circle خطِ ضخیم می‌داد */
.lg-orbit .ring { fill: none; stroke-width: 1; }
.lg-orbit .r1 { stroke: rgba(0, 147, 255, .16); }
.lg-orbit .r2 { stroke: rgba(0, 147, 255, .09); }
.lg-orbit .orb { transform-box: view-box; transform-origin: 50% 50%; }
.lg-orbit .tail { fill: none; stroke: var(--primary); stroke-width: 1.5; stroke-linecap: round; opacity: .35; }
.lg-orbit .dot { fill: var(--primary); }
.lg-orbit .s2 .dot { opacity: .55; }
.lg-id { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.lg-id .mark { width: 150px; height: auto; }
.lg-id .word { width: 200px; height: auto; }
.lg-tag { font-size: 13px; color: var(--text-2); }
.lg-date { position: absolute; bottom: 22px; inset-inline: 0; width: max-content; margin-inline: auto; display: flex; align-items: center; gap: 6px; height: 28px;
  padding: 0 12px; border-radius: var(--radius); background: #fff; color: var(--text-2); font-size: 12px;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 12%, #fff), 0 2px 6px rgba(10, 40, 80, .05); }
.lg-date .ico, .lg-date .ico::before { width: 16px; height: 16px; font-size: 16px; color: var(--primary); }

/* ستونِ فرم */
.lg-form { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 36px 40px 22px; text-align: center; }
.lg-head { display: flex; flex-direction: column; align-items: center; }
/* آواتار حالتِ فرم را می‌گوید: کاربر ← قفل (روی کلمهٔ عبور) ← قفلِ باز (کلمهٔ عبور نمایان) */
.lg-form .avatar { position: relative; width: 76px; height: 76px; margin-bottom: 14px; background: color-mix(in oklab, var(--primary) 9%, #fff);
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--primary) 4%, #fff); }
.lg-form .avatar .ico { position: absolute; inset: 0; margin: auto; color: var(--primary);
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-5) var(--ease-emph); }
.lg-form .avatar .ico, .lg-form .avatar .ico::before { width: 38px; height: 38px; font-size: 38px; }
.lg-form .avatar .i-lock, .lg-form .avatar .i-open { opacity: 0; transform: scale(.6) rotate(-25deg); }
.lg-form:has(input[autocomplete="current-password"]:focus) .avatar .i-user { opacity: 0; transform: scale(.6) rotate(25deg); }
.lg-form:has(input[autocomplete="current-password"]:focus) .avatar .i-lock { opacity: 1; transform: none; }
.lg-form:has(input[autocomplete="current-password"][type="text"]) .avatar :is(.i-user, .i-lock) { opacity: 0; transform: scale(.6) rotate(25deg); }
.lg-form:has(input[autocomplete="current-password"][type="text"]) .avatar .i-open { opacity: 1; transform: none; }
.lg-hello { font-size: 12px; line-height: 18px; color: var(--text-2); }
.lg-title { margin: 2px 0 0; font-size: 18px; line-height: 28px; font-weight: bold; color: var(--text); }
.lg-form .mobile-logo { display: none; }
/* LoginForm.jsx: spacing = marginTop 16 روی گروه و روی هر فیلد؛ برچسبِ سوییچ ۱۲؛ دکمه تمام‌عرض */
.lg-spacing { margin-top: 8px; text-align: start; }
.lg-spacing > .m-tf { margin-top: 16px; }
.lg-row { display: flex; align-items: center; margin-top: 18px; }
.lg-row .otp { flex: 0 0 58.333%; text-align: start; } .lg-row .otp .m-fcl { margin: 0; font-size: 12px; }
.lg-row .go { flex: 0 0 41.667%; } .lg-row .go .m-btn { width: 100%; height: 34px; }
.lg-row .go .start { margin-inline: -2px 6px; }
[dir="rtl"] .lg-row .go .i-go { transform: scaleX(-1); }    /* فلشِ ورود در راست‌به‌چپ آینه می‌شود */
.lg-row .otp .m-ctl { min-height: 0; padding: 0; }
/* هشدارِ Caps Lock: جایش فقط وقتی روشن است باز می‌شود */
.lg-caps { display: flex; align-items: center; gap: 6px; height: 0; margin-top: 0; overflow: hidden; opacity: 0; font-size: 12px; color: var(--text-2);
  transition: height var(--dur-3) var(--ease), margin var(--dur-3) var(--ease), opacity var(--dur-2) var(--ease); }
.lg-caps.on { height: 20px; margin-top: 6px; opacity: 1; }
.lg-caps .ico, .lg-caps .ico::before { width: 16px; height: 16px; font-size: 16px; color: var(--warning); }
.lg-foot { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--border); font-size: var(--fs-caption); line-height: 20px; color: var(--text-2); }
.lg-foot a { font-weight: bold; }

/* مربع‌های شناورِ زمینه (همان login.jsx)؛ یک‌درمیان توخالی */
.circles { position: absolute; inset: 0; margin: 0; padding: 0; overflow: hidden; z-index: 0; }
.circles li { position: absolute; display: block; list-style: none; width: 20px; height: 20px; background: rgba(255,255,255,.15); animation: lgfloat 25s linear infinite; bottom: -150px; }
.circles li:nth-child(even) { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.circles li:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.circles li:nth-child(2) { left: 10%; animation-delay: 2s; animation-duration: 12s; }
.circles li:nth-child(3) { left: 70%; animation-delay: 4s; }
.circles li:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-duration: 18s; }
.circles li:nth-child(5) { left: 65%; }
.circles li:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 3s; }
.circles li:nth-child(7) { left: 35%; width: 150px; height: 150px; animation-delay: 7s; }
.circles li:nth-child(8) { left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 45s; }
.circles li:nth-child(9) { left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 35s; }
.circles li:nth-child(10) { left: 85%; width: 150px; height: 150px; animation-duration: 11s; }
@keyframes lgfloat { 0% { transform: translateY(0) rotate(0); opacity: 1; border-radius: 0; } 100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; border-radius: 50%; } }
@media (prefers-reduced-motion: reduce) { .circles li { animation: none; display: none; } }
@media (max-width: 959px) {
  .lg-card { width: min(92vw, 420px); min-height: 0; }
  .lg-brand { display: none; }
  .lg-form { padding: 28px 24px 18px; }
  .lg-form .avatar { display: none; }
  .lg-form .mobile-logo { display: block; width: 96px; margin: 0 auto 10px; }
}

/* ── ورودِ ۱.۱۱ (همان پنلِ تاکینو): «مرا به خاطر بسپار» ردیفِ خودش، زیرش دکمهٔ تمام‌عرض با آیکن.
   کارت ۹۰٪ است؛ عددهای زیر بر ۰٫۹ تقسیم شده‌اند تا روی صفحه همان تاکینو شوند (عنوان ۱۸، سلام ۱۲، دکمه ۴۰/۱۴). */
.lg-id .mark { width: 124px; }
.lg-hello { font-size: 13.3px; }
.lg-title { font-size: 20px; }
.lg-spacing > .m-tf { margin-top: 20px; }
.lg-row.lg-remember { margin-top: 16px; }
.lg-row.lg-remember .otp { flex: 1 1 auto; }
.lg-go { margin-top: 22px; }
.lg-go .m-btn { width: 100%; min-height: 44.4px; font-size: 15.5px; font-weight: 600; border-radius: var(--radius);
  box-shadow: 0 2px 7px rgba(0, 147, 255, .25); }
.lg-go .m-btn .start { margin-inline: -2px 8px; }
.lg-go .m-btn .start .ico, .lg-go .m-btn .start .ico::before { width: 20px; height: 20px; font-size: 20px; }
[dir="rtl"] .lg-go .i-go { transform: scaleX(-1); }
/* گوشی: ستونِ نشانه پنهان نمی‌شود؛ نوارِ فشردهٔ لوگو + نام‌واره بالای فرم */
@media (max-width: 959px) {
  .lg-card { flex-direction: column; }
  .lg-brand { display: flex; flex: none; padding: 20px 18px 18px; border-inline-end: 0; border-bottom: 1px solid color-mix(in oklab, #0093ff 10%, #fff); }
  .lg-brand .lg-orbit, .lg-brand .lg-date, .lg-brand .lg-tag { display: none; }
  .lg-id { flex-direction: row; gap: 11px; }
  .lg-id .mark { width: 44px; }
  .lg-id .word { width: auto; height: 18px; }
  .lg-form .avatar { display: flex; }
  .lg-form .mobile-logo { display: none; }
}

/* ── ۱.۹: اجزای صفحهٔ رکورد و فرم‌های مدیریتی ─────────────────────────────── */
/* یادداشتِ درون‌صفحه (فقط‌خواندنی بودن، هشدارِ اثر): آرام، با آیکن */
.pk-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; border-radius: var(--radius); background: var(--info-soft); color: var(--text); font-size: var(--fs-body); line-height: 20px; }
.pk-note > .ico { flex: 0 0 auto; color: var(--info); }
.pk-note.warning { background: var(--warning-soft); } .pk-note.warning > .ico { color: var(--warning); }
.pk-note.danger { background: var(--danger-soft); } .pk-note.danger > .ico { color: var(--danger); }
.pk-note.success { background: var(--success-soft); } .pk-note.success > .ico { color: var(--success); }
/* گام‌های شماره‌دار (دستورِ اجرا) */
.pk-steps { margin: 0; padding: 12px var(--space-4) 12px calc(var(--space-4) + 22px); display: grid; gap: 8px; line-height: 22px; }
[dir="rtl"] .pk-steps:not(.ltr) { padding: 12px calc(var(--space-4) + 22px) 12px var(--space-4); }
.pk-steps.ltr { direction: ltr; text-align: left; border-top: 1px solid var(--hairline); color: var(--text-2); }
.pk-steps > li::marker { color: var(--primary); font-weight: bold; }
/* ردیفِ برچسب‌ها */
.pk-tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
/* متنِ بلندِ کاربر (پیام، بازخورد): خط‌ها حفظ می‌شوند */
.pk-prose { margin: 0; padding: var(--space-4); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 24px; }
.pk-prose.quote { margin: var(--space-4); padding: 12px 14px; border-radius: var(--radius); background: var(--bg); box-shadow: inset 0 0 0 1px var(--hairline); }
/* نوارِ اقدامِ پایینِ کارت */
.pk-acts { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 12px var(--space-4); border-top: 1px solid var(--hairline); }
.pk-acts.end { justify-content: flex-end; }
/* فرمِ داخلِ کارت (صفحهٔ تنظیمات): همان شبکهٔ دیالوگ با حاشیهٔ کارت */
.paper > .m-form, .paper > form > .m-form { padding: var(--space-4); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.pk-day-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.pk-day-h > .t-title { position: relative; padding-inline-start: 11px; }
.pk-day-h > .t-title::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 3px; height: 14px; margin-top: -7px; background: var(--primary); }
/* پرسش و پاسخِ فرم (بازخورد) */
.pk-answer { padding: 12px var(--space-4); border-bottom: 1px solid var(--hairline); }
.pk-answer:last-child { border-bottom: 0; }
.pk-answer > .q { margin-bottom: 6px; color: var(--text-2); font-size: var(--fs-caption); }
.pk-answer > .a { margin: 0; line-height: 22px; overflow-wrap: anywhere; }
.pk-answer > .a.prose { white-space: pre-wrap; }
.pk-scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
@media (max-width: 719px) { .pk-scores { grid-template-columns: minmax(0, 1fr); } }
/* نوارِ فیلترِ بالای صفحهٔ گزارش + دکمه‌های بازه (ToggleButtonGroupِ MUI) */
.pk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px var(--space-4); }
.pk-bar > .grow { flex: 1; }
.pk-seg { display: inline-flex; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.pk-seg > :is(button, a) { text-decoration: none; min-height: 30px; padding: 0 14px; border: 0; border-inline-end: 1px solid var(--border); background: none; color: var(--text-2); font: var(--fs-body)/30px var(--font); cursor: pointer; }
.pk-seg > :is(button, a):last-child { border-inline-end: 0; }
.pk-seg > :is(button, a):hover { background: var(--action-hover); }
.pk-seg > :is(button, a).is-on { background: var(--selected); color: var(--primary); font-weight: bold; }
.pk-seg > :is(button, a):focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ad-row.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
@media (max-width: 1279px) { .ad-row.c3 { grid-template-columns: minmax(0, 1fr); } }
/* ردیفِ فهرستِ ویرایش‌شدنی (پرسش، بند، شبکه): متن + ابزار */
.pk-item { display: flex; align-items: center; gap: 12px; padding: 12px var(--space-4); border-bottom: 1px solid var(--hairline); }
.pk-item:last-child { border-bottom: 0; }
.pk-item.top { align-items: flex-start; }
.pk-item > .grow { flex: 1; min-width: 0; }
.pk-item .h { font-weight: bold; line-height: 22px; overflow-wrap: anywhere; }
.pk-item .t-caption { line-height: 18px; overflow-wrap: anywhere; }
.pk-item .t-caption.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.pk-item .ad-cmd { flex: 0 0 auto; }
.pk-item .ad-cmd > button:disabled { opacity: .3; cursor: default; background: none; }
/* ابزارهای ۲۴pxِ ردیف (.ad-cmd)، در جدول و بیرون از آن: .x خاکستری، .edit آبی، .delete قرمز */
.ad-cmd { display: inline-flex; gap: 0; white-space: nowrap; line-height: 0; }
.ad-cmd > button { position: relative; display: inline-flex; margin: 0; padding: 3px; border: 0; border-radius: 50%; outline: 0;
  background: none; cursor: pointer; vertical-align: middle; color: var(--text-2); -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-2) var(--ease); }
.ad-cmd > button:hover { background: var(--action-hover); }
.ad-cmd > button > .ico, .ad-cmd > button > .ico::before { width: 18px; height: 18px; font-size: 18px; }
.ad-cmd > .x.success { color: var(--success); } .ad-cmd > .x.danger { color: var(--danger); } .ad-cmd > .x.warning { color: var(--warning); } .ad-cmd > .x.info { color: var(--info); }
.ad-cmd > .edit { color: var(--info); } .ad-cmd > .delete { color: var(--danger); }
/* لمسی: دکمهٔ ۲۴px با انگشت سخت زده می‌شود؛ ۳۶px با فاصله */
@media (pointer: coarse), (max-width: 767px) {
  .ad-cmd { gap: 4px; }
  .ad-cmd > button { padding: 8px; }
  .ad-cmd > button > .ico, .ad-cmd > button > .ico::before { width: 20px; height: 20px; font-size: 20px; }
}
.m-form.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 959px) { .m-form.c2 { grid-template-columns: minmax(0, 1fr); } }
/* آپلودِ تصویر با پیش‌نمایش (داخلِ دیالوگِ فرم) */
.pk-uploads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
@media (max-width: 719px) { .pk-uploads { grid-template-columns: minmax(0, 1fr); } }
.pk-upload { display: flex; gap: 12px; padding: 12px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--border); }
.pk-upload.is-error { box-shadow: inset 0 0 0 1px var(--danger); }
.pk-upload .thumb { position: relative; flex: 0 0 66px; height: 94px; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius); background: var(--bg); color: var(--text-2); }
.pk-upload .thumb > img { width: 100%; height: 100%; object-fit: cover; }
.pk-upload .thumb > .busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .7); color: var(--primary); }
.pk-upload .thumb > .busy .ico { animation: pk-spin 1s linear infinite; }
@keyframes pk-spin { to { transform: rotate(360deg); } }
.pk-upload .meta { min-width: 0; display: grid; gap: 4px; align-content: start; }
.pk-upload .h { font-weight: bold; } .pk-upload .req { color: var(--danger); }
.pk-upload .row { display: flex; gap: 6px; margin-top: 4px; }
.pk-upload .help { margin: 0; color: var(--danger); font-size: var(--fs-caption); }
/* ── گزارش‌ها (آنالیتیکس) ─────────────────────────────────────────────── */
/* زبانه‌هایی که پیوندند (هر زبانه یک نشانی): خطِ زیرِ زبانهٔ فعال با CSS، نه با JS */
.m-tabs.is-links > .ind { display: none; }
.m-tabs.is-links a.m-tab { text-decoration: none; display: inline-flex; align-items: center; }
.m-tabs.is-links a.m-tab[aria-selected="true"] { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
.pk-pick { position: relative; display: inline-flex; align-items: center; height: 30px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--border); }
.pk-pick > select { appearance: none; height: 30px; padding: 0 12px; padding-inline-end: 28px; border: 0; background: none; color: var(--text); font: var(--fs-body)/30px var(--font); cursor: pointer; }
.pk-pick > .ico { position: absolute; inset-inline-end: 4px; pointer-events: none; color: var(--text-2); }
.pk-find { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 240px; max-width: 520px; }
.pk-find > input[type="search"] { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 0; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--border); background: var(--paper); font: var(--fs-body)/32px var(--font); color: var(--text); }
.pk-find > input[type="search"]:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--primary); }
.pk-find > .ico { color: var(--text-2); }
/* نقشهٔ لمس: صفحهٔ گوشی، شبکهٔ ۲۰×۲۰ */
.pk-heat { display: grid; grid-template-columns: repeat(20, 1fr); width: min(100%, 300px); aspect-ratio: 9 / 19; margin-inline: auto; border-radius: 10px; overflow: hidden; background: var(--bg); box-shadow: inset 0 0 0 1px var(--border); }
.pk-heat > i { background: color-mix(in oklab, var(--primary) calc(var(--h, 0) * 100%), transparent); }
.pk-heat > i.dead { background: color-mix(in oklab, var(--accent) calc(var(--h, 0) * 100%), transparent); }
.pk-links { display: grid; max-height: 520px; overflow: auto; padding: 6px 0; }
.pk-links > a { padding: 7px var(--space-4); color: var(--text); text-decoration: none; text-align: left; font-size: var(--fs-body); overflow-wrap: anywhere; }
.pk-links > a:hover { background: var(--action-hover); }
.pk-links > a.is-on { background: var(--selected); color: var(--primary); font-weight: bold; }
/* خطِ زمانیِ رویدادهای یک نشست */
.pk-timeline { margin: 0; padding: 8px var(--space-4); list-style: none; direction: ltr; }
.pk-timeline > li { display: grid; grid-template-columns: 70px 150px minmax(0, 200px) minmax(0, 1fr); gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--hairline); font-size: var(--fs-caption); line-height: 18px; text-align: left; }
.pk-timeline > li:last-child { border-bottom: 0; }
.pk-timeline time { color: var(--text-2); } .pk-timeline > li > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 719px) { .pk-timeline > li { grid-template-columns: 62px minmax(0, 1fr); } .pk-timeline > li > :nth-child(n+3) { grid-column: 2; } }
.pk-code { margin: 12px 0 0; padding: 12px; max-height: 300px; overflow: auto; border-radius: var(--radius); background: var(--bg); box-shadow: inset 0 0 0 1px var(--hairline); font: 11px/17px ui-monospace, Consolas, monospace; text-align: left; white-space: pre; }
