/* پوستِ نوِ لپنل — برگهٔ اجزا (bundle.css)
   همهٔ رنگ‌ها و اندازه‌ها از توکن‌های tokens.json می‌آیند (var(--…)).
   پیشوندِ کلاس‌ها: lp- . حالت‌ها: is-… . گونه‌ها: --… .
   این فایل عیناً همان برگه‌ای است که در پنل بعد از unify.css بارگذاری می‌شود. */

/* ---------- پایه ---------- */
.lp-root, .lp-root * { box-sizing: border-box; }
.lp-root {
  font-family: var(--font-sans);
  font-size: 14px; line-height: 22px;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  direction: rtl; text-align: start;
}
.lp-root a { text-decoration: none; }
.lp-root a:not([class]) { color: var(--primary); }
.lp-root a:not([class]):hover { color: var(--primary-hover); text-decoration: underline; }
.lp-root :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.lp-root button, .lp-root input, .lp-root select, .lp-root textarea { font: inherit; }
.lp-root h1, .lp-root h2, .lp-root h3, .lp-root p, .lp-root dl, .lp-root dd, .lp-root ul { margin: 0; }
.lp-root ul { padding: 0; list-style: none; }

/* آیکونِ خطی */
.lp-i { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }
.lp-i--sm { width: 16px; height: 16px; }
.lp-i--lg { width: 22px; height: 22px; }
.lp-i--flip { transform: scaleX(-1); }

/* عدد و کد */
.lp-num { font-variant-numeric: tabular-nums; unicode-bidi: plaintext; white-space: nowrap; }
.lp-code { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; font-size: 13px; letter-spacing: .01em; white-space: nowrap; }
.lp-money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lp-money.is-debit { color: var(--st-red-ink); }
.lp-money.is-credit { color: var(--st-green-ink); }
.lp-muted { color: var(--ink-3); }
.lp-small { font-size: 13px; line-height: 20px; }
.lp-caption { font-size: 12px; line-height: 18px; color: var(--ink-3); }

/* ---------- پوسته: ریل + ستون + نوارِ بالا ---------- */
.lp-shell {
  display: grid;
  grid-template-columns: var(--rail-w) var(--panel-w) minmax(0, 1fr);
  min-height: 100vh; background: var(--bg);
}
.lp-shell.is-collapsed { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
.lp-shell.is-collapsed .lp-panel { display: none; }

.lp-rail {
  background: var(--surface); border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px; position: sticky; top: 0; height: 100vh;
}
.lp-rail__brand { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center; margin-bottom: 10px; }
.lp-rail__brand img { width: 32px; height: 32px; display: block; }
.lp-rail__item {
  width: 52px; height: 56px; border-radius: var(--radius-md); border: 0; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--ink-2); cursor: pointer; text-decoration: none; padding: 0;
}
.lp-rail__item .lp-i { width: 22px; height: 22px; }
.lp-rail__item span { font-size: 10.5px; line-height: 12px; font-weight: 500; white-space: nowrap; }
.lp-rail__item:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.lp-rail__item.is-active { background: var(--primary-soft); color: var(--primary-ink); }
.lp-rail__item.is-active span { font-weight: 700; }
.lp-rail__sep { width: 32px; height: 1px; background: var(--line); margin: 6px 0; }
.lp-rail__spacer { flex: 1; }

.lp-panel {
  background: var(--surface); border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow: auto;
}
.lp-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 12px 8px 12px; }
.lp-panel__title { font-size: 15px; font-weight: 700; color: var(--ink); }
.lp-panel__group { padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; }
.lp-panel__label { font-size: 12px; color: var(--ink-3); padding: 10px 10px 4px; font-weight: 500; }
.lp-panel__item {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--radius-md);
  color: var(--ink-2); font-size: 13.5px; text-decoration: none; cursor: pointer; border: 0; background: transparent; width: 100%; text-align: start;
}
.lp-panel__item .lp-i { width: 18px; height: 18px; color: var(--ink-3); }
.lp-panel__item:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.lp-panel__item.is-active { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.lp-panel__item.is-active .lp-i { color: var(--primary-ink); }
.lp-panel__item .lp-badge { margin-inline-start: auto; }
.lp-panel__foot { margin-top: auto; padding: 12px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); }

.lp-main { min-width: 0; display: flex; flex-direction: column; }
.lp-topbar {
  height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px) auto; align-items: center; gap: 12px; padding: 0 16px;
  position: sticky; top: 0; z-index: 20;
}
.lp-topbar__start, .lp-topbar__end { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lp-topbar__end { justify-content: flex-end; }
.lp-crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.lp-crumb b { color: var(--ink); font-weight: 600; }
.lp-crumb .lp-i { width: 14px; height: 14px; color: var(--ink-4); }

.lp-search {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--radius-pill);
  background: var(--surface-3); color: var(--ink-3); font-size: 13px; width: 100%; border: 1px solid transparent; cursor: text;
}
.lp-search:hover { border-color: var(--line-strong); }
.lp-search .lp-i { color: var(--ink-3); }
.lp-search kbd { margin-inline-start: auto; font: inherit; font-size: 11px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; background: var(--surface); color: var(--ink-3); }

.lp-iconbtn {
  width: 36px; height: 36px; border-radius: var(--radius-md); border: 0; background: transparent; color: var(--ink-2);
  display: inline-grid; place-items: center; cursor: pointer; position: relative; padding: 0;
}
.lp-iconbtn .lp-i { width: 20px; height: 20px; }
.lp-iconbtn:hover { background: var(--surface-3); color: var(--ink); }
.lp-iconbtn .lp-badge { position: absolute; top: 2px; inset-inline-end: 2px; }

.lp-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--st-red); color: var(--on-primary);
  font-size: 11px; line-height: 18px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.lp-badge--soft { background: var(--primary-soft); color: var(--primary-ink); }
.lp-badge--grey { background: var(--st-grey-soft); color: var(--st-grey-ink); }

.lp-sync { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12px; color: var(--ink-2); background: var(--surface-2); white-space: nowrap; }
.lp-sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--st-green); display: inline-block; }
.lp-sync.is-warn i { background: var(--st-orange); }
.lp-sync.is-red i { background: var(--st-red); }

.lp-avatar {
  width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--on-primary); background: var(--primary); flex: none; border: 0; cursor: pointer; padding: 0;
}
.lp-avatar--sm { width: 24px; height: 24px; font-size: 11px; }
.lp-avatar--lg { width: 44px; height: 44px; font-size: 17px; }
.lp-avatar.is-green { background: var(--st-green); }
.lp-avatar.is-orange { background: var(--st-orange); }
.lp-avatar.is-purple { background: var(--st-purple); }
.lp-avatar.is-blue { background: var(--st-blue); }
.lp-avatar.is-grey { background: var(--st-grey); }

