:root {
  --bg-start: #edf2ff;
  --bg-end: #f8fbff;
  --text-primary: #1f2a44;
  --text-secondary: #66708a;
  --card-bg: rgba(255, 255, 255, 0.94);
  --card-border: rgba(167, 185, 230, 0.38);
  --input-bg: #ffffff;
  --input-border: #d7deef;
  --primary: #1e73e8;
  --primary-hover: #145fc3;
  --secondary: #69758d;
  --danger: #cb3e52;
  --success: #20a06d;
  --info: #2d7de8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(700px 340px at 7% 2%, rgba(71, 126, 255, 0.16), transparent 55%),
    radial-gradient(640px 320px at 95% 10%, rgba(96, 164, 255, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
  color: var(--text-primary);
  min-height: 100vh;
}

.container {
  max-width: 1120px;
  margin: 28px auto;
  padding: 0 18px 34px;
}

.container.narrow {
  max-width: 980px;
}

h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.2;
}

.subtitle {
  margin: 0 0 18px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(109, 138, 207, 0.32);
  color: #4f6292;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(235, 242, 255, 0.85);
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: stretch;
}

.auth-hero {
  border-radius: 18px;
  padding: 26px 24px;
  border: 1px solid rgba(169, 185, 227, 0.4);
  background:
    linear-gradient(145deg, rgba(232, 241, 255, 0.95), rgba(246, 250, 255, 0.95)),
    radial-gradient(500px 230px at 12% 12%, rgba(74, 130, 255, 0.15), transparent 60%);
  box-shadow: 0 20px 45px rgba(71, 98, 155, 0.12);
}

.auth-hero-illustration {
  height: 240px;
  border-radius: 14px;
  margin-bottom: 18px;
  background:
    radial-gradient(160px 90px at 30% 35%, rgba(95, 151, 255, 0.4), transparent 68%),
    radial-gradient(190px 120px at 72% 66%, rgba(75, 118, 240, 0.28), transparent 70%),
    linear-gradient(140deg, #d5e5ff 0%, #c7dbff 35%, #e2ecff 100%);
  border: 1px solid rgba(156, 183, 237, 0.5);
}

.auth-hero h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.auth-card {
  border-radius: 18px;
}

.auth-panel {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-panel.hidden {
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  transform: translateY(8px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #3f568d;
  border: 1px solid rgba(143, 164, 220, 0.55);
  background: rgba(236, 243, 255, 0.95);
}

.status-banner {
  border-radius: 10px;
  padding: 11px 13px;
  margin: 0 0 14px;
  font-size: 14px;
  border: 1px solid transparent;
}

.status-banner.info {
  background: rgba(75, 140, 247, 0.12);
  border-color: rgba(106, 166, 255, 0.45);
  color: #2559ad;
}

.status-banner.success {
  background: rgba(32, 160, 109, 0.12);
  border-color: rgba(66, 191, 137, 0.4);
  color: #116343;
}

.status-banner.error {
  background: rgba(203, 62, 82, 0.12);
  border-color: rgba(217, 101, 116, 0.45);
  color: #9a2436;
}

.card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 18px 40px rgba(109, 128, 170, 0.1);
}

.card h2 {
  margin: 0 0 13px;
  font-size: 20px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  color: #4a5979;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 5px;
  padding: 11px 12px;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text-primary);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #a0acc5;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(58, 118, 244, 0.72);
  box-shadow: 0 0 0 2px rgba(84, 127, 235, 0.16);
}

button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #2f80ed 0%, #1f71e3 100%);
  color: #f6f9ff;
  cursor: pointer;
  margin-right: 8px;
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

button:hover {
  background: linear-gradient(180deg, #3f8cf2 0%, #266fd8 100%);
}

button.secondary {
  background: #eef2fa;
  color: #53617e;
  border: 1px solid #d6dfef;
}

button.secondary:hover {
  background: #e8edf7;
}

button.danger {
  background: linear-gradient(180deg, #e55f74 0%, #cb3e52 100%);
}

button.danger:hover {
  background: linear-gradient(180deg, #ef7286 0%, #d24c60 100%);
}

.link-btn {
  border: none;
  background: transparent;
  color: #2a73e6;
  padding: 0;
  margin: 0;
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
  background: transparent;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.helper-text {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

#output {
  margin: 0;
  background: #f3f6fc;
  color: #2f3f5f;
  border-radius: 10px;
  padding: 13px;
  min-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid #d7e1f2;
}

@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }
}
