:root {
  --bg: #f4f8fb;
  --panel: #ffffff;
  --line: rgba(16, 44, 40, 0.12);
  --ink: #122723;
  --muted: #516c67;
  --brand: #0f8c7a;
  --shadow: 0 14px 30px rgba(12, 40, 36, 0.08);
  --shadow-strong: 0 24px 52px rgba(12, 40, 36, 0.14);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, rgba(15, 140, 122, 0.2), transparent 36%),
    radial-gradient(circle at 100% 0, rgba(255, 179, 120, 0.2), transparent 34%),
    linear-gradient(180deg, #fbfdff, var(--bg));
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(52px);
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 300px;
  height: 300px;
  left: -90px;
  top: -70px;
  background: rgba(15, 140, 122, 0.22);
}

body::after {
  width: 360px;
  height: 360px;
  right: -140px;
  bottom: -120px;
  background: rgba(255, 179, 120, 0.24);
}

.pay-shell {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 22px;
}

.pay-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(8px);
  padding: 12px 14px;
}

.pay-topbar h1 {
  margin: 0;
  font-size: 24px;
}

.pay-topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.95), rgba(248, 255, 253, 0.9));
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(8px);
  padding: 12px;
}

.panel h3 {
  margin: 0;
  font-size: 18px;
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ticket-form {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
  color: var(--ink);
  outline: none;
  font-size: 14px;
}

textarea {
  min-height: 94px;
  resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(15, 140, 122, 0.56);
  box-shadow: 0 0 0 3px rgba(15, 140, 122, 0.14);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), #18a08d);
  color: #fff;
}

.btn.light {
  background: rgba(16, 33, 29, 0.08);
  color: #1e3a34;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.card-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.pay-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pay-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(13, 39, 33, 0.08);
}

.pay-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.pay-card-top b {
  font-size: 15px;
  word-break: break-all;
}

.pay-lines {
  margin-top: 8px;
  display: grid;
  gap: 5px;
}

.pay-lines p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.chip {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(61, 89, 84, 0.15);
  color: #2d4a45;
}

.chip.pending {
  background: rgba(238, 169, 61, 0.18);
  color: #8a5f09;
}

.chip.success {
  background: rgba(15, 140, 122, 0.16);
  color: #0a5b4f;
}

.chip.closed,
.chip.failed,
.chip.refunded {
  background: rgba(125, 139, 136, 0.18);
  color: #475d59;
}

.qr-box {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.qr-box img {
  width: 220px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  padding: 14px;
}

.toast-container {
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 40;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 170px;
  max-width: 320px;
  border-radius: 10px;
  color: #fff;
  padding: 9px 10px;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.toast.ok { background: #0f8c7a; }
.toast.error { background: #d14949; }
.toast.info { background: #2d3f4a; }

@media (max-width: 760px) {
  .pay-shell {
    width: calc(100% - 16px);
  }

  .pay-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .pay-topbar .btn {
    width: 100%;
  }
}
