/* Orders page polish.
 * Scoped under body.page-orders to keep the rest of mobile web intact.
 */

body.page-orders {
  --orders-ink: #201737;
  --orders-muted: #685e82;
  --orders-muted-soft: #9086ab;
  --orders-primary: #5b34b1;
  --orders-primary-strong: #43207f;
  --orders-primary-soft: rgba(91, 52, 177, 0.12);
  --orders-accent: #0f8ea2;
  --orders-accent-soft: rgba(15, 142, 162, 0.14);
  --orders-warm: #d38b28;
  --orders-surface: rgba(255, 255, 255, 0.88);
  --orders-surface-strong: rgba(255, 255, 255, 0.96);
  --orders-border: rgba(74, 44, 135, 0.12);
  --orders-border-strong: rgba(74, 44, 135, 0.2);
  --orders-shadow: 0 20px 50px rgba(34, 17, 71, 0.1);
  --orders-shadow-soft: 0 12px 30px rgba(34, 17, 71, 0.08);
  background:
    radial-gradient(circle at 10% 10%, rgba(15, 142, 162, 0.11), transparent 24%),
    radial-gradient(circle at 90% 6%, rgba(91, 52, 177, 0.17), transparent 28%),
    linear-gradient(180deg, #f7f3fd 0%, #fbf9ff 34%, #f4f7fb 100%);
}

body.page-orders #bottom-nav {
  display: flex !important;
}

body.page-orders .page-content {
  min-height: 100vh;
  padding-top: 14px;
}

body.page-orders .orders-page-layout {
  width: min(1320px, calc(100% - 28px));
  margin-inline: auto;
  padding-bottom: 8px;
}

body.page-orders .orders-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 0 18px;
}

body.page-orders .orders-topbar-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

body.page-orders .mw-page-menu-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid rgba(91, 52, 177, 0.14);
  border-radius: 16px;
  color: var(--orders-primary);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(91, 52, 177, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

body.page-orders .mw-page-menu-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 52, 177, 0.22);
  box-shadow: 0 16px 28px rgba(91, 52, 177, 0.12);
}

body.page-orders .orders-topbar-copy {
  min-width: 0;
}

body.page-orders .orders-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  margin-bottom: 8px;
  border-radius: 999px;
  color: var(--orders-primary-strong);
  background: rgba(91, 52, 177, 0.09);
  border: 1px solid rgba(91, 52, 177, 0.12);
  font-size: 11px;
  font-weight: 900;
}

body.page-orders .mw-page-title {
  margin: 0;
  color: var(--orders-ink);
  font-family: 'Cairo', sans-serif;
  font-size: clamp(1.55rem, 1.4rem + 0.8vw, 2.15rem);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.03em;
}

body.page-orders .orders-topbar-copy p {
  margin: 6px 0 0;
  color: var(--orders-muted);
  font-size: 13px;
  line-height: 1.75;
  font-weight: 700;
}

body.page-orders .orders-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.page-orders .orders-action-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--orders-primary) 0%, var(--orders-primary-strong) 100%);
  box-shadow: 0 14px 24px rgba(67, 32, 127, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

body.page-orders .orders-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(67, 32, 127, 0.22);
}

body.page-orders .orders-action-btn-light {
  color: var(--orders-primary-strong);
  border: 1px solid var(--orders-border);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: none;
}

body.page-orders .orders-action-btn-light:hover {
  box-shadow: 0 12px 22px rgba(67, 32, 127, 0.08);
}

body.page-orders .orders-hero-panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 26px;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background:
    radial-gradient(circle at 86% 18%, rgba(79, 232, 214, 0.22), transparent 20%),
    radial-gradient(circle at 10% 84%, rgba(255, 255, 255, 0.1), transparent 18%),
    linear-gradient(135deg, #1c1238 0%, #4a2992 52%, #137b97 100%);
  box-shadow: 0 28px 70px rgba(27, 17, 54, 0.22);
}

body.page-orders .orders-hero-panel::before,
body.page-orders .orders-hero-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

body.page-orders .orders-hero-panel::before {
  width: 260px;
  height: 260px;
  inset: auto -70px -90px auto;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
}

