/* 确保 hidden 属性不被任何 display 规则覆盖 */
[hidden] { display: none !important; }

:root {
  color-scheme: light;
  --auth-bg: #f2eadf;
  --auth-card: rgba(255, 252, 247, 0.88);
  --auth-border: rgba(134, 106, 72, 0.16);
  --auth-shadow: 0 34px 90px rgba(70, 49, 26, 0.18);
  --auth-text: #2f261e;
  --auth-muted: #786759;
  --auth-accent: #c69a42;
  --auth-accent-dark: #8e6a2d;
  --auth-white: rgba(255, 255, 255, 0.92);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(380px, 0.85fr);
}

.auth-hero {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(42, 28, 15, 0.18) 0%, rgba(42, 28, 15, 0.38) 100%),
    url("./assets/home-hero.jpg") center 38% / cover no-repeat,
    linear-gradient(135deg, #e6d5bf 0%, #cdb08c 45%, #b49471 100%);
}

.auth-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 247, 232, 0.55), transparent 30%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 22%, transparent 78%, rgba(255, 255, 255, 0.1));
}

.auth-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  min-height: 100%;
  padding: 64px;
  color: var(--auth-white);
}

.auth-kicker {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-hero-copy h1 {
  margin: 0 0 16px;
  font-size: 54px;
  line-height: 1.06;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.auth-hero-copy p {
  max-width: 540px;
  margin: 0;
  font-size: 18px;
  line-height: 1.8;
}

.auth-card {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: 44px 40px;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(248, 240, 229, 0.95));
}

.auth-switcher {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(228, 214, 193, 0.4);
  width: 100%;
}

.auth-switch {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--auth-muted);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.auth-switch--active {
  background: rgba(255, 255, 255, 0.9);
  color: var(--auth-text);
  box-shadow: 0 10px 24px rgba(80, 58, 32, 0.09);
}

.auth-copy {
  margin-bottom: 6px;
}

.auth-form-kicker {
  margin: 0 0 10px;
  color: var(--auth-muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-copy h2 {
  margin: 0 0 10px;
  font-size: 34px;
}

.auth-copy p {
  margin: 0;
  line-height: 1.7;
  color: var(--auth-muted);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 8px;
}

.auth-form span {
  font-size: 14px;
  color: var(--auth-muted);
}

.auth-form input,
.auth-form select,
.auth-static-field {
  width: 100%;
  min-height: 54px;
  border-radius: 18px;
  border: 1px solid rgba(121, 93, 64, 0.18);
  background: rgba(255, 255, 255, 0.92);
  padding: 0 16px;
  font-size: 16px;
}

.auth-form select {
  appearance: none;
  color: var(--auth-text);
}

.auth-static-field {
  display: flex;
  align-items: center;
  color: var(--auth-text);
  font-weight: 600;
}

.auth-search-select {
  position: relative;
}

.auth-search-select-input {
  width: 100%;
}

.auth-search-select-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(121, 93, 64, 0.18);
  background: rgba(255, 251, 245, 0.98);
  box-shadow: 0 18px 36px rgba(89, 58, 36, 0.16);
}

.auth-search-select-results[hidden] {
  display: none !important;
}

.auth-search-select-option,
.auth-search-select-empty {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(121, 93, 64, 0.12);
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 14px;
  font-size: 15px;
  text-align: left;
}

.auth-search-select-option {
  cursor: pointer;
  color: var(--auth-text);
}

.auth-search-select-option:hover {
  border-color: rgba(185, 101, 45, 0.28);
  background: rgba(255, 247, 237, 0.98);
}

.auth-search-select-empty {
  color: var(--auth-muted);
}

.primary-button {
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-dark) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-hint {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 247, 237, 0.94);
  border: 1px solid rgba(198, 154, 66, 0.16);
  color: var(--auth-muted);
}

.auth-hint strong {
  display: block;
  margin-bottom: 10px;
  color: var(--auth-text);
}

.auth-hint ul {
  margin: 0;
  padding-left: 18px;
}

.auth-error {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(187, 45, 34, 0.07);
  border: 1px solid rgba(187, 45, 34, 0.18);
  color: #bb2d22;
  font-size: 14px;
  font-weight: 600;
}

/* 注册入口小链接 */
.auth-register-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--auth-muted);
  font-size: 14px;
}

.auth-register-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--auth-accent);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-register-link:hover {
  color: var(--auth-accent-dark);
}

/* 注册表单返回按钮 */
.auth-back-link {
  display: inline-block;
  margin-bottom: 14px;
  border: none;
  background: none;
  padding: 0;
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.auth-back-link:hover {
  color: var(--auth-text);
}

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

  .auth-hero {
    min-height: 38vh;
    background-position: center 30%;
  }

  .auth-hero-copy {
    padding: 36px 24px;
  }

  .auth-hero-copy h1 {
    font-size: 40px;
  }

  .auth-card {
    padding: 28px 20px 36px;
  }
}

.auth-field-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #aaa;
}
