* {
  box-sizing: border-box;
}

body {
  margin: 0;

  min-height: 100vh;

  font-family: Inter, Arial, sans-serif;

  background: #f3f6fc;

  color: #172033;
}

/* =========================
   HEADER
========================= */

.header {
  background: #ffffff;

  border-bottom: 1px solid #e4e7ec;
}

.header-inner {
  width: min(1100px, calc(100% - 40px));

  margin: auto;

  min-height: 76px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;
}

.logo {
  color: #1761ed;

  font-size: 22px;

  font-weight: 800;

  text-decoration: none;

  letter-spacing: 0.5px;
}

.account-link-header {
  color: #1455c8;

  text-decoration: none;

  font-weight: 600;
}

.account-link-header:hover {
  text-decoration: underline;
}

/* =========================
   PAGE
========================= */

.page {
  padding: 50px 20px;
}

.orders-container {
  width: 100%;

  max-width: 900px;

  margin: auto;

  background: #ffffff;

  padding: 34px;

  border-radius: 20px;

  box-shadow: 0 12px 40px rgba(21, 40, 74, 0.08);
}

/* =========================
   HEADING
========================= */

.orders-heading {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  margin-bottom: 30px;
}

.orders-heading h1 {
  margin: 0 0 8px;

  color: #1761ed;

  font-size: 32px;
}

.orders-heading p {
  margin: 0;

  color: #667085;

  line-height: 1.5;
}

.back-button {
  padding: 11px 17px;

  border: 1px solid #d5dbea;

  border-radius: 9px;

  color: #1455c8;

  text-decoration: none;

  font-weight: 600;

  white-space: nowrap;
}

.back-button:hover {
  background: #f5f8ff;

  border-color: #1761ed;
}

/* =========================
   STATUS
========================= */

.status-box {
  padding: 30px;

  text-align: center;

  color: #667085;
}

.error-box {
  color: #b42318;

  background: #fef3f2;

  border: 1px solid #fecdca;

  border-radius: 10px;
}

/* =========================
   EMPTY ORDERS
========================= */

.empty-orders {
  padding: 70px 20px;

  text-align: center;

  border: 1px solid #e4e7ec;

  border-radius: 14px;

  background: #fbfcff;
}

.empty-icon {
  font-size: 45px;

  margin-bottom: 16px;
}

.empty-orders h2 {
  margin: 0 0 10px;

  font-size: 23px;
}

.empty-orders p {
  margin: 0 0 25px;

  color: #667085;
}

.primary-button {
  display: inline-block;

  padding: 13px 20px;

  background: #1761ed;

  color: white;

  border-radius: 9px;

  text-decoration: none;

  font-weight: 650;
}

.primary-button:hover {
  background: #1255d3;
}

/* =========================
   ORDER LIST
========================= */

.orders-list {
  display: grid;

  gap: 18px;
}

.order-card {
  padding: 22px;

  border: 1px solid #dfe4ee;

  border-radius: 14px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.order-card:hover {
  border-color: #1761ed;

  box-shadow: 0 6px 18px rgba(23, 97, 237, 0.08);
}

.order-top {
  display: flex;

  justify-content: space-between;

  align-items: flex-start;

  gap: 20px;

  margin-bottom: 20px;
}

.order-number {
  margin: 0 0 5px;

  font-size: 18px;

  font-weight: 750;
}

.order-date {
  color: #667085;

  font-size: 14px;
}

/* =========================
   STATUS BADGES
========================= */

.order-status {
  padding: 6px 10px;

  border-radius: 999px;

  font-size: 13px;

  font-weight: 700;

  text-transform: capitalize;
}

.status-processing {
  background: #fff6df;

  color: #9a6700;
}

.status-shipped {
  background: #edf4ff;

  color: #175cd3;
}

.status-delivered {
  background: #ecfdf3;

  color: #087443;
}

.status-cancelled {
  background: #fef3f2;

  color: #b42318;
}

/* =========================
   ORDER DETAILS
========================= */

.order-details {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 20px;

  padding-top: 18px;

  border-top: 1px solid #e4e7ec;
}

.order-detail span {
  display: block;

  color: #667085;

  font-size: 13px;

  margin-bottom: 6px;
}

.order-detail strong {
  font-size: 15px;
}

/* =========================
   BOTTOM
========================= */

.bottom-navigation {
  margin-top: 30px;

  padding-top: 22px;

  border-top: 1px solid #e4e7ec;
}

.bottom-navigation a {
  color: #1455c8;

  text-decoration: none;
}

.bottom-navigation a:hover {
  text-decoration: underline;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 650px) {
  .page {
    padding: 20px 12px;
  }

  .orders-container {
    padding: 22px 18px;

    border-radius: 14px;
  }

  .orders-heading {
    align-items: flex-start;

    flex-direction: column;
  }

  .orders-heading h1 {
    font-size: 28px;
  }

  .order-top {
    flex-direction: column;
  }

  .order-details {
    grid-template-columns: 1fr;
  }

  .header-inner {
    width: calc(100% - 28px);
  }
}
/* =========================
   ORDER PRODUCTS
========================= */

.order-products {
  margin-bottom: 18px;
}

.order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 14px 0;

  border-top: 1px solid #eef1f6;
}

.order-item:first-child {
  border-top: none;
}

.order-item-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.order-item-info strong {
  color: #172033;
}

.order-item-info span {
  color: #667085;
  font-size: 14px;
}

.item-price {
  white-space: nowrap;
}

/* Additional order statuses */

.status-pending {
  background: #fff6df;
  color: #9a6700;
}

.status-confirmed {
  background: #edf4ff;
  color: #175cd3;
}

/* Payment statuses */

.payment-paid {
  color: #087443;
}

.payment-pending {
  color: #9a6700;
}

.payment-failed {
  color: #b42318;
}

.payment-refunded {
  color: #175cd3;
}