body.page-orders .orders-hero-panel::after {
  width: 220px;
  height: 220px;
  inset: -80px auto auto -60px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 72%);
}

body.page-orders .orders-hero-shell,
body.page-orders .orders-hero-insight {
  position: relative;
  z-index: 1;
}

body.page-orders .orders-hero-shell {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(0, 1.25fr);
  gap: 22px;
  align-items: center;
}

body.page-orders .orders-hero-copy {
  display: grid;
  gap: 14px;
}

body.page-orders .orders-hero-kicker {
  display: inline-flex;
  align-items: center;
  max-width: max-content;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.94);
  font-size: 11px;
  font-weight: 900;
}

body.page-orders .orders-hero-copy h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.8rem, 1.35rem + 1.4vw, 3.05rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.05em;
}

body.page-orders .orders-hero-copy p {
  max-width: 62ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.95;
  font-weight: 700;
}

body.page-orders .orders-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.page-orders .orders-hero-pill {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.94);
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 850;
}

body.page-orders .orders-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.page-orders .orders-hero-stat {
  min-height: 116px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(16px);
  display: grid;
  align-content: start;
  gap: 10px;
  box-shadow: 0 18px 34px rgba(19, 10, 46, 0.12);
}

body.page-orders .orders-hero-value {
  display: block;
  color: #fff;
  font-size: clamp(1.8rem, 1.4rem + 1vw, 2.4rem);
  line-height: 1;
  font-weight: 950;
}

body.page-orders .orders-hero-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

