/* 2026-11-14 独立 ID / 账号密码 登录胶囊切换 */
.agh-login-capsule {
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: calc(100% - 32px);
  margin: 0 16px 12px;
  padding: 4px 22px 4px 4px;
  border-radius: 999px;
  background: #e8f7ef;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .13);
}

.agh-login-capsule__btn {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4b5563;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.agh-login-capsule__btn.is-on {
  background: transparent;
  color: #16a34a;
  box-shadow: none;
}

.agh-login-capsule__ink {
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 26px) / 2);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(16, 70, 42, .12);
  transition: transform .24s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}

.agh-login-capsule[data-mode="id"] .agh-login-capsule__ink {
  transform: translateX(100%);
}

.agh-login-capsule::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: #20c96b;
  box-shadow: 0 0 0 2px rgba(32, 201, 107, .14);
  pointer-events: none;
}

#agh-uidpnl .up-h > span {
  display: none !important;
}

#agh-uidpnl .up-tip:not(#agh-uidmsg),
#agh-uidpnl .up-links,
#agh-uidpnl .acp-card,
#agh-uidpnl .up-sub {
  display: none !important;
}

#agh-uidpnl #agh-uidcopy,
#agh-uidpnl #agh-uidsave,
#agh-uidpnl .up-card {
  display: none !important;
}

/* 独立弹窗：外部不要深色遮罩；弹窗四周留白，禁止贴边。 */
#agh-uidovl,
#agh-uidovl.on,
#agh-uidovl.closing,
html body #agh-uidovl.on,
html body #agh-uidovl.closing {
  background: transparent !important;
  background-color: transparent !important;
  -webkit-backdrop-filter: blur(16px) saturate(.85) !important;
  backdrop-filter: blur(16px) saturate(.85) !important;
}

#agh-uidpnl {
  width: min(460px, calc(100% - 32px)) !important;
  min-height: 410px !important;
  max-height: calc(100dvh - 32px) !important;
  border-radius: 18px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

/* 说明收进 details，默认收起。 */
.agh-login-rules {
  margin: 12px 16px 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.agh-login-rules > summary {
  width: fit-content;
  margin: 0 auto;
  padding: 3px 8px;
  border-radius: 7px;
  color: #6b7280;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.agh-login-rules > summary::-webkit-details-marker { display: none; }

.agh-login-rules > summary::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: 2px;
  transition: transform .16s ease;
}

.agh-login-rules[open] > summary::before { transform: rotate(180deg); }

.agh-login-rules__body {
  margin: 8px auto 0;
  padding: 10px 12px;
  max-width: 360px;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  text-align: left;
}

.agh-login-rules__body p { margin: 0 0 5px; }
.agh-login-rules__body p:last-child { margin-bottom: 0; }

.agh-login-pwd__forgot {
  width: fit-content;
  margin: -2px auto 0;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
}

.agh-login-pwd__actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: -2px;
}

.agh-login-pwd__actions .agh-login-pwd__forgot {
  margin: 0;
}

.agh-login-pwd__register {
  width: fit-content;
  margin: 0;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
}

.agh-login-register {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 2px;
}

.agh-login-register[hidden] { display: none !important; }

