﻿:root {
  --ink: #152433;
  --muted: #657383;
  --navy: #0b2740;
  --navy-2: #123b5c;
  --navy-3: #0d3350;
  --gold: #c9a227;
  --gold-soft: #f0eadc;
  --line: #dbe3e8;
  --wash: #f3f6f7;
  --danger: #b64b45;
  --shadow: 0 10px 36px rgba(11, 39, 64, 0.08);
  --radius: 10px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--wash);
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.auth-page {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

/* —— 整体布局 —— */
.auth-layout {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* —— 品牌区 —— */
.auth-brand {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-2) 52%, var(--navy-3) 100%);
}

.auth-brand-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background:
    radial-gradient(circle at 18% 22%, rgba(201, 162, 39, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(255, 255, 255, 0.06) 0%, transparent 38%),
    linear-gradient(135deg, transparent 48%, rgba(201, 162, 39, 0.08) 48%, rgba(201, 162, 39, 0.08) 49%, transparent 49%);
}

.auth-brand-pattern::before,
.auth-brand-pattern::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-radius: 50%;
}

.auth-brand-pattern::before {
  width: 280px;
  height: 280px;
  top: -90px;
  right: -70px;
}

.auth-brand-pattern::after {
  width: 160px;
  height: 160px;
  bottom: -50px;
  left: -40px;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: calc(28px + env(safe-area-inset-top, 0px)) 24px 28px;
}

.auth-hero-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--navy);
  border-radius: 8px;
  font-family: STKaiti, KaiTi, serif;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.auth-brand-title {
  margin: 16px 0 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.auth-brand-subtitle {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.auth-brand-desc {
  display: none;
  margin: 20px 0 0;
  padding-top: 18px;
  max-width: 280px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.7;
  border-top: 1px solid rgba(201, 162, 39, 0.35);
}

.auth-brand-accent {
  display: none;
  width: 40px;
  height: 3px;
  margin-top: 24px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

/* —— 表单区 —— */
.auth-main {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--wash);
  overflow: hidden;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  padding: 24px 20px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card-head {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.auth-card h1 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 22px;
  font-weight: 800;
}

.auth-card .lead {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.auth-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: #3d4f5c;
  font-size: 12px;
  font-weight: 700;
}

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #ced9de;
  border-radius: 8px;
  outline: none;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 39, 64, 0.07);
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.remember-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--navy);
}

.auth-form-foot {
  margin-top: 4px;
  padding-top: 4px;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: var(--navy);
  background: var(--gold-soft);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: filter 0.12s ease;
}

.btn-primary:hover {
  filter: brightness(0.98);
}

