* { margin: 0; padding: 0; box-sizing: border-box; }

body.auth-page,
body {
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  color: #15182a;
  background:
    radial-gradient(circle at 16% 18%, rgba(62, 216, 208, .18), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(122, 101, 255, .18), transparent 32%),
    linear-gradient(180deg, #fbffff 0%, #f5f3ff 55%, #f7f8fc 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 0;
}

.auth-top-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #1d2032;
  font-size: 18px;
  font-weight: 850;
  text-decoration: none;
}

.auth-top-mark {
  position: relative;
  width: 34px;
  height: 26px;
}

.auth-top-mark::before,
.auth-top-mark::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(90deg, #4938d1, #7868ff);
  transform: skewX(-22deg);
}

.auth-top-mark::before { left: 0; top: 2px; }
.auth-top-mark::after { right: 0; bottom: 2px; }

.auth-top-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-top-links a {
  padding: 8px 12px;
  border-radius: 9px;
  color: #4b5163;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.auth-top-links a:hover { color: #6251f3; background: #f5f3ff; }
.auth-top-links a.primary {
  color: #fff;
  background: #1f2130;
}

.auth-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  padding: 36px 20px 48px;
}

.auth-brand {
  width: min(440px, 100%);
  margin-bottom: 18px;
  text-align: center;
  color: #2a3044;
}

.auth-brand h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -.03em;
}

.auth-brand p {
  margin: 0;
  color: #697086;
  font-size: 14px;
  line-height: 1.6;
}

.auth-box {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid #e9eaf1;
  border-radius: 18px;
  padding: 34px 32px 28px;
  box-shadow: 0 18px 50px rgba(40, 44, 75, .08);
}

.auth-box h2 {
  margin: 0 0 22px;
  text-align: center;
  font-size: 22px;
  color: #1d2032;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #4b5163;
  font-size: 13px;
  font-weight: 650;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e5ef;
  border-radius: 10px;
  background: #fbfbfe;
  color: #1d2032;
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: rgba(98, 81, 243, .45);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(98, 81, 243, .12);
}

.form-hint {
  margin: 6px 0 0;
  color: #8a93a8;
  font-size: 12px;
  line-height: 1.45;
}

.invite-tip {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #00b7f0;
  background: #e8f8fd;
  font-size: 12px;
}

.msg {
  min-height: 18px;
  margin-bottom: 14px;
  text-align: center;
  font-size: 13px;
}

.msg.error { color: #ef4444; }
.msg.success { color: #16a34a; }

.auth-btn {
  width: 100%;
  margin-top: 6px;
  padding: 13px 14px;
  border: none;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(120deg, #4938d1, #7563ff);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.auth-btn:hover { filter: brightness(1.04); }
.auth-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.auth-footer {
  margin-top: 18px;
  text-align: center;
  color: #697086;
  font-size: 13px;
}

.auth-footer a {
  color: #6251f3;
  font-weight: 700;
  text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

.back-home {
  display: inline-block;
  margin-top: 16px;
  color: #6251f3;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.back-home:hover { text-decoration: underline; }

body.auth-page .official-footer,
body .official-footer {
  width: 100%;
  flex: 0 0 auto;
  align-self: stretch;
  margin-top: auto;
}

@media (max-width: 640px) {
  .auth-top { width: calc(100% - 28px); }
  .auth-box { padding: 28px 20px 22px; }
  .auth-brand h1 { font-size: 24px; }
}
