:root {
  --cb-order-navy: #001b3d;
  --cb-order-navy-light: #00345d;
  --cb-order-teal: #0b9098;
  --cb-order-teal-light: #10a7a5;
  --cb-order-text: #08254a;
  --cb-order-muted: #66758f;
  --cb-order-page: #f7f9fc;
  --cb-order-border: #dce4ee;
  --cb-order-shadow: 0 12px 28px rgba(8, 37, 74, .08);
}

.cb-orders-page,
.cb-order-detail-page {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  color: var(--cb-order-text);
  background: var(--cb-order-page);
  font-family: Inter, Arial, sans-serif;
}

.cb-orders-page *,
.cb-order-detail-page * {
  box-sizing: border-box;
}

.cb-orders-hero,
.cb-detail-hero {
  padding: 26px 22px 24px;
  border-radius: 0 0 30px 30px;
  background:
    radial-gradient(circle at 92% 8%, rgba(16, 167, 165, .35), transparent 34%),
    linear-gradient(145deg, var(--cb-order-navy), var(--cb-order-navy-light) 58%, #087c89);
}

.cb-orders-titlebar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  min-height: 44px;
}

.cb-orders-titlebar h1 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
}

.cb-back-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  -webkit-tap-highlight-color: transparent;
}

.cb-back-button img {
  width: 23px;
  height: 23px;
}

.cb-order-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.cb-order-metrics article {
  display: grid;
  min-width: 0;
  min-height: 112px;
  justify-items: center;
  align-content: center;
  gap: 4px;
  padding: 12px 7px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 20px rgba(0, 17, 43, .14);
  text-align: center;
}

.cb-order-metrics strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--cb-order-text);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.cb-order-metrics article > span:last-child {
  color: var(--cb-order-muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
}

.cb-metric-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
}

.cb-metric-icon img {
  width: 20px;
  height: 20px;
}

