#orderDetailsDialog {
  width: min(920px, calc(100% - 30px));
}

#orderDetailsContent {
  padding: 38px;
  overflow: auto;
  max-height: 92dvh;
}

.order-detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 25px;
  padding-right: 42px;
  margin-bottom: 24px;
}

.order-detail-heading h2 {
  font: 500 30px var(--serif);
  margin: 0 0 7px;
}

.order-detail-heading p {
  color: var(--muted);
  margin: 0;
}

.order-customer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.order-customer-grid div {
  border: 1px solid var(--line);
  padding: 14px;
  min-width: 0;
}

.order-customer-grid span,
.order-item-prices span,
.order-note span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.order-customer-grid strong,
.order-customer-grid a {
  display: block;
  overflow-wrap: anywhere;
}

.order-note {
  border-left: 3px solid var(--peach);
  background: #fff8f4;
  padding: 14px 16px;
  margin-bottom: 24px;
  white-space: pre-wrap;
}

.order-detail-section-title {
  font: 500 22px var(--serif);
  margin: 0 0 12px;
}

.order-detail-item {
  display: grid;
  grid-template-columns: 92px minmax(150px, 1fr) minmax(260px, auto);
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 15px 0;
}

.order-detail-item img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  background: var(--soft);
}

.order-detail-item h3 {
  font: 500 20px var(--serif);
  margin: 0 0 5px;
}

.order-detail-item p {
  color: var(--muted);
  margin: 0;
}

.order-item-prices {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 22px;
  text-align: right;
}

.order-item-prices strong {
  white-space: nowrap;
}

.order-detail-total {
  display: flex;
  justify-content: space-between;
  align-items: end;
  border-top: 2px solid var(--ink);
  padding-top: 18px;
  margin-top: 8px;
}

.order-detail-total span {
  font-weight: 600;
}

.order-detail-total strong {
  font: 500 30px var(--serif);
}

.open-order {
  border: 1px solid var(--green);
  color: var(--green);
  background: #fff;
  padding: 8px 11px;
  white-space: nowrap;
}

.recent-order.open-order-card {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.recent-order.open-order-card:first-child {
  border-top: 0;
}

@media (max-width: 700px) {
  #orderDetailsContent { padding: 30px 20px; }
  .order-customer-grid { grid-template-columns: 1fr; }
  .order-detail-item { grid-template-columns: 72px 1fr; }
  .order-detail-item img { width: 72px; height: 72px; }
  .order-item-prices { grid-column: 1 / 3; text-align: left; justify-content: space-between; }
}
