:root {
  --ink: #162033;
  --muted: #657385;
  --panel: #ffffff;
  --line: #dce5ea;
  --mint: #57c7b6;
  --mint-dark: #168576;
  --coral: #ff7a6b;
  --sun: #ffd166;
  --sky: #d9f1ff;
  --lavender: #ece7ff;
  --bg: #f6fbff;
  --shadow: 0 18px 50px rgba(28, 47, 68, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(90deg, rgba(87, 199, 182, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 122, 107, 0.08) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: center;
  padding: 36px 0;
}

.brand-panel,
.form-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.brand-panel {
  min-height: 560px;
  border-radius: 28px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.brand-panel::before {
  width: 160px;
  height: 160px;
  right: -52px;
  top: 34px;
  background: repeating-linear-gradient(45deg, var(--sun) 0 8px, transparent 8px 16px);
  opacity: 0.42;
}

.brand-panel::after {
  width: 112px;
  height: 112px;
  left: -34px;
  bottom: 92px;
  background: repeating-linear-gradient(135deg, var(--sky) 0 7px, transparent 7px 14px);
  opacity: 0.85;
}

.mascot-wrap {
  position: relative;
  z-index: 1;
  width: min(78%, 320px);
  aspect-ratio: 1;
  align-self: center;
  display: grid;
  place-items: center;
  margin-top: 22px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 209, 102, 0.7) 0 10%, transparent 11%),
    radial-gradient(circle at 74% 72%, rgba(255, 122, 107, 0.4) 0 12%, transparent 13%),
    linear-gradient(135deg, var(--sky), var(--lavender));
}

.mascot {
  width: 78%;
  height: auto;
  display: block;
}

.brand-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--mint-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 52px;
  line-height: 1.02;
  letter-spacing: 0;
}

.subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.device-chip {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(22, 32, 51, 0.1);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
}

.chip-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.device-chip strong {
  display: block;
  min-height: 22px;
  overflow-wrap: anywhere;
  font-size: 17px;
}

.form-panel {
  border-radius: 24px;
  padding: 28px;
}

form {
  display: grid;
  gap: 12px;
}

label {
  color: #263348;
  font-size: 14px;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #cbd8e2;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(87, 199, 182, 0.18);
}

input[readonly] {
  color: #475569;
  background: #f3f7f9;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  gap: 10px;
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.primary {
  margin-top: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--mint-dark), #246d9b);
  box-shadow: 0 12px 24px rgba(22, 133, 118, 0.22);
}

.secondary {
  color: #173247;
  background: var(--sun);
  box-shadow: 0 8px 18px rgba(255, 178, 59, 0.2);
}

.full {
  width: 100%;
}

.status-text {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.status-text.error {
  color: #bf3328;
}

.status-text.ok {
  color: var(--mint-dark);
}

.success-view {
  text-align: center;
  padding: 30px 0 4px;
}

.success-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 24px;
  background: var(--mint);
  position: relative;
  box-shadow: 0 12px 28px rgba(87, 199, 182, 0.28);
}

.success-mark::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 18px;
  width: 18px;
  height: 32px;
  border: solid #fff;
  border-width: 0 6px 6px 0;
  transform: rotate(45deg);
}

.success-view.error .success-mark {
  background: var(--coral);
}

.success-view.error .success-mark::after {
  left: 33px;
  top: 17px;
  width: 0;
  height: 36px;
  border-width: 0 5px 0 0;
  transform: rotate(45deg);
  box-shadow: 0 0 0 transparent;
}

.success-view.error .success-mark::before {
  content: "";
  position: absolute;
  left: 33px;
  top: 17px;
  height: 36px;
  border-right: 5px solid #fff;
  transform: rotate(-45deg);
}

.success-view h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.success-view p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
    padding: 18px 0;
  }

  .brand-panel {
    min-height: auto;
    gap: 22px;
    border-radius: 22px;
  }

  .mascot-wrap {
    width: min(58%, 220px);
    margin-top: 0;
  }

  h1 {
    font-size: 38px;
  }
}

@media (max-width: 480px) {
  .shell {
    width: min(100% - 20px, 1040px);
  }

  .brand-panel,
  .form-panel {
    padding: 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 34px;
  }
}
