:root {
  --auth-gold: #d6a51f;
  --auth-gold-dark: #9b6c00;
  --auth-ink: #20232b;
  --auth-muted: #717986;
  --auth-line: #d9dde3;
  --auth-soft: #f4f5f7;
}

html { min-height: 100%; }

body.auth-page {
  min-height: 100%;
  height: auto;
  margin: 0;
  padding: 28px 14px;
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
  color: var(--auth-ink);
  background: linear-gradient(180deg, #f7f8fa 0%, #eef1f4 100%);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.auth-page .page-wrap {
  display: block;
  width: min(100%, 520px);
  max-width: 520px;
  margin: auto;
  overflow: hidden;
  border: 1px solid #d7dbe1;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(24, 29, 38, .12);
}

.auth-page.auth-register-page .page-wrap { max-width: 560px; }

.auth-page .hero {
  min-height: 0;
  padding: 22px 22px 20px;
  border: 0;
  background: linear-gradient(145deg, #fffdf5 0%, #fff8df 52%, #f8e9bd 100%) !important;
  background-image: none !important;
  color: #202124;
}

.auth-page .hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
  opacity: 1;
  filter: none;
}
.auth-page .hero > div { position: relative; z-index: 1; }
.auth-page .hero > .hero-color-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  background: linear-gradient(145deg, #fffef8 0%, #fff8df 48%, #f6e5b4 100%);
  pointer-events: none;
}

.auth-page .hero::before,
.auth-page .hero::after { display: none; }

.auth-page .hero-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-align: left;
}

