:root {
  --primary: #1e3a8a;
  --primary-dark: #172c6a;
  --primary-light: #3b5bdb;
  --primary-soft: #e8edfa;
  --bg: #f4f7fb;
  --card-bg: #ffffff;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --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;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 1040px;
  max-width: 94vw;
  min-height: 560px;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 55fr 45fr;
  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: 28px;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 18px 0;
  letter-spacing: 1px;
}

.brand-hero p {
  font-size: 14px;
  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: 56px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

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

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

.field {
  margin-bottom: 18px;
}

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

.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: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  font-family: inherit;
}

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

.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);
}

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

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

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

.extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
  font-size: 13px;
}

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

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

.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: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.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: 1023px) {
  .login-card {
    width: 92vw;
    min-height: 520px;
  }
  .form-wrap {
    padding: 48px 40px;
  }
  .brand {
    padding: 40px 36px;
  }
  .brand-hero h1 {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .login-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .brand {
    display: none;
  }
  .form-wrap {
    padding: 40px 28px;
  }
  .form-header h2 {
    font-size: 20px;
  }
}
