.contact-detail-page { margin-top: 24px; }
.contact-detail-page .contact-hero { padding-bottom: 20px; }
.contact-detail-page .section-block { margin-top: 24px; }

.compact-order {
  margin-bottom: 10px;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
}

.compact-order-head {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(360px, 2fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #faf9f5;
}

.compact-order-title small,
.compact-order-title strong { display: block; }
.compact-order-title small { font-size: 10px; }
.compact-order-title strong { margin-top: 1px; font-size: 14px; }
.compact-order-status { display: flex; gap: 5px; flex-wrap: wrap; }
.compact-order-status span {
  padding: 2px 6px;
  border-radius: 4px;
  background: #ecebe5;
  color: #505955;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.compact-order .order-actions { justify-content: flex-end; font-size: 12px; }

.compact-lines table { table-layout: auto; }
.compact-lines th,
.compact-lines td { padding: 5px 8px; font-size: 12px; line-height: 1.25; }
.compact-lines th { font-size: 9px; }
.compact-lines th:first-child,
.compact-lines td:first-child { width: 100%; white-space: nowrap; }
.compact-lines td:not(:first-child),
.compact-lines th:not(:first-child) { white-space: nowrap; }
.line-description { color: var(--muted); font-weight: 400; }

.compact-order-foot {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  min-height: 31px;
  padding: 6px 12px;
  background: #faf9f5;
  color: var(--muted);
  font-size: 11px;
}
.compact-order-foot strong { color: var(--ink); white-space: nowrap; font-size: 13px; }

.contact-detail-page .conversation-card { margin-bottom: 8px; border-radius: 10px; }
.contact-detail-page .conversation-card summary { padding: 10px 13px; }
.contact-detail-page .conversation-toolbar { padding: 6px 13px; font-size: 12px; }
.contact-detail-page .message-list { padding: 10px; }
.contact-detail-page .message {
  max-width: 84%;
  margin-bottom: 6px;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.35;
}
.contact-detail-page .message header { font-size: 10px; }
.contact-detail-page .message p { margin-top: 2px; }
.contact-detail-page .attachments { margin-top: 5px; }
.contact-detail-page .attachments .attachment-preview { width: min(190px, 100%); }
.contact-detail-page .attachment-preview img { max-height: 260px; }
.direct-sale-fact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #c9ded3;
  border-radius: 9px;
  background: var(--green-2);
}
.direct-sale-fact strong,
.direct-sale-fact small { display: block; }
.direct-sale-fact small { margin-top: 2px; }
.direct-sale-fact .button { min-height: 32px; padding: 5px 10px; background: white; font-size: 12px; }

@media (max-width: 900px) {
  .compact-order-head { grid-template-columns: 1fr; gap: 6px; }
  .compact-order .order-actions { justify-content: flex-start; }
  .compact-lines { overflow-x: auto; }
  .compact-lines table { min-width: 760px; }
  .direct-sale-fact { align-items: stretch; flex-direction: column; }
}
