/* ============================================================================
   登录页 · 复刻 Jominy「Bloom」视觉（深色氛围 + 玻璃卡 + 花瓣 + 深空环）
   保留：嘉俊英才 EHR 的 logo / 标题 / 文案 / 登录逻辑（手机号+密码）。
   去除：参考站的 ICP 备案号。
   作用域：全部挂在 #authView.jj-login 下，优先级高于全局 .auth-view，不污染主应用。
   ========================================================================== */

/* ---------- 背景层 ---------- */
#authView.jj-login {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(24px, 5vw, 64px) 16px;
  overflow: hidden auto;
  color: #f4f7fb;
  background:
    radial-gradient(52% 68% at 50% 42%, rgba(143, 92, 255, 0.20), transparent 72%),
    linear-gradient(145deg, #08070f 0%, #10091c 52%, #05040a 100%);
}
#authView.jj-login::before { display: none; } /* 关掉旧的点阵纹理 */

/* 氛围装饰：极光光晕 / 深空环 / 花瓣 */
.jj-login__bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.jj-login__glow {
  position: absolute; top: 50%; left: 50%;
  width: min(82vw, 900px); height: min(82vw, 900px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 44%, rgba(251, 224, 255, 0.22), transparent 42%),
    radial-gradient(circle at 70% 74%, rgba(139, 92, 246, 0.26), transparent 64%);
  filter: blur(24px); opacity: .85;
}
.jj-login__depth-halo,
.jj-login__depth-orbit {
  position: absolute; border-radius: 50%; display: block;
}
.jj-login__depth-halo {
  width: min(62vw, 860px); height: min(62vw, 860px);
  right: -12vw; bottom: -30vw;
  border: 1px solid rgba(190, 147, 255, 0.18);
  transform: rotate(-18deg) perspective(800px) rotateX(64deg);
  box-shadow: 0 0 100px rgba(122, 89, 255, 0.14), inset 0 0 90px rgba(107, 209, 255, 0.06);
}
.jj-login__depth-orbit {
  width: min(54vw, 720px); height: min(18vw, 240px);
  right: 12vw; bottom: 16vh;
  border: 1px solid rgba(220, 191, 255, 0.14);
  transform: rotate(-24deg) perspective(700px) rotateX(65deg);
  box-shadow: 0 0 34px rgba(189, 132, 255, 0.10);
}
.jj-login__petals { position: absolute; inset: 0; opacity: .64; }
.jj-petal {
  position: absolute; display: block; opacity: 0;
  width: clamp(9px, 1vw, 17px); height: clamp(15px, 1.8vw, 28px);
  transform-origin: 50% 15%;
  background: linear-gradient(145deg, #fff5faf0, #ef98c7b8 55%, #77bcff4d);
  border-radius: 72% 28% 62% 38%;
  box-shadow: 0 0 10px rgba(255, 187, 225, 0.34), 0 0 22px rgba(102, 205, 255, 0.12);
  animation: jj-petal-fall var(--petal-duration, 7s) linear infinite;
}
.jj-petal--1 { --petal-duration: 8.2s; --petal-drift: 100px;  animation-delay: -2.8s; top: 16%; left: 22%; transform: rotate(20deg); }
.jj-petal--2 { --petal-duration: 6.7s; --petal-drift: -72px;  animation-delay: -4.6s; top: 10%; left: 34%; transform: rotate(-25deg) scale(.82); }
.jj-petal--3 { --petal-duration: 9.4s; --petal-drift: 58px;   animation-delay: -1.8s; top: 20%; left: 49%; transform: rotate(42deg) scale(.72); }
.jj-petal--4 { --petal-duration: 7.4s; --petal-drift: -112px; animation-delay: -5.1s; top: 13%; left: 66%; transform: rotate(-12deg) scale(.64); }
.jj-petal--5 { --petal-duration: 8.8s; --petal-drift: 124px;  animation-delay: -3.4s; top: 23%; left: 78%; transform: rotate(78deg) scale(.56); }
.jj-petal--6 { --petal-duration: 7.1s; --petal-drift: -46px;  animation-delay: -6.2s; top: 42%; left: 28%; transform: rotate(-48deg) scale(.7); }
.jj-petal--7 { --petal-duration: 10.2s; --petal-drift: 76px;  animation-delay: -7.5s; top: 39%; left: 73%; transform: rotate(12deg) scale(.62); }
.jj-petal--8 { --petal-duration: 8.1s; --petal-drift: -88px;  animation-delay: -4.1s; top: 49%; left: 86%; transform: rotate(-64deg) scale(.5); }
@keyframes jj-petal-fall {
  0%   { opacity: 0; transform: translate(-8px, -8vh) rotate(0) scale(.72); }
  10%  { opacity: .78; }
  46%  { opacity: .9; }
  100% { opacity: 0; transform: translate3d(var(--petal-drift, 50px), 78vh, 0) rotate(560deg) scale(1.02); }
}

/* ---------- 卡片 ---------- */
.jj-login__stage { z-index: 2; width: min(100%, 448px); position: relative; }
#authView.jj-login .jj-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: clamp(28px, 5vw, 46px) clamp(24px, 5vw, 48px) 32px;
  border: 1px solid #ffffff26;
  border-radius: 0;
  background: linear-gradient(145deg, #040507db, #08080abd);
  -webkit-backdrop-filter: blur(18px) saturate(110%);
  backdrop-filter: blur(18px) saturate(110%);
  box-shadow: 0 28px 90px #0000009e, inset 0 1px #ffffff1a;
  animation: jj-card-in .75s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes jj-card-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.jj-card__sheen {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  opacity: .26; mix-blend-mode: screen;
  background:
    linear-gradient(115deg, #ffffff1f, #0000 20% 67%, #ffffff0d),
    radial-gradient(at 50% 0, #ffffff1a, #0000 42%);
}
.jj-card__header, .jj-form, .jj-links, .jj-note, .jj-error { position: relative; z-index: 1; }

/* ---------- 品牌（保留自有 logo / 标题） ---------- */
#authView.jj-login .jj-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.jj-brand__mark {
  width: 44px; height: 44px; flex: none; object-fit: cover;
  border-radius: 11px;
  border: 1px solid rgba(203, 141, 255, 0.42);
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.28), inset 0 1px rgba(255, 255, 255, 0.28);
}
#authView.jj-login .jj-brand__text { display: block; }
#authView.jj-login .brand-title {
  display: block; font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  color: #ffffffe6; font-size: 20px; font-weight: 400; letter-spacing: .01em;
  white-space: nowrap; text-align: left;
}
#authView.jj-login .brand-sub {
  display: block; margin-top: 2px; color: #ffffff7a;
  font-size: 11px; letter-spacing: .04em; text-transform: none; text-align: left;
}