.cb-metric-pending { background: #fff2c9; }
.cb-metric-confirmed { background: #e7f7ef; }
.cb-metric-cashback { background: #dff6f6; }

.cb-orders-content,
.cb-detail-content {
  display: grid;
  gap: 18px;
  padding: 22px 18px 34px;
}

.cb-order-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 2px 1px 6px;
}

.cb-order-filters a {
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid var(--cb-order-border);
  border-radius: 999px;
  color: var(--cb-order-muted);
  background: #fff;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(8, 37, 74, .035);
}

.cb-order-filters a.is-active {
  border-color: var(--cb-order-teal);
  color: #fff;
  background: linear-gradient(135deg, var(--cb-order-teal), var(--cb-order-teal-light));
  box-shadow: 0 6px 15px rgba(11, 144, 152, .23);
}

.cb-order-list {
  display: grid;
  gap: 14px;
}

.cb-order-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 16px 16px 0;
  border: 1px solid var(--cb-order-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--cb-order-shadow);
}

.cb-order-card-top {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
  padding-bottom: 15px;
}

.cb-order-product-image {
  display: grid;
  width: 108px;
  height: 108px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #e1e7ef;
  border-radius: 16px;
  background: linear-gradient(145deg, #f4fbfb, #edf4f6);
}

.cb-order-product-image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cb-order-product-image > span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.cb-order-product-image > span img {
  width: 38px;
  height: 38px;
  opacity: .66;
}

.cb-order-product-copy {
  display: grid;
  min-width: 0;
  align-content: start;
  justify-items: start;
  gap: 7px;
  padding-top: 1px;
}

.cb-order-product-copy h2 {
  display: -webkit-box;
  max-height: 4.05em;
  overflow: hidden;
  margin: 0;
  color: var(--cb-order-text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.cb-order-product-copy p,
.cb-order-product-copy time {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--cb-order-muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.cb-order-product-copy p img,
.cb-order-product-copy time img {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.cb-order-product-copy p img {
  filter: sepia(1) saturate(7) hue-rotate(338deg) brightness(1.05);
}

.cb-order-user {
  display: grid;
  min-width: 0;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #e7ebf1;
}

.cb-order-user span {
  color: var(--cb-order-muted);
  font-size: 10px;
  font-weight: 650;
}

.cb-order-user strong {
  color: var(--cb-order-text);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.cb-order-values {
  display: grid;
  margin: 0;
  border-top: 1px solid #e7ebf1;
}

.cb-order-values > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 43px;
  padding: 9px 0;
  border-bottom: 1px solid #e7ebf1;
}

.cb-order-values dt {
  color: var(--cb-order-muted);
  font-size: 12px;
  line-height: 1.35;
}

.cb-order-values dd {
  min-width: 0;
  margin: 0;
  color: var(--cb-order-text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.cb-status {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
}

.cb-status-pending { color: #9a5a00; background: #fff2c9; }
.cb-status-confirmed { color: #177b60; background: #e7f7ef; }
.cb-status-cancelled { color: #d43e4f; background: #fceaec; }

.cb-cashback-value {
  color: var(--cb-order-teal) !important;
  font-size: 15px !important;
  font-weight: 850 !important;
}

.cb-order-code {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.cb-order-code span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cb-order-code button {
  position: relative;
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

.cb-order-code button:hover,
.cb-order-code button:focus-visible,
.cb-order-code button.is-copied {
  background: #e7f7f6;
}

.cb-order-code button img {
  width: 20px;
  height: 20px;
}

.cb-order-detail-link {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 0 12px;
  color: var(--cb-order-text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.cb-order-detail-link img {
  width: 17px;
  height: 17px;
}

.cb-orders-empty {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 40px 24px;
  border: 1px dashed #bfd0df;
  border-radius: 22px;
  background: #fff;
  text-align: center;
}

.cb-orders-empty > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background: #e6f5f5;
}

.cb-orders-empty img { width: 27px; height: 27px; }
.cb-orders-empty h2 { margin: 4px 0 0; font-size: 18px; }
.cb-orders-empty p { max-width: 320px; margin: 0; color: var(--cb-order-muted); font-size: 12px; line-height: 1.6; }
.cb-orders-empty a { margin-top: 5px; padding: 10px 17px; border-radius: 999px; color: #fff; background: var(--cb-order-teal); font-size: 12px; font-weight: 700; text-decoration: none; }

.cb-support-cta {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--cb-order-navy), #075b81 58%, var(--cb-order-teal));
  box-shadow: 0 12px 25px rgba(0, 27, 61, .18);
  text-decoration: none;
}

.cb-support-cta > span:first-child {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, .14);
}

.cb-support-cta > span:first-child img { width: 25px; height: 25px; }
.cb-support-cta > span:nth-child(2) { display: grid; gap: 3px; }
.cb-support-cta strong { font-size: 13px; }
.cb-support-cta small { color: rgba(255, 255, 255, .78); font-size: 10px; line-height: 1.4; }
.cb-support-cta > img { width: 19px; height: 19px; }

.cb-detail-hero {
  padding-bottom: 28px;
}

.cb-detail-summary {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 17, 43, .2);
}

.cb-detail-status-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--cb-order-border);
  color: var(--cb-order-muted);
  font-size: 10px;
  line-height: 1.4;
}

.cb-detail-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.cb-detail-summary dl > div {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-bottom: 1px solid var(--cb-order-border);
}

.cb-detail-summary dl > div:nth-child(odd) { border-right: 1px solid var(--cb-order-border); }
.cb-detail-summary dt { color: var(--cb-order-muted); font-size: 10px; }
.cb-detail-summary dd { margin: 0; color: var(--cb-order-text); font-size: 15px; font-weight: 750; overflow-wrap: anywhere; }
.cb-detail-summary .cb-detail-cashback { grid-column: 1 / -1; border-right: 0; background: linear-gradient(135deg, #e8f8f7, #f5fffe); }
.cb-detail-summary .cb-detail-cashback dd { color: var(--cb-order-teal); font-size: 25px; }

.cb-detail-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  padding: 13px 15px;
  color: #466179;
  background: #f8fbfc;
  font-size: 10px;
  line-height: 1.5;
}

.cb-detail-note img { flex: 0 0 18px; width: 18px; height: 18px; }

.cb-detail-section,
.cb-confirmation-card {
  padding: 18px;
  border: 1px solid var(--cb-order-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--cb-order-shadow);
}

.cb-detail-section > h2,
.cb-confirmation-card h2 {
  margin: 0 0 15px;
  color: var(--cb-order-text);
  font-size: 16px;
  font-weight: 750;
}

.cb-detail-products {
  display: grid;
  gap: 14px;
}

.cb-detail-product {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: start;
}

.cb-detail-product + .cb-detail-product {
  padding-top: 14px;
  border-top: 1px solid #e7ebf1;
}

.cb-detail-product .cb-order-product-image { width: 76px; height: 76px; border-radius: 15px; }
.cb-detail-product > div:nth-child(2) { display: grid; min-width: 0; gap: 5px; }
.cb-detail-product h3 { display: -webkit-box; overflow: hidden; margin: 0; font-size: 12px; font-weight: 750; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cb-detail-product p { display: flex; gap: 5px; align-items: center; margin: 0; color: var(--cb-order-muted); font-size: 9px; }
.cb-detail-product p img { width: 15px; height: 15px; }
.cb-detail-product span { color: var(--cb-order-muted); font-size: 10px; }
.cb-detail-product > strong { font-size: 12px; white-space: nowrap; }
.cb-detail-empty { margin: 0; color: var(--cb-order-muted); font-size: 12px; }

.cb-order-timeline {
  display: grid;
  gap: 0;
}

.cb-order-timeline > div {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  min-height: 65px;
}

.cb-order-timeline > div:not(:last-child)::after {
  position: absolute;
  top: 37px;
  bottom: 2px;
  left: 18px;
  width: 2px;
  background: #d7e1ea;
  content: "";
}

.cb-order-timeline > div > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: #e8f5f5;
}

.cb-order-timeline > div > span img { width: 22px; height: 22px; }
.cb-order-timeline > div > div { display: grid; align-content: start; gap: 4px; padding-top: 2px; }
.cb-order-timeline strong { font-size: 12px; }
.cb-order-timeline small { color: var(--cb-order-muted); font-size: 10px; line-height: 1.5; }

.cb-confirmation-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 13px;
  background: linear-gradient(145deg, #fff, #f0fbfa);
}

.cb-confirmation-card > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: #dff6f6;
}

.cb-confirmation-card > span img { width: 27px; height: 27px; }
.cb-confirmation-card h2 { margin-bottom: 7px; }
.cb-confirmation-card p { margin: 0; color: var(--cb-order-muted); font-size: 11px; line-height: 1.6; }

@media (max-width: 767px) {
  body.orders-mobile-shell {
    padding-bottom: 0;
    background: var(--cb-order-page);
  }

  .orders-mobile-shell .site-header,
  .orders-mobile-shell .mobile-bottom-navigation,
  .orders-mobile-shell .site-footer {
    display: none !important;
  }

  .orders-mobile-shell > main {
    min-height: 100vh;
    padding: 0;
  }

  .cb-orders-hero,
  .cb-detail-hero {
    padding-top: max(22px, env(safe-area-inset-top));
  }
}

@media (max-width: 359px) {
  .cb-orders-hero,
  .cb-detail-hero { padding-right: 14px; padding-left: 14px; }
  .cb-orders-content,
  .cb-detail-content { padding-right: 12px; padding-left: 12px; }
  .cb-order-card { padding-right: 13px; padding-left: 13px; }
  .cb-order-card-top { grid-template-columns: 82px minmax(0, 1fr); gap: 11px; }
  .cb-order-product-image { width: 82px; height: 82px; }
  .cb-order-product-copy h2 { font-size: 13px; }
  .cb-order-product-copy p,
  .cb-order-product-copy time { font-size: 10px; }
  .cb-order-values > div { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .cb-order-values dt { font-size: 11px; }
  .cb-order-values dd { font-size: 12px; }
  .cb-order-filters {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .cb-order-filters::-webkit-scrollbar { display: none; }
  .cb-order-filters a { flex: 0 0 auto; padding-right: 13px; padding-left: 13px; }
  .cb-order-metrics { gap: 6px; }
  .cb-order-metrics article { min-height: 105px; padding-right: 4px; padding-left: 4px; }
  .cb-order-metrics strong { font-size: 16px; }
  .cb-detail-product { grid-template-columns: 68px minmax(0, 1fr); }
  .cb-detail-product .cb-order-product-image { width: 68px; height: 68px; }
  .cb-detail-product > strong { grid-column: 2; }
}

@media (min-width: 768px) {
  .cb-orders-page,
  .cb-order-detail-page {
    margin-top: 28px;
    margin-bottom: 34px;
    overflow: hidden;
    border: 1px solid var(--cb-order-border);
    border-radius: 30px;
    box-shadow: 0 18px 45px rgba(8, 37, 74, .1);
  }
}