body.page-orders .orders-hero-insight {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

body.page-orders .orders-hero-insight-copy {
  display: grid;
  gap: 6px;
}

body.page-orders .orders-hero-insight-copy strong {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

body.page-orders .orders-hero-note {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.8;
  font-weight: 700;
}

body.page-orders .orders-last-sync {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

body.page-orders .orders-mobile-sheet {
  padding: 18px;
  border-radius: 30px;
  border: 1px solid var(--orders-border);
  background: var(--orders-surface);
  box-shadow: var(--orders-shadow);
  backdrop-filter: blur(18px);
}

body.page-orders .orders-filter-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

body.page-orders .orders-filter-head-copy {
  display: grid;
  gap: 6px;
}

body.page-orders .orders-filter-head h3 {
  margin: 0;
  color: var(--orders-ink);
  font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.55rem);
  line-height: 1.15;
  font-weight: 950;
}

body.page-orders .orders-filter-head p {
  margin: 0;
  color: var(--orders-muted);
  font-size: 12px;
  line-height: 1.8;
  font-weight: 700;
}

body.page-orders .orders-filter-head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.page-orders .orders-results-count {
  min-width: 44px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(91, 52, 177, 0.16);
  background: rgba(91, 52, 177, 0.08);
  color: var(--orders-primary-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 950;
}

body.page-orders .orders-sort-wrap {
  min-height: 44px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--orders-border);
  background: rgba(255, 255, 255, 0.76);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

body.page-orders .orders-sort-label {
  color: var(--orders-muted);
  font-size: 12px;
  font-weight: 850;
  padding-inline-start: 8px;
  white-space: nowrap;
}

body.page-orders .orders-sort-select {
  min-width: 148px;
  height: 32px;
  border: 0;
  outline: 0;
  border-radius: 12px;
  color: var(--orders-ink);
  background: #f4effd;
  font-size: 12px;
  font-weight: 900;
  padding: 0 12px;
}

body.page-orders .orders-search-wrap {
  position: relative;
  margin-bottom: 14px;
}

body.page-orders .orders-search-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.78;
}

body.page-orders .orders-search-input {
  width: 100%;
  min-height: 54px;
  padding: 0 46px 0 46px;
  border-radius: 18px;
  border: 1px solid rgba(91, 52, 177, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: var(--orders-ink);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(67, 32, 127, 0.05);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

body.page-orders .orders-search-input::placeholder {
  color: var(--orders-muted-soft);
  font-weight: 700;
}

body.page-orders .orders-search-input:focus {
  outline: none;
  border-color: rgba(91, 52, 177, 0.34);
  box-shadow: 0 0 0 4px rgba(91, 52, 177, 0.12), 0 16px 26px rgba(67, 32, 127, 0.08);
}

body.page-orders .orders-search-clear {
  position: absolute;
  inset-inline-end: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(91, 52, 177, 0.14);
  background: rgba(91, 52, 177, 0.08);
  color: var(--orders-primary-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
}

body.page-orders .orders-filter-group {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
}

body.page-orders .orders-filter-label {
  color: var(--orders-muted);
  font-size: 11px;
  font-weight: 900;
  padding-inline: 2px;
}

body.page-orders .tabs-row#status-tabs,
body.page-orders .orders-type-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 6px;
  margin: 0 0 16px;
  scroll-snap-type: x proximity;
}

body.page-orders .orders-type-tabs {
  margin-bottom: 0;
}

body.page-orders .tabs-row#status-tabs::-webkit-scrollbar,
body.page-orders .orders-type-tabs::-webkit-scrollbar {
  display: none;
}

body.page-orders #status-tabs .tab-btn,
body.page-orders .orders-type-tabs .tab-btn {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(91, 52, 177, 0.12);
  background: rgba(255, 255, 255, 0.94);
  color: var(--orders-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}

body.page-orders #status-tabs .tab-btn:hover,
body.page-orders .orders-type-tabs .tab-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 52, 177, 0.24);
  box-shadow: 0 10px 18px rgba(67, 32, 127, 0.06);
}

body.page-orders #status-tabs .tab-btn.active,
body.page-orders .orders-type-tabs .tab-btn.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--orders-primary) 0%, #7b53d3 55%, var(--orders-accent) 100%);
  box-shadow: 0 16px 26px rgba(67, 32, 127, 0.18);
}

body.page-orders #status-tabs .orders-tab-count,
body.page-orders .orders-type-tabs .orders-tab-count {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(91, 52, 177, 0.1);
  color: var(--orders-primary-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 950;
}

body.page-orders #status-tabs .tab-btn.active .orders-tab-count,
body.page-orders .orders-type-tabs .tab-btn.active .orders-tab-count {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

@keyframes nw-orders-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body.page-orders #orders-list {
  display: grid;
  gap: 14px;
}

body.page-orders #orders-list > * {
  animation: nw-orders-rise .32s ease both;
}

body.page-orders #orders-list > *:nth-child(2) { animation-delay: .04s; }
body.page-orders #orders-list > *:nth-child(3) { animation-delay: .08s; }
body.page-orders #orders-list > *:nth-child(4) { animation-delay: .12s; }
body.page-orders #orders-list > *:nth-child(5) { animation-delay: .16s; }
body.page-orders #orders-list > *:nth-child(n + 6) { animation-delay: .2s; }

body.page-orders .orders-skeleton-card {
  height: 230px;
  border-radius: 24px;
}

body.page-orders .order-card {
  position: relative;
  overflow: hidden;
  display: block;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid rgba(44, 28, 84, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 244, 255, 0.92));
  box-shadow: 0 16px 34px rgba(34, 17, 71, 0.08);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

body.page-orders .order-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--order-accent, var(--orders-primary)), rgba(255, 255, 255, 0));
}

body.page-orders .order-card:hover {
  transform: translateY(-3px);
  border-color: rgba(91, 52, 177, 0.2);
  box-shadow: 0 22px 42px rgba(34, 17, 71, 0.12);
}

body.page-orders .order-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body.page-orders .order-date {
  color: var(--orders-muted);
  font-size: 12px;
  line-height: 1.7;
  font-weight: 800;
}

body.page-orders .status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