/* ---------- 标题 ---------- */
.jj-intro { margin-top: 22px; text-align: center; }
#authView.jj-login .auth-heading {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 400; color: #fff; letter-spacing: -.045em;
  text-shadow: 0 8px 28px #ffbcef29;
}

/* ---------- 表单 ---------- */
#authView.jj-login .jj-form { display: grid; gap: 14px; margin-top: 26px; }
.jj-field { display: grid; gap: 8px; }
.jj-field > span {
  color: #ffffffb3; font-size: 11px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
}
.jj-input {
  width: 100%; height: 48px; padding: 0 14px;
  color: #fff; font-size: 14px;
  background: #ffffff0b; border: 1px solid #ffffff29; border-radius: 0;
  outline: none; transition: border-color .16s, box-shadow .16s, background .16s;
  -webkit-appearance: none; appearance: none;
}
.jj-input::placeholder { color: #ffffff59; }
.jj-input:focus { border-color: #de9effbf; box-shadow: 0 0 0 2px #cb8dff2e; }
.jj-input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #14121f inset;
  transition: background-color 9999s ease-out;
}
.jj-pwd { position: relative; display: block; }
.jj-pwd .jj-input { padding-right: 50px; }
.jj-pwd-toggle {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent; border-radius: 8px;
  color: #cdd5efa8; cursor: pointer; padding: 0;
  transition: color .16s, background-color .16s, border-color .16s;
}
.jj-pwd-toggle:hover { color: #fff; border-color: #de9eff38; background: #cb8dff1f; }
.jj-pwd-toggle svg { width: 18px; height: 18px; display: block; }

/* 提交按钮：赭紫实心、方角、字距拉宽（复刻参考站） */
#authView.jj-login .jj-submit {
  width: 100%; min-height: 48px; margin-top: 5px;
  color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .22em;
  text-indent: .22em; cursor: pointer;
  background: #cb8dff; border: 0; border-radius: 0;
  transition: background-color .16s, transform .16s;
}
#authView.jj-login .jj-submit:hover { background: #d6a1ff; }
#authView.jj-login .jj-submit:active { transform: translateY(1px); }
#authView.jj-login .jj-submit:disabled { opacity: .5; cursor: not-allowed; }

.jj-error { color: #ffb4aa; font-size: 12px; min-height: 0; line-height: 1.5; }
.jj-error:empty { display: none; }

/* ---------- 链接 / 备注 ---------- */
#authView.jj-login .jj-links { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; font-size: 11px; color: #b4bbd8b3; }
#authView.jj-login .jj-links .link-btn { background: none; border: 0; padding: 0; color: #eecaffd1; font-size: 11px; cursor: pointer; }
#authView.jj-login .jj-links .link-btn:hover { color: #fff; text-decoration: underline; }
#authView.jj-login .jj-note {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid #ffffff1a;
  color: #ffffff73; font-size: 10.5px; line-height: 1.6; text-align: center;
}
#authView.jj-login .jj-note a { color: #cbb6ff; text-decoration: none; }
#authView.jj-login .jj-note a:hover { text-decoration: underline; }

.jj-pwd-toggle.is-on { color: #fff; border-color: #de9eff38; background: #cb8dff1f; }
#authView.jj-login .jj-forgot-msg { margin-top: 12px; color: #cbb6ff; font-size: 11.5px; text-align: center; line-height: 1.6; }
#authView.jj-login .jj-forgot-msg a { color: #e6d7ff; text-decoration: none; }
#authView.jj-login .jj-forgot-msg a:hover { text-decoration: underline; }

/* ---------- 移动端微调 ---------- */
@media (max-width: 560px) {
  #authView.jj-login { padding: 24px 12px 34px; align-items: center; }
  #authView.jj-login .jj-card { padding: 30px 22px 26px; }
  #authView.jj-login .jj-brand { justify-content: center; }
  #authView.jj-login .brand-title, #authView.jj-login .brand-sub { text-align: left; }
}

/* 尊重「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  .jj-petal, .jj-card { animation: none !important; }
}
