:root {
  --ink: #162033;
  --muted: #6f7b90;
  --line: rgba(111, 126, 166, 0.18);
  --blue: #526fff;
  --violet: #8065ff;
  --cyan: #64d6ff;
  --panel: rgba(255, 255, 255, 0.84);
  --shadow: 0 24px 70px rgba(63, 83, 145, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 82% 10%, rgba(125, 104, 255, 0.42), transparent 30%),
    radial-gradient(circle at 10% 4%, rgba(90, 215, 255, 0.34), transparent 28%),
    linear-gradient(180deg, #eef5ff 0%, #f8fbff 44%, #edf4ff 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.page {
  display: grid;
  grid-template-columns: minmax(360px, 430px) minmax(280px, 420px);
  align-items: center;
  justify-content: center;
  gap: 38px;
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 36px 0;
}

.phone {
  overflow: hidden;
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(206, 219, 255, 0.76));
  box-shadow: var(--shadow);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 18px 28px 12px;
  border-radius: 36px 36px 0 0;
  background: #fff;
  font-weight: 900;
}

.app {
  min-height: 780px;
  padding: 16px 16px 24px;
  border-radius: 0 0 36px 36px;
  background:
    radial-gradient(circle at 92% 3%, rgba(117, 94, 255, 0.2), transparent 24%),
    radial-gradient(circle at 4% 35%, rgba(100, 214, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #fbfcff 0%, #eef5ff 100%);
}

.topbar,
.scan-card,
.stepper,
.account-grid,
.device-info,
.state-box div,
dialog dl div {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 14px;
}

.topbar button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #526078;
  background: rgba(255, 255, 255, 0.76);
  font-size: 22px;
}

.scan-card {
  position: relative;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 22%, rgba(255, 255, 255, 0.42), transparent 0 48px, rgba(255, 255, 255, 0.1) 50px 94px, transparent 96px),
    linear-gradient(135deg, #526fff, #8065ff 64%, #64d6ff);
}

.scan-card p {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.78);
}

.scan-card h1 {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: 0;
}

.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
}

.warning {
  color: #fff5d8;
  background: rgba(255, 190, 65, 0.25);
}

.success {
  color: #eafff6;
  background: rgba(33, 200, 135, 0.24);
}

.qr-chip {
  display: grid;
  grid-template-columns: repeat(2, 18px);
  gap: 7px;
  border-radius: 18px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.9);
}

.qr-chip i {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #536fff;
}

.stepper {
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0;
}

.stepper span {
  flex: 1;
  border-radius: 999px;
  padding: 9px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.stepper .done,
.stepper .active {
  color: #fff;
  background: linear-gradient(135deg, #526fff, #8065ff);
}

.notice,
.form-card,
.side-panel,
dialog .dialog-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 16px 38px rgba(72, 92, 154, 0.12);
  backdrop-filter: blur(16px);
}

.notice {
  padding: 16px;
}

.notice strong {
  display: block;
  margin-bottom: 6px;
}

.notice p,
.side-panel li,
.state-box p,
dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.form-card {
  display: grid;
  gap: 13px;
  margin-top: 14px;
  padding: 16px;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: #344057;
  font-size: 13px;
  font-weight: 900;
}

label b {
  color: #ff5c73;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(82, 111, 255, 0.58);
  box-shadow: 0 0 0 4px rgba(82, 111, 255, 0.1);
}

.account-info {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(82, 111, 255, 0.12);
  border-radius: 16px;
  padding: 12px;
  background: rgba(83, 111, 255, 0.07);
}

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

.section-label span {
  color: #344057;
  font-size: 13px;
  font-weight: 900;
}

.section-label b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-grid {
  align-items: stretch;
  gap: 10px;
}

.account-grid div {
  flex: 1;
  min-width: 0;
  border-radius: 13px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.72);
}

.account-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.device-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.device-info div {
  border-radius: 14px;
  padding: 11px;
  background: rgba(83, 111, 255, 0.08);
}

.device-info span,
.state-box span,
dialog dt {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.device-info strong,
dialog dd {
  display: block;
  margin: 6px 0 0;
  font-size: 13px;
}

.submit-btn,
dialog button {
  min-height: 52px;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, #526fff, #8065ff);
  box-shadow: 0 18px 34px rgba(83, 102, 236, 0.32);
  font-size: 16px;
  font-weight: 900;
}

.side-panel {
  padding: 30px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #6674ff;
  font-size: 13px;
  font-weight: 900;
}

.side-panel h2 {
  margin: 0 0 20px;
  font-size: 36px;
  line-height: 1.16;
  letter-spacing: 0;
}

.side-panel ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.state-box {
  margin-top: 22px;
  border-radius: 18px;
  padding: 18px;
  background: rgba(83, 111, 255, 0.08);
}

.state-box strong {
  display: block;
  margin: 7px 0;
  font-size: 28px;
}

dialog {
  width: min(360px, calc(100% - 28px));
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(22, 32, 51, 0.38);
  backdrop-filter: blur(8px);
}

.dialog-card {
  padding: 24px;
  text-align: center;
}

.success-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #21c887, #64d6ff);
  font-size: 28px;
  font-weight: 900;
}

dialog h3 {
  margin: 14px 0 10px;
  font-size: 24px;
}

dialog dl {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  text-align: left;
}

dialog dl div {
  justify-content: space-between;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(83, 111, 255, 0.08);
}

dialog dd {
  margin: 0;
  font-weight: 900;
}

dialog button {
  width: 100%;
}

@media (max-width: 860px) {
  .page {
    grid-template-columns: 1fr;
    width: min(100% - 20px, 460px);
    gap: 18px;
    padding: 10px 0 28px;
  }

  .side-panel {
    order: -1;
    padding: 22px;
  }

  .side-panel h2 {
    font-size: 28px;
  }
}

@media (max-width: 390px) {
  .account-grid,
  .device-info {
    display: grid;
    grid-template-columns: 1fr;
  }

  .scan-card {
    align-items: flex-start;
  }

  .qr-chip {
    transform: scale(0.86);
    transform-origin: top right;
  }
}
