:root {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #303133;
  --muted: #606266;
  --accent: #e60012;
  --accent-hover: #cf0010;
  --accent-soft: #f7a3aa;
  --danger: #dc2626;
  --border: #e5e7eb;
  --input-bg: #fafafa;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 0% 0%, #fecaca88, transparent),
    radial-gradient(800px 480px at 100% 100%, #fca5a566, transparent),
    linear-gradient(160deg, #ffffff 0%, #fff1f2 45%, #ffe4e6 100%);
}

body.login-page {
  position: relative;
  display: block;
  overflow: hidden;
  background: #f4f7fb url("../images/login-bg.png") center / cover no-repeat;
}

.login-brand {
  position: absolute;
  top: 3.8vh;
  left: 3.54vw;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 35px;
  font-family: "Source Han Sans", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
}

.login-brand img {
  width: 35px;
  height: 35px;
}

.card {
  width: min(420px, 92vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 12px 40px rgba(248, 113, 113, .12);
}

.login-page .card {
  position: absolute;
  top: 12.31vh;
  left: 61.46vw;
  width: 461px;
  height: 536px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 8px 32px #e0e4eb;
}

.card-logo {
  position: absolute;
  top: 38px;
  left: 206px;
  width: 49px;
  height: 49px;
}

h1 { margin: 0 0 16px; font-size: 1.35rem; }
.login-page h1 {
  position: absolute;
  top: 91px;
  left: 0;
  width: 100%;
  margin: 0;
  text-align: center;
  font-family: "Source Han Sans", "Microsoft YaHei", sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 35px;
}
.hint { margin-top: 16px; color: var(--muted); font-size: .85rem; }
.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}

label {
  display: block;
  margin-bottom: 12px;
  font-size: .9rem;
  color: var(--muted);
}

.login-page label {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}

input[type=text], input[type=password], input[type=email], input[type=tel] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
}
.login-page input[type=text],
.login-page input[type=password],
.login-page input[type=email],
.login-page input[type=tel] {
  height: 44px;
  margin: 0;
  padding: 0 16px 0 39px;
  border: 0;
  border-radius: 6px;
  background: #f7f7f7;
  font-size: 14px;
}
.login-page input::placeholder { color: #909399; opacity: 1; }
input:focus {
  outline: none;
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .15);
}

button {
  width: 100%;
  margin-top: 8px;
  padding: 11px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}
.login-page form > button[type=submit] {
  position: absolute;
  top: 160px;
  left: 0;
  height: 44px;
  margin: 0;
  padding: 0 16px;
  border-radius: 6px;
  background: #ffb1af;
  font-size: 16px;
  font-weight: 500;
}
button:hover:not(:disabled) {
  background: var(--accent-hover);
}
button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 6px;
}
.login-page .code-row {
  position: relative;
  display: block;
  height: 44px;
  margin: 0;
}
.login-page .code-row input[type=text] { padding-right: 110px; }
.code-row input[type=text] {
  margin-top: 0;
  flex: 1;
}
.code-row .send-btn {
  width: auto;
  margin-top: 0;
  padding: 10px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.login-page .code-row .send-btn {
  position: absolute;
  top: 0;
  right: 20px;
  width: auto;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c4302c;
  font-family: "Source Han Sans CN", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 400;
}
.login-page .code-row .send-btn:hover:not(:disabled) {
  background: transparent;
}
.login-page #sms-form:valid > button[type=submit] { background: #c4302c; }

.tabs {
  display: flex;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--border);
}
.login-page .tabs {
  position: absolute;
  top: 164px;
  left: 44px;
  width: 373px;
  height: 40px;
  margin: 0;
  border-bottom: 1px solid #d8d8d8;
}
.tabs button {
  width: auto;
  flex: 1;
  margin: 0;
  padding: 10px 8px;
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  font-size: .9rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.login-page .tabs button {
  position: absolute;
  top: 0;
  height: 26px;
  padding: 0;
  border: 0;
  color: #909399;
  font-family: "Source Han Sans", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  font-weight: 400;
}
.login-page .tabs #tab-pwd { left: 39px; width: 72px; }
.login-page .tabs #tab-sms { left: 200px; width: 134px; }
.login-page .tabs button[aria-selected="true"] {
  color: #c4302c;
  font-weight: 500;
}
.login-page .tabs button[aria-selected="true"]::after {
  position: absolute;
  top: 37px;
  left: 50%;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: #c4302c;
  content: "";
  transform: translateX(-50%);
}
.tabs button:hover:not(:disabled) {
  background: transparent;
  color: var(--text);
}
.tabs button[aria-selected="true"] {
  color: var(--accent-hover);
  border-bottom-color: var(--accent);
}
.tabs button[aria-selected="true"]:hover:not(:disabled) {
  background: transparent;
  color: var(--accent-hover);
}

.forgot-link {
  margin: -4px 0 8px;
  text-align: right;
  font-size: .85rem;
}
.login-page .forgot-link {
  position: absolute;
  top: 224px;
  right: 0;
  margin: 0;
  font-size: 14px;
}
.login-page .forgot-link a { color: #909399; }

.login-page [role="tabpanel"] {
  position: absolute;
  top: 237px;
  left: 52px;
  width: 357px;
}

.login-page [role="tabpanel"] form { position: relative; height: 239px; }
.login-page .input-wrap { position: relative; height: 44px; }
.login-page .input-wrap + .input-wrap { margin-top: 24px; }
.login-page .input-icon {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-page .account-icon { top: 15px; left: 18px; width: 13px; height: 14px; }
.login-page .mobile-icon { top: 15px; left: 18px; width: 13px; height: 14px; }
.login-page .sms-code-icon { top: 15px; left: 18px; width: 13px; height: 14px; }
.login-page .password-icon { top: 15px; left: 18px; width: 12px; height: 14px; }
.login-page .password-eye {
  top: 6px;
  right: 13px;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.login-page .password-eye:hover:not(:disabled) { background: transparent; }
.login-page .password-eye .eye-icon {
  align-items: center;
  justify-content: center;
}
.login-page .password-eye .eye-open { display: flex; width: 18.04px; height: 14px; }
.login-page .password-eye .eye-closed { display: none; width: 18.14px; height: 10.1px; }
.login-page .password-eye[aria-pressed="true"] .eye-open { display: none; }
.login-page .password-eye[aria-pressed="true"] .eye-closed { display: flex; }
.login-page .password-eye svg { display: block; width: 100%; height: 100%; }
.login-page .password-wrap input { padding-right: 48px; }
.forgot-link a {
  color: var(--accent-hover);
  text-decoration: none;
}
.forgot-link a:hover {
  text-decoration: underline;
}

.nav-link {
  margin: 16px 0 0;
  text-align: center;
  font-size: .9rem;
}
.nav-link a {
  color: var(--accent-hover);
  text-decoration: none;
}
.nav-link a:hover {
  text-decoration: underline;
}

body.forgot-page {
  position: relative;
  display: block;
  overflow: hidden;
  background: #f4f7fb url("../images/login-bg.png") center / cover no-repeat;
}

.forgot-brand {
  position: absolute;
  top: 3.33vh;
  left: 3.54vw;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 35px;
  font-family: "Source Han Sans", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
}

.forgot-brand img {
  width: 35px;
  height: 35px;
}

.forgot-page .card {
  position: absolute;
  top: 14.63vh;
  left: 62.29vw;
  width: 429px;
  height: 521px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 8px 32px #e0e4eb;
}

.forgot-page h1 {
  position: absolute;
  top: 40px;
  left: 0;
  width: 100%;
  margin: 0;
  text-align: center;
  font-family: "Source Han Sans", "Microsoft YaHei", sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 32px;
}

.forgot-page #reset-form {
  position: absolute;
  top: 108px;
  left: 36px;
  width: 357px;
  height: 328px;
}

.forgot-page .input-wrap {
  position: relative;
  display: block;
  height: 44px;
  margin: 0;
}

.forgot-page .input-wrap + .input-wrap { margin-top: 24px; }

.forgot-page input[type=text],
.forgot-page input[type=password],
.forgot-page input[type=tel] {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 39px;
  border: 0;
  border-radius: 6px;
  background: #f7f7f7;
  font-family: "Source Han Sans CN", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.forgot-page input::placeholder { color: #909399; opacity: 1; }

.forgot-page .input-icon {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forgot-page .mobile-icon { top: 15px; left: 18px; width: 13px; height: 14px; }
.forgot-page .sms-code-icon { top: 15px; left: 18px; width: 13px; height: 14px; }
.forgot-page .password-icon { top: 15px; left: 18px; width: 12px; height: 14px; }
.forgot-page .password-eye { top: 17px; right: 20px; width: 18px; height: 10px; }

.forgot-page .code-row {
  position: relative;
  display: block;
  height: 44px;
  margin: 0;
}

.forgot-page .code-row input { padding-right: 116px; }

.forgot-page .code-row .send-btn {
  position: absolute;
  top: 0;
  right: 20px;
  width: 70px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #eb8d8a;
  font-size: 14px;
  font-weight: 400;
}

.forgot-page .code-row .send-btn:hover:not(:disabled) { background: transparent; }

.forgot-page #reset-btn {
  position: absolute;
  top: 284px;
  left: 0;
  width: 357px;
  height: 44px;
  margin: 0;
  padding: 0 16px;
  border-radius: 6px;
  background: #ffb1af;
  font-size: 16px;
  font-weight: 500;
}

.forgot-page .nav-link {
  position: absolute;
  top: 456px;
  left: 0;
  width: 100%;
  margin: 0;
  font-size: 14px;
  line-height: 15px;
}

.forgot-page .nav-link a { color: #909399; }

.forgot-page .error {
  position: absolute;
  z-index: 2;
  top: 76px;
  left: 36px;
  width: 357px;
  margin: 0;
}

@media (max-width: 900px) {
  body.forgot-page { background-position: 34% center; }
  .forgot-brand { top: 24px; left: 24px; }
  .forgot-page .card {
    top: 50%;
    left: 50%;
    width: min(429px, calc(100vw - 40px));
    background: rgba(255, 255, 255, .96);
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 480px) {
  body.forgot-page { overflow: auto; }
  .forgot-page .card {
    top: 96px;
    width: calc(100vw - 24px);
    transform: translateX(-50%);
  }
  .forgot-page #reset-form { left: 8.4%; width: 83.2%; }
}

@media (max-width: 900px) {
  body.login-page {
    background-position: 34% center;
  }

  .login-brand { top: 24px; left: 24px; }

  .login-page .card {
    top: 50%;
    left: 50%;
    width: min(461px, calc(100vw - 40px));
    background: rgba(255, 255, 255, .96);
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 480px) {
  body.login-page {
    overflow: auto;
  }

  .login-page .card {
    top: 96px;
    width: calc(100vw - 24px);
    transform: translateX(-50%);
  }

  .login-page .tabs { left: 9.5%; width: 81%; }
  .login-page [role="tabpanel"] { left: 11.3%; width: 77.4%; }
}
