:root {
  --auth-primary: #1677ff;
  --auth-primary-strong: #0958d9;
  --auth-text: #1f2937;
  --auth-muted: #6b7280;
  --auth-border: #d9e2ef;
  --auth-bg: #f0f2f5;
}

.auth-login-body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(145deg, rgba(22, 119, 255, .08) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(215deg, rgba(19, 194, 194, .07) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #f8fbff 0%, var(--auth-bg) 100%);
  color: var(--auth-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.auth-login-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 18px 32px;
  overflow: hidden;
}

.auth-login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 4%, rgba(22, 119, 255, .10), rgba(22, 119, 255, 0) 46%),
    linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}

.auth-login-container {
  position: relative;
  width: min(420px, 100%);
  transform: translateY(-84px);
  z-index: 1;
}

.auth-env-badge {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 2;
  min-width: 54px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(22, 119, 255, .25);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--auth-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(31, 41, 55, .06);
  backdrop-filter: blur(10px);
}

.auth-pro-login {
  width: 100%;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  text-align: left;
}

.auth-brand-logo {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
}

.auth-brand-logo img {
  display: block;
  width: 42px;
  height: 42px;
}

.auth-brand h1 {
  margin: 0;
  color: #1f1f1f;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
}

.auth-brand p {
  margin: 6px 0 0;
  color: rgba(0, 0, 0, .45);
  font-size: 14px;
  line-height: 1.5;
}

.auth-panel {
  padding: 28px 30px 30px;
  border: 1px solid rgba(217, 226, 239, .82);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 44px rgba(15, 23, 42, .08);
  backdrop-filter: blur(14px);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: -6px 0 24px;
  border-bottom: 1px solid #eef2f7;
}

.auth-tab {
  position: relative;
  height: 44px;
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, .65);
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}

.auth-tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--auth-primary);
  transform: translateX(-50%);
  transition: width .18s ease;
}

.auth-tab.is-active {
  color: var(--auth-primary);
  font-weight: 600;
}

.auth-tab.is-active::after {
  width: 72px;
}

.auth-panel-content[hidden] {
  display: none !important;
}

.auth-alert {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #ffccc7;
  border-radius: 6px;
  background: #fff2f0;
  color: #a8071a;
  font-size: 14px;
  line-height: 1.5;
}

.auth-field {
  display: block;
  margin: 0 0 18px;
}

.auth-field span {
  display: block;
  margin-bottom: 8px;
  color: rgba(0, 0, 0, .72);
  font-size: 14px;
  font-weight: 500;
}

.auth-input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: var(--auth-text);
  font-size: 15px;
  line-height: 40px;
  outline: none;
  padding: 0 12px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-input::placeholder {
  color: rgba(0, 0, 0, .34);
}

.auth-input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .12);
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 10px;
}

.auth-primary-button,
.auth-secondary-button {
  height: 40px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.auth-primary-button {
  width: 100%;
  border: 1px solid var(--auth-primary);
  background: var(--auth-primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(22, 119, 255, .18);
}

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

.auth-secondary-button {
  border: 1px solid #d9d9d9;
  background: #fff;
  color: var(--auth-primary);
}

.auth-secondary-button:hover {
  border-color: var(--auth-primary);
  color: var(--auth-primary-strong);
}

.auth-secondary-button:disabled {
  cursor: not-allowed;
  border-color: #d9d9d9;
  background: #f5f5f5;
  color: rgba(0, 0, 0, .38);
}

.auth-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-extra-row {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: rgba(0, 0, 0, .45);
  font-size: 13px;
}

.auth-extra-row a {
  color: rgba(0, 0, 0, .45);
  text-decoration: none;
}

.auth-extra-row a:hover {
  color: var(--auth-primary);
}

#sendTip {
  max-width: 180px;
  overflow: hidden;
  color: rgba(0, 0, 0, .45);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sendTip[data-tone="success"] {
  color: #389e0d;
}

#sendTip[data-tone="warn"] {
  color: #d46b08;
}

.auth-login-footer {
  margin-top: 18px;
  color: rgba(0, 0, 0, .26);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 520px) {
  .auth-login-shell {
    align-items: flex-start;
    padding-top: 38px;
  }

  .auth-login-container {
    transform: none;
  }

  .auth-brand {
    justify-content: flex-start;
    margin-bottom: 22px;
  }

  .auth-brand h1 {
    font-size: 20px;
  }

  .auth-panel {
    padding: 24px 20px;
  }

  .auth-code-row {
    grid-template-columns: minmax(0, 1fr);
  }

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

  #sendTip {
    max-width: 100%;
    text-align: left;
  }
}
