/* GoHome 管理后台登录页 · 顶部 Tab + 简洁表单（参考电商登录样式） */
:root {
  --login-accent: #2563eb;
  --login-accent-hover: #1d4ed8;
  --login-text: #1f2937;
  --login-muted: #9ca3af;
  --login-line: #e8e8e8;
  --login-card-bg: #ffffff;
}

#login.loginPage {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 760px;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 54%, #f9fbff 100%);
  isolation: isolate;
}

#login .loginHero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

#login .loginHeroImg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  user-select: none;
  -webkit-user-drag: none;
}

#login.loginPage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, transparent 55%, rgba(255, 255, 255, 0.15) 70%, rgba(255, 255, 255, 0.45) 100%);
}

#login .loginCard {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: clamp(72px, 7vw, 140px);
  transform: translateY(-50%);
  width: clamp(400px, 30vw, 460px);
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 36px 40px 32px;
  border: none;
  border-radius: 16px;
  background: var(--login-card-bg);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.10), 0 4px 16px rgba(15, 23, 42, 0.06);
}

#login .loginCardTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

#login .loginWelcome {
  margin-bottom: 18px;
}

#login .loginWelcome.hide {
  display: none;
}

#login .loginTitle {
  margin: 0 0 6px;
  color: var(--login-text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.3;
}

#login .loginSubtitle {
  margin: 0;
  color: var(--login-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

#login .loginSubtitle.hide {
  display: none;
}

#login .loginBrand {
  margin: 0;
  color: var(--login-accent);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1;
}

#login .loginAdminTag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

/* —— 顶部 Tab（下划线风格）—— */
#login .loginModeTabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 0 20px;
  border-bottom: 1px solid #f0f0f0;
}

#login .loginModeTab {
  flex: 1;
  height: 48px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--login-muted);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

#login .loginModeTab:hover {
  color: #4b5563;
}

#login .loginModeTab.active {
  color: var(--login-text);
  border-bottom-color: var(--login-accent);
  font-weight: 800;
}

#login .loginFormBody {
  display: flex;
  flex-direction: column;
}

#login .loginPanel.hide {
  display: none !important;
}

#login .loginField {
  margin: 0 0 14px;
}

#login .loginFieldPlain {
  margin-bottom: 14px;
}

#login .loginField label {
  display: none;
}

#login .loginInputWrap {
  position: relative;
  display: flex;
  align-items: center;
}

#login .loginInputWrapPlain .loginInputPlain {
  padding-right: 44px;
}

#login .loginInput,
#login .loginInputPlain {
  width: 100%;
  height: 50px;
  box-sizing: border-box;
  padding: 0 16px;
  border: 1px solid var(--login-line);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--login-text);
  font-size: 15px;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#login .loginInput::placeholder,
#login .loginInputPlain::placeholder {
  color: #c4c4c4;
  font-weight: 400;
}

#login .loginInput:hover,
#login .loginInputPlain:hover {
  border-color: #d4d4d4;
}

#login .loginInput:focus,
#login .loginInputPlain:focus {
  border-color: var(--login-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

#login .loginPwdToggle {
  position: absolute;
  right: 8px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#login .loginPwdToggle:hover {
  color: var(--login-accent);
  background: #f3f4f6;
}

#login .loginPwdToggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* 验证码：输入框内右侧「发送验证码」 */
#login .loginOtpCombo {
  display: flex;
  align-items: center;
  height: 50px;
  border: 1px solid var(--login-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#login .loginOtpCombo:focus-within {
  border-color: var(--login-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

#login .loginOtpCombo .loginOtpInput {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  padding: 0 12px 0 16px;
}

#login .loginOtpCombo .loginOtpInput:focus {
  box-shadow: none;
}

#login .loginSendOtpBtn {
  flex-shrink: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid #f0f0f0;
  background: transparent;
  color: var(--login-accent);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

#login .loginSendOtpBtn:hover:not(:disabled) {
  background: #f8fafc;
  color: var(--login-accent-hover);
}

#login .loginSendOtpBtn:disabled {
  color: #9ca3af;
  cursor: not-allowed;
}

#login .loginHelpLink {
  display: block;
  width: fit-content;
  margin: -4px 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--login-accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

#login .loginHelpLink:hover {
  color: var(--login-accent-hover);
  text-decoration: underline;
}

#login .loginOptions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 22px;
}

#login .loginRemember,
#login .loginRememberInline {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  user-select: none;
  cursor: pointer;
}

#login .loginRememberInline {
  margin: 0 0 18px;
}

#login .loginCheckInput {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

#login .loginCheckUi {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1.5px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

#login .loginCheckInput:checked + .loginCheckUi {
  border-color: var(--login-accent);
  background: var(--login-accent);
}

#login .loginCheckInput:checked + .loginCheckUi::after {
  content: "";
  width: 8px;
  height: 4px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) translateY(-1px);
}

#login .loginRemember:hover .loginCheckUi,
#login .loginRememberInline:hover .loginCheckUi {
  border-color: #9ca3af;
}

#login .loginForgot {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--login-accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#login .loginForgot:hover {
  text-decoration: underline;
}

#login .loginSubmit {
  width: 100%;
  height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 25px;
  background: var(--login-accent);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

#login .loginSubmit:hover:not(:disabled) {
  background: var(--login-accent-hover);
}

#login .loginSubmit:active:not(:disabled) {
  transform: scale(0.99);
}

#login .loginSubmit:disabled,
#login .loginSubmit.loading,
#login .loginSendOtpBtn.loading {
  opacity: 0.65;
  pointer-events: none;
}

#login .loginSecondaryBtn {
  width: 100%;
  height: 46px;
  margin-top: 10px;
  border: 1px solid var(--login-line);
  border-radius: 25px;
  background: #fff;
  color: #6b7280;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

#login .loginSecondaryBtn:hover {
  background: #f9fafb;
}

#login .loginHint {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}

#login .loginHintBlock {
  margin-bottom: 18px;
}

#login .loginFooter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
}

#login .loginFooter svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

@media (max-height: 760px) and (min-width: 1025px) {
  #login .loginCard {
    padding: 30px 34px 28px;
  }
}

@media (max-width: 1024px) {
  #login.loginPage {
    height: auto;
    min-height: 100vh;
    overflow: auto;
    display: flex;
    flex-direction: column;
    background: #f4f8ff;
  }

  #login.loginPage::after {
    display: none;
  }

  #login .loginHero {
    position: relative;
    inset: auto;
    width: 100%;
    height: 42vh;
    min-height: 280px;
    max-height: 420px;
    flex: 0 0 auto;
  }

  #login .loginHeroImg {
    object-position: left center;
  }

  #login .loginCard {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: min(460px, calc(100% - 32px));
    margin: -40px auto 36px;
    padding: 32px 28px 28px;
  }
}

@media (max-width: 560px) {
  #login .loginCard {
    width: calc(100% - 20px);
    margin-top: -28px;
    padding: 26px 20px 24px;
  }

  #login .loginModeTab {
    font-size: 15px;
  }

  #login .loginSendOtpBtn {
    padding: 0 10px;
    font-size: 13px;
  }
}
