.acc-shell.contract-wide { max-width: 920px; }

.contract-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
}
.contract-toolbar-left { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.contract-save {
  font-size: 12px; font-weight: 700; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.08); color: var(--muted);
}
.contract-save.saving { color: #fbbf24; }
.contract-save.saved { color: #86efac; }
.contract-save.error { color: #fca5a5; }

/* Белый лист договора */
.contract-doc {
  background: #fff;
  color: #2a251f;
  border-radius: 12px;
  padding: 24px 28px 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  font-size: 14px;
  line-height: 1.5;
}

.contract-doc-header {
  position: relative;
  text-align: center;
  border-bottom: 2px solid #2a251f;
  padding: 0 130px 8px 0;
  margin-bottom: 12px;
}
.contract-doc-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.15;
}
.contract-doc-header p {
  font-size: 12px;
  color: #6b5f4f;
  text-align: center;
  margin: 0;
  line-height: 1.2;
}
.ct-order-no-field {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.ct-order-no-field label {
  font-size: 13px;
  font-weight: 800;
  color: #2a251f;
  white-space: nowrap;
}
.ct-order-no-field input {
  width: 110px;
  flex: 0 0 110px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  min-height: 36px;
  padding: 4px 10px;
  border: 1.5px solid #d4ccc0;
  border-radius: 8px;
  background: #fff;
  color: #2a251f;
  font-family: inherit;
}
.ct-order-no-field input.ct-fill-empty {
  border-color: #dc2626 !important;
  background: #fffafa;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}
.ct-order-no-field input.ct-fill-ok {
  border-color: #16a34a !important;
  background: #fafffa;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}

/* Блок секции */
.ct-block {
  border: 1px solid #e0d8cc;
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #fff;
}
.ct-block-title {
  background: #f5f0e8;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #4a4238;
  border-bottom: 1px solid #e0d8cc;
}
.ct-block-body { padding: 14px 16px 16px; }

/* Компактный блок «Основные данные» */
.ct-block-head { margin-bottom: 12px; }
.ct-block-head .ct-block-title { padding: 8px 14px; font-size: 12px; }
.ct-block-head .ct-block-body { padding: 10px 14px 12px; }
.ct-grid-tight { gap: 8px 12px; }
.ct-grid-tight + .ct-grid-tight { margin-top: 8px; }
.ct-block-head .ct-field label { font-size: 11px; margin-bottom: 4px; }
.ct-block-head .ct-field input {
  padding: 7px 10px;
  min-height: 36px;
  font-size: 13px;
  border-radius: 6px;
}

/* Компактная строка изделия */
.ct-product-bar {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}
.ct-product-bar-type {
  width: 80px;
  min-width: 80px;
  min-height: 58px;
  grid-column: 1;
  flex-shrink: 0;
  border: 2px solid #d4ccc0;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff 0%, #f3ebe0 55%, #e8dcc8 100%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.12s;
  box-shadow: 0 3px 12px rgba(139, 90, 26, 0.1);
}
.ct-product-icon-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1.15;
}
.ct-product-bar-label {
  font-size: 12px;
  font-weight: 700;
  color: #8b5a1a;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}

.ct-money-wrap {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid #d4ccc0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  min-height: 58px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ct-money-wrap:focus-within {
  border-color: #c8874a;
  box-shadow: 0 0 0 3px rgba(200, 135, 74, 0.12);
}
.ct-money-wrap:has(.ct-money-input.ct-fill-empty) {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}
.ct-money-wrap:has(.ct-money-input.ct-fill-ok) {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}
.ct-money-wrap:has(.ct-money-input.ct-fill-empty:focus) {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}
.ct-money-wrap:has(.ct-money-input.ct-fill-ok:focus) {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}
.ct-money-wrap .ct-money-input {
  flex: 1;
  min-width: 0;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 11px 13px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  min-height: 58px;
  color: #2a251f;
  letter-spacing: 0.02em;
}
.ct-money-wrap .ct-money-input:focus {
  outline: none;
  box-shadow: none !important;
}
.ct-money-wrap .ct-money-input::placeholder {
  font-weight: 500;
  color: #b8aaa0;
}
.ct-money-unit {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  min-width: 46px;
  background: linear-gradient(180deg, #faf6f0 0%, #efe6da 100%);
  color: #8b5a1a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  border-left: 1px solid #e8dfd2;
  white-space: nowrap;
}
.ct-field .ct-money-wrap { min-height: 42px; }
.ct-field .ct-money-wrap .ct-money-input { min-height: 42px; font-size: 14px; padding: 10px 12px; }
.ct-product-bar-cost .ct-money-wrap { min-height: 58px; }

.ct-product-bar-type:hover {
  border-color: #c8874a;
  background: linear-gradient(180deg, #fff 0%, #fff8ef 100%);
  box-shadow: 0 4px 14px rgba(200, 135, 74, 0.18);
  transform: translateY(-1px);
}
.ct-product-bar-type:active { transform: translateY(0); }
.ct-product-bar-name {
  grid-column: 2;
  min-width: 0;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d4ccc0;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: #2a251f;
  min-height: 58px;
}
.ct-product-bar:not(:has(.ct-product-bar-cost:not([hidden]))) .ct-product-bar-name {
  grid-column: 2 / -1;
}
.ct-product-bar-name:focus {
  outline: none;
  border-color: #c8874a;
  box-shadow: 0 0 0 3px rgba(200,135,74,0.12);
}
.ct-product-bar-cost {
  grid-column: 3;
  min-width: 0;
  width: 100%;
}
.ct-product-bar-cost .ct-field-inline {
  margin: 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}
.ct-product-bar-cost .ct-field-inline label {
  font-size: 11px;
  font-weight: 600;
  color: #8a7f70;
  margin-bottom: 4px;
  line-height: 1.2;
}
.ct-product-bar-cost .ct-money-wrap { flex: 1; min-height: 42px; }
.ct-product-bar-cost .ct-money-wrap .ct-money-input { min-height: 42px; }

.ct-product-modal-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 72px;
  padding: 18px 14px;
  border: 2px solid #e8dfd2;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #faf7f2 100%);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.18s, background 0.18s, transform 0.14s, box-shadow 0.18s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}
.ct-product-modal-btn[data-type="kitchen"]:hover { border-color: #c8874a; }
.ct-product-modal-btn[data-type="bedroom"]:hover { border-color: #c4a07a; }
.ct-product-modal-btn[data-type="wardrobe"]:hover { border-color: #9a7b5a; }
.ct-product-modal-btn[data-type="closet"]:hover { border-color: #7a8f7a; }
.ct-product-modal-btn[data-type="other"]:hover { border-color: #8a7f70; }
.ct-product-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(200, 135, 74, 0.16);
  background: #fffcf8;
}
.ct-product-modal-btn.current {
  border-color: #c8874a;
  background: linear-gradient(180deg, #fffaf3 0%, #fff3e3 100%);
  box-shadow: 0 0 0 3px rgba(200, 135, 74, 0.22);
}
.ct-product-modal-btn.current .ct-product-modal-name {
  color: #8b5a1a;
}

.ct-alu-picked {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid #e8dfd2;
  border-radius: 10px;
  background: #faf6f0;
}
.ct-alu-picked img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  flex-shrink: 0;
}
.ct-alu-picked-name {
  font-size: 13px;
  font-weight: 700;
  color: #2a251f;
  margin-bottom: 4px;
}
.ct-alu-picked-text {
  font-size: 12px;
  color: #5c5348;
  line-height: 1.35;
}
.ct-alu-picked-change {
  margin-top: 6px;
  border: 0;
  background: none;
  padding: 0;
  color: #c8874a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.ct-alu-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 200px 28px;
  gap: 10px 12px;
  align-items: center;
  margin: 10px 0;
  padding: 10px 10px 10px 10px;
  border: 1.5px solid #e8dfd2;
  border-radius: 12px;
  background: #faf6f0;
}
.ct-alu-item .alu-img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  align-self: center;
}
.ct-alu-item .alu-name {
  font-size: 14px;
  font-weight: 700;
  color: #2a251f;
}
.ct-alu-item .alu-color {
  font-size: 12px;
  color: #5c5348;
  margin-top: 2px;
}
.ct-alu-item-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  min-width: 150px;
}
.ct-alu-item-side .ct-alu-sum-read {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 10px !important;
  min-width: 0;
  text-align: right;
  user-select: none;
}
.ct-alu-sum-read .alu-sum-label {
  display: block;
  font-size: 11px;
  color: #8a7f70;
  font-weight: 650;
  margin: 0;
  line-height: 1;
}
.ct-alu-sum-usd {
  display: block !important;
  width: 100% !important;
  font-size: 18px;
  font-weight: 800;
  color: #2a251f;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin: 0 !important;
  text-align: right;
}
.ct-alu-sum-uzs {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  font-size: 13px;
  font-weight: 700;
  color: #8b5a1a;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: right;
}
.ct-alu-sum-uzs[hidden] {
  display: none !important;
}
.ct-alu-item-side .ct-alu-picked-change {
  margin-top: 0;
  align-self: flex-end;
}
.ct-alu-item-glass {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.ct-alu-item-glass img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  flex-shrink: 0;
}
.alu-glass-name {
  font-size: 12px;
  font-weight: 650;
  color: #2a251f;
}
.alu-glass-size {
  font-size: 11px;
  color: #5c5348;
  margin-top: 2px;
}
.ct-alu-glass-block {
  margin-top: 14px;
}
.ct-alu-glass-grid {
  grid-template-columns: repeat(3, 1fr);
}
.ct-alu-glass-size {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #8a7f70;
  line-height: 1.25;
}
.ct-alu-glass-empty {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #faf6f0;
  border-radius: 8px;
  color: #9a8f82;
  font-size: 12px;
}
.ct-alu-item .ct-btn-remove {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9a8f82;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  align-self: start;
}
.ct-alu-item .ct-btn-remove:hover { background: #fce8ef; color: #b3261e; }
@media (max-width: 720px) {
  .ct-alu-item { grid-template-columns: 72px minmax(0, 1fr) 28px; }
  .ct-alu-item .alu-img { width: 72px; height: 72px; }
  .ct-alu-item-side {
    grid-column: 1 / 3;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
  }
  .ct-alu-item-side .ct-field { flex: 1; max-width: 180px; }
  .ct-alu-item-side .ct-alu-sum-read { text-align: right; }
}
.ct-alu-modal {
  max-width: 720px;
  width: calc(100% - 24px);
  overflow: auto;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.ct-alu-site-modal {
  max-width: min(1280px, calc(100vw - 16px));
  width: calc(100vw - 16px);
  height: calc(100vh - 16px);
  max-height: calc(100vh - 16px);
  overflow: hidden;
}
.ct-alu-site-frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}
.ct-alu-live-total {
  display: none !important;
}
.ct-alu-item .alu-sum[readonly] {
  background: #f3eee7;
  color: #2a251f;
}
.ct-alu-item .alu-meta {
  font-size: 12px;
  color: #5c5348;
  margin-top: 2px;
}
.ct-alu-modal .ct-modal-head {
  padding: 12px 14px 8px 16px;
  align-items: center;
  flex-shrink: 0;
}
.ct-alu-modal .ct-modal-head h3 {
  font-size: 1.2rem;
  line-height: 1.2;
  white-space: nowrap;
}
.ct-alu-modal-body {
  overflow: auto;
  padding: 8px 16px 10px;
}
  .ct-alu-modal-foot {
  padding: 10px 16px 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.ct-alu-apply {
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: #c8874a;
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.ct-alu-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.ct-alu-type {
  border: 1.5px solid #e8dfd2;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #2a251f;
  cursor: pointer;
}
.ct-alu-type.is-on {
  border-color: #c8874a;
  background: #fff8ef;
  color: #8b5a1a;
  box-shadow: 0 0 0 2px rgba(200, 135, 74, 0.18);
}
.ct-alu-pick-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(140px, 0.8fr);
  gap: 14px;
  align-items: start;
}
.ct-alu-dd-label,
.ct-alu-colors-label {
  font-size: 12px;
  font-weight: 800;
  color: #8b5a1a;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ct-alu-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.ct-alu-photo-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border: 1.5px solid #e8dfd2;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.ct-alu-photo-card img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #faf6f0;
  border-radius: 8px;
}
.ct-alu-photo-card span {
  font-size: 12px;
  font-weight: 650;
  color: #2a251f;
  line-height: 1.25;
}
.ct-alu-photo-card:hover,
.ct-alu-photo-card.is-on {
  border-color: #c8874a;
  background: #fff8ef;
}
.ct-alu-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ct-alu-swatch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 6px;
  border: 1.5px solid #e8dfd2;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}
.ct-alu-swatch.is-on {
  border-color: #c8874a;
  background: #fff8ef;
}
.ct-alu-swatch-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.ct-alu-swatch-name {
  font-size: 12px;
  font-weight: 650;
  color: #2a251f;
}
.ct-alu-preview {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #e8dfd2;
  border-radius: 14px;
  background: #fff;
  text-align: center;
}
.ct-alu-preview img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}
@media (max-width: 720px) {
  .ct-alu-pick-row { grid-template-columns: 1fr; }
  .ct-alu-photo-grid { grid-template-columns: repeat(2, 1fr); }
  .ct-alu-photo-card img { height: 96px; }
}

.ct-product-modal.ct-modal {
  max-width: 640px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}
.ct-product-modal .ct-modal-head {
  padding: 20px 22px 18px;
  background: linear-gradient(135deg, #f8f2ea 0%, #efe6d8 100%);
  border-bottom: 1px solid #e0d4c4;
}
.ct-modal-head-text { flex: 1; min-width: 0; }
.ct-product-modal .ct-modal-head h3 {
  font-size: 1.55rem;
  letter-spacing: 0.01em;
}
.ct-modal-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: #8a7f70;
  font-weight: 500;
}
.ct-product-modal .ct-modal-close {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.ct-product-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 22px 12px;
  max-height: min(62vh, 520px);
  overflow-y: auto;
}
.ct-product-modal-cell {
  position: relative;
  min-height: 0;
}
.ct-product-modal-name {
  font-size: 16px;
  font-weight: 700;
  color: #2a251f;
  text-align: center;
  line-height: 1.25;
  padding: 0;
  background: transparent;
}
.ct-product-modal-del {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(20, 16, 12, 0.62);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
  transition: background 0.15s, transform 0.12s, opacity 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.ct-product-modal-del:hover {
  background: #b91c1c;
  opacity: 1;
  transform: scale(1.08);
}
.ct-product-modal-empty {
  grid-column: 1 / -1;
  padding: 28px 16px;
  text-align: center;
  color: #8a7f70;
  font-size: 14px;
}
.ct-product-modal-foot {
  padding: 8px 22px 22px;
  display: flex;
  justify-content: center;
  border-top: 1px solid #f0ebe3;
  background: #faf8f5;
}
.ct-add-template-btn {
  padding: 10px 18px;
  border: 1px dashed #c8874a;
  border-radius: 999px;
  background: #fff;
  color: #8b5a1a;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ct-add-template-btn:hover {
  background: #fff8ef;
  border-style: solid;
}

/* legacy select — не используется */
.ct-product-select {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  border: 1px solid #d4ccc0;
  border-radius: 12px;
  background: #faf6f0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.ct-product-select:hover {
  border-color: #c8874a;
  background: #fff;
}
.ct-product-select-icon {
  font-size: 28px;
  line-height: 1;
  width: 44px;
  text-align: center;
  flex-shrink: 0;
}
.ct-product-select-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ct-product-select-label {
  font-size: 16px;
  font-weight: 700;
  color: #2a251f;
}
.ct-product-select-hint {
  font-size: 12px;
  color: #8a7f70;
  font-weight: 500;
}
.ct-product-select-arrow {
  font-size: 14px;
  color: #8a7f70;
  flex-shrink: 0;
}
.ct-product-select.ct-fill-empty {
  border-color: #dc2626 !important;
  background: #fffafa;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}
.ct-product-select.ct-fill-ok {
  border-color: #16a34a !important;
  background: #fafffa;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}

.ct-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 5, 4, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.ct-modal-overlay[hidden] {
  display: none !important;
}
.ct-modal {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.ct-modal.ct-alu-modal {
  overflow: auto;
}
.ct-modal.ct-alu-site-modal {
  overflow: hidden;
}
.ct-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ct-modal-head h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  color: #2a251f;
  margin: 0;
}
.ct-modal-close {
  border: none;
  cursor: pointer;
  color: #5c5348;
  flex-shrink: 0;
}
.ct-modal-close:hover { background: rgba(0, 0, 0, 0.1); }

.ct-product-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
  margin-bottom: 14px;
}
.ct-type-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}
.ct-type-btn {
  flex: 1;
  min-width: 88px;
  padding: 10px 14px;
  border: 1px solid #d4ccc0;
  border-radius: 8px;
  background: #faf6f0;
  color: #5c5348;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ct-type-btn:hover {
  border-color: #c8874a;
  background: #fff;
}
.ct-type-btn.active {
  border-color: #c8874a;
  background: #fff8ef;
  color: #8b5a1a;
  box-shadow: 0 0 0 2px rgba(200,135,74,0.2);
}
.ct-type-slot {
  flex: 1.4;
  min-width: 140px;
}
.ct-type-name-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #b0763f;
  border-radius: 8px;
  background: #c8874a;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  min-height: 42px;
}
.ct-type-name-input::placeholder { color: rgba(255,255,255,0.75); }
.ct-type-name-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(200,135,74,0.25);
  background: #d4955c;
}
.ct-inline-cost {
  flex: 0 0 200px;
  min-width: 160px;
}
.ct-product-panel[hidden] { display: none !important; }

/* Спальня — живой чертёж */
.ct-br { margin-top: 4px; }
.ct-br-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin: 0 -2px 4px;
  scrollbar-width: thin;
}
.ct-br-pick {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 76px;
  padding: 10px 8px 8px;
  border: 1px solid #eadfcf;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #faf6f0 100%);
  color: #5c5348;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: transform 0.16s, border-color 0.16s, box-shadow 0.16s, color 0.16s;
}
.ct-br-pick:hover {
  transform: translateY(-2px);
  border-color: #c8874a;
  color: #8b5a1a;
  box-shadow: 0 8px 20px rgba(139, 90, 26, 0.12);
}
.ct-br-pick:active { transform: translateY(0); }
.ct-br-glyph {
  width: 28px;
  height: 28px;
  display: block;
  pointer-events: none;
}
.ct-br-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 168px;
  padding: 24px 20px;
  border: 1.5px dashed #e2d6c4;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 248, 238, 0.9), transparent 62%),
    linear-gradient(180deg, #fbf7f1 0%, #f3ece2 100%);
  text-align: center;
}
.ct-br-empty .ct-br-picker {
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  margin: 6px 0 0;
  overflow: visible;
}
.ct-br-empty.is-filled {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
}
.ct-br-empty.is-filled .ct-br-empty-mark,
.ct-br-empty.is-filled > p { display: none; }
.ct-br-empty.is-filled .ct-br-picker {
  margin: 0 0 8px;
  justify-content: flex-start;
}
.ct-br-empty-mark {
  width: 54px;
  height: 54px;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 16px;
  background:
    linear-gradient(135deg, #f3e6d4 0%, #e4d3bb 100%);
  box-shadow: inset 0 0 0 1px rgba(139, 90, 26, 0.12);
  position: relative;
}
.ct-br-empty-mark::before,
.ct-br-empty-mark::after {
  content: '';
  position: absolute;
  background: #c8874a;
  border-radius: 2px;
}
.ct-br-empty-mark::before { width: 18px; height: 2px; left: 18px; top: 26px; }
.ct-br-empty-mark::after { width: 2px; height: 18px; left: 26px; top: 18px; }
.ct-br-empty-mark:hover { background: linear-gradient(135deg, #ead9c0 0%, #dcc4a4 100%); }
.ct-br-empty-mark::after { width: 2px; height: 18px; left: 26px; top: 18px; }
.ct-br-empty p {
  margin: 0;
  max-width: 340px;
  font-size: 13px;
  line-height: 1.45;
  color: #7a6f60;
}
.ct-br-list { display: flex; flex-direction: column; gap: 14px; }
.ct-br-card {
  border: 1px solid #eadfcf;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffefb 0%, #faf6f0 100%);
  box-shadow: 0 10px 28px rgba(60, 44, 24, 0.06);
  overflow: hidden;
}
.ct-br-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 0 12px;
}
.ct-br-card-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  color: #8b5a1a;
}
.ct-br-title {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  color: #2a251f;
  padding: 2px 0;
}
.ct-br-title:focus { outline: none; }
.ct-br-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ct-br-qty {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 700;
  color: #8a7f70;
  background: #f4eee5;
  border-radius: 999px;
  padding: 4px 8px 4px 10px;
}
.ct-br-qty-input {
  width: 28px;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  color: #2a251f;
  padding: 0;
}
.ct-br-qty-input:focus { outline: none; }
.ct-br-remove {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #b0a394;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.ct-br-remove:hover { background: #f4eee5; color: #7a3b2e; }
.ct-br-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.85fr);
  gap: 8px 16px;
  padding: 4px 12px 14px;
  align-items: center;
}
.ct-br-stage {
  position: relative;
  min-height: 240px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(200, 135, 74, 0.08), transparent 58%),
    repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(200, 168, 122, 0.09) 20px),
    repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(200, 168, 122, 0.09) 20px),
    #f7f2ea;
}
.ct-br-svg { width: 100%; height: auto; display: block; }
.ct-br-dims { display: flex; flex-direction: column; gap: 10px; }
.ct-br-dim-lab {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a7f70;
  margin-bottom: 4px;
}
.ct-br-num-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #eadfcf;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.ct-br-num-wrap:focus-within {
  border-color: #c8874a;
  box-shadow: 0 0 0 3px rgba(200, 135, 74, 0.14);
}
.ct-br-num {
  width: 100%;
  min-height: 40px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #2a251f;
  padding: 6px 10px;
  letter-spacing: 0.02em;
}
.ct-br-num:focus { outline: none; }
.ct-br-num-wrap span {
  flex-shrink: 0;
  padding: 0 12px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #b0a394;
}
.ct-br-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, #ead9c0, #c8874a);
  outline: none;
  margin: 0 0 8px;
}
.ct-br-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #c8874a;
  box-shadow: 0 2px 8px rgba(139, 90, 26, 0.22);
  cursor: pointer;
}
.ct-br-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #c8874a;
  box-shadow: 0 2px 8px rgba(139, 90, 26, 0.22);
  cursor: pointer;
}
.ct-br-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.ct-br-seg-btn {
  min-height: 40px;
  border: 1px solid #eadfcf;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #5c5348;
  cursor: pointer;
}
.ct-br-seg-btn.is-on {
  border-color: #c8874a;
  background: #fff8ef;
  color: #8b5a1a;
  box-shadow: 0 0 0 3px rgba(200, 135, 74, 0.14);
}
.ct-br-print-size { display: none; }
.print-only { display: none; }

@media (max-width: 720px) {
  .ct-br-card-body { grid-template-columns: 1fr; }
  .ct-br-stage { min-height: 210px; }
}

.ct-grid {
  display: grid;
  gap: 12px 16px;
  align-items: end;
}
.ct-grid + .ct-grid { margin-top: 12px; }
.ct-grid.g2 { grid-template-columns: 1fr 1fr; }
.ct-grid.g3 { grid-template-columns: repeat(3, 1fr); }
.ct-grid.g4 { grid-template-columns: repeat(4, 1fr); }
.ct-grid.g-desc { grid-template-columns: 2fr 1fr; }

.ct-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5c5348;
  margin-bottom: 6px;
}
.ct-field input,
.ct-field select,
.ct-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d4ccc0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #2a251f;
  min-height: 42px;
}
.ct-field input:focus,
.ct-field select:focus,
.ct-field textarea:focus {
  outline: none;
  border-color: #c8874a;
  box-shadow: 0 0 0 3px rgba(200,135,74,0.12);
}
.ct-field textarea { min-height: 72px; resize: vertical; }

