/* ===================================================================
   لیست‌ساز — چیدمان دو ستونه، سازندهٔ فیلتر AND/OR، جدول چسبان
   فقط کلاس‌های «ls-» اینجاست؛ توکن‌های رنگ از app.css می‌آید تا حالت
   تاریک بدون بازنویسی کار کند.
   =================================================================== */

.ls-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  --ls-radius: 18px;
  --ls-gap: 14px;
}

/* ------------------------------- هدر صفحه ------------------------------- */
.ls-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--ls-radius);
  padding: 18px 20px;
  color: #eafff8;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(245, 158, 11, .22), transparent 55%),
    linear-gradient(120deg, #0d3b34 0%, #116a5a 58%, #0d3b34 100%);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.ls-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: .35;
  pointer-events: none;
}
.ls-hero > * { position: relative; z-index: 1; }
.ls-hero-ic {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.ls-hero-txt { flex: 1; min-width: 210px; }
.ls-hero h2 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -.01em;
}
.ls-hero p {
  margin: 4px 0 0;
  font-size: var(--fs-xs);
  color: rgba(234, 255, 248, .78);
  line-height: 1.7;
}
.ls-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ls-kpi {
  min-width: 92px;
  padding: 7px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(4px);
}
.ls-kpi b {
  display: block;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.ls-kpi span {
  display: block;
  font-size: var(--fs-3xs);
  color: rgba(234, 255, 248, .72);
  white-space: nowrap;
}
.ls-kpi.gold b { color: #ffd894; }

/* ------------------------------- چیدمان ------------------------------- */
.ls-layout {
  display: grid;
  grid-template-columns: 322px minmax(0, 1fr);
  gap: var(--ls-gap);
  align-items: start;
}
.ls-side {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc((100vh - 130px) / var(--app-zoom, 1));
  overflow: auto;
  padding-inline-end: 2px;
  scrollbar-width: thin;
}
/* کارت‌های ستون کنار نباید فشرده شوند؛ وگرنه دکمه‌های انتهای کارت بریده می‌شود */
.ls-side > .ls-panel { flex: 0 0 auto; }
.ls-side::-webkit-scrollbar { width: 6px; }
.ls-side::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 35%, transparent);
  border-radius: 99px;
}
.ls-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* کارت نتیجه تا پایین پنجره کشیده می‌شود تا فضای خالی نماند */
  min-height: calc((100vh - 124px) / var(--app-zoom, 1));
}

/* ------------------------------- پنل‌ها ------------------------------- */
.ls-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--ls-radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.ls-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), transparent);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--ink);
}
.ls-panel-head .ic { color: var(--accent-2); flex: none; }
.ls-panel-head .spacer { flex: 1; }
.ls-panel-head .hint {
  font-size: var(--fs-3xs);
  color: var(--muted);
  font-weight: 500;
}
.ls-panel-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }

/* ----------------------------- کارت نوع لیست ----------------------------- */
.ls-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.ls-type {
  appearance: none;
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  text-align: start;
  font-size: var(--fs-xs);
  font-weight: 600;
  transition: transform var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast), background var(--dur-fast),
              box-shadow var(--dur-fast);
}
.ls-type:last-child:nth-child(odd) { grid-column: span 2; }
.ls-type:hover {
  border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line));
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}
.ls-type .ic { color: var(--accent-2); flex: none; }
.ls-type[aria-pressed="true"] {
  background: linear-gradient(135deg, #116a5a, #0d3b34);
  border-color: #0d3b34;
  color: #effffa;
  box-shadow: 0 6px 16px rgba(13, 59, 52, .28);
}
.ls-type[aria-pressed="true"] .ic { color: #ffd894; }

/* ------------------------------- فیلدها ------------------------------- */
.ls-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ls-field > label {
  font-size: var(--fs-3xs);
  font-weight: 600;
  color: var(--muted);
}
.ls-field input,
.ls-field select,
.ls-cond input,
.ls-cond select {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: var(--fs-xs);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 9px;
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.ls-field input:focus,
.ls-field select:focus,
.ls-cond input:focus,
.ls-cond select:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--ring);
}
.ls-field input[dir="ltr"] { text-align: right; font-variant-numeric: tabular-nums; }
.ls-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.ls-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  font-size: var(--fs-xs);
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}
.ls-check input { width: 15px; height: 15px; accent-color: var(--accent-2); }
.ls-check:has(input:checked) {
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent-2) 55%, var(--line));
  background: color-mix(in srgb, var(--accent-2) 8%, var(--paper));
}

