:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #637087;
  --line: #dce3ed;
  --blue: #126ee8;
  --blue-dark: #095bc6;
  --blue-pale: #edf5ff;
  --surface: #fff;
  --header-bg: #fff;
  --header-ink: #172033;
  --widget-radius: 24px;
  --bg: #f4f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
button, input { font: inherit; }
button { cursor: pointer; }

.page-shell { max-width: 1210px; margin: 0 auto; padding: 42px 24px 64px; }
.widget { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--widget-radius); box-shadow: 0 20px 50px rgba(20, 48, 85, .09); }
.widget-header { display: flex; justify-content: space-between; gap: 24px; padding: 27px 40px 24px; border-bottom: 3px solid var(--blue); background: var(--header-bg); color: var(--header-ink); }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .09em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 10px; font-size: clamp(28px, 4vw, 43px); line-height: 1.08; letter-spacing: -.035em; }
.lead { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.quota { align-self: flex-start; min-width: 136px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 4px; background: #f7f9fc; }
.quota span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.quota strong { font-size: 18px; }
.notice { margin: 24px 40px 0; padding: 13px 15px; border: 1px solid #c9dcf7; border-radius: 12px; background: var(--blue-pale); color: #315277; font-size: 14px; line-height: 1.45; }
.workflow { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 0; padding: 28px 40px 36px; }
.step { min-width: 0; padding: 4px 24px; border-right: 1px solid var(--line); }
.step:first-child { padding-left: 0; }
.step:last-child { padding-right: 0; border-right: 0; }
.step-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.step-number { display: grid; flex: 0 0 auto; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #e7f1ff; color: var(--blue); font-size: 13px; font-weight: 800; }
.step h2 { margin-bottom: 4px; font-size: 17px; letter-spacing: -.01em; }
.step-heading p, .hint, .file-name { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.42; }
.upload-area { display: flex; min-height: 132px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 14px; border: 1.5px dashed #a7bddc; border-radius: 14px; color: var(--muted); text-align: center; transition: .18s ease; }
.upload-area:hover, .upload-area.is-ready { border-color: var(--blue); background: #f7fbff; }
.upload-area input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-area strong { color: var(--blue); font-size: 14px; }
.upload-area span:not(.upload-icon) { font-size: 12px; }
.upload-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: #dcecff; color: var(--blue); font-size: 22px; font-weight: 700; }
.file-name { overflow: hidden; margin-top: 9px; text-overflow: ellipsis; white-space: nowrap; }
.solutions { display: grid; gap: 8px; }
.solution-card { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; transition: .18s ease; }
.solution-card:hover { border-color: #90baf1; }
.solution-card.is-selected { border-color: var(--blue); background: #f6faff; box-shadow: 0 0 0 2px rgba(18,110,232,.1); }
.solution-art { position: relative; display: block; flex: 0 0 46px; height: 39px; overflow: hidden; border-radius: 8px; background: linear-gradient(140deg, #a6b5c4, #f6f7f5); }
.solution-art::after { position: absolute; right: 0; bottom: 0; left: 0; height: 12px; background: rgba(113, 124, 141, .22); content: ""; }
.art-spots i { position: absolute; z-index: 1; width: 7px; height: 7px; border-radius: 50%; background: #fff7c9; box-shadow: 0 0 6px 2px #fff5ba; }
.art-spots i:nth-child(1) { top: 9px; left: 9px; }.art-spots i:nth-child(2) { top: 8px; left: 30px; }.art-spots i:nth-child(3) { top: 21px; left: 17px; }.art-spots i:nth-child(4) { top: 22px; left: 36px; }
.art-track::before { position: absolute; z-index: 1; top: 18px; right: 5px; left: 5px; height: 3px; background: #26303e; content: ""; transform: rotate(-10deg); }.art-track i { position: absolute; z-index: 2; width: 6px; height: 6px; border-radius: 50%; background: #222; }.art-track i:nth-child(1) { top: 13px; left: 12px; }.art-track i:nth-child(2) { top: 16px; left: 23px; }.art-track i:nth-child(3) { top: 18px; right: 10px; }
.art-led { box-shadow: inset 0 0 0 5px #e5c980, inset 0 0 12px 7px #fff1bb; }
.solution-copy { display: grid; gap: 3px; min-width: 0; }.solution-copy strong { font-size: 13px; }.solution-copy small { color: var(--muted); font-size: 11px; line-height: 1.28; }
.primary-button, .secondary-button { border: 0; border-radius: 11px; color: #fff; background: var(--blue); font-weight: 750; transition: .18s ease; }
.primary-button { width: 100%; min-height: 46px; margin-top: 3px; }.primary-button:hover:not(:disabled), .secondary-button:hover { background: var(--blue-dark); }.primary-button:disabled { cursor: not-allowed; background: #b9c6d8; }
.hint { margin-top: 9px; }
.result { margin: 0 40px 40px; padding: 27px; border: 1px solid var(--line); border-radius: 18px; background: #fbfcfe; }.result.is-hidden { display: none; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }.result-heading .eyebrow { color: var(--blue); }.result-heading h2 { margin-bottom: 19px; font-size: 24px; letter-spacing: -.025em; }.text-button { border: 0; background: transparent; color: var(--blue); font-size: 14px; font-weight: 700; }
.comparison { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: 14px; background: #dae1e7; aspect-ratio: 2.05 / 1; }
.compare-image { position: relative; overflow: hidden; background-position: center; background-size: cover; }.compare-image span { position: absolute; top: 12px; left: 12px; z-index: 5; padding: 5px 9px; border-radius: 7px; background: rgba(13, 23, 38, .72); color: #fff; font-size: 12px; font-weight: 750; }.after-image { border-left: 2px solid rgba(255,255,255,.78); }
.ceiling-overlay { position: absolute; inset: 0; pointer-events: none; }.ceiling-overlay::before { position: absolute; inset: 0 0 33%; background: linear-gradient(155deg, rgba(252,252,250,.95), rgba(230,232,229,.79)); clip-path: polygon(0 0, 100% 0, 88% 93%, 12% 93%); content: ""; }
.edge-light { position: absolute; z-index: 2; top: 42%; right: 10%; left: 10%; height: 3px; opacity: 0; background: #ffe5a5; box-shadow: 0 0 10px 4px rgba(255,214,128,.9); transform: perspective(140px) rotateX(50deg); }.spots i { position: absolute; z-index: 3; width: 13px; height: 13px; border-radius: 50%; opacity: 0; background: #fffdf3; box-shadow: 0 0 8px 3px rgba(255,243,185,.98); }.spots i:nth-child(1) { top: 13%; left: 25%; }.spots i:nth-child(2) { top: 15%; left: 58%; }.spots i:nth-child(3) { top: 27%; left: 37%; }.spots i:nth-child(4) { top: 28%; left: 68%; }.spots i:nth-child(5) { top: 34%; left: 48%; }.spots i:nth-child(6) { top: 34%; left: 78%; }
.track-line { position: absolute; z-index: 4; top: 30%; right: 18%; left: 18%; height: 5px; opacity: 0; background: #2d3743; transform: rotate(-9deg); }.track-line i { position: absolute; top: 3px; width: 14px; height: 9px; border-radius: 2px 2px 50% 50%; background: #202833; box-shadow: 0 5px 11px 4px rgba(255,239,181,.7); }.track-line i:nth-child(1) { left: 15%; }.track-line i:nth-child(2) { left: 47%; }.track-line i:nth-child(3) { right: 9%; }
.comparison[data-solution="spots"] .spots i { opacity: 1; }.comparison[data-solution="track"] .track-line { opacity: 1; }.comparison[data-solution="led"] .edge-light { opacity: 1; }.comparison[data-solution="led"] .ceiling-overlay::before { background: linear-gradient(155deg, rgba(248,248,248,.95), rgba(208,215,225,.8)); }
.comparison.is-ai-result .ceiling-overlay { display: none; }
.result-disclaimer { margin: 14px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.lead-form { display: grid; grid-template-columns: 1.45fr repeat(3, minmax(132px,.7fr)) auto; align-items: end; gap: 12px; padding: 18px; border-radius: 13px; background: #eaf3ff; }.lead-form h3 { margin-bottom: 4px; font-size: 16px; }.lead-form p { margin-bottom: 0; color: #526c8b; font-size: 13px; line-height: 1.35; }.lead-form label { display: grid; gap: 6px; color: #405b7e; font-size: 12px; font-weight: 700; }.lead-form input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #b4cbe8; border-radius: 9px; outline-color: var(--blue); background: #fff; }.secondary-button { min-height: 42px; padding: 0 17px; white-space: nowrap; }.form-message { grid-column: 1 / -1; color: #176b41 !important; font-weight: 700; }

@media (max-width: 850px) { .workflow { grid-template-columns: 1fr; padding: 25px; }.step, .step:first-child, .step:last-child { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }.step:last-child { border-bottom: 0; }.widget-header { padding: 28px 25px; }.notice, .result { margin-right: 25px; margin-left: 25px; }.lead-form { grid-template-columns: 1fr; }.secondary-button { width: 100%; } }
@media (max-width: 560px) { .page-shell { padding: 18px 12px 36px; }.widget { border-radius: 16px; }.widget-header { display: block; }.quota { display: inline-block; margin-top: 20px; }.comparison { grid-template-columns: 1fr; aspect-ratio: 1 / 1.15; }.after-image { border-top: 2px solid rgba(255,255,255,.78); border-left: 0; }.result { padding: 18px; }.result-heading { align-items: flex-start; }.result-heading h2 { font-size: 20px; } }
.admin-content { display: grid; gap: 15px; max-width: 800px; padding: 30px 40px 42px; }.admin-content label { display: grid; gap: 7px; color: #405b7e; font-size: 13px; font-weight: 700; }.admin-content input, .admin-content select, .admin-content textarea { width: 100%; padding: 10px 11px; border: 1px solid #b4cbe8; border-radius: 9px; outline-color: var(--blue); background: #fff; color: var(--ink); font: inherit; }.admin-content textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }.admin-content .primary-button { width: auto; padding: 0 18px; }.admin-content #editor { display: grid; gap: 15px; }.admin-content #editor.is-hidden { display: none; }
.admin-content #leads-panel { display: grid; gap: 12px; }.admin-content #leads-panel.is-hidden { display: none; }.admin-leads-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }.admin-leads-heading h2 { margin: 0; font-size: 22px; }.leads-table-wrap { overflow-x: auto; }.leads-table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; }.leads-table-wrap th, .leads-table-wrap td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }.leads-table-wrap th { color: var(--muted); font-size: 12px; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }.admin-content input[type="color"] { min-height: 42px; padding: 4px; }.admin-content input[type="checkbox"] { width: auto; min-height: 18px; margin: 0; padding: 0; }

.camera-button { display: flex; width: 100%; align-items: center; justify-content: center; gap: 7px; min-height: 38px; margin-top: 9px; border: 1px solid #bdd2ee; border-radius: 10px; color: var(--blue); background: #f7fbff; font-size: 13px; font-weight: 750; cursor: pointer; }
.camera-button:hover { border-color: var(--blue); background: #edf5ff; }
.camera-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.camera-button span { font-size: 19px; line-height: 1; transform: rotate(-35deg); }
.camera-hint { margin: 7px 0 0; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.35; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px; }
.comparison.is-ai-result .after-image { cursor: zoom-in; }
body.modal-open { overflow: hidden; }
.image-modal { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 24px; }
.image-modal[hidden] { display: none; }
.image-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 19, 32, .78); }
.image-modal-dialog { position: relative; display: grid; width: min(1040px, 100%); max-height: calc(100vh - 48px); gap: 14px; padding: 18px; overflow: auto; border-radius: 16px; background: #fff; box-shadow: 0 24px 90px rgba(0, 0, 0, .35); }
.image-modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.image-modal-heading h2 { margin: 0; font-size: 20px; }
.image-modal-dialog img { display: block; width: 100%; max-height: calc(100vh - 180px); object-fit: contain; background: #eef2f7; }
.image-modal-link { justify-self: start; text-decoration: none; }
@media (max-width: 560px) { .result-actions { justify-content: flex-start; gap: 10px; }.image-modal { padding: 12px; }.image-modal-dialog { max-height: calc(100vh - 24px); padding: 14px; }.image-modal-heading h2 { font-size: 17px; }.image-modal-dialog img { max-height: calc(100vh - 155px); } }

.room-details { margin-top: 15px; border: 1px solid #d5e1ee; border-radius: 11px; background: #fbfdff; }
.room-details summary { padding: 11px 12px; color: #315277; font-size: 12px; font-weight: 750; cursor: pointer; }
.room-details[open] summary { border-bottom: 1px solid #dce7f3; }
.room-details > p, .room-checks, .room-notes-label, .room-details textarea { margin-right: 12px; margin-left: 12px; }
.room-details > p { margin-top: 11px; margin-bottom: 10px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.room-checks { display: grid; gap: 7px; margin-bottom: 11px; }
.room-checks label { display: flex; align-items: flex-start; gap: 7px; color: #405b7e; font-size: 12px; line-height: 1.3; }
.room-checks input { margin: 1px 0 0; accent-color: var(--blue); }
.room-notes-label { display: block; margin-bottom: 6px; color: #405b7e; font-size: 12px; font-weight: 700; }
.room-details textarea { display: block; width: calc(100% - 24px); margin-bottom: 12px; padding: 9px; resize: vertical; border: 1px solid #b4cbe8; border-radius: 8px; outline-color: var(--blue); color: var(--ink); background: #fff; font: inherit; font-size: 12px; line-height: 1.35; }


.subscription-note { margin: -6px 0 0; color: #526c8b; font-size: 13px; line-height: 1.4; }
.admin-section-title { margin: 10px 0 -5px; font-size: 19px; }
.theme-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
.asset-upload { display: grid; gap: 11px; padding: 15px; border: 1px solid #c9dcf7; border-radius: 12px; background: #f6faff; }
.asset-upload h3 { margin: 0; font-size: 16px; }
.asset-upload .hint { margin: 0; }
.catalog-editor { display: grid; gap: 11px; padding: 15px; border: 1px solid #dce3ed; border-radius: 12px; background: #fbfcfe; }
.catalog-editor__heading, .catalog-editor__actions, .catalog-item-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.catalog-editor__heading h3, .catalog-item-form h3 { margin: 0; font-size: 16px; }
.catalog-item-list { display: grid; gap: 8px; }
.catalog-item-card { padding: 10px; border: 1px solid #dce3ed; border-radius: 9px; background: #fff; }
.catalog-item-card span { display: grid; gap: 3px; min-width: 0; }
.catalog-item-card small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.catalog-item-card div { display: flex; gap: 6px; flex: 0 0 auto; }
.catalog-item-form { display: grid; gap: 12px; padding-top: 13px; border-top: 1px solid #dce3ed; }
.catalog-item-form[hidden], #catalog-item-form[hidden] { display: none; }
.toggle-label { grid-template-columns: auto 1fr; align-items: center; }
.catalog-item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .catalog-editor__heading, .catalog-item-card { align-items: flex-start; flex-direction: column; } .catalog-item-grid { grid-template-columns: 1fr; } }
.theme-preview { --preview-primary: #126ee8; --preview-bg: #f4f7fb; --preview-surface: #ffffff; --preview-header-bg: #ffffff; --preview-header-text: #172033; --preview-muted: #637087; --preview-radius: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--preview-radius); background: var(--preview-bg); }
.theme-preview__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 17px; background: var(--preview-header-bg); color: var(--preview-header-text); }
.theme-preview__header span { color: var(--preview-primary); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.theme-preview__body { display: grid; gap: 6px; padding: 17px; background: var(--preview-surface); color: var(--preview-header-text); }
.theme-preview__body small { color: var(--preview-muted); }
.theme-preview__body button { justify-self: start; margin-top: 5px; padding: 8px 12px; border: 0; border-radius: calc(var(--preview-radius) * .45); background: var(--preview-primary); color: #fff; font: inherit; font-size: 13px; font-weight: 750; }


.three-d-page { min-height: 100vh; background: #edf2f7; }
.three-d-load-error { max-width: 1360px; margin: 14px auto 0; padding: 11px 16px; border: 1px solid #f1b7b7; border-radius: 10px; background: #fff0f0; color: #8e2525; font-size: 13px; line-height: 1.4; }
.three-d-shell { max-width: 1360px; margin: 0 auto; padding: 30px 24px 48px; }
.three-d-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 22px 0 26px; }
.three-d-header h1 { margin-bottom: 8px; font-size: clamp(31px, 4vw, 46px); }
.three-d-header .lead { max-width: 710px; }
.three-d-workspace { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 640px; overflow: hidden; border: 1px solid #d6e0ea; border-radius: 18px; background: #fff; box-shadow: 0 18px 48px rgba(33, 58, 87, .12); }
.three-d-panel { display: grid; align-content: start; gap: 20px; padding: 24px; border-right: 1px solid #dce3ed; background: #fbfcfe; }
.three-d-panel h2 { margin: 0 0 7px; font-size: 17px; }.three-d-panel p { margin: 0; color: #637087; font-size: 12px; line-height: 1.45; }
.three-d-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.three-d-fields label:last-child { grid-column: 1 / -1; }
.three-d-panel label { display: grid; gap: 6px; color: #405b7e; font-size: 12px; font-weight: 750; }.three-d-panel input:not([type="checkbox"]), .three-d-panel select { width: 100%; min-height: 39px; padding: 7px 8px; border: 1px solid #b8cce4; border-radius: 8px; outline-color: #126ee8; background: #fff; color: #172033; font: inherit; }
.three-d-group { display: grid; gap: 11px; padding-top: 18px; border-top: 1px solid #dce3ed; }.switch-row { display: flex !important; align-items: center; gap: 8px; }.switch-row input { width: 16px; height: 16px; margin: 0; accent-color: #126ee8; }
.three-d-summary { display: grid; gap: 5px; padding: 13px; border-radius: 10px; background: #eaf3ff; color: #315277; }.three-d-summary strong { font-size: 20px; }.three-d-summary span { font-size: 12px; line-height: 1.35; }
.three-d-presentation { display: grid; gap: 8px; padding: 13px; border: 1px solid #c9dcf7; border-radius: 10px; background: #f6faff; }.three-d-presentation h2, .three-d-presentation p { margin: 0; }.three-d-presentation h2 { font-size: 16px; }.three-d-presentation p { color: #506177; font-size: 12px; line-height: 1.4; }
.three-d-panel .secondary-button { width: 100%; }
.three-d-scene-wrap { position: relative; min-width: 0; min-height: 620px; background: #f0f4f8; }.three-d-scene { position: absolute; inset: 0; overflow: hidden; }.three-d-scene canvas { display: block; width: 100%; height: 100%; touch-action: none; }.photo-alignment-image, .photo-alignment-overlay { position: absolute; inset: 0; display: none; width: 100%; height: 100%; object-fit: contain; }.photo-alignment-image { z-index: 1; background: #111923; }.photo-alignment-overlay { z-index: 3; pointer-events: none; }.three-d-scene.is-photo-alignment > canvas:not(.photo-alignment-overlay) { position: relative; z-index: 2; opacity: 0; }.three-d-scene.is-photo-alignment .photo-alignment-image, .three-d-scene.is-photo-alignment .photo-alignment-overlay { display: block; }.three-d-scene.is-mask-mode .photo-alignment-overlay { pointer-events: auto; cursor: crosshair; }.three-d-scene.is-reference-point-mode .photo-alignment-overlay { pointer-events: auto; cursor: crosshair; }.three-d-tip { position: absolute; right: 16px; bottom: 14px; max-width: 260px; margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.88); color: #506177; font-size: 11px; line-height: 1.35; }
.three-d-access { max-width: 700px; margin: 10vh auto; padding: 32px; border-radius: 16px; background: #fff; box-shadow: 0 16px 45px rgba(33, 58, 87, .12); }.three-d-access h2 { margin-bottom: 9px; }.three-d-access p { margin: 0; color: #637087; line-height: 1.5; }.three-d-access.is-hidden { display: none; }
.three-d-admin-link { display: grid; gap: 7px; padding: 13px; border: 1px solid #c9dcf7; border-radius: 10px; background: #edf5ff; color: #315277; font-size: 13px; }.three-d-admin-link a { color: var(--blue); font-weight: 750; }
/* Этап 3 внешнего аудита (22.09.2026): карточка доступа сотрудников (admin.html) и
   переключаемые блоки входа сотрудника/владельца (estimate.html, estimate-print.html,
   three-d.html) — общий .is-hidden для всех новых переключаемых блоков входа. */
.module-access-panel { display: grid; gap: 9px; padding: 13px; margin-top: 4px; border: 1px solid #c9dcf7; border-radius: 10px; background: #edf5ff; color: #315277; font-size: 13px; }
.module-access-panel h2 { margin: 0; font-size: 15px; }
.module-access-links { display: flex; flex-wrap: wrap; gap: 12px; }
.module-access-links a { color: var(--blue); font-weight: 750; }
.module-access-links a[hidden] { display: none; }
#estimate-employee-login.is-hidden, #module-employee-login.is-hidden, #module-logout-button.is-hidden, #print-employee-login.is-hidden { display: none; }
@media (max-width: 800px) { .three-d-header { display: grid; }.three-d-workspace { grid-template-columns: 1fr; }.three-d-panel { border-right: 0; border-bottom: 1px solid #dce3ed; }.three-d-scene-wrap { min-height: 470px; } }
@media (max-width: 560px) { .three-d-shell { padding: 18px 12px 28px; }.three-d-workspace { border-radius: 14px; }.three-d-panel { padding: 18px; }.three-d-scene-wrap { min-height: 390px; } }

.three-d-staff { display: grid; gap: 10px; padding: 14px; border: 1px solid #c9dcf7; border-radius: 12px; background: #edf5ff; }
.three-d-staff h2 { margin: 0; }
.three-d-staff p { margin: 0; }
.three-d-project-photos { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid #c9dcf7; }
.three-d-project-photos input[type="file"] { width: 100%; font-size: 12px; }
.project-photo-list { display: grid; gap: 5px; }
.project-photo-list > div, .project-photo-list > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 7px; background: #fff; color: #405b7e; font-size: 12px; }
.project-photo-list button { flex: 0 0 auto; border: 0; border-radius: 6px; background: #e9eef5; color: #42536a; cursor: pointer; font: inherit; padding: 4px 6px; }
.photo-analysis { display: grid; gap: 7px; color: #405b7e; font-size: 12px; line-height: 1.4; }
.photo-analysis__item { display: grid; gap: 5px; padding: 8px; border-radius: 8px; background: #fff; }
.photo-analysis__item button { justify-self: start; border: 0; border-radius: 6px; background: #dcecff; color: #126ee8; cursor: pointer; font: inherit; font-weight: 700; padding: 5px 7px; }
.photo-render-workspace { display: grid; gap: 8px; padding: 10px; border: 1px solid #bad5f5; border-radius: 9px; background: #f7fbff; }.photo-render-workspace h3, .photo-render-workspace p { margin: 0; }.photo-render-workspace h3 { color: #315277; font-size: 14px; }.photo-render-source-preview { display: grid; gap: 6px; padding: 7px; border-radius: 7px; background: #fff; color: #526b89; font-size: 11px; line-height: 1.35; }.photo-render-source-preview img { width: 100%; max-height: 230px; border-radius: 5px; object-fit: contain; background: #e6edf5; }.photo-render-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }.photo-render-results > p { grid-column: 1 / -1; }.photo-render-result { display: grid; gap: 5px; min-width: 0; color: #126ee8; font-size: 11px; font-weight: 700; text-decoration: none; }.photo-render-result img { width: 100%; aspect-ratio: 1.25; border: 1px solid #c8d9eb; border-radius: 6px; object-fit: cover; background: #e6edf5; }.measurement-overlay-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }.measurement-overlay-list > p { grid-column: 1 / -1; color: #526b89; font-size: 11px; font-weight: 400; }.photo-render-result--stale { outline: 2px solid #e0a419; outline-offset: 2px; border-radius: 6px; }.photo-render-result--stale img { opacity: .72; }
.photo-render-result--selected { outline: 2px solid #126ee8; outline-offset: 2px; border-radius: 6px; }
.photo-render-result--expanded { grid-column: 1 / -1; }
.photo-render-compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 4px; }
.photo-render-compare__column { display: grid; gap: 4px; }
.photo-render-compare__column strong { font-size: 11px; color: #315277; font-weight: 700; }
.photo-render-compare__column img { width: 100%; max-height: 320px; border: 1px solid #c8d9eb; border-radius: 6px; object-fit: contain; background: #e6edf5; }
.photo-render-compare__column p { margin: 0; color: #8394ac; font-size: 10px; font-weight: 400; line-height: 1.3; }
@media (max-width: 700px) { .photo-render-compare { grid-template-columns: 1fr; } }
.three-d-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.three-d-action-row .secondary-button, .three-d-staff .primary-button { min-height: 38px; padding: 0 8px; font-size: 12px; }
.three-d-status { min-height: 17px; color: #315277 !important; font-weight: 700; }
.contour-preview { display: grid; place-items: center; min-height: 160px; padding: 8px; border: 1px dashed #a9c6ed; border-radius: 10px; background: #fff; }
.contour-preview svg { width: 100%; max-width: 240px; height: 165px; overflow: visible; }
.contour-preview polygon { fill: color-mix(in srgb, var(--blue, #126ee8) 12%, white); stroke: var(--blue, #126ee8); stroke-width: 2; }
.contour-preview circle { fill: var(--blue, #126ee8); stroke: #fff; stroke-width: 2; }
.contour-preview text { fill: #315277; font: 700 11px system-ui, sans-serif; }
.contour-table { display: grid; gap: 6px; max-height: 230px; overflow: auto; padding-right: 2px; }
.contour-row { display: grid; grid-template-columns: 20px 1fr 1fr 26px; gap: 6px; align-items: end; }
.contour-row b { padding: 0 0 10px; color: #6382a7; font-size: 12px; }
.contour-row label { gap: 3px; font-size: 10px; }
.contour-row input { min-height: 32px !important; padding: 5px !important; }
.contour-row button, .obstacle-item button { width: 26px; height: 32px; border: 0; border-radius: 7px; background: #e9eef5; color: #42536a; cursor: pointer; font-size: 19px; line-height: 1; }
.obstacle-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.obstacle-form label:first-child { grid-column: 1 / -1; }
.obstacle-list { display: grid; gap: 6px; }
.obstacle-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border: 1px solid #dce3ed; border-radius: 8px; background: #fff; color: #405b7e; font-size: 12px; }
.obstacle-item span { display: grid; gap: 2px; }.obstacle-item small { color: #71839a; }
.obstacle-item.is-selected { border-color: var(--blue, #126ee8); box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue, #126ee8) 16%, transparent); }
.obstacle-select { display: grid; flex: 1 1 auto; min-width: 0; gap: 2px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.object-editor { display: grid; gap: 9px; padding: 10px; border: 1px solid #b8d4f7; border-radius: 10px; background: #edf5ff; }.object-editor.is-hidden { display: none; }.object-editor h3, .object-editor p { margin: 0; }.object-editor p { color: #315277; font-size: 13px; font-weight: 750; }.object-editor input[type="color"] { width: 100%; min-height: 36px; padding: 3px; cursor: pointer; }.text-danger-button { border: 0; background: transparent; color: #ae3b36; cursor: pointer; font: inherit; font-weight: 700; justify-self: start; padding: 2px 0; }
.rotation-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.rotation-actions .secondary-button { min-height: 36px; padding: 0 8px; }
.three-d-object-status { min-height: 17px; color: #8b4d11 !important; font-weight: 700; }
@media (max-width: 560px) { .three-d-action-row { grid-template-columns: 1fr; } .contour-preview { min-height: 130px; } }

@media (min-width: 801px) {
  .three-d-workspace { align-items: start; overflow: visible; }
  .three-d-panel { border: 1px solid #dce3ed; border-radius: 18px 0 0 18px; }
  .three-d-scene-wrap { position: sticky; top: 16px; height: min(680px, calc(100vh - 32px)); min-height: 540px; border: 1px solid #d6e0ea; border-left: 0; border-radius: 0 18px 18px 0; overflow: hidden; }
}
.catalog-price { padding: 9px 10px; border-radius: 8px; background: #f0f6fd; color: #315277 !important; font-weight: 700; }
.three-d-release-link { color: var(--blue, #126ee8); font-size: 12px; font-weight: 750; text-align: center; }
.presentation-page { min-height: 100vh; margin: 0; background: var(--page, #f4f7fb); color: var(--ink, #172033); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.presentation-shell { display: grid; gap: 18px; max-width: 960px; margin: 0 auto; padding: 32px 20px 48px; }
.presentation-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 26px 28px; border-radius: var(--radius, 18px); background: var(--surface, #fff); box-shadow: 0 14px 42px rgba(33, 58, 87, .1); }.presentation-header p { margin: 0 0 9px; color: var(--blue, #126ee8); font-size: 12px; font-weight: 800; letter-spacing: .08em; }.presentation-header h1 { margin: 0 0 8px; font-size: clamp(28px, 5vw, 42px); }.presentation-header span, .presentation-note { color: var(--muted, #637087); font-size: 13px; line-height: 1.5; }.presentation-print { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 11px 14px; background: var(--blue, #126ee8); color: #fff; font: 750 13px/1.2 inherit; cursor: pointer; }
.presentation-d2-link { align-self: center; color: var(--blue, #126ee8); font-size: 13px; font-weight: 750; text-decoration: none; }
.presentation-card { padding: 22px; border-radius: var(--radius, 18px); background: var(--surface, #fff); box-shadow: 0 14px 42px rgba(33, 58, 87, .08); }.presentation-card h2 { margin: 0 0 16px; font-size: 20px; }.presentation-card svg { display: block; width: 100%; max-height: 560px; }.plan-contour { fill: color-mix(in srgb, var(--blue, #126ee8) 10%, white); stroke: var(--blue, #126ee8); stroke-width: 3; }.plan-furniture { fill: #aebdce; stroke: #617a96; stroke-width: 2; }.plan-spot { fill: #f5b642; stroke: #8d6511; stroke-width: 1; }.plan-line { stroke: #ec8d00; stroke-width: 6; stroke-linecap: round; }
.presentation-spec { display: grid; grid-template-columns: minmax(150px, .8fr) 1.2fr; gap: 0; margin: 0; }.presentation-spec dt, .presentation-spec dd { margin: 0; padding: 11px 0; border-bottom: 1px solid #e4eaf1; }.presentation-spec dt { color: var(--muted, #637087); }.presentation-spec dd { font-weight: 700; }.presentation-note { margin: 0 8px; }
.presentation-renders { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }.presentation-render { margin: 0; overflow: hidden; border: 1px solid #e4eaf1; border-radius: calc(var(--radius, 18px) * .7); background: #eef2f7; }.presentation-render img { display: block; width: 100%; aspect-ratio: 1.6; object-fit: cover; }.presentation-render figcaption { padding: 11px 13px; color: var(--ink, #172033); font-size: 14px; font-weight: 750; }
.pathtrace-shell { max-width: 1120px; }.pathtrace-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }.pathtrace-toolbar p { margin: 6px 0 0; color: var(--muted, #637087); font-size: 13px; }.pathtrace-toolbar button { margin: 4px; }.pathtrace-canvas { min-height: 280px; overflow: hidden; border-radius: calc(var(--radius, 18px) * .7); background: #101318; }.pathtrace-canvas canvas { display: block; width: 100%; height: auto; }
@media print { .presentation-page { background: #fff; }.presentation-shell { max-width: none; padding: 0; gap: 12px; }.presentation-header, .presentation-card { box-shadow: none; border: 1px solid #dce4ed; break-inside: avoid; }.presentation-print, .presentation-d2-link { display: none; }.presentation-renders { grid-template-columns: repeat(2, minmax(0, 1fr)); }.presentation-render { break-inside: avoid; } }
@media (max-width: 620px) { .presentation-header { display: block; }.presentation-print { width: 100%; margin-top: 18px; } }
@media (max-width: 760px) { .pathtrace-toolbar { display: block; }.pathtrace-toolbar > div:last-child { margin-top: 16px; } }

/* На большом экране параметры не раздвигают сцену: прокручивается только левая колонка. */
@media (min-width: 801px) {
  .three-d-workspace { grid-template-columns: 300px minmax(0, 1fr); gap: 0; }
  .three-d-panel { min-width: 0; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
  .three-d-panel .three-d-action-row { grid-template-columns: minmax(0, 1fr); }
  .three-d-panel .secondary-button { min-width: 0; white-space: normal; line-height: 1.15; }
  .three-d-panel .contour-row { min-width: 0; grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1fr) 26px; }
  .three-d-panel .contour-row input { min-width: 0; }
}

/* Скорректированный план, шаг 4 (A4): визуально показывает, что редактор
   заблокирован на время сборки трёх кадров публикации. */
.three-d-panel.is-locked, #three-d-scene.is-locked { pointer-events: none; opacity: .6; }

/* Этап 2 «Замер и смета» (docs/PLAN-SONNET-FIELD-ESTIMATE-2026-09-22.md) —
   отдельный набор классов estimate-*, не пересекается с three-d-* (раздел 8
   плана: новый экран, а не расширение старого 3D-редактора). Мобильный
   сценарий прежде всего: один основной столбец, крупные кнопки, липкая
   строка «Итого/Сохранено» внизу; строки позиций складываются в карточки на
   узком экране и превращаются в компактную «таблицу» на широком. */
.estimate-shell { max-width: 900px; margin: 0 auto; padding: 22px 18px 120px; }
.estimate-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.estimate-header h1 { margin: 0 0 6px; font-size: 24px; }
.estimate-header .lead { margin: 0; color: #637087; font-size: 13px; line-height: 1.45; max-width: 46ch; }
.estimate-access { max-width: 700px; margin: 10vh auto; padding: 32px; border-radius: 16px; background: #fff; box-shadow: 0 16px 45px rgba(33, 58, 87, .12); }
.estimate-access h2 { margin-bottom: 9px; }
.estimate-access p { margin: 0; color: #637087; line-height: 1.5; }
.estimate-access.is-hidden { display: none; }
.estimate-workspace.is-hidden { display: none; }
.estimate-panel { display: grid; gap: 16px; }
.estimate-block { display: grid; align-content: start; gap: 12px; padding: 18px; border: 1px solid var(--line, #dce3ed); border-radius: 14px; background: var(--surface, #fff); }
.estimate-block h2 { margin: 0; font-size: 16px; }
.estimate-block-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.estimate-block > label { display: grid; gap: 6px; color: #405b7e; font-size: 12px; font-weight: 750; }
.estimate-block input:not([type="checkbox"]):not([type="radio"]), .estimate-block select, .estimate-block textarea { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #b8cce4; border-radius: 9px; outline-color: var(--blue, #126ee8); background: #fff; color: #172033; font: inherit; }
.estimate-block textarea { resize: vertical; }
.estimate-required { color: #c0392b; margin-left: 3px; }
.estimate-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.estimate-error { margin: 0; color: #c0392b; font-size: 12px; font-weight: 700; min-height: 15px; }

.estimate-room { display: grid; gap: 12px; padding: 16px; margin-bottom: 14px; border: 1px solid #dce3ed; border-radius: 12px; background: #fbfcfe; }
.estimate-room:last-child { margin-bottom: 0; }
.estimate-room-heading { display: flex; gap: 10px; align-items: center; }
.estimate-room-name { flex: 1; min-height: 44px; padding: 8px 10px; border: 1px solid #b8cce4; border-radius: 9px; font: inherit; font-weight: 750; }
.estimate-room-section { display: grid; gap: 10px; padding-top: 10px; border-top: 1px dashed #dce3ed; }
.estimate-room-section h3 { margin: 0; font-size: 13px; color: #405b7e; }
.estimate-dim-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.estimate-field { display: grid; gap: 5px; color: #405b7e; font-size: 11px; font-weight: 700; }
.estimate-field input, .estimate-field select { min-height: 42px; padding: 8px 9px; border: 1px solid #b8cce4; border-radius: 9px; background: #fff; color: #172033; font: inherit; width: 100%; }

.estimate-room-scheme { display: grid; gap: 8px; padding-top: 10px; border-top: 1px dashed #dce3ed; }
.estimate-room-scheme h3 { margin: 0; font-size: 13px; color: #405b7e; }
.estimate-scheme-svg { max-width: 320px; margin: 0 auto; }
.estimate-scheme-svg svg { width: 100%; height: auto; display: block; }
.estimate-scheme-points { margin: 0; padding-left: 18px; color: #637087; font-size: 12px; columns: 2; }
.estimate-scheme-totals { margin: 0; font-size: 13px; }
.estimate-scheme-error { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fdecea; color: #8a2b20; font-size: 12px; font-weight: 700; }

.estimate-quick-add { display: flex; flex-wrap: wrap; gap: 6px; }
.estimate-chip { border: 1px solid #b8cce4; border-radius: 999px; background: #eaf3ff; color: #126ee8; font-size: 12px; font-weight: 700; padding: 6px 12px; }
.estimate-chip:hover { background: #d9ebff; }

.estimate-items { display: grid; gap: 8px; }
.estimate-item-row { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 10px; border: 1px solid #e1e7ef; border-radius: 10px; background: #fff; align-items: end; }
.estimate-item-sum { font-weight: 750; color: #172033; align-self: center; }
.estimate-item-remove { justify-self: start; min-height: 34px; padding: 0 10px; border: 1px solid #e1b3ac; border-radius: 8px; background: #fdecea; color: #8a2b20; font-weight: 700; }

.estimate-discount-mode { display: flex; flex-wrap: wrap; gap: 14px; }
.estimate-radio { display: flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-size: 13px; color: #405b7e; font-weight: 700; }
.estimate-radio input { width: auto !important; min-height: 0 !important; }

.estimate-summary-bar { position: sticky; bottom: 0; left: 0; right: 0; z-index: 5; display: grid; gap: 4px; margin-top: 18px; padding: 12px 16px; border-radius: 14px 14px 0 0; background: #172033; color: #fff; box-shadow: 0 -8px 24px rgba(20, 32, 51, .22); }
.estimate-summary-rows { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.estimate-summary-rows b { font-size: 14px; }
.estimate-summary-rows .estimate-error { color: #ff8a7a; }
.estimate-complete-badge { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.estimate-complete-badge.is-complete { background: #1f7a4d; color: #fff; }
.estimate-complete-badge.is-draft { background: #7a5a1f; color: #ffe9c2; }
.estimate-save-status { margin: 0; font-size: 11px; color: #b7c2d6; }

@media (min-width: 700px) {
  .estimate-action-row { grid-template-columns: repeat(auto-fit, minmax(160px, auto)); }
  .estimate-item-row { align-items: end; }
  .estimate-item-row.has-source { grid-template-columns: 2fr 1fr 1fr 0.8fr 1fr auto auto; }
  .estimate-item-row.no-source { grid-template-columns: 2fr 1fr 0.8fr 1fr auto auto; }
}
@media (max-width: 480px) {
  .estimate-shell { padding: 16px 12px 130px; }
  .estimate-header { display: block; }
  .estimate-header .text-button { margin-top: 8px; display: inline-block; }
  .estimate-scheme-points { columns: 1; }
}

/* Ссылка «Печать / PDF» в липкой строке итогов estimate.html — появляется,
   только когда у сметы уже есть id (см. updatePrintLink в estimate.js). */
.estimate-summary-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.estimate-print-cta { color: #9fc2f2; font-size: 12px; font-weight: 750; text-decoration: none; }
.estimate-print-cta.is-hidden { display: none; }

/* Печатный черновик сметы (задача #46 плана, раздел 7: «MVP: браузерная
   печать «Сохранить PDF» из готового HTML»). Отдельный namespace
   estimate-print-*, не пересекается с estimate-*/presentation-* — страница
   не переиспользует экран ввода, только данные через тот же API. */
.estimate-print-page { min-height: 100vh; margin: 0; background: var(--page, #f4f7fb); color: var(--ink, #172033); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.estimate-print-shell { display: grid; gap: 16px; max-width: 960px; margin: 0 auto; padding: 28px 20px 48px; }
.estimate-print-gate { max-width: 480px; margin: 10vh auto; padding: 30px; border-radius: var(--radius, 16px); background: #fff; box-shadow: 0 16px 45px rgba(33, 58, 87, .12); display: grid; gap: 10px; }
.estimate-print-gate h1 { margin: 0; font-size: 20px; }
.estimate-print-gate p { margin: 0; color: #637087; line-height: 1.5; }
.estimate-print-gate label { display: grid; gap: 6px; color: #405b7e; font-size: 12px; font-weight: 750; }
.estimate-print-gate input { min-height: 42px; padding: 8px 10px; border: 1px solid #b8cce4; border-radius: 9px; font: inherit; }
.estimate-print-status { margin: 0; color: #8a2b20; font-size: 12px; font-weight: 700; min-height: 15px; }

.estimate-print-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 24px 26px; border-radius: var(--radius, 18px); background: var(--surface, #fff); box-shadow: 0 14px 42px rgba(33, 58, 87, .1); }
.estimate-print-header .eyebrow { margin: 0 0 8px; color: var(--blue, #126ee8); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.estimate-print-header h1 { margin: 0 0 6px; font-size: clamp(22px, 4vw, 30px); }
.estimate-print-meta { margin: 0; color: var(--muted, #637087); font-size: 13px; }
.estimate-print-button { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 11px 16px; background: var(--blue, #126ee8); color: #fff; font: 750 13px/1.2 inherit; cursor: pointer; }
.estimate-print-header-actions { display: grid; justify-items: end; gap: 8px; flex: 0 0 auto; }
.estimate-print-photo-toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--muted, #637087); font-size: 12px; white-space: nowrap; }

.estimate-print-card { padding: 20px 22px; border-radius: var(--radius, 18px); background: var(--surface, #fff); box-shadow: 0 14px 42px rgba(33, 58, 87, .08); }
.estimate-print-card h2 { margin: 0 0 12px; font-size: 18px; }
.estimate-print-customer dl { display: grid; grid-template-columns: minmax(110px, .6fr) 1.4fr; gap: 0; margin: 0; }
.estimate-print-customer dt, .estimate-print-customer dd { margin: 0; padding: 8px 0; border-bottom: 1px solid #e4eaf1; }
.estimate-print-customer dt { color: var(--muted, #637087); font-size: 13px; }
.estimate-print-customer dd { font-weight: 700; font-size: 13px; }

.estimate-print-room { padding: 20px 22px; border-radius: var(--radius, 18px); background: var(--surface, #fff); box-shadow: 0 14px 42px rgba(33, 58, 87, .08); margin-bottom: 16px; }
.estimate-print-room h2 { margin: 0 0 12px; font-size: 18px; }
.estimate-print-room-body { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.estimate-print-scheme svg { display: block; width: 100%; max-height: 300px; }
.estimate-print-totals-line { margin: 0 0 10px; font-size: 13px; }
.estimate-print-warning { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: #fdecea; color: #8a2b20; font-size: 12px; font-weight: 700; }

.estimate-print-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.estimate-print-table th, .estimate-print-table td { padding: 8px 6px; border-bottom: 1px solid #e4eaf1; text-align: left; vertical-align: top; }
.estimate-print-table th { color: var(--muted, #637087); font-size: 11px; text-transform: uppercase; letter-spacing: .02em; }
.estimate-print-item-note { margin-top: 3px; color: var(--muted, #637087); font-size: 11px; }
.estimate-print-source { color: var(--muted, #637087); font-size: 11px; }
.estimate-print-missing { color: #8a2b20; font-weight: 700; }
.estimate-print-empty { margin: 0; color: var(--muted, #637087); font-size: 13px; }

.estimate-print-viz-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e4eaf1; }
.estimate-print-viz { margin: 0; }
.estimate-print-viz img { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; background: #eef2f7; }
.estimate-print-viz figcaption { margin-top: 8px; font-size: 13px; line-height: 1.45; }
.estimate-print-viz figcaption b { font-weight: 700; }
.estimate-print-viz-disclaimer { margin: 8px 0 0; color: var(--muted, #637087); font-size: 11px; font-style: italic; line-height: 1.45; }
.estimate-print-viz-empty { margin: 0; color: var(--muted, #637087); font-size: 13px; }

.estimate-print-photos { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e4eaf1; }
.estimate-print-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.estimate-print-photo-grid img { display: block; width: 100%; height: 110px; object-fit: cover; border-radius: 8px; background: #eef2f7; }

.estimate-print-summary h2 { display: flex; align-items: center; gap: 10px; }
.estimate-print-badge { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.estimate-print-badge.is-complete { background: #e3f5ea; color: #1f7a4d; }
.estimate-print-badge.is-draft { background: #fdf0dc; color: #7a5a1f; }
.estimate-print-summary-rows { display: grid; grid-template-columns: 1fr auto; gap: 0; margin: 0; }
.estimate-print-summary-rows dt, .estimate-print-summary-rows dd { margin: 0; padding: 7px 0; border-bottom: 1px solid #e4eaf1; font-size: 14px; }
.estimate-print-summary-rows dd { text-align: right; }

.estimate-print-notes { margin: 0; white-space: pre-wrap; font-size: 13px; line-height: 1.55; }
.estimate-print-footer { margin: 6px 8px 0; color: var(--muted, #637087); font-size: 11px; line-height: 1.5; }

@media print {
  .estimate-print-page { background: #fff; }
  .estimate-print-shell { max-width: none; padding: 0; gap: 12px; }
  /* Этап 2, п.5 аудита от 22.09.2026: «исправить переносы A4». break-inside:
     avoid на ВСЁМ .estimate-print-room был слишком грубым — секция помещения
     может быть выше одной страницы (схема + длинная таблица + визуализация +
     фото), и тогда браузер либо всё равно режет её посередине (avoid не
     помогает, если блок физически не помещается), либо переносит целиком на
     новую страницу, оставляя большую пустую область и «отрывая» соседний
     контент (например Примечания) на отдельную страницу-хвост. Вместо этого
     помечаем avoid только атомарные подблоки, которые ДЕЙСТВИТЕЛЬНО не имеют
     смысла разрезанными пополам (схема, предупреждение, визуализация, фото,
     строка таблицы), а заголовок помещения не даём оторвать от следующего за
     ним содержимого через break-after.
     .estimate-print-card (короткие карточки — клиент, итог, примечания)
     остаются с avoid целиком: они обычно короче страницы. */
  .estimate-print-header, .estimate-print-card, .estimate-print-room { box-shadow: none; border: 1px solid #dce4ed; }
  .estimate-print-card { break-inside: avoid; }
  .estimate-print-room h2, .estimate-print-card h2 { break-after: avoid; }
  .estimate-print-button, .estimate-print-photo-toggle { display: none; }
  .estimate-print-table thead { display: table-header-group; }
  .estimate-print-table tr { break-inside: avoid; }
  .estimate-print-scheme, .estimate-print-warning { break-inside: avoid; }
  .estimate-print-viz-block, .estimate-print-viz, .estimate-print-photos { break-inside: avoid; }
  .estimate-print-notes, .estimate-print-item-note { orphans: 3; widows: 3; }
}
@media (max-width: 680px) {
  .estimate-print-header { display: block; }
  .estimate-print-button { width: 100%; margin-top: 14px; }
  .estimate-print-room-body { grid-template-columns: 1fr; }
  .estimate-print-customer dl, .estimate-print-summary-rows { grid-template-columns: 1fr; }
  .estimate-print-summary-rows dd { text-align: left; }
}

/* Фото помещения в смете (раздел 6 плана, задача #52). Отдельный namespace
   estimate-photo-*, живёт внутри .estimate-room-section (та же рамка/отступы,
   что у остальных подблоков помещения — items/scheme/notch/edge). */
.estimate-room-photos h3 { margin-bottom: 4px; }
.estimate-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.estimate-photo-cell { position: relative; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: #e7edf5; }
.estimate-photo-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.estimate-photo-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 0; line-height: 20px; border: 0; border-radius: 999px; background: rgba(23, 32, 51, .72); color: #fff; font-size: 13px; font-weight: 700; }
.estimate-photo-queue { display: grid; gap: 6px; }
.estimate-photo-queue-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 9px; border-radius: 8px; background: #eef3f9; font-size: 12px; }
.estimate-photo-queue-item.is-error { background: #fdecea; }
.estimate-photo-queue-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: #172033; }
.estimate-photo-queue-status { color: #637087; }
.estimate-photo-queue-item.is-error .estimate-photo-queue-status { color: #8a2b20; font-weight: 700; }
.estimate-photo-queue-item.is-error .text-button { font-size: 12px; }
.estimate-photo-add-row { display: grid; gap: 4px; }
.estimate-photo-input { font-size: 13px; }
.estimate-photo-limit { margin: 0; color: #637087; font-size: 12px; }

/* Визуализация помещения в смете (раздел 6 плана, «Визуализация для сметы»).
   Отдельный namespace estimate-viz-*, живёт внутри .estimate-room-section,
   как и estimate-photo-* рядом. Переиспользует ту же сетку миниатюр, что и
   фото помещения, только с состоянием выбора (источник/история). */
.estimate-viz-hint { margin: 0; color: #637087; font-size: 12px; }
.estimate-viz-source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.estimate-viz-source-cell { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #e7edf5; border: 2px solid transparent; padding: 0; cursor: pointer; }
.estimate-viz-source-cell.is-selected { border-color: var(--blue, #126ee8); }
.estimate-viz-source-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.estimate-viz-features { display: grid; gap: 4px; font-size: 13px; }
.estimate-viz-features label { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.estimate-viz-generate-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.estimate-viz-status { margin: 0; color: #637087; font-size: 12px; }
.estimate-viz-status.is-error { color: #8a2b20; font-weight: 700; }
.estimate-viz-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.estimate-viz-history-cell { position: relative; display: grid; gap: 4px; padding: 0; border: 0; background: transparent; text-align: left; }
.estimate-viz-history-thumb { position: relative; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: #e7edf5; border: 2px solid transparent; }
.estimate-viz-history-cell.is-selected .estimate-viz-history-thumb { border-color: var(--blue, #126ee8); }
.estimate-viz-history-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.estimate-viz-history-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #637087; font-size: 11px; text-align: center; padding: 4px; }
.estimate-viz-history-label { font-size: 11px; color: #637087; }
.estimate-viz-history-cell.is-selected .estimate-viz-history-label { color: #126ee8; font-weight: 700; }
/* Этап 2, п.1 аудита от 22.09.2026: «Выбрать»/«Открыть»/«Скачать» — три
   отдельных действия на карточке результата (раньше вся карточка была одной
   кнопкой выбора, без просмотра и скачивания). */
.estimate-viz-history-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.estimate-viz-history-actions .text-button { font-size: 11px; padding: 0; }
.estimate-viz-history-actions .text-button:disabled { color: #637087; cursor: default; }
.estimate-viz-clear-row { display: flex; }
