.toast-banner {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--toast-bg); border: 1px solid var(--border-strong); color: var(--toast-text); padding: 12px 20px;
  border-radius: 20px; font-size: 14px; font-weight: 600; box-shadow: var(--sheet-shadow);
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 10005; pointer-events: none; max-width: 90%; text-align: center;
}
.toast-banner.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { background: var(--toast-err-bg); border-color: var(--toast-err-border); }

/* Статус сметы: цветная точка и подпись (стиль Gata) */
.status-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0; background: transparent; font-size: 16px; font-weight: 700; white-space: nowrap; color: var(--text-muted); }
.status-pill::before { content: ""; width: 9px; height: 9px; border-radius: 5px; background: currentColor; flex-shrink: 0; }
.status-pill.draft { color: var(--status-draft-text); }
.status-pill.draft::before { background: transparent; border: 1.5px solid currentColor; box-sizing: border-box; }
.status-pill.ready { color: var(--status-ready-text); }
.status-pill.sent { color: var(--status-sent-text); }
.status-pill.viewed { color: var(--status-viewed-text); }
.status-pill.accepted { color: var(--status-accepted-text); }
.status-pill.expired { color: var(--status-expired-text); }
.status-pill.declined { color: var(--status-declined-text); }

.history-decline-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
}
.decline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  border: 1.5px solid transparent;
  user-select: none;
}
.decline-badge-icon {
  font-size: 18px;
  line-height: 1;
}
.decline-badge-text {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.decline-badge-expensive {
  background: var(--dec-expensive-bg);
  border-color: var(--dec-expensive-border);
  color: var(--dec-expensive-text);
}
.decline-badge-other_master {
  background: var(--dec-other-master-bg);
  border-color: var(--dec-other-master-border);
  color: var(--dec-other-master-text);
}
.decline-badge-postponed {
  background: var(--dec-postponed-bg);
  border-color: var(--dec-postponed-border);
  color: var(--dec-postponed-text);
}
.decline-badge-no_answer {
  background: var(--dec-no-answer-bg);
  border-color: var(--dec-no-answer-border);
  color: var(--dec-no-answer-text);
}
.decline-badge-other {
  background: var(--dec-other-bg);
  border-color: var(--dec-other-border);
  color: var(--dec-other-text);
}

.step-segment-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  min-height: 56px;
  height: 56px;
  background: var(--surface-active);
  border: none;
  border-radius: 12px;
  padding: 4px;
  box-sizing: border-box;
}

.step-segment-btn {
  flex: 1;
  min-height: 48px;
  height: 100%;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step-segment-btn:active {
  transform: scale(0.98);
}
.step-segment-btn.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.segment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: none;
  padding: 14px;
  margin-bottom: 12px;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.segment-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 48px;
  width: 100%;
}
.seg-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  width: 100%;
  gap: 8px;
}
.seg-title-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}
.segment-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: break-word;
}
.segment-count {
  font-size: 17px;
  color: var(--text-muted);
  font-weight: 500;
}
.segment-hint-open {
  font-size: 13px;
  color: var(--sec-color);
  font-weight: 600;
}
.seg-actions-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.seg-chevron-icon {
  font-size: 20px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: rotate(0deg);
}
.segment-card:not(.is-collapsed) .seg-chevron-icon {
  transform: rotate(180deg);
  color: var(--sec-color);
}

.segment-card.is-collapsed .items-table { display: none; }
.items-table { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

.item-card { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border); min-height: 50px; }
.item-card.is-empty { background: var(--warning-bg); border-color: var(--warning-border); }
.item-title { font-size: var(--font-base); font-weight: 600; overflow-wrap: break-word; color: var(--text); }
.item-bottom-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; }
.price-field { display: flex; align-items: center; gap: 8px; min-width: 0; }
.price-unit { font-size: 15px; color: var(--text-muted); font-weight: 500; }
.qty-input { height: var(--btn-min-h, 48px); min-height: var(--btn-min-h, 48px); width: 110px; border-radius: 10px; border: var(--input-border-width) solid var(--border-strong); background: var(--input-bg); color: var(--text); font-size: 17px; font-weight: 600; padding: 0 8px; text-align: center; }
.save-check { font-size: 18px; color: var(--success); font-weight: 700; opacity: 0; transform: scale(0.6); transition: opacity 0.25s, transform 0.25s; }
.save-check.visible { opacity: 1; transform: scale(1); }
.auto-badge { font-size: 11px; background: var(--sec-bg-tint); color: var(--sec-color); padding: 4px 8px; border-radius: 6px; font-weight: 700; }