body.page-orders .order-card-chips {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-orders .order-type-chip,
body.page-orders .order-ref-chip,
body.page-orders .order-category-chip {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 850;
}

body.page-orders .order-category-chip {
  color: var(--orders-accent);
  background: rgba(15, 142, 162, 0.08);
  border: 1px solid rgba(15, 142, 162, 0.14);
}

body.page-orders .order-type-chip {
  color: var(--orders-muted);
  background: rgba(32, 23, 55, 0.05);
  border: 1px solid rgba(32, 23, 55, 0.08);
}

body.page-orders .order-type-chip.order-type-urgent {
  color: #a44919;
  background: rgba(211, 139, 40, 0.14);
  border-color: rgba(211, 139, 40, 0.22);
}

body.page-orders .order-type-chip.order-type-competitive {
  color: var(--orders-primary-strong);
  background: rgba(91, 52, 177, 0.1);
  border-color: rgba(91, 52, 177, 0.16);
}

body.page-orders .order-type-chip.order-type-normal {
  color: #0d6f7d;
  background: rgba(15, 142, 162, 0.1);
  border-color: rgba(15, 142, 162, 0.16);
}

body.page-orders .order-ref-chip {
  color: var(--orders-primary-strong);
  background: rgba(91, 52, 177, 0.08);
  border: 1px solid rgba(91, 52, 177, 0.14);
}

body.page-orders .order-title {
  margin-top: 14px;
  color: var(--orders-ink);
  font-size: 20px;
  line-height: 1.4;
  font-weight: 950;
}

body.page-orders .order-snippet {
  margin-top: 8px;
  color: var(--orders-muted);
  font-size: 13px;
  line-height: 1.9;
  font-weight: 700;
}

body.page-orders .order-meta-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.page-orders .order-meta-item {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(44, 28, 84, 0.08);
  background: linear-gradient(180deg, rgba(248, 244, 255, 0.86), rgba(255, 255, 255, 0.98));
}

body.page-orders .order-meta-label {
  display: block;
  margin-bottom: 5px;
  color: rgba(32, 23, 55, 0.54);
  font-size: 11px;
  font-weight: 800;
}

body.page-orders .order-meta-value {
  display: block;
  color: var(--orders-ink);
  font-size: 13px;
  line-height: 1.65;
  font-weight: 850;
  word-break: break-word;
}

body.page-orders .order-card-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(44, 28, 84, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

body.page-orders .order-footer-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body.page-orders .order-provider,
body.page-orders .order-timing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--orders-muted);
  font-size: 12px;
  line-height: 1.7;
  font-weight: 750;
}

body.page-orders .order-price {
  color: #217245;
  font-size: 14px;
  font-weight: 950;
}

body.page-orders .order-card-cta {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orders-primary), var(--orders-primary-strong));
  box-shadow: 0 12px 20px rgba(67, 32, 127, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body.page-orders #orders-empty {
  min-height: 320px;
  padding: 28px 18px;
  border: 1px dashed rgba(44, 28, 84, 0.16);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 243, 255, 0.88));
  display: grid;
  place-items: center;
  text-align: center;
}

body.page-orders #orders-empty svg {
  margin-inline: auto;
}

body.page-orders #orders-empty p {
  margin: 14px 0 0;
  color: var(--orders-ink);
  font-size: 18px;
  font-weight: 950;
}

body.page-orders #orders-empty small {
  display: block;
  max-width: 42ch;
  margin: 10px auto 0;
  color: var(--orders-muted);
  font-size: 13px;
  line-height: 1.9;
  font-weight: 700;
}

body.page-orders .orders-empty-cta {
  min-height: 46px;
  padding: 0 18px;
  margin-top: 16px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--orders-primary), var(--orders-primary-strong));
  box-shadow: 0 14px 24px rgba(67, 32, 127, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

body.page-orders .orders-search-input:focus-visible,
body.page-orders #status-tabs .tab-btn:focus-visible,
body.page-orders .orders-type-tabs .tab-btn:focus-visible,
body.page-orders .orders-search-clear:focus-visible,
body.page-orders .orders-action-btn:focus-visible,
body.page-orders .mw-page-menu-btn:focus-visible,
body.page-orders .order-card:focus-visible,
body.page-orders .orders-empty-cta:focus-visible {
  outline: 2px solid var(--orders-primary);
  outline-offset: 3px;
}

@media (min-width: 860px) {
  body.page-orders #orders-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1240px) {
  body.page-orders #orders-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  body.page-orders .orders-hero-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body.page-orders .orders-page-layout {
    width: min(100%, calc(100% - 24px));
  }

  body.page-orders .orders-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  body.page-orders .orders-topbar-actions {
    justify-content: stretch;
  }

  body.page-orders .orders-topbar-actions > * {
    flex: 1 1 0;
  }

  body.page-orders .orders-filter-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body.page-orders .orders-filter-head-tools {
    justify-content: space-between;
  }
}