.auth-page .hero-logo {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border: 1px solid rgba(235, 191, 75, .38);
  border-radius: 17px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

.auth-page .hero-header .hero-title {
  color: #171717;
  font-size: 1.36rem;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.02em;
  white-space: nowrap;
  text-shadow: none;
  background: none;
  -webkit-text-fill-color: #171717;
}

.auth-page .hero-sub {
  margin-top: 5px;
  color: #686868;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.45;
  text-shadow: none;
}

.auth-page .hero-eyebrow {
  margin: 13px 0 7px;
  color: #cfc6b5;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.auth-page .hero-badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 24px;
  margin: 34px 0 0;
}

.auth-page .badge {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 50px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  background-image: none !important;
  color: #222 !important;
  font-size: .94rem;
  font-weight: 700;
  line-height: 1.18;
  text-align: left;
  box-shadow: none;
}

.auth-page .badge svg {
  width: 38px;
  height: 38px;
  margin-right: 12px;
  padding-right: 0;
  flex: 0 0 38px;
  box-sizing: border-box;
  border-right: 0;
  color: #4a4a4a !important;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}
.auth-page .badge span { font-weight: 800; letter-spacing: -.01em; }
.auth-page .badge::before { display: none; }

.auth-page .form-side {
  min-width: 0;
  padding: 27px 25px 0;
  border: 0;
  background: #fff;
  color: var(--auth-ink);
}

.auth-page .form-header { display: block; margin: 0 0 20px; }
.auth-page .form-title {
  color: #15181e;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.auth-page .form-subtitle {
  margin-top: 6px;
  color: var(--auth-muted);
  font-size: .84rem;
  line-height: 1.45;
}
.auth-page .form-card { margin: 0; padding: 0; }
.auth-page .form-group { margin: 0 0 16px; }
.auth-page .form-group label {
  display: block;
  margin-bottom: 7px;
  color: #24272e;
  font-size: .88rem;
  font-weight: 700;
}
.auth-page .form-group label span { color: #24272e; }

.auth-page input[type="text"],
.auth-page input[type="email"],
.auth-page input[type="password"] {
  width: 100%;
  height: 51px;
  padding: 0 14px;
  border: 1.5px solid #bfc4cb;
  border-radius: 13px;
  outline: none;
  background: #fff;
  color: #20232b;
  font-size: 1rem;
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.auth-page input::placeholder { color: #9aa0a9; }
.auth-page input:focus {
  border-color: #c99919;
  box-shadow: 0 0 0 3px rgba(214, 165, 31, .14);
}
.auth-page input:-webkit-autofill,
.auth-page input:-webkit-autofill:hover,
.auth-page input:-webkit-autofill:focus {
  -webkit-text-fill-color: #20232b;
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out;
}

.auth-page .password-control,
.auth-page .form-row { position: relative; display: block; }
.auth-page .password-control input,
.auth-page .form-row input { padding-right: 67px; }
.auth-page .password-toggle,
.auth-page .pw-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 40px;
  min-width: 40px;
  height: 37px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #666d77;
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}
.auth-page .password-toggle svg,
.auth-page .pw-toggle svg {
  width: 20px;
  height: 20px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.auth-page .password-toggle .eye-closed,
.auth-page .pw-toggle .eye-closed { display: none; }
.auth-page .password-toggle.is-revealed .eye-open,
.auth-page .pw-toggle.is-revealed .eye-open { display: none; }
.auth-page .password-toggle.is-revealed .eye-closed,
.auth-page .pw-toggle.is-revealed .eye-closed { display: block; }
.auth-page .password-toggle:hover,
.auth-page .pw-toggle:hover { background: #f2f3f5; color: #292d34; }

.auth-page .policy,
.auth-page .terms {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 4px 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #3d424a;
  font-size: .8rem;
  line-height: 1.52;
}
.auth-page .policy input,
.auth-page .terms input {
  appearance: none !important;
  -webkit-appearance: none !important;
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: 0 0 18px;
  border: 1.5px solid #b98a17 !important;
  border-radius: 5px;
  outline: none;
  background: #fff !important;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.auth-page .policy input:hover,
.auth-page .terms input:hover {
  border-color: #8f6500;
  box-shadow: 0 0 0 3px rgba(201,153,25,.12);
}
.auth-page .policy input:checked,
.auth-page .terms input:checked {
  border-color: #ad7900 !important;
  background-color: #d4a01c !important;
  background-image: linear-gradient(145deg,#edca5d,#c89213) !important;
  box-shadow: inset 0 0 0 1px rgba(255,238,168,.48), 0 2px 5px rgba(133,91,0,.2);
}
.auth-page .policy input:checked::after,
.auth-page .terms input:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 7px;
  height: 4px;
  border-left: 2px solid #211a0b;
  border-bottom: 2px solid #211a0b;
  transform: rotate(-45deg);
}
.auth-page .policy input:focus-visible,
.auth-page .terms input:focus-visible {
  box-shadow: 0 0 0 3px rgba(201,153,25,.25);
}
.auth-page .policy a,
.auth-page .terms a { color: #735000; font-weight: 700; text-decoration: underline; }

.auth-page .btn-login,
.auth-page .btn-register {
  width: 100%;
  min-height: 52px;
  border: 1px solid #c5910f;
  border-radius: 999px;
  background: linear-gradient(100deg, #efd063 0%, #d7a71f 62%, #c28d09 100%);
  color: #241c08;
  font-size: .98rem;
  font-weight: 800;
  box-shadow: 0 7px 14px rgba(151, 106, 0, .24);
}
.auth-page .btn-login:hover,
.auth-page .btn-register:hover { filter: brightness(1.03); transform: translateY(-1px); }

.auth-page .auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: #70757d;
  font-size: .78rem;
}
.auth-page .auth-divider::before,
.auth-page .auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e0e3e7;
}

.auth-page .google-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  border: 1px solid #d3d7dc;
  border-radius: 999px;
  background: #fff;
  color: #202124;
  font-size: .91rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease;
}
.auth-page .google-auth-btn:hover { background: #f8f9fa; border-color: #b7bdc4; }
.auth-page .google-auth-btn svg { width: 20px; height: 20px; flex: 0 0 20px; }

.auth-page .auth-links,
.auth-page .login-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 17px 0 21px;
  padding: 0 2px;
  color: #555c66;
  font-size: .84rem;
  text-align: left;
}
.auth-page .auth-links .left,
.auth-page .auth-links .right { display: flex; align-items: center; gap: 5px; }
.auth-page .auth-links a,
.auth-page .login-link a {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #654700;
  font-weight: 700;
  text-decoration: underline;
}

.auth-page .security-strip {
  margin: 0 -25px;
  padding: 14px 20px 16px;
  border-top: 1px solid #e3e6e9;
  background: #f3f4f6;
}
.auth-page .security-title {
  margin-bottom: 9px;
  color: #4f5660;
  font-size: .74rem;
  font-weight: 800;
}
.auth-page .security-items { display: flex; flex-wrap: wrap; gap: 7px; }
.auth-page .security-item {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border: 1px solid #d7dbe0;
  border-radius: 999px;
  background: #fff;
  color: #5e6570;
  font-size: .68rem;
  font-weight: 700;
}

.auth-page .error {
  margin: 0 0 16px;
  border-color: #efb6bd;
  background: #fff2f3;
  color: #a22939;
}
.auth-page .form-hint { color: #7d8490; }
.auth-page .error-msg { color: #b12b3d; }
.auth-page .strength { background: #eceef1; }
.auth-page .strength.ok1 i,
.auth-page .strength.ok2 i,
.auth-page .strength.ok3 i { background: #c99b1e; }
.auth-page .ref-chipbar { margin: -5px 0 16px; }
.auth-page .chip-pill { border-color: #ead89d; background: #fff9e8; color: #514219; }
.auth-page .toast { color: #fff; }

@media (min-width: 761px) {
  body.auth-page { align-items: center; }
  .auth-page .page-wrap,
  .auth-page.auth-register-page .page-wrap {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    width: min(100%, 980px);
    max-width: 980px;
  }
  .auth-page.auth-register-page .page-wrap {
    width: min(100%, 1040px);
    max-width: 1040px;
  }
  .auth-page .hero {
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 30px 25px;
  }
  .auth-page .hero > div {
    width: 100%;
    align-self: center;
  }
  .auth-page .form-side {
    padding: 31px 31px 0;
  }
  .auth-page .auth-links,
  .auth-page .login-link { margin-bottom: 27px; }
}

@media (max-width: 560px) {
  body.auth-page { padding: 12px 10px; }
  .auth-page .page-wrap { border-radius: 20px; }
  .auth-page .hero { padding: 20px 18px 18px; }
  .auth-page .hero-logo { width: 58px; height: 58px; flex-basis: 58px; border-radius: 15px; }
  .auth-page .hero-header { justify-content: flex-start; gap: 11px; }
  .auth-page .hero-header .hero-title { font-size: 1.23rem; white-space: nowrap; }
  .auth-page .hero-sub { font-size: .8rem; }
  .auth-page .hero-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; margin-top: 24px; }
  .auth-page .badge { min-height: 42px; padding: 0; font-size: .76rem; border-radius: 0; }
  .auth-page .badge svg { width: 29px; height: 29px; flex-basis: 29px; margin-right: 7px; padding-right: 0; }
  .auth-page .form-side { padding: 23px 20px 0; }
  .auth-page .form-title { font-size: 1.32rem; }
  .auth-page .form-group { margin-bottom: 12px; }
  .auth-page .form-group label { margin-bottom: 5px; font-size: .8rem; }
  .auth-page input[type="text"],
  .auth-page input[type="email"],
  .auth-page input[type="password"] {
    height: 44px;
    padding-left: 12px;
    font-size: .9rem;
  }
  .auth-page .password-toggle,
  .auth-page .pw-toggle { height: 34px; }
  .auth-page .btn-login,
  .auth-page .btn-register {
    min-height: 46px;
    font-size: .9rem;
  }
  .auth-page .security-strip { margin: 0 -20px; padding-left: 18px; padding-right: 18px; }
  .auth-page .auth-links { gap: 8px; }
  .auth-page .auth-links .left,
  .auth-page .auth-links .right { flex: 0 1 auto; }
  .auth-page .auth-links a { width: auto; }
}

@media (max-width: 370px) {
  .auth-page .hero-header .hero-title { font-size: 1.08rem; }
  .auth-page .hero-sub { font-size: .72rem; }
  .auth-page .badge { font-size: .68rem; padding: 0; }
  .auth-page .badge svg { width: 26px; height: 26px; flex-basis: 26px; margin-right: 6px; padding-right: 0; }
  .auth-page .form-side { padding-left: 17px; padding-right: 17px; }
  .auth-page .security-strip { margin-left: -17px; margin-right: -17px; }
}
