:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  color: #1d1d1f;
  background: #f5f5f7;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0%, #f5f5f7 42%, #ffffff 100%);
  color: #1d1d1f;
}

.wrap {
  width: min(920px, calc(100vw - 32px));
  margin: 40px auto;
}

.pay-wrap {
  width: min(760px, calc(100vw - 32px));
}

.card {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
}

.pay-card {
  text-align: center;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
}

.eyebrow {
  margin: 0 0 7px;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 600;
}

h1,
h2 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 700;
}

.muted {
  color: #6e6e73;
}

.amount {
  margin: 28px 0 18px;
  font-size: clamp(54px, 12vw, 86px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.96;
}

.reference {
  width: min(420px, 100%);
  margin: 0 auto 12px;
  padding: 14px 18px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: #f5f5f7;
}

.reference span {
  display: block;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 600;
}

.reference b {
  display: block;
  margin-top: 2px;
  color: #1d1d1f;
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.reference.verified b {
  font-size: 24px;
  letter-spacing: 0;
}

.notice-line {
  margin: 0 auto 22px;
  color: #6e6e73;
  font-size: 15px;
  line-height: 1.5;
}

.qr-frame {
  width: min(430px, 100%);
  margin: 0 auto 22px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 26px;
  background: #ffffff;
}

.qr {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 14px;
  background: #ffffff;
}

.order-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 auto;
  padding: 0;
}

.order-meta div {
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: #f5f5f7;
  text-align: left;
}

.order-meta dt {
  margin: 0 0 4px;
  color: #86868b;
  font-size: 12px;
  font-weight: 600;
}

.order-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 600;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f5f5f7;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 600;
}

.badge.paid {
  background: #e4f8ed;
  color: #137333;
}

.badge.pending {
  background: #fff4d6;
  color: #8a5a00;
}

.badge.expired,
.badge.rejected {
  background: #ffe8e5;
  color: #b42318;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

button,
.btn,
input,
textarea {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  padding: 11px 16px;
  font: inherit;
}

button,
.btn {
  min-height: 44px;
  background: #0071e3;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}

input,
textarea {
  background: #ffffff;
  color: #1d1d1f;
  min-width: 280px;
}

.claim {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin: 18px auto 0;
}

.claim textarea {
  width: min(520px, 100%);
  min-height: 78px;
  border-radius: 18px;
  resize: vertical;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  table-layout: auto;
}

.table th,
.table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px;
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

.table th:nth-child(1),
.table td:nth-child(1) {
  width: 128px;
}

.table th:nth-child(2),
.table td:nth-child(2) {
  width: 115px;
}

.table th:nth-child(3),
.table td:nth-child(3) {
  width: 190px;
}

.table th:nth-child(5),
.table td:nth-child(5) {
  max-width: 250px;
  overflow-wrap: anywhere;
}

.table th:nth-child(6),
.table td:nth-child(6) {
  width: 245px;
  min-width: 245px;
}

.table td:nth-child(4) {
  overflow-wrap: anywhere;
}

.table code {
  color: #0066cc;
  white-space: normal;
  overflow-wrap: anywhere;
}

.small {
  font-size: 12px;
  color: #6e6e73;
  overflow-wrap: anywhere;
}

.danger {
  background: #d92d20;
}

.ok {
  background: #137333;
}

.table .btn,
.table button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  margin: 3px 4px 3px 0;
  padding: 8px 10px;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.15;
}

.table td:last-child {
  white-space: normal;
}

@media (max-width: 680px) {
  .wrap,
  .pay-wrap {
    width: calc(100vw - 20px);
    margin: 12px auto;
  }

  .card {
    border-radius: 22px;
    padding: 18px;
  }

  .top {
    align-items: flex-start;
  }

  .amount {
    margin-top: 24px;
  }

  .reference b {
    font-size: 36px;
  }

  .qr-frame {
    padding: 10px;
    border-radius: 22px;
  }

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

  .table {
    min-width: 1050px;
  }

  input,
  textarea {
    min-width: 0;
    width: min(100%, 520px);
  }
}
