#active-order { margin-bottom: 22px; }
.active-order-banner { width: 100%; display: flex; align-items: center; gap: 18px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 18px; padding: 20px 24px; text-align: left; }
.active-order-banner > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 5px; }
.active-order-banner b { font-size: 20px; }
.active-order-banner small { color: var(--muted); font-weight: 400; line-height: 1.5; }
.active-order-mark { display: grid; place-items: center; border-radius: 50%; width: 42px; height: 42px; color: var(--button-text); background: var(--button); font-size: 24px; }
#panel.orders-panel { width: min(1180px,96vw); max-height: 94dvh; padding: 28px; background: var(--background); }
.orders-panel > .close { position: sticky; top: 0; z-index: 3; }
.orders-panel .orders-heading { padding-right: 50px; }
.orders-panel .order { border: 0; padding: 0; margin: 30px 0 44px; }
.orders-panel .order-heading { margin: 0 0 16px; }
.customer-order-layout { display: grid; grid-template-columns: minmax(270px,.85fr) minmax(0,1.45fr); gap: 22px; align-items: start; }
.customer-order-side, .customer-order-main { display: grid; gap: 18px; min-width: 0; }
.customer-order-side > section, .customer-order-side > details, .customer-order-main > section { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; min-width: 0; }
.customer-status-card h4 { font-size: clamp(22px,2.4vw,29px); line-height: 1.15; letter-spacing: -.6px; margin: 0 0 12px; }
.customer-status-card > p { font-size: 14px; line-height: 1.7; margin: 10px 0; }
.customer-status-card > button { border-radius: 28px; width: 100%; margin-top: 10px; }
.customer-delivery-details h4, .customer-items > h4, .customer-order-receipt > h4, .order-again-card h4 { margin: 0 0 14px; font-size: 19px; }
.customer-delivery-details p { line-height: 1.7; font-size: 14px; white-space: pre-wrap; }
.customer-delivery-details summary { font-size: 13px; color: var(--plum); cursor: pointer; }
.customer-delivery-details label { display: grid; gap: 8px; }
.customer-delivery-details textarea { min-height: 100px; resize: vertical; }
.customer-delivery-details [role="alert"]:empty { display: none; }
.customer-progress { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); list-style: none; margin: 22px -6px; padding: 0; }
.customer-progress li { position: relative; text-align: center; color: var(--muted); min-width: 0; }
.customer-progress li:not(:last-child)::after { position: absolute; content: ''; left: 50%; width: 100%; top: 16px; height: 4px; background: var(--border); }
.customer-progress li.complete::after { background: var(--button); }
.customer-progress li > span { position: relative; z-index: 1; display: grid; place-items: center; margin: 0 auto 10px; width: 36px; height: 36px; background: var(--soft-surface); border: 3px solid var(--surface); border-radius: 50%; font-size: 18px; }
.customer-progress li.complete > span, .customer-progress li.current > span { background: var(--button); color: var(--button-text); }
.customer-progress small { display: block; font-size: 10px; line-height: 1.4; }
.customer-progress .current small { color: var(--plum); font-weight: 750; }
.picked-progress { color: var(--plum); font-weight: 700; }
.shopper-contact { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 20px; text-align: left; }
.shopper-contact > span:nth-child(2) { flex: 1; display: grid; gap: 6px; min-width: 0; }
.shopper-contact small { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.6; }
.shopper-contact > span:first-child { color: var(--plum); font-size: 26px; }
.order-photo-strip { display: flex; overflow-x: auto; gap: 14px; padding: 5px 2px 14px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.order-photo { width: 62px; height: 72px; flex-shrink: 0; position: relative; scroll-snap-align: start; background: white; border-radius: 9px; }
.order-photo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; border-radius: inherit; }
.order-photo > b { position: absolute; bottom: 1px; right: -4px; display: grid; place-items: center; height: 22px; min-width: 22px; padding: 2px 4px; border-radius: 20px; background: var(--button); color: var(--button-text); font-size: 11px; }
.photo-placeholder { display: block; font-size: 9px; padding: 6px; color: #4c365d; line-height: 1.4; max-height: 100%; overflow: hidden; }
.customer-item-group h5 { font-size: 16px; margin: 22px 0 0; }
.customer-items .order-item:last-child { border-bottom: 0; }
.customer-items .order-item > img { width: 65px; height: 76px; }
.customer-items .item-heading b { font-size: 14px; line-height: 1.6; }
.customer-items .order-item-body > p { font-size: 12px; }
.delivery-proof { margin: -22px -22px 20px; }
.delivery-proof img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 17px 17px 0 0; display: block; }
.delivery-date { color: var(--muted); font-size: 12px !important; }
.delivery-tracking { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.delivery-tracking h4 { font-size: 18px; letter-spacing: 0; }
.delivery-tracking p, .delivery-tracking small { font-size: 12px; line-height: 1.7; }
.delivery-tracking small { display: block; margin-top: 8px; }
.delivery-tracking iframe { display: block; width: 100%; height: 280px; border: 1px solid var(--border); border-radius: 12px; background: var(--soft-surface); margin-top: 12px; }
.delivery-tracking .map-attribution { font-size: 11px; }
.delivery-tracking .map-attribution a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.order-time-details summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.order-time-details .completed-delivery { margin-bottom: 0; }
.order-time-details .delivery-summary-stats { grid-template-columns: 1fr; }
.customer-order-receipt .order-bill { margin-bottom: 0; }
.orders-panel .order-messages { margin-top: 20px; padding: 22px; border: 1px solid var(--border); background: var(--surface); border-radius: 18px; }
.message-thread { display: flex; flex-direction: column; list-style: none; gap: 14px; padding: 0; max-height: 370px; overflow-y: auto; }
.message-thread li { max-width: 82%; border-radius: 16px; padding: 12px 16px; line-height: 1.6; font-size: 14px; white-space: pre-wrap; }
.message-thread .message-incoming { align-self: start; background: var(--soft-surface); }
.message-thread .message-outgoing { align-self: end; background: var(--button); color: var(--button-text); }
.message-thread .message-event { align-self: center; max-width: 100%; text-align: center; color: var(--muted); padding: 3px 0; font-size: 12px; }
.message-thread small { display: block; opacity: .8; font-size: 10px; margin-top: 5px; }
.orders-panel [data-message] { display: flex; flex-wrap: nowrap; }
.orders-panel [data-message] input { flex: 1; min-width: 0; }
.orders-panel [data-message] button { border-radius: 24px; }
.orders-panel [data-order-issues] > details { margin-top: 18px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.orders-panel [data-order-issues] summary { cursor: pointer; color: var(--plum); font-weight: 650; }
.orders-panel [data-order-issues] label { display: grid; gap: 8px; }
.order-again-card p { line-height: 1.7; color: var(--muted); font-size: 14px; }
.order-again-card button { border-radius: 25px; }
.reorder-review { list-style: none; padding: 0; }
.reorder-review li { display: flex; gap: 15px; align-items: center; border-bottom: 1px solid var(--border); padding: 16px 0; }
.reorder-review img { width: 60px; height: 70px; object-fit: contain; background: white; border-radius: 8px; }
.reorder-review span { display: grid; gap: 8px; }
.reorder-review small { color: var(--muted); }
@media (max-width:760px) {
  #panel.orders-panel { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; padding: 20px 16px; }
  .orders-panel .orders-heading h2 { font-size: 22px; }
  .orders-panel .orders-heading { padding-right: 35px; }
  .customer-order-layout { grid-template-columns: 1fr; gap: 18px; }
  .customer-order-side > section, .customer-order-side > details, .customer-order-main > section { padding: 20px; }
  .customer-status-card h4 { font-size: 27px; }
  .delivery-proof { margin: -20px -20px 18px; }
  .active-order-banner { padding: 16px; gap: 12px; }
  .active-order-banner b { font-size: 17px; }
  .active-order-banner small { font-size: 11px; }
  .customer-progress small { font-size: 11px; }
  .orders-panel .order-messages { padding: 18px; }
  .message-thread li { max-width: 94%; }
}