.modal-overlay { position: fixed; inset: 0; background: var(--overlay-bg); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; z-index: 10000; }
.modal-card { width: 100%; max-width: 640px; background: var(--surface-2); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; padding: 20px 18px calc(24px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border-strong); box-shadow: var(--sheet-shadow); max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; min-height: 48px; }
.modal-header h3 { font-size: 19px; font-weight: 700; color: var(--text); }
/* Крестик «Закрыть»: крупный и заметный, чтобы было видно, что на него можно нажать */
.modal-close-btn {
  flex: 0 0 auto; width: 48px; height: 48px; margin-left: 12px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--btn2-bg); border: 1.5px solid var(--btn2-border); box-shadow: var(--btn2-shadow); color: var(--btn2-text);
}
.modal-close-btn svg { display: block; }
.modal-close-btn:active { background: var(--btn2-bg-active); transform: scale(0.95); }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.modal-actions .btn { flex: 1; min-height: 48px; }

.swipe-container { position: relative; overflow: hidden; border-radius: 16px; margin-bottom: 14px; touch-action: pan-y; }
.swipe-action-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; font-size: 15px; font-weight: 700; border-radius: 16px; }
.swipe-bg-open { background: var(--sec-bg-tint); color: var(--sec-color); justify-content: flex-start; gap: 10px; }
.swipe-bg-delete { background: var(--danger-bg); color: var(--danger); justify-content: flex-end; gap: 10px; }
.swipe-content { position: relative; z-index: 2; transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1); margin-bottom: 0 !important; }
.swipe-content.swiping { transition: none; }

.add-seg-btn {
  min-width: 48px;
  min-height: 48px;
  width: 100%;
  height: auto;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: var(--btn-outline-width) solid var(--border-strong);
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  white-space: normal;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
}
.add-seg-btn:active {
  background: var(--surface-active);
  transform: scale(0.95);
}

.unit-picker-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.unit-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.unit-chip {
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: var(--btn-outline-width) solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.unit-chip:active {
  transform: scale(0.96);
}
.unit-chip.active {
  border-color: var(--sec-color);
  background: var(--sec-bg-tint);
  color: var(--sec-color);
  font-weight: 700;
}
.unit-custom-row {
  margin-top: 4px;
}
.unit-badge-btn {
  min-height: 48px;
  min-width: 52px;
  padding: 8px 12px;
  border-radius: 10px;
  border: var(--btn-outline-width) solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  white-space: nowrap;
}
.unit-badge-btn:active {
  transform: scale(0.96);
  background: var(--surface-active);
}

.calc-sheet-card {
  max-height: 90vh;
  overflow-y: auto;
}
.calc-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.calc-choose-btn {
  justify-content: flex-start;
  text-align: left;
  padding: 14px;
}
.calc-toggle-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.calc-toggle-row .btn-filter {
  flex: 1;
  min-height: 44px;
  height: 44px;
  font-size: 15px;
}
.calc-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.calc-op-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
}
.calc-res-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.calc-res-row:active {
  background: var(--surface-active);
}
.calc-res-row.selected {
  border-color: var(--sec-color);
  background: var(--sec-bg-tint);
}
.calc-res-label {
  font-size: 15px;
  font-weight: 600;
}
.calc-res-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.calc-res-val.main {
  font-size: 24px;
  font-weight: 900;
  color: var(--sec-color);
}

.price-field .unit-badge-btn {
  display: inline-block;
  flex: 0 1 auto;
  width: max-content;
  max-width: 128px;
  height: 48px;
  line-height: 30px;
  padding: 8px 10px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-draft-reset-text {
  min-height: 48px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--danger);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.btn-draft-reset-text:active {
  opacity: 0.75;
}

.est-step1-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.est-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.est-step1-label {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-muted);
}
.est-step1-input {
  min-height: 54px;
  height: 54px;
}
.est-step1-input:focus {
  border: 1.5px solid var(--accent-border);
  box-shadow: none;
}

