/* Internal Supplier Quotes — DeSignature olive, ivory and champagne. */
[data-supplier-quotes],
.pq-dialog,
.pq-source-dialog {
  --pq-ink: #303622;
  --pq-olive: #5f694c;
  --pq-muted: #706b5e;
  --pq-paper: #faf9f6;
  --pq-cream: #f0e9dd;
  --pq-line: #dcd5c7;
  --pq-gold: #b69d79;
  color: var(--pq-ink);
  font-family: var(--sans, 'Avenir Next', 'Segoe UI', sans-serif);
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
  min-width: 0;
}
[data-supplier-quotes] h2,
.pq-dialog h2 {
  font-family: var(--serif, Georgia, serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.6px;
  margin: 5px 0 10px;
  color: var(--pq-ink);
}
[data-supplier-quotes] h3,
.pq-dialog h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--pq-ink);
}
.pq-header,
.pq-card-head,
.pq-dialog-head,
.pq-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.pq-header {
  padding: 12px 0 20px;
  border-bottom: 1px solid var(--pq-line);
}
.pq-header p {
  margin: 0;
  color: var(--pq-muted);
}
.pq-header p span {
  padding: 0 8px;
}
.pq-eyebrow {
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--pq-olive) !important;
  margin: 0 0 8px !important;
}
.pq-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.pq-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 39px;
  border: 1px solid var(--pq-line);
  background: var(--pq-paper);
  color: var(--pq-ink);
  border-radius: 5px;
  padding: 9px 13px;
  font: 600 12px var(--sans, 'Segoe UI', sans-serif);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: none;
  white-space: normal;
}
.pq-button:hover {
  background: var(--pq-cream);
  border-color: var(--pq-gold);
}
.pq-button.pq-primary {
  background: var(--pq-olive);
  border-color: var(--pq-olive);
  color: white;
}
.pq-button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.pq-button:focus-visible,
[data-supplier-quotes] input:focus-visible,
.pq-dialog input:focus-visible {
  outline: 2px solid var(--pq-olive);
  outline-offset: 3px;
}
.pq-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 16px 0 8px;
}
.pq-tabs .pq-button {
  background: transparent;
  border-color: transparent;
  font-weight: 500;
}
.pq-tabs [aria-pressed='true'] {
  background: var(--pq-ink);
  color: var(--pq-paper);
}
.pq-tabs [aria-pressed='true']:hover {
  background: var(--pq-olive);
}
.pq-status {
  min-height: 20px;
  font-size: 12px;
  color: var(--pq-muted);
  margin: 0 0 12px;
}
.pq-error,
.pq-warning {
  color: #895030 !important;
}
.pq-success {
  color: #526340;
}
.pq-muted {
  color: var(--pq-muted);
  font-size: 12px;
  max-width: 78ch;
}
.pq-notice {
  background: var(--pq-cream);
  border-left: 3px solid var(--pq-gold);
  padding: 12px 16px;
  font-size: 12px;
  margin: 14px 0;
  color: #5c503e;
}
.pq-notice li {
  margin-left: 12px;
}
.pq-card {
  background: var(--pq-paper);
  border: 1px solid var(--pq-line);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 18px;
  min-width: 0;
}
.pq-card-head {
  margin-bottom: 16px;
}
.pq-card-head p {
  margin: 5px 0 0;
}
.pq-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 20px;
}
.pq-metrics section {
  padding: 19px 18px;
  background: var(--pq-paper);
  border: 1px solid var(--pq-line);
  border-top: 3px solid var(--pq-gold);
  border-radius: 6px;
}
.pq-metrics section:last-child {
  background: var(--pq-ink);
  color: var(--pq-paper);
  border-color: var(--pq-ink);
}
.pq-metrics span,
.pq-metrics small {
  display: block;
  font-size: 11px;
}
.pq-metrics span {
  font-weight: 600;
}
.pq-metrics strong {
  display: block;
  font-family: var(--serif, Georgia, serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
  margin: 9px 0;
  overflow-wrap: anywhere;
}
.pq-metrics small {
  opacity: 0.72;
}
.pq-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.pq-workflow {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}
.pq-workflow li {
  display: flex;
  gap: 15px;
  position: relative;
  padding: 0 0 24px;
}
.pq-workflow li:last-child {
  padding-bottom: 0;
}
.pq-workflow li:not(:last-child):before {
  content: '';
  position: absolute;
  left: 16px;
  top: 35px;
  bottom: 1px;
  width: 1px;
  background: var(--pq-line);
}
.pq-workflow li > span {
  flex: 0 0 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--pq-line);
  font-size: 11px;
}
.pq-workflow li.is-done > span {
  background: var(--pq-olive);
  color: white;
  border-color: var(--pq-olive);
}
.pq-workflow button {
  border: 0;
  background: none;
  color: var(--pq-ink);
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.pq-workflow p {
  font-size: 12px;
  color: var(--pq-muted);
  margin: 4px 0 0;
}
.pq-chart-row {
  margin: 18px 0;
}
.pq-chart-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.pq-chart-row span,
.pq-chart-row small {
  color: var(--pq-muted);
  font-size: 10px;
}
.pq-bar {
  height: 7px;
  background: #e5e6df;
  border-radius: 9px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.pq-bar i {
  display: block;
  height: 100%;
  background: var(--pq-olive);
}
.pq-scope-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 22px;
}
.pq-scope-strip span,
.pq-scope-strip strong {
  display: block;
}
.pq-scope-strip span {
  font-size: 11px;
  color: var(--pq-muted);
}
.pq-scope-strip strong {
  font-size: 13px;
  font-weight: 500;
  white-space: pre-line;
  margin-top: 6px;
}
.pq-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.pq-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.pq-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--pq-muted);
}
.pq-field input,
.pq-field select,
.pq-field textarea,
.pq-filter select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--pq-line);
  background: white;
  color: var(--pq-ink);
  border-radius: 4px;
  padding: 9px 10px;
  font: 400 13px/1.45 var(--sans, 'Segoe UI', sans-serif);
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
  height: auto;
}
.pq-field textarea {
  min-height: 76px;
  resize: vertical;
}
.pq-field input[type='number'] {
  font-variant-numeric: tabular-nums;
}
.pq-field input:focus,
.pq-field textarea:focus,
.pq-field select:focus {
  outline: 2px solid #85926e;
  outline-offset: 1px;
}
.pq-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.pq-categories label {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--pq-line);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}
.pq-categories label:has(:checked) {
  background: #e6eadf;
  border-color: #9ca68a;
}
.pq-categories input,
.pq-confirm input,
.pq-table input[type='checkbox'] {
  accent-color: var(--pq-olive);
  width: 16px;
  height: 16px;
  padding: 0;
  flex-shrink: 0;
}
.pq-create-categories {
  grid-column: 1/-1;
  border: 1px solid var(--line);
  padding: 12px;
}
.pq-create-categories legend {
  font-size: 12px;
}
.pq-create-categories > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pq-create-categories label {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.pq-create-categories input {
  width: auto !important;
  min-height: 0 !important;
  accent-color: #5f694c;
}
.pq-continue-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
}
.pq-continue-label input {
  width: auto !important;
  min-height: 0 !important;
}
[data-supplier-quotes] fieldset,
.pq-dialog fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.pq-dialog fieldset:disabled {
  opacity: 0.84;
}
.pq-dialog legend,
[data-supplier-quotes] legend {
  font-size: 12px;
  font-weight: 600;
  margin: 4px 0 6px;
}
.pq-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.pq-filter select {
  width: auto;
  max-width: 240px;
}
.pq-table-wrap {
  overflow: auto;
  border: 1px solid var(--pq-line);
  border-radius: 6px;
  max-width: 100%;
}
.pq-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  min-width: 820px;
  text-align: left;
  margin: 0;
}
.pq-table th {
  background: #eeeee7;
  color: var(--pq-ink);
  font-weight: 600;
  font-size: 11px;
}
.pq-table td,
.pq-table th {
  padding: 14px 12px;
  border-bottom: 1px solid var(--pq-line);
  vertical-align: top;
}
.pq-table tbody tr:last-child td,
.pq-table tbody tr:last-child th {
  border-bottom: 0;
}
.pq-table small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
  color: var(--pq-muted);
  white-space: normal;
}
.pq-table strong {
  font-size: 12px;
  font-weight: 600;
}
.pq-table .pq-money {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pq-table .pq-field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(100%);
}
.pq-requirements {
  min-width: 850px;
}
.pq-requirements th:nth-child(1) {
  width: 170px;
}
.pq-requirements th:nth-child(2) {
  width: 180px;
}
.pq-requirements th:nth-child(3) {
  min-width: 300px;
}
.pq-requirements td {
  padding: 9px;
}
.pq-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  padding: 4px 7px;
  background: #e9e8e2;
  color: #5e5c52;
  white-space: nowrap;
}
.pq-included,
.pq-selected {
  background: #e1ead8;
  color: #48603c;
}
.pq-partial,
.pq-extracharge,
.pq-pendingapproval,
.pq-shortlisted {
  background: #f2e5ce;
  color: #785d2c;
}
.pq-mismatch,
.pq-excluded {
  background: #f2ded4;
  color: #914e39;
}
.pq-reviewed {
  background: #dfe8e2;
  color: #4e6b5b;
}
.pq-archive {
  margin-top: 20px;
}
.pq-archive summary {
  cursor: pointer;
  font-size: 12px;
  padding: 8px 0;
}
.pq-matrix .pq-table {
  table-layout: fixed;
  width: max-content;
}
.pq-matrix th,
.pq-matrix td {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
}
.pq-matrix th:first-child {
  width: 260px;
  min-width: 260px;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #eeeee7;
  box-shadow: 1px 0 var(--pq-line);
}
.pq-matrix th p {
  font-weight: 400;
  font-size: 12px;
  margin: 8px 0;
  line-height: 1.55;
}
.pq-matrix-cell {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pq-ink);
  cursor: pointer;
}
.pq-matrix-cell > span:not(.pq-badge) {
  display: block;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 10px;
  max-height: 210px;
  overflow: auto;
}
.pq-matrix-cell:focus-visible {
  outline: 2px solid var(--pq-olive);
  outline-offset: 4px;
}
.pq-quote-basis td {
  font-size: 12px;
  line-height: 1.7;
  background: #f7f3ec;
}
.pq-selection {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--pq-line);
  padding: 22px 0;
}
.pq-selection p {
  margin: 8px 0;
  font-size: 13px;
}
.pq-selection small {
  color: var(--pq-muted);
  white-space: pre-wrap;
}
.pq-selection > .pq-actions {
  justify-content: flex-end;
}
.pq-empty {
  padding: 48px 28px;
  background: var(--pq-paper);
  border: 1px solid var(--pq-line);
  border-radius: 8px;
}
.pq-empty-small {
  color: var(--pq-muted);
  padding: 24px 6px;
  font-size: 13px;
}
.pq-dialog {
  width: min(1240px, 96vw);
  max-width: 96vw;
  max-height: 94vh;
  padding: 0;
  background: var(--pq-paper);
  border: 1px solid var(--pq-line);
  border-radius: 10px;
  box-shadow: 0 24px 80px #20231355;
  margin: auto;
  overflow: auto;
}
.pq-dialog::backdrop {
  background: #222719a3;
  backdrop-filter: blur(3px);
}
.pq-dialog-head {
  padding: 22px 26px;
  border-bottom: 1px solid var(--pq-line);
  background: var(--pq-paper);
}
.pq-dialog-head h2 {
  font-size: 28px;
}
.pq-dialog-head p {
  font-size: 12px;
  margin: 0;
  color: var(--pq-muted);
}
.pq-dialog-body {
  padding: 20px 26px;
}
.pq-dialog-foot {
  position: sticky;
  bottom: 0;
  background: var(--pq-paper);
  padding: 14px 26px;
  border-top: 1px solid var(--pq-line);
  z-index: 2;
}
.pq-dialog-foot p,
[data-pq-dialog-status] {
  font-size: 12px;
  max-width: 550px;
  white-space: pre-wrap;
}
.pq-line-table {
  min-width: 1130px;
}
.pq-line-table th:first-child {
  width: 330px;
}
.pq-line-table td:first-child textarea {
  min-height: 90px;
}
.pq-line-table th:nth-child(2) {
  width: 75px;
}
.pq-line-table th:nth-child(3) {
  width: 140px;
}
.pq-line-table th:nth-child(4),
.pq-line-table th:nth-child(5) {
  width: 120px;
}
.pq-line-table th:nth-child(7) {
  width: 65px;
}
.pq-line-table input,
.pq-line-table select {
  padding: 8px;
}
.pq-line-table .pq-field + .pq-field {
  margin-top: 7px;
}
.pq-edit-row {
  display: grid;
  grid-template-columns: 190px minmax(200px, 1fr) 90px 130px auto;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--pq-line);
  align-items: start;
}
.pq-edit-row textarea {
  min-height: 120px;
}
.pq-menu-block {
  padding: 20px 0;
  border-bottom: 1px solid var(--pq-line);
}
.pq-menu-item {
  display: grid;
  grid-template-columns: 160px minmax(200px, 1fr) 70px auto;
  gap: 12px;
  margin: 14px 0;
}
.pq-menu-item textarea {
  min-height: 50px;
}
.pq-check-row {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(260px, 1fr);
  gap: 28px;
  padding: 20px 0;
  border-bottom: 1px solid var(--pq-line);
}
.pq-check-row small {
  font-size: 10px;
  color: var(--pq-muted);
}
.pq-check-row h3 {
  font-size: 16px;
  margin: 5px 0;
}
.pq-check-row p {
  font-size: 12px;
}
.pq-check-row textarea {
  min-height: 100px;
}
.pq-check-row .pq-field {
  margin-bottom: 9px;
}
.pq-check-row input[type='number'] {
  max-width: 100px;
}
.pq-source-text {
  margin: 12px 0;
  padding: 14px;
  background: white;
  border: 1px solid var(--pq-line);
  border-radius: 4px;
}
.pq-source-text pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.65 var(--sans, 'Segoe UI', sans-serif);
  max-width: 100%;
}
.pq-source-text summary {
  font-weight: 600;
  cursor: pointer;
}
.pq-source-dialog iframe {
  width: 100%;
  height: 75vh;
  border: 0;
  display: block;
  background: #ddd;
}
.pq-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  margin: 20px 0;
}
.pq-confirm input {
  margin-top: 3px;
}
@media (max-width: 1100px) {
  .pq-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pq-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pq-edit-row {
    grid-template-columns: 1fr 2fr;
  }
  .pq-two-column {
    grid-template-columns: 1fr;
  }
  .pq-scope-strip {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .pq-header h2 {
    font-size: 30px;
  }
  .pq-header > .pq-actions {
    width: 100%;
  }
  .pq-header > .pq-actions .pq-primary {
    flex: 1;
  }
  .pq-metrics {
    gap: 8px;
  }
  .pq-metrics section {
    padding: 14px 12px;
  }
  .pq-metrics strong {
    font-size: 25px;
  }
  .pq-card {
    padding: 16px 12px;
  }
  .pq-tabs {
    gap: 2px;
  }
  .pq-tabs .pq-button {
    font-size: 11px;
    padding: 9px 8px;
  }
  .pq-form-grid,
  .pq-four,
  .pq-scope-strip {
    grid-template-columns: 1fr;
  }
  .pq-dialog-head,
  .pq-dialog-body,
  .pq-dialog-foot {
    padding: 16px 12px;
  }
  .pq-dialog h2 {
    font-size: 24px;
  }
  .pq-dialog {
    width: 98vw;
    max-width: 98vw;
    max-height: 96vh;
  }
  .pq-dialog-foot > .pq-actions {
    width: 100%;
  }
  .pq-dialog-foot .pq-button {
    flex: 1;
  }
  .pq-dialog-foot p {
    margin: 0;
  }
  .pq-check-row,
  .pq-edit-row,
  .pq-menu-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .pq-filter {
    width: 100%;
  }
  .pq-filter select {
    max-width: none;
    flex: 1;
  }
  .pq-card-head > .pq-actions {
    width: 100%;
  }
  .pq-matrix th,
  .pq-matrix td {
    width: 270px;
    min-width: 270px;
    max-width: 270px;
  }
  .pq-matrix th:first-child {
    width: 190px;
    min-width: 190px;
  }
  .pq-selection > .pq-actions {
    justify-content: flex-start;
  }
}
/* Isolate module forms from the CRM's global multi-column fieldset styles. */
.portal-page [data-supplier-quotes] {
  background: #f4f1ea;
  border: 1px solid #dcd5c7;
  border-radius: 8px;
  padding: 24px;
  margin-top: 18px;
}
.portal-page [data-supplier-quotes] fieldset,
.portal-page .pq-dialog fieldset {
  display: block;
  grid-template-columns: none;
  gap: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.portal-page [data-supplier-quotes] label,
.portal-page [data-supplier-quotes] label span,
.portal-page .pq-dialog label,
.portal-page .pq-dialog label span {
  text-transform: none;
  letter-spacing: 0;
}
.portal-page [data-supplier-quotes] .pq-card,
.portal-page .pq-dialog {
  box-shadow: none;
}
@media (max-width: 600px) {
  .portal-page [data-supplier-quotes] {
    padding: 16px 10px;
  }
}
.portal-page [data-supplier-quotes] .pq-table tbody th {
  text-transform: none;
  letter-spacing: 0;
}
@media (max-width: 760px) {
  body.portal-page .crm-project-picker:has(~ [data-view-panel='supplier-quotes'].active) {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
  }
  body.portal-page .crm-project-picker:has(~ [data-view-panel='supplier-quotes'].active) > * {
    grid-column: 1 !important;
    min-width: 0 !important;
  }
}

.manual-project-form .pq-create-categories { display:block; grid-template-columns:none; }
