.reference-is-modified { color: #b45309 !important; font-weight: 700; }
.reference-change-tag { display: inline-flex; align-items: center; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: #fff1dc; color: #9a4c06; font-size: 11px; font-weight: 700; white-space: nowrap; }
.order-reference-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-reference-copy { display: grid; align-content: start; gap: 2px; min-width: 0; text-align: left; }
.order-reference-copy h2, .order-reference-copy h3, .order-reference-copy p { margin: 0 !important; }
.order-reference-copy p { overflow-wrap: anywhere; }
.order-reference-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.order-reference-actions .button, #order-reference-dialog .button { height: 36px; border-radius: 999px; }
#order-reference-dialog { width: min(580px, calc(100vw - 24px)); }
#order-reference-dialog .modal-header { align-items: center; }
#order-reference-dialog .modal-body { display: grid; gap: 14px; }
#order-reference-dialog [data-reference-editor] { display: grid; gap: 12px; }
#order-reference-dialog [data-reference-editor] > p { margin: 0; }
#order-reference-value { height: 36px; border-radius: 8px; }
.order-reference-history { min-width: 0; }
.order-reference-history h3 { margin: 0 0 8px; font-size: 14px; }
.order-reference-history-row { display: grid; gap: 2px; padding: 9px 0; border-bottom: 1px solid #eceef1; overflow-wrap: anywhere; }
.order-reference-history-row small { color: var(--muted-foreground); }
.order-reference-history-row p { margin: 3px 0 0; white-space: pre-wrap; }
#order-reference-history-pages { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#order-reference-history-pages > span { font-size: 12px; color: var(--muted-foreground); }
@media (max-width: 520px) {
  .order-reference-heading { align-items: start; flex-direction: column; gap: 10px; }
  .order-reference-actions { width: 100%; }
  .order-reference-actions .button { flex: 1; }
}