.btn-primary:active {
  filter: brightness(0.95);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-links {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.auth-links a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-info {
  margin-bottom: 16px;
  padding: 10px 12px;
  color: #3d4f5c;
  background: #f7f9fa;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
}

.validation-summary-errors,
.field-validation-error {
  color: var(--danger);
  font-size: 12px;
}

.validation-summary-errors {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: #fdf3f2;
  border: 1px solid #f0d4d2;
  border-radius: 8px;
  line-height: 1.5;
}

.field-validation-error {
  display: block;
  margin-top: 5px;
}

.input-validation-error {
  border-color: var(--danger) !important;
}

/* —— 注册页：紧凑布局，一屏展示 —— */
.auth-page--register .auth-main {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
}

.auth-page--register .auth-card {
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.auth-page--register .auth-card-head {
  margin-bottom: 16px;
  padding-bottom: 14px;
  flex-shrink: 0;
}

.auth-page--register .auth-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-page--register .auth-fields {
  flex: 1;
  min-height: 0;
}

.auth-page--register .field {
  margin-bottom: 12px;
}

.auth-page--register .field label {
  margin-bottom: 6px;
  font-size: 13px;
}

.auth-page--register .field input[type="text"],
.auth-page--register .field input[type="password"] {
  height: 46px;
  font-size: 16px;
}

.auth-page--register .auth-form-foot {
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 0;
}

.auth-page--register .btn-primary {
  min-height: 48px;
  font-size: 15px;
}

.auth-page--register .auth-links {
  margin-top: 16px;
  padding-top: 14px;
  font-size: 13px;
  flex-shrink: 0;
}

/* —— 中屏：品牌区缩为顶部横幅 —— */
@media (min-width: 768px) and (max-width: 1023px) {
  .auth-brand-inner {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 18px 28px;
  }

  .auth-hero-mark {
    width: 44px;
    height: 44px;
    font-size: 24px;
    margin: 0;
  }

  .auth-brand-title {
    margin: 0;
    font-size: 16px;
  }

  .auth-brand-subtitle {
    margin: 4px 0 0;
    font-size: 12px;
  }

  .auth-main {
    padding: 20px 28px;
    align-items: center;
  }

  .auth-card {
    max-width: 480px;
    padding: 24px 28px 20px;
  }

  .auth-page--register .auth-brand-inner {
    padding: 14px 24px;
  }

  .auth-page--register .lead {
    display: none;
  }

  .auth-page--register .auth-card h1 {
    font-size: 22px;
    margin-bottom: 0;
  }

  .auth-page--register .field {
    margin-bottom: 11px;
  }

  .auth-page--register .field input[type="text"],
  .auth-page--register .field input[type="password"] {
    height: 44px;
    font-size: 15px;
  }

  .auth-page--register .btn-primary {
    min-height: 46px;
    font-size: 15px;
  }
}

/* —— 大屏：左右分栏 —— */
@media (min-width: 1024px) {
  .auth-layout {
    flex-direction: row;
  }

  .auth-brand {
    flex: 0 0 44%;
    max-width: 520px;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .auth-brand-inner {
    padding: 40px 36px;
    max-width: 360px;
  }

  .auth-hero-mark {
    width: 64px;
    height: 64px;
    font-size: 34px;
    border-radius: 10px;
  }

  .auth-brand-title {
    font-size: 22px;
    letter-spacing: 0.1em;
  }

  .auth-brand-subtitle {
    font-size: 14px;
    margin-top: 10px;
  }

  .auth-brand-desc,
  .auth-brand-accent {
    display: block;
  }

  .auth-main {
    flex: 1;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    align-items: center;
    justify-content: center;
    padding: 24px 40px;
    overflow: hidden;
  }

  .auth-card {
    width: 100%;
    max-width: 440px;
    max-height: 100%;
    padding: 28px 32px 24px;
    border-radius: 12px;
    overflow: hidden;
  }

  .auth-card h1 {
    font-size: 22px;
  }

  .auth-page--register .auth-main {
    padding: 20px 36px;
  }

  .auth-page--register .auth-card {
    max-width: 460px;
    padding: 28px 32px 22px;
  }

  .auth-page--register .lead {
    display: none;
  }

  .auth-page--register .auth-card-head {
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .auth-page--register .auth-card h1 {
    font-size: 22px;
    margin-bottom: 0;
  }

  .auth-page--register .field {
    margin-bottom: 10px;
  }

  .auth-page--register .field label {
    margin-bottom: 5px;
    font-size: 12px;
  }

  .auth-page--register .field input[type="text"],
  .auth-page--register .field input[type="password"] {
    height: 42px;
    font-size: 15px;
    padding: 0 14px;
  }

  .auth-page--register .btn-primary {
    min-height: 44px;
    font-size: 15px;
  }

  .auth-page--register .auth-links {
    margin-top: 14px;
    padding-top: 12px;
    font-size: 13px;
  }

  .field input[type="text"],
  .field input[type="password"] {
    height: 44px;
    font-size: 14px;
  }

  .btn-primary {
    min-height: 44px;
    font-size: 14px;
  }
}

@media (min-width: 1280px) {
  .auth-brand {
    flex: 0 0 42%;
    max-width: none;
  }

  .auth-main {
    padding: 24px 56px;
  }

  .auth-page--register .auth-main {
    padding: 24px 64px;
  }
}

/* —— 小屏微调 —— */
@media (max-width: 767px) {
  .auth-card {
    box-shadow: none;
    border: 0;
    border-radius: 0;
    padding: 20px 16px 16px;
  }

  .auth-brand-title {
    font-size: 16px;
  }

  .auth-brand-subtitle {
    font-size: 12px;
  }

  .auth-page--register .auth-brand-inner {
    padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 12px;
  }

  .auth-page--register .auth-hero-mark {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .auth-page--register .auth-brand-title {
    margin-top: 10px;
    font-size: 15px;
  }

  .auth-page--register .lead {
    font-size: 12px;
    line-height: 1.5;
  }

  .auth-page--register .auth-card-head {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .auth-page--register .field {
    margin-bottom: 10px;
  }

  .auth-page--register .field input[type="text"],
  .auth-page--register .field input[type="password"] {
    height: 44px;
  }
}

@media (max-width: 380px) {
  .auth-main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .auth-card {
    padding: 20px 16px 18px;
  }

  .auth-brand-inner {
    padding-left: 16px;
    padding-right: 16px;
  }
}
