/* ====================================================================
   Your orders and order tracking. Colours come from styles.css;
   boxes and totals reuse .cart-group and .cart-totals from cart.css.
   ==================================================================== */

.account-actions { display: flex; gap: 10px; margin: 0; }

/* ------------------------------------------------------------- status */

.status {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; background: var(--brand-soft); color: var(--brand-dark);
}
.status-shipped, .status-delivered { background: var(--ok-soft); color: var(--ok); }
.status-partially_shipped          { background: var(--warn-soft); color: var(--warn); }
.status-cancelled                  { background: var(--err-soft); color: var(--err); }

/* --------------------------------------------------------------- list */

.order-list { list-style: none; margin: 0; padding: 0; max-width: 820px; display: flex; flex-direction: column; gap: 10px; }
.order-row {
  display: grid; grid-template-columns: 1fr auto 110px; align-items: center; gap: 16px;
  padding: 14px 18px; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.order-row:hover { text-decoration: none; border-color: var(--brand); }
.order-row > span:first-child { display: flex; flex-direction: column; }
.order-row > strong:last-child { text-align: right; }

/* ------------------------------------------------------------- detail */

.order-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.order-head h1 { margin: 0; font-size: 1.5rem; }
.order-head p { margin: 4px 0 0; }

.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.order-shipments { display: flex; flex-direction: column; gap: 18px; }

.progress { display: flex; list-style: none; margin: 14px 0 18px; padding: 0; counter-reset: step; }
.progress li {
  flex: 1; position: relative; padding-top: 22px; text-align: center;
  font-size: .8rem; color: var(--muted);
}
.progress li::before {                       /* the dot */
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%; background: var(--line); z-index: 1;
}
.progress li + li::after {                   /* the line to the previous dot */
  content: ""; position: absolute; top: 6px; right: 50%; width: 100%; height: 3px; background: var(--line);
}
.progress li.done { color: var(--ink); }
.progress li.done::before, .progress li.done::after { background: var(--ok); }
.progress li.current { font-weight: 700; }

.tracking { margin: 0 0 10px; font-size: .92rem; }
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-soft); }

.timeline { margin-top: 28px; max-width: 820px; }
.timeline ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { display: flex; flex-direction: column; padding: 0 0 14px 16px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--brand);
}

@media (max-width: 900px) {
  .order-layout { grid-template-columns: minmax(0, 1fr); }
  .order-row { grid-template-columns: 1fr auto; }
  .order-row > strong:last-child { grid-column: 1 / -1; text-align: left; }
  .progress li { font-size: .7rem; }
}
