:root {
  color-scheme: light;
  --auth-ink: #172536;
  --auth-muted: #627084;
  --auth-line: #d9e1ea;
  --auth-primary: #075f73;
  --auth-primary-hover: #044b5b;
  --auth-accent: #e6a33a;
  --auth-error: #a72b35;
  --auth-success: #176c49;
}

* { box-sizing: border-box; }

body.auth-page {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  background:
    radial-gradient(circle at 15% 12%, rgba(230, 163, 58, .18), transparent 28rem),
    linear-gradient(145deg, #edf5f6 0%, #f9fbfc 50%, #e3eef1 100%);
}

.auth-shell {
  width: min(100% - 32px, 720px);
  margin: 0 auto;
  padding: 42px 0 64px;
}

.auth-brand {
  display: block;
  width: min(290px, 72vw);
  margin: 0 auto 24px;
}

.auth-brand img { display: block; width: 100%; height: auto; }

.auth-card {
  width: min(100%, 540px);
  margin: 0 auto;
  padding: 36px;
  border: 1px solid rgba(210, 221, 229, .9);
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 22px 60px rgba(28, 54, 69, .14);
}

.auth-card--wide { width: min(100%, 680px); }

.auth-card__header { margin-bottom: 26px; text-align: center; }
.auth-card__header h1 { margin: 4px 0 8px; font-size: clamp(28px, 5vw, 38px); letter-spacing: .06em; }
.auth-card__header p { margin: 0; color: var(--auth-muted); line-height: 1.7; }
.auth-eyebrow { color: var(--auth-primary) !important; font-size: 12px; font-weight: 800; letter-spacing: .2em; }

.auth-alert {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
}
.auth-alert--error { color: var(--auth-error); background: #fff0f1; border: 1px solid #f3c4c8; }
.auth-alert--success { color: var(--auth-success); background: #edf9f3; border: 1px solid #bce1ce; }

.auth-form { display: grid; gap: 18px; }
.auth-field { display: grid; gap: 8px; font-size: 15px; font-weight: 700; }
.auth-field input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--auth-line);
  border-radius: 9px;
  color: var(--auth-ink);
  background: #fff;
  font: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus { border-color: var(--auth-primary); box-shadow: 0 0 0 3px rgba(7, 95, 115, .14); }

.auth-password-input { position: relative; }
.auth-password-input input { padding-right: 66px; }
.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  min-width: 44px;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  color: var(--auth-primary);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(-50%);
}
.auth-password-toggle:hover { background: #edf5f6; }
.auth-password-toggle:focus-visible { outline: 2px solid var(--auth-primary); outline-offset: 1px; }

.auth-password-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-help { margin: -10px 0 0; color: var(--auth-muted); font-size: 13px; line-height: 1.6; }
.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-row img { border: 1px solid var(--auth-line); border-radius: 9px; background: #f1f5f9; }
.auth-link-button { padding: 8px 4px; border: 0; color: var(--auth-primary); background: none; font: inherit; font-weight: 700; cursor: pointer; }
.auth-link-button:hover { text-decoration: underline; }
.auth-check { display: flex; align-items: flex-start; gap: 9px; color: var(--auth-muted); font-size: 14px; line-height: 1.6; }
.auth-check input { margin-top: 4px; }

.auth-submit {
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--auth-primary);
  box-shadow: 0 8px 20px rgba(7, 95, 115, .22);
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
}
.auth-submit:hover { background: var(--auth-primary-hover); }
.auth-switch { margin: 24px 0 0; text-align: center; color: var(--auth-muted); }
.auth-switch a, .auth-back { color: var(--auth-primary); font-weight: 700; }
.auth-back { display: block; margin-top: 16px; text-align: center; font-size: 14px; }

@media (max-width: 620px) {
  .auth-shell { padding-top: 24px; }
  .auth-card { padding: 26px 20px; border-radius: 15px; }
  .auth-password-grid { grid-template-columns: 1fr; }
  .captcha-row { align-items: flex-start; flex-direction: column; }
}
