/* 登录页专用样式。不要把这些规则移动到全局 styles.css。 */
:root {
  --auth-ink: #20344f;
  --auth-muted: #6b7d95;
  --auth-line: #d6e1ee;
  --auth-blue: #54749a;
  --auth-blue-dark: #385979;
  --auth-page: #f2f7fb;
  --auth-danger: #bd3434;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.auth-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(219, 235, 249, 0.95), transparent 34%),
    linear-gradient(145deg, #f9fcff 0%, var(--auth-page) 100%);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.auth-card {
  width: min(100%, 450px);
  padding: 38px 40px 32px;
  border: 1px solid #e1eaf3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(34, 64, 96, 0.14);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--auth-ink);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}

.auth-brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  border-radius: 8px;
  background: var(--auth-blue);
  font-size: 17px;
  line-height: 1;
}

.eyebrow {
  margin: 26px 0 8px;
  color: var(--auth-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.auth-card h1 {
  margin: 0;
  color: var(--auth-ink);
  font-size: 30px;
  line-height: 1.25;
}

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

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 24px;
  padding: 4px;
  border-radius: 10px;
  background: #eef3f8;
}

.auth-tab {
  min-height: 40px;
  padding: 8px 10px;
  color: var(--auth-muted);
  border: 0;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.is-active {
  color: var(--auth-ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(34, 64, 96, 0.08);
}

.auth-panel {
  margin-top: 18px;
}

.auth-placeholder-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: var(--auth-blue);
  font-size: 24px;
  font-weight: 900;
}

.auth-card form,
.auth-modal-card form {
  display: grid;
  gap: 15px;
}

.auth-card form {
  margin-top: 26px;
}

.auth-card label,
.auth-modal-card label {
  display: grid;
  gap: 7px;
  color: var(--auth-ink);
  font-size: 14px;
  font-weight: 700;
}

.auth-card input,
.auth-modal-card input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--auth-ink);
  border: 1px solid var(--auth-line);
  border-radius: 9px;
  background: #fff;
  font: inherit;
  outline: none;
}

.auth-card input:focus,
.auth-modal-card input:focus {
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 3px rgba(84, 116, 154, 0.14);
}

.auth-submit {
  min-height: 46px;
  padding: 11px 15px;
  color: #fff;
  border: 0;
  border-radius: 9px;
  background: var(--auth-blue);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-submit:hover {
  background: var(--auth-blue-dark);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-error {
  min-height: 20px;
  margin: 0;
  color: var(--auth-danger);
  font-size: 13px;
  line-height: 1.5;
}

.auth-switch,
.auth-back {
  display: block;
  margin: 17px auto 0;
  padding: 0;
  color: var(--auth-blue-dark);
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: center;
}

.auth-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 17px;
}

.auth-link-row .auth-switch {
  margin: 0;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 39, 58, 0.42);
}

.auth-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 30px 32px 28px;
  border: 1px solid #e1eaf3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(34, 64, 96, 0.2);
}

.auth-modal-card h2 {
  margin: 0;
  color: var(--auth-ink);
  font-size: 24px;
}

.auth-modal-note {
  margin: 8px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-modal-card form {
  margin-top: 22px;
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--auth-muted);
  border: 0;
  background: transparent;
  font: 28px/1 Arial, sans-serif;
  cursor: pointer;
}

.auth-back {
  color: var(--auth-muted);
  text-decoration: none;
}

.sms-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.sms-row input {
  min-width: 0;
}

.sms-send-button {
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

@media (max-width: 520px) {
  body.auth-page {
    padding: 14px;
  }

  .auth-card {
    padding: 30px 22px 26px;
  }

  .sms-row {
    grid-template-columns: 1fr;
  }

  .auth-modal-card {
    padding: 26px 22px 24px;
  }
}