.btn-add-sec-bottom {
  width: 100%;
  min-height: 54px;
  background: var(--surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-btn);
  color: var(--text);
  font-size: var(--font-base);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
}
.btn-add-sec-bottom:active {
  background: var(--surface-active);
  transform: scale(0.99);
}

.sec-area-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2px 0 10px;
  border-bottom: 1px solid var(--border);
}
.sec-area-field-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sec-area-label {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.sec-area-input {
  width: 120px;
  min-height: 48px;
  height: 48px;
  text-align: center;
  font-weight: 700;
}
.sec-area-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-calc-area {
  min-height: 48px;
  height: 48px;
  padding: 0 14px;
  gap: 6px;
  font-size: 17px;
}
.rename-sec-btn {
  min-height: 48px;
  height: 48px;
  width: 48px;
  min-width: 48px;
  padding: 0;
}

.sec-active-lines {
  display: flex;
  flex-direction: column;
}
.work-line-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.work-line-row:last-child {
  border-bottom: none;
}
.work-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.work-row-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}
.work-line-sum {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}
.del-line-row-btn {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  margin: -8px -6px -8px 0;
  color: var(--text-muted);
}
.work-row-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.work-input-label {
  margin: 0 0 4px 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-muted);
}
.work-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.line-unit-btn {
  min-height: 48px;
  height: 48px;
  padding: 0 12px;
  gap: 6px;
  font-size: 17px;
  font-weight: 700;
  border: 1.5px solid var(--btn2-border);
  background: var(--btn2-bg);
  box-shadow: var(--btn2-shadow);
  color: var(--btn2-text);
}

