.product-sections {
  display: grid;
  gap: 22px;
  margin: 22px 0;
}
.product-sections h2 {
  font-size: 23px;
}
.product-sections p {
  line-height: 1.6;
}
.reviewer-fields {
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  padding: 16px;
  min-width: 0;
}
.reviewer-fields legend {
  font-size: 14px;
  font-weight: 650;
}
.reviewer-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}
.reviewer-row .button {
  margin-bottom: 2px;
}
.work-row {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--line, #dedfd7);
}
.work-row:last-child {
  border-bottom: 0;
}
.work-row p {
  margin: 6px 0;
}
.work-row > div {
  min-width: 0;
}
.work-row .button {
  flex-shrink: 0;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.library-grid .card p {
  overflow-wrap: anywhere;
}
.connection,
.reference-summary {
  border-top: 1px solid var(--line, #ddd);
  padding: 14px 0;
  margin-top: 10px;
}
.reference-summary span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}
.comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.comparison:has(> section:only-child) {
  grid-template-columns: 1fr;
}
.comparison h3 {
  font-size: 20px;
}
.artwork-preview {
  min-width: 0;
  border: 1px solid var(--line, #ddd);
  border-radius: 9px;
  overflow: hidden;
  padding: 12px;
  margin: 12px 0;
}
.artwork-preview h4 {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.artwork-preview img,
.comparison-pdf canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px auto;
}
.comparison-pdf {
  max-height: 500px;
  overflow: auto;
  background: #f0efe9;
  padding: 10px;
}
.draft-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.field-diff {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid #ddd;
}
.field-diff del {
  color: var(--red);
  text-decoration: none;
  background: #fbe9e7;
  white-space: pre-wrap;
  padding: 9px;
}
.field-diff ins {
  text-decoration: none;
  background: var(--green-light);
  white-space: pre-wrap;
  padding: 9px;
}
.source-comparison {
  overflow-x: auto;
  margin: 18px 0;
}
.source-comparison table {
  width: 100%;
  min-width: 450px;
  border-collapse: collapse;
  font-size: 14px;
}
.source-comparison th,
.source-comparison td {
  padding: 12px;
  border-bottom: 1px solid var(--line, #ddd);
  text-align: left;
  vertical-align: top;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.source-comparison thead {
  background: var(--surface, #f4f3ed);
}
.source-comparison th:first-child {
  width: 23%;
}
.extracted-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 260px;
  overflow: auto;
  background: #f4f3ed;
  padding: 15px;
  font-size: 13px;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.photo-grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}
.supplier-auth {
  max-width: 550px;
  margin: auto;
}
.supplier-auth .row {
  margin-top: 20px;
}
.supplier-auth form .button {
  margin-top: 12px;
}
.product-sections .document-row {
  justify-content: space-between;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}
.badge.scheduled_installation,
.badge.awaiting_installation {
  color: #705416;
  background: #f4edcd;
}
.badge.installed {
  color: var(--green);
  background: var(--green-light);
}
.badge.installation_issue {
  color: var(--red);
  background: #fae5e0;
}
@media (min-width: 1100px) {
  dialog:has(.comparison),
  dialog:has(.draft-previews) {
    max-width: 1020px;
    width: calc(100% - 80px);
  }
}
@media (max-width: 700px) {
  .page-intro:has(> [data-action="reminder-settings"]),
  .page-intro:has(> [data-action="new-directory"]) {
    flex-direction: column;
  }
  .page-intro .button:not(:has(svg)) {
    font-size: 12px;
    padding: 9px 12px;
    white-space: normal;
  }
  .library-grid,
  .comparison,
  .draft-previews {
    grid-template-columns: 1fr;
  }
  .reviewer-row {
    grid-template-columns: 1fr;
  }
  .reviewer-row .button {
    justify-self: start;
  }
  .work-row {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-sections .row.between {
    flex-wrap: wrap;
  }
  .product-sections {
    gap: 16px;
  }
  .comparison-pdf {
    max-height: 420px;
  }
}
