/* orders-screen-v3 — Orders v3 complete redesign */
/* ── RESET SCOPE ── */
#sc-orders * { box-sizing: border-box; }

/* ── SCREEN SHELL ── */
#sc-orders {
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-left: 2px solid rgba(120,75,40,0.24);
  border-right: 2px solid rgba(120,75,40,0.24);
  border-top: 2px solid rgba(120,75,40,0.24);
  border-bottom: 2px solid rgba(120,75,40,0.24);
}

#ord3-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 calc(56px + 24px);
  background: var(--surface-2);
}

#ord3-body::-webkit-scrollbar { display: none; }

#ord3-cards {
  padding: 0 0 12px;
}

/* ── TOP BAR ── */
#ord3-topbar {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 8px 0 4px;
  background: var(--surface-2) !important;
  border-bottom: 2px solid rgba(120,75,40,0.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  flex-shrink: 0;
  gap: 4px;
}
#ord3-topbar .ord3-back {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: none; border: none;
  display: flex; align-items: center; justify-content: center;
  color: #1C0E06; cursor: pointer;
  transition: background 160ms;
  flex-shrink: 0;
}
#ord3-topbar .ord3-back:hover { background: rgba(255, 77, 0, 0.08); }
#ord3-topbar .ord3-back svg { width: 22px; height: 22px; fill: currentColor; }

#ord3-title {
  flex: 1;
  font-family: 'DM Sans', 'Google Sans', Roboto, sans-serif !important;
  font-size: 22px;
  font-weight: 700;
  color: #1C0E06;
  letter-spacing: -0.4px;
  padding-left: 4px;
}

#ord3-refresh-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: none; border: none;
  display: flex; align-items: center; justify-content: center;
  color: #111111; cursor: default;
  transition: all 160ms;
}
#ord3-refresh-btn:hover { background: rgba(255, 77, 0, 0.08); color: var(--md-primary); }
#ord3-refresh-btn svg { width: 18px; height: 18px; fill: currentColor; }
#ord3-refresh-btn.spinning svg { animation: ord3spin 0.7s linear infinite; }

.ord3-top-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: none; border: none;
  display: flex; align-items: center; justify-content: center;
  color: #1C0E06; cursor: pointer;
  transition: background 160ms;
  flex-shrink: 0;
}
.ord3-top-btn:hover { background: rgba(255, 77, 0, 0.08); }
.ord3-top-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Canonical WhatsApp support button — matches orders page 100%. Global so top-sellers/detail/popular are identical and survive reload/deployment. */
.ord3-support-btn { color: #168c4a !important; }
.ord3-support-btn:hover { color: #0d6f39 !important; }
#sc-orders .ord3-support-btn { color: #168c4a !important; }
#sc-orders .ord3-support-btn:hover { color: #0d6f39 !important; }

/* Ensure WhatsApp matches orders page — 44×44 button with 24×24 icon (orders actual computed size via scrollbar-hide.css:1776 + 2432). Was 40×40/20, user requested a little bigger to match orders. */
#screen-detail .ord3-top-btn.ord3-support-btn,
#screen-top-sellers .ord3-top-btn.ord3-support-btn,
#screen-popular .ord3-top-btn.ord3-support-btn,
#screen-detail .ord-topbar-btn.ord3-support-btn,
#screen-top-sellers .ord-topbar-btn.ord3-support-btn,
#screen-popular .ord-topbar-btn.ord3-support-btn {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  border-radius: 50% !important;
  background: none !important;
  border: none !important;
  flex: 0 0 48px !important;
}
#screen-detail .ord3-support-btn svg,
#screen-top-sellers .ord3-support-btn svg,
#screen-popular .ord3-support-btn svg,
#screen-detail .ord3-top-btn.ord3-support-btn svg,
#screen-top-sellers .ord3-top-btn.ord3-support-btn svg,
#screen-popular .ord3-top-btn.ord3-support-btn svg {
  width: 24px !important;
  height: 24px !important;
}

/* Top Seller header — pin WhatsApp to right corner (user requested). Mirrors orders/detail layout. */
#screen-top-sellers > .top-app-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  position: relative !important;
  gap: 8px !important;
}
#screen-top-sellers > .top-app-bar > .ord3-top-btn.ord3-support-btn,
#screen-top-sellers > .top-app-bar > .ord3-support-btn {
  margin-left: auto !important;
  position: relative !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  flex: 0 0 44px !important;
}

