:root {
  --brand-blue: #1a8cff;
  --brand-blue-deep: #0d6fd8;
  --text: #1a1a1a;
  --text-muted: #8a8f99;
  --danger: #e64545;
  --line: #e6e8eb;
  --bg: #f3f5f8;
  --radius: 4px;
  --font: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
}

a:hover {
  opacity: 0.85;
}

.register-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.register-page .home-header {
  background: #fff;
  border-bottom: 1px solid #eef0f3;
}

.register-main {
  flex: 1;
  padding: 28px 20px 40px;
}

.register-wrap {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.register-card {
  flex: 1;
  background: #fff;
  border-radius: 6px;
  padding: 28px 36px 36px;
  box-shadow: 0 2px 12px rgba(20, 40, 80, 0.04);
  min-width: 0;
}

.register-title {
  margin: 0 0 22px;
  font-size: 18px;
  font-weight: 700;
  color: #222;
  display: flex;
  align-items: center;
  gap: 8px;
}

.register-title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: var(--brand-blue);
  border-radius: 2px;
}

.register-tip {
  background: #fff8e6;
  border: 1px solid #ffe2a8;
  color: #8a6d1d;
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.reg-form .form-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.reg-form .form-label {
  width: 130px;
  flex-shrink: 0;
  padding-top: 10px;
  text-align: right;
  font-size: 14px;
  color: #333;
  line-height: 1.4;
}

.reg-form .form-label .req {
  color: var(--danger);
  margin-right: 2px;
}

.reg-form .form-field {
  flex: 1;
  min-width: 0;
  padding-left: 16px;
}

.reg-form .form-control,
.reg-form select.form-control {
  width: 100%;
  max-width: 420px;
  height: 40px;
  border: 1px solid #d9dde3;
  border-radius: var(--radius);
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reg-form .form-control:focus,
.reg-form select.form-control:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(26, 140, 255, 0.12);
}

.reg-form .form-control.is-error,
.reg-form select.form-control.is-error {
  border-color: var(--danger);
}

.reg-form .form-control::placeholder {
  color: #b0b6bf;
}

.region-row {
  display: flex;
  gap: 10px;
  max-width: 420px;
  flex-wrap: wrap;
}

.region-row select {
  flex: 1;
  min-width: 120px;
  max-width: none;
}

.field-with-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.field-with-hint .form-control {
  max-width: 280px;
}

.field-hint {
  font-size: 12px;
  color: #999;
  line-height: 1.5;
  max-width: 280px;
}

.captcha-field {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 420px;
}

.captcha-field .form-control {
  flex: 1;
  max-width: none;
}

.btn-sms {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--brand-blue);
  background: #fff;
  color: var(--brand-blue);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-sms:hover:not(:disabled) {
  background: #eef6ff;
}

.btn-sms:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-error {
  margin-top: 6px;
  font-size: 12px;
  color: var(--danger);
  min-height: 16px;
  line-height: 1.4;
}

.contact-wrap {
  position: relative;
  max-width: 420px;
}

.contact-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(20, 40, 80, 0.1);
  z-index: 20;
  max-height: 220px;
  overflow: auto;
}

.contact-dropdown.is-open {
  display: block;
}

.contact-dropdown__item,
.contact-dropdown__empty {
  padding: 10px 12px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}

.contact-dropdown__item:hover {
  background: #f5f8fc;
  color: var(--brand-blue);
}

.contact-dropdown__empty {
  color: #999;
  cursor: default;
}

.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 22px 146px;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

.agree-row input {
  margin-top: 3px;
}

.btn-submit {
  margin-left: 146px;
  width: 160px;
  height: 42px;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand-blue);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.15em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(26, 140, 255, 0.25);
  transition: background 0.2s ease;
}

.btn-submit:hover:not(:disabled) {
  background: var(--brand-blue-deep);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.register-side {
  width: 260px;
  flex-shrink: 0;
}

.side-box {
  background: #f7f8fa;
  border-radius: 6px;
  padding: 18px 16px;
  font-size: 13px;
  color: #555;
  line-height: 1.7;
}

.side-box h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: #333;
}

.side-box p {
  margin: 0 0 12px;
}

.side-box p:last-child {
  margin-bottom: 0;
}

.side-login {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
}

.side-login a {
  color: var(--brand-blue);
}

.register-page .home-footer {
  background: #fff;
  border-top: 1px solid #eef0f3;
}

.form-tip-msg {
  margin: 12px 0 0 146px;
  font-size: 13px;
  color: var(--danger);
  min-height: 18px;
}

@media (max-width: 900px) {
  .register-wrap {
    flex-direction: column;
  }

  .register-side {
    width: 100%;
  }

  .register-card {
    padding: 22px 16px 28px;
  }

  .reg-form .form-row {
    flex-direction: column;
  }

  .reg-form .form-label {
    width: auto;
    text-align: left;
    padding-top: 0;
    margin-bottom: 8px;
  }

  .reg-form .form-field {
    padding-left: 0;
  }

  .reg-form .form-control,
  .reg-form select.form-control,
  .region-row,
  .contact-wrap,
  .captcha-field {
    max-width: none;
  }

  .agree-row,
  .btn-submit,
  .form-tip-msg {
    margin-left: 0;
  }

  .btn-submit {
    width: 100%;
  }
}