/* --------------------------- چیپ‌های فیلتر سریع --------------------------- */
.ls-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ls-chip {
  appearance: none;
  font: inherit;
  cursor: pointer;
  font-size: var(--fs-3xs);
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  transition: all var(--dur-fast) var(--ease-out);
}
.ls-chip:hover { color: var(--ink); border-color: var(--accent-2); }
.ls-chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent-2) 14%, var(--paper));
  border-color: color-mix(in srgb, var(--accent-2) 60%, var(--line));
  color: var(--accent-2);
}

/* ------------------------------ سگمنت AND/OR ------------------------------ */
.ls-seg {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px;
  gap: 3px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.ls-seg button {
  appearance: none;
  font: inherit;
  cursor: pointer;
  border: 0;
  white-space: nowrap;
  border-radius: 8px;
  padding: 5px 11px;
  font-size: var(--fs-3xs);
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  transition: all var(--dur-fast);
}
.ls-seg button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--accent-2);
  box-shadow: var(--shadow-xs);
}
.ls-seg button[aria-pressed="true"].or { color: var(--accent); }

/* --------------------------- سازندهٔ فیلتر پیشرفته --------------------------- */
.ls-builder { display: flex; flex-direction: column; gap: 8px; }
.ls-builder-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ls-builder-bar .spacer { flex: 1; }
.ls-mini {
  appearance: none;
  font: inherit;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-3xs);
  font-weight: 700;
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 8%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, var(--line));
  border-radius: 9px;
  padding: 4px 8px;
  transition: all var(--dur-fast);
}
.ls-mini:hover {
  background: color-mix(in srgb, var(--accent-2) 16%, var(--paper));
  border-color: var(--accent-2);
}
.ls-mini.gold {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--paper));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.ls-mini.gold:hover { border-color: var(--accent); }
.ls-mini.danger { color: var(--bad); background: transparent; border-color: transparent; }
.ls-mini.danger:hover { background: color-mix(in srgb, var(--bad) 10%, var(--paper)); }

.ls-conds { display: flex; flex-direction: column; gap: 7px; }
.ls-cond {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr) minmax(0, 1.2fr) 26px;
  gap: 5px;
  align-items: center;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.ls-cond .ls-field { gap: 2px; }
.ls-cond .ls-field input,
.ls-cond .ls-field select { padding: 5px 7px; background: var(--paper); }
.ls-cond .ls-range { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ls-cond .x {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  transition: all var(--dur-fast);
}
.ls-cond .x:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }

.ls-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px 8px 8px 5px;
  border-radius: 13px;
  border-inline-start: 3px solid color-mix(in srgb, var(--accent) 60%, var(--line));
  background: color-mix(in srgb, var(--accent) 4%, var(--paper));
}
.ls-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: var(--fs-3xs);
  font-weight: 700;
  color: var(--muted);
}
.ls-group-head .spacer { flex: 1; }
.ls-group .ls-cond { background: var(--paper); }
.ls-none {
  font-size: var(--fs-3xs);
  color: var(--muted);
  text-align: center;
  padding: 7px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

/* ------------------------------ انتخاب ستون‌ها ------------------------------ */
.ls-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-3xs);
  color: var(--muted);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface-2));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 9px;
  line-height: 1.7;
}
.ls-note b { color: var(--accent-2); font-size: var(--fs-2xs); }

.ls-cols { display: flex; flex-wrap: wrap; gap: 5px; }
.ls-col {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-3xs);
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  cursor: pointer;
  user-select: none;
  transition: all var(--dur-fast);
}
.ls-col input { display: none; }
.ls-col:has(input:checked) {
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line));
  background: color-mix(in srgb, var(--accent-2) 10%, var(--paper));
}
.ls-col:has(input:checked)::before { content: "✓"; font-size: 9px; }

