*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body.login-page {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Helvetica Neue", Arial, sans-serif;
  color: #0f1b36;
  background: linear-gradient(160deg, #f6f8fc 0%, #f2f6ff 45%, #f4f9ff 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 56px;
}

.login-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(
      600px 420px at 15% 10%,
      rgba(117, 162, 255, 0.18),
      transparent 70%
    ),
    radial-gradient(
      520px 360px at 90% 0%,
      rgba(95, 185, 255, 0.14),
      transparent 75%
    ),
    radial-gradient(
      680px 480px at 15% 90%,
      rgba(104, 179, 255, 0.16),
      transparent 80%
    );
  pointer-events: none;
  z-index: 0;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.register-wrapper {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0 auto;
  padding: 40px 18px 60px;
}

.login-brand {
  text-align: center;
  color: #0f1b36;
}

.brand-logo {
  display: flex;
  justify-content: center;
}

.brand-logo.push-down {
  margin-top: 18px;
}

.register-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 6px;
}

.nav-back {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(73, 117, 208, 0.18);
}

.nav-back-icon {
  width: 10px;
  height: 10px;
  border-left: 2px solid #345aff;
  border-bottom: 2px solid #345aff;
  transform: rotate(45deg);
  margin-left: 4px;
}

.register-header-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a2b4d;
}

.register-header-placeholder {
  width: 40px;
  height: 40px;
}

.register-hero {
  text-align: left;
  width: 100%;
  padding: 12px 6px 0;
}

.hero-greeting {
  font-size: 26px;
  font-weight: 700;
  color: #122344;
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 13px;
  color: #526281;
  line-height: 1.6;
}

.logo-circle {
  width: 96px;
  height: 96px;
  border-radius: 32px;
  background: linear-gradient(145deg, #ffffff 0%, #e8f3ff 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 36px rgba(64, 129, 255, 0.2),
    inset 0 2px 6px rgba(255, 255, 255, 0.6);
}

.logo-cloud {
  width: 60px;
  height: 60px;
}

.brand-title {
  font-size: 28px;
  font-weight: 700;
  margin-top: 18px;
  letter-spacing: 1px;
}

.brand-subtitle {
  margin-top: 8px;
  font-size: 15px;
  color: #4a5d7f;
  line-height: 1.6;
}

.login-card {
  width: 100%;
  background: #ffffff;
  border-radius: 26px;
  padding: 28px 28px 32px;
  box-shadow: 0 30px 54px rgba(24, 66, 153, 0.16);
}

.register-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  box-shadow: 0 28px 55px rgba(38, 98, 210, 0.18);
  padding: 32px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: #f1f6ff;
  padding: 6px;
  border-radius: 16px;
  margin-bottom: 24px;
}

.mode-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #4a5d7f;
  font-size: 15px;
  font-weight: 500;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn.active {
  background: linear-gradient(125deg, #367bff 0%, #2f62ff 90%);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(53, 117, 255, 0.25);
}

.form-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 14px;
  color: #6f7c96;
}

.register-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.register-label {
  font-size: 14px;
  font-weight: 600;
  color: #24324f;
  letter-spacing: 0.3px;
}

.input-group {
  position: relative;
}

.register-input {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f7faff;
  border-radius: 18px;
  padding: 14px 18px;
  box-shadow: inset 0 0 0 1px rgba(118, 148, 221, 0.18);
}

.register-input input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: #0f1b36;
  outline: none;
}

.register-input input::placeholder {
  color: #9dadc6;
}

.link-button {
  border: none;
  background: transparent;
  color: #2f62ff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.link-button:disabled {
  color: rgba(47, 98, 255, 0.45);
  cursor: not-allowed;
}

.input-append {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(90, 124, 190, 0.14);
  cursor: pointer;
  position: relative;
}

.input-append::before,
.input-append::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.input-append::before {
  width: 16px;
  height: 10px;
  border: 2px solid rgba(68, 110, 185, 0.85);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom: none;
  transform: translateY(2px);
  background: transparent;
}

.input-append::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(68, 110, 185, 0.85);
  transform: translateY(-1px);
}

.input-append.visible::after {
  background: transparent;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(68, 110, 185, 0.85);
}

.register-field.optional .register-input {
  background: rgba(247, 250, 255, 0.85);
  box-shadow: inset 0 0 0 1px rgba(118, 148, 221, 0.12);
}

.form-item input {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.4;
  background: linear-gradient(130deg, #fafdff 0%, #f1f5ff 100%);
  color: #0f1b36;
  box-shadow: inset 0 0 0 1px rgba(82, 118, 205, 0.12), 0 0 0 transparent;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.form-item input::placeholder {
  color: #97a5c3;
}

.form-item input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(45, 112, 255, 0.55),
    0 10px 18px rgba(55, 119, 255, 0.15);
  transform: translateY(-1px);
}

.password-item .input-group input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(90, 124, 190, 0.14);
  cursor: pointer;
}

