:root {
  --surface: #fcf8fb;
  --text: #1c1b1d;
  --primary: #006c49;
  --primary-deep: #005136;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

body.login-page {
  display: block;
  padding: 0;
  background: #cfb69f;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.role-switch {
  display: flex;
}

.role-switch button {
  border: 0;
  background: transparent;
  font: inherit;
}

.stitch-login-shell {
  position: relative;
  width: 100%;
  min-width: 100vw;
  min-height: 100vh;
  padding: 48px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #cfb69f;
}

.stitch-login-scene,
.stitch-login-overlay {
  position: absolute;
  inset: 0;
}

.stitch-login-scene {
  z-index: 0;
}

.stitch-login-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.88) contrast(0.95) brightness(0.99);
}

.stitch-login-overlay {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(70, 43, 22, 0.46) 0%, rgba(165, 123, 88, 0.2) 27%, rgba(247, 240, 231, 0.12) 54%, rgba(241, 234, 225, 0.58) 100%),
    radial-gradient(circle at 18% 18%, rgba(255, 225, 196, 0.16), transparent 30%),
    radial-gradient(circle at 50% 49%, rgba(255, 239, 212, 0.22), transparent 30%);
}

.stitch-login-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-4%);
}

.stitch-login-brand,
.stitch-login-card,
.stitch-login-footer {
  position: relative;
  z-index: 2;
}

.stitch-login-brand {
  width: 100%;
  max-width: 536px;
  min-height: 6vh;
  padding-top: 18px;
  padding-bottom: 8px;
  color: #07111f;
  text-align: center;
}

.stitch-login-symbol {
  width: min(184px, 42vw);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 18px 34px rgba(17, 24, 39, 0.1));
}

.stitch-login-wordmark {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 10px 0 0;
}