.ct-sum {
  font-weight: 700;
  font-size: 15px;
  color: #2a251f;
  padding: 10px 12px;
  background: #faf6f0;
  border-radius: 8px;
  border: 1px solid #e8e0d4;
  min-height: 42px;
  display: flex;
  align-items: center;
}
.ct-sum.highlight {
  background: #fff8ef;
  border-color: #e8c89a;
  color: #8b5a1a;
}

.ct-note {
  font-size: 12px;
  color: #8a7f70;
  margin-top: 8px;
  line-height: 1.45;
}

.ct-warn-red {
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 10px;
}
.ct-warn-box {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 4px solid #dc2626;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.ct-warn-box strong { color: #991b1b; }

.ct-appliance-notice-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}
.ct-lang-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}
.ct-lang-btn {
  min-width: 34px;
  height: 22px;
  padding: 0 7px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(232, 220, 200, 0.65);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ct-lang-btn:hover {
  color: #e8dcc8;
  background: rgba(255, 255, 255, 0.08);
}
.ct-lang-btn.is-active {
  color: #1a1410;
  background: linear-gradient(135deg, #c8874a, #a66b32);
}
.ct-appliance-notice-lang .ct-warn-red:first-child { margin-top: 0; }

.ct-field input.ct-fill-empty,
.ct-field select.ct-fill-empty,
.ct-field textarea.ct-fill-empty,
.ct-type-name-input.ct-fill-empty {
  border-color: #dc2626 !important;
  background: #fffafa;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}
.ct-field input.ct-fill-ok,
.ct-field select.ct-fill-ok,
.ct-field textarea.ct-fill-ok,
.ct-type-name-input.ct-fill-ok {
  border-color: #16a34a !important;
  background: #fafffa;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}
.ct-field input.ct-fill-empty:focus,
.ct-field select.ct-fill-empty:focus,
.ct-field textarea.ct-fill-empty:focus,
.ct-type-name-input.ct-fill-empty:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}
.ct-field input.ct-fill-ok:focus,
.ct-field select.ct-fill-ok:focus,
.ct-field textarea.ct-fill-ok:focus,
.ct-type-name-input.ct-fill-ok:focus {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.ct-desc-field { margin-top: 12px; }
.ct-desc-field label { color: #8a7f70; font-weight: 500; }
.ct-desc-field input.ct-no-validate {
  border-color: #d4ccc0 !important;
  background: #fff !important;
  box-shadow: none !important;
}
.ct-desc-field input.ct-no-validate:focus {
  border-color: #c8874a !important;
  box-shadow: 0 0 0 3px rgba(200,135,74,0.12) !important;
}

.ct-block-collapsible .ct-block-toggle {
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: none;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: box-shadow 0.15s, background 0.15s;
}
.ct-block-collapsible .ct-block-toggle:hover { background: #efe8dc; }
.ct-block-collapsible.is-open .ct-block-chevron { transform: rotate(90deg); }
.ct-block-chevron {
  font-size: 12px;
  color: #8a7f70;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.ct-block-toggle.ct-block-status-empty {
  box-shadow: inset 0 0 0 2px #dc2626;
  background: #fff5f5;
}
.ct-block-toggle.ct-block-status-ok {
  box-shadow: inset 0 0 0 2px #16a34a;
  background: #f6fff6;
}

.ct-chip-hint {
  font-size: 12px;
  color: #8a7f70;
  margin: 0 0 10px;
}
.ct-alu-hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}
.ct-alu-hint-row .ct-chip-hint {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.ct-alu-grand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
  text-align: right;
}
.ct-alu-grand span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a7f70;
}
.ct-alu-grand strong {
  font-size: 16px;
  font-weight: 700;
  color: #8b5a1a;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.ct-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.ct-alu-chip-row {
  align-items: center;
}
.ct-alu-rate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  color: #5c5348;
  font-size: 13px;
  font-weight: 600;
}
.ct-alu-rate input {
  width: 108px;
  height: 38px;
  border: 1px solid #d4ccc0;
  border-radius: 12px;
  background: #fff;
  color: #2a251f;
  font-size: 14px;
  font-weight: 700;
  padding: 0 10px;
  font-variant-numeric: tabular-nums;
}
.ct-alu-rate input.ct-fill-empty {
  border-color: #dc2626 !important;
  background: #fffafa;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}
.ct-alu-rate input.ct-fill-ok {
  border-color: #16a34a !important;
  background: #fafffa;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}
.ct-extras-chip-row { align-items: center; }
#extrasChipRow .ct-chip-item .ct-chip {
  padding-right: 14px;
}
#extrasChipRow .ct-chip-item.has-del .ct-chip {
  padding-right: 26px;
}
.ct-paint-chip-row { align-items: center; }
.ct-appliance-chip-row { align-items: center; }
.ct-chip-item {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}
.ct-chip-item .ct-chip {
  padding-right: 28px;
}
.ct-chip-del {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 999px;
  background: rgba(42, 37, 31, 0.55);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: background 0.12s, opacity 0.12s;
}
.ct-chip-del:hover {
  background: #b91c1c;
  opacity: 1;
}
.ct-chip-add {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border: 2px dashed #c8874a;
  border-radius: 999px;
  background: #fff;
  color: #8b5a1a;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.ct-chip-add:hover {
  background: #fff8ef;
  border-style: solid;
}
.ct-chip {
  padding: 8px 14px;
  border: 1px solid #d4ccc0;
  border-radius: 999px;
  background: #faf6f0;
  color: #5c5348;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ct-chip:hover { border-color: #c8874a; background: #fff; }
.ct-chip.active {
  border-color: #c8874a;
  background: #fff8ef;
  color: #8b5a1a;
}
.ct-ct-unit { margin-bottom: 16px; }
.ct-ct-chips { margin-bottom: 8px; }
.ct-ct-picks {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}
.ct-ct-pick {
  flex: 1 1 160px;
  min-width: 0;
  margin: 0;
}
.ct-ct-pick select { width: 100%; }
.ct-ct-meters {
  flex: 0 0 52px;
  width: 52px;
}
.ct-ct-meters label {
  display: block;
  font-size: 11px;
  color: #8a7f70;
  margin-bottom: 4px;
}
.ct-ct-meters input {
  width: 52px;
  height: 38px;
  border: 1px solid #d4ccc0;
  border-radius: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
}
.ct-ct-break {
  background: #faf6f0;
  border: 1px solid #eee6da;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0 0;
  font-size: 13px;
  color: #5c5348;
}
.ct-ct-break-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px 12px;
  align-items: baseline;
  padding: 3px 0;
}
.ct-ct-break-line span { min-width: 0; }
.ct-ct-break-line b,
.ct-ct-break-line em {
  font-variant-numeric: tabular-nums;
  font-style: normal;
  white-space: nowrap;
}
.ct-ct-break-line b {
  color: #2a251f;
  font-weight: 700;
}
.ct-ct-break-line em {
  color: #8a7f70;
  font-weight: 600;
  min-width: 7.5em;
  text-align: right;
}
.ct-ct-break-line.is-diff b,
.ct-ct-break-line.is-diff em { color: #8b5a1a; }
.ct-ct-break-line.is-total {
  border-top: 1px solid #eadfd3;
  margin-top: 6px;
  padding-top: 8px;
  font-weight: 600;
}
.ct-ct-break-line.is-total em { color: #8b5a1a; font-weight: 700; }
.ct-chip-fields { display: grid; gap: 12px; }
#paintChipFields {
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
#paintChipFields .ct-chip-field { min-width: 0; }
#appliancesGrid {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 12px;
}
#appliancesGrid .ct-chip-field { min-width: 0; }

.ct-appliance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}
@media (min-width: 700px) {
  .ct-appliance-grid { grid-template-columns: repeat(4, 1fr); }
}

.ct-sheet-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-bottom: 4px;
}
.ct-sheet-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  align-items: center;
  margin-bottom: 0;
  min-width: 0;
}
.ct-sheet-row .ct-field { min-width: 0; }
.ct-sheet-row .ct-btn-remove {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  color: #b0a498;
  margin-bottom: 0;
  flex-shrink: 0;
}
.ct-sheet-row .ct-btn-remove:hover { background: #fce8ef; color: #b3261e; }
.ct-sheet-row .ct-btn-remove:disabled {
  opacity: 0.25;
  cursor: default;
  background: transparent;
}
.ct-sheet-row .ct-btn-remove:disabled:hover { background: transparent; color: #b0a498; }
.ct-sheet-row .ct-field input[list] {
  padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, #8a7f70 50%), linear-gradient(135deg, #8a7f70 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% + 2px), calc(100% - 10px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.ct-hw-row {
  display: grid;
  grid-template-columns: 2fr 1fr 90px 1fr 40px;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0ebe3;
}
.ct-hw-row:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.ct-hw-row .ct-btn-remove {
  width: 40px; height: 42px; padding: 0; border-radius: 8px;
  border: 1px solid #ddd3c2; background: #fff; cursor: pointer;
  font-size: 20px; color: #8a7f70;
}
.ct-hw-row .ct-btn-remove:hover { background: #fce8ef; color: #b3261e; }

.ct-extras-rows {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 4px;
}
.ct-ex-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 4px 8px;
  align-items: end;
  min-width: 0;
}
.ct-ex-row.is-sum-open {
  grid-template-columns: minmax(0, 1.2fr) auto 100px 56px 100px auto;
}
.ct-ex-sum-fields { display: none; }
.ct-ex-row.is-sum-open .ct-ex-sum-fields {
  display: contents;
}
.ct-ex-sum-btn {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d4ccc0;
  border-radius: 8px;
  background: #faf6f0;
  color: #5c5348;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.ct-ex-sum-btn:hover,
.ct-ex-sum-btn.is-on {
  border-color: #c8874a;
  background: #fff8ef;
  color: #8b5a1a;
}
.ct-ex-row .ct-field { min-width: 0; }
.ct-ex-row .ct-field label {
  font-size: 10px;
  margin-bottom: 2px;
  font-weight: 600;
  white-space: nowrap;
}
.ct-ex-row .ct-ex-main label { display: none; }
.ct-ex-row .ct-field input,
.ct-ex-row .ct-field select,
.ct-ex-row .ct-sum {
  min-height: 32px;
  height: 32px;
  padding: 3px 6px;
  font-size: 12px;
  border-radius: 6px;
}
.ct-ex-row .ct-sum {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}
.ct-ex-row .ex-qty { text-align: center; padding-left: 2px; padding-right: 2px; }
.ct-ex-row .ex-unit { text-align: right; }
.ct-ex-row .ct-btn-remove {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  color: #b0a498;
  margin-bottom: 8px;
}
.ct-ex-row .ct-btn-remove:hover { background: #fce8ef; color: #b3261e; }

/* Итоги */
.ct-summary {
  background: #faf6f0;
  border: 2px solid #c8874a;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.ct-summary-title {
  font-size: 14px;
  font-weight: 800;
  color: #4a4238;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0d8cc;
}
.ct-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px dashed #e0d8cc;
}
.ct-summary-line:last-child { border-bottom: none; }
.ct-summary-line .lbl { color: #5c5348; }
.ct-summary-line .val { font-weight: 700; white-space: nowrap; }
.ct-summary-line.grand {
  font-size: 17px;
  font-weight: 800;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 2px solid #c8874a;
  border-bottom: none;
}
.ct-summary-line.grand .val { color: #8b5a1a; }

.ct-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  margin: 10px 0;
  font-size: 13px;
}
.ct-summary-grid div { display: flex; justify-content: space-between; gap: 8px; }
.ct-summary-grid div[hidden],
.ct-kitchen-only[hidden] {
  display: none !important;
}

.ct-field .pdf-field-value {
  padding: 5px 8px;
  font-size: 9.5pt;
  border: 1px solid #d4ccc0;
  border-radius: 6px;
  background: #fff;
  color: #2a251f;
  min-height: 28px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.ct-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #e0d8cc;
}
.ct-sign-block label {
  font-size: 13px;
  font-weight: 700;
  color: #5c5348;
  display: block;
  margin-bottom: 36px;
}
.ct-sign-line { border-bottom: 1px solid #2a251f; margin-bottom: 6px; }
.ct-sign-caption { font-size: 11px; color: #8a7f70; text-align: center; }

@media (max-width: 720px) {
  .contract-doc { padding: 16px; }
  .ct-product-bar { grid-template-columns: 72px 1fr 1fr; gap: 8px; }
  .ct-product-bar-type { width: 72px; min-width: 72px; min-height: 52px; border-radius: 12px; }
  .ct-product-bar-name { min-height: 52px; font-size: 14px; }
  @media (max-width: 480px) {
    .ct-product-bar { grid-template-columns: 72px 1fr; }
    .ct-product-bar-cost { grid-column: 2; }
    .ct-product-bar:not(:has(.ct-product-bar-cost:not([hidden]))) .ct-product-bar-name { grid-column: 2; }
  }
  .ct-product-modal-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px; }
  .ct-product-modal-btn { min-height: 128px; padding: 16px 10px; }
  .ct-product-modal-icon { font-size: 36px; }
  .ct-product-modal-name { font-size: 14px; }
  .ct-grid.g2, .ct-grid.g3, .ct-grid.g4, .ct-grid.g-desc { grid-template-columns: 1fr; }
  .ct-sheet-rows { grid-template-columns: 1fr 1fr; gap: 10px 8px; }
  .ct-sheet-row { grid-template-columns: 1fr auto; gap: 2px; }
  .ct-extras-rows { grid-template-columns: 1fr; gap: 6px; }
  .ct-ex-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 6px; }
  .ct-ex-row.is-sum-open { grid-template-columns: minmax(0, 1fr) auto 80px 48px 80px auto; }
  .ct-product-head { flex-direction: column; align-items: stretch; }
  .ct-inline-cost { flex: 1; max-width: none; }
  .ct-hw-row { grid-template-columns: 1fr; }
  .ct-signatures { grid-template-columns: 1fr; gap: 20px; }
}

.acc-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.ct-settings-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #e8dcc8;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ct-settings-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(200, 135, 74, 0.55);
}

.ct-history {
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.ct-history-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
}
.ct-history-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #e8dcc8;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.ct-history-toggle:hover { color: #fff; }
.ct-history-chevron { font-size: 12px; opacity: 0.7; }
.ct-history-refresh {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #c8874a;
  font-size: 16px;
  cursor: pointer;
}
.ct-history-refresh:hover { background: rgba(255, 255, 255, 0.1); }
.ct-history-body {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 10px 10px;
  max-height: 280px;
  overflow-y: auto;
}
.ct-history-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 0 10px;
}
.ct-history-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #d4ccc0;
  font-size: 13px;
  cursor: pointer;
}
.ct-history-tab.is-active {
  background: rgba(200, 135, 74, 0.22);
  border-color: rgba(200, 135, 74, 0.45);
  color: #fff;
}
.ct-history-badge.done { background: rgba(59, 130, 246, 0.25); color: #93c5fd; }
.ct-view-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: #dbeafe;
  font-size: 14px;
}
.ct-view-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ct-view-banner-actions .acc-btn {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  gap: 4px;
}
body.contract-readonly #contractForm input,
body.contract-readonly #contractForm select,
body.contract-readonly #contractForm textarea,
body.contract-readonly #contractForm button:not(.ct-lang-btn) {
  pointer-events: none;
}
<body.contract-readonly .contract-toolbar .acc-btn:not(.secondary),
body.contract-readonly #finalizeContractBtn,
body.contract-readonly #saveFinalizedBtn {
  display: none !important;
}
body.contract-editing-finalized #finalizeContractBtn,
body.contract-editing-finalized #editFinalizedBtn {
  display: none !important;
}
body.contract-editing-finalized .ct-view-banner {
  border-color: rgba(200, 135, 74, 0.45);
  background: rgba(200, 135, 74, 0.14);
  color: #f5e6d3;
}
.ct-history-list { display: grid; gap: 8px; }
.ct-history-loading, .ct-history-empty {
  padding: 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}
