/* Amara Casa quote document — screen preview + print */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Montserrat:wght@400;500;600&display=swap");

.quotePanel {
  padding: 0;
  overflow: hidden;
}

.quoteEditor {
  --quote-ui-font: 12px;
  display: flex;
  flex-direction: column;
  gap: var(--panel-block-gap);
  flex: 0 0 auto;
  padding: var(--panel-pad-top, 16px) var(--panel-pad-x, 16px) var(--panel-pad-bottom, 8px);
  border-bottom: 1px solid var(--line);
  background: #fafaf8;
  font-size: var(--quote-ui-font);
}

.quoteEditor button,
.quoteEditor label,
.quoteEditor input,
.quoteEditor select,
.quoteEditor textarea {
  font-size: inherit;
  font-weight: 400;
}

.quoteEditor input:not([type="hidden"]),
.quoteEditor select {
  min-height: var(--control-height);
  height: var(--control-height);
  padding: var(--control-padding);
  box-sizing: border-box;
}

.quoteEditorHeader {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) repeat(6, minmax(0, 1fr));
  grid-template-rows: var(--control-height) var(--panel-header-status-height);
  gap: 4px 10px;
  align-items: stretch;
  min-height: var(--panel-header-block-height);
  margin: 0;
}

.quoteEditorHeader > .panelHeading {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
  align-self: start;
}

.quoteEditorHeader::after {
  content: "";
  grid-column: 3 / span 6;
  grid-row: 2;
  min-height: var(--panel-header-status-height);
}

