* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: #f6f8fc;
  color: #263349;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  padding: 24px;
}

.page-header {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 18px;
}

.page-header img {
  width: 126px;
  height: auto;
}

.return-link,
.btn {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.return-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  background: #43e8be;
  color: #073b43;
  box-shadow: 0 6px 14px rgba(67, 232, 190, 0.22);
}

.return-link:hover,
.btn:hover {
  transform: translateY(-1px);
}

.eyebrow {
  color: #0f3ff2;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  color: #263349;
  font-size: 2rem;
  line-height: 1.1;
}

.page-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.action-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(31, 45, 75, 0.08);
  backdrop-filter: blur(10px);
}

.summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #667085;
  font-size: 0.95rem;
}

.summary strong {
  color: #0f3ff2;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
  font-size: 0.95rem;
}

.btn:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.btn-primary {
  background: #0f3ff2;
  box-shadow: 0 8px 18px rgba(15, 63, 242, 0.22);
}

.btn-primary:hover {
  background: #1638c7;
}

.btn-secondary {
  background: #e94d63;
  box-shadow: 0 8px 18px rgba(233, 77, 99, 0.18);
}

.btn-secondary:hover {
  background: #c9374d;
}

.feedback {
  min-height: 24px;
  margin: 0 0 12px;
  color: #c9374d;
  font-weight: 700;
  text-align: center;
}

.feedback.success {
  color: #087f5b;
}

.table-shell {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(31, 45, 75, 0.08);
}

.order-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.order-table th,
.order-table td {
  border-bottom: 1px solid #e8edf5;
}

.order-table thead th {
  position: sticky;
  top: 72px;
  z-index: 12;
  padding: 14px 16px;
  background: #0f3ff2;
  color: #fff;
  font-size: 0.92rem;
  text-align: left;
}

.order-table th:first-child,
.order-table td:first-child {
  width: 82px;
  text-align: center;
}

.order-table th:last-child,
.order-table td:last-child {
  width: 160px;
  text-align: center;
}

.order-table tbody td {
  padding: 12px 16px;
  background: #fff;
  vertical-align: middle;
}

.order-table tbody tr:nth-child(even) td {
  background: #fbfcff;
}

.group-row th {
  position: sticky;
  top: 119px;
  z-index: 10;
  padding: 10px 16px;
  background: #edf7ff;
  border-bottom: 1px solid #cddff4;
  color: #0b4d8b;
  font-size: 0.92rem;
  text-align: left;
}

.manual-label {
  display: block;
  color: #263349;
  font-weight: 500;
  line-height: 1.45;
  unicode-bidi: plaintext;
}

.manual-label[dir="rtl"] {
  text-align: right;
}

.qty-input {
  width: 92px;
  height: 38px;
  border: 1.6px solid #cfd7e6;
  border-radius: 8px;
  color: #263349;
  font: inherit;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.qty-input:focus {
  border-color: #0f3ff2;
  box-shadow: 0 0 0 3px rgba(15, 63, 242, 0.14);
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  margin: 0;
}

@media (max-width: 720px) {
  body {
    padding: 16px;
  }

  .page-header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 10px;
  }

  .page-header img {
    width: 112px;
  }

  h1 {
    font-size: 1.7rem;
  }

  .action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .summary,
  .actions {
    justify-content: center;
  }

  .actions {
    flex-wrap: wrap;
  }

  .btn {
    flex: 1 1 160px;
  }

  .order-table thead th {
    top: 130px;
  }

  .group-row th {
    top: 177px;
  }
}