@keyframes ord3spin { to { transform: rotate(360deg); } }

/* ── FILTER TABS ── */
#ord3-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 16px 8px;
  overflow-x: auto;
  flex-shrink: 0;
  background: var(--surface-2);
  border-bottom: 2px solid rgba(120,75,40,0.2);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
#ord3-tabs::-webkit-scrollbar { display: none; }

.ord3-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1.5px solid rgba(120,75,40,0.18);
  background: rgba(255,255,255,0.9);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #111111;
  cursor: pointer;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
}
.ord3-tab:hover {
  background: rgba(255, 77, 0, 0.08);
  border-color: rgba(255, 77, 0, 0.24);
}
.ord3-tab:active { transform: scale(0.96); }
.ord3-tab.active {
  background: var(--md-primary);
  color: #fff;
  border-color: var(--md-primary);
  box-shadow: 0 8px 22px rgba(255, 77, 0, 0.22);
  transform: translateY(-1px);
  z-index: 1;
}

/* ── LOADING ── */
#ord3-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 16px;
}
.ord3-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255, 77, 0, 0.15);
  border-top-color: var(--md-primary);
  border-radius: 50%;
  animation: ord3spin 0.7s linear infinite;
}
.ord3-spinner-small {
  width: 16px;
  height: 16px;
  border-width: 2px;
}
.ord3-loading-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #111111;
}

/* ── EMPTY STATE ── */
#ord3-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  text-align: center;
  gap: 12px;
}
.ord3-empty-icon {
  width: 72px; height: 72px;
  border-radius: 22px;
  background: rgba(255, 77, 0, 0.08);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.ord3-empty-icon svg { width: 34px; height: 34px; fill: var(--md-primary); opacity: 0.7; }
.ord3-empty-title {
  font-family: 'Google Sans Display', sans-serif;
  font-size: 20px; font-weight: 700;
  color: #1C0E06; letter-spacing: -0.3px;
}
.ord3-empty-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; color: #111111;
  line-height: 1.55; max-width: 240px;
}
.ord3-empty-cta {
  margin-top: 8px;
  padding: 13px 28px;
  background: var(--md-primary);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: all 160ms;
  box-shadow: 0 4px 16px rgba(255, 77, 0, 0.28);
}
.ord3-empty-cta:active { transform: scale(0.97); }

/* ── ERROR STATE ── */
#ord3-error {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px;
  text-align: center;
  gap: 10px;
}
.ord3-error-icon {
  width: 60px; height: 60px;
  border-radius: 18px;
  background: rgba(197,25,45,0.08);
  display: flex; align-items: center; justify-content: center;
}
.ord3-error-icon svg { width: 28px; height: 28px; fill: #C5192D; }
.ord3-error-title { font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 700; color: #111111; }
.ord3-error-sub { font-family: 'DM Sans', sans-serif; font-size: 13px; color: #111111; }
.ord3-retry {
  margin-top: 6px; padding: 10px 24px;
  background: none; border: 1.5px solid var(--md-primary);
  border-radius: 100px; color: var(--md-primary);
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 160ms;
}
.ord3-retry:hover { background: rgba(255, 77, 0, 0.06); }

/* ── SECTION LABEL ── */
.ord3-section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 700;
  color: #111111; letter-spacing: 1px;
  text-transform: uppercase;
  padding: 18px 20px 8px;
}

/* ── ORDER CARD ── */
.ord3-card {
  margin: 0 0 12px;
  background: var(--md-surface-4);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  border: 1px solid rgba(120,75,40,0.18);
  border-left: 4px solid var(--md-primary);
  cursor: pointer;
  transition: box-shadow 220ms, transform 220ms;
  animation: ord3cardIn 0.28s cubic-bezier(.4,0,.2,1) both;
}
#sc-orders .ord3-card,
#sc-orders .rct-wrap {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-radius: 20px !important;
}
.ord3-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); transform: translateY(-2px); }
.ord3-card:active { transform: scale(0.985); transition-duration: 80ms; }

@keyframes ord3cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card header */
.ord3-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 16px 12px;
  gap: 12px;
}
.ord3-card-id {
  font-family: 'Google Sans Display', sans-serif;
  font-size: 15px; font-weight: 700;
  color: #111111; letter-spacing: -0.2px;
}
  .ord3-card-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; color: #111111;
  margin-top: 3px; font-weight: 400;
}