.mat-price-inline-btn {
  min-height: 48px;
  height: 48px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px dashed var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.mat-price-inline-btn.has-price {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.mat-price-inline-btn:active {
  transform: scale(0.98);
  background: var(--surface-active);
}

.alt-units-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}
.alt-unit-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
  background: transparent;
  cursor: pointer;
  user-select: none;
  min-height: 48px;
}
.alt-unit-row:active {
  background: var(--surface-active);
}
.alt-unit-main-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  flex-wrap: wrap;
}
.alt-unit-note {
  font-size: 13px;
  color: var(--text-muted);
}
.btn-add-alt-unit {
  min-height: 48px;
  align-self: flex-start;
  padding: 0 12px;
  font-size: 17px;
  font-weight: 600;
  border: 1.5px dashed var(--sec-color);
  border-radius: 10px;
  background: transparent;
  text-align: left;
  color: var(--sec-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.btn-add-alt-unit:active {
  opacity: 0.75;
}

.btn-sec-add-work {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
  padding: 10px 12px;
  border: none;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--sec-color);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-sec-add-work:active {
  background: var(--surface-active);
}

.seg-delete-footer-btn {
  width: 100%;
  margin-top: 8px;
  min-height: 48px;
  font-size: 17px;
  font-weight: 600;
  color: var(--danger);
  border: 1px solid var(--danger);
  background: transparent;
  gap: 8px;
}
.seg-delete-footer-btn:active {
  background: var(--danger-bg);
}
.segment-card .item-card {
  min-width: 0;
  overflow: hidden;
}
/* === Смета: акценты разделов и работ (своё количество и подпись у каждой работы) === */
.segment-card {
  position: relative;
  overflow: hidden;
  padding-left: 19px;
}
.segment-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--seg-color, var(--sec-color));
  z-index: 1;
}
.segment-card:not(.is-collapsed) .segment-header {
  background: var(--seg-tint, var(--sec-bg-tint));
  width: auto;
  margin: -14px -14px 0 -19px;
  padding: 14px 14px 12px 19px;
}
.segment-card:not(.is-collapsed) .seg-chevron-icon {
  color: var(--seg-color, var(--sec-color));
}
.seg-sum {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.seg-sum:empty { display: none; }
.segment-count.is-todo {
  color: var(--warning);
}
.segment-card .items-table {
  margin-top: 0;
  border-top: none;
}

.sec-tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sec-tools-row .btn {
  width: auto;
  min-height: 48px;
  padding: 0 14px;
  gap: 6px;
  font-size: 17px;
}
.sec-empty-note {
  font-size: 17px;
  color: var(--text-muted);
  padding: 4px 0;
}

.sec-active-lines {
  gap: 10px;
}
.segment-card .work-line-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.segment-card .work-line-row:last-child {
  border-bottom: 1px solid var(--border);
}
.work-row-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.work-place-btn {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  max-width: 100%;
}
.work-place-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-place-btn.has-place {
  border: 1px solid transparent;
  background: var(--seg-tint, var(--sec-bg-tint));
  color: var(--seg-color, var(--sec-color));
}
.work-qty-wrap {
  display: flex;
  gap: 6px;
}
.work-qty-wrap .line-qty-field {
  flex: 1;
  min-width: 0;
}
.line-qty-field,
.line-price-field {
  min-height: 48px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
}
.line-qty-field.is-missing {
  border-color: var(--warning-border);
  background: var(--warning-bg);
}
.btn-line-calc {
  width: 48px;
  min-width: 48px;
  height: 48px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--seg-color, var(--sec-color));
  background: var(--surface);
  color: var(--seg-color, var(--sec-color));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-line-calc:active,
.work-place-btn:active,
.btn-line-copy:active {
  transform: scale(0.97);
}
.btn-line-copy {
  min-height: 48px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* «Добавить работу»: контурная кнопка цветом раздела, в пустом разделе залитая */
.segment-card .btn-sec-add-work {
  margin-top: 4px;
  min-height: 52px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--seg-color, var(--sec-color));
  background: var(--surface);
  color: var(--seg-color, var(--sec-color));
  font-weight: 700;
}
.segment-card .btn-sec-add-work.is-empty {
  border-color: transparent;
  background: var(--seg-color, var(--sec-color));
  color: var(--accent-on);
}
/* «Удалить раздел»: тихая надпись внизу, не спорит с главным действием */
.segment-card .seg-delete-footer-btn {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
  border: none;
  background: transparent;
  color: var(--danger);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}
.segment-card .seg-delete-footer-btn:active {
  background: var(--danger-bg);
}

/* Подсказка «Цены в прайсе изменились» */
.price-change-hint {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  border: 1px solid var(--warning-border);
  background: var(--warning-bg);
}
.price-change-hint-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.price-change-hint-sub {
  font-size: 17px;
  color: var(--text-muted);
}
.price-change-hint-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.price-change-hint-btns .btn {
  min-height: 48px;
}

/* Панель «Где делается работа» */
.place-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.place-chip {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 24px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}
.place-chip.active {
  border-color: var(--sec-color);
  background: var(--sec-bg-tint);
  color: var(--sec-color);
}
.place-chip:active { transform: scale(0.97); }
.place-own-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.place-own-row .form-control { flex: 1; min-width: 0; min-height: 48px; }
.place-own-row .btn { width: auto; min-height: 48px; padding: 0 16px; }
.place-sheet-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.place-sheet-btns .btn { min-height: 48px; }
.alt-units-list:empty { display: none; }

/* Работа в смете сворачивается в одну строку: название, сумма, «где · сколько» */
.work-fold-btn {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  margin: -8px -6px -8px 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.work-line-row.is-folded .work-fold-btn { transform: rotate(180deg); }
.work-row-title { cursor: pointer; }
.work-fold-sub { display: none; }
.work-line-row.is-folded .work-fold-sub {
  display: block;
  margin-top: -2px;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
}
.work-fold-todo { color: var(--warning); font-weight: 600; }
.work-line-row.is-folded .del-line-row-btn,
.work-line-row.is-folded .work-place-btn,
.work-line-row.is-folded .work-row-inputs,
.work-line-row.is-folded .work-unit-row,
.work-line-row.is-folded .alt-units-list,
.work-line-row.is-folded .work-row-actions {
  display: none;
}
.work-line-row.is-folded { padding-top: 10px; padding-bottom: 10px; }

/* Скидка: быстрые проценты и «было → станет» */
.disc-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.disc-chip { min-height: 48px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 18px; font-weight: 700; font-family: inherit; cursor: pointer; }
.disc-chip.active { border-color: var(--accent-ink); background: var(--accent-tint, var(--surface-active)); color: var(--accent-ink); }
.disc-preview { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2, var(--surface-active)); font-size: 17px; color: var(--text); }
.disc-was { color: var(--text-muted); text-decoration: line-through; }
.disc-now { font-size: 22px; font-weight: 800; }
.disc-off { flex-basis: 100%; color: var(--success, #047857); font-weight: 700; }