@media (max-width: 720px) {
  body.page-orders .page-content {
    padding-top: 10px;
  }

  body.page-orders .orders-topbar-main {
    align-items: flex-start;
  }

  body.page-orders .mw-page-menu-btn {
    margin-top: 4px;
  }

  body.page-orders .orders-action-btn {
    width: 100%;
  }

  body.page-orders .orders-hero-panel,
  body.page-orders .orders-mobile-sheet {
    padding: 18px;
    border-radius: 26px;
  }

  body.page-orders .orders-hero-stats,
  body.page-orders .order-meta-grid {
    grid-template-columns: 1fr;
  }

  body.page-orders .orders-sort-wrap {
    width: 100%;
    justify-content: space-between;
  }

  body.page-orders .orders-sort-select {
    min-width: 0;
    width: 100%;
  }

  body.page-orders .order-card-footer {
    align-items: stretch;
  }

  body.page-orders .order-card-cta {
    width: 100%;
  }
}

@media (max-width: 560px) {
  body.page-orders .orders-page-layout {
    width: calc(100% - 18px);
  }

  body.page-orders .orders-topbar-actions {
    gap: 8px;
  }

  body.page-orders .orders-mobile-sheet,
  body.page-orders .orders-hero-panel {
    padding: 16px;
  }

  body.page-orders #status-tabs .tab-btn,
  body.page-orders .orders-type-tabs .tab-btn {
    min-height: 40px;
    padding: 0 12px;
  }

  body.page-orders .order-card {
    padding: 16px;
    border-radius: 22px;
  }

  body.page-orders .order-title {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-orders *,
  body.page-orders *::before,
  body.page-orders *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Orders desktop rebuild
 * One lightweight page header + one actual hero. No overlapping visual weight.
 */

body.page-orders .orders-page-layout {
  width: min(1160px, calc(100% - 32px));
}

body.page-orders .orders-topbar.ux26-page-header {
  padding: 0;
  margin: 8px 0 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.page-orders .orders-topbar-main {
  gap: 12px;
}

body.page-orders .orders-topbar-copy p {
  max-width: 42ch;
}

body.page-orders .orders-hero-panel {
  padding: 28px 30px !important;
  border-radius: 30px !important;
  border: 1px solid rgba(74, 44, 135, 0.1) !important;
  color: var(--orders-ink) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(249, 247, 252, 0.93)) !important,
    linear-gradient(90deg, rgba(15, 142, 162, 0.08), rgba(211, 139, 40, 0.05)) !important;
  box-shadow: 0 20px 48px rgba(34, 17, 71, 0.08) !important;
}

body.page-orders .orders-hero-panel::before {
  inset: 0 auto 0 0;
  width: 5px;
  height: auto;
  border-radius: 0;
  background: linear-gradient(180deg, var(--orders-accent), var(--orders-warm), var(--orders-primary));
}

body.page-orders .orders-hero-panel::after {
  display: none;
}

body.page-orders .orders-hero-shell {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

body.page-orders .orders-hero-main-column,
body.page-orders .orders-hero-side-column {
  display: grid;
  gap: 16px;
}

body.page-orders .orders-hero-copy {
  align-content: start;
  gap: 12px;
}

body.page-orders .orders-hero-kicker {
  border-color: rgba(15, 142, 162, 0.14);
  background: rgba(15, 142, 162, 0.08);
  color: #0f6669 !important;
}

body.page-orders .orders-hero-copy h2 {
  margin: 0;
  color: var(--orders-ink) !important;
  font-size: clamp(2.1rem, 1.65rem + 1vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

body.page-orders .orders-hero-copy p {
  color: var(--orders-muted) !important;
  max-width: 48ch;
  margin: 0;
}

body.page-orders .orders-hero-pill {
  border-color: rgba(74, 44, 135, 0.12);
  background: rgba(91, 52, 177, 0.06);
  color: var(--orders-primary-strong) !important;
}

body.page-orders .orders-hero-cta-row {
  justify-content: flex-start;
  align-items: center;
}

body.page-orders .orders-hero-cta-row > * {
  min-width: 150px;
}

body.page-orders .orders-hero-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.page-orders .orders-hero-stat {
  min-height: 120px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(74, 44, 135, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 252, 0.92));
  box-shadow: 0 12px 24px rgba(34, 17, 71, 0.06);
}

body.page-orders .orders-hero-value {
  color: var(--orders-ink) !important;
  font-size: clamp(1.9rem, 1.5rem + 0.7vw, 2.35rem);
}

body.page-orders .orders-hero-label {
  color: var(--orders-muted) !important;
}

body.page-orders .orders-hero-insight {
  margin-top: 0;
  min-height: 0;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(15, 142, 162, 0.12);
  background: linear-gradient(180deg, rgba(240, 252, 252, 0.92), rgba(249, 252, 255, 0.96));
}

body.page-orders .orders-hero-insight-copy strong {
  color: #0f6669 !important;
}

body.page-orders .orders-hero-note {
  color: var(--orders-ink) !important;
}

body.page-orders .orders-last-sync {
  color: var(--orders-primary-strong) !important;
  background: rgba(91, 52, 177, 0.08);
  border-color: rgba(91, 52, 177, 0.14);
}

body.page-orders .orders-mobile-sheet {
  padding: 22px;
  border-radius: 28px;
}

body.page-orders .orders-filter-head {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
}

body.page-orders #orders-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body.page-orders .order-card {
  min-height: 100%;
  padding: 20px;
  border-radius: 24px;
}

body.page-orders .order-title {
  font-size: 18px;
}

body.page-orders .order-meta-grid {
  grid-template-columns: 1fr;
}

body.page-orders .order-card-footer {
  align-items: flex-start;
}

@media (max-width: 1080px) {
  body.page-orders .orders-page-layout {
    width: min(100%, calc(100% - 24px));
  }

  body.page-orders .orders-hero-shell {
    grid-template-columns: 1fr;
  }

  body.page-orders .orders-hero-cta-row {
    justify-content: flex-start;
  }

  body.page-orders #orders-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.page-orders .orders-topbar.ux26-page-header,
  body.page-orders .orders-hero-panel,
  body.page-orders .orders-mobile-sheet {
    border-radius: 22px !important;
  }

  body.page-orders .orders-hero-panel {
    padding: 18px !important;
  }

  body.page-orders .orders-hero-cta-row > * {
    min-width: 0;
    width: 100%;
  }
}

/* Premium orders refresh - May 2026 */
body.page-orders {
  --orders-ink: #171426;
  --orders-muted: #5f6072;
  --orders-primary: #4f2f9f;
  --orders-primary-strong: #321b68;
  --orders-accent: #087f8c;
  --orders-gold: #b9812f;
  --orders-green: #1f8d5a;
  --orders-red: #b83a3a;
  --orders-card: rgba(255, 255, 255, 0.94);
  --orders-line: rgba(34, 24, 65, 0.1);
  --orders-shadow: 0 22px 50px rgba(24, 20, 38, 0.09);
  background: linear-gradient(180deg, #f8f8fb 0%, #f2f7f7 42%, #f7f5fb 100%) !important;
}

body.page-orders .mw-page-title,
body.page-orders .orders-hero-copy h2 {
  letter-spacing: 0 !important;
}

body.page-orders .orders-page-layout {
  width: min(1220px, calc(100% - 32px));
}

body.page-orders .orders-topbar.ux26-page-header {
  position: sticky;
  top: 10px;
  z-index: 20;
  padding: 12px 14px;
  border-radius: 22px;
  border: 1px solid rgba(34, 24, 65, 0.08);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 14px 34px rgba(24, 20, 38, 0.08);
}

body.page-orders .orders-eyebrow {
  min-height: 26px;
  color: var(--orders-accent);
  background: rgba(8, 127, 140, 0.08);
  border-color: rgba(8, 127, 140, 0.14);
}

body.page-orders .orders-topbar-copy p {
  color: var(--orders-muted);
}

body.page-orders .orders-hero-panel {
  overflow: hidden;
  padding: 30px !important;
  border-radius: 28px !important;
  border: 1px solid rgba(34, 24, 65, 0.09) !important;
  color: var(--orders-ink) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(247,250,250,0.95)) !important;
  box-shadow: 0 24px 56px rgba(24, 20, 38, 0.1) !important;
}

body.page-orders .orders-hero-panel::before {
  inset: 0 0 auto 0 !important;
  width: auto !important;
  height: 6px !important;
  border-radius: 0 !important;
  background: linear-gradient(90deg, var(--orders-primary), var(--orders-accent), var(--orders-gold)) !important;
}

body.page-orders .orders-hero-panel::after {
  display: none !important;
}

body.page-orders .orders-hero-shell {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 26px;
}

body.page-orders .orders-hero-kicker,
body.page-orders .orders-hero-pill,
body.page-orders .orders-last-sync {
  color: var(--orders-primary-strong) !important;
  background: rgba(79, 47, 159, 0.07);
  border-color: rgba(79, 47, 159, 0.12);
}

body.page-orders .orders-hero-copy h2 {
  color: var(--orders-ink) !important;
  font-size: clamp(2rem, 1.55rem + 1.2vw, 3rem);
  line-height: 1.1;
}

body.page-orders .orders-hero-copy p {
  color: var(--orders-muted) !important;
}

body.page-orders .orders-action-btn {
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orders-primary), var(--orders-primary-strong));
}

body.page-orders .orders-action-btn-light {
  color: var(--orders-primary-strong);
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(34, 24, 65, 0.1);
}

body.page-orders .orders-hero-stat {
  min-height: 118px;
  border-radius: 20px;
  border-color: rgba(34, 24, 65, 0.08);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 12px 26px rgba(24, 20, 38, 0.06);
}

body.page-orders .orders-hero-stat:nth-child(1) {
  border-color: rgba(8, 127, 140, 0.16);
}

body.page-orders .orders-hero-stat:nth-child(3),
body.page-orders .orders-hero-stat:nth-child(4) {
  border-color: rgba(185, 129, 47, 0.16);
}

body.page-orders .orders-hero-value {
  color: var(--orders-ink) !important;
}

body.page-orders .orders-hero-label,
body.page-orders .orders-hero-note {
  color: var(--orders-muted) !important;
}

body.page-orders .orders-hero-insight {
  border-color: rgba(8, 127, 140, 0.14);
  background: rgba(236, 249, 249, 0.68);
}

body.page-orders .orders-hero-insight-copy strong {
  color: var(--orders-accent) !important;
}

body.page-orders .orders-mobile-sheet {
  padding: 24px;
  border-radius: 28px;
  background: rgba(255,255,255,0.82);
  border-color: rgba(34, 24, 65, 0.08);
  box-shadow: var(--orders-shadow);
}

body.page-orders .orders-filter-head h3 {
  letter-spacing: 0;
}

body.page-orders .orders-results-count {
  color: var(--orders-accent);
  background: rgba(8, 127, 140, 0.08);
  border-color: rgba(8, 127, 140, 0.16);
}

body.page-orders .orders-sort-wrap,
body.page-orders .orders-search-input,
body.page-orders #status-tabs .tab-btn {
  background: rgba(255,255,255,0.95);
  border-color: rgba(34, 24, 65, 0.09);
}