/* Progress stepper */
.ord3-stepper {
  display: flex;
  align-items: center;
  padding: 4px 16px 14px;
  gap: 0;
}
.ord3-step {
  display: flex; flex-direction: column;
  align-items: center; gap: 5px;
  flex: 1;
  position: relative;
}
.ord3-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 13px;
  left: calc(50% + 13px);
  right: calc(-50% + 13px);
  height: 2px;
  background: #E8D8CE;
  border-radius: 1px;
  z-index: 0;
}
.ord3-step.done:not(:last-child)::after { background: var(--md-primary); }
.ord3-step-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  transition: all 250ms;
}
.ord3-step.done .ord3-step-dot {
  background: var(--md-primary);
}
.ord3-step.done .ord3-step-dot svg { fill: #fff; }
.ord3-step.active .ord3-step-dot {
  background: var(--surface-2);
  border: 2.5px solid var(--md-primary);
  box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.04);
}
.ord3-step.active .ord3-step-dot svg { fill: var(--md-primary); }
.ord3-step-dot svg { width: 12px; height: 12px; fill: #A08E88; }
.ord3-step-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px; font-weight: 700;
  color: #A08E88; text-align: center;
  letter-spacing: 0.2px;
  line-height: 1.2;
}
.ord3-step.done .ord3-step-label,
.ord3-step.active .ord3-step-label { color: #111111; }

/* Divider */
.ord3-divider { height: 2px; background: rgba(17,17,17,0.22); margin: 8px 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }

/* Card info grid */
.ord3-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 16px 16px;
  border-top: 1px solid rgba(120,75,40,0.2);
  border-bottom: 1px solid rgba(120,75,40,0.2);
  background: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.ord3-info-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-right: 12px; border-right: 1px solid rgba(120,75,40,0.18); }
.ord3-info-cell:nth-child(2n) { border-right: none; padding-right: 0; }
.ord3-info-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px; font-weight: 700;
  color: #111111; text-transform: uppercase;
  letter-spacing: 0.6px;
}
.ord3-info-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 500;
  color: #111111; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ord3-info-value.price { font-size: 15px; font-weight: 700; letter-spacing: 0.1px; }
.ord3-info-value.price .ipoo-kes { color: var(--md-primary); font-size: 14px; }
.ord3-info-value.price .ipoo-amt { color: #000000; font-size: 16px; font-weight: 900; }
.ord3-info-value.price .ipoo-price-kes { color: var(--md-primary) !important; font-size: 11px !important; font-weight: 500 !important; }
.ord3-info-value.price .ipoo-price-amt { color: #000000 !important; font-size: 22px !important; font-weight: 800 !important; }
.ord3-info-value.ord-location-value {
  font-family: 'DM Sans','Google Sans',Roboto,sans-serif !important;
  font-size: 14px;
  font-weight: 700;
  color: #111111;
  line-height: 1.4;
  letter-spacing: normal;
  font-style: normal;
}
.ord3-card-status-summary {
  margin-top: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #1C0E06;
}
.ord3-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 14px;
}
.ord3-card-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(120,75,40,0.1);
  color: #111111;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
}
/* Items preview */
.ord3-items-preview {
  padding: 0 16px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; color: #111111;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer row */
.ord3-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 16px 18px;
  background: inherit;
  border-top: 1px solid rgba(120,75,40,0.12);
}
.ord3-btn {
  flex: 1 1 130px;
  min-width: 120px;
  height: 44px;
  border-radius: 16px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 180ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
}
.ord3-btn svg { width: 16px; height: 16px; fill: currentColor; }
.ord3-btn-ghost,
.ord3-btn-contact {
  background: transparent;
  color: #1C0E06;
  border: 1.5px solid rgba(120,75,40,0.18);
}
.ord3-btn-contact { background: transparent; }
.ord3-btn-ghost:active,
.ord3-btn-contact:active { background: rgba(120,75,40,0.06); }
.ord3-btn-receipt {
  background: #fff;
  color: #1C0E06;
  border: 1.5px solid rgba(120,75,40,0.18);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.ord3-btn-receipt:active { transform: scale(0.98); box-shadow: none; }
.ord3-btn-reorder {
  background: var(--md-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 77, 0, 0.24);
}
.ord3-btn-reorder:active { transform: scale(0.96); box-shadow: none; }

/* ── PULL-TO-REFRESH INDICATOR ── */
#ord3-ptr {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0;
  overflow: hidden;
  transition: height 200ms;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; color: #A08E88;
  gap: 8px;
}
#ord3-ptr.visible { height: 44px; }

