:root {
  --ink: #111827;
  --muted: #687386;
  --line: #dfe4e8;
  --paper: #f2f5f3;
  --accent: #00a57a;
  --acid: #c9ff4a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Microsoft YaHei", Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
a {
  color: inherit;
}
.member-auth-page {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 12% 14%,
      rgba(201, 255, 74, 0.3),
      transparent 24%
    ),
    linear-gradient(135deg, #eef3ef, #f7f8f5);
}
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(520px, 1.1fr);
  position: relative;
}
.auth-brand {
  position: absolute;
  top: 34px;
  left: 42px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.auth-logo {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  object-fit: contain;
  color: transparent;
  text-indent: -9999px;
  background: url("/assets/images/alliance-logo.svg") center/contain no-repeat;
}
.auth-brand strong,
.auth-brand small {
  display: block;
}
.auth-brand strong {
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 0.02em;
}
.auth-brand small {
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.2;
  letter-spacing: 0.24em;
}
.auth-intro {
  padding: 150px 7vw 70px;
  background: #111827;
  color: white;
  position: relative;
  overflow: hidden;
}
.auth-intro > p,
.auth-card header > span {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 700;
}
.auth-intro h1 {
  font-size: clamp(38px, 4.4vw, 68px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 26px 0;
}
.auth-intro > span {
  position: absolute;
  bottom: 55px;
  font-size: 13px;
  color: #aeb7c5;
}
.auth-orb {
  width: min(28vw, 320px);
  aspect-ratio: 1;
  position: absolute;
  right: -60px;
  bottom: 14%;
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
}
.auth-orb:before,
.auth-orb:after,
.auth-orb i {
  content: "";
  position: absolute;
  border: 1px solid rgba(201, 255, 74, 0.6);
  border-radius: 45% 55% 48% 52%;
  inset: 12%;
  animation: orbit 12s linear infinite;
}
.auth-orb:after {
  inset: 24%;
  border-color: rgba(0, 165, 122, 0.7);
  animation-direction: reverse;
}
.auth-orb i:nth-child(2) {
  inset: 4%;
  border-color: rgba(255, 255, 255, 0.18);
  animation-duration: 18s;
}
.auth-orb b {
  font-size: 22px;
  letter-spacing: 0.25em;
  color: var(--acid);
}
@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}
.auth-card {
  align-self: center;
  width: min(680px, calc(100% - 64px));
  margin: 80px auto 40px;
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  padding: clamp(28px, 4vw, 58px);
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.08);
}
.auth-card h2 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 12px 0;
}
.auth-card header p {
  color: var(--muted);
  line-height: 1.7;
}
.member-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 32px;
}
.member-form-grid label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.member-form-grid .wide {
  grid-column: 1/-1;
}
.member-form-grid input,
.member-form-grid select,
.member-form-grid textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 12px 2px;
  font: inherit;
  outline: none;
}
.member-form-grid input:focus,
.member-form-grid select:focus {
  border-color: var(--accent);
}
.member-form-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}
.code-row button {
  border: 1px solid var(--ink);
  background: transparent;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}
.member-primary {
  width: 100%;
  border: 0;
  background: var(--ink);
  color: white;
  padding: 17px 22px;
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  cursor: pointer;
}
.member-primary:hover {
  background: var(--accent);
}
.auth-card footer {
  text-align: center;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}
.auth-card footer a {
  color: var(--accent);
  font-weight: 700;
}
.member-error {
  background: #fff0ed;
  border-left: 3px solid #d9503f;
  padding: 12px 14px;
  margin: 20px 0;
  font-size: 13px;
}
.auth-login .auth-card {
  max-width: 560px;
}
@media (max-width: 850px) {
  .auth-layout {
    display: block;
  }
  .auth-brand {
    position: relative;
    top: auto;
    left: auto;
    padding: 22px 24px;
  }
  .auth-intro {
    min-height: 300px;
    padding: 70px 26px 40px;
  }
  .auth-intro h1 {
    font-size: 42px;
  }
  .auth-orb {
    width: 220px;
    right: -45px;
    bottom: -45px;
  }
  .auth-intro > span {
    display: none;
  }
  .auth-card {
    width: calc(100% - 28px);
    margin: -22px auto 30px;
    position: relative;
    padding: 28px 22px;
  }
  .member-form-grid {
    grid-template-columns: 1fr;
  }
  .member-form-grid .wide {
    grid-column: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-orb:before,
  .auth-orb:after,
  .auth-orb i {
    animation: none;
  }
}
.profile-page {
  background: #eef2ef;
  min-height: 100vh;
}
.profile-header {
  height: 88px;
  padding: 0 4vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.profile-header .auth-brand {
  position: static;
}
.profile-header nav {
  display: flex;
  gap: 24px;
  font-size: 13px;
}
.profile-shell {
  width: min(1200px, calc(100% - 36px));
  margin: 36px auto 90px;
}
.profile-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  background: var(--ink);
  color: #fff;
  padding: 34px;
}
.profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 45% 55% 48% 52%;
  display: grid;
  place-items: center;
  background: var(--accent);
  font-size: 30px;
  position: relative;
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.profile-avatar.is-certified:after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid var(--acid);
  border-radius: inherit;
  animation: orbit 8s linear infinite;
}
.profile-hero p {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--acid);
}
.profile-hero h1 {
  margin: 5px 0;
  font-size: 36px;
}
.profile-hero > em {
  font-style: normal;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 9px 14px;
}
.member-success {
  background: #e4fff4;
  border-left: 3px solid var(--accent);
  padding: 13px 15px;
  margin-top: 18px;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 20px;
  margin-top: 20px;
}
.profile-panel {
  background: #fff;
  padding: 28px;
  border: 1px solid var(--line);
}
.profile-panel > header {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.profile-panel > header > span {
  color: var(--accent);
  font-weight: 800;
}
.profile-panel h2 {
  margin: 0 0 6px;
}
.profile-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.alliance-apply textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 12px;
  margin-top: 10px;
}
.alliance-apply dl {
  margin-top: 26px;
}
.alliance-apply dl div {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.alliance-apply dd {
  margin: 0;
  color: var(--accent);
}
.application-state {
  padding: 20px;
  background: #f4f6f4;
  margin-top: 24px;
}
.application-state.approved {
  background: #e5fff4;
  color: #087e5f;
}
.registration-list {
  margin-top: 20px;
}
.empty-line {
  padding: 30px 0;
}
.registration-cards article {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.registration-cards small {
  color: var(--accent);
}
.registration-cards h3 {
  margin: 5px 0;
}
.registration-cards a {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid;
}
.quiz-participation { margin-top: 20px; }
.quiz-state { color: var(--accent); font-weight: 800; }
.quiz-state-timeout { color: #c64d3c; }
.quiz-participation .registration-card-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
@media (max-width: 850px) {
  .profile-header {
    height: auto;
    padding: 16px;
  }
  .profile-header nav {
    gap: 12px;
  }
  .profile-shell {
    margin-top: 18px;
  }
  .profile-hero {
    grid-template-columns: auto 1fr;
    padding: 22px;
  }
  .profile-hero > em {
    grid-column: 1/-1;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-panel {
    padding: 20px;
  }
}