body.page-orders .orders-search-input {
  min-height: 56px;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(24, 20, 38, 0.04);
}

body.page-orders #status-tabs .tab-btn {
  border-radius: 14px;
}

body.page-orders #status-tabs .tab-btn.active {
  background: linear-gradient(135deg, var(--orders-primary), var(--orders-accent));
}

body.page-orders #orders-list {
  gap: 18px;
}

body.page-orders .order-card {
  min-height: 100%;
  padding: 0;
  border-radius: 22px;
  border: 1px solid rgba(34, 24, 65, 0.09);
  background: var(--orders-card);
  box-shadow: 0 18px 38px rgba(24, 20, 38, 0.07);
}

body.page-orders .order-card::before {
  inset: 0 auto 0 0;
  width: 5px;
  height: auto;
  background: var(--order-accent, var(--orders-primary));
}

body.page-orders .order-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 47, 159, 0.18);
  box-shadow: 0 24px 50px rgba(24, 20, 38, 0.11);
}

body.page-orders .order-header,
body.page-orders .order-card-chips,
body.page-orders .order-title,
body.page-orders .order-snippet,
body.page-orders .order-meta-grid,
body.page-orders .order-progress-rail,
body.page-orders .order-next-action,
body.page-orders .order-card-footer {
  margin-inline: 20px;
}