/* ── ORDERS SCREEN V4 STYLES ── */
#sc-orders .ord-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: transparent;
  border-bottom: 1px solid var(--md-outline-variant);
  flex-shrink: 0;
}

#sc-orders .ord-topbar-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--md-on-surface);
  letter-spacing: -0.2px;
}

#sc-orders .ord-topbar-left,
#sc-orders .ord-topbar-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

#sc-orders .ord-topbar-btn {
  background: transparent !important;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #000000 !important;
  padding: 8px !important;
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  transition: all 0.2s ease;
}

#sc-orders .ord-topbar-btn:hover {
  background: rgba(248, 80, 10, 0.1) !important;
  color: var(--md-primary) !important;
}

#sc-orders .ord-topbar-btn:active {
  background: rgba(248, 80, 10, 0.15) !important;
}

#sc-orders .ord-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--md-surface);
  border-bottom: 1px solid var(--md-outline-variant);
  overflow-x: auto;
  flex-shrink: 0;
}

#sc-orders .ord-tabs::-webkit-scrollbar {
  height: 4px;
}

#sc-orders .ord-tabs::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

#sc-orders .ord-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 77, 0, 0.4);
  border-radius: 2px;
}

#sc-orders .ord-tab {
  padding: 8px 16px;
  border: none;
  background: var(--md-surface-2);
  color: #000;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-transform: capitalize;
}

#sc-orders .ord-tab:hover {
  color: #000;
  background: var(--md-surface-3);
}

#sc-orders .ord-tab.active {
  color: #fff;
  background: var(--md-primary);
  border-bottom: 2px solid var(--md-primary);
}

#sc-orders .ord-filters {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--md-surface);
  border-bottom: 1px solid var(--md-outline-variant);
  overflow-x: auto;
  flex-shrink: 0;
}

#sc-orders .ord-filters::-webkit-scrollbar {
  height: 4px;
}

#sc-orders .ord-filters::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

#sc-orders .ord-filters::-webkit-scrollbar-thumb {
  background: rgba(255, 77, 0, 0.4);
}

#sc-orders .ord-filter-chip {
  padding: 6px 12px;
  border: 1px solid #2E2E2E;
  background: transparent;
  color: #888;
  border-radius: 16px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-transform: capitalize;
}

#sc-orders .ord-filter-chip:hover {
  border-color: var(--md-primary);
  color: var(--md-primary);
  background: rgba(255, 77, 0, 0.08);
}

#sc-orders .ord-filter-chip.active {
  background: var(--md-primary);
  color: #000000;
  border-color: var(--md-primary);
}

#sc-orders .ord-panels {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#sc-orders .ord-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
}

#sc-orders .ord-panel::-webkit-scrollbar {
  width: 6px;
}

#sc-orders .ord-panel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

#sc-orders .ord-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 77, 0, 0.3);
  border-radius: 3px;
}

#sc-orders .ord-panel.active {
  display: flex;
  flex-direction: column;
}

