.ost-list {
  display: grid;
  gap: 14px;
}

.ost-card {
  overflow: hidden;
  border: 1px solid var(--line, #e8e5e0);
  border-radius: 8px;
  background: var(--white, #fff);
  box-shadow: 0 8px 24px rgba(25, 24, 22, .06);
}

.ost-head,
.ost-body,
.ost-tracking,
.ost-complaint {
  padding: 16px;
}

.ost-head {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line, #e8e5e0);
  background: color-mix(in srgb, var(--paper, #f7f6f3) 72%, #fff);
}

.ost-status-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #1f201d;
}

.ost-status-icon .ic { width: 21px; height: 21px; }
.ost-card[data-status="pending"] .ost-status-icon { background: #b57812; }
.ost-card[data-status="dikemas"] .ost-status-icon { background: #2762a4; }
.ost-card[data-status="dikirim"] .ost-status-icon { background: #14735a; }
.ost-card[data-status="selesai"] .ost-status-icon { background: #31714a; }
.ost-card[data-status="batal"] .ost-status-icon { background: #a43c3c; }

.ost-head-copy { flex: 1; min-width: 0; }
.ost-head-copy b { display: block; font-size: 14px; line-height: 1.25; }
.ost-head-copy small { display: block; margin-top: 3px; color: var(--muted, #777); font-size: 11.5px; line-height: 1.4; }

.ost-chip {
  flex: none;
  padding: 5px 8px;
  border-radius: 999px;
  color: #3c3b37;
  background: #eceae5;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.ost-products { display: grid; gap: 12px; }
.ost-product {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.ost-product-media {
  position: relative;
  display: grid;
  width: 64px;
  height: 76px;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  color: var(--ink-soft, #555);
  background: var(--paper, #f1f0ed);
}

.ost-product-media .ic { width: 24px; height: 24px; }
.ost-product-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ost-product-copy { min-width: 0; }
.ost-product-copy b { display: block; overflow: hidden; font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.ost-product-copy small { display: block; margin-top: 4px; color: var(--muted, #777); font-size: 11.5px; }
.ost-product-price { align-self: end; color: var(--ink, #222); font-size: 12px; font-weight: 700; white-space: nowrap; }

.ost-summary {
  display: grid;
  gap: 8px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #e8e5e0);
}

.ost-summary-row { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; font-size: 11.5px; line-height: 1.5; }
.ost-summary-row span:first-child { color: var(--muted, #777); }
.ost-summary-row strong { overflow-wrap: anywhere; text-align: right; }
.ost-total { font-size: 13px; }

.ost-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.ost-btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--ink, #222);
  border-radius: 6px;
  color: var(--ink, #222);
  background: transparent;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.ost-btn .ic { width: 15px; height: 15px; }
.ost-btn-primary { color: #fff; background: var(--ink, #222); }
.ost-btn-muted { border-color: var(--line, #ddd); }

.ost-tracking,
.ost-complaint { border-top: 1px solid var(--line, #e8e5e0); }
.ost-tracking[hidden],
.ost-complaint[hidden] { display: none; }
.ost-tracking h3 { margin: 0 0 16px; font-size: 14px; }
.ost-tracking-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -8px 0 18px; color: var(--muted, #777); font-size: 11px; }

.ost-timeline { position: relative; display: grid; gap: 0; margin: 0 0 0 15px; padding: 0; list-style: none; }
.ost-timeline::before { position: absolute; top: 15px; bottom: 15px; left: 14px; width: 1px; background: var(--line, #ddd); content: ""; }
.ost-step { position: relative; display: grid; min-height: 66px; grid-template-columns: 29px minmax(0, 1fr); gap: 18px; }
.ost-step:last-child { min-height: 42px; }
.ost-marker {
  z-index: 1;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 7px solid var(--white, #fff);
  border-radius: 50%;
  color: #999;
  background: #deddd9;
  box-sizing: content-box;
  transform: translate(-7px, -7px);
}
.ost-marker .ic { width: 13px; height: 13px; }
.ost-step.completed .ost-marker { color: #fff; background: #267054; }
.ost-step.current .ost-marker { color: #195f49; background: #d7eee6; box-shadow: 0 0 0 5px rgba(38, 112, 84, .11); }
.ost-step.current .ost-marker::after { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #267054; content: ""; animation: ostPulse 1.8s ease-out infinite; }
.ost-step.cancelled .ost-marker { color: #fff; background: #a43c3c; }
.ost-step-copy b { display: block; font-size: 12.5px; line-height: 1.3; }
.ost-step-copy small { display: block; margin-top: 3px; color: var(--muted, #777); font-size: 11px; line-height: 1.4; }
.ost-step.pending .ost-step-copy { color: #aaa; }
.ost-complaint .field { margin-bottom: 10px; }
.ost-empty { margin: 10px 0; color: var(--muted, #777); font-size: 12.5px; text-align: center; }

@keyframes ostPulse {
  from { box-shadow: 0 0 0 0 rgba(38, 112, 84, .38); }
  to { box-shadow: 0 0 0 11px rgba(38, 112, 84, 0); }
}

@media (max-width: 420px) {
  .ost-head, .ost-body, .ost-tracking, .ost-complaint { padding: 14px; }
  .ost-head { align-items: flex-start; }
  .ost-chip { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
  .ost-product { grid-template-columns: 54px minmax(0, 1fr); }
  .ost-product-media { width: 54px; height: 66px; }
  .ost-product-price { grid-column: 2; justify-self: start; }
  .ost-summary-row { grid-template-columns: 104px minmax(0, 1fr); }
  .ost-btn { flex: 1 1 132px; }
}

@media (prefers-reduced-motion: reduce) {
  .ost-step.current .ost-marker::after { animation: none; }
}
