/* ==========================================================================
   工作台 · 简洁玻璃登录卡片（默认态）
   目标：单层玻璃卡片、居中品牌与标题、舒展留白、
         柔和粉紫淡蓝背景；提示仅在聚焦/出错时出现。
   代码全部自行实现。
   ========================================================================== */

:root {
  --wb-violet: #9d8bf7;
  --wb-violet-deep: #6b57e8;
  --wb-blue: #7bb0ff;
  --wb-cyan: #86dff2;
  --wb-pink: #f9a8d4;

  --wb-glass: rgba(255, 255, 255, 0.52);
  --wb-glass-brd: rgba(255, 255, 255, 0.72);
  --wb-field-bg: rgba(255, 255, 255, 0.58);

  --wb-ink: #262142;
  --wb-ink-soft: #55506f;
  --wb-ink-mute: #6e688a;
  --wb-ink-ghost: #9c97b6;

  --wb-danger: #bd2a55;
  --wb-danger-bg: rgba(214, 70, 118, 0.10);

  /* 一层柔和外阴影，不要多层硬阴影 */
  --wb-sh-card: 0 34px 76px -38px rgba(84, 64, 168, 0.34), 0 10px 26px -16px rgba(110, 90, 200, 0.16);
  --wb-sh-btn: 0 10px 24px -12px rgba(112, 96, 235, 0.55);
  --wb-sh-focus: 0 0 0 3px rgba(139, 123, 255, 0.22);

  --wb-grad-brand: linear-gradient(115deg, #8f7cf5 0%, #7ba8ff 46%, #86dff2 100%);
  --wb-grad-btn: linear-gradient(115deg, #6d55e8 0%, #5a66e2 52%, #4370c8 100%);

  --wb-r-card: 28px;
  --wb-r-field: 14px;
  --wb-r-btn: 14px;

  --wb-ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0; min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 14px; line-height: 1.55;
  color: var(--wb-ink);
  background: #f2edff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------------- 背景 ---------------- */
.wb-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(105% 80% at 6% 2%, #e6d9ff 0%, transparent 56%),
    radial-gradient(100% 78% at 94% 0%, #dceaff 0%, transparent 54%),
    radial-gradient(95% 85% at 50% 110%, #fbdcee 0%, transparent 60%),
    radial-gradient(70% 60% at 50% 44%, #fbf7ff 0%, transparent 70%),
    linear-gradient(160deg, #f3eeff 0%, #eaf1ff 48%, #fbeef8 100%);
}
.wb-bg__aura { position: absolute; border-radius: 50%; will-change: transform; transform: translate3d(0,0,0); }
.wb-bg__aura--a {
  width: 56vw; height: 56vw; max-width: 800px; max-height: 800px; left: -16vw; top: -20vw;
  background: radial-gradient(circle, rgba(150,128,250,.52) 0%, rgba(157,139,247,.24) 40%, rgba(157,139,247,.07) 62%, transparent 76%);
  animation: wb-float-a 20s var(--wb-ease) infinite alternate;
}
.wb-bg__aura--b {
  width: 50vw; height: 50vw; max-width: 740px; max-height: 740px; right: -14vw; top: -10vw;
  background: radial-gradient(circle, rgba(110,170,255,.50) 0%, rgba(123,176,255,.22) 42%, rgba(123,176,255,.07) 64%, transparent 78%);
  animation: wb-float-b 25s var(--wb-ease) infinite alternate;
}
.wb-bg__aura--c {
  width: 60vw; height: 60vw; max-width: 880px; max-height: 880px; left: 16vw; bottom: -38vw;
  background: radial-gradient(circle, rgba(248,150,205,.46) 0%, rgba(249,168,212,.20) 42%, rgba(249,168,212,.06) 64%, transparent 78%);
  animation: wb-float-c 29s var(--wb-ease) infinite alternate;
}
.wb-bg__grid {
  position: absolute; inset: -2px; opacity: .45;
  background-image:
    linear-gradient(to right, rgba(120,100,200,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120,100,200,.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(130% 95% at 50% 24%, #000 14%, transparent 76%);
  -webkit-mask-image: radial-gradient(130% 95% at 50% 24%, #000 14%, transparent 76%);
}
.wb-bg__sparks { position: absolute; inset: 0; }
.wb-bg__sparks i {
  position: absolute; left: var(--x); top: var(--y);
  width: var(--s); height: var(--s); border-radius: 50%;
  background: #fff; box-shadow: 0 0 7px 2px rgba(205,195,255,.85);
  animation: wb-spark 10s ease-in-out var(--t) infinite;
}
@keyframes wb-spark { 0%,100% { opacity: .16; } 50% { opacity: .6; } }
.wb-bg__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.26) 0%, transparent 30%);
  animation: wb-veil 18s ease-in-out infinite alternate;
}
@keyframes wb-float-a { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(7vw,5vh,0) scale(1.14); } }
@keyframes wb-float-b { from { transform: translate3d(0,0,0) scale(1.06); } to { transform: translate3d(-9vw,7vh,0) scale(.92); } }
@keyframes wb-float-c { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-6vw,-6vh,0) scale(1.12); } }
@keyframes wb-veil { from { opacity: .65; } to { opacity: 1; } }

/* ---------------- 布局 ---------------- */
.wb-auth {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 20px;
}
.wb-auth__inner {
  width: 100%; max-width: 432px;
  animation: wb-rise .65s var(--wb-ease) both;
}
@keyframes wb-rise {
  from { opacity: 0; transform: translate3d(0,14px,0); }
  to   { opacity: 1; transform: none; }
}

/* 单层玻璃卡片 */
.wb-glass {
  position: relative;
  border-radius: var(--wb-r-card);
  background: var(--wb-glass);
  border: 1px solid var(--wb-glass-brd);
  box-shadow: var(--wb-sh-card);
  overflow: hidden;
  animation: wb-rise .75s var(--wb-ease) .06s both;
}
/* 顶部一条极细高光，只做质感，不做第二层框 */
.wb-glass::before {
  content: ""; position: absolute; left: 16%; right: 16%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent);
}

.wb-glass__body { padding: 52px 48px 46px; }

/* 品牌居中 */
.wb-brand {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin-bottom: 26px;
}
.wb-brand__mark {
  width: 56px; height: 56px;
  border-radius: 18px;
  display: grid; place-items: center;
  background: var(--wb-grad-brand);
  box-shadow: 0 12px 26px -12px rgba(120,100,220,.7), inset 0 1px 0 rgba(255,255,255,.65);
  color: #fff; font-size: 25px; font-weight: 700;
}
.wb-brand__name {
  font-size: 13px; font-weight: 600;
  letter-spacing: .3em; text-indent: .3em;
  color: var(--wb-ink-soft);
}

/* 标题居中 */
.wb-auth__title {
  margin: 0 0 10px;
  font-size: 28px; font-weight: 600; letter-spacing: .005em;
  text-align: center; color: var(--wb-ink);
}
.wb-auth__sub {
  margin: 0 0 34px;
  font-size: 14.5px; text-align: center; color: var(--wb-ink-mute);
}

/* 表单 */
.wb-field { margin-bottom: 20px; position: relative; }

.wb-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wb-inputwrap { position: relative; }
.wb-inputwrap__icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  display: flex; color: var(--wb-ink-ghost);
  pointer-events: none; transition: color .18s;
}
.wb-inputwrap:focus-within .wb-inputwrap__icon { color: var(--wb-violet-deep); }

.wb-input {
  display: block; width: 100%;
  font-size: 16px; font-family: inherit;
  color: var(--wb-ink);
  background: var(--wb-field-bg);
  border: 1px solid rgba(140,120,200,.18);
  border-radius: var(--wb-r-field);
  padding: 15px 17px;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.wb-input--icon { padding-left: 48px; }
.wb-input--pwd { padding-right: 64px; }
.wb-input::placeholder { color: #a8a3c1; }
.wb-input:hover { border-color: rgba(140,120,200,.32); }
.wb-input:focus {
  border-color: var(--wb-violet);
  background: #fff;
  box-shadow: var(--wb-sh-focus);
}
.wb-input:-webkit-autofill,
.wb-input:-webkit-autofill:hover,
.wb-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--wb-ink);
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  caret-color: var(--wb-ink);
}
.wb-input[aria-invalid="true"] { border-color: rgba(189,42,85,.5); }
.wb-input[aria-invalid="true"]:focus { border-color: var(--wb-danger); box-shadow: 0 0 0 3px rgba(189,42,85,.15); }

.wb-pwd__toggle {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent;
  color: var(--wb-ink-ghost); cursor: pointer;
  transition: color .18s, background .18s;
}
.wb-pwd__toggle:hover { color: var(--wb-violet-deep); background: rgba(139,123,255,.10); }
.wb-pwd__toggle:focus-visible { outline: 2px solid var(--wb-violet-deep); outline-offset: 1px; }

/* 提示：默认完全隐藏，不占位 */
.wb-hint {
  position: absolute; left: 2px; top: 100%;
  margin: 6px 0 0;
  font-size: 12.5px; line-height: 1.4;
  color: var(--wb-violet-deep);
  opacity: 0; transform: translateY(-2px);
  pointer-events: none;
  transition: opacity .2s var(--wb-ease), transform .2s var(--wb-ease);
}
.wb-hint.is-show { opacity: 1; transform: translateY(0); }
.wb-hint.is-error { color: var(--wb-danger); }

/* 主按钮 */
.wb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 54px;
  margin-top: 12px;
  padding: 15px 20px;
  font-size: 16px; font-weight: 600; font-family: inherit;
  letter-spacing: .05em;
  color: #fff; border: 0;
  border-radius: var(--wb-r-btn);
  cursor: pointer;
  background: var(--wb-grad-btn);
  box-shadow: var(--wb-sh-btn);
  transition: transform .16s var(--wb-ease), box-shadow .2s, filter .16s;
}
.wb-btn:hover { filter: brightness(1.07); box-shadow: 0 16px 32px -14px rgba(112,96,235,.65); transform: translateY(-1px); }
.wb-btn:active { transform: translateY(0) scale(.995); }
.wb-btn:focus-visible { outline: 2px solid var(--wb-violet-deep); outline-offset: 3px; }

/* 错误条 */
.wb-alert {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 20px; padding: 11px 13px;
  font-size: 13px; color: var(--wb-danger);
  background: var(--wb-danger-bg);
  border: 1px solid rgba(214,70,118,.26);
  border-radius: 12px;
  animation: wb-shake .34s var(--wb-ease);
}
@keyframes wb-shake {
  0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); }
  55% { transform: translateX(3px); } 80% { transform: translateX(-2px); }
}

/* 底部说明 */
.wb-auth__secure {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 26px 0 0;
  font-size: 12px; color: var(--wb-ink-ghost);
}
.wb-auth__secure svg { flex: 0 0 auto; opacity: .85; }

/* ---------------- 移动端 ---------------- */
@media (max-width: 560px) {
  .wb-auth { padding: 30px 16px; align-items: flex-start; padding-top: 7vh; }
  .wb-auth__inner { max-width: 100%; }
  .wb-glass { border-radius: 24px; }
  .wb-glass__body { padding: 36px 24px 32px; }
  .wb-auth__title { font-size: 26px; }
  .wb-auth__sub { margin-bottom: 28px; }
  .wb-brand__mark { width: 50px; height: 50px; border-radius: 16px; font-size: 22px; }
  .wb-btn { min-height: 52px; }
}

@media (max-height: 640px) and (min-width: 561px) {
  .wb-auth { align-items: flex-start; padding-top: 28px; }
  .wb-glass__body { padding: 38px 42px 34px; }
}

/* ---------------- 减少动态效果 ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .wb-bg__aura, .wb-bg__veil, .wb-bg__sparks i { animation: none !important; }
}
