:root {
  --auth-bg: #f5f7fb;
  --auth-bg-alt: #ffffff;
  --auth-panel: rgba(255, 255, 255, 0.82);
  --auth-card: rgba(255, 255, 255, 0.96);
  --auth-line: rgba(89, 99, 184, 0.12);
  --auth-primary: #5963b8;
  --auth-primary-deep: #4952a0;
  --auth-secondary: #7c85c7;
  --auth-text: #334155;
  --auth-muted: #64748b;
  --auth-danger: #d14343;
  --auth-success: #11a675;
  --auth-shadow: 0 28px 72px rgba(35, 44, 84, 0.12);
}

body.auth-body {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 12% 18%, rgba(124, 133, 199, 0.16), transparent 20rem),
    radial-gradient(circle at 88% 82%, rgba(89, 99, 184, 0.16), transparent 24rem),
    linear-gradient(160deg, var(--auth-bg) 0%, var(--auth-bg-alt) 48%, #ffffff 100%);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  padding: 32px 22px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
}

.auth-shell::before {
  top: 7%;
  right: -8rem;
  width: 26rem;
  height: 26rem;
  background: linear-gradient(180deg, rgba(89, 99, 184, 0.16), rgba(124, 133, 199, 0.02));
  filter: blur(18px);
}

.auth-shell::after {
  bottom: -10rem;
  left: -10rem;
  width: 24rem;
  height: 24rem;
  background: linear-gradient(180deg, rgba(124, 133, 199, 0.18), rgba(124, 133, 199, 0.02));
  filter: blur(22px);
}

.auth-layout {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 430px) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.auth-layout-compact {
  max-width: 680px;
  width: 100%;
  grid-template-columns: 1fr;
}

.auth-card {
  background: var(--auth-card);
  border: 1px solid rgba(89, 99, 184, 0.08);
  border-radius: 30px;
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(18px);
}

.auth-panel-compact {
  width: 100%;
  min-height: 760px;
  padding: 42px 44px 36px;
}

.auth-panel-compact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: 30px 30px 0 0;
  background: linear-gradient(90deg, var(--auth-secondary), var(--auth-primary));
}

.auth-panel {
  position: relative;
  padding: 34px 34px 30px;
}

.auth-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(89, 99, 184, 0.08);
  color: var(--auth-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth-mark i {
  font-size: 18px;
}

.auth-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(17, 32, 58, 0.08);
}

.auth-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-head-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 600;
}

.auth-head-side i {
  font-size: 16px;
  color: var(--auth-primary);
}

.auth-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1f2952;
}

.auth-subtitle {
  margin: 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.7;
}

.auth-banner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.auth-banner-card {
  padding: 14px 14px 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(239, 246, 255, 0.92));
  border: 1px solid rgba(0, 82, 217, 0.08);
}

.auth-banner-label {
  display: block;
  font-size: 12px;
  color: var(--auth-muted);
}

.auth-banner-value {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  font-weight: 700;
  color: #13294b;
}

.auth-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.6;
}

.auth-alert-success {
  color: #0b7554;
  background: rgba(17, 166, 117, 0.09);
  border: 1px solid rgba(17, 166, 117, 0.14);
}

.auth-summary {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--auth-danger);
  background: rgba(209, 67, 67, 0.08);
  border: 1px solid rgba(209, 67, 67, 0.12);
  font-size: 13px;
}

.auth-summary:empty {
  display: none;
}

.auth-inline-message {
  display: block;
  min-height: 20px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
  visibility: hidden;
}

.auth-inline-message.show {
  visibility: visible;
}

.auth-inline-message.info,
.auth-inline-message.success {
  color: var(--auth-primary);
}

.auth-inline-message.error {
  color: var(--auth-danger);
}

.auth-tabs {
  display: inline-flex;
  width: 100%;
  padding: 6px;
  gap: 6px;
  border-radius: 18px;
  background: #f3f5fb;
  border: 1px solid rgba(89, 99, 184, 0.08);
}

.auth-tab {
  flex: 1 1 0;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  background: transparent;
  color: #62779c;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.auth-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--auth-secondary), var(--auth-primary));
  box-shadow: 0 10px 24px rgba(89, 99, 184, 0.22);
}

.auth-form {
  margin-top: 20px;
}