.ct-history-item {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ct-history-item-current {
  border-color: rgba(200, 135, 74, 0.55);
  background: rgba(200, 135, 74, 0.12);
}
.ct-history-item-main { flex: 1; min-width: 0; }
.ct-history-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.ct-history-item-top strong {
  font-size: 14px;
  color: #fff;
}
.ct-history-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: lowercase;
}
.ct-history-badge.ok { background: rgba(22, 163, 74, 0.25); color: #86efac; }
.ct-history-badge.draft { background: rgba(255, 255, 255, 0.12); color: #d4ccc0; }
.ct-history-item-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.35;
}
.ct-history-item-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
}
.ct-history-item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.ct-history-open {
  padding: 6px 10px;
  border: 1px solid rgba(200, 135, 74, 0.5);
  border-radius: 8px;
  background: rgba(200, 135, 74, 0.15);
  color: #f5e6d3;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.ct-history-open:hover { background: rgba(200, 135, 74, 0.28); }
.ct-history-del {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: #fca5a5;
  font-size: 16px;
  cursor: pointer;
  align-self: center;
}
.ct-history-del:hover { background: rgba(185, 28, 28, 0.35); }

.ct-settings-modal { max-width: 520px; }
.ct-settings-modal .ct-modal-head {
  padding: 22px 24px 18px;
  background: linear-gradient(135deg, #f8f2ea 0%, #efe6d8 100%);
  border-bottom: 1px solid #e0d4c4;
}
.ct-settings-modal .ct-modal-head h3 {
  font-size: 1.65rem;
  letter-spacing: 0.02em;
  color: #1f1a15;
  line-height: 1.2;
}
.ct-settings-modal .ct-modal-sub {
  margin: 8px 0 0;
  font-size: 14px;
  color: #4a4035;
  font-weight: 600;
  line-height: 1.45;
}
.ct-settings-modal .ct-modal-close {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 24px;
  line-height: 1;
}
.ct-settings-modal-lg {
  max-width: min(920px, 96vw);
  width: 100%;
  max-height: min(92vh, 880px);
  display: flex;
  flex-direction: column;
}
.ct-settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px 12px;
  border-bottom: 1px solid #f0ebe3;
  background: #faf8f5;
}
.ct-settings-tab {
  border: 1px solid #e8dfd3;
  border-radius: 999px;
  background: #fff;
  color: #6b5f4f;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ct-settings-tab:hover {
  border-color: #c8874a;
  color: #2a251f;
}
.ct-settings-tab.is-active {
  background: linear-gradient(135deg, #c8874a, #a66b32);
  border-color: transparent;
  color: #fff;
}
.ct-settings-body {
  padding: 16px 20px;
  max-height: min(60vh, 420px);
  overflow-y: auto;
}
.ct-settings-modal-lg .ct-settings-body {
  flex: 1 1 auto;
  max-height: none;
  min-height: 360px;
}
.ct-settings-panel { display: none; }
.ct-settings-panel.is-active { display: block; }
.ct-settings-intro {
  font-size: 13px;
  color: #6b5f4f;
  line-height: 1.5;
  margin: 0 0 14px;
}
.ct-settings-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}
@media (max-width: 720px) {
  .ct-settings-columns { grid-template-columns: 1fr; }
}
.ct-settings-group { margin-bottom: 16px; }
.ct-settings-group:last-child { margin-bottom: 0; }
.ct-settings-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a7f70;
  margin-bottom: 8px;
}
.ct-settings-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
  color: #2a251f;
  border-bottom: 1px solid #f0ebe3;
}
.ct-settings-check small {
  display: block;
  font-size: 12px;
  color: #8a7f70;
  font-weight: 500;
  margin-top: 2px;
}
.ct-sensor-ask {
  margin: 8px 0 12px;
  padding: 8px 12px 4px;
  border: 1px solid #eadfd3;
  border-radius: 10px;
  background: #fffdf8;
}
.ct-sensor-ask .ct-settings-check { border-bottom: 1px solid #f0ebe3; }
.ct-sensor-ask .ct-settings-row { border-bottom: none; padding-bottom: 4px; }
.ct-sensor-ask .ct-settings-row select {
  width: min(240px, 100%);
}
.ct-sensor-modal { max-width: 720px; max-height: 90vh; overflow: auto; }
.ct-sensor-modal .ct-modal-head {
  align-items: flex-start;
  padding: 18px 16px 12px 20px;
}
.ct-sensor-modal .ct-modal-head h3 {
  font-size: 1.45rem;
  line-height: 1.2;
}
.ct-sensor-modal .ct-modal-sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
}
.ct-sensor-modal .ct-modal-close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f4efe7;
  font-size: 22px;
  line-height: 1;
}
.ct-sensor-pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 8px 16px 16px;
}
@media (min-width: 640px) {
  .ct-sensor-pick-grid { grid-template-columns: repeat(3, 1fr); }
}
.ct-sensor-pick {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid #eadfd3;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: 600 14px/1.3 'DM Sans', system-ui, sans-serif;
  color: #2a251f;
}
.ct-sensor-pick img,
.ct-sensor-ph-lg {
  width: 100%;
  height: 96px;
  object-fit: cover;
  display: block;
  background: #efe8dc;
  flex: 0 0 96px;
}
.ct-sensor-ph-lg {
  display: grid;
  place-items: center;
  font: 700 13px 'DM Sans', system-ui, sans-serif;
  color: #8b5a1a;
  background: linear-gradient(#fff8ef, #f4efe7);
}
.ct-sensor-pick .txt {
  display: block;
  padding: 10px 10px 12px;
}
.ct-sensor-pick b { display: block; font-size: 13px; line-height: 1.25; }
.ct-sensor-pick em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-weight: 500;
  font-size: 11px;
  color: #8a7f70;
}
.ct-sensor-pick.is-on,
.ct-sensor-pick:hover {
  border-color: #c8874a;
  background: #fff8ef;
}
.ct-settings-check input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #c8874a;
  flex-shrink: 0;
}
.ct-settings-check:last-child { border-bottom: none; }
.ct-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0ebe3;
  font-size: 14px;
  color: #2a251f;
}
.ct-settings-row:last-child { border-bottom: none; }
.ct-settings-row label { flex: 1; line-height: 1.4; }
.ct-settings-row small {
  display: block;
  font-size: 12px;
  color: #8a7f70;
  font-weight: 500;
  margin-top: 2px;
}
.ct-settings-row select,
.ct-settings-row input[type="number"] {
  width: 120px;
  min-width: 100px;
  padding: 8px 10px;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #2a251f;
}
.ct-settings-hint { font-size: 12px; color: #8a7f70; font-weight: 500; }
.ct-settings-sms-vars {
  font-size: 12px;
  color: #6b5f4f;
  margin: 0 0 14px;
  line-height: 1.6;
}
.ct-settings-sms-vars code {
  background: #f3ede4;
  border: 1px solid #e8dfd3;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  color: #a66b32;
  margin-right: 4px;
}
.ct-settings-sms-template { margin: 12px 0; }
.ct-settings-sms-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2a251f;
  margin-bottom: 6px;
}
.ct-settings-textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid #e8dfd3;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  line-height: 1.45;
  color: #2a251f;
  resize: vertical;
  font-family: inherit;
}
.ct-settings-row input[type="tel"],
.ct-settings-row input[type="email"],
.ct-settings-row input[type="password"],
.ct-settings-row input[type="text"] {
  width: 220px;
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #2a251f;
}
.ct-settings-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 18px;
  border-top: 1px solid #f0ebe3;
  background: #faf8f5;
}
.ct-price-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.ct-price-sub {
  border: 1px solid #e8dfd3;
  background: #fff;
  color: #6b5f4f;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 10px;
  cursor: pointer;
}
.ct-price-sub.is-active {
  background: #2a251f;
  border-color: #2a251f;
  color: #fff;
}
.ct-price-pane { display: none; }
.ct-price-pane.is-active { display: block; }
.ct-price-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}
.ct-price-group {
  border: 1px solid #eee6da;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px 12px;
}
.ct-price-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ct-price-group-name {
  flex: 1;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 700;
  color: #2a251f;
}
.ct-price-group-del {
  width: 34px;
  height: 34px;
  border: 1px solid #eadfd3;
  border-radius: 8px;
  background: #fff;
  color: #a67c52;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.ct-price-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ct-price-head,
.ct-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 140px 34px;
  gap: 6px;
  align-items: center;
}
.ct-price-head {
  font-size: 11px;
  font-weight: 700;
  color: #8a7f70;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 2px;
}
.ct-price-row input {
  width: 100%;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  font-size: 13px;
  color: #2a251f;
}
.ct-price-row input.ct-price-num { text-align: right; }
.ct-price-del {
  width: 34px;
  height: 34px;
  border: 1px solid #eadfd3;
  border-radius: 8px;
  background: #fff;
  color: #a67c52;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.ct-price-add {
  align-self: flex-start;
  margin-top: 4px;
  border: 1px dashed #d9cbb8;
  background: #fff;
  color: #8a7f70;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ct-price-kits {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ct-light-kit-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
}
.ct-light-kit-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px 14px;
  border-radius: 12px;
  border: 1px solid #eadfd3;
  background: #fff;
  font: 700 13px/1.15 'DM Sans', system-ui, sans-serif;
  color: #5c5348;
  cursor: pointer;
  text-align: left;
}
.ct-light-kit-tab-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ct-light-kit-tab-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.ct-light-kit-tab-hint {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.78;
  white-space: nowrap;
}
.ct-light-kit-tab.is-120 {
  background: #fff8e8;
  border-color: #efd09a;
  color: #8b5a1a;
}
.ct-light-kit-tab.is-240 {
  background: #f8e6cc;
  border-color: #d49a5a;
  color: #6b3f0e;
}
.ct-light-kit-tab.is-nuomi {
  background: #eef2f7;
  border-color: #9aa7b8;
  color: #334155;
}
.ct-light-kit-tab.is-custom {
  background: #f4efe6;
  border-color: #d4ccc0;
  color: #5c5348;
}
.ct-light-kit-tab.is-120.is-active {
  background: #f5d48a;
  border-color: #c8874a;
  color: #5c3a12;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e8c48a;
}
.ct-light-kit-tab.is-240.is-active {
  background: #e4b06a;
  border-color: #a65f22;
  color: #3f2408;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c8874a;
}
.ct-light-kit-tab.is-nuomi.is-active {
  background: #d7e0ec;
  border-color: #64748b;
  color: #1e293b;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8a97a8;
}
.ct-light-kit-tab.is-custom.is-active {
  background: #ead9c0;
  border-color: #c8874a;
  color: #5c3a12;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #d4ccc0;
}
.ct-light-kit-tab-x {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  color: #8a7f70;
}
.ct-light-kit-tab-x:hover { background: #f4efe6; color: #b91c1c; }
.ct-light-kit-add {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px dashed #d4ccc0;
  background: transparent;
  font: 600 12px/1 'DM Sans', system-ui, sans-serif;
  color: #8a7f70;
  cursor: pointer;
}
.ct-light-kit-add:hover { border-color: #c8874a; color: #8b5a1a; }
.ct-price-kit {
  border: 1px solid #eee6da;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px 12px;
}
.ct-price-kit.is-120 { border-color: #e8c48a; background: #fffdf8; }
.ct-price-kit.is-240 { border-color: #c8874a; background: #fffaf4; }
.ct-price-kit.is-nuomi { border-color: #8a97a8; background: #f8fafc; }
.ct-price-kit-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin: -10px -12px 12px;
  border-radius: 11px 11px 0 0;
  background: #faf6f0;
}
.ct-price-kit.is-120 .ct-price-kit-banner { background: #fff4dc; }
.ct-price-kit.is-240 .ct-price-kit-banner { background: #f6e4c8; }
.ct-price-kit.is-nuomi .ct-price-kit-banner { background: #eef1f5; }
.ct-price-kit-banner-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ct-price-kit-kind {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.ct-price-kit.is-120 .ct-price-kit-kind { color: #8b5a1a; }
.ct-price-kit.is-240 .ct-price-kit-kind { color: #6b3f0e; }
.ct-price-kit.is-nuomi .ct-price-kit-kind { color: #334155; }
.ct-price-kit-mode { font-size: 11px; color: #8a7f70; font-weight: 600; }
.ct-price-kit-title {
  flex: 1;
  min-width: 120px;
  width: auto;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 0;
  background: #fff;
}
.ct-price-kit-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.ct-price-kit-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #8a7f70;
  font-weight: 600;
}
.ct-price-kit-grid input {
  width: 100%;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  text-align: right;
}
.ct-price-kit-field.is-text,
.ct-price-kit-names input,
.ct-price-kit-colors input {
  text-align: left;
}
.ct-price-kit-names {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}
.ct-price-kit-colors {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
}
.ct-price-kit-sub {
  margin: 12px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a7f70;
}
.ct-part-row {
  margin-top: 10px;
}
.ct-part-row-title {
  font-size: 12px;
  font-weight: 700;
  color: #2a251f;
  margin-bottom: 4px;
}
.ct-part-row-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 120px;
  gap: 8px;
}
.ct-part-row-fields.is-led {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 110px 80px;
}
.ct-part-row-fields.is-led-nuomi {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr) 100px 72px 72px;
}
.ct-part-row-fields.is-service {
  grid-template-columns: 140px;
}
.ct-part-row-fields.is-with-from {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 110px 120px;
}
.ct-part-row-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #8a7f70;
  font-weight: 600;
}
.ct-part-row-fields input {
  width: 100%;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
}
.ct-part-row-fields [data-kit-field] {
  text-align: right;
}
.ct-psu-wrap {
  margin-top: 8px;
}
.ct-psu-head,
.ct-psu-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.4fr) minmax(0, 1fr) 110px 72px 34px;
  gap: 8px;
  align-items: center;
}
.ct-psu-head {
  font-size: 11px;
  font-weight: 700;
  color: #8a7f70;
  margin-bottom: 4px;
  margin-top: 6px;
}
.ct-psu-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ct-psu-row input {
  width: 100%;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
}
.ct-psu-head.is-colored,
.ct-psu-row.is-colored {
  grid-template-columns: 52px minmax(0, 1.15fr) minmax(0, .7fr) 90px 56px 92px 34px;
}
.ct-psu-color-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.ct-psu-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.14);
}
.ct-psu-color.is-on {
  border-color: #2a251f;
  box-shadow: none;
}
.ct-psu-wrap .ct-price-add {
  margin-top: 8px;
}
.ct-psu-types {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.ct-psu-type {
  border: 1px solid #eee6da;
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px 10px;
}
.ct-psu-type-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}
.ct-psu-type-head label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #8a7f70;
  font-weight: 600;
}
.ct-psu-type-head input {
  width: 100%;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #2a251f;
}
.ct-sensor-head,
.ct-sensor-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.4fr) minmax(0, 1fr) 110px 34px;
  gap: 8px;
  align-items: center;
}
.ct-sensor-head {
  font-size: 11px;
  font-weight: 700;
  color: #8a7f70;
  margin-bottom: 4px;
  margin-top: 6px;
}
.ct-sensor-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ct-sensor-row input {
  width: 100%;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
}
.ct-sensor-row [data-sensor="price"] {
  text-align: right;
}
.ct-sensor-photo {
  width: 52px;
  height: 40px;
  padding: 0;
  border: 1.5px dashed #e0d4c2;
  border-radius: 8px;
  background: #fff8ef;
  overflow: hidden;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: inherit;
}
.ct-sensor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ct-sensor-photo span {
  font-size: 10px;
  font-weight: 700;
  color: #8b5a1a;
}
.ct-sensor-photo.is-busy { opacity: 0.55; pointer-events: none; }
.ct-sensor-photo:hover { border-color: #c8874a; }
.ct-led-head,
.ct-led-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 110px 72px 34px;
  gap: 8px;
  align-items: center;
}
.ct-led-head.is-nuomi,
.ct-led-row.is-nuomi {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) 78px 100px 68px 68px 34px;
}
.ct-led-head.is-tape,
.ct-led-row.is-tape {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .85fr) 100px 68px 68px 34px;
}
.ct-led-row [data-led="price"],
.ct-led-row [data-led="ampsPerM"],
.ct-led-row [data-led="barM"],
.ct-led-row [data-led="reelM"] {
  text-align: right;
}
.ct-profile-head,
.ct-profile-row,
.ct-extra-head,
.ct-extra-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 110px 34px;
  gap: 8px;
  align-items: center;
}
.ct-profile-head,
.ct-profile-row {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 110px 72px 34px;
}
.ct-profile-head,
.ct-extra-head {
  font-size: 11px;
  font-weight: 700;
  color: #8a7f70;
  margin-bottom: 4px;
  margin-top: 6px;
}
.ct-profile-rows,
.ct-extra-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ct-profile-row input,
.ct-extra-row input {
  width: 100%;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
}
.ct-profile-row [data-profile="price"],
.ct-profile-row [data-profile="barM"],
.ct-extra-row [data-extra="price"] {
  text-align: right;
}
.ct-led-head {
  font-size: 11px;
  font-weight: 700;
  color: #8a7f70;
  margin-bottom: 4px;
  margin-top: 6px;
}
.ct-led-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ct-led-row input {
  width: 100%;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
}
.ct-led-row [data-led="price"],
.ct-led-row [data-led="ampsPerM"],
.ct-led-row [data-led="barM"] {
  text-align: right;
}
.ct-color-head,
.ct-color-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 90px 34px;
  gap: 8px;
  align-items: center;
}
.ct-color-head {
  font-size: 11px;
  font-weight: 700;
  color: #8a7f70;
  margin-bottom: 4px;
  margin-top: 6px;
}
.ct-color-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ct-color-row input {
  width: 100%;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
}
.ct-color-row [data-color="kelvin"] {
  text-align: right;
}
.ct-light-psu-id,
.ct-light-sensor-id,
.ct-light-led-id {
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  color: #2a251f;
  max-width: 140px;
  font-family: inherit;
}
.ct-light-mini.ct-light-psu-pick {
  height: auto;
  min-height: 34px;
  padding: 3px 8px;
}
.ct-clip-wrap {
  margin-top: 8px;
}
.ct-clip-head,
.ct-clip-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 34px;
  gap: 8px;
  align-items: center;
}
.ct-clip-head {
  font-size: 11px;
  font-weight: 700;
  color: #8a7f70;
  margin-bottom: 4px;
}
.ct-clip-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ct-clip-row input {
  width: 100%;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  text-align: right;
}
.ct-clip-wrap .ct-price-add {
  margin-top: 8px;
}
@media (max-width: 720px) {
  .ct-price-kit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-price-kit-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-part-row-fields,
  .ct-part-row-fields.is-led,
  .ct-part-row-fields.is-led-nuomi,
  .ct-part-row-fields.is-with-from,
  .ct-psu-head,
  .ct-psu-row,
  .ct-sensor-head,
  .ct-sensor-row,
  .ct-led-head,
  .ct-led-row,
  .ct-led-head.is-nuomi,
  .ct-led-row.is-nuomi,
  .ct-led-head.is-tape,
  .ct-led-row.is-tape,
  .ct-profile-head,
  .ct-profile-row,
  .ct-extra-head,
  .ct-extra-row,
  .ct-color-head,
  .ct-color-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ct-psu-row .ct-price-del,
  .ct-sensor-row .ct-price-del,
  .ct-led-row .ct-price-del,
  .ct-profile-row .ct-price-del,
  .ct-extra-row .ct-price-del,
  .ct-color-row .ct-price-del { grid-column: 2; justify-self: end; }
  .ct-price-kit-banner { flex-wrap: wrap; }
  .ct-price-head,
  .ct-price-row { grid-template-columns: minmax(0, 1fr) 110px 34px; }
}