.agh-login-register__go {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 11px;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.agh-login-register__msg {
  min-height: 16px;
  color: #dc2626;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.agh-login-reset {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 2px;
}

.agh-login-reset[hidden] { display: none !important; }

.agh-login-reset__row {
  display: flex;
  gap: 8px;
}

.agh-login-reset__row .agh-login-pwd__input { flex: 1 1 auto; }

.agh-login-reset__send,
.agh-login-reset__go {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: #e8f7ef;
  color: #16a34a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.agh-login-reset__go {
  width: 100%;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
}

.agh-login-reset__msg {
  min-height: 16px;
  color: #dc2626;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.agh-login-pwd {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 16px 8px;
}

.agh-login-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agh-login-main[hidden] { display: none !important; }

.agh-login-back {
  align-self: center;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
}

.agh-login-back:hover { color: #16a34a; }

.agh-custom-id {
  margin: 12px 16px 4px;
  padding: 12px;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: #f8fbff;
}

.agh-custom-id__title {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.agh-custom-id__row {
  display: flex;
  gap: 8px;
}

.agh-custom-id__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #17223f;
  font-size: 14px;
  outline: none;
}

.agh-custom-id__input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

.agh-custom-id__go {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: #16a34a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.agh-custom-id__go:disabled { opacity: .55; cursor: default; }

.agh-custom-id__hint {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.5;
  color: #7b8aa1;
}

.agh-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 99999;
  max-width: calc(100vw - 40px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(23, 34, 63, .94);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .24);
  pointer-events: none;
}

.agh-toast.is-err {
  background: rgba(185, 28, 28, .96);
}

.agh-login-pwd__code[hidden] { display: none !important; }

.agh-login-pwd__send,
.agh-login-pwd__back {
  width: fit-content;
  margin: 0;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
}

.agh-login-pwd__send:hover,
.agh-login-pwd__back:hover { color: #16a34a; }

.agh-login-pwd__mailrow {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.agh-login-pwd__mailrow .agh-login-pwd__mail {
  flex: 1 1 auto;
  min-width: 0;
}

.agh-login-pwd__mailrow .agh-login-pwd__send {
  flex: 0 0 auto;
  width: auto;
  min-width: 86px;
  height: 44px;
  margin: 0;
  padding: 0 11px;
  border: 0;
  border-radius: 11px;
  background: #e8f7ef;
  color: #15803d;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.agh-login-pwd__mailrow .agh-login-pwd__send:hover { color: #15803d; background: #dcfce7; }

.agh-login-pwd__passrow {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.agh-login-pwd__passrow .agh-login-pwd__input {
  flex: 1 1 auto;
  min-width: 0;
}

.agh-login-pwd__pass2row[hidden] { display: none !important; }

.agh-login-pwd__eye {
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #dbe7f5;
  border-radius: 11px;
  background: #f8fbff;
  color: #64748b;
  cursor: pointer;
}

.agh-login-pwd__eye:hover { color: #16a34a; background: #eefaf2; }
.agh-login-pwd__eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.agh-login-pwd__eye .agh-eye__slash { display: none; }
.agh-login-pwd__eye:not(.is-on) .agh-eye__slash { display: block; }
.agh-login-pwd__eye.is-on { color: #16a34a; }

.agh-login-pwd__input {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #d7dde7;
  border-radius: 11px;
  background: #fff;
  color: #1f2937;
  font-size: 15px;
  line-height: 1;
  outline: none;
}

.agh-login-pwd__input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .14);
}

.agh-login-pwd__go {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 11px;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.agh-login-pwd__go:disabled { opacity: .55; cursor: default; }

.agh-login-pwd__msg {
  min-height: 16px;
  color: #dc2626;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

#agh-uidpnl .agh-login-hidden {
  display: none !important;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) #agh-uidpnl {
    background: #0f172a;
    border-color: rgba(148, 163, 184, .28);
    box-shadow: 0 18px 50px #00000073;
    color: #e5e7eb;
  }
  html:not([data-theme="light"]) #agh-uidpnl .up-h {
    border-bottom-color: rgba(148, 163, 184, .2);
  }
  html:not([data-theme="light"]) #agh-uidpnl .up-x {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .18);
    color: #e5e7eb;
  }
  html:not([data-theme="light"]) #agh-uidpnl .agh-login-rules,
  html:not([data-theme="light"]) #agh-uidpnl .agh-login-rules > summary,
  html:not([data-theme="light"]) #agh-uidpnl .agh-login-pwd__forgot,
  html:not([data-theme="light"]) #agh-uidpnl .agh-login-pwd__register,
  html:not([data-theme="light"]) #agh-uidpnl .agh-login-pwd__send,
  html:not([data-theme="light"]) #agh-uidpnl .agh-login-pwd__back {
    color: #94a3b8;
  }
  html:not([data-theme="light"]) #agh-uidpnl .agh-login-rules__body {
    background: #1e293b;
    color: #cbd5e1;
  }
  html:not([data-theme="light"]) #agh-uidpnl .agh-login-pwd__input {
    background: #1f2937;
    color: #f3f4f6;
    border-color: #475569;
  }
  html:not([data-theme="light"]) #agh-uidpnl .agh-login-pwd__input::placeholder {
    color: #cbd5e1 !important;
  }
  .agh-login-capsule { background: #14372a; }
  .agh-login-capsule__btn { color: #a7b0be; }
  .agh-login-capsule__btn.is-on { background: #1f2937; color: #4ade80; }
  .agh-login-pwd__input { background: #111827; color: #f3f4f6; border-color: #374151; }
}
html[data-theme="dark"] #agh-uidpnl,
html.dark #agh-uidpnl,
body.dark #agh-uidpnl,
[data-theme="dark"] #agh-uidpnl {
  background: #0f172a;
  border-color: rgba(148, 163, 184, .28);
  box-shadow: 0 18px 50px #00000073;
  color: #e5e7eb;
}
html[data-theme="dark"] #agh-uidpnl .up-h,
html.dark #agh-uidpnl .up-h,
body.dark #agh-uidpnl .up-h,
[data-theme="dark"] #agh-uidpnl .up-h {
  border-bottom-color: rgba(148, 163, 184, .2);
}
html[data-theme="dark"] #agh-uidpnl .up-x,
html.dark #agh-uidpnl .up-x,
body.dark #agh-uidpnl .up-x,
[data-theme="dark"] #agh-uidpnl .up-x {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .18);
  color: #e5e7eb;
}
html[data-theme="dark"] #agh-uidpnl .agh-login-rules,
html[data-theme="dark"] #agh-uidpnl .agh-login-rules > summary,
html[data-theme="dark"] #agh-uidpnl .agh-login-pwd__forgot,
html[data-theme="dark"] #agh-uidpnl .agh-login-pwd__register,
html[data-theme="dark"] #agh-uidpnl .agh-login-pwd__send,
html[data-theme="dark"] #agh-uidpnl .agh-login-pwd__back,
html.dark #agh-uidpnl .agh-login-rules,
html.dark #agh-uidpnl .agh-login-rules > summary,
html.dark #agh-uidpnl .agh-login-pwd__forgot,
html.dark #agh-uidpnl .agh-login-pwd__register,
html.dark #agh-uidpnl .agh-login-pwd__send,
html.dark #agh-uidpnl .agh-login-pwd__back,
body.dark #agh-uidpnl .agh-login-rules,
body.dark #agh-uidpnl .agh-login-rules > summary,
body.dark #agh-uidpnl .agh-login-pwd__forgot,
body.dark #agh-uidpnl .agh-login-pwd__register,
body.dark #agh-uidpnl .agh-login-pwd__send,
body.dark #agh-uidpnl .agh-login-pwd__back {
  color: #94a3b8;
}
html[data-theme="dark"] #agh-uidpnl .agh-login-rules__body,
html.dark #agh-uidpnl .agh-login-rules__body,
body.dark #agh-uidpnl .agh-login-rules__body,
[data-theme="dark"] #agh-uidpnl .agh-login-rules__body {
  background: #1e293b;
  color: #cbd5e1;
}
html[data-theme="dark"] #agh-uidpnl .agh-login-pwd__input,
html.dark #agh-uidpnl .agh-login-pwd__input,
body.dark #agh-uidpnl .agh-login-pwd__input,
[data-theme="dark"] #agh-uidpnl .agh-login-pwd__input {
  background: #1f2937;
  color: #f3f4f6;
  border-color: #475569;
}
html[data-theme="dark"] #agh-uidpnl .agh-login-pwd__input::placeholder,
html.dark #agh-uidpnl .agh-login-pwd__input::placeholder,
body.dark #agh-uidpnl .agh-login-pwd__input::placeholder,
[data-theme="dark"] #agh-uidpnl .agh-login-pwd__input::placeholder {
  color: #cbd5e1 !important;
}
body.dark .agh-login-capsule,
html.dark .agh-login-capsule,
[data-theme="dark"] .agh-login-capsule { background: #14372a; }
body.dark .agh-login-capsule__btn.is-on,
html.dark .agh-login-capsule__btn.is-on,
[data-theme="dark"] .agh-login-capsule__btn.is-on { background: #1f2937; color: #4ade80; }