.password-toggle::before,
.password-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(68, 110, 185, 0.85);
  border-top-color: transparent;
  background: none;
  transform: rotate(45deg);
}

.password-toggle::after {
  width: 6px;
  height: 6px;
  background: rgba(68, 110, 185, 0.85);
}

.password-toggle.visible::after {
  background: transparent;
  border: 2px solid rgba(68, 110, 185, 0.85);
}

.with-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.btn.primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(130deg, #3e7bff 0%, #335eff 90%);
  color: #ffffff;
  box-shadow: 0 18px 28px rgba(56, 113, 255, 0.3);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 32px rgba(56, 113, 255, 0.34);
}

.btn.primary:active {
  transform: translateY(1px);
  box-shadow: 0 14px 24px rgba(56, 113, 255, 0.26);
}

.btn.ghost {
  padding: 16px 18px;
  background: #eef3ff;
  color: #2f62ff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(63, 104, 192, 0.18);
  white-space: nowrap;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

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

.agreement {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #5c6988;
  cursor: pointer;
}

.agreement input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eef2fb;
  box-shadow: inset 0 0 0 1px rgba(78, 109, 185, 0.4);
  position: relative;
  transition: all 0.2s ease;
}

.agreement input:checked + .indicator {
  background: linear-gradient(130deg, #3b74ff 0%, #2d5fff 90%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.agreement input:checked + .indicator::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%) rotate(45deg);
  width: 9px;
  height: 5px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-top: none;
  border-left: none;
}

.agreement-text a {
  color: #2f62ff;
  text-decoration: none;
}

.agreement-text a:hover {
  text-decoration: underline;
}

.link {
  color: #2f62ff;
  text-decoration: none;
  font-size: 14px;
}

.link:hover {
  text-decoration: underline;
}

.link-light {
  color: #5c6d92;
}

.register-row {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #5c6d92;
}

.register-row .link-primary {
  margin-left: 6px;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.doc-body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(160deg, #f3f7ff 0%, #eef4ff 70%, #f7f8fc 100%);
  color: #0f1b36;
  min-height: 100vh;
  margin: 0;
  padding: 36px 14px 60px;
}

.doc-page {
  max-width: 720px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  box-shadow: 0 32px 60px rgba(38, 98, 210, 0.16);
  padding: 28px 26px 40px;
}

.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.doc-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 34px;
  font-size: 14px;
  color: #2f62ff;
  text-decoration: none;
  background: rgba(47, 98, 255, 0.12);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.doc-back:hover {
  background: rgba(47, 98, 255, 0.22);
}

.doc-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f1b36;
  margin: 0;
}

.doc-spacer {
  width: 70px;
  height: 34px;
}

.doc-content h1 {
  font-size: 22px;
  margin: 28px 0 16px;
  font-weight: 700;
  color: #10213d;
}

.doc-content h2 {
  font-size: 18px;
  margin: 24px 0 12px;
  font-weight: 700;
  color: #19325a;
}

.doc-content p {
  font-size: 14px;
  line-height: 1.8;
  color: #47556f;
  margin: 10px 0;
}

.doc-content ul {
  margin: 12px 0 12px 20px;
  padding: 0;
}

.doc-content li {
  font-size: 14px;
  line-height: 1.8;
  color: #47556f;
  margin-bottom: 6px;
}

.doc-strong {
  font-weight: 600;
  color: #2c3f63;
}

.doc-content br {
  line-height: 1.8;
}

@media (max-width: 520px) {
  body.login-page {
    padding: 36px 12px 48px;
  }

  .register-wrapper {
    width: 100%;
    padding: 28px 14px 52px;
    gap: 20px;
  }

  .login-card {
    border-radius: 22px;
    padding: 24px 22px 28px;
  }

  .register-card {
    border-radius: 24px;
    padding: 28px 22px 26px;
  }

  .mode-btn {
    font-size: 14px;
    padding: 11px;
  }

  .form-item input {
    padding: 14px 16px;
  }

  .register-input {
    padding: 12px 16px;
  }

  .doc-body {
    padding: 24px 12px 40px;
  }

  .doc-page {
    padding: 24px 18px 32px;
    border-radius: 24px;
  }

  .doc-title {
    font-size: 20px;
  }
}

@media (max-width: 360px) {
  .brand-title {
    font-size: 24px;
  }

  .logo-circle {
    width: 82px;
    height: 82px;
  }

  .hero-greeting {
    font-size: 24px;
  }

  .doc-title {
    font-size: 18px;
  }
}
