/* Suong Mai — Orders list (ke thua token site-theme.css + card account). */
.orders-main { padding-block: 40px 96px; }
.hint { color: var(--muted); font-size: .9rem; }
.orders-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 8px 0 24px; }
.orders-head h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3rem); }
.orders-head .hint { margin: 8px 0 0; }

.auth-needed { max-width: 640px; margin: 24px auto; text-align: center; }
.auth-needed h2 { font-size: 1.5rem; }
.auth-needed-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }

.orders-toolbar { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--paper); box-shadow: var(--shadow-soft); }
.orders-toolbar .field { margin: 0; }
#orders-clear { margin-bottom: 2px; }
#orders-count { margin: 0 0 14px; }

.order-card-list { display: grid; gap: 14px; }
.order-card { display: grid; grid-template-columns: 104px 1fr auto; gap: 18px; align-items: center; padding: 16px 18px; }
.order-thumbs { display: flex; width: 104px; height: 84px; border-radius: 10px; overflow: hidden; background: linear-gradient(140deg, #E6DECE, #d9cdb4 60%, #c9bda3); position: relative; }
.order-thumbs::after { content: "SM"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(46,58,44,.28); font-family: var(--serif); font-size: 1.6rem; font-weight: 800; }
.order-thumbs img { position: relative; z-index: 1; flex: 1; min-width: 0; height: 100%; object-fit: cover; }
.order-thumbs img + img { border-left: 2px solid var(--paper); }
.order-info { min-width: 0; }
.order-code { margin: 0; font-family: var(--sans); font-size: 1rem; font-weight: 700; }
.order-code a { color: var(--forest); text-decoration: none; }
.order-code a:hover { color: var(--rust); text-decoration: underline; }
.order-meta { margin: 4px 0 8px; color: var(--muted); font-size: .85rem; }
.order-pay { margin: 8px 0 0; font-size: .82rem; color: var(--muted); }
.order-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.order-total { color: var(--forest); font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.orders-more { display: flex; justify-content: center; margin-top: 20px; }

.empty-state { padding: 40px 24px; text-align: center; }
.empty-state img { width: 72px; height: 72px; margin-bottom: 12px; opacity: .85; }
.empty-state h3 { font-size: 1.2rem; }
.empty-state p { color: var(--muted); font-size: .95rem; }

.skeleton-row { display: grid; grid-template-columns: 104px 1fr auto; gap: 18px; align-items: center; padding: 16px 18px; }

@media (max-width: 1050px) {
  .orders-toolbar { grid-template-columns: 1fr 1fr 1fr; }
  .toolbar-search { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .orders-head { flex-direction: column; align-items: flex-start; }
  .orders-toolbar { grid-template-columns: 1fr; }
  #orders-clear { justify-self: start; }
  .order-card, .skeleton-row { grid-template-columns: 88px 1fr; }
  .order-thumbs { width: 88px; height: 76px; }
  .order-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (max-width: 390px) {
  .order-card { grid-template-columns: 1fr; }
  .order-thumbs { width: 100%; height: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .order-card { transition: none; }
}

/* ---------- Order detail (trang con /account/order/) ---------- */
.order-main { padding-block: 40px 96px; }
.order-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 8px 0 24px; }
.order-head h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3rem); }
.order-head .hint { margin: 8px 0 0; }
.order-detail { display: grid; gap: 16px; }
.detail-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.detail-summary h2 { margin: 0; font-family: var(--sans); font-size: 1.1rem; font-weight: 700; overflow-wrap: anywhere; }
.detail-meta { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.detail-code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copy-btn { min-height: 36px; padding: 6px 14px; font-size: .82rem; }
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.detail-card { padding: 22px; }
.detail-card h3 { margin-top: 0; font-size: 1.2rem; }
.item-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item-row:last-child { border-bottom: 0; }
.item-thumb { width: 56px; height: 56px; border-radius: 10px; background: linear-gradient(140deg, #E6DECE, #c9bda3); position: relative; overflow: hidden; flex-shrink: 0; }
.item-thumb::after { content: "SM"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(46,58,44,.35); font-family: var(--serif); font-size: .95rem; font-weight: 800; }
.item-thumb img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.item-row h4 { margin: 0 0 2px; font-family: var(--sans); font-size: .95rem; font-weight: 700; }
.item-row p { margin: 0; color: var(--muted); font-size: .85rem; }
.item-price { text-align: right; font-variant-numeric: tabular-nums; }
.item-price strong { display: block; color: var(--forest); }
.item-price span { color: var(--muted); font-size: .82rem; }
.money-rows { margin: 0; }
.money-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; font-variant-numeric: tabular-nums; }
.money-rows div:last-child { border-bottom: 0; }
.money-rows dt { margin: 0; color: var(--muted); }
.money-rows dd { margin: 0; font-weight: 600; }
.money-rows .grand dt, .money-rows .grand dd { color: var(--forest); font-size: 1.1rem; font-weight: 700; }
.ship-lines { margin: 0; font-size: .92rem; }
.ship-lines p { margin: 0 0 6px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.timeline-card { padding: 22px; }

@media (max-width: 800px) {
  .detail-grid { grid-template-columns: 1fr; }
  .order-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 390px) {
  .item-row { grid-template-columns: 48px 1fr; }
  .item-price { grid-column: 2; text-align: left; }
}