body.page-orders .order-header {
  padding-top: 18px;
}

body.page-orders .order-header-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

body.page-orders .order-attention-pill {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #8a4a00;
  background: rgba(185, 129, 47, 0.13);
  border: 1px solid rgba(185, 129, 47, 0.22);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

body.page-orders .order-card-attention {
  border-color: rgba(185, 129, 47, 0.22);
}

body.page-orders .status-badge {
  min-height: 32px;
}

body.page-orders .order-title {
  font-size: 19px;
  line-height: 1.55;
}

body.page-orders .order-snippet {
  color: #656172;
}

body.page-orders .order-meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.page-orders .order-meta-item {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248,250,252,0.92), rgba(255,255,255,0.98));
}

body.page-orders .order-progress-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

body.page-orders .order-progress-cancelled {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.page-orders .order-progress-step {
  min-width: 0;
  display: grid;
  gap: 6px;
  justify-items: center;
  color: #9692a1;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

body.page-orders .order-progress-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #d9d7df;
  box-shadow: 0 0 0 4px rgba(217, 215, 223, 0.28);
}

body.page-orders .order-progress-step.is-active {
  color: var(--orders-ink);
}

body.page-orders .order-progress-step.is-active .order-progress-dot {
  background: var(--order-accent, var(--orders-primary));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--order-accent, var(--orders-primary)) 18%, transparent);
}

