:root {
  color-scheme: light;
  --page: #eef3f7;
  --ink: #111827;
  --muted: #6b7280;
  --line: #d7dee8;
  --panel: rgba(255, 255, 255, 0.92);
  --green: #18b57b;
  --blue: #1677ff;
  --amber: #f59e0b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(24, 181, 123, 0.12), transparent 24%, rgba(22, 119, 255, 0.12) 68%, transparent),
    linear-gradient(135deg, #eaf1f6 0%, #f8fafc 46%, #e4edf5 100%);
}

body {
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body::before {
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 78%);
}

body::after {
  width: 520px;
  height: 520px;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(22, 119, 255, 0.14);
  transform: translate(-50%, -50%) rotate(0deg);
  animation: backgroundSweep 18s linear infinite;
}

button {
  font: inherit;
}

.is-hidden {
  display: none !important;
}

.cashier-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.cashier-card {
  width: min(520px, 100%);
  min-height: auto;
  overflow: hidden;
  border: 1px solid rgba(215, 222, 232, 0.9);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.22), 0 10px 28px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
  animation: cardFloatIn 0.5s ease-out both, cardLift 5.8s ease-in-out 0.5s infinite;
}

.brand-panel {
  position: relative;
  display: grid;
  gap: 34px;
  padding: 42px;
  color: #fff;
  background:
    linear-gradient(150deg, rgba(15, 23, 42, 0.94), rgba(14, 116, 144, 0.84)),
    url("data:image/svg+xml,%3Csvg width='220' height='220' viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(255,255,255,.14)' stroke-width='1'%3E%3Cpath d='M0 42h220M0 92h220M0 142h220M0 192h220M42 0v220M92 0v220M142 0v220M192 0v220'/%3E%3C/g%3E%3C/svg%3E");
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.12) 42%, transparent 68%);
  transform: translateX(-70%);
  animation: sheenMove 5.4s ease-in-out infinite;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: auto 42px 42px auto;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  animation: pulseRing 2.8s ease-in-out infinite;
}

.brand-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #18b57b;
  font-weight: 800;
  font-size: 24px;
  box-shadow: 0 10px 22px rgba(24, 181, 123, 0.28);
}

.brand-name,
.brand-subtitle,
.amount-label,
.amount-note {
  margin: 0;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
}