.ord-card {
  background: #F3EEF6;
  border: 1px solid #E8E3EB;
  border-radius: 12px;
  margin: 0 16px 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.ord-card.pending { border-left: 4px solid #F59E0B; }
.ord-card.processing { border-left: 4px solid #3B82F6; }
.ord-card.delivered { border-left: 4px solid #22C55E; }
.ord-card.cancelled { border-left: 4px solid #EF4444; }

.ord-card:hover {
  background: #EDE9F0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ord-card:active {
  background: #F3EEF6;
  transform: scale(0.98);
}

.ord-card-content {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ord-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.ord-card-id {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #1C1B1F;
  letter-spacing: 0.5px;
}

.ord-card-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #79747E;
  margin-top: 4px;
}

.ord-card-status {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 16px;
  text-transform: capitalize;
  white-space: nowrap;
}

.ord-card-status.pending {
  background: #FFF3E0;
  color: #E65100;
}

.ord-card-status.processing {
  background: #E3F2FD;
  color: #1565C0;
}

.ord-card-status.delivered {
  background: #E8F5E9;
  color: #2E7D32;
}

.ord-card-status.cancelled {
  background: #FFEBEE;
  color: #C62828;
}

.ord-card-items {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #79747E;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ord-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #E8E3EB;
  padding-top: 12px;
  margin-top: 8px;
}

.ord-card-total {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--md-primary);
}

.ord-card-pts {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: #888;
}

.ord-section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 16px 8px;
  margin-top: 8px;
}

.ord-section-label:first-child {
  margin-top: 0;
}

.ord-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  text-align: center;
}

.ord-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(255, 77, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.ord-empty-icon svg {
  width: 34px;
  height: 34px;
  fill: var(--md-primary);
  opacity: 0.7;
}

.ord-empty-text {
  font-size: 18px;
  font-weight: 600;
  color: #111111;
  margin-bottom: 8px;
}

.ord-empty-subtitle {
  font-size: 14px;
  color: #111111;
  line-height: 1.5;
  max-width: 280px;
}

.ord-empty-cta {
  margin-top: 20px;
}

/* ── ORDERS SCREEN TASTE PASS ── */
#sc-orders {
  --ord-ink: var(--md-on-surface);
  --ord-muted: var(--md-on-surface-var);
  --ord-paper: var(--md-surface-1);
  --ord-paper-deep: var(--md-surface-1);
  --ord-line: var(--border);
  --ord-accent: var(--md-primary);
  background: var(--md-surface-1) !important;
  border: 0;
  color: var(--ord-ink);
}

#sc-orders .ord-topbar {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) repeat(3, 40px);
  gap: 4px;
  min-height: 72px;
  padding: 12px 14px;
  background: var(--ord-paper);
  border-bottom: 1px solid var(--ord-line);
}

#sc-orders .ord-topbar-title {
  align-self: center;
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1;
  letter-spacing: -1px;
  color: var(--ord-ink);
}

#sc-orders .ord-topbar-btn {
  color: var(--ord-ink) !important;
  border-radius: 10px !important;
}

#sc-orders .ord-topbar-btn:hover,
#sc-orders .ord-topbar-btn:focus-visible {
  background: var(--ord-paper-deep) !important;
  color: var(--ord-accent) !important;
}

#sc-orders .ord-topbar-btn:focus-visible,
#sc-orders .ord-tab:focus-visible,
#sc-orders .ord-search:focus-visible,
#sc-orders .ord3-retry:focus-visible,
#sc-orders .ord3-empty-cta:focus-visible {
  outline: 3px solid rgba(255, 77, 0, 0.38);
  outline-offset: 2px;
}

#sc-orders .ord-tabs {
  gap: 8px;
  padding: 14px 16px 12px;
  background: var(--md-surface-1) !important;
  border-bottom: 0;
  box-shadow: none;
}

#sc-orders .ord-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--ord-line);
  border-radius: 10px;
  background: var(--md-surface-4) !important;
  color: var(--ord-muted);
  font-weight: 600;
}

#sc-orders .ord-tab:hover {
  color: var(--ord-ink);
  background: var(--ord-paper-deep);
}

#sc-orders .ord-tab.active {
  background: var(--ord-accent);
  border-color: var(--ord-accent);
  color: #fff;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--ord-accent) 22%, transparent);
}

#sc-orders .ord-search-wrap {
  padding: 2px 16px 16px;
  background: var(--md-surface-1) !important;
}

#sc-orders .ord-search {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--ord-line);
  border-radius: 12px;
  background: #fff;
  color: var(--ord-ink);
  font: 500 14px/1 'DM Sans', sans-serif;
  box-shadow: 0 4px 12px rgba(84, 48, 26, 0.05);
}

#sc-orders .ord-search::placeholder {
  color: #9a8a82;
}

#sc-orders .ord-panels {
  overflow: hidden;
  background: var(--ord-paper-deep);
}

#sc-orders #ord3-body {
  padding: 0 0 48px;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: var(--md-surface-1) !important;
}

#sc-orders #ord3-cards {
  display: grid;
  gap: 16px;
  padding: 18px 16px 24px;
}

#sc-orders .ord3-card.ord-card {
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 auto !important;
  padding: 18px;
  border: 1px solid var(--ord-line);
  border-left: 4px solid var(--ord-accent);
  border-radius: 14px !important;
  background: var(--md-surface-4) !important;
  box-shadow: 0 8px 22px rgba(84, 48, 26, 0.06), 0 2px 0 var(--md-outline-var);
  color: var(--ord-ink);
}