.ct-light-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.ct-light-add {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #c8874a;
  border-radius: 999px;
  background: linear-gradient(#fffdf8, #fff4e4);
  color: #8b5a1a;
  font: 700 13px/1 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
}
.ct-light-empty {
  border: 1.5px dashed #e4d9c8;
  border-radius: 16px;
  background: radial-gradient(1200px 80px at 50% 0%, rgba(200,135,74,.08), transparent 70%), #fbf8f3;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #8a7f70;
  text-align: center;
  padding: 24px 16px;
  cursor: pointer;
}
.ct-light-empty[hidden] { display: none !important; }
.ct-light-empty-plus {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #eadfd3;
  color: #8b5a1a;
  font-size: 26px;
}
.ct-light-empty p { margin: 0; font-size: 13px; max-width: 280px; }
.ct-light-type-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 8px 16px 18px;
}
@media (min-width: 560px) {
  .ct-light-type-grid { grid-template-columns: repeat(3, 1fr); }
}
.ct-light-type-pick {
  border: 1px solid #e8dfd3;
  border-radius: 16px;
  background: linear-gradient(#fff, #faf6f0);
  padding: 14px 12px 16px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.ct-light-type-pick:hover,
.ct-light-type-pick.is-on { border-color: #c8874a; background: #fff8ef; }
.ct-light-type-strip {
  display: block;
  height: 10px;
  border-radius: 999px;
  margin-bottom: 14px;
  background: repeating-linear-gradient(90deg, #2a251f 0 6px, #c8874a 6px 10px);
}
.ct-light-type-pick[data-kind="240"] .ct-light-type-strip {
  background: repeating-linear-gradient(90deg, #2a251f 0 4px, #e2b15a 4px 7px);
}
.ct-light-type-pick[data-kind="nuomi"] .ct-light-type-strip {
  background: linear-gradient(90deg, #8b5a1a, #f0c98a, #fff3c2, #8b5a1a);
}
.ct-light-type-pick b { display: block; font-size: 16px; }
.ct-light-color {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.ct-light-color-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  width: auto;
  min-width: 44px;
  max-width: 72px;
  padding: 2px 4px 3px;
  border: 1px solid #e0d8cc;
  background: #faf6f0;
  color: #5c5348;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.ct-light-color-btn:hover { border-color: #c4b8a6; }
.ct-light-window {
  display: block;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(42, 37, 31, 0.08);
  background: #efe8dc;
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.ct-light-kelvin {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ct-light-color-btn.active {
  border-color: #c8874a;
  background: #fff;
}
.ct-light-color-btn.active[data-light-kelvin="3000"] .ct-light-window {
  background: #ffc56a;
  box-shadow: inset 0 0 12px rgba(255, 210, 120, 0.9), 0 0 14px rgba(255, 170, 60, 0.45);
}
.ct-light-color-btn.active[data-light-kelvin="4000"] .ct-light-window {
  background: #fff3c2;
  box-shadow: inset 0 0 12px rgba(255, 248, 210, 0.95), 0 0 12px rgba(255, 220, 120, 0.35);
}
.ct-light-color-btn.active[data-light-kelvin="6000"] .ct-light-window {
  background: #ffffff;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.95), 0 0 12px rgba(230, 236, 245, 0.7);
  border-color: #cfd6de;
}
.ct-light-card[data-light-kelvin="3000"] {
  background: #fff4dc;
  border-color: #f0c98a;
}
.ct-light-card[data-light-kelvin="4000"] {
  background: #fffbeb;
  border-color: #ead89a;
}
.ct-light-card[data-light-kelvin="6000"] {
  background: #f5f7fa;
  border-color: #d5dbe3;
}
.ct-light-grand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.ct-light-grand span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a7f70;
}
.ct-light-grand strong {
  font-size: 18px;
  font-weight: 700;
  color: #8b5a1a;
  font-variant-numeric: tabular-nums;
}
.ct-light-wrap {
  display: grid;
  gap: 12px;
}
.ct-light-card {
  border: 1px solid #e8dfd3;
  border-radius: 12px;
  background: #fbf8f3;
  padding: 10px 28px 12px 10px;
  position: relative;
}
.ct-light-card-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #b0a498;
  font-size: 16px;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1;
}
.ct-light-card-x:hover { color: #5c5348; background: #f4efe7; }
.ct-light-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.ct-light-type-chip {
  height: auto;
  min-width: 96px;
  min-height: 34px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding: 4px 10px;
  overflow: visible;
}
.ct-light-type-chip .ct-light-card-title {
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
}
.ct-light-sensor-mini,
.ct-light-psu-mini {
  height: auto;
  min-height: 34px;
  cursor: pointer;
}
.ct-light-stype,
.ct-light-ptype {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0 2px 0 0;
  font-family: inherit;
  max-width: 110px;
}
.ct-light-stype img,
.ct-light-ptype img,
.ct-light-sph {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  background: #efe8dc;
  flex: 0 0 28px;
}
.ct-light-sph {
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #8b5a1a;
}
.ct-light-stype b,
.ct-light-ptype b {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #6b5f4f;
  line-height: 1.15;
  text-align: left;
  white-space: normal;
}
.ct-light-sz-add {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1.5px dashed #e0d4c2;
  background: transparent;
  color: #8b5a1a;
  font-size: 16px;
  cursor: pointer;
  flex: 0 0 28px;
}
.ct-light-card-total {
  font-size: 14px;
  font-weight: 700;
  color: #8b5a1a;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.ct-light-mini {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #eee6da;
  border-radius: 9px;
  padding: 3px 5px 3px 7px;
  height: 34px;
}
.ct-light-mini.ct-light-type-chip {
  height: auto;
  min-width: 96px;
  overflow: visible;
}
.ct-light-mini span {
  font-size: 10px;
  font-weight: 700;
  color: #6b5f4f;
  white-space: nowrap;
}
.ct-light-stats {
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.ct-light-stat {
  background: #fff;
  border: 1px solid #eee6da;
  border-radius: 8px;
  padding: 2px 6px;
  text-align: center;
  min-width: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ct-light-stat b {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #2a251f;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ct-light-stat small {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #8a7f70;
}
.ct-light-sizes-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ct-light-sizes-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #6b5f4f;
  margin: 0;
  white-space: nowrap;
}
.ct-light-size-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.ct-light-size-more {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.ct-light-size-more:empty { display: none; }
.ct-light-size {
  width: 48px;
  flex: 1 1 36px;
  min-width: 36px;
  max-width: 48px;
  height: 30px;
  padding: 0 2px;
  border: 1px solid #e4d9c8;
  border-radius: 8px;
  background: #fff;
  color: #2a251f;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  box-shadow: none;
}
.ct-light-size-more .ct-light-size {
  flex: 0 0 calc((100% - 48px) / 13);
  width: auto;
  min-width: 0;
  max-width: none;
}
.ct-light-size:focus {
  outline: none;
  border-color: #c8874a;
  box-shadow: 0 0 0 3px rgba(200, 135, 74, 0.16);
}
.ct-light-bom {
  margin-top: 8px;
  border: 1px solid #eee6da;
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px 10px;
}
.ct-light-bom h4 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a7f70;
}
.ct-light-bom-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}
.ct-light-bom-caps,
.ct-light-bom-psus {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: stretch;
  width: max-content;
  max-width: 100%;
}
.ct-light-bom-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  background: #faf6f0;
  font-size: 12px;
  line-height: 1.2;
}
.ct-light-bom-item .qty { font-weight: 700; color: #8b5a1a; white-space: nowrap; }
.ct-light-bom-sku { color: #8a7f70; font-size: 10px; font-weight: 500; }
.ct-light-bom-item.is-psu {
  color: var(--psu-c, #8b5a1a);
  border-left: 3px solid var(--psu-c, #c8874a);
}
.ct-light-bom-item.is-psu .nm,
.ct-light-bom-item.is-psu .qty { color: inherit; }
.ct-light-psu-warn {
  margin: 6px 0 2px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.ct-light-cut-label {
  margin: 10px 0 4px;
  font-size: 11px;
  font-weight: 700;
  color: #8a7f70;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ct-cut-map {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 4px;
  min-width: 0;
}
.ct-cut-map > b {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #8a7f70;
  white-space: nowrap;
  line-height: 13px;
  padding-top: 0;
}
.ct-cut-bars {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ct-cut-map.is-dense .ct-cut-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 6px;
}
.ct-cut-track-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ct-cut-track-row .ct-cut-track { flex: 1; min-width: 0; }
.ct-cut-qty {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: #8b5a1a;
  white-space: nowrap;
}
.ct-cut-track {
  display: flex;
  height: 13px;
  border: 1px solid #eadfd3;
  border-radius: 2px;
  overflow: hidden;
  background: #f4efe6;
}
.ct-cut-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #5c3a12;
  background: #e4c08a;
  box-shadow: inset -1px 0 0 #fff;
  padding: 0 1px;
  white-space: nowrap;
}
.ct-cut-seg.is-tiny {
  font-size: 9px;
  letter-spacing: -0.02em;
}
.ct-cut-seg:nth-child(2n) { background: #d4a05c; }
.ct-cut-seg:nth-child(3n) { background: #c8874a; color: #fff8ef; }
.ct-cut-seg.is-waste {
  background: repeating-linear-gradient(-45deg, #eee8de, #eee8de 3px, #e2dbd0 3px, #e2dbd0 6px);
  color: #8a7f70;
  font-weight: 600;
  box-shadow: none;
}
.ct-cut-seg.is-psu { box-shadow: inset -1px 0 0 rgba(255,255,255,.35); }
.ct-light-bom-empty { margin: 0; color: #8a7f70; font-size: 13px; }
.ct-light-acc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.ct-light-acc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
  border: 1px solid #eee6da;
  border-radius: 12px;
  padding: 8px 10px;
}
.ct-light-acc-item span {
  font-size: 12px;
  font-weight: 600;
  color: #5c5348;
}
.ct-light-step {
  display: flex;
  align-items: center;
  gap: 2px;
}
.ct-light-step-btn {
  width: 22px;
  height: 22px;
  border: 1px solid #e0d8cc;
  border-radius: 6px;
  background: #faf6f0;
  color: #5c5348;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.ct-light-step-btn:hover {
  border-color: #c8874a;
  background: #fff8ef;
  color: #8b5a1a;
}
.ct-light-step input {
  width: 28px;
  height: 22px;
  padding: 0;
  border: 1px solid #e4d9c8;
  border-radius: 6px;
  background: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  color: #2a251f;
}
.ct-light-step input:focus {
  outline: none;
  border-color: #c8874a;
}
@media (max-width: 720px) {
  .acc-shell.contract-wide {
    padding-left: 10px;
    padding-right: 10px;
    overflow-x: hidden;
  }
  .acc-top-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
  .contract-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .contract-toolbar-left { width: 100%; }
  .contract-toolbar .acc-btn { width: 100%; min-width: 0; }
  .ct-view-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .ct-view-banner-actions .acc-btn { width: 100%; }

  .contract-doc {
    padding: 14px 12px 20px;
    overflow-x: hidden;
  }
  .contract-doc-header {
    padding: 0 0 10px;
    text-align: left;
  }
  .contract-doc-header h2 { font-size: 1.22rem; }
  .contract-doc-header p { text-align: left; }
  .ct-order-no-field {
    position: static;
    transform: none;
    margin-top: 10px;
    width: 100%;
  }
  .ct-order-no-field input { flex: 1 1 auto; width: auto; }

  .ct-block-body { padding: 12px; }
  .ct-block-title { padding: 10px 12px; }

  .contract-doc .ct-field input,
  .contract-doc .ct-field select,
  .contract-doc .ct-field textarea,
  .contract-doc .ct-money-input {
    font-size: 16px;
  }

  .ct-alu-hint-row,
  .ct-alu-chip-row,
  .ct-light-toolbar {
    flex-wrap: wrap;
  }
  .ct-alu-grand,
  .ct-light-grand {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .ct-alu-rate { margin-left: 0; }

  #paintChipFields,
  #appliancesGrid { grid-template-columns: 1fr; }
  .ct-ct-meters,
  .ct-ct-meters input { width: 64px; flex-basis: 64px; }
  .ct-ct-break-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ct-ct-break-line em {
    min-width: 0;
    grid-column: 2;
  }
  .ct-summary-grid { grid-template-columns: 1fr; }
  .ct-summary-line { gap: 10px; align-items: flex-start; }
  .ct-summary-line .lbl { min-width: 0; }
  .ct-summary-line .val { flex-shrink: 0; }

  .ct-ex-row.is-sum-open {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .ct-ex-row.is-sum-open .ct-ex-sum-fields {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
    gap: 6px;
    align-items: end;
  }

  .ct-sheet-rows { grid-template-columns: 1fr; }

  .ct-light-card {
    padding: 10px 34px 12px 8px;
  }
  .ct-light-stats { gap: 4px; flex-wrap: wrap; }
  .ct-light-acc { grid-template-columns: 1fr; }
  .ct-light-sizes-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 8px;
    align-items: center;
  }
  .ct-light-sizes-label { grid-column: 1 / -1; white-space: normal; }
  .ct-light-size-grid {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }
  .ct-light-size {
    flex: 0 0 calc((100% - 16px) / 5);
    width: auto;
    min-width: 0;
    max-width: none;
    height: 36px;
    font-size: 16px;
  }
  .ct-light-size-more .ct-light-size {
    flex: 0 0 calc((100% - 16px) / 5);
  }
  .ct-light-card-total {
    grid-column: 1 / -1;
    text-align: right;
  }
  .ct-light-bom-caps,
  .ct-light-bom-psus { flex-wrap: wrap; width: 100%; max-width: 100%; }
  .ct-cut-map.is-dense .ct-cut-bars { grid-template-columns: 1fr; }

  .ct-sensor-head { display: none; }
  .ct-psu-head { display: none; }
  .ct-sensor-row {
    grid-template-columns: 48px minmax(0, 1fr) 34px;
  }
  .ct-sensor-row [data-sensor="name"],
  .ct-sensor-row [data-sensor="sku"],
  .ct-sensor-row [data-sensor="price"] { grid-column: 2; }
  .ct-sensor-row .ct-price-del {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
  .ct-psu-row {
    grid-template-columns: 48px minmax(0, 1fr) 34px;
  }
  .ct-psu-row [data-psu="name"],
  .ct-psu-row [data-psu="sku"],
  .ct-psu-row [data-psu="price"],
  .ct-psu-row [data-psu="watts"],
  .ct-psu-row .ct-psu-color-picks { grid-column: 2; }
  .ct-psu-row .ct-price-del {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
  .ct-psu-type-head {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .ct-modal-overlay { padding: 8px; align-items: flex-start; }
  .ct-modal {
    max-width: 100%;
    max-height: calc(100dvh - 16px);
  }
  .ct-light-type-modal .ct-modal-head {
    align-items: flex-start;
    padding: 16px 14px 10px 16px;
  }
  .ct-sensor-pick-grid { grid-template-columns: 1fr 1fr; padding: 8px 12px 14px; }
  .ct-sensor-pick img,
  .ct-sensor-ph-lg { height: 80px; flex-basis: 80px; }
  .ct-alu-site-modal {
    width: 100%;
    max-width: 100%;
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }
  .ct-settings-modal,
  .ct-settings-modal-lg {
    max-width: 100%;
    max-height: calc(100dvh - 16px);
    width: 100%;
  }
  .ct-settings-modal-lg .ct-settings-body { min-height: 0; }
  .ct-settings-body { padding: 12px; max-height: min(70dvh, 520px); }
  .ct-product-modal-grid { grid-template-columns: 1fr 1fr; padding: 12px; }
}

@media print {
  @page { size: A4 portrait; margin: 8mm 10mm; }
  html, body { height: auto !important; overflow: visible !important; }
  body.acc-body { background: #fff !important; color: #2a251f !important; }
  .acc-bg, .acc-top, .contract-toolbar, .no-print, #loginBlock { display: none !important; }
  .acc-shell { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
  #contractBlock { display: block !important; }

  .print-hide { display: none !important; }
  .print-only { display: block !important; }
  .ct-br-picker, .ct-br-dims, .ct-br-remove, .ct-br-qty { display: none !important; }
  .ct-br-empty { display: none !important; }
  .ct-br-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #e0d8cc;
    background: #fff;
    margin-bottom: 8px;
  }
  .ct-br-card-body { grid-template-columns: 1fr; padding: 0 8px 8px; }
  .ct-br-stage {
    min-height: 0;
    background: #fbf7f1 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .ct-br-svg { max-height: 210px; }
  .ct-br-title { font-size: 13pt; }
  .ct-br-print-size {
    display: block !important;
    padding: 0 10px 10px;
    font-size: 9.5pt;
    font-weight: 700;
    color: #8b5a1a;
  }

  .contract-doc {
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: 10pt;
    line-height: 1.4;
    color: #2a251f;
  }

  .contract-doc-header {
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 2px solid #2a251f;
  }
  .contract-doc-header {
    padding: 0 120px 6px 0;
    margin-bottom: 8px;
  }
  .contract-doc-header h2 { font-size: 14pt; margin-bottom: 1px; color: #2a251f; }
  .contract-doc-header p { font-size: 9pt; color: #6b5f4f; text-align: center; }
  .ct-order-no-field { gap: 6px; }
  .ct-order-no-field label { font-size: 10pt; }
  .ct-order-no-field input {
    width: 110px;
    flex-basis: 110px;
    min-height: 36px;
    font-size: 15px;
    padding: 4px 10px;
    border-width: 1px;
  }

  .ct-block {
    margin-bottom: 8px;
    border: 1px solid #e0d8cc;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .ct-block-title {
    padding: 6px 12px;
    font-size: 9.5pt;
    font-weight: 700;
    color: #4a4238;
    background: #f5f0e8 !important;
    border-bottom: 1px solid #e0d8cc;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .ct-block-body { padding: 8px 12px 10px; }

  .ct-block-head { margin-bottom: 8px; }
  .ct-block-head .ct-block-body { padding: 8px 12px 10px; }
  .ct-block-head .ct-grid-tight { gap: 6px 10px; }
  .ct-block-head .ct-field label { font-size: 8.5pt; margin-bottom: 3px; }
  .ct-block-head .ct-field input {
    padding: 5px 8px;
    min-height: 28px;
    font-size: 9.5pt;
    border-radius: 6px;
  }

  .ct-grid { gap: 8px 12px; }
  .ct-grid + .ct-grid { margin-top: 8px; }
  .ct-grid.g2 { grid-template-columns: 1fr 1fr; }
  .ct-grid.g3 { grid-template-columns: repeat(3, 1fr); }
  .ct-grid.g4 { grid-template-columns: repeat(2, 1fr); }

  .ct-field label {
    font-size: 8.5pt;
    font-weight: 600;
    color: #5c5348;
    margin-bottom: 3px;
  }
  .ct-field input,
  .ct-field select,
  .ct-field textarea {
    border: 1px solid #d4ccc0;
    border-radius: 6px;
    padding: 5px 8px;
    min-height: 28px;
    font-size: 9.5pt;
    line-height: 1.35;
    background: #fff !important;
    color: #2a251f;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .ct-field textarea { min-height: 40px; }

  .ct-money-wrap {
    border: 1px solid #d4ccc0;
    border-radius: 6px;
    min-height: 28px;
    box-shadow: none !important;
    overflow: hidden;
  }
  .ct-money-wrap .ct-money-input {
    padding: 5px 8px;
    min-height: 28px;
    font-size: 9.5pt;
    font-weight: 600;
  }
  .ct-money-unit {
    font-size: 8pt;
    padding: 0 8px;
    background: linear-gradient(180deg, #faf6f0 0%, #efe6da 100%) !important;
    color: #8b5a1a;
    border-left: 1px solid #e8dfd2;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .ct-sum {
    font-weight: 700;
    font-size: 9.5pt;
    padding: 5px 8px;
    background: #faf6f0 !important;
    border: 1px solid #e8e0d4;
    border-radius: 6px;
    min-height: 28px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .ct-sum.highlight {
    background: #fff8ef !important;
    border-color: #e8c89a;
    color: #8b5a1a;
  }

  .ct-product-bar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
  }
  .ct-product-bar-name {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 9.5pt;
    border: 1px solid #d4ccc0;
    border-radius: 6px;
  }

  .ct-note, .no-print, .no-print-inline,
  .ct-chip-hint, .ct-chip-row, .ct-chip-add, .ct-chip-del,
  .ct-block-chevron { display: none !important; }

  .ct-chip-field[hidden] { display: none !important; }
  #paintChipFields { grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  #appliancesGrid { grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }

  .ct-block-toggle.ct-block-status-empty,
  .ct-block-toggle.ct-block-status-ok {
    box-shadow: none !important;
    background: #f5f0e8 !important;
  }

  .ct-warn-red { color: #b91c1c !important; font-size: 8.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ct-warn-box {
    padding: 6px 8px;
    margin-bottom: 6px;
    font-size: 8pt;
    line-height: 1.35;
    background: #fef2f2 !important;
    border: 1px solid #fca5a5 !important;
    border-left: 3px solid #dc2626 !important;
    border-radius: 6px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .ct-field input.ct-fill-empty,
  .ct-field select.ct-fill-empty,
  .ct-field textarea.ct-fill-empty,
  .ct-field input.ct-fill-ok,
  .ct-field select.ct-fill-ok,
  .ct-field textarea.ct-fill-ok,
  .ct-money-wrap:has(.ct-money-input.ct-fill-empty),
  .ct-money-wrap:has(.ct-money-input.ct-fill-ok) {
    border-color: #d4ccc0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }
  .ct-sum.ct-fill-empty, .ct-sum.ct-fill-ok { border-color: #e8e0d4 !important; }

  .ct-type-picker, .ct-product-select, .ct-product-bar-type, .ct-modal-overlay { display: none !important; }
  #productFormArea[hidden] { display: none !important; }
  .ct-product-bar-cost[hidden] { display: none !important; }

  .ct-sheet-rows { grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .ct-sheet-row { gap: 8px; margin-bottom: 0; }
  .ct-sheet-row .ct-btn-remove { display: none !important; }

  .ct-hw-row {
    gap: 8px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    grid-template-columns: 2fr 0.7fr 40px 0.7fr;
  }
  .ct-hw-row .ct-btn-remove { display: none !important; }

  .ct-extras-rows { grid-template-columns: 1fr; gap: 6px; }
  .ct-ex-row { grid-template-columns: 1fr; gap: 4px 8px; }
  .ct-ex-row.is-sum-open { grid-template-columns: minmax(0, 1fr) 90px 48px 90px; }
  .ct-ex-sum-btn { display: none !important; }
  .ct-ex-row .ct-btn-remove { display: none !important; }

  .ct-desc-field label { color: #8a7f70; font-weight: 500; }

  .ct-summary {
    padding: 8px 12px;
    margin-bottom: 8px;
    border: 1px solid #e0d8cc;
    border-radius: 8px;
    background: #faf8f5 !important;
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .ct-summary-title { font-size: 10pt; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid #e0d8cc; }
  .ct-summary-line { padding: 4px 0; font-size: 9.5pt; }
  .ct-summary-line.grand { font-size: 11pt; padding-top: 6px; margin-top: 4px; border-top: 1px solid #e0d8cc; }
  .ct-summary-grid { gap: 4px 12px; margin: 6px 0; font-size: 8.5pt; }

  .ct-signatures {
    gap: 20px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e0d8cc;
    break-inside: avoid;
  }
  .ct-sign-block label { font-size: 9pt; margin-bottom: 24px; }
  .ct-sign-caption { font-size: 8pt; color: #8a7f70; }

  .ct-light-card { padding: 8px 10px; border-radius: 8px; }
  .ct-light-card-title { font-size: 10pt; }
  .ct-light-card-total, .ct-light-grand strong { font-size: 10pt; }
  .ct-light-stats { gap: 4px; }
  .ct-light-stat { padding: 4px; }
  .ct-light-stat b { font-size: 9pt; }
  .ct-light-size { height: 16px; font-size: 7.5pt; border-radius: 4px; }
  .ct-light-size-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 2px; }
  .ct-light-step-btn { display: none; }
  .ct-light-color-btn { width: 56px; padding: 3px; }
  .ct-light-window { height: 14px; }
  .ct-light-kelvin { font-size: 8pt; }
}

body.pdf-capturing .acc-bg,
body.pdf-capturing .acc-top,
body.pdf-capturing .ct-history,
body.pdf-capturing .ct-view-banner,
body.pdf-capturing .contract-toolbar {
  display: none !important;
}

body.pdf-capturing .ct-light-step-btn,
body.pdf-capturing .ct-light-color-btn:not(.active),
body.pdf-capturing .ct-light-size.print-hide,
body.pdf-capturing .ct-light-add,
body.pdf-capturing .ct-light-empty,
body.pdf-capturing .ct-light-card-x,
body.pdf-capturing .ct-light-sz-add,
body.pdf-capturing iframe,
body.pdf-capturing .ct-modal-overlay {
  display: none !important;
}
body.pdf-capturing .ct-light-window,
body.pdf-capturing .ct-light-color-btn.active .ct-light-window {
  box-shadow: none !important;
}

body.pdf-capturing .contract-doc .print-hide {
  display: none !important;
}

body.pdf-capturing .html2pdf__overlay {
  z-index: 100000;
}
