/* T-1903 (№25): «Настройки → Пороги и пределы» — ПК / планшет / телефон, без горизонтальной прокрутки */
.th-entry { margin-top: 16px; }
.th-entry-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line, #d9dee7); border-radius: 12px; background: var(--card, #fff); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.th-entry-btn[aria-expanded="true"] span { transform: rotate(90deg); }
.th-root { display: grid; gap: 14px; margin-top: 12px; min-width: 0; }
.th-root .panel { padding: 14px; border: 1px solid var(--line, #d9dee7); border-radius: 12px; background: var(--card, #fff); min-width: 0; }
.th-head h1 { margin: 2px 0 6px; font-size: 22px; }
.th-head p, .th-root .panel > p { margin: 0 0 8px; color: var(--muted, #667085); }
.th-group h2, .th-journal h2, .th-tax h2 { margin: 0 0 10px; font-size: 17px; }
.th-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 6px 14px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line, #eef0f4); }
.th-row:first-of-type { border-top: 0; }
.th-name { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; min-width: 0; }
.th-name small { flex-basis: 100%; color: var(--muted, #667085); overflow-wrap: anywhere; }
.th-tag { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--chip, #eef2ff); }
.th-tag.money { background: #fff4e5; }
.th-later { color: #b45309 !important; }
.th-bad, .th-err, .th-alert { color: #b42318 !important; }
.th-err { grid-column: 1 / -1; }
.th-field { display: grid; gap: 4px; min-width: 0; }
.th-cur { font-size: 12px; color: var(--muted, #667085); }
.th-wrap { display: flex; align-items: center; gap: 6px; }
.th-wrap input { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line, #d0d5dd); border-radius: 8px; font: inherit; }
.th-wrap input[aria-invalid="true"] { border-color: #b42318; }
.th-wrap input[readonly], .th-wrap input:disabled { background: var(--bg-soft, #f4f5f7); }
.th-unit { white-space: nowrap; }
.th-reset { white-space: nowrap; }
.th-save { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.th-why { color: var(--muted, #667085); }
.th-feedback.th-bad { color: #b42318; }
.th-dialog { padding: 14px; border: 2px solid var(--accent, #2563eb); border-radius: 12px; background: var(--card, #fff); }
.th-dialog h3 { margin: 0 0 8px; }
.th-dialog ul { margin: 0 0 8px; padding-left: 18px; }
.th-dialog em { color: #b45309; font-style: normal; }
.th-loosen { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-weight: 600; }
.th-dialog-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.th-jhead, .th-jrow { display: grid; grid-template-columns: 90px 120px minmax(0, 1fr) minmax(0, 1fr) 90px; gap: 8px;
  padding: 6px 0; border-top: 1px solid var(--line, #eef0f4); min-width: 0; }
.th-jhead { font-size: 12px; color: var(--muted, #667085); border-top: 0; }
.th-jrow > * { overflow-wrap: anywhere; min-width: 0; }

/* планшет */
@media (max-width: 1024px) {
  .th-row { grid-template-columns: minmax(0, 1fr) 180px; }
  .th-reset { grid-column: 2; justify-self: start; }
  .th-jhead, .th-jrow { grid-template-columns: 80px 100px minmax(0, 1fr) minmax(0, 1fr); }
  .th-jhead span:last-child, .th-jrow > :last-child { display: none; }
}
/* телефон */
@media (max-width: 640px) {
  .th-row { grid-template-columns: minmax(0, 1fr); }
  .th-reset { grid-column: 1; }
  .th-jhead { display: none; }
  .th-jrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .th-save .btn { width: 100%; }
}
