body[data-page="portal"] .account-view { max-width: none; }
.account-view:has(.orders-view:not(.hidden)) .account-title { display: none; }


.admin-order-actions,.admin-order-actions form,[data-delivery-status-form]{display:grid;gap:.6rem;min-width:0}
.admin-order-actions{margin:1rem 0;padding:1rem;border:1px solid var(--line);border-radius:.75rem}
.admin-order-actions form{grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));align-items:end}
.admin-order-actions input,[data-delivery-status-form] input{width:100%}
.orders-view,
.order-asset,
.admin-proof {
  --post-ink: #3b231c;
  --post-muted: #71574a;
  --post-line: #e9d8c9;
  --post-paper: #fffdf8;
  --post-accent: #9f3c2b;
}

.orders-view { padding: 0; border: 0; background: none; color: var(--post-ink); }
.orders-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(16px, 4vw, 56px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(24px, 3.6vw, 48px);
  border: 1px solid #e9c3ad;
  border-radius: 24px;
  background: radial-gradient(ellipse at 80% 0, #f8c7ba, transparent 70%), #fae7d9;
}
.orders-banner::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 8px;
  background: repeating-linear-gradient(125deg, #c86c56 0 15px, #fff4e9 15px 29px, #ae8268 29px 44px, #fff4e9 44px 58px);
}
.order-kicker {
  display: block;
  margin: 0;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--post-accent);
}
.orders-banner h1 {
  margin: .12em 0 .22em;
  font-size: clamp(2.2rem, 5.1vw, 5.3rem);
  font-weight: 750;
}
.orders-banner p { margin: 0; color: var(--post-muted); font-size: clamp(1rem, 1.5vw, 1.2rem); }
.orders-stamp {
  display: grid;
  place-items: center;
  width: clamp(78px, 10vw, 138px);
  aspect-ratio: 1;
  flex: none;
  transform: rotate(8deg);
  color: #743f32;
  background: var(--post-paper);
  border: 3px dotted #cf8d77;
  border-radius: 16px;
  box-shadow: 5px 8px 0 #8e4c3316;
}
.orders-stamp svg { width: 86%; }
.orders-toolbar, .order-actions, .order-statuses {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.orders-toolbar { justify-content: space-between; padding: 16px 0 0; }
.orders-toolbar p { margin: 0; }
.orders-toolbar button { margin-inline-start: auto; }
.order-actions p { margin: 0; }
.orders-view .fine { color: var(--post-muted); }
.order-link {
  display: inline-flex;
  gap: .5em;
  align-items: center;
  width: fit-content;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #dcbfac;
  border-radius: 10px;
  background: #fffaf3;
  color: #833729;
  font-size: .9rem;
  font-weight: 750;
}
.order-link:hover { background: #f8e8dc; }
.order-link[hidden] { display: none; }
.order-group { margin-top: clamp(22px, 3vw, 38px); }
.order-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: clamp(1.12rem, 2vw, 1.5rem);
}
.orders-view .order-count { background: #f3e4d8; color: #6a4535; }
.orders-view .account-order {
  margin-bottom: 14px;
  padding: clamp(18px, 3vw, 36px);
  border: 1px solid var(--post-line);
  border-left: 4px solid #d1856e;
  border-radius: 18px;
  background: var(--post-paper);
  box-shadow: 0 8px 24px #482a1d08;
  overflow-wrap: anywhere;
}
.account-order__head { gap: 14px 28px; flex-wrap: wrap; }
.account-order h4 { margin: 2px 0; font: 750 clamp(1.65rem, 3vw, 2.4rem)/1.2 'Playfair Display', Georgia, serif; }
.account-order__meta { margin: 5px 0 0; color: var(--post-muted); }
.order-facts { display: flex; flex-wrap: wrap; gap: 12px clamp(18px, 3vw, 48px); margin: 0; }
.order-facts dt { font-size: .8rem; color: var(--post-muted); }
.order-facts dd { margin: 3px 0 0; font-weight: 750; }
.order-statuses { margin: 16px 0 0; gap: 8px; }
.order-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  color: #7e3527;
  background: #f9e3da;
  font-size: .8rem;
  font-weight: 750;
}
.order-actions:not(:empty) { margin-top: 13px; }
.order-deliveries { margin-top: 18px; border-top: 1px solid var(--post-line); }
.order-deliveries > summary { padding-top: 14px; cursor: pointer; font-weight: 750; }
.order-deliveries .order-count { margin-inline-start: 4px; }
.order-delivery { margin-top: 12px; padding: clamp(14px, 2vw, 22px); background: #faf2e9; border-radius: 14px; }
.order-delivery-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap; }
.order-delivery-head p { margin: 3px 0 0; color: var(--post-muted); font-size: .9rem; }
.order-delivery > .order-link { margin-top: 14px; }
.delivery-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.delivery-steps li { padding-inline-end: 6px; color: var(--post-muted); font-size: .8rem; }
.delivery-steps li > span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  margin-bottom: 5px;
  border: 1px solid #d8c0ad;
  border-radius: 50%;
  background: var(--post-paper);
  font-weight: 750;
}
.delivery-steps li[aria-current] { color: #762c21; font-weight: 800; }
.delivery-steps li[aria-current] > span { color: white; border-color: var(--post-accent); background: var(--post-accent); }
.delivery-steps li.complete > span { color: #6a4535; background: #ecdccc; }
.orders-view .order-empty { margin-top: 22px; padding: 26px; border: 1px dashed #d3b9a5; border-radius: 16px; }

.order-asset {
  width: min(680px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: clamp(16px, 4vw, 30px);
  border: 1px solid var(--post-line);
  border-radius: 20px;
  color: var(--post-ink);
  background: var(--post-paper);
}
.order-asset::backdrop { background: #2f170db3; }
.order-asset-head { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.order-asset-head h2 { margin: 0; }
.order-asset p:empty { display: none; }
.order-asset img { display: block; width: 100%; max-height: 55dvh; margin-top: 16px; object-fit: contain; border-radius: 10px; background: #f9efe5; }
.order-asset img[hidden] { display: none; }
#order-asset-note { white-space: pre-wrap; overflow-wrap: anywhere; }
#order-asset-download { margin-top: 14px; }

.admin-proof { grid-column: 1 / -1; display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: #faf2e9; }
.admin-proof label { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-weight: 750; }
.admin-proof input { width: min(100%, 320px); font-weight: 400; }
.admin-proof p { margin: 0; }
.admin-proof p:empty { display: none; }

@media (max-width: 520px) {
  .orders-banner { gap: 10px; padding: 24px 16px 30px; }
  .orders-banner h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .orders-stamp { width: 64px; }
  .delivery-steps { grid-template-columns: 1fr; gap: 7px; }
  .delivery-steps li { display: flex; align-items: center; gap: 9px; }
  .delivery-steps li > span { margin: 0; }
}