.brand-subtitle {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.amount-block {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.amount-label,
.amount-note {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.amount-input-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 10px 0 12px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.38);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.amount-input-wrap:focus-within {
  border-color: rgba(24, 181, 123, 0.9);
  box-shadow: 0 12px 28px rgba(24, 181, 123, 0.12);
}

.amount-input-wrap span {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 800;
}

.amount-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: clamp(44px, 6vw, 68px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.amount-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.amount-input[type="number"] {
  appearance: textfield;
}

.flow-line {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.flow-line span {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
}

.flow-line span::after {
  content: "";
  display: block;
  width: 44%;
  height: 100%;
  border-radius: inherit;
  background: #18b57b;
  animation: slideFlow 1.6s ease-in-out infinite;
}

.flow-line span:nth-child(2)::after {
  animation-delay: 0.18s;
}

.flow-line span:nth-child(3)::after {
  animation-delay: 0.36s;
}

.status-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.status-row h1 {
  margin: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

.status-row p {
  margin: 10px 0 0;
  max-width: 420px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(24, 181, 123, 0.3);
  border-radius: 999px;
  color: #bdf7de;
  background: rgba(24, 181, 123, 0.13);
  font-size: 13px;
  font-weight: 700;
}

.status-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(24, 181, 123, 0.5);
  animation: dotPulse 1.4s infinite;
}

.status-pill.success {
  border-color: rgba(22, 119, 255, 0.3);
  color: #cfe5ff;
  background: rgba(22, 119, 255, 0.1);
}

.status-pill.success i {
  background: var(--blue);
}

.status-pill.error {
  border-color: rgba(239, 68, 68, 0.32);
  color: #fecaca;
  background: rgba(239, 68, 68, 0.1);
}

.status-pill.error i {
  background: #ef4444;
}

.submit-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  max-width: none;
}

.submit-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #18b57b;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(24, 181, 123, 0.26);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  background: #12a36e;
  box-shadow: 0 16px 30px rgba(24, 181, 123, 0.32);
}

.submit-button:active {
  transform: translateY(0);
}

.support-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.support-row strong {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.guid-modal {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid rgba(215, 222, 232, 0.9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.2);
  animation: cardFloatIn 0.35s ease-out both;
}

.guid-modal h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.guid-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.guid-field {
  display: grid;
  gap: 8px;
}

.guid-field span {
  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

.guid-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  font-size: 15px;
}

.guid-field input:focus {
  border-color: rgba(22, 119, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.guid-error {
  min-height: 18px;
  color: #b91c1c;
  font-size: 13px;
}

.success-shell {
  align-items: center;
}

.success-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 42px;
  border: 1px solid rgba(215, 222, 232, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.18), 0 10px 28px rgba(15, 23, 42, 0.1);
  animation: cardFloatIn 0.42s ease-out both;
}

.success-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(24, 181, 123, 0.13);
}

.success-icon span {
  width: 48px;
  height: 48px;
  display: block;
  border-radius: 50%;
  background: #18b57b;
  position: relative;
  box-shadow: 0 14px 30px rgba(24, 181, 123, 0.28);
}

.success-icon span::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 12px;
  width: 12px;
  height: 20px;
  border: solid #fff;
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
}

.success-kicker {
  margin: 4px 0 0;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
}

.success-card h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0;
}

.success-summary {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
  overflow-wrap: anywhere;
}

.success-details {
  width: 100%;
  display: grid;
  gap: 0;
  margin: 10px 0 4px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.success-details div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.success-details div:last-child {
  border-bottom: 0;
}

.success-details dt,
.success-details dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.success-details dt {
  color: var(--muted);
}

.success-details dd {
  color: var(--ink);
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.success-action {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: #18b57b;
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(24, 181, 123, 0.24);
}

@keyframes dotPulse {
  70% {
    box-shadow: 0 0 0 8px rgba(24, 181, 123, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(24, 181, 123, 0);
  }
}

@keyframes slideFlow {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(230%);
  }
}

@keyframes pulseRing {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.8;
  }
}

@keyframes backgroundSweep {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes sheenMove {
  0%,
  58% {
    transform: translateX(-75%);
  }
  100% {
    transform: translateX(75%);
  }
}

@keyframes cardFloatIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardLift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@media (max-width: 820px) {
  .cashier-shell {
    min-height: 100dvh;
    padding: 22px 16px;
    place-items: center;
  }

  .cashier-card {
    width: min(390px, 100%);
    min-height: auto;
    box-shadow: 0 24px 66px rgba(15, 23, 42, 0.2), 0 8px 22px rgba(15, 23, 42, 0.12);
  }

  .brand-panel {
    gap: 24px;
    min-height: auto;
    padding: 24px;
  }

  .brand-panel::after {
    right: 22px;
    bottom: 22px;
    width: 96px;
    height: 96px;
  }

  .amount-block {
    margin-top: 4px;
  }

  .amount-input {
    font-size: 48px;
  }

  .status-row {
    flex-direction: row;
    gap: 14px;
  }

  .status-row h1 {
    font-size: 24px;
  }

  .status-row p {
    font-size: 13px;
  }

  .submit-button {
    min-height: 50px;
  }

  .submit-panel {
    max-width: none;
  }

  .success-card {
    width: min(390px, 100%);
    padding: 28px 22px;
  }

  .success-card h1 {
    font-size: 28px;
  }

  .success-details div {
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 12px;
  }
}

@media (max-width: 380px) {
  .cashier-shell {
    padding: 14px;
  }

  .brand-panel {
    padding: 20px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    font-size: 21px;
  }

  .brand-name {
    font-size: 18px;
  }

  .amount-input {
    font-size: 42px;
  }

  .status-row {
    flex-direction: column;
  }
}