#sc-orders .ord3-card.ord-card + .ord3-card.ord-card {
  position: relative;
}

#sc-orders .ord3-card.ord-card + .ord3-card.ord-card::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--md-outline-var);
}

#sc-orders .ord3-card.ord-card:hover {
  background: #fff;
  box-shadow: 0 12px 28px rgba(84, 48, 26, 0.1);
  transform: translateY(-2px);
}

#sc-orders .ord3-card.ord-card:focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ord-accent) 18%, transparent);
}

#sc-orders .ord-card-header {
  align-items: flex-start;
  padding: 0;
  gap: 16px;
}

#sc-orders .ord-card-id {
  display: block;
  color: var(--ord-ink);
  font: 700 15px/1.25 'DM Mono', monospace;
  letter-spacing: 0;
}

#sc-orders .ord-card-date {
  display: block;
  margin-top: 5px;
  color: var(--ord-muted);
  font: 500 12px/1.3 'DM Sans', sans-serif;
}

#sc-orders .ord-card-status {
  flex-shrink: 0;
  padding: 6px 9px;
  border-radius: 7px;
  background: var(--ord-paper-deep);
  color: var(--ord-accent);
  font: 700 11px/1 'DM Sans', sans-serif;
  letter-spacing: .3px;
}

#sc-orders .ord-card-items {
  margin-top: 18px;
  color: var(--ord-ink);
  font: 500 14px/1.5 'DM Sans', sans-serif;
}

#sc-orders .ord-card-footer {
  margin-top: 18px;
  padding: 14px 0 0;
  border-top: 1px solid var(--ord-line);
}

#sc-orders .ord-card-total {
  color: var(--ord-accent);
  font: 700 17px/1 'Space Grotesk', sans-serif;
  font-variant-numeric: tabular-nums;
}

#sc-orders .ord-card-pts {
  color: var(--ord-muted);
  font: 500 12px/1 'DM Sans', sans-serif;
}

#sc-orders .ord-empty {
  min-height: 280px;
  padding: 64px 24px;
  color: var(--ord-ink);
}

#sc-orders .ord-empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--ord-accent);
}

#sc-orders .ord-empty-icon svg {
  fill: #fff;
}

#sc-orders .ord-empty-text {
  color: var(--ord-ink);
  font: 700 21px/1.15 'Space Grotesk', sans-serif;
}

#sc-orders .ord-empty-subtitle {
  color: var(--ord-muted);
  max-width: 32rem;
}

#sc-orders .ord3-empty-cta {
  border-radius: 10px;
  background: var(--md-primary) !important;
  border-color: var(--md-primary) !important;
  color: var(--md-on-primary) !important;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--ord-accent) 22%, transparent);
}

@media (max-width: 520px) {
  #sc-orders .ord-topbar {
    grid-template-columns: 48px minmax(0, 1fr) repeat(3, 48px);
    padding-inline: 10px;
  }

  #sc-orders .ord-topbar-btn {
    width: 48px !important;
    height: 48px !important;
  }

  #sc-orders .ord3-card.ord-card {
    padding: 16px;
  }
}

/* The area around cards uses surface-1; only card interiors use surface-4. */
#sc-orders,
#sc-orders .ord-tabs,
#sc-orders .ord-panels,
 #sc-orders #ord3-body,
#sc-orders #ord3-cards,
#sc-orders #ord3-ptr,
#sc-orders #ord3-loading,
#sc-orders #ord3-error,
#sc-orders #ord3-empty {
  background: var(--md-surface-1) !important;
}

#sc-orders .ord-topbar {
  background: var(--md-surface-4) !important;
}

#sc-orders .ord-search-wrap {
  background: var(--md-surface-1) !important;
}

#sc-orders .ord-search {
  background: var(--md-surface-4) !important;
}

#sc-orders .ord3-card.ord-card {
  background: var(--md-surface-4) !important;
}

#sc-orders #ord3-tabs .ord3-tab.ord-tab.active,
#sc-orders #ord3-tabs .ord3-tab.active {
  background: var(--md-primary) !important;
  border-color: var(--md-primary) !important;
  color: var(--md-on-primary) !important;
  box-shadow: 0 6px 14px rgba(255, 77, 0, 0.24) !important;
}
