/* Auth pages — institutional, restrained */

:root {
  --ink: #0d1520;
  --navy: #14233a;
  --steel: #5a6f86;
  --line: #d7dee8;
  --paper: #eef2f6;
  --white: #ffffff;
  --teal: #1f6f6a;
  --teal-deep: #165851;
  --danger: #9b2c2c;
  --ok: #1f6f6a;
  --font-sans: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(31, 111, 106, 0.1), transparent 42%),
    linear-gradient(180deg, #e7edf3 0%, var(--paper) 55%, #e9eef4 100%);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.auth-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 48px auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: calc(100vh - 96px);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(13, 21, 32, 0.08);
}

.auth-aside {
  background:
    linear-gradient(160deg, rgba(13, 21, 32, 0.82), rgba(20, 35, 58, 0.72)),
    url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1400&q=80") center/cover;
  color: var(--white);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-aside .brand {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-aside .brand span {
  display: block;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 500;
}

.auth-aside h2 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.35;
}

.auth-aside p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  max-width: 28ch;
  line-height: 1.7;
}

.auth-aside ul {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.auth-aside li {
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}

.auth-aside li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-main {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
}

.auth-main h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
}

.auth-lead {
  margin: 10px 0 28px;
  color: var(--steel);
  font-size: 0.95rem;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--steel);
}

.input-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  overflow: hidden;
}

.input-row:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 111, 106, 0.12);
}

.prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: #f5f8fb;
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 500;
  border-right: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
}

input[type="text"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.input-row input {
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 111, 106, 0.12);
}

.input-row input:focus {
  box-shadow: none;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 2px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s var(--ease), opacity 0.2s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  width: 100%;
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--teal-deep);
}

.btn-secondary {
  background: #eef3f7;
  color: var(--ink);
  min-width: 120px;
  white-space: nowrap;
}

.btn-secondary:hover:not(:disabled) {
  background: #e3ebf2;
}

.alert {
  display: none;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-left: 3px solid var(--danger);
  background: #faf2f2;
  color: var(--danger);
  font-size: 0.88rem;
  line-height: 1.5;
}

.alert.is-visible { display: block; }
.alert.is-ok {
  border-left-color: var(--ok);
  background: #eef7f6;
  color: var(--ok);
}

.hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

.auth-foot {
  margin-top: auto;
  padding-top: 24px;
  color: var(--steel);
  font-size: 0.88rem;
}

.security-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  background: #f4f7fa;
  border: 1px solid var(--line);
  color: var(--steel);
  font-size: 0.8rem;
  line-height: 1.55;
}

.auth-shell-single {
  grid-template-columns: 1fr;
  width: min(480px, calc(100% - 32px));
  min-height: auto;
  margin: 64px auto;
}

.field-row {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 18px;
}

.link-muted {
  color: var(--steel);
  font-size: 0.88rem;
}

.link-muted:hover {
  color: var(--teal);
}

.oauth-block {
  margin-top: 22px;
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--steel);
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.oauth-divider::before,
.oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.oauth-provider-hint {
  margin: 0 0 12px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--steel);
}

.oauth-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.oauth-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 118px;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #1f2937;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}

.oauth-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.oauth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.oauth-wx { color: #07c160; border-color: #b7ebc9; }
.oauth-wx:hover { border-color: #07c160; background: #f3fbf6; }

.oauth-qq { color: #12b7f5; border-color: #b6e7fb; }
.oauth-qq:hover { border-color: #12b7f5; background: #f2fbfe; }

.oauth-discord { color: #5865f2; border-color: #c8ccfb; }
.oauth-discord:hover { border-color: #5865f2; background: #f5f6ff; }

.oauth-note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--steel);
  line-height: 1.5;
}

input:disabled {
  background: #f4f7fa;
  color: var(--steel);
}

.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 8px;
  font-size: 0.86rem;
  color: var(--steel);
  font-weight: 400;
}

.agree-row input {
  width: auto;
  height: auto;
  margin-top: 3px;
  min-height: 0;
}

.agree-row a { color: var(--teal); }

.geetest-box {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f8fafb;
  overflow: visible;
  position: relative;
  z-index: 5;
}

.geetest-box:empty::after {
  content: "人机验证加载中…";
  color: var(--steel);
  font-size: 0.86rem;
}


@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
    margin: 16px auto;
    min-height: auto;
  }

  .auth-aside {
    min-height: 220px;
    padding: 28px 24px;
  }

  .auth-aside h2,
  .auth-aside ul {
    display: none;
  }

  .auth-main {
    padding: 32px 24px 28px;
  }
}

@media (max-width: 640px) {
  .auth-shell,
  .auth-shell-single {
    margin: 16px auto;
  }

  .auth-main {
    padding: 28px 20px;
  }
}