.quoteAutoSaveStatus.is-saving {
  color: var(--accent, #2563eb);
}

.quoteAutoSaveStatus.is-saved {
  color: var(--success, #15803d);
}

.quoteAutoSaveStatus.is-error {
  color: var(--danger, #b91c1c);
}

.quoteToolbarTail {
  grid-column: 3 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 0 10px;
  align-items: center;
  align-self: center;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
}

.quoteToolbarActions,
.quoteLibraryActions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  width: 340px;
  justify-content: flex-end;
}

.quoteToolbarActions {
  justify-self: end;
}

button.quoteActionBtn {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  width: 82px;
  min-width: 82px;
  max-width: 82px;
  min-height: var(--control-height);
  height: var(--control-height);
  padding: 0 8px;
  border: 1px solid #d0d7e2;
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

button.quoteActionBtn .quoteActionBtnIcon {
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

button.quoteActionBtn .quoteActionBtnLabel {
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

button.quoteActionBtn.is-active {
  border-color: var(--accent, #285f52);
  background: #ecf5f2;
  color: var(--accent-dark, #1f4d43);
  box-shadow: inset 0 0 0 1px rgba(40, 95, 82, 0.18);
}

.quoteCatalogSourceToggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
  width: 176px;
  min-width: 176px;
  height: var(--control-height);
  min-height: var(--control-height);
  max-height: var(--control-height);
  padding: 3px;
  margin: 0;
  border: 1px solid #d0d7e2;
  border-radius: 7px;
  background: #f3f5f7;
  box-sizing: border-box;
  box-shadow: inset 0 1px 2px rgba(12, 28, 54, 0.04);
}

.quoteCatalogSourceIndicator {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 6px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(12, 28, 54, 0.1),
    0 0 0 1px rgba(12, 28, 54, 0.05);
  transition:
    left 0.24s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.24s ease,
    box-shadow 0.24s ease;
  pointer-events: none;
  z-index: 0;
}

.quoteCatalogSourceToggle.is-magacin .quoteCatalogSourceIndicator {
  left: calc(50%);
  background: linear-gradient(180deg, #fff 0%, #f4faf7 100%);
  box-shadow:
    0 1px 3px rgba(40, 95, 82, 0.14),
    0 0 0 1px rgba(40, 95, 82, 0.14);
}

.quoteCatalogSourceBtn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 0;
  height: calc(var(--control-height) - 6px);
  max-height: calc(var(--control-height) - 6px);
  padding: 0 6px;
  margin: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8b97a8;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
}

.quoteCatalogSourceIcon {
  display: block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.quoteCatalogSourceBtn span {
  display: block;
}

.quoteCatalogSourceBtn:hover:not(:disabled):not(.is-selected) {
  color: #5c6778;
}

.quoteCatalogSourceBtn.is-selected {
  color: #0c1c36;
}

.quoteCatalogSourceBtn.is-selected .quoteCatalogSourceIcon {
  opacity: 1;
}

.quoteCatalogSourceToggle.is-magacin .quoteCatalogSourceBtn.is-selected {
  color: var(--accent-dark, #1f4d43);
}

.quoteCatalogSourceBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quoteCatalogSourceBtn:focus-visible {
  outline: 2px solid rgba(40, 95, 82, 0.35);
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .quoteCatalogSourceIndicator {
    transition: none;
  }
}

button.quoteActionBtn.quoteActionBtn--primary {
  border-color: #c98a2e;
  background: linear-gradient(180deg, #fff9ef 0%, #fff3dc 100%);
  color: #5c3d00;
  box-shadow: 0 0 0 1px rgba(201, 138, 46, 0.12);
}

button.quoteActionBtn:hover:not(:disabled) {
  border-color: var(--gold, #d29f46);
  background: #fff9ef;
  color: #0c1c36;
}

button.quoteActionBtn.quoteActionBtn--primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #fff3dc 0%, #ffe8b8 100%);
  border-color: var(--gold, #b78846);
  color: #5c3d00;
}

button.quoteActionBtn:focus-visible {
  outline: 2px solid rgba(210, 159, 70, 0.45);
  outline-offset: 1px;
}

button.quoteActionBtn:disabled:not(.is-loading) {
  opacity: 0.55;
  cursor: not-allowed;
}

button.quoteActionBtn.is-loading {
  opacity: 0.55;
  cursor: wait;
}

button.quoteActionBtn.is-loading .quoteActionBtnIcon {
  animation: quoteActionSpin 0.8s linear infinite;
}

@keyframes quoteActionSpin {
  to {
    transform: rotate(360deg);
  }
}

button.quoteActionBtn.quoteActionBtn--won {
  border-color: rgba(46, 125, 87, 0.35);
  color: #2e7d57;
}

button.quoteActionBtn.quoteActionBtn--won:hover:not(:disabled) {
  border-color: rgba(46, 125, 87, 0.45);
  background: rgba(46, 125, 87, 0.08);
  color: #256b49;
}

button.quoteActionBtn.quoteActionBtn--lost {
  border-color: #e8b4b4;
  color: #b42318;
}

button.quoteActionBtn.quoteActionBtn--lost:hover:not(:disabled) {
  border-color: #e8b4b4;
  background: #fef2f2;
  color: #991b1b;
}

button.quoteActionBtn.quoteActionBtn--won.is-locked {
  border-color: rgba(46, 125, 87, 0.45);
  background: rgba(46, 125, 87, 0.1);
  color: #2e7d57;
}

button.quoteActionBtn.quoteActionBtn--lost.is-locked {
  border-color: #e8b4b4;
  background: #fff5f5;
  color: #b42318;
}

button.quoteActionBtn.quoteActionBtn--send {
  border-color: rgba(59, 110, 168, 0.35);
  color: #3b6ea8;
}

button.quoteActionBtn.quoteActionBtn--send:hover:not(:disabled) {
  border-color: rgba(59, 110, 168, 0.45);
  background: rgba(59, 110, 168, 0.08);
  color: #2f5f94;
}

button.quoteActionBtn.quoteActionBtn--send.is-sent {
  border-color: rgba(59, 110, 168, 0.45);
  background: rgba(59, 110, 168, 0.1);
  color: #3b6ea8;
}

button.quoteActionBtn.quoteActionBtn--danger {
  border-color: #e8b4b4;
  color: #b42318;
}

button.quoteActionBtn.quoteActionBtn--danger:hover:not(:disabled) {
  border-color: #e8b4b4;
  background: #fef2f2;
  color: #991b1b;
}

button.quoteActionBtn.is-locked,
button.quoteActionBtn.quoteLockBtn.is-locked {
  border-color: #9aa3ad;
  background: #eef1f4;
  color: #4a5568;
  cursor: default;
}

button.quoteActionBtn.is-locked:hover:not(:disabled),
button.quoteActionBtn.quoteLockBtn.is-locked:hover:not(:disabled) {
  border-color: #9aa3ad;
  background: #eef1f4;
  color: #4a5568;
}

.quoteStatusBanner {
  grid-column: 1;
  justify-self: stretch;
  align-self: center;
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  min-height: var(--control-height);
  display: flex;
  align-items: center;
  border-radius: 8px;
  border: 1px solid #d5dbe3;
  background: #f7f8fa;
  color: #334155;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quoteStatusBanner--locked {
  color: #2e7d57;
  background: rgba(46, 125, 87, 0.08);
  border-color: rgba(46, 125, 87, 0.2);
}

.quoteStatusBanner--sent {
  color: #3b6ea8;
  background: rgba(59, 110, 168, 0.08);
  border-color: rgba(59, 110, 168, 0.22);
}

.quoteStatusBanner--lost {
  color: #b42318;
  background: #fff5f5;
  border-color: #f2c7c7;
}

.quoteStatusBanner--dirty {
  border-color: #e8c878;
  background: #fff6e6;
  color: #5c3d00;
}

.quoteStatusBanner--draft {
  border-color: #d5dbe3;
  background: #f7f8fa;
  color: #475569;
}

.quoteStatusBanner--saved {
  border-color: #9fd4b0;
  background: #edf7f0;
  color: #1f4d33;
}

.quoteStatusBanner--open {
  border-color: #d5dbe3;
  background: #f7f8fa;
  color: #334155;
}

.quoteStatusBanner--presence {
  border-color: #e8c878;
  background: #fff6e6;
  color: #5c3d00;
}

.quoteStatusBanner--saving {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.quoteStatusBanner--error {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

.quoteToolbarTail .toolbarBtnFixed {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  justify-content: center;
  text-align: center;
}

.quoteToolbarTail .toolbarBtnDeploy {
  border-color: #c98a2e;
  background: linear-gradient(180deg, #fff9ef 0%, #fff3dc 100%);
  color: #7a4f00;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(201, 138, 46, 0.15);
}

.quoteToolbarTail .toolbarBtnDeploy:hover {
  background: linear-gradient(180deg, #fff3dc 0%, #ffe8b8 100%);
  border-color: var(--gold, #b78846);
  color: #5c3d00;
}

.quotePresenceBanner {
  grid-column: 1 / -1;
  margin: 0 0 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #5c3d00;
  background: #fff6e6;
  border: 1px solid #e8c878;
  border-radius: 8px;
}

.quotePresenceBanner.hidden {
  display: none;
}

.quotePresenceBanner strong {
  color: #3d2800;
}

.quotePresenceBanner--mine {
  color: #1f4d33;
  background: #edf7f0;
  border-color: #9fd4b0;
}

.quoteEditor .quoteLibrary > label,
.quoteEditor .quoteLibrary .quoteLibraryCustomerField,
.quoteEditor .quoteEditorGrid.panelAlignMeta > label,
.quoteEditor .quoteEditorGrid.panelAlignMeta .quoteMetaTail > label {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--muted);
}

.quoteLibrary.panelAlignLibrary {
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr)) repeat(6, minmax(0, 1fr));
}

.quoteLibrary .quoteLibraryCustomerField {
  grid-column: 1 / span 2;
}

.quoteLibrary .quoteListField {
  grid-column: 3 / span 2;
  min-width: 0;
}

.quoteBrojActions,
.quoteMetaTail {
  --quote-meta-trail-actions-width: 340px;
}

.quoteBrojActions {
  grid-column: 5 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--quote-meta-trail-actions-width);
  gap: 8px 10px;
  align-items: end;
  min-height: var(--panel-form-row-height);
}

.quoteBrojActions .quoteNumberField,
.quoteMetaTail .quoteContactField {
  display: grid;
  grid-template-rows: var(--field-label-height) var(--control-height);
  gap: var(--panel-label-gap);
  grid-column: 1;
  margin: 0;
  min-width: 0;
  width: 100%;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--muted);
}

.quoteBrojActions .quoteNumberField input,
.quoteMetaTail .quoteContactField input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: var(--control-height);
  height: var(--control-height);
  padding: var(--control-padding);
  box-sizing: border-box;
}

.quoteBrojActions .quoteLibraryActions {
  grid-column: 2;
  align-self: end;
  justify-self: end;
}

.quoteEditorGrid.panelAlignMeta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) repeat(6, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 0;
  width: 100%;
  min-height: var(--panel-form-row-height);
  align-items: end;
}

.quoteEditorGrid.panelAlignMeta .quoteNameField {
  grid-column: 1 / span 2;
  min-width: 0;
}

.quoteEditorGrid.panelAlignMeta .quoteDateField {
  grid-column: 3;
}

.quoteEditorGrid.panelAlignMeta .quoteValidField {
  grid-column: 4;
}

.quoteMetaTail {
  grid-column: 5 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px 10px;
  align-items: end;
  min-height: var(--panel-form-row-height);
}

.quoteMetaTail .quoteMetaActions {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  align-self: end;
  justify-self: end;
  flex-shrink: 0;
}

.quoteMetaTail .quotePreviewZoom {
  grid-column: 3;
  width: auto;
  justify-self: end;
  align-self: end;
  justify-content: flex-end;
}

.quoteEditor.is-locked .quoteEditorGrid input,
.quoteEditor.is-locked .quoteEditorGrid select,
.quoteEditor.is-locked .quoteEditorGrid textarea,
.quoteEditor.is-locked .quoteLibrary select,
.quoteEditor.is-locked #quoteItems input {
  background: #f6f7f6;
  color: #4a5568;
}

.quoteEditorGrid.panelAlignMeta > label,
.quoteEditorGrid.panelAlignMeta .quoteMetaTail > label {
  margin: 0;
  min-width: 0;
}

.quoteEditorGrid.panelAlignMeta > label input,
.quoteEditorGrid.panelAlignMeta > label select,
.quoteEditorGrid.panelAlignMeta .quoteMetaTail > label input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: var(--control-height);
  height: var(--control-height);
  padding: var(--control-padding);
  box-sizing: border-box;
}

.quoteEditorGrid .fullRow {
  flex: 1 1 100%;
  width: 100%;
}

.quoteFieldHead {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: var(--field-label-height);
  height: var(--field-label-height);
  padding-right: 5.75rem;
  line-height: 1.35;
  overflow: visible;
}

.quoteFieldHead .linkBtn {
  position: absolute;
  top: 50%;
  right: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  line-height: 1;
  color: var(--accent-dark);
  white-space: nowrap;
  cursor: pointer;
  transform: translateY(-50%);
  text-decoration: underline;
  text-underline-offset: 2px;
  appearance: none;
  -webkit-appearance: none;
}

.quoteFieldHead .linkBtn:hover {
  color: #0c1c36;
}

.quoteEditorGrid .quoteCustomerField select {
  width: 100%;
}

.quoteEditor textarea:not(#clientData) {
  min-height: 72px;
  resize: vertical;
}

.quoteDocument {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #e8e8e4;
  padding: var(--panel-body-gap, 8px) 12px 12px;
}

.quotePreviewZoom {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.quotePreviewZoomBtn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line, #d8d8d0);
  border-radius: 6px;
  background: #fff;
  color: var(--navy, #0c1c36);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.quotePreviewZoomBtn:hover:not(:disabled) {
  border-color: var(--gold, #d29f46);
  background: #fff9ef;
}

.quotePreviewZoomBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.quotePreviewZoomFit {
  width: auto;
  min-width: 36px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.quotePreviewZoomLabel {
  min-width: 2.75rem;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted, #5a5f66);
  text-align: center;
  user-select: none;
}

.quoteDocumentViewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.quoteZoomSizer {
  flex-shrink: 0;
  width: fit-content;
}

.quoteSheet {
  --navy: #0c1c36;
  --gold: #d29f46;
  --ink: #1d1d1d;
  --muted: #5a5f66;
  --quote-box-fill: #f5f6f7;
  --right-column-width: 35%;
  --right-label-width: 108px;
  --right-label-gap: 12px;
  --right-value-offset: calc(var(--right-label-width) + var(--right-label-gap));
  --quote-footer-height: 52px;
  /* A4: tfoot reserve keeps page-1 rows above footer; summary pull cancels gap on last table page */
  --quote-print-footer-reserve: 34mm;
  --quote-print-tfoot-reserve: 24mm;
  --quote-print-summary-pull: 18mm;
  min-width: min(1120px, 100%);
  max-width: 1120px;
  width: 1120px;
  min-height: 297mm;
  margin: 0 auto;
  background: #fff;
  color: var(--ink);
  font-family: Montserrat, ui-sans-serif, sans-serif;
  font-size: 9pt;
  line-height: 1.45;
  padding: 0;
  box-shadow: 0 2px 12px rgba(12, 28, 54, 0.08);
  display: flex;
  flex-direction: column;
}

.quoteLetterhead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 96px;
  padding: 18px 28px 10px;
  position: relative;
}

.quoteLetterhead::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 0;
  border-bottom: 1.5px solid var(--gold);
}

.quoteLogoCell {
  display: flex;
  align-items: center;
}

.quoteLogoCell img {
  display: block;
  width: auto;
  height: 1.58in;
  max-width: 2.15in;
  object-fit: contain;
}

.quoteCompanyCell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  color: var(--navy);
  font-family: Montserrat, ui-sans-serif, sans-serif;
  font-size: 9pt;
  font-weight: 400;
  line-height: 1.22;
  text-align: right;
}

.quoteCompanyCell strong {
  font-size: 9pt;
  font-weight: 700;
  margin-bottom: 4pt;
}

.quoteCompanyCell .companyBreak {
  margin-top: 5pt;
}

.quoteBody {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 8px 28px 0;
  font-family: Tahoma, Geneva, sans-serif;
  font-size: 8pt;
}

.quoteOfferHeading {
  display: grid;
  grid-template-columns: 1fr var(--right-column-width);
  gap: 0;
  align-items: end;
  margin: 14px 0 2px;
}

.quoteOfferHeading h1 {
  grid-column: 1 / -1;
  grid-row: 1;
  margin: 0;
  font-family: Tahoma, Geneva, sans-serif;
  font-size: 16pt;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0;
  text-align: right;
  padding-right: calc(var(--right-column-width) - var(--right-label-width));
}

.quoteOfferHeading strong {
  grid-column: 2;
  grid-row: 1;
  color: var(--navy);
  font-family: Tahoma, Geneva, sans-serif;
  font-size: 16pt;
  font-weight: 700;
  text-align: left;
  padding-left: var(--right-value-offset);
  white-space: nowrap;
}

.quoteOfferRule {
  position: relative;
  height: 3px;
  margin-bottom: 16px;
}

.quoteOfferRule span {
  position: absolute;
  bottom: 0;
  display: block;
}

.quoteOfferRule span:first-child {
  left: 0;
  right: calc(var(--right-column-width) - var(--right-value-offset));
  border-bottom: 1px solid #000;
}

.quoteOfferRule span:last-child {
  left: calc(100% - var(--right-column-width) + var(--right-value-offset));
  right: 0;
  border-bottom: 3px solid #000;
}

.quoteIntro {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 12px 0 8px;
}

.quoteParties {
  width: 35%;
  min-width: 210px;
}

.quoteBoxLabel {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 8pt;
  font-weight: 700;
}

.quoteParties .clientBlock {
  padding: 9px 11px;
  border: 1px solid #e2e5e9;
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  background: var(--quote-box-fill);
  color: var(--ink);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.quoteRightMeta {
  padding: 9px 0;
  color: var(--ink);
}

.quoteParties p,
.quoteRightMeta p {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 6px;
  margin: 0 0 4px;
  font-size: 8pt;
  line-height: 1.25;
}

.quoteParties p:last-child,
.quoteRightMeta p:last-child {
  margin-bottom: 0;
}

.quoteParties p span:first-child,
.quoteRightMeta p span:first-child {
  color: var(--muted);
  font-weight: 600;
}

.quoteParties .clientBlock strong {
  display: block;
  font-size: 8pt;
  color: var(--navy);
  font-weight: 700;
}

.quoteRightMeta {
  width: var(--right-column-width);
  min-width: 210px;
  align-self: center;
  margin-top: calc(8pt * 1.25 + 4px);
  border: 0;
  border-left: 0;
  background: transparent;
  padding: 9px 0;
}

.quoteRightMeta p {
  grid-template-columns: var(--right-label-width) 1fr;
  gap: var(--right-label-gap);
}

.quoteRightMeta p span:first-child {
  white-space: nowrap;
  text-align: right;
}

.quoteRightMeta strong {
  color: var(--navy);
  font-size: 8pt;
  font-weight: 700;
  text-align: left;
}

.quoteTableWrap {
  overflow-x: auto;
}

.quoteDocTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 8pt;
}

.quoteDocTable th {
  background: #0c1c36;
  color: #fff;
  font-weight: 600;
  padding: 6px 4px;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #0c1c36;
  white-space: nowrap;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.quoteDocTable th.col-sifra,
.quoteDocTable td.col-sifra,
.quoteDocTable th.col-naziv,
.quoteDocTable td.col-naziv {
  text-align: left;
}

.quoteDocTable td {
  border: 1px solid #d4d8de;
  padding: 5px 4px;
  vertical-align: middle;
}

.quoteDocTable tbody tr:nth-child(even) td {
  background: #f7f8fa;
}

.quoteDocTable .num {
  text-align: right;
  white-space: nowrap;
}

.quoteDocTable .col-idx {
  text-align: center;
  width: 22px;
}

.quoteDocTable .col-kom {
  width: 44px;
  text-align: center;
}

.quoteDocTable .col-kom input[type="number"] {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.quoteDocTable .col-sifra {
  width: 88px;
  font-size: 7pt;
}

.quoteDocTable .col-sku {
  width: 72px;
  font-size: 7pt;
  text-align: left;
}

.quoteDocTable .col-naziv {
  min-width: 180px;
  line-height: 1.35;
}

.quoteDocTable .col-money {
  width: 52px;
}

.quoteDocTable .col-pct {
  width: 36px;
}

.quoteDocTable th.col-rabat,
.quoteDocTable td.col-rabat {
  text-align: center;
}

.quoteDocTable td.col-rabat input {
  text-align: center;
}

.quoteDocTable input {
  width: 100%;
  min-height: 24px;
  font-size: 7.5pt;
  padding: 2px 4px;
  border: 1px solid #c5cad1;
  border-radius: 3px;
}

@media screen {
  .quoteDocTable .col-kom {
    width: 72px;
    min-width: 72px;
  }

  .quoteDocTable .col-kom input[type="number"] {
    min-width: 60px;
    font-size: 8.5pt;
    padding: 3px 6px;
  }

  .quoteDocTable .col-sku {
    width: 84px;
    font-size: 7.5pt;
  }

  .quoteDocTable .col-money {
    width: 76px;
  }

  .quoteDocTable .col-pct {
    width: 54px;
  }

  .quoteDocTable input {
    min-width: 48px;
    font-size: 8pt;
    padding: 3px 5px;
  }
}

.quoteDocTable input[type="number"] {
  text-align: right;
}

.quoteSummaryRow {
  display: flex;
  flex-shrink: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
}

.quoteTotalsBlock {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 50%;
}

.quoteTotals {
  width: 100%;
  min-width: 210px;
  padding: 9px 11px;
  border: 1px solid #e2e5e9;
  border-right: 3px solid var(--gold);
  border-radius: 4px;
  background: var(--quote-box-fill);
  color: var(--ink);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.quoteTotals dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 5px 10px;
  font-family: Tahoma, Geneva, sans-serif;
  font-size: 8pt;
  font-weight: 700;
}

.quoteTotals dt {
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

.quoteTotals dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.quoteTotals dt,
.quoteTotals dd,
.quoteTotals dt.grand,
.quoteTotals dd.grand,
.quoteTotals dl dt:last-of-type,
.quoteTotals dl dd:last-of-type {
  color: var(--ink);
  font-family: Tahoma, Geneva, sans-serif;
  font-size: 8pt;
  font-weight: 700;
}

.quoteAmountWords {
  width: calc(50% - 18px);
  color: var(--ink);
  font-family: Tahoma, Geneva, sans-serif;
  font-size: 8pt;
  font-weight: 700;
  line-height: 1.35;
}

.quoteAmountWords strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-weight: 700;
}

.quoteAmountWords span {
  display: block;
}

.quoteAmountWords .amountWordsEditable {
  min-height: 1.4em;
  outline: none;
  border: 1px dashed #c5ccc6;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: text;
  white-space: pre-wrap;
  word-break: break-word;
}

.quoteAmountWords .amountWordsEditable:focus {
  border-color: var(--accent);
  background: #fffef8;
}

@media print {
  .quoteAmountWords .amountWordsEditable {
    border-color: transparent;
    background: transparent;
    padding: 0;
  }
}

.quoteAmountWords .amountWordsEditable:empty::before {
  content: attr(data-placeholder);
  color: #8a938d;
}

.quoteWeightSummary {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #d4d8de;
  color: var(--ink);
  font-family: Tahoma, Geneva, sans-serif;
  font-size: 8pt;
  font-weight: 700;
  line-height: 1.35;
}

.quoteWeightSummary strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-weight: 700;
}

.quoteWeightSummary span {
  display: block;
  font-weight: 400;
  color: var(--muted);
}

.quoteNapomena {
  flex-shrink: 0;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.quoteNapomena h3 {
  margin: 0 0 8px;
  font-size: 9pt;
  font-weight: 600;
  color: var(--navy);
}

.napomenaRow {
  display: flex;
  align-items: center;
  gap: 18px;
}

.napomenaContent {
  flex: 1;
  min-width: 0;
}

.quoteNapomena textarea {
  display: block;
  font-size: 8pt;
  line-height: 1.5;
  min-height: 100px;
  width: 100%;
  color: var(--ink);
  border: 1px solid #d4d8de;
  border-radius: 4px;
  padding: 8px;
  box-sizing: border-box;
  resize: vertical;
}

.quoteNapomena .napomenaText {
  font-size: 8pt;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
}

.quoteStamp {
  flex-shrink: 0;
  display: block;
  height: 1.05in;
  width: auto;
  max-width: 2.65in;
  object-fit: contain;
  align-self: center;
}

.quotePageFooter {
  display: grid;
  grid-template-columns: minmax(64px, auto) 1fr 36px;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  flex-shrink: 0;
  position: relative;
  padding: 10px 0 14px;
  border-top: 1px solid var(--gold);
  font-size: 8pt;
  color: var(--muted);
}

.quotePageFooter--sheet {
  margin-left: 28px;
  margin-right: 28px;
  padding-left: 0;
  padding-right: 0;
  border-top: 0;
}

.quotePageFooter--sheet::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  border-top: 1px solid var(--gold);
}

.quoteFooterPageNum {
  grid-column: 1;
  justify-self: start;
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
  color: var(--muted);
}

.quoteFooterText {
  grid-column: 2;
  text-align: center;
}

.quotePageFooter img {
  grid-column: 3;
  justify-self: end;
  height: 36px;
  width: auto;
}

.quoteSummaryInput {
  width: 100%;
  max-width: 9rem;
  min-height: 1.75rem;
  padding: 2px 6px;
  border: 1px solid var(--line, #d8ddd3);
  border-radius: 4px;
  font: inherit;
  text-align: right;
  box-sizing: border-box;
}

.printOnly {
  display: none;
}

@media screen {
  .quoteDocTable .printOnly {
    display: none;
  }

  .quoteDocTable input {
    display: block;
  }
}

.quoteTablePrintFoot {
  display: none;
}

.quotePrintTheadGap {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 10mm var(--quote-print-footer-reserve) 10mm;

    @bottom-left {
      content: counter(page);
      font: 600 8pt/1 Tahoma, Geneva, sans-serif;
      color: #66706a;
      padding-left: 18px;
    }
  }

  html,
  body {
    height: auto !important;
    overflow: visible !important;
    background: #fff;
  }

  .layout,
  .quotePanel,
  .quoteDocument,
  .appView {
    height: auto !important;
    overflow: visible !important;
  }

  .topbar,
  .catalogue,
  .screenOnly,
  .quoteEditor {
    display: none !important;
  }

  .layout {
    display: block;
    padding: 0;
  }

  .quotePanel {
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .quoteDocument {
    padding: 0;
    background: #fff;
    overflow: visible;
  }

  .quoteDocumentViewport,
  .quoteZoomSizer {
    overflow: visible !important;
    width: auto !important;
    min-height: 0 !important;
  }

  .quoteSheet {
    transform: none !important;
    min-width: 0;
    max-width: none;
    width: 100%;
    min-height: 0 !important;
    height: auto;
    box-shadow: none;
    padding-bottom: 0;
    display: block;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .quoteBody {
    display: block;
    padding-bottom: 0;
  }

  .quoteTableWrap {
    overflow: visible;
    margin-bottom: 2mm;
    padding-bottom: 0;
  }

  .quotePrintTail {
    margin-top: 0;
    padding-top: 0;
    break-inside: auto;
    page-break-inside: auto;
  }

  .quoteTableWrap + .quotePrintTail {
    margin-top: calc(-1 * var(--quote-print-summary-pull));
    padding-top: 0;
  }

  .quoteSummaryRow {
    margin-bottom: 3mm;
    break-after: avoid;
    page-break-after: avoid;
  }

  .quoteNapomena {
    margin-top: 7mm;
    padding-top: 6px;
    break-before: auto;
    page-break-before: auto;
  }

  .quoteNapomena.quoteNapomena--new-page {
    margin-top: 10mm;
    break-before: page;
    page-break-before: always;
  }

  .quoteDocTable {
    page-break-after: auto;
    break-inside: auto;
  }

  .quoteDocTable thead {
    display: table-header-group;
  }

  .quotePrintTheadGap {
    display: table-row !important;
  }

  .quotePrintTheadGap th {
    height: 12mm;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    line-height: 0;
    font-size: 0;
  }

  .quoteDocTable thead tr.quoteDocTableHead {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .quoteDocTable thead tr:not(.quotePrintTheadGap) th {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .quoteTablePrintFoot {
    display: table-footer-group !important;
  }

  .quotePrintTfootReserve td {
    height: var(--quote-print-tfoot-reserve);
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    line-height: 0;
    font-size: 0;
    vertical-align: top;
  }

  .quotePrintTfootReserve {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .quotePageFooter--sheet {
    display: flex !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 6mm 10mm 5mm !important;
    box-sizing: border-box;
    border-top: 1px solid var(--gold);
    background: #fff;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 2;
    grid-template-columns: none;
    grid-template-rows: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .quotePageFooter--sheet::before {
    display: none !important;
  }

  .quotePageFooter--sheet .quoteFooterPageNum {
    display: none !important;
  }

  .quotePageFooter--sheet .quoteFooterText {
    flex: 1 1 auto;
    grid-column: auto;
    text-align: center;
    font-size: 8pt;
    line-height: 1.3;
  }

  .quotePageFooter--sheet img {
    flex: 0 0 auto;
    grid-column: auto;
    height: 34px;
    width: auto;
    margin: 0;
  }

  .quoteDocTable tbody tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .quoteSummaryRow,
  .quoteNapomena,
  .napomenaRow {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .quoteSummaryRow {
    display: flex;
  }

  .napomenaRow {
    display: flex;
    align-items: center;
    gap: 18px;
  }

  .quoteSummaryRow {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .quoteDocTable input,
  .quoteTotals input {
    display: none !important;
  }

  .quoteDocTable .screenOnly,
  .quoteTotals .screenOnly {
    display: none !important;
  }

  .printOnly {
    display: inline !important;
  }

  .quoteDocTable tbody tr:nth-child(even) td {
    background: #f7f8fa !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .quoteNapomena textarea {
    display: none !important;
  }

  .quoteNapomena .napomenaText {
    display: block !important;
  }
}

.quoteDocTable .col-actions {
  width: 28px;
}

.quoteDocTable .col-actions button {
  min-height: 24px;
  padding: 2px 6px;
  font-size: 14px;
  line-height: 1;
}