/* تب‌های داخلیِ پنل (چند صفحهٔ باز) */
.lp-ptabs { display: flex; align-items: center; gap: 2px; height: 38px; padding: 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow-x: auto; }
.lp-ptab { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px 0 12px; border-radius: var(--radius-md) var(--radius-md) 0 0; font-size: 13px; color: var(--ink-2); white-space: nowrap; background: transparent; border: 0; cursor: pointer; }
.lp-ptab.is-active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--primary); }
.lp-ptab .lp-i { width: 14px; height: 14px; color: var(--ink-4); }
.lp-ptab:hover .lp-i { color: var(--ink); }

/* ---------- صفحه ---------- */
.lp-page { width: 100%; max-width: var(--content-max); margin-inline: auto; padding: 20px 24px 48px; display: flex; flex-direction: column; gap: 16px; }
.lp-page__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.lp-title { font-size: 24px; line-height: 32px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.lp-subtitle { font-size: 13px; line-height: 20px; color: var(--ink-3); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lp-page__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.lp-views { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.lp-views__tab {
  height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2);
  border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer; white-space: nowrap; margin-bottom: -1px; text-decoration: none;
}
.lp-views__tab .lp-i { width: 16px; height: 16px; }
.lp-views__tab:hover { color: var(--ink); text-decoration: none; }
.lp-views__tab.is-active { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.lp-views__add { color: var(--ink-3); }

.lp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lp-toolbar__spacer { flex: 1; }
.lp-count { font-size: 13px; color: var(--ink-3); white-space: nowrap; }

/* ---------- دکمه ---------- */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--control-h); padding: 0 14px; border-radius: var(--radius-md);
  font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; background: var(--surface-3); color: var(--ink);
  transition: background .15s, border-color .15s, color .15s;
}
.lp-btn:hover { text-decoration: none; }
.lp-btn--primary { background: var(--primary); color: var(--on-primary); }
.lp-btn--primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.lp-btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.lp-btn--secondary:hover { background: var(--surface-2); border-color: var(--ink-4); color: var(--ink); }
.lp-btn--ghost { background: transparent; color: var(--ink-2); }
.lp-btn--ghost:hover { background: var(--surface-3); color: var(--ink); }
.lp-btn--danger { background: var(--st-red); color: var(--on-primary); }
.lp-btn--danger:hover { background: var(--st-red-ink); color: var(--on-primary); }
.lp-btn--danger-soft { background: var(--st-red-soft); color: var(--st-red-ink); }
.lp-btn--sm { height: var(--control-h-sm); padding: 0 10px; font-size: 13px; }
.lp-btn--sm .lp-i { width: 16px; height: 16px; }
.lp-btn--icon { width: var(--control-h); padding: 0; }
.lp-btn--sm.lp-btn--icon { width: var(--control-h-sm); }
.lp-btn[disabled], .lp-btn.is-disabled { opacity: .5; cursor: not-allowed; }
.lp-btn__caret { width: 1px; height: 18px; background: currentColor; opacity: .35; margin-inline: 2px -4px; }
.lp-btn-group { display: inline-flex; }
.lp-btn-group .lp-btn:not(:first-child) { border-start-start-radius: 0; border-end-start-radius: 0; margin-inline-start: -1px; }
.lp-btn-group .lp-btn:not(:last-child) { border-start-end-radius: 0; border-end-end-radius: 0; }
.lp-btn-group .lp-btn--primary:not(:first-child) { border-inline-start: 1px solid rgba(255,255,255,.3); }

/* ---------- چیپ و وضعیت ---------- */
.lp-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill);
  font-size: 12.5px; line-height: 1; font-weight: 600; white-space: nowrap;
  background: var(--st-grey-soft); color: var(--st-grey-ink);
}
.lp-chip .lp-i { width: 14px; height: 14px; }
.lp-chip__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lp-chip--square { border-radius: var(--radius-sm); }
.lp-chip--lg { height: 30px; font-size: 13px; padding: 0 12px; }
.lp-chip.is-green { background: var(--st-green-soft); color: var(--st-green-ink); }
.lp-chip.is-blue { background: var(--st-blue-soft); color: var(--st-blue-ink); }
.lp-chip.is-orange { background: var(--st-orange-soft); color: var(--st-orange-ink); }
.lp-chip.is-red { background: var(--st-red-soft); color: var(--st-red-ink); }
.lp-chip.is-purple { background: var(--st-purple-soft); color: var(--st-purple-ink); }
.lp-chip.is-grey { background: var(--st-grey-soft); color: var(--st-grey-ink); }
.lp-chip.is-primary { background: var(--primary-soft); color: var(--primary-ink); }
.lp-chip--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); }

/* خانهٔ تمام‌رنگِ وضعیت در جدول (الگوی monday) */
.lp-status {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 30px; height: 100%; padding: 0 10px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; color: var(--on-primary); background: var(--st-grey); white-space: nowrap; text-align: center;
}
.lp-status.is-green { background: var(--st-green); }
.lp-status.is-blue { background: var(--st-blue); }
.lp-status.is-orange { background: var(--st-orange); }
.lp-status.is-red { background: var(--st-red); }
.lp-status.is-purple { background: var(--st-purple); }
.lp-status.is-grey { background: var(--st-grey); }
.lp-status.is-empty { background: var(--st-grey-soft); color: var(--ink-4); }
.lp-status .lp-i { width: 15px; height: 15px; }

/* نوارِ سهمِ وضعیت‌ها در ردیفِ خلاصه */
.lp-bar { display: flex; height: 22px; border-radius: var(--radius-sm); overflow: hidden; background: var(--st-grey-soft); min-width: 80px; }
.lp-bar span { display: block; height: 100%; }
.lp-bar .is-green { background: var(--st-green); } .lp-bar .is-blue { background: var(--st-blue); }
.lp-bar .is-orange { background: var(--st-orange); } .lp-bar .is-red { background: var(--st-red); }
.lp-bar .is-purple { background: var(--st-purple); } .lp-bar .is-grey { background: var(--st-grey); }

/* چیپِ فیلترِ فعال */
.lp-fchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 10px; border-radius: var(--radius-pill); background: var(--primary-soft); color: var(--primary-ink); font-size: 13px; font-weight: 500; }
.lp-fchip b { font-weight: 700; }
.lp-fchip button { width: 20px; height: 20px; border-radius: 50%; border: 0; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; padding: 0; }
.lp-fchip button:hover { background: rgba(30,64,175,.12); }
.lp-fchip .lp-i { width: 14px; height: 14px; }