body.page-orders .order-next-action {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(8, 127, 140, 0.12);
  background: rgba(236, 249, 249, 0.58);
}

body.page-orders .order-next-action-label {
  display: block;
  margin-bottom: 4px;
  color: var(--orders-accent);
  font-size: 11px;
  font-weight: 950;
}

body.page-orders .order-next-action strong {
  display: block;
  color: var(--orders-ink);
  font-size: 13px;
  line-height: 1.75;
  font-weight: 850;
}

body.page-orders .order-card-footer {
  margin-top: 16px;
  margin-bottom: 0;
  padding: 16px 0 18px;
}

body.page-orders .order-card-cta {
  border-radius: 13px;
  background: linear-gradient(135deg, var(--orders-primary), var(--orders-primary-strong));
}

body.page-orders .order-card-new .order-card-cta,
body.page-orders .order-card-attention .order-card-cta {
  background: linear-gradient(135deg, var(--orders-gold), #9d6320);
}

body.page-orders .order-card-in_progress .order-card-cta {
  background: linear-gradient(135deg, var(--orders-accent), #075f68);
}

body.page-orders .order-card-completed .order-card-cta {
  background: linear-gradient(135deg, var(--orders-green), #156640);
}

body.page-orders .order-card-cancelled .order-card-cta {
  background: linear-gradient(135deg, var(--orders-red), #873030);
}

body.page-orders #orders-empty {
  background: rgba(255,255,255,0.82);
}

@media (min-width: 1180px) {
  body.page-orders #orders-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body.page-orders .orders-page-layout {
    width: min(100%, calc(100% - 20px));
  }

  body.page-orders .orders-topbar.ux26-page-header {
    position: static;
  }

  body.page-orders .orders-hero-shell,
  body.page-orders .orders-filter-head {
    grid-template-columns: 1fr;
  }

  body.page-orders .orders-hero-stats,
  body.page-orders .order-meta-grid {
    grid-template-columns: 1fr;
  }

  body.page-orders .order-progress-label {
    font-size: 10px;
  }
}

@media (max-width: 560px) {
  body.page-orders .orders-hero-panel,
  body.page-orders .orders-mobile-sheet {
    padding: 16px !important;
    border-radius: 20px !important;
  }

  body.page-orders .order-header,
  body.page-orders .order-card-chips,
  body.page-orders .order-title,
  body.page-orders .order-snippet,
  body.page-orders .order-meta-grid,
  body.page-orders .order-progress-rail,
  body.page-orders .order-next-action,
  body.page-orders .order-card-footer {
    margin-inline: 16px;
  }

  body.page-orders .order-card-footer {
    display: grid;
  }
}