/* ------------------------------- نوار ابزار ------------------------------- */
.ls-tool {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-xs);
}
.ls-search {
  position: relative;
  flex: 1;
  min-width: 180px;
}
.ls-search .ic {
  position: absolute;
  inset-inline-start: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.ls-search input {
  width: 100%;
  font: inherit;
  font-size: var(--fs-xs);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 32px;
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.ls-search input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--ring); }
.ls-search kbd {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 4px;
  background: var(--surface-2);
}
.ls-tool .sep { width: 1px; height: 22px; background: var(--line); }
.ls-icon-btn {
  appearance: none;
  cursor: pointer;
  width: 33px;
  height: 33px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  transition: all var(--dur-fast) var(--ease-out);
}
.ls-icon-btn:hover { color: var(--accent-2); border-color: var(--accent-2); transform: translateY(-1px); }
.ls-icon-btn[aria-pressed="true"] {
  color: #fff;
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.ls-icon-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.ls-pop-wrap { position: relative; }
.ls-pop {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  z-index: var(--z-dropdown);
  width: 250px;
  padding: 10px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: lsPop var(--dur-base) var(--ease-out);
}
@keyframes lsPop {
  from { opacity: 0; transform: translateY(-5px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.ls-pop .ttl { font-size: var(--fs-3xs); font-weight: 700; color: var(--muted); }
.ls-pop .row { gap: 6px; }

/* -------------------------------- نتیجه -------------------------------- */
.ls-res {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--ls-radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#ls-out { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.ls-res.is-loading #ls-out {
  opacity: .5;
  filter: saturate(.65);
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
.ls-res.is-loading { cursor: progress; }
.ls-res-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), transparent);
}
.ls-res-head h3 { margin: 0; font-size: var(--fs-sm); font-weight: 800; }
.ls-res-head .meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: var(--fs-3xs);
  color: var(--muted);
}
.ls-res-head .spacer { flex: 1; }
.ls-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-3xs);
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
}
.ls-pill.good {
  color: var(--good);
  border-color: color-mix(in srgb, var(--good) 35%, var(--line));
  background: color-mix(in srgb, var(--good) 8%, var(--paper));
}
.ls-pill.gold {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, var(--paper));
}
.ls-pill.muted { color: var(--muted); }
.ls-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}