/* ---------- گروه و جدول ---------- */
.lp-group { --grp: var(--st-grey); display: flex; flex-direction: column; gap: 6px; }
.lp-group.is-green { --grp: var(--st-green); } .lp-group.is-blue { --grp: var(--st-blue); }
.lp-group.is-orange { --grp: var(--st-orange); } .lp-group.is-red { --grp: var(--st-red); }
.lp-group.is-purple { --grp: var(--st-purple); } .lp-group.is-grey { --grp: var(--st-grey); }
.lp-group.is-primary { --grp: var(--primary); }
.lp-group__head { display: flex; align-items: center; gap: 8px; padding: 4px 2px; color: var(--grp); font-size: 18px; line-height: 26px; font-weight: 700; }
.lp-group__head .lp-i { width: 18px; height: 18px; }
.lp-group__toggle { width: 26px; height: 26px; border: 0; background: transparent; color: inherit; display: grid; place-items: center; border-radius: var(--radius-sm); cursor: pointer; padding: 0; }
.lp-group__toggle:hover { background: var(--surface-3); }
.lp-group__count { font-size: 13px; line-height: 20px; font-weight: 400; color: var(--ink-3); }
.lp-group__sum-note { margin-inline-start: auto; font-size: 13px; color: var(--ink-3); font-weight: 400; }
.lp-group .lp-table-wrap { border-inline-start: 6px solid var(--grp); }

.lp-table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); overflow: auto; max-height: 78vh; }
.lp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 720px; }
.lp-table th {
  height: 36px; padding: 0 12px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 500; text-align: start; white-space: nowrap;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2;
}
.lp-table th.is-sorted { color: var(--ink); font-weight: 600; }
.lp-table th .lp-i { width: 14px; height: 14px; vertical-align: -2px; color: var(--ink-4); margin-inline-start: 4px; }
.lp-table td { height: var(--row-h); padding: 0 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.lp-table tbody tr:last-child td { border-bottom: 0; }
.lp-table tbody tr:hover td { background: var(--surface-2); }
.lp-table tbody tr.is-selected td { background: var(--primary-soft); }
.lp-table tbody tr.is-clickable { cursor: pointer; }
.lp-table .lp-td--status { padding: 4px; width: 150px; }
.lp-table .lp-td--num, .lp-table .lp-th--num { text-align: end; }
.lp-table .lp-td--check { width: 40px; padding: 0 10px; text-align: center; }
.lp-table .lp-td--check input { accent-color: var(--primary); width: 15px; height: 15px; margin: 0; vertical-align: middle; }
.lp-table .lp-td--name { font-weight: 600; color: var(--ink); }
.lp-table .lp-td--name a { color: var(--ink); }
.lp-table .lp-td--name a:hover { color: var(--primary); }
.lp-table .lp-td--actions { text-align: end; }
.lp-table .lp-td--actions { white-space: nowrap; }
.lp-table th:first-child, .lp-table td:first-child { position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; }
.lp-table th:first-child { background: var(--surface-2); z-index: 3; }
.lp-table tbody tr:hover td:first-child { background: var(--surface-2); }
.lp-table tbody tr.is-selected td:first-child { background: var(--primary-soft); }
.lp-table .lp-sub { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); font-weight: 400; }
.lp-table--dense td { height: 36px; }

.lp-table__add td { height: 36px; color: var(--ink-3); font-size: 13px; background: var(--surface); }
.lp-table__add a { color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.lp-table__add a:hover { color: var(--primary); text-decoration: none; }
.lp-table__sum td { height: 40px; background: var(--surface); color: var(--ink-3); font-size: 12px; border-top: 1px solid var(--line); border-bottom: 0; }
.lp-table__sum .lp-sum__val { display: block; font-size: 14px; line-height: 18px; color: var(--ink); font-weight: 600; }
.lp-table__sum .lp-sum__lbl { display: block; font-size: 11px; line-height: 14px; }
.lp-pill-date { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--grp, var(--st-grey)); color: var(--on-primary); font-size: 12px; font-weight: 600; white-space: nowrap; }

/* ---------- کارت و KPI ---------- */
.lp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); display: flex; flex-direction: column; min-width: 0; }
.lp-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.lp-card__title { font-size: 15px; line-height: 22px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.lp-card__title .lp-i { color: var(--ink-3); }
.lp-card__body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.lp-card__foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lp-card.is-red { border-color: var(--st-red); box-shadow: 0 0 0 1px var(--st-red), var(--shadow-1); }
.lp-card.is-red .lp-card__head { background: var(--st-red-soft); color: var(--st-red-ink); border-bottom-color: var(--st-red-soft); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

.lp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.lp-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lp-kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lp-kpi__label { font-size: 13px; line-height: 20px; color: var(--ink-2); font-weight: 500; }
.lp-kpi__value { font-size: 28px; line-height: 36px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.lp-kpi__value small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-inline-start: 4px; }
.lp-kpi__delta { font-size: 12px; line-height: 18px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.lp-kpi.is-red .lp-kpi__value { color: var(--st-red-ink); }
.lp-kpi.is-green .lp-kpi__value { color: var(--st-green-ink); }
.lp-kpi.is-red { border-color: var(--st-red); }
.lp-kpi__icon { width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--surface-3); color: var(--ink-2); display: grid; place-items: center; }
.lp-kpi.is-red .lp-kpi__icon { background: var(--st-red-soft); color: var(--st-red-ink); }
.lp-kpi.is-green .lp-kpi__icon { background: var(--st-green-soft); color: var(--st-green-ink); }
.lp-kpi.is-blue .lp-kpi__icon { background: var(--st-blue-soft); color: var(--st-blue-ink); }
.lp-kpi.is-orange .lp-kpi__icon { background: var(--st-orange-soft); color: var(--st-orange-ink); }

/* بنرِ سلام (navy فقط اینجا و ورود) */
.lp-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); color: var(--on-navy); border-radius: var(--radius-xl); padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; overflow: hidden; }
.lp-hero__title { font-size: 22px; line-height: 30px; font-weight: 700; }
.lp-hero__sub { font-size: 13px; color: var(--navy-muted); margin-top: 2px; }
.lp-hero__date { font-size: 13px; color: var(--navy-muted); font-variant-numeric: tabular-nums; }
.lp-hero__pulse { position: absolute; inset-inline: 0; bottom: 0; height: 26px; opacity: .35; pointer-events: none; }
.lp-hero .lp-chip { background: rgba(255,255,255,.12); color: var(--on-navy); }

/* ---------- drawer و تب‌ها ---------- */
.lp-overlay { position: absolute; inset: 0; background: var(--overlay); z-index: 40; }
.lp-drawer {
  position: absolute; inset-block: 0; inset-inline-end: 0; inset-inline-start: auto; width: min(var(--drawer-w), 100%);
  background: var(--surface); box-shadow: var(--shadow-drawer); display: flex; flex-direction: column; z-index: 50; min-width: 0;
}
.lp-drawer--fixed { position: fixed; }
.lp-drawer__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.lp-drawer__title { font-size: 18px; line-height: 26px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-drawer__body { padding: 16px; display: flex; flex-direction: column; gap: 16px; overflow: auto; flex: 1; }
.lp-drawer__foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-start; }

