:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --line: #dde3ec;
  --text: #111827;
  --muted: #667085;
  --faint: #98a2b3;
  --primary: #0f766e;
  --primary-strong: #0b5f59;
  --primary-soft: #e7f7f5;
  --blue: #2563eb;
  --rose: #be123c;
  --rose-soft: #ffe8ef;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
  --radius: 8px;
  --font: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 700;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 480px);
}

.brand-stage {
  min-height: 100vh;
  padding: 44px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: #f8fafc;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(15, 118, 110, 0.9)),
    linear-gradient(45deg, #111827, #0f766e);
}

.brand-lockup {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #f8fafc;
}

.brand-lockup img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(45, 212, 191, 0.22);
}

.brand-lockup span {
  font-size: 18px;
  font-weight: 900;
}

.stage-copy {
  align-self: center;
  max-width: 620px;
  display: grid;
  gap: 14px;
}

.eyebrow {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  color: #5eead4;
  background: rgba(45, 212, 191, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.stage-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: 0;
}

.stage-copy p {
  margin: 0;
  max-width: 560px;
  color: #cbd5e1;
  font-size: 16px;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-strip span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.status-strip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5eead4;
}

.auth-side {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(100%, 410px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.auth-card-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.auth-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #042f2e;
  background: #5eead4;
  font-weight: 900;
}

.auth-card-head h2 {
  margin: 0;
  font-size: 20px;
}

.auth-card-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-form {
  display: grid;
  gap: 15px;
  padding: 20px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: 0;
  padding: 9px 11px;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
}

.password-field .icon-button {
  position: absolute;
  right: 4px;
  top: 4px;
}

.icon-button:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}

.icon-button svg,
.submit-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.invite-help {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  overflow: hidden;
}

.invite-help summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.invite-help summary::-webkit-details-marker {
  display: none;
}

.invite-help summary::after {
  content: "+";
  color: var(--primary-strong);
  font-size: 18px;
  line-height: 1;
}

.invite-help[open] summary::after {
  content: "-";
}

.invite-help-panel {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.invite-help-panel img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: var(--radius);
  background: #0f1115;
}

.invite-help-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 12px;
}

.invite-help-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.invite-help-meta strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 18px;
}

.submit-button {
  min-height: 42px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}

.submit-button:hover {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  transform: translateY(14px);
  opacity: 0;
  pointer-events: none;
  transition: 0.18s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast[data-type="success"] {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}

.toast[data-type="error"] {
  border-color: color-mix(in srgb, var(--rose) 45%, var(--line));
  background: var(--rose-soft);
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .brand-stage {
    min-height: auto;
    padding: 28px;
    gap: 48px;
  }

  .stage-copy h1 {
    font-size: 32px;
  }

  .auth-side {
    min-height: auto;
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .brand-stage {
    padding: 22px;
  }

  .stage-copy h1 {
    font-size: 27px;
  }

  .form-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