.stitch-login-wordmark-en {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(2.2rem, 7.2vw, 3.35rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0;
}

.stitch-login-wordmark-cn {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(1.32rem, 4.2vw, 2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
}

.stitch-login-slogan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 9px 0 0;
  color: rgba(226, 229, 235, 0.88);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(0.72rem, 2.1vw, 0.9rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.14em;
}

.stitch-login-slogan span:first-child,
.stitch-login-slogan span:last-child {
  width: 52px;
  height: 1px;
  background: currentColor;
  opacity: 0.72;
}

.stitch-login-card {
  position: relative;
  width: min(100%, 536px);
  min-height: 0;
  margin-top: 16px;
  padding: 34px 40px 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 33px;
  background:
    linear-gradient(135deg, rgba(251, 241, 231, 0.78) 0%, rgba(246, 241, 236, 0.72) 54%, rgba(243, 241, 239, 0.78) 100%);
  box-shadow:
    0 24px 52px rgba(120, 81, 49, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
}

.stitch-login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 16% 30%, rgba(255, 241, 216, 0.36), transparent 28%),
    radial-gradient(circle at 84% 76%, rgba(255, 255, 255, 0.22), transparent 24%);
  pointer-events: none;
}

.role-switch.stitch-role-switch {
  gap: 0;
  margin: 0 0 38px;
  padding: 6px;
  border-radius: 20px;
  background: rgba(232, 227, 223, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.role-switch.stitch-role-switch button {
  flex: 1;
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  color: rgba(37, 33, 30, 0.82);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 200ms ease-out, color 200ms ease-out, box-shadow 200ms ease-out, transform 200ms ease-out;
}

.role-switch.stitch-role-switch button.active {
  color: #1d1a17;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.11),
    0 1px 1px rgba(0, 0, 0, 0.05);
}

.stitch-login-feedback {
  margin: 0 0 16px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #b42318;
}

.stitch-role-panel {
  display: flex;
  flex-direction: column;
}

.stitch-panel-head {
  margin-bottom: 22px;
}

.stitch-panel-head h2 {
  margin: 0;
  color: #1e1916;
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 31px;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.stitch-panel-head p {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(28, 28, 30, 0.78);
}

.stitch-panel-note {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(55, 50, 46, 0.56);
}

.stitch-form-stack {
  display: grid;
  gap: 18px;
}

.stitch-input-wrap {
  position: relative;
  display: block;
}

.stitch-input-wrap > .material-symbols-outlined {
  position: absolute;
  top: 50%;
  left: 18px;
  z-index: 2;
  color: rgba(189, 190, 187, 0.92);
  font-size: 20px;
  font-variation-settings: "FILL" 1, "wght" 300, "GRAD" 0, "opsz" 24;
  pointer-events: none;
  transform: translateY(-50%);
}

.stitch-input-wrap input,
.stitch-input-wrap select {
  width: 100%;
  min-height: 50px;
  padding: 0 56px 0 50px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.87);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 6px 18px rgba(255, 244, 232, 0.18);
  color: #1f1b18;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stitch-input-wrap input[type="date"] {
  appearance: none;
  color: #1f1b18;
  -webkit-appearance: none;
}

.stitch-input-wrap input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.82;
  cursor: pointer;
}

.stitch-input-wrap select {
  appearance: none;
  -webkit-appearance: none;
}

.stitch-input-spacer {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.stitch-input-wrap input::placeholder,
.stitch-input-wrap select:invalid,
.stitch-input-wrap select option[value=""] {
  color: rgba(182, 183, 180, 0.96);
}

.stitch-input-wrap input:focus,
.stitch-input-wrap select:focus,
.stitch-input-wrap-textarea textarea:focus {
  outline: 0;
  border-color: rgba(0, 92, 66, 0.24);
  box-shadow:
    0 0 0 4px rgba(2, 90, 63, 0.06),
    0 10px 24px rgba(255, 244, 232, 0.3);
}

.stitch-password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: rgba(190, 191, 187, 0.92);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 200ms ease-out, opacity 200ms ease-out;
}

.stitch-password-toggle .material-symbols-outlined {
  font-size: 22px;
  font-variation-settings: "FILL" 1, "wght" 300, "GRAD" 0, "opsz" 24;
}

.stitch-password-toggle:hover {
  color: rgba(125, 126, 123, 0.96);
}

.stitch-help-row {
  display: flex;
  justify-content: flex-end;
  margin: 8px 8px 0;
}

.stitch-help-row a {
  color: rgba(0, 77, 56, 0.86);
  font-size: 15px;
  font-weight: 500;
}

.stitch-login-button,
.stitch-secondary-button {
  min-height: 48px;
  border: 0;
  border-radius: 17px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.stitch-login-button {
  width: 100%;
  margin-top: 20px;
  background: linear-gradient(180deg, #00573c 0%, #005037 100%);
  color: #fff;
  box-shadow:
    0 12px 24px rgba(0, 82, 56, 0.22),
    0 26px 34px rgba(218, 204, 180, 0.76);
}

.stitch-login-button:hover,
.stitch-secondary-button:hover {
  opacity: 0.94;
}

.stitch-login-button:focus-visible,
.stitch-password-toggle:focus-visible,
.stitch-alt-button:focus-visible,
.role-switch.stitch-role-switch button:focus-visible,
.stitch-help-row a:focus-visible,
.stitch-signup-note a:focus-visible,
.stitch-login-footer a:focus-visible,
.stitch-secondary-button:focus-visible,
.stitch-onboarding-foot a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 82, 56, 0.14);
}

.stitch-login-button:active,
.stitch-secondary-button:active,
.stitch-alt-button:active {
  transform: scale(0.985);
}

.stitch-login-button:disabled,
.stitch-secondary-button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.stitch-coming-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
}

.stitch-coming-card h3 {
  margin: 8px 0 0;
  font-size: 2.6rem;
  font-weight: 800;
  color: #1d1a17;
}

.stitch-coming-card p:last-child {
  margin: 14px 0 0;
  color: rgba(62, 57, 53, 0.78);
  font-size: 1.38rem;
  line-height: 1.65;
}

.stitch-alt-login {
  margin-top: 24px;
}

.stitch-divider {
  display: flex;
  align-items: center;
  gap: 18px;
}

.stitch-divider span {
  flex: 1;
  height: 1px;
  background: rgba(91, 80, 71, 0.16);
}

.stitch-divider p {
  margin: 0;
  color: rgba(120, 108, 100, 0.72);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.stitch-alt-actions {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-top: 18px;
}

.stitch-alt-button {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 18px rgba(255, 248, 239, 0.18);
  color: rgba(116, 111, 105, 0.88);
  cursor: pointer;
  transition: background-color 200ms ease-out, box-shadow 200ms ease-out, transform 200ms ease-out;
}

.stitch-alt-button .material-symbols-outlined {
  font-size: 15px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.stitch-alt-button:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 20px rgba(223, 210, 189, 0.28);
}

.stitch-alt-button-square {
  position: relative;
}

.stitch-alt-square-mark {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #77787a 0%, #5e5f61 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.stitch-alt-square-mark::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}

.stitch-signup-note {
  margin: 22px 0 0;
  color: rgba(34, 34, 34, 0.82);
  text-align: center;
  font-size: 16px;
  font-weight: 500;
}

.stitch-signup-note a {
  color: #00422f;
  font-weight: 800;
}

.stitch-login-footer {
  width: 100%;
  max-width: 536px;
  margin-top: 24px;
  text-align: center;
}

.stitch-login-footer p {
  margin: 0;
  color: rgba(103, 93, 83, 0.42);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.stitch-login-footer div {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-top: 26px;
}

.stitch-login-footer a {
  color: rgba(103, 93, 83, 0.68);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.stitch-auth-hint {
  margin: -4px 0 0;
  color: rgba(60, 45, 31, 0.72);
  font-size: 12px;
  line-height: 1.5;
}

.stitch-status-banner {
  margin-bottom: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(96, 66, 40, 0.1);
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.stitch-status-banner strong {
  display: block;
  color: #2d2219;
  font-size: 16px;
  font-weight: 600;
}

.stitch-status-banner p {
  margin: 8px 0 0;
  color: rgba(72, 52, 36, 0.78);
  font-size: 13px;
  line-height: 1.6;
}

.stitch-onboarding-foot {
  display: flex;
  justify-content: center;
}

.stitch-onboarding-foot a {
  color: rgba(53, 39, 27, 0.82);
  font-size: 13px;
  opacity: 1;
}

.stitch-onboarding-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.stitch-secondary-button {
  background: linear-gradient(180deg, #dcece6 0%, #cfe3db 100%);
  color: #0f604a;
  box-shadow:
    0 12px 24px rgba(0, 82, 56, 0.12),
    0 26px 34px rgba(218, 204, 180, 0.58);
}

.stitch-onboarding-actions .stitch-login-button {
  min-height: 48px;
  margin-top: 0;
}

.stitch-input-wrap-textarea {
  display: flex;
  align-items: flex-start;
}

.stitch-input-wrap-textarea textarea {
  width: 100%;
  min-height: 96px;
  padding: 18px 18px 18px 50px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 17px;
  resize: vertical;
  background: rgba(255, 255, 255, 0.87);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 6px 18px rgba(255, 244, 232, 0.18);
  color: #1f1b18;
  font: inherit;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stitch-input-wrap-textarea textarea::placeholder {
  color: rgba(133, 122, 111, 0.72);
}

.stitch-input-wrap-textarea .material-symbols-outlined {
  top: 20px;
  color: rgba(149, 140, 131, 0.92);
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .role-switch.stitch-role-switch button,
  .stitch-password-toggle,
  .stitch-login-button,
  .stitch-secondary-button,
  .stitch-alt-button {
    transition: none;
  }

  .stitch-login-button:active,
  .stitch-secondary-button:active,
  .stitch-alt-button:active {
    transform: none;
  }
}

@media (min-width: 768px) {
  .stitch-login-shell {
    padding: 54px 24px 30px;
  }
}

@media (max-width: 720px) {
  .stitch-login-shell {
    padding: 38px 16px 24px;
  }

  .stitch-login-stage {
    justify-content: center;
    transform: translateY(-4%);
  }

  .stitch-login-brand {
    max-width: 560px;
    min-height: auto;
    margin-bottom: 10px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .stitch-login-symbol {
    width: min(150px, 36vw);
  }

  .stitch-login-wordmark {
    margin-top: 8px;
  }

  .stitch-login-wordmark-en {
    font-size: clamp(2rem, 7.4vw, 2.6rem);
  }

  .stitch-login-wordmark-cn {
    font-size: clamp(1.16rem, 4.4vw, 1.56rem);
  }

  .stitch-login-slogan {
    gap: 9px;
    margin-top: 7px;
    font-size: 12px;
  }

  .stitch-login-slogan span:first-child,
  .stitch-login-slogan span:last-child {
    width: 42px;
  }

  .stitch-login-card {
    width: min(90%, 560px);
    min-height: auto;
    padding: 22px 20px 20px;
    border-radius: 30px;
  }

  .role-switch.stitch-role-switch {
    margin-bottom: 24px;
    padding: 5px;
    border-radius: 18px;
  }

  .role-switch.stitch-role-switch button {
    min-height: 42px;
    font-size: 12px;
  }

  .stitch-panel-head {
    margin-bottom: 16px;
  }

  .stitch-panel-head h2 {
    font-size: 20px;
  }

  .stitch-panel-head p,
  .stitch-help-row a,
  .stitch-signup-note {
    font-size: 12px;
  }

  .stitch-form-stack {
    gap: 12px;
  }

  .stitch-input-wrap > .material-symbols-outlined {
    left: 16px;
    font-size: 18px;
  }

  .stitch-input-wrap input,
  .stitch-input-wrap select {
    min-height: 41px;
    padding: 0 44px 0 42px;
    border-radius: 15px;
    font-size: 12px;
  }

  .stitch-password-toggle {
    right: 8px;
    width: 28px;
    height: 28px;
  }

  .stitch-password-toggle .material-symbols-outlined {
    font-size: 18px;
  }

  .stitch-login-button,
  .stitch-secondary-button {
    min-height: 42px;
    border-radius: 15px;
    font-size: 12px;
  }

  .stitch-login-button {
    margin-top: 16px;
  }

  .stitch-alt-login {
    margin-top: 26px;
  }

  .stitch-alt-actions {
    gap: 24px;
    margin-top: 14px;
  }

  .stitch-alt-button {
    width: 29px;
    height: 29px;
  }

  .stitch-alt-square-mark {
    width: 13px;
    height: 13px;
  }

  .stitch-signup-note {
    margin-top: 26px;
  }

  .stitch-login-footer {
    margin-top: 28px;
  }

  .stitch-login-footer div {
    margin-top: 22px;
  }
}

@media (max-width: 640px) {
  .stitch-onboarding-actions {
    grid-template-columns: 1fr;
  }
}