.lp-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 16px; overflow-x: auto; }
.lp-tabs__tab { height: 40px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.lp-tabs__tab:hover { color: var(--ink); }
.lp-tabs__tab.is-active { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.lp-tabs__tab .lp-badge { margin-inline-start: 2px; }

.lp-kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; font-size: 14px; align-items: baseline; }
.lp-kv dt { color: var(--ink-3); font-size: 13px; }
.lp-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.lp-section-title { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.lp-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* تایم‌لاین */
.lp-timeline { display: flex; flex-direction: column; gap: 0; }
.lp-tl { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0 12px; }
.lp-tl__rail { display: flex; flex-direction: column; align-items: center; }
.lp-tl__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--st-grey); margin-top: 6px; flex: none; }
.lp-tl__dot.is-green { background: var(--st-green); } .lp-tl__dot.is-red { background: var(--st-red); } .lp-tl__dot.is-blue { background: var(--st-blue); } .lp-tl__dot.is-orange { background: var(--st-orange); }
.lp-tl__line { width: 2px; flex: 1; background: var(--line); margin: 4px 0; }
.lp-tl__body { padding-bottom: 16px; font-size: 13px; }
.lp-tl__body b { font-weight: 600; color: var(--ink); }
.lp-tl__when { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ---------- فرم ---------- */
.lp-form { display: flex; flex-direction: column; gap: 16px; }
.lp-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.lp-form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lp-form__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lp-form__row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lp-form__row--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.lp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lp-field--wide { grid-column: span 2; }
.lp-label { font-size: 13px; line-height: 18px; color: var(--ink-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.lp-label .lp-req { color: var(--st-red); }
.lp-label .lp-opt { color: var(--ink-4); font-weight: 400; }
.lp-input, .lp-select, .lp-textarea {
  width: 100%; min-width: 0; height: var(--control-h); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0 12px;
  background: var(--surface); color: var(--ink); font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.lp-input:hover, .lp-select:hover, .lp-textarea:hover { border-color: var(--line-strong); }
.lp-input:focus, .lp-select:focus, .lp-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.lp-input::placeholder, .lp-textarea::placeholder { color: var(--ink-4); }
.lp-input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.lp-input.is-invalid, .lp-select.is-invalid { border-color: var(--st-red); }
.lp-input--money { direction: ltr; text-align: end; font-variant-numeric: tabular-nums; font-weight: 500; }
.lp-input--code { direction: ltr; text-align: end; font-variant-numeric: tabular-nums; }
.lp-select { appearance: none; padding-inline-end: 34px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='m7 10 5 5 5-5' fill='none' stroke='%235b6b84' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: left 10px center; background-size: 18px; }
.lp-textarea { height: auto; min-height: 88px; padding: 8px 12px; resize: vertical; line-height: 22px; }
.lp-help { font-size: 12px; line-height: 18px; color: var(--ink-3); }
.lp-error { font-size: 12px; line-height: 18px; color: var(--st-red-ink); }
.lp-input-group { display: flex; align-items: stretch; }
.lp-input-group .lp-input { border-start-start-radius: 0; border-end-start-radius: 0; }
.lp-input-group .lp-addon { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-inline-end: 0; border-radius: var(--radius-md) 0 0 var(--radius-md); background: var(--surface-2); color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.lp-input-group--end .lp-input { border-radius: var(--radius-md); border-start-end-radius: 0; border-end-end-radius: 0; }
.lp-input-group--end .lp-addon { border: 1px solid var(--line); border-inline-start: 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.lp-search-field { position: relative; }
.lp-search-field .lp-input { padding-inline-start: 36px; }
.lp-search-field .lp-i { position: absolute; inset-inline-start: 11px; top: 9px; color: var(--ink-4); }

.lp-check, .lp-radio { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; min-height: 24px; }
.lp-check input, .lp-radio input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }

.lp-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.lp-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.lp-switch__track { width: 36px; height: 20px; border-radius: 10px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.lp-switch__track::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform .15s; box-shadow: var(--shadow-1); }
.lp-switch input:checked + .lp-switch__track { background: var(--primary); }
.lp-switch input:checked + .lp-switch__track::after { transform: translateX(-16px); }
.lp-switch input:focus-visible + .lp-switch__track { outline: 2px solid var(--focus); outline-offset: 2px; }

.lp-seg { display: inline-flex; background: var(--surface-3); padding: 3px; border-radius: var(--radius-md); gap: 2px; }
.lp-seg__btn { height: 30px; padding: 0 12px; border-radius: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lp-seg__btn.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.lp-seg__btn .lp-i { width: 15px; height: 15px; }

.lp-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.lp-choice { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; background: var(--surface); }
.lp-choice input { margin: 4px 0 0; accent-color: var(--primary); flex: none; }
.lp-choice b { display: block; font-size: 14px; font-weight: 600; }
.lp-choice span { display: block; font-size: 12.5px; line-height: 18px; color: var(--ink-3); margin-top: 2px; }
.lp-choice.is-on { border-color: var(--primary); background: var(--primary-soft); }
.lp-choice.is-on span { color: var(--primary-ink); }

.lp-dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--ink-3); font-size: 13px; background: var(--surface-2); cursor: pointer; }
.lp-dropzone .lp-i { width: 26px; height: 26px; color: var(--ink-3); }
.lp-dropzone b { color: var(--ink); font-weight: 600; font-size: 14px; }
.lp-dropzone:hover { border-color: var(--primary); color: var(--primary-ink); }
.lp-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.lp-thumb { width: 64px; height: 64px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-3); display: grid; place-items: center; color: var(--ink-3); position: relative; }
.lp-thumb button { position: absolute; top: -6px; inset-inline-start: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--ink); color: var(--on-primary); display: grid; place-items: center; cursor: pointer; padding: 0; }
.lp-thumb button .lp-i { width: 12px; height: 12px; }

/* نوارِ عملِ چسبان (پایینِ فرم) */
.lp-actionbar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); flex-wrap: wrap; z-index: 10; }
.lp-actionbar__spacer { flex: 1; }

/* ---------- بازشونده (گزینه‌های فرعی پشتِ یک سطر) ---------- */
.lp-disclosure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.lp-disclosure__sum { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); }
.lp-disclosure__sum .lp-i { color: var(--ink-3); flex: none; }
.lp-disclosure__hint { margin-inline-start: auto; font-size: 13px; font-weight: 400; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-disclosure__body { padding: 0 14px 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.lp-disclosure.is-closed .lp-disclosure__body { display: none; }

/* ---------- یادداشت‌ها و پیام‌ها ---------- */
.lp-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius-md); font-size: 13px; line-height: 20px; background: var(--st-blue-soft); color: var(--st-blue-ink); }
.lp-note .lp-i { flex: none; margin-top: 1px; }
.lp-note--warn { background: var(--st-orange-soft); color: var(--st-orange-ink); }
.lp-note--danger { background: var(--st-red-soft); color: var(--st-red-ink); }
.lp-note--ok { background: var(--st-green-soft); color: var(--st-green-ink); }
.lp-note--plain { background: var(--surface-2); color: var(--ink-2); }
.lp-toast { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: var(--radius-pill); background: var(--ink); color: var(--on-primary); font-size: 14px; box-shadow: var(--shadow-2); }
.lp-toast .lp-i { color: var(--st-green-soft); }

