:root {
  color: #172033;
  background: #f3f5f8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
textarea {
  font: inherit;
}

.container {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.card {
  width: min(920px, 100%);
  background: #ffffff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 24px 70px rgba(22, 31, 53, 0.12);
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #e02e24;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
}

h2 {
  margin-bottom: 10px;
}

.tips {
  margin: 22px 0;
  line-height: 1.8;
  color: #536076;
}

.badge {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: #8a4b00;
  background: #fff0d6;
  font-size: 14px;
  font-weight: 700;
}

.badge.success {
  color: #0f7a39;
  background: #dff8e9;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  color: #ffffff;
  background: #e02e24;
  cursor: pointer;
  font-weight: 700;
}

button.secondary {
  color: #273247;
  background: #e8edf5;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px;
  border: 1px solid #e7ebf2;
  border-radius: 16px;
  background: #fbfcff;
  margin-bottom: 22px;
}

.qr-box {
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #ffffff;
  border: 1px dashed #ccd5e3;
}

.qr-box img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.muted {
  color: #6b768a;
  line-height: 1.7;
}

.form {
  display: grid;
  gap: 10px;
}

label {
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid #d9e0eb;
  border-radius: 14px;
  padding: 14px;
  outline: none;
}

textarea:focus {
  border-color: #e02e24;
  box-shadow: 0 0 0 3px rgba(224, 46, 36, 0.12);
}

.result {
  margin-top: 22px;
  padding: 16px;
  border-radius: 14px;
  background: #eef3fb;
  line-height: 1.7;
}

.result.success {
  background: #e7f8ed;
}

.result.error {
  color: #a20f0f;
  background: #ffe8e6;
}

.mall-id {
  display: inline-block;
  margin: 6px 0 12px;
  padding: 8px 12px;
  color: #ffffff;
  background: #172033;
  border-radius: 10px;
  font-size: 24px;
  font-weight: 800;
}

.api-url {
  display: block;
  overflow-wrap: anywhere;
}

.hidden {
  display: none;
}

@media (max-width: 720px) {
  .card {
    padding: 22px;
  }

  .header,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .header {
    display: grid;
  }
}