.ls-table-wrap {
  overflow: auto;
  flex: 1 1 auto;
  min-height: 180px;
  max-height: calc((100vh - 258px) / var(--app-zoom, 1));
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.ls-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-xs);
}
.ls-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: linear-gradient(180deg, #14584c, #0d3b34);
  color: #f2fffa;
  font-weight: 700;
  font-size: var(--fs-3xs);
  text-align: center;
  padding: 9px 8px;
  white-space: nowrap;
  border-bottom: 1px solid #0d3b34;
}
.ls-table th:first-child { border-start-start-radius: 0; }
.ls-table th[data-sort] { cursor: pointer; user-select: none; }
.ls-table th[data-sort]:hover { background: #186b5c; }
/* نشانگر مرتب‌سازی مشترک (app.css) روی سربرگ تیره کم‌رنگ دیده می‌شود */
.ls-table th.th-sortable::after {
  margin-inline-start: 4px;
  font-size: 10px;
  color: rgba(242, 255, 250, .42);
}
.ls-table th.th-sortable:hover::after { color: rgba(242, 255, 250, .85); }
.ls-table th.th-sortable.sorted-asc::after,
.ls-table th.th-sortable.sorted-desc::after { color: #f3d28a; opacity: 1; }
.ls-table td {
  padding: 7px 8px;
  text-align: center;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.ls-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 65%, transparent); }
.ls-table tbody tr:hover td { background: color-mix(in srgb, var(--accent-2) 7%, transparent); }
.ls-table td.idx { color: var(--muted); font-variant-numeric: tabular-nums; width: 40px; }
.ls-table td.num { font-variant-numeric: tabular-nums; }
.ls-table td.money { font-variant-numeric: tabular-nums; text-align: start; padding-inline-start: 12px; }
.ls-table td.neg { color: var(--bad); font-weight: 700; }
.ls-table td.name { text-align: start; font-weight: 600; }
.ls-table tfoot td {
  position: sticky;
  bottom: 0;
  background: color-mix(in srgb, var(--accent-2) 9%, var(--paper));
  color: var(--ink);
  font-weight: 800;
  border-top: 2px solid color-mix(in srgb, var(--accent-2) 40%, var(--line));
}
.ls-table tfoot td.lbl { text-align: start; color: var(--accent-2); }

/* تراکم */
.ls-table-wrap[data-density="cozy"] .ls-table td { padding: 4px 7px; font-size: 11.5px; }
.ls-table-wrap[data-density="cozy"] .ls-table th { padding: 6px 7px; }

/* ------------------------------ حالت‌های خالی/خطا ------------------------------ */
.ls-skel { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.ls-skel span {
  display: block;
  height: 15px;
  border-radius: 7px;
  background: linear-gradient(90deg,
    var(--surface-2) 25%,
    color-mix(in srgb, var(--accent-2) 8%, var(--surface-2)) 37%,
    var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: lsShim 1.2s ease-in-out infinite;
}
.ls-skel span:nth-child(even) { width: 88%; }
.ls-skel span:first-child { height: 26px; width: 42%; background: var(--line); animation: none; }
@keyframes lsShim {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}
.ls-empty {
  padding: 42px 18px;
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-sm);
}
.ls-empty .e-ill {
  display: inline-grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  margin-bottom: 10px;
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 9%, var(--paper));
  border: 1px dashed color-mix(in srgb, var(--accent-2) 35%, var(--line));
}
.ls-empty b { display: block; color: var(--ink); margin-bottom: 4px; font-size: var(--fs-sm); }
.ls-empty .row { justify-content: center; margin-top: 10px; }
.ls-error {
  margin: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line));
  background: color-mix(in srgb, var(--bad) 7%, var(--paper));
  color: var(--bad);
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

/* ------------------------------ تمام‌صفحه ------------------------------ */
.ls-main.is-full {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  padding: 12px;
  background: var(--bg);
  overflow: auto;
  gap: 10px;
}
.ls-main.is-full .ls-table-wrap { max-height: calc((100vh - 170px) / var(--app-zoom, 1)); }
.ls-main.is-full .ls-tool { top: 0; }

/* ------------------------------ چاپ؟ ------------------------------ */
@media print {
  .ls-side, .ls-tool, .ls-res-head .spacer, .ls-hero { display: none !important; }
  .ls-layout { display: block; }
  .ls-table-wrap { max-height: none; overflow: visible; }
  .ls-table th { position: static; }
}

/* ------------------------------ واکنش‌گرا ------------------------------ */
@media (max-width: 1180px) {
  .ls-layout { grid-template-columns: 280px minmax(0, 1fr); }
}
@media (max-width: 950px) {
  .ls-layout { grid-template-columns: 1fr; }
  .ls-side { position: static; max-height: none; overflow: visible; }
  .ls-types { grid-template-columns: repeat(3, 1fr); }
  .ls-type:last-child:nth-child(odd) { grid-column: auto; }
  .ls-tool { position: static; }
  .ls-table-wrap { max-height: 58vh; }
}
@media (max-width: 560px) {
  .ls-hero { padding: 14px; }
  .ls-hero-stats { width: 100%; }
  .ls-kpi { flex: 1; min-width: 0; }
  .ls-types { grid-template-columns: 1fr 1fr; }
  .ls-cond { grid-template-columns: 1fr 1fr; }
  .ls-cond .x { justify-self: end; }
  .ls-cond > .ls-field:nth-child(3) { grid-column: span 2; }
}

@media (prefers-reduced-motion: reduce) {
  .ls-pop, .ls-skel span, .ls-type, .ls-icon-btn { animation: none !important; transition: none !important; }
}