/* ---------- حالتِ خالی ---------- */
.lp-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 24px; }
.lp-empty__art { width: 180px; height: 130px; display: block; margin-bottom: 8px; }
.lp-empty__title { font-size: 16px; line-height: 24px; font-weight: 700; color: var(--ink); }
.lp-empty__hint { font-size: 13px; line-height: 20px; color: var(--ink-3); max-width: 360px; }
.lp-empty .lp-btn { margin-top: 8px; }

/* ---------- زنجیرهٔ مرحله (ثبت در پنل ← تأیید بانک ← ثبت در قیاس) ---------- */
.lp-stage { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lp-stage__step { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; background: var(--st-grey-soft); color: var(--st-grey-ink); white-space: nowrap; }
.lp-stage__step .lp-i { width: 13px; height: 13px; }
.lp-stage__step.is-done { background: var(--st-green-soft); color: var(--st-green-ink); }
.lp-stage__step.is-cur { background: var(--st-orange-soft); color: var(--st-orange-ink); }
.lp-stage__step.is-bad { background: var(--st-red-soft); color: var(--st-red-ink); }
.lp-stage__arrow { color: var(--ink-4); width: 14px; height: 14px; transform: scaleX(-1); }

/* ---------- کانبان ---------- */
.lp-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.lp-kcol { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lp-kcol__head { height: 40px; border-radius: var(--radius-md); color: var(--on-primary); display: flex; align-items: center; justify-content: space-between; padding: 0 12px; font-weight: 700; font-size: 14px; background: var(--st-grey); }
.lp-kcol__head.is-green { background: var(--st-green); } .lp-kcol__head.is-blue { background: var(--st-blue); } .lp-kcol__head.is-orange { background: var(--st-orange); } .lp-kcol__head.is-red { background: var(--st-red); } .lp-kcol__head.is-purple { background: var(--st-purple); }
.lp-kcol__head small { font-weight: 500; opacity: .9; font-size: 13px; }
.lp-kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-1); }
.lp-kcard__title { font-weight: 600; font-size: 14px; }
.lp-kcard__meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lp-kcard__foot { display: flex; align-items: center; justify-content: space-between; color: var(--ink-3); font-size: 12px; }

/* ---------- پنجرهٔ بازشو (فیلتر، منو) ---------- */
.lp-pop { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); padding: 14px 16px; min-width: 300px; display: flex; flex-direction: column; gap: 12px; }
.lp-pop__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 700; }
.lp-pop__head small { font-size: 13px; color: var(--ink-3); font-weight: 400; }
.lp-menu { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); padding: 6px; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.lp-menu__item { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--radius-md); font-size: 14px; color: var(--ink); cursor: pointer; border: 0; background: transparent; width: 100%; text-align: start; }
.lp-menu__item:hover { background: var(--surface-3); }
.lp-menu__item .lp-i { color: var(--ink-3); }
.lp-menu__item.is-danger { color: var(--st-red-ink); }
.lp-menu__sep { height: 1px; background: var(--line); margin: 4px 0; }

/* برگهٔ پایینی (منوی «…» در موبایل) */
.lp-sheet { position: absolute; inset-inline: 0; bottom: 0; background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-2); padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; flex-direction: column; gap: 2px; }
.lp-sheet--fixed { position: fixed; }
.lp-sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 4px auto 10px; }
.lp-sheet__title { font-size: 13px; color: var(--ink-3); padding: 0 10px 6px; }
.lp-sheet .lp-menu__item { height: var(--touch-min); font-size: 15px; }
.lp-sheet__cancel { margin-top: 6px; }

/* ---------- صفحه‌بندی ---------- */
.lp-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.lp-pager__pages { display: inline-flex; gap: 4px; }

/* ---------- ورود ---------- */
.lp-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); position: relative; overflow: hidden; }
.lp-login__card { width: min(440px, 100%); background: var(--surface); border-radius: var(--radius-xl); padding: 40px; box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 20px; position: relative; }
.lp-login__brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.lp-login__brand img { width: 72px; height: 72px; }
.lp-login__brand h1 { font-size: 24px; font-weight: 800; }
.lp-login__brand p { font-size: 13px; color: var(--ink-3); }
.lp-login__foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }

/* ---------- موبایل ---------- */
.lp-bottomnav { display: none; }
@media (max-width: 980px) {
  .lp-shell, .lp-shell.is-collapsed { grid-template-columns: minmax(0, 1fr); }
  .lp-rail, .lp-panel { display: none; }
  .lp-topbar { grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 12px; }
  .lp-page { padding: 14px 16px 90px; }
  .lp-title { font-size: 20px; line-height: 28px; }
  .lp-bottomnav { display: flex; position: fixed; bottom: 0; inset-inline: 0; height: 62px; background: var(--surface); border-top: 1px solid var(--line); justify-content: space-around; align-items: stretch; padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); z-index: 30; }
  .lp-bottomnav__item { flex: 1; min-width: var(--touch-min); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-2); font-size: 11px; text-decoration: none; border-radius: var(--radius-md); border: 0; background: transparent; }
  .lp-bottomnav__item .lp-i { width: 22px; height: 22px; }
  .lp-bottomnav__item.is-active { color: var(--primary-ink); background: var(--primary-soft); }
  .lp-drawer { width: 100%; }
  .lp-kv { grid-template-columns: 110px minmax(0, 1fr); }
  .lp-form__row--3, .lp-form__row--4, .lp-form__row--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-table-wrap { max-height: none; }
}
@media (max-width: 640px) {
  .lp-form__row--2, .lp-form__row--3, .lp-form__row--4, .lp-form__row--5 { grid-template-columns: minmax(0, 1fr); }
  .lp-field--wide { grid-column: auto; }
  .lp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-kpi__value { font-size: 22px; line-height: 30px; }
}

