:root {
  --primary: #1e3a8a;
  --primary-dark: #172c6a;
  --primary-light: #3b5bdb;
  --primary-soft: #e8edfa;
  --bg: #f4f7fb;
  --card-bg: #ffffff;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --text-hint: #9ca3af;
  --border: #d1d5db;
  --border-focus: #1e3a8a;
  --error: #dc2626;
  --shadow: 0 20px 40px -15px rgba(30, 58, 138, 0.25), 0 6px 12px -4px rgba(30, 58, 138, 0.08);
  --radius-card: 14px;
  --radius-input: 8px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 15% 20%, rgba(30, 58, 138, 0.08), transparent 60%),
    radial-gradient(900px 500px at 85% 80%, rgba(59, 91, 219, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.register-card {
  position: relative;
  z-index: 1;
  width: 1180px;
  max-width: 96vw;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 380px 1fr;
  overflow: hidden;
}

.brand {
  position: relative;
  padding: 48px 44px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.brand::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 60%);
  border-radius: 50%;
}

.brand::before {
  content: "";
  position: absolute;
  left: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent 60%);
  border-radius: 50%;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo img {
  width: 28px;
  height: 28px;
  display: block;
}

.brand-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.brand-title small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.75;
  margin-top: 2px;
}

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

.brand-hero h1 {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 18px 0;
  letter-spacing: 1px;
}

.brand-hero p {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 24px 0;
}

.brand-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.brand-features li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-features li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(59, 91, 219, 0.25);
  flex-shrink: 0;
}

.brand-footer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  z-index: 1;
}

.form-wrap {
  padding: 40px 48px;
  max-height: 90vh;
  overflow-y: auto;
}

.form-wrap::-webkit-scrollbar {
  width: 6px;
}

.form-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.form-wrap::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.form-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--text-hint);
}

.form-header {
  margin-bottom: 24px;
}

.form-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--text);
}

.form-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.section-num {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 500;
}

.field-label.required::before {
  content: "*";
  color: var(--error);
  margin-right: 4px;
}

.input-box {
  position: relative;
}

.input-box .icon-left,
.input-box .icon-right {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}

.input-box .icon-left {
  left: 14px;
}

.input-box .icon-right {
  right: 12px;
  cursor: pointer;
  padding: 0 4px;
  user-select: none;
}

.input-box .icon-right:hover {
  color: var(--primary);
}

.input-box input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  font-family: inherit;
}

.input-box input::placeholder {
  color: #a3a9b3;
}

.input-box input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.field.error .input-box input {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.field .input-box input.with-eye {
  padding-right: 44px;
}

.field-hint {
  font-size: 12px;
  color: var(--text-hint);
  margin-top: 6px;
  line-height: 1.4;
}

.field-error {
  display: none;
  font-size: 12px;
  color: var(--error);
  margin-top: 6px;
  line-height: 1.4;
}

.field.error .field-error {
  display: block;
}

.upload-box {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-input);
  padding: 0;
  cursor: pointer;
  transition: all 0.18s ease;
  background: #fafbfc;
  min-height: 110px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.upload-box:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.upload-box.error {
  border-color: var(--error);
  background: rgba(220, 38, 38, 0.04);
}

.upload-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  width: 100%;
}

.upload-icon {
  color: var(--primary);
  flex-shrink: 0;
  opacity: 0.85;
}

.upload-text {
  flex: 1;
}

.upload-main {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.upload-sub {
  font-size: 12px;
  color: var(--text-hint);
}

.upload-preview {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  width: 100%;
  gap: 16px;
}

.preview-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.preview-icon {
  color: var(--primary);
  flex-shrink: 0;
  opacity: 0.85;
}

.preview-text {
  flex: 1;
  min-width: 0;
}

.preview-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-size {
  font-size: 12px;
  color: var(--text-hint);
}

.remove-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(220, 38, 38, 0.1);
  color: var(--error);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.remove-btn:hover {
  background: rgba(220, 38, 38, 0.18);
}

.agreement-field {
  margin: 24px 0 20px;
  position: relative;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  user-select: none;
  font-size: 13px;
}

.remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.link {
  color: var(--primary);
  text-decoration: none;
}

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

.btn-primary {
  width: 100%;
  height: 46px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-input);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.08s ease;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary[disabled] {
  background: #7b86a8;
  cursor: not-allowed;
}

.register-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.form-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-hint);
}

.icon-svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-foot {
  position: absolute;
  bottom: 14px;
  right: 20px;
  font-size: 12px;
  color: #8a93a6;
  z-index: 1;
}

@media (max-width: 1100px) {
  .register-card {
    width: 96vw;
    grid-template-columns: 320px 1fr;
  }
  .form-wrap {
    padding: 36px 40px;
  }
  .brand {
    padding: 40px 36px;
  }
  .brand-hero h1 {
    font-size: 22px;
  }
}

@media (max-width: 900px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 768px) {
  .register-card {
    grid-template-columns: 1fr;
  }
  .brand {
    display: none;
  }
  .form-wrap {
    padding: 32px 24px;
    max-height: none;
    overflow: visible;
  }
  .form-header h2 {
    font-size: 20px;
  }
}
