:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #17213b;
  background: #f7f9ff;
  font-synthesis: none;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 11% 16%, rgba(93, 112, 255, .16), transparent 31rem),
    radial-gradient(circle at 88% 84%, rgba(125, 82, 255, .13), transparent 33rem),
    linear-gradient(135deg, #f8faff 0%, #f3f6ff 48%, #fbf8ff 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
}

body::before {
  width: 22rem;
  height: 22rem;
  left: -12rem;
  bottom: -7rem;
  background: rgba(90, 119, 255, .10);
}

body::after {
  width: 18rem;
  height: 18rem;
  right: -8rem;
  top: -6rem;
  background: rgba(150, 89, 255, .09);
}

.page-shell {
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0 44px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: #17213b;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 440px);
  gap: clamp(54px, 8vw, 118px);
  align-items: center;
  padding: 62px 0 52px;
}

.intro { max-width: 650px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(87, 102, 244, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #5965cc;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(62, 71, 141, .06);
}

.eyebrow span,
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #695cf5;
  box-shadow: 0 0 0 5px rgba(105, 92, 245, .10);
}

h1 {
  margin: 25px 0 18px;
  font-size: clamp(36px, 3.6vw, 50px);
  line-height: 1.12;
  letter-spacing: -.055em;
}

h1 .title-line {
  display: block;
  white-space: nowrap;
}

h1 em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  color: transparent;
  background: linear-gradient(95deg, #556cf5, #8d53e9);
  background-clip: text;
  -webkit-background-clip: text;
}

.lead {
  max-width: 560px;
  margin: 0;
  color: #69738e;
  font-size: 17px;
  line-height: 1.8;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.feature-grid article {
  min-width: 0;
  padding: 15px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(90, 104, 178, .10);
  border-radius: 15px;
  background: rgba(255, 255, 255, .68);
}

.feature-grid strong,
.feature-grid span { display: block; }
.feature-grid strong { font-size: 13px; margin-bottom: 4px; }
.feature-grid span { color: #8a92a8; font-size: 11px; white-space: nowrap; }

.feature-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background-color: #eef0ff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px;
}

.shield { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%236057e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.bolt { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%236057e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m13 2-9 12h8l-1 8 9-12h-8l1-8Z'/%3E%3C/svg%3E"); }
.globe { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%236057e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15 15 0 0 1 0 20M12 2a15 15 0 0 0 0 20'/%3E%3C/svg%3E"); }

.endpoint-card {
  max-width: 560px;
  margin-top: 18px;
  padding: 20px 22px 22px;
  border: 1px solid rgba(77, 91, 174, .14);
  border-radius: 20px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 14px 35px rgba(44, 57, 124, .06);
}

.endpoint-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
  color: #222c45;
  font-size: 13px;
}

.endpoint-top strong {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.gateway-icon {
  color: #5b6ff3;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 800;
}

.gateway-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #159e6c;
  font-weight: 750;
}

.gateway-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ebd86;
  box-shadow: 0 0 0 5px rgba(46, 189, 134, .10);
}

.endpoint-code {
  padding: 16px 18px;
  border-radius: 15px;
  background: rgba(238, 241, 251, .78);
}

.endpoint-code code {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  color: #687187;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.8;
}

.endpoint-code b { font-weight: 800; }
.endpoint-code .method { color: #139e70; }
.endpoint-code .auth { color: #7a4ef0; }

.login-card {
  padding: clamp(30px, 4vw, 44px);
  border: 1px solid rgba(91, 104, 178, .11);
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 30px 80px rgba(51, 58, 123, .13);
  backdrop-filter: blur(18px);
}

.login-card h2 {
  margin: 0;
  color: #202943;
  font-size: 23px;
}

.card-subtitle {
  margin: 8px 0 22px;
  color: #8a92a8;
  font-size: 13px;
}

form label {
  display: block;
  margin: 17px 0 8px;
  color: #46506a;
  font-size: 13px;
  font-weight: 700;
}

form label:first-of-type { margin-top: 0; }

.field {
  position: relative;
  display: flex;
  align-items: center;
}

.field input {
  width: 100%;
  height: 51px;
  padding: 0 48px 0 44px;
  border: 1px solid #e1e5f0;
  border-radius: 12px;
  outline: none;
  background: #fbfcff;
  color: #202943;
  font: inherit;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.field input:focus {
  border-color: #7b70ed;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(101, 89, 232, .09);
}

.field input::placeholder { color: #a9afbf; }

.user-icon,
.lock-icon,
.invite-icon {
  position: absolute;
  left: 16px;
  z-index: 1;
  width: 17px;
  height: 17px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .55;
}

.user-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%235b647d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); }
.lock-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%235b647d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
.invite-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%235b647d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='m10.85 12.15 8.64-8.64M18 5l2 2M15 8l2 2'/%3E%3C/svg%3E"); }

.toggle-password {
  position: absolute;
  right: 13px;
  padding: 5px;
  border: 0;
  background: transparent;
  color: #7b849b;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.message {
  min-height: 21px;
  margin-top: 12px;
  color: #d64355;
  font-size: 13px;
  line-height: 1.55;
}

.message.success { color: #168c65; }

.submit {
  width: 100%;
  height: 51px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(100deg, #5b6ff3, #8b5ce8);
  color: white;
  font: inherit;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 13px 27px rgba(100, 86, 230, .23);
  transition: transform .18s, box-shadow .18s, opacity .18s;
}

.submit:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(100, 86, 230, .28); }
.submit:active { transform: translateY(0); }
.submit:disabled { cursor: wait; opacity: .7; transform: none; }

.secondary-link {
  display: block;
  margin-top: 18px;
  color: #6559da;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.secondary-link:hover { text-decoration: underline; }

.secondary-note {
  margin: 18px 0 0;
  color: #7c859c;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.invite-required {
  margin: 26px 0 8px;
  padding: 28px 24px;
  border: 1px solid #e4e7f2;
  border-radius: 16px;
  background: #f8f9fd;
  text-align: center;
}

.invite-required-icon {
  display: block;
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #ebeafd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%236559da' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='m10.85 12.15 8.64-8.64M18 5l2 2M15 8l2 2'/%3E%3C/svg%3E") center / 22px no-repeat;
}

.invite-required h3 {
  margin: 0 0 10px;
  color: #27304a;
  font-size: 17px;
}

.invite-required p {
  margin: 5px 0;
  color: #7c859c;
  font-size: 13px;
  line-height: 1.65;
}

.register-hero { padding-top: 44px; }
.register-card { padding-top: 32px; padding-bottom: 30px; }

@media (max-width: 920px) {
  .page-shell { width: min(680px, calc(100% - 36px)); }
  .hero { grid-template-columns: 1fr; gap: 38px; padding-top: 48px; }
  .intro { text-align: center; margin: 0 auto; }
  .lead, .endpoint-card { margin-left: auto; margin-right: auto; }
  .feature-grid article { text-align: left; }
  .login-card { width: min(440px, 100%); margin: 0 auto; }
}

@media (max-width: 580px) {
  .page-shell { width: min(100% - 28px, 480px); padding-top: 22px; }
  .hero { padding-top: 36px; }
  h1 { font-size: clamp(27px, 8vw, 38px); }
  .lead { font-size: 15px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article { padding: 13px 15px; }
  .feature-grid span { white-space: normal; }
  .endpoint-card { text-align: left; overflow: hidden; }
  .endpoint-code code { grid-template-columns: 54px minmax(0, 1fr); overflow: hidden; }
  .endpoint-code code span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .login-card { padding: 28px 22px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