/* فهرستِ کارتی در موبایل (به‌جای جدول) */
.lp-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.lp-list__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 14px; min-height: var(--touch-min); border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.lp-list__item:last-child { border-bottom: 0; }
.lp-list__item:active { background: var(--surface-2); }
.lp-list__title { font-weight: 600; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-list__sub { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lp-list__end { text-align: end; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

@media (prefers-reduced-motion: reduce) {
  .lp-root * { transition: none !important; animation: none !important; }
}

/* ========== م۸۸/۲الف — فهرست‌ها (مشتریان + فاکتورها) ========== */
/* ریشهٔ محتوای نو: یک‌جور در پوستهٔ نو (full) و در تبِ bare؛ کشو/پاپ‌اور درونِ همین ریشه می‌مانند (iframe) */
.lp-root.lp-body { position: relative; padding: 24px; display: flex; flex-direction: column; gap: 16px; min-height: 60vh; }
.lp-shell .lp-page:has(> .content > .lp-root.lp-body) { padding: 0; }
.lp-shell .lp-root.lp-body { padding: 20px 24px 48px; }
.lp-body .lp-table-wrap { max-height: none; }
/* جدولِ ثابت با colgroup: ستونِ نام تنها ستونِ خودکار است؛ کمینهٔ پهنا تا در پوستهٔ تب‌ها (۱۳۶۶/۱۴۴۰) ستونِ نام له نشود — کم‌تر از آن قاب اسکرول می‌خورد (مثلِ جدولِ قدیم)، ستونِ اول چسبان است */
.lp-table--fixed { table-layout: fixed; }
.lp-table--cust { min-width: 1180px; }
.lp-table--inv { min-width: 1190px; }
.lp-table--fixed td { white-space: normal; overflow-wrap: anywhere; }
.lp-table td .lp-sub { white-space: normal; }
.lp-table .lp-td--num .lp-sub { text-align: end; }
.lp-td__main { display: block; font-weight: 500; color: var(--ink); }
.lp-td--gheyas .lp-gc { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.lp-chip--sm { height: 20px; font-size: 11.5px; padding: 0 8px; }
.lp-chip.gc-chip { max-width: 100%; white-space: normal; height: auto; min-height: 20px; line-height: 1.5; padding: 1px 8px; }
.lp-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* پیوندهای مرتب‌سازیِ SmartTable::th() درونِ سرستون (+ ستونِ فرعیِ ادغام‌شده به شکلِ زیرخط) */
.lp-table th .th-sort, .lp-table th .th-plain { color: inherit; text-decoration: none; display: inline-block; }
.lp-table th .th-sort:hover { color: var(--primary); }
.lp-table th.is-sorted .th-sort { color: var(--ink); font-weight: 600; }
.lp-table th .lp-th__sub { display: block; font-size: 11px; line-height: 14px; font-weight: 400; color: var(--ink-3); }
/* گروه‌ها: جمع/باز با [data-lp-group]؛ گروهِ بی‌سر (بدون گروه) بی‌نوارِ رنگی؛ منوهای ردیف یک‌بار بیرونِ جدول (برای کارت‌های موبایل هم) */
.lp-group.is-collapsed .lp-table-wrap { display: none; }
.lp-group.is-collapsed .lp-group__toggle .lp-i { transform: rotate(-90deg); }
.lp-group--plain .lp-table-wrap { border-inline-start: 1px solid var(--line); }
.lp-group__count::before { content: "· "; }
.lp-rowmenus { display: contents; }
/* نوارِ ابزار: فرمِ جست‌وجو، چیپِ فیلتر با پیوندِ × */
.lp-search-form { flex: 0 1 320px; min-width: 200px; }
.lp-search-form .lp-input { height: 36px; border-radius: var(--radius-pill); }
.lp-search-field .lp-i { top: 9px; }
.lp-fchip .lp-fchip__x { width: 20px; height: 20px; border-radius: 50%; color: inherit; display: inline-grid; place-items: center; }
.lp-fchip .lp-fchip__x:hover { background: rgba(30,64,175,.12); }
.lp-menu__item.is-on { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.lp-menu__item.is-static { cursor: default; color: var(--ink-3); }
.lp-menu__item[disabled] { opacity: .5; cursor: not-allowed; }
.lp-menu form { display: contents; }
.lp-btn.is-disabled { opacity: .5; pointer-events: none; }
/* پاپ‌اورِ فیلتر: جای‌گذاری با lepanel.js (زیرِ دکمه، fixed؛ زیرِ ۹۸۰ برگهٔ پایینی) */
.lp-pop { max-width: min(720px, calc(100vw - 16px)); max-height: calc(100vh - 32px); overflow: auto; }
.lp-pop .lp-actionbar { display: flex; gap: 8px; align-items: center; }
/* کشوی مشتری: درونِ ریشه (absolute) تا در iframe بماند؛ بالا/بلندی را lepanel.js با جای فعلیِ دید می‌دهد */
.lp-body .lp-drawer { position: absolute; inset-block: auto; top: 0; height: 100vh; }
.lp-drawer__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-kpis--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lp-kpi__value--md { font-size: 18px; line-height: 26px; }
.lp-table tbody tr.is-selected td, .lp-table tbody tr.is-selected td:first-child { background: var(--primary-soft); }
/* کارتِ موبایل: پیوندِ اصلی (آواتار + متن) + انتهای کارت (چیپ‌ها، تماس، «…») — دکمه داخلِ پیوند نمی‌نشیند، پس دو ستون */
.lp-list__item--split { grid-template-columns: minmax(0, 1fr) auto; }
.lp-list__main { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.lp-list__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lp-list__end .lp-btn--icon { margin-top: 2px; }
/* موبایل (فقط نمایشگر، نه چاپ): جدول پنهان، فهرستِ کارتی؛ دکمهٔ شناورِ گزارشِ اشکال بالای نوارِ پایین */
.lp-only-mob { display: none; }
@media screen and (max-width: 980px) {
  .lp-root.lp-body, .lp-shell .lp-root.lp-body { padding: 16px 16px 90px; gap: 12px; }
  .lp-only-desk { display: none; }
  .lp-only-mob { display: flex; }
  .lp-search-form { flex: 1 1 100%; }
  .lp-body .lp-drawer { display: none; }
  .bf-fab { bottom: 82px; }
}
@media print {
  .lp-rail, .lp-panel, .lp-topbar, .lp-bottomnav, .lp-toolbar, .lp-page__actions, .lp-drawer { display: none; }
  .lp-root .noprint, .lp-only-mob, .lp-views, .lp-pop, .lp-menu, .lp-rowmenus { display: none !important; }
  .lp-only-desk, .lp-group.is-collapsed .lp-table-wrap { display: block !important; }
  .lp-root.lp-body { padding: 0; }
  .lp-table-wrap { max-height: none; overflow: visible; box-shadow: none; }
  .lp-table, .lp-table--cust, .lp-table--inv { min-width: 0; font-size: 11px; }
}

/* ========== م۸۸/۱٫۱ — ریل = چرخاندنِ ستون؛ خانوادهٔ در حالِ تماشا (is-peek). گروه/برگهٔ پنهان با صفتِ hidden (قاعدهٔ سراسریِ [hidden] در panel.css) ========== */
.lp-rail__item.is-peek { background: var(--surface-3); color: var(--ink); }
.lp-rail__item.is-peek span { font-weight: 600; }

/* ========== م۸۸/۲ب — دریافتی‌ها، ثبتِ قیاس، چک و نقدینگی ========== */
.lp-inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
/* کمینهٔ پهنا = جمعِ ستون‌های ثابت + ≥۲۰۰ برای ستونِ خودکار؛ در پوستهٔ تب‌ها در ۱۴۴۰ (~۱۰۸۰ قابلِ استفاده) بی‌اسکرولِ درونی */
.lp-table--rc { min-width: 1070px; }
.lp-table--pq { min-width: 1080px; }
.lp-table--chq { min-width: 1080px; }
.lp-table--cql { min-width: 1080px; }
.lp-table--chq2 { min-width: 980px; }
/* زنجیرهٔ سه‌پلهٔ کوچک در ردیف */
.lp-stage--sm .lp-stage__step { height: 22px; font-size: 11.5px; padding: 0 8px; }
.lp-stage__step.is-cur.is-grey { background: var(--st-grey-soft); color: var(--st-grey-ink); }
/* بندانگشتیِ رسید (همان a[href=/media/…] > img تا lightbox کار کند) */
.lp-thumb-sm { display: inline-block; width: 32px; height: 32px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); vertical-align: middle; background: var(--surface-3); }
.lp-thumb-sm img, .lp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-thumb { overflow: hidden; }
/* پیوندِ مرتب‌سازیِ SmartTable درونِ منوی «…» */
.lp-menu__item--th .th-sort, .lp-menu__item--th .th-plain { color: inherit; flex: 1; }
/* کشوی آماده (data-lp-drawer-open): درونِ ریشه؛ زیرِ ۹۸۰ تمام‌قد و ثابت؛ پردهٔ پشت */
.lp-overlay--fixed { position: fixed; z-index: 48; }
.lp-body .lp-drawer--form { z-index: 50; }
.lp-body .lp-drawer--form.lp-drawer--fixed { position: fixed; top: 0; height: 100%; inset-inline: 0; width: 100%; }
.lp-drawer--form .lp-drawer__title { font-size: 16px; }
.lp-drawer--form .lp-drawer__head .lp-money { margin-inline-start: auto; }
@media screen and (max-width: 980px) { .lp-body .lp-drawer--form.is-open { display: flex; } }
/* یادداشت‌ها: وضعیتِ نویسنده با دکمهٔ قرمزِ آشکار، بنرِ پیوندی، بلوکِ منتظرِ قیاس */
.lp-note--gw { align-items: center; flex-wrap: wrap; }
.lp-note__text { flex: 1; min-width: 200px; }
a.lp-note--link, a.lp-note--link:hover { text-decoration: none; color: var(--st-red-ink); }
.lp-note--link > span { flex: 1; }
.lp-note--block { align-items: flex-start; }
.lp-note--block p { margin: 4px 0 0; }
.lp-note__list { margin: 6px 0 0; padding-inline-start: 18px; line-height: 1.9; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
a.lp-chip, a.lp-chip:hover { text-decoration: none; }
.lp-section-title--red { color: var(--st-red-ink); }
.lp-section-title--red::after { background: var(--st-red-soft); }
a.lp-kpi, a.lp-kpi:hover { text-decoration: none; color: inherit; }
a.lp-kpi:hover { border-color: var(--primary); }
/* ستونِ عملِ ثبتِ قیاس: پارشالِ دست‌نخورده‌ی _gheyas-register + فرمِ تیک/تطبیق، زیرِ هم */
.lp-td--pqact { white-space: normal; text-align: start; }
.lp-td--pqact .lp-inline-form { display: flex; margin-top: 6px; }
.lp-td--pqact .lp-tick .lp-input { max-width: 260px; height: 32px; }
.lp-root .gw-box { gap: 6px; }
.lp-root .gw-note { border-radius: var(--radius-md); font-size: 12.5px; }
.lp-root .gc-chip { font-weight: 600; border-color: transparent; }
.lp-root .gc-chip.t-red { background: var(--st-red-soft); color: var(--st-red-ink); }
.lp-root .gc-chip.t-amber { background: var(--st-orange-soft); color: var(--st-orange-ink); }
.lp-root .gc-chip.t-blue { background: var(--st-blue-soft); color: var(--st-blue-ink); }
.lp-root .gc-chip.t-grey { background: var(--st-grey-soft); color: var(--st-grey-ink); }
.lp-td--gheyas .lp-gc { display: block; margin-bottom: 4px; }
/* بخش‌های بسته‌ی پایینِ صفحه (details) */
.lp-disclosure > summary::-webkit-details-marker { display: none; }
.lp-disclosure > summary { list-style: none; }
.lp-disclosure--poslog h3 { font-size: 14px; margin: 0 0 8px; }
.lp-root .lp-disclosure .flash { border-radius: var(--radius-md); }
/* جدولِ لاگِ کارتخوان (pq-sheet ِ پارشالِ دست‌نخورده) — همان قواعدِ قدیمِ pinv-queue، از بیرون */
.lp-root .lp-disclosure .pq-sheet { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); }
.lp-root .lp-disclosure .pq-sheet th { font-size: 11.5px; color: var(--ink-3); padding: 6px; text-align: start; border-bottom: 1px solid var(--line); }
.lp-root .lp-disclosure .pq-sheet td { padding: 6px; border-bottom: 1px dashed var(--line); }
/* مودالِ «صاحب حساب» (همان شناسه‌ها) */
.lp-dialog { border: 0; border-radius: var(--radius-xl); padding: 20px; width: min(440px, 92vw); box-shadow: var(--shadow-2); color: var(--ink); }
.lp-dialog__title { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.lp-dialog::backdrop { background: var(--overlay); }
.lp-pop .lp-form { gap: 10px; }
@media print {
  .lp-rowmenus, .lp-drawer--form, .lp-overlay, .lp-chips--links { display: none !important; }
  .lp-table--rc, .lp-table--pq, .lp-table--chq, .lp-table--cql, .lp-table--chq2 { min-width: 0; }
}

/* ========== م۸۸/۳الف — فرم‌ها و پرونده‌ها، بخشِ اول (ثبتِ دریافتی، پروندهٔ مشتری) ========== */
/* فرمِ تک‌کارتی: یادداشت و کارت تا ۷۲۰؛ نوارِ عمل چسبان در پایینِ کارت */
.lp-body--form > .lp-note, .lp-body--form > .lp-card { max-width: 720px; width: 100%; }
.lp-card--form > .lp-form { padding: 16px; }
.lp-card--form .lp-actionbar { margin: 0 -16px -16px; border-width: 1px 0 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: none; }
.lp-field--rel { position: relative; }
/* نتایجِ جست‌وجوی مشتریِ همین فرم (همان #custResults/.ac-item ِ قدیم؛ موقعیتِ absolute از panel.css)، آراسته مثلِ lp-menu —
   فقط درونِ فرمِ دوقلو؛ خودکارتکمیل‌های صفحه‌های قدیمی (که در حالتِ full زیرِ .lp-root ِ پوسته‌اند) دست‌نخورده */
.lp-body--form #custResults.autocomplete { border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); background: var(--surface); padding: 6px; z-index: 45; }
.lp-body--form #custResults .ac-item { display: flex; align-items: center; height: 36px; padding: 0 10px; border-radius: var(--radius-md); border-bottom: 0; font-size: 14px; cursor: pointer; }
.lp-body--form #custResults .ac-item:hover { background: var(--surface-3); }
/* «از فهرست انتخاب شد»: آیکونِ تیک فقط وقتی متنی هست (اسکریپتِ قدیم فقط textContent ِ #custPicked را عوض می‌کند) */
.lp-picked { display: inline-flex; align-items: center; gap: 6px; color: var(--st-green-ink); }
.lp-picked:has(> #custPicked:empty) { display: none; }
/* فیلدهای شرطیِ کارتخوان/حساب: togglePos() ِ قدیم display را block/none می‌کند ⇒ فاصلهٔ برچسب با margin */
#posField > .lp-label, #bankField > .lp-label { margin-bottom: 6px; }
/* جعبهٔ مدرک: دو ورودیِ photos[] ِ قدیم (dz + دوربین در label.photo-btn) درونِ lp-dropzone؛ کلیک روی جعبه (lepanel.js ۹) ورودیِ فایل را باز می‌کند؛
   dz-zone ِ dropzone.js (دسکتاپ) درونِ همین جعبه می‌نشیند و وقتی هست، عنوانِ خودِ جعبه پنهان می‌شود تا دو عنوان نباشد */
.lp-dropzone--files { gap: 8px; }
.lp-dropzone--files.is-invalid { border-color: var(--st-red); }
.lp-root .lp-dropzone--files:has(> .dz-zone) > b { display: none; }
.lp-root .lp-dropzone .dz-zone { border: 0; margin: 0; padding: 2px 0; background: transparent; color: var(--ink-3); font-size: 13px; font-weight: 400; }
.lp-root .lp-dropzone .dz-zone.dz-over { background: var(--primary-soft); border-radius: var(--radius-md); color: var(--primary-ink); }
.lp-root .lp-dropzone input.dz { max-width: 100%; font-size: 13px; color: var(--ink-2); }
.lp-root .lp-dropzone .photo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-h-sm); padding: 0 12px; margin: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.lp-root .lp-dropzone .photo-btn:active { border-color: var(--primary); color: var(--primary-ink); }
.lp-root .lp-dropzone .fp-box { justify-content: center; }
/* پیامِ پس از عمل (session status): toast ِ تیره، پایینِ صفحه؛ با × یا پس از ۷ ثانیه (lepanel.js ۹) می‌رود؛ انیمیشن فقط نرمی */
.lp-toast--page { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(50%); z-index: 80; max-width: calc(100vw - 32px); animation: lp-toast-hide 0s 7s forwards; }
.lp-toast--page .lp-iconbtn { width: 28px; height: 28px; color: var(--on-primary); margin-inline-start: 4px; flex: none; }
.lp-toast--page .lp-iconbtn:hover { background: rgba(255,255,255,.14); color: var(--on-primary); }
@keyframes lp-toast-hide { to { opacity: 0; visibility: hidden; } }
/* پروندهٔ مشتری: سر با آواتار و چیپ‌ها، پنج کاشی، دو ستون، گروه‌های امتیاز، شاخص‌ها */
.lp-page__who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lp-page__who .lp-title { flex-wrap: wrap; font-size: 22px; line-height: 30px; }
.lp-page__who .lp-title .lp-chip { font-size: 12.5px; font-weight: 600; }
.lp-kpis--5 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.lp-kpis--5 .lp-kpi__value { white-space: normal; overflow-wrap: anywhere; }
.lp-kpi.is-grey .lp-kpi__value { color: var(--ink-2); }
.lp-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.lp-kv--wide { grid-template-columns: 150px minmax(0, 1fr); }
.lp-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.lp-metrics b { font-weight: 600; color: var(--ink); }
.lp-scoregroups { display: flex; flex-direction: column; gap: 6px; }
.lp-sg { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.lp-sg__label { flex: 0 0 44%; min-width: 150px; }
.lp-sg .lp-bar { flex: 1; height: 10px; border-radius: 5px; min-width: 80px; }
.lp-sg__val { flex: 0 0 46px; font-weight: 600; }
.lp-reasons { display: flex; gap: 22px; flex-wrap: wrap; }
.lp-root .lp-reason-list { margin: 4px 0 0; padding-inline-start: 18px; list-style: disc; font-size: 13px; line-height: 1.7; }
.lp-section-title--green { color: var(--st-green-ink); }
.lp-section-title--green::after { background: var(--st-green-soft); }
.lp-form--inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; gap: 8px 10px; }
.lp-field--term { width: 150px; }
.lp-table--del { min-width: 900px; }
.lp-table .lp-td--wrap { white-space: normal; overflow-wrap: anywhere; max-width: 320px; }
.lp-table td.lp-empty-row { text-align: center; color: var(--ink-4); height: 72px; }
@media screen and (max-width: 980px) {
  .lp-toast--page { bottom: 78px; }
  .lp-cols-2 { grid-template-columns: minmax(0, 1fr); }
  .lp-kpis--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-kpis--5 > .lp-kpi:first-child { grid-column: 1 / -1; }
  .lp-page__who .lp-title { font-size: 20px; line-height: 28px; }
  .lp-sg__label { flex-basis: 40%; min-width: 110px; }
}
@media print {
  .lp-toast--page, .lp-card--form .lp-actionbar { display: none; }
  .lp-cols-2 { grid-template-columns: minmax(0, 1fr); }
  .lp-table--del { min-width: 0; }
}

/* م۸۹/۲ (۰۱۳) — موبایل: vitrin.css به body زیرِ ۹۸۰ overflow-x:hidden می‌دهد ⇒ body ظرفِ اسکرول می‌شود و position:sticky ِ پوستِ نو نمی‌چسبد. clip ظرفِ اسکرول نمی‌سازد. */
@media screen and (max-width: 980px) { body.lp-skin { overflow-x: clip; overflow-y: visible; } }

/* م۸۹/۲ (۰۱۳-ب) — خانوادهٔ «چسبانِ سطحِ صفحهٔ قالب‌های قدیم در برابرِ نوارهای پوسته» (جاروی مرورگرِ ۰۸/۰۴: ۳۹۰ و ۱۲۸۰ ِ بی‌تب، با کلیدِ تکی):
   top:0/6px ِ قدیم زیرِ نوارِ بالای چسبانِ پوسته می‌رفت (۰۱۳ آن را در موبایل هم فعال کرد) ⇒ زیرِ نوار؛ bottom:8px ِ قدیم در موبایل بالای نوارِ پایین. سرِ جدول‌ها (th، z1) زیرِ نوار پنهان می‌مانند — بی‌اثر. */
body.lp-skin:has(.lp-topbar) :is(.cm-pulse, .ps-bar, .ow-toolbar, .pb-search, .pl-wrap .pl-bulk) { top: var(--topbar-h) !important; }
body.lp-skin:has(.lp-topbar) #owBulk { top: calc(var(--topbar-h) + 6px) !important; }
@media screen and (max-width: 980px) { body.lp-skin:has(.lp-bottomnav) :is(.pr-confirm, .pv-actions) { bottom: 70px; } }
