:root {
  --bg: #eef6f2;
  --header: #10231f;
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --line: #dce9e4;
  --text: #172923;
  --muted: #6d8079;
  --success: #109a68;
  --pending: #c9851d;
  --danger: #d24c4c;
  --gold: #c8872e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 8%, rgba(13, 148, 136, 0.18), transparent 28%),
    radial-gradient(circle at 82% 82%, rgba(200, 135, 46, 0.16), transparent 28%),
    linear-gradient(180deg, #f8fbf8 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Alibaba PuHuiTi", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}

body {
  display: grid;
  place-items: start center;
}

button,
input,
select {
  font: inherit;
}

.cashier-shell {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(18, 44, 38, 0.16);
  animation: payRise 0.32s ease both;
}

@keyframes payRise {
  from {
    transform: translateY(8px);
  }

  to {
    transform: translateY(0);
  }
}

.cashier-header {
  height: 92px;
  display: grid;
  align-content: center;
  place-items: center;
  gap: 4px;
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(135deg, var(--header), #176055);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.cashier-header small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.cashier-tabbar {
  padding: 14px 18px 0;
  background: transparent;
}

.cashier-tab {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #eef8f5;
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 700;
  cursor: default;
}

.cashier-panel {
  display: flex;
  min-height: calc(100vh - 104px);
  flex-direction: column;
  gap: 14px;
  padding: 0 18px 20px;
}

.cashier-intro {
  margin-top: 18px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(13, 148, 136, 0.13), transparent 34%),
    linear-gradient(180deg, #fff, #f8fcfb);
  border: 1px solid rgba(13, 148, 136, 0.1);
  box-shadow: 0 14px 34px rgba(18, 44, 38, 0.07);
}

.cashier-intro p {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.cashier-intro h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 23px;
}

.cashier-intro span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.cashier-form {
  display: grid;
  gap: 12px;
  padding: 2px 0 0;
}

.cashier-row {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid rgba(13, 148, 136, 0.1);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 44, 38, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.cashier-row:focus-within {
  border-color: rgba(13, 148, 136, 0.34);
  box-shadow: 0 14px 30px rgba(13, 148, 136, 0.12);
  transform: translateY(-1px);
}

.cashier-label {
  width: 86px;
  flex: 0 0 86px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.cashier-value {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  word-break: break-all;
}

.cashier-input,
.cashier-select {
  width: 144px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.cashier-input:focus,
.cashier-select:focus {
  box-shadow: none;
}

.cashier-input {
  width: 112px;
  border: 0;
  padding: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
}

.cashier-input::placeholder {
  color: #b3c0bc;
  font-size: 14px;
  font-weight: 600;
}

.amount-select {
  flex: 0 0 144px;
  font-size: 16px;
  font-weight: 800;
}

.channel-select {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 220px;
  font-size: 15px;
  font-weight: 800;
}

.cashier-static {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amount-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.amount-preset {
  height: 42px;
  border: 1px solid rgba(13, 148, 136, 0.16);
  border-radius: 12px;
  background: #f8fcfb;
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(18, 44, 38, 0.04);
  cursor: pointer;
}

.amount-preset.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 12px 22px rgba(13, 148, 136, 0.18);
}

.cashier-channel-input {
  width: 168px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  font-size: 15px;
}

.cashier-submit {
  display: block;
  width: 100%;
  max-width: none;
  height: 50px;
  margin: 8px auto 0;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 16px 28px rgba(13, 148, 136, 0.22);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.cashier-submit:hover {
  background: var(--accent-dark);
  box-shadow: 0 18px 34px rgba(13, 148, 136, 0.26);
}

.cashier-submit:active {
  transform: translateY(1px);
}

.cashier-submit:disabled {
  cursor: wait;
  opacity: 0.75;
}

.form-message {
  min-height: 22px;
  margin: 4px 0 0;
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}

.form-message.success {
  color: var(--success);
}

.result-panel {
  margin: 18px 0 0;
  padding: 16px 14px;
  border: 1px solid rgba(13, 148, 136, 0.1);
  border-radius: 18px;
  background: #fbfdfc;
}

.history-panel {
  margin: 0;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.qr-card {
  margin-top: 16px;
  padding: 16px 12px 12px;
  border: 1px dashed #cfe8f5;
  border-radius: 8px;
  background: linear-gradient(180deg, #fafdff 0%, #f3faff 100%);
  text-align: center;
}

.qr-frame {
  width: min(100%, 248px);
  margin: 0 auto;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(25, 52, 84, 0.08);
}

.qr-image {
  display: block;
  width: 100%;
  height: auto;
}

.qr-caption {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.history-page-panel {
  justify-content: flex-start;
}

.history-token-panel {
  margin-top: 18px;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.result-head h2 {
  margin: 0;
  font-size: 15px;
}

.history-refresh {
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: rgba(30, 160, 219, 0.08);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.history-link {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.history-link:hover {
  text-decoration: underline;
}

.status-badge {
  min-width: 72px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.pending {
  background: rgba(226, 154, 20, 0.12);
  color: var(--pending);
}

.status-badge.success {
  background: rgba(23, 160, 93, 0.12);
  color: var(--success);
}

.status-badge.failed {
  background: rgba(210, 76, 76, 0.12);
  color: var(--danger);
}

.history-message {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.history-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.token-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef7ff 100%);
  border: 1px solid #dcecff;
}

.token-card-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.token-card-value {
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
}

.history-empty {
  padding: 12px 10px;
  border: 1px dashed #d7d7d7;
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.history-item {
  display: block;
  width: 100%;
  padding: 12px 12px 11px;
  border: 1px solid #e8eef5;
  border-radius: 6px;
  background: #fbfdff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.history-item:hover {
  border-color: rgba(30, 160, 219, 0.45);
  box-shadow: 0 4px 14px rgba(20, 40, 70, 0.06);
  transform: translateY(-1px);
}

.history-item-top,
.history-item-bottom {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.history-item-top {
  margin-bottom: 8px;
}

.history-item-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  word-break: break-all;
}

.history-item-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 0 0;
}

.result-grid div {
  padding-bottom: 10px;
  border-bottom: 1px dashed #e4e4e4;
}

.result-grid div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.result-grid dt {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.result-grid dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-all;
}

.result-grid a {
  color: var(--accent-dark);
  text-decoration: none;
}

.result-grid a:hover {
  text-decoration: underline;
}

.pay-mode-switch {
  display: flex;
  gap: 8px;
  margin: 12px 0 2px;
}

.pay-mode-btn {
  flex: 1 1 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d6dde7;
  border-radius: 999px;
  background: #fff;
  color: #4b5565;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.pay-mode-btn.is-active {
  border-color: rgba(30, 160, 219, 0.5);
  background: rgba(30, 160, 219, 0.1);
  color: var(--accent-dark);
}

.cashier-footer {
  padding: 30px 0 14px;
  color: #6f817b;
  font-size: 13px;
  text-align: center;
}

.pay-confirm-body {
  background:
    radial-gradient(circle at 18% 8%, rgba(13, 148, 136, 0.18), transparent 30%),
    radial-gradient(circle at 88% 86%, rgba(200, 135, 46, 0.18), transparent 30%),
    linear-gradient(180deg, #fffaf0 0%, #f7fbf8 46%, #eef6f2 100%);
}

.pay-confirm-shell {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  padding: 12px 16px 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 80px rgba(18, 44, 38, 0.12);
  animation: payRise 0.32s ease both;
}

.pay-confirm-topline {
  height: 22px;
  margin: 0 26px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.pay-amount-card {
  margin: 0 8px 18px;
  padding: 22px 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.4), transparent 32%),
    linear-gradient(135deg, #10231f, #176055 72%, #c8872e 150%);
  box-shadow: 0 20px 44px rgba(18, 44, 38, 0.2);
  color: #171717;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.pay-amount-card strong {
  color: #fff;
  font-size: 32px;
}

.pay-info-card {
  margin: 0 8px 16px;
  padding: 18px 16px 10px;
  border: 1px solid rgba(13, 148, 136, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(18, 44, 38, 0.08);
}

.pay-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  border-bottom: 1px solid #f0f1f4;
  color: #444;
  font-size: 15px;
}

.pay-info-row:last-child {
  border-bottom: 0;
}

.pay-info-row strong {
  color: #111;
  font-size: 15px;
  word-break: break-all;
}

.pay-orange {
  color: #ff5a00 !important;
}

.pay-countdown-card {
  margin: 0 8px 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--gold);
  border-radius: 16px;
  background: #fff8e9;
  color: #222;
  font-size: 15px;
  box-shadow: 0 12px 24px rgba(185, 140, 40, 0.1);
}

.pay-countdown-card strong {
  color: #ff5a00;
}

.pay-now-button,
.pay-now-button:visited {
  display: flex;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 16px 28px rgba(13, 148, 136, 0.22);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  user-select: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.14s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.pay-now-button:hover {
  filter: brightness(1.03);
  box-shadow: 0 18px 34px rgba(13, 148, 136, 0.26);
}

.pay-now-button:active {
  transform: translateY(1px);
}

.pay-now-button.is-disabled,
.pay-now-button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

.pay-now-button #btn_tips {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pay-now-button #miao_span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
}

.pay-warning-card {
  margin: 0 8px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(200, 135, 46, 0.22);
  background: #fffaf1;
  color: #9a5f16;
  font-size: 14px;
  line-height: 1.7;
}

.pay-warning-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.pay-warning-card p {
  margin: 0;
}

.pay-response-raw {
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: rgba(17, 23, 34, 0.95);
  color: #d1e7ff;
  font-size: 12px;
  line-height: 1.5;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.pay-success-shell {
  display: grid;
  align-content: center;
  padding-top: 44px;
}

.pay-success-card,
.pay-state-card {
  margin-top: 28px;
  text-align: center;
}

.pay-success-card p,
.pay-state-card p {
  margin: 10px 0 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.pay-success-card h1,
.pay-state-card h1 {
  margin: 0;
  font-size: 28px;
}

.pay-success-card span,
.pay-state-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.pay-success-mark,
.pay-state-mark {
  width: 68px;
  height: 68px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--success), var(--accent-dark));
  color: #fff;
  font-size: 38px;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(16, 154, 104, 0.26);
}

.pay-state-shell {
  display: grid;
  align-content: center;
  padding-top: 44px;
}

.pay-state-card {
  padding: 30px 24px;
}

.pay-state-mark.is-danger {
  background: linear-gradient(135deg, var(--danger), #c8872e);
  box-shadow: 0 18px 36px rgba(210, 76, 76, 0.22);
}

.pay-state-mark.is-danger + p {
  color: var(--danger);
}

.pay-form-title {
  margin: 14px 4px 8px;
  color: #4d5665;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

@media (max-width: 420px) {
  .cashier-shell {
    max-width: none;
    box-shadow: none;
  }

  .cashier-submit {
    width: 100%;
  }

  .pay-confirm-shell {
    max-width: none;
    box-shadow: none;
  }
}

/* UI comfort pass */
body {
  min-height: 100vh;
  padding: 28px;
  place-items: center;
}

.cashier-shell,
.pay-confirm-shell {
  overflow: hidden;
  border: 1px solid rgba(16, 78, 68, 0.1);
  border-radius: 28px;
}

.cashier-header {
  position: relative;
  isolation: isolate;
}

.cashier-header::after {
  content: "";
  position: absolute;
  inset: auto 28px 26px;
  z-index: -1;
  height: 148px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.13) 0 0) 22px 30px / 82px 8px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.09) 0 0) 22px 54px / 150px 8px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.09) 0 0) 22px 78px / 118px 8px no-repeat,
    rgba(255, 255, 255, 0.06);
}

.cashier-tabbar {
  padding-inline: 20px;
}

.cashier-tab {
  height: 44px;
  border: 1px solid rgba(13, 148, 136, 0.08);
  background: #ecf8f4;
}

.cashier-panel {
  min-height: auto;
}

.cashier-intro,
.cashier-row,
.result-panel,
.history-panel,
.pay-info-card,
.pay-countdown-card,
.pay-warning-card {
  border-radius: 18px;
}

.cashier-intro {
  box-shadow: 0 16px 38px rgba(18, 44, 38, 0.06);
}

.cashier-row {
  min-height: 68px;
}

.cashier-label {
  color: #597069;
}

.cashier-select,
.cashier-static,
.cashier-channel-input {
  border-radius: 12px;
  background: #fbfdfc;
}

.cashier-submit,
.pay-now-button,
.pay-now-button:visited {
  border-radius: 14px;
}

.form-message {
  line-height: 1.55;
}

.pay-confirm-shell {
  min-height: auto;
  margin: auto;
}

.pay-confirm-topline {
  height: 10px;
  margin: 4px auto 18px;
  width: 68px;
}

.pay-amount-card {
  margin-inline: 0;
  border-radius: 24px;
}

.pay-info-card,
.pay-countdown-card,
.pay-warning-card {
  margin-inline: 0;
}

.pay-now-button,
.pay-now-button:visited {
  width: 100%;
  margin-inline: 0;
}

@media (min-width: 760px) {
  .cashier-shell {
    display: grid;
    grid-template-columns: minmax(280px, 0.86fr) minmax(360px, 1fr);
    grid-template-rows: auto 1fr;
    width: min(920px, calc(100vw - 56px));
    max-width: none;
    min-height: 620px;
    background: rgba(255, 255, 255, 0.94);
  }

  .cashier-header {
    grid-row: 1 / 3;
    height: auto;
    min-height: 620px;
    align-content: start;
    justify-items: start;
    padding: 58px 42px;
    text-align: left;
  }

  .cashier-header strong {
    font-size: 28px;
    letter-spacing: 0.02em;
  }

  .cashier-header small {
    max-width: 240px;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.8;
    letter-spacing: 0;
  }

  .cashier-tabbar {
    padding: 34px 36px 0;
  }

  .cashier-panel {
    justify-content: center;
    gap: 18px;
    padding: 20px 36px 42px;
  }

  .cashier-intro {
    margin-top: 0;
    padding: 22px 22px 20px;
  }

  .cashier-intro h1 {
    font-size: 26px;
  }

  .cashier-row {
    padding-inline: 18px;
  }

  .cashier-select {
    width: 168px;
  }

  .amount-select {
    flex-basis: 168px;
  }

  .cashier-submit {
    height: 52px;
    margin-top: 10px;
  }

  .pay-confirm-shell {
    width: min(500px, calc(100vw - 56px));
    max-width: none;
    padding: 22px;
  }
}

@media (max-width: 759px) {
  body {
    padding: 0;
    place-items: start center;
  }

  .cashier-shell,
  .pay-confirm-shell {
    border-width: 0;
    border-radius: 0;
  }

  .pay-confirm-shell {
    min-height: 100dvh;
    margin: 0;
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .cashier-header::after {
    display: none;
  }
}

/* UI comfort pass: desktop cashier */
@media (min-width: 1100px) {
  body {
    padding: 40px;
  }

  .cashier-shell {
    grid-template-columns: 420px minmax(0, 1fr);
    width: min(1040px, calc(100vw - 80px));
    min-height: 680px;
  }

  .cashier-header {
    min-height: 680px;
    padding: 66px 48px;
  }

  .cashier-header strong {
    font-size: 32px;
  }

  .cashier-header small {
    max-width: 270px;
  }

  .cashier-header::after {
    inset: auto 34px 34px;
    height: 190px;
    border-radius: 28px;
    background:
      linear-gradient(rgba(255, 255, 255, 0.14) 0 0) 24px 36px / 102px 9px no-repeat,
      linear-gradient(rgba(255, 255, 255, 0.1) 0 0) 24px 66px / 178px 9px no-repeat,
      linear-gradient(rgba(255, 255, 255, 0.1) 0 0) 24px 96px / 142px 9px no-repeat,
      linear-gradient(rgba(255, 255, 255, 0.08) 0 0) 24px 136px / 214px 1px no-repeat,
      rgba(255, 255, 255, 0.06);
  }

  .cashier-tabbar {
    padding: 44px 46px 0;
  }

  .cashier-panel {
    gap: 20px;
    padding: 24px 46px 50px;
  }

  .cashier-intro {
    padding: 24px 24px 22px;
  }

  .cashier-intro h1 {
    font-size: 28px;
  }

  .cashier-form {
    gap: 14px;
  }

  .cashier-row {
    min-height: 72px;
    padding-inline: 20px;
  }

  .cashier-select {
    width: 180px;
  }

  .amount-select {
    flex-basis: 180px;
  }

  .cashier-submit {
    height: 54px;
  }

  .pay-confirm-shell {
    width: min(520px, calc(100vw - 80px));
    padding: 24px;
  }
}

@media (min-width: 1440px) {
  .cashier-shell {
    width: 1080px;
  }
}

/* UI comfort pass: cashier clarity */
.cashier-shell,
.pay-confirm-shell {
  border: 1px solid rgba(16, 78, 68, 0.1);
}

.cashier-header strong {
  position: relative;
  z-index: 1;
  line-height: 1.25;
}

.cashier-header small {
  position: relative;
  z-index: 1;
}

.cashier-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.cashier-tab::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.cashier-intro p {
  letter-spacing: 0.12em;
}

.cashier-intro h1 {
  line-height: 1.26;
}

.cashier-row {
  justify-content: space-between;
}

.cashier-label {
  line-height: 1.35;
}

.cashier-value,
.cashier-static,
.token-card-value,
.history-item-title,
.history-item-sub,
.result-grid dd,
.pay-info-row strong {
  overflow-wrap: anywhere;
}

.cashier-input,
.cashier-select,
.cashier-static,
.cashier-channel-input {
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.cashier-select:hover,
.cashier-static:hover,
.cashier-channel-input:hover {
  border-color: rgba(13, 148, 136, 0.26);
  background: #fff;
}

.cashier-select:focus,
.cashier-channel-input:focus {
  border-color: rgba(13, 148, 136, 0.4);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.amount-presets {
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
}

.amount-preset {
  min-width: 0;
  transition: transform 0.14s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.amount-preset:hover {
  border-color: rgba(13, 148, 136, 0.34);
  box-shadow: 0 10px 22px rgba(18, 44, 38, 0.08);
}

.amount-preset:active {
  transform: translateY(1px);
}

.cashier-submit,
.pay-now-button,
.pay-now-button:visited {
  font-weight: 800;
}

.result-panel,
.history-panel,
.qr-card,
.token-card,
.history-item {
  border-radius: 16px;
}

.history-panel,
.result-panel {
  box-shadow: 0 12px 26px rgba(18, 44, 38, 0.05);
}

.result-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
}

.result-head h2::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
}

.history-refresh,
.history-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
}

.history-link {
  border: 1px solid rgba(13, 148, 136, 0.14);
  background: #f4fbf9;
}

.history-link:hover {
  background: #ecf8f4;
  text-decoration: none;
}

.status-badge {
  gap: 6px;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.history-empty {
  min-height: 80px;
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.history-item {
  background: linear-gradient(180deg, #fff, #f8fcfb);
}

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

.result-grid {
  gap: 8px;
}

.result-grid div {
  display: grid;
  gap: 5px;
  padding: 10px 0;
}

.pay-info-row {
  align-items: flex-start;
  padding: 10px 0;
}

.pay-info-row span {
  flex: 0 0 auto;
  color: #66766f;
}

.pay-countdown-card,
.pay-warning-card {
  line-height: 1.65;
}

.pay-warning-card p + p {
  margin-top: 2px;
}

.pay-success-card,
.pay-state-card {
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

@media (max-width: 420px) {
  .cashier-panel {
    padding-inline: 16px;
  }

  .cashier-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 64px;
    align-items: center;
  }

  .cashier-label {
    width: auto;
    flex-basis: auto;
  }

  .cashier-select,
  .cashier-static,
  .cashier-channel-input,
  .amount-select,
  .channel-select {
    width: 100%;
    max-width: none;
  }

  .result-head {
    align-items: flex-start;
  }
}

/* UI comfort pass: payment journey polish */
.cashier-shell,
.pay-confirm-shell {
  contain: paint;
}

.cashier-panel {
  padding-bottom: max(22px, env(safe-area-inset-bottom));
}

.cashier-intro {
  position: relative;
  overflow: hidden;
}

.cashier-intro::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 74px;
  height: 42px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(13, 148, 136, 0.18), rgba(200, 135, 46, 0.16));
  filter: blur(18px);
  pointer-events: none;
}

.cashier-intro > * {
  position: relative;
  z-index: 1;
}

.cashier-row {
  position: relative;
  isolation: isolate;
}

.cashier-row::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  z-index: -1;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.cashier-row:focus-within::before {
  opacity: 1;
}

.cashier-value,
.cashier-static,
.cashier-input,
.cashier-select,
.cashier-channel-input {
  min-width: 0;
}

.cashier-select,
.cashier-static,
.cashier-channel-input {
  min-height: 40px;
  border-radius: 12px;
}

.cashier-select:disabled,
.cashier-static:disabled,
.cashier-channel-input:disabled {
  color: #8a9a94;
  background: #f3f8f6;
}

.amount-preset {
  position: relative;
  overflow: hidden;
}

.amount-preset::after {
  content: "";
  position: absolute;
  inset: auto 10px 7px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
}

.amount-preset.is-active::after {
  opacity: 0.82;
}

.cashier-submit:disabled,
.pay-now-button.is-disabled,
.pay-now-button[aria-disabled="true"] {
  filter: grayscale(0.18);
}

.form-message:not(:empty) {
  display: grid;
  min-height: 38px;
  place-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(210, 76, 76, 0.16);
  border-radius: 12px;
  background: rgba(210, 76, 76, 0.065);
  line-height: 1.5;
}

.form-message.success:not(:empty) {
  border-color: rgba(16, 154, 104, 0.16);
  background: rgba(16, 154, 104, 0.075);
}

.qr-card {
  border-color: rgba(13, 148, 136, 0.18);
  background:
    radial-gradient(circle at 50% 0%, rgba(13, 148, 136, 0.12), transparent 34%),
    linear-gradient(180deg, #fff, #f6fbf9);
}

.qr-frame {
  border: 1px solid rgba(16, 78, 68, 0.08);
  border-radius: 18px;
}

.history-list {
  max-height: min(56vh, 560px);
  overflow: auto;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.history-item {
  position: relative;
  overflow: hidden;
}

.history-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
}

.history-item:hover::before {
  opacity: 1;
}

.token-card {
  border-color: rgba(13, 148, 136, 0.12);
  background: linear-gradient(180deg, #f8fcfb, #eefaf7);
}

.pay-confirm-topline {
  position: relative;
  overflow: hidden;
}

.pay-confirm-topline::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.34), rgba(200, 135, 46, 0.22));
}

.pay-amount-card strong,
.pay-info-row strong,
.pay-countdown-card strong {
  font-variant-numeric: tabular-nums;
}

.pay-amount-card {
  position: relative;
  overflow: hidden;
}

.pay-amount-card::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 18px;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  transform: rotate(10deg);
}

.pay-info-card,
.pay-countdown-card,
.pay-warning-card {
  backdrop-filter: blur(10px);
}

.pay-now-button,
.pay-now-button:visited {
  min-height: 50px;
}

.pay-success-mark,
.pay-state-mark {
  position: relative;
}

.pay-success-mark::after,
.pay-state-mark::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid currentColor;
  border-radius: inherit;
  opacity: 0.12;
}

@media (min-width: 760px) {
  .pay-confirm-shell {
    padding: 18px 22px 28px;
  }

  .pay-info-row {
    gap: 22px;
  }
}

@media (max-width: 420px) {
  body {
    padding: 0;
  }

  .cashier-shell,
  .pay-confirm-shell {
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .cashier-header {
    min-height: 88px;
  }

  .amount-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-item-top,
  .history-item-bottom,
  .pay-info-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .status-badge {
    justify-self: flex-start;
  }

  .pay-amount-card::after {
    width: 52px;
    height: 52px;
  }
}
