.office-settings {display:grid;gap:12px;padding:14px;border:1px solid #393939;border-radius:10px;color:#ededed}
.office-settings-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:10px;margin-top:12px}
.office-settings summary {cursor:pointer}
.office-field {display:grid;gap:4px;font-size:13px}
.office-field input,.office-field textarea,.office-field select {width:100%;padding:8px 10px;border:1px solid #444;border-radius:6px;background:#151515;color:#ededed}
.office-settings button {justify-self:start}

.office-proposal {--office-ink:#213038;--office-red:#b5090c;--office-shade:#edf0ed;display:grid;gap:18px;max-width:210mm;margin:0 auto;color:var(--office-ink);font:13px/1.43 Arial,sans-serif}
.office-sheet {display:flex;flex-direction:column;min-height:297mm;padding:13mm;background:white;overflow-wrap:anywhere}
.office-sheet h1,.office-sheet h2,.office-sheet h3,.office-sheet p {margin:0}
.office-sheet h1,.office-sheet h2 {max-width:18em;margin:9px 0 14px;font-size:32px;font-weight:800;line-height:1.12;letter-spacing:.01em}
.office-sheet h2 {max-width:none}
.office-sheet h3 {margin-bottom:8px;font-size:16px;line-height:1.25;font-weight:800}
.office-sheet p {margin-bottom:6px;white-space:pre-line}
.office-letterhead {display:grid;grid-template-columns:100px 1.15fr 1fr;align-items:center;gap:14px;padding:14px;margin:0 0 19px;border-left:5px solid var(--office-red);background:var(--office-shade);font-size:10px}
.office-letterhead img {width:100%;height:auto}
.office-letterhead strong {display:block;margin-bottom:6px;font-size:18px;line-height:1.1}
.office-letterhead p {margin:3px 0}
.office-requisites {border-left:1px solid #cad1cf;padding-left:12px}
.office-running-head {border-bottom:1px solid #d7dbd8;padding-bottom:4px;color:var(--office-red);font-size:12px;font-weight:bold}
.office-eyebrow {background:var(--office-shade);color:var(--office-red);font-weight:800;text-transform:uppercase;padding:8px 10px;margin-top:6px}
.office-sheet .office-project {font-size:16px;font-weight:bold;margin:0 0 10px}
.office-block {margin-top:13px}
.office-sheet ul {list-style:disc;padding-left:17px;margin:3px 0}
.office-sheet li {margin:2px 0}
.office-sheet table {width:100%;border-collapse:collapse;table-layout:fixed;margin:4px 0 12px;color:var(--office-ink);font-size:11px;line-height:1.35}
.office-sheet th {background:var(--office-ink);color:white;font-weight:bold;text-align:left;border-bottom:3px solid var(--office-red)}
.office-sheet th,.office-sheet td {padding:8px;vertical-align:top;white-space:pre-line}
.office-sheet tr:nth-child(odd) td {background:var(--office-shade)}
.office-sheet td {border-bottom:1px solid #edf0ed}
.office-sheet th:first-child {width:41%}
.office-sheet td small {display:block;font-size:inherit;margin-top:2px}
.office-materials {margin:6px 0 0}
.office-total {display:flex;justify-content:space-between;align-items:center;gap:8px;background:var(--office-ink);color:white;border-left:5px solid var(--office-red);padding:15px 12px;margin:6px 0 13px;font-weight:bold}
.office-total strong {font-size:28px;line-height:1.15}
.office-adjustments {display:flex;align-items:baseline;gap:6px 15px;flex-wrap:wrap;font-size:11px}
.office-note {font-size:11px;color:#51636b}
.office-page-footer {display:flex;justify-content:space-between;gap:8px;margin-top:auto;padding-top:19px;font-size:10px;color:#51636b}
.office-photos {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.office-photos img {width:100%;height:120px;object-fit:cover}
.office-masked {display:none}
@media screen {.office-original {display:none}.office-masked {display:inline}}
@media screen and (max-width:600px) {
  [data-testid="kp-preview"]:has(.office-proposal) > div:first-child > div {flex-wrap:wrap}
  .office-sheet {min-height:auto;padding:16px}
  .office-letterhead {grid-template-columns:50px 1fr;padding:8px;gap:8px}
  .office-requisites {grid-column:2;border:0;padding:0}
  .office-sheet h1,.office-sheet h2 {font-size:26px}
  .office-sheet th,.office-sheet td {padding:5px}
  .office-total strong {font-size:21px}
}

@page office-proposal {size:A4;margin:8mm 13mm 14mm;
  @bottom-left {content:"PoliBest 911 · Комерційна пропозиція";font:10px Arial,sans-serif;color:#51636b}
  @bottom-right {content:counter(page);font:10px Arial,sans-serif;color:#51636b}
}
@media print {
  body:has(.office-proposal) *:not(.office-proposal):not(.office-proposal *):not(:has(.office-proposal)) {display:none!important}
  html:has(.office-proposal),body:has(.office-proposal),body *:has(.office-proposal) {margin:0!important;padding:0!important;max-width:none!important;width:auto!important;min-height:0!important;height:auto!important;overflow:visible!important;display:block!important;background:white!important}
  .office-proposal {page:office-proposal;display:block;margin:0;max-width:none;font-size:12px;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .office-sheet {display:block;min-height:0;margin:0;padding:4mm 0 0}
  .office-sheet+.office-sheet {break-before:page;padding-top:0}
  .office-sheet h1,.office-sheet h2,.office-sheet h3,.office-eyebrow {break-after:avoid}
  .office-sheet tr,.office-letterhead,.office-total,.office-photos img {break-inside:avoid}
  .office-sheet thead {display:table-header-group}
  .office-page-footer {display:none}
}
