/* 登录页 & 登录弹窗 */

.login-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--home-surface, #faf9f4);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(255, 255, 255, 0.85) 0%, transparent 70%),
    linear-gradient(rgba(130, 0, 18, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 0, 18, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
  background-position: center, center, center;
}

.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 88px 20px 40px;
  box-sizing: border-box;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  padding: 36px 32px 32px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(141, 112, 110, 0.12);
  box-shadow: 0 8px 32px rgba(27, 28, 25, 0.08);
  box-sizing: border-box;
}

.login-head {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(141, 112, 110, 0.12);
}

.login-head__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--home-on-surface, #1b1c19);
}

.login-head__title::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: var(--home-primary, #820012);
}

.login-page .login-head__title::after {
  content: "闽台方言辨析虚拟仿真教学项目";
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--home-on-surface-variant, #5a413f);
}

.login-form {
  margin: 0;
}

.login-field {
  margin-bottom: 18px;
}

.login-field:last-of-type {
  margin-bottom: 22px;
}

.login-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--home-on-surface, #1b1c19);
}

.login-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font-size: 15px;
  border: 1px solid rgba(141, 112, 110, 0.25);
  border-radius: 8px;
  background: #fff;
  color: var(--home-on-surface, #1b1c19);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.login-input::placeholder {
  color: rgba(90, 65, 63, 0.4);
}

.login-input:focus {
  outline: none;
  border-color: var(--home-primary, #820012);
  box-shadow: 0 0 0 3px rgba(130, 0, 18, 0.1);
}

.login-btn {
  width: 100%;
  height: 46px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--home-primary, #820012);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.login-btn:hover:not(:disabled) {
  background: var(--home-primary-container, #a61d24);
}

.login-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* —— 登录弹窗 —— */
.login-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.login-popup-mask {
  position: absolute;
  inset: 0;
  background: rgba(27, 28, 25, 0.38);
}

.login-popup-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 0;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(141, 112, 110, 0.12);
  box-shadow: 0 16px 48px rgba(27, 28, 25, 0.14);
  box-sizing: border-box;
  overflow: hidden;
}

.login-popup-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(141, 112, 110, 0.12);
}

.login-popup-bar__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--home-on-surface, #1b1c19);
}

.login-popup-close {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: rgba(90, 65, 63, 0.6);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.login-popup-close:hover {
  background: rgba(130, 0, 18, 0.06);
  color: var(--home-primary, #820012);
}

.login-popup-card .login-form {
  padding: 24px 20px 28px;
}

@media (max-width: 480px) {
  .login-main {
    padding: 80px 16px 32px;
  }

  .login-shell {
    padding: 28px 22px 26px;
  }

  .login-popup-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .login-popup-card {
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
  }
}