.auth-panel-compact .auth-form {
  display: flex;
  flex-direction: column;
}

.auth-form-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #1f3354;
  font-size: 13px;
  font-weight: 700;
}

.auth-section-title::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--auth-primary), var(--auth-secondary));
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-grid-single {
  grid-column: 1 / -1;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #203454;
}

.auth-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-label-note {
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .auth-input {
  padding-right: 56px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: transparent;
  color: #7b8da8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.auth-password-toggle:hover,
.auth-password-toggle.is-active {
  color: var(--auth-primary);
  background: rgba(89, 99, 184, 0.08);
}

.auth-password-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.auth-input {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: 1px solid rgba(89, 99, 184, 0.12);
  border-radius: 16px;
  background: rgba(248, 250, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  color: var(--auth-text);
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input::placeholder {
  color: #94a3b8;
}

.auth-input:focus {
  outline: 0;
  border-color: rgba(89, 99, 184, 0.42);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(89, 99, 184, 0.1);
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 144px;
  gap: 10px;
}

.auth-send-btn,
.auth-submit-btn,
.auth-link-btn {
  border: 0;
  border-radius: 16px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.auth-send-btn:hover,
.auth-submit-btn:hover,
.auth-link-btn:hover {
  transform: translateY(-1px);
}

.auth-send-btn {
  min-height: 54px;
  color: var(--auth-primary);
  background: rgba(89, 99, 184, 0.08);
  border: 1px solid rgba(89, 99, 184, 0.14);
}

.auth-send-btn:disabled {
  opacity: 0.68;
}

.auth-submit-btn {
  min-height: 54px;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-secondary), var(--auth-primary));
  box-shadow: 0 18px 28px rgba(89, 99, 184, 0.2);
}

.auth-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(17, 32, 58, 0.08);
}

.auth-link-btn {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  text-decoration: none;
  color: var(--auth-primary);
  background: rgba(89, 99, 184, 0.06);
  border: 1px solid rgba(89, 99, 184, 0.1);
}

.auth-helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.auth-helper-row a,
.auth-foot a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 700;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--auth-muted);
}

.auth-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--auth-primary);
}

.auth-error {
  display: block;
  font-size: 12px;
  color: var(--auth-danger);
}

.auth-error:empty,
.field-validation-valid.auth-error:empty {
  display: none;
}

.auth-foot {
  margin-top: 18px;
  text-align: center;
  color: var(--auth-muted);
  font-size: 13px;
}

.auth-panel-compact .auth-actions,
.auth-panel-compact .auth-foot {
  margin-top: auto;
}

.auth-panel-compact .auth-actions + .auth-foot {
  padding-top: 18px;
}

.auth-side {
  padding: 34px;
  background:
    linear-gradient(150deg, rgba(0, 82, 217, 0.95), rgba(44, 119, 255, 0.82)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  color: #fff;
  overflow: hidden;
}

.auth-side::before {
  content: "";
  position: absolute;
  inset: 24px 24px auto auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.auth-side-title {
  margin: 0 0 10px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 32px;
  line-height: 1.22;
  font-weight: 700;
}

.auth-side-copy {
  max-width: 540px;
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.82);
}

.auth-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.auth-side-box {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.auth-side-box strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.auth-side-box span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.8);
}

.auth-side-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-side-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
}

.auth-side-pill i {
  font-size: 16px;
}

.auth-hint {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(89, 99, 184, 0.05);
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 991.98px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-layout-compact {
    max-width: 100%;
  }

  .auth-side {
    order: -1;
  }

  .auth-title {
    font-size: 28px;
  }
}

@media (max-width: 767.98px) {
  .auth-shell {
    padding: 18px 14px;
    align-items: flex-start;
  }

  .auth-panel,
  .auth-side,
  .auth-panel-compact {
    padding: 24px 20px;
    border-radius: 24px;
  }

  .auth-panel-compact::before {
    border-radius: 24px 24px 0 0;
  }

  .auth-panel-compact {
    min-height: auto;
  }

  .auth-banner,
  .auth-grid,
  .auth-side-grid {
    grid-template-columns: 1fr;
  }

  .auth-code-row,
  .auth-actions,
  .auth-helper-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .auth-title {
    font-size: 25px;
  }

  .auth-side-title {
    font-size: 26px;
  }
}
