[hidden] {
  display: none !important;
}

.app-login-page {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(30px + env(safe-area-inset-bottom));
  background: #f3f6fb;
  color: #14213d;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

.app-login-page *,
.app-login-page *::before,
.app-login-page *::after {
  box-sizing: border-box;
}

.app-login-shell {
  width: min(520px, 100%);
  margin: 0 auto;
}

.app-login-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 22px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(90deg, #0f2c59 0%, #0f766e 100%);
  box-shadow: 0 12px 28px rgba(15, 44, 89, 0.2);
}

.app-login-hero::after {
  content: "";
  position: absolute;
  right: -58px;
  bottom: -78px;
  width: 178px;
  height: 178px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.app-login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.app-login-brand-mark {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 12px;
  background: #f8b84e;
  color: #0f2c59;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.app-login-brand-copy {
  min-width: 0;
}

.app-login-brand-copy strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-login-brand-copy span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #d9f2ee;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-login-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 34px;
  margin-top: 18px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.app-login-card {
  padding: 20px;
  border: 1px solid #e4ebf5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 44, 89, 0.08);
}

.app-login-card h1 {
  margin: 0;
  color: #14213d;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.app-login-card > p.app-login-hint,
.app-login-hint {
  margin: 5px 0 10px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.app-login-form {
  display: block;
}

.app-login-input {
  display: block;
  width: 100%;
  height: 54px;
  margin: 8px 0 4px;
  padding: 0 16px;
  border: 1px solid #dce5f2;
  border-radius: 12px;
  outline: 0;
  background: #f8fafc;
  color: #14213d;
  font: inherit;
  font-size: 17px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.app-login-input::placeholder {
  color: #94a3b8;
}

.app-login-input:focus {
  border-color: #0f766e;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.app-login-password {
  position: relative;
}

.app-login-password .app-login-input {
  padding-right: 70px;
}

.app-login-field-action {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 54px;
  height: 54px;
  border: 0;
  background: transparent;
  color: #0f766e;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.app-login-captcha {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  align-items: center;
  gap: 8px;
}

.app-login-captcha .app-login-input {
  min-width: 0;
}

.app-login-captcha-image {
  display: block;
  width: 126px;
  height: 54px;
  margin: 8px 0 4px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce5f2;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.app-login-captcha-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.app-login-msg {
  min-height: 18px;
  margin: 8px 0 4px;
  color: #be2323;
  font-size: 14px;
  line-height: 1.45;
}

.app-login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #0f766e;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.app-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 24px rgba(15, 118, 110, 0.28);
}

.app-login-submit:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.app-login-submit.loading {
  position: relative;
  color: transparent;
}

.app-login-submit.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: app-login-spin 0.7s linear infinite;
}

.app-login-submit .spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: app-login-spin 0.7s linear infinite;
}

@keyframes app-login-spin {
  to {
    transform: rotate(360deg);
  }
}

.app-login-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  padding: 0 16px;
  border: 1px solid #d7e3d9;
  border-radius: 12px;
  background: #f4f8f4;
  color: #0f766e;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.app-login-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #dce5f2;
  color: #64748b;
  font-size: 13px;
}

.app-login-links p {
  margin: 0;
}

.app-login-links a {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.app-login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 0;
  color: #94a3b8;
  font-size: 12px;
}

.app-login-divider::before,
.app-login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e4ebf5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 200;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: #0f2c59;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 0.24s ease;
}

.toast.show {
  opacity: 1;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 44, 89, 0.55);
}

.modal-box {
  width: min(480px, 100%);
  max-height: 80vh;
  overflow: auto;
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 44, 89, 0.26);
}

.modal-box h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  background: #fff;
  color: #14213d;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.fee-note {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 600px) {
  .app-login-page {
    padding-right: 12px;
    padding-left: 12px;
  }

  .app-login-hero {
    padding: 20px;
    border-radius: 20px;
  }

  .app-login-card {
    padding: 18px;
    border-radius: 18px;
  }
}

@media (max-width: 380px) {
  .app-login-page {
    padding-right: 10px;
    padding-left: 10px;
  }

  .app-login-hero,
  .app-login-card {
    padding: 16px;
  }

  .app-login-brand {
    gap: 10px;
  }

  .app-login-brand-mark {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .app-login-brand-copy strong {
    font-size: 23px;
  }

  .app-login-brand-copy span {
    font-size: 12px;
  }

  .app-login-captcha {
    grid-template-columns: minmax(0, 1fr) 112px;
  }

  .app-login-captcha-image {
    width: 112px;
  }

  .app-login-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
