/* ============================================================================
   ⛔ 登录页已冻结（2026-11-18）
   以下内容（聚光灯、磁吸、卡片圆角、钢蓝配色、深色令牌、按钮圆角）Zach 已定稿。
   **未经他明确要求，任何改动都不要碰这一页**——包括顺手「优化」。
   冻结快照：data/backup/login-frozen-20261118/web/
   ============================================================================

/* ============================================================================
   登录页 · 聚光灯
   思路：登录页的背景是一张被四层压暗的建筑照（见 polish.css 的 .auth-shell）。
   这里在它上面再叠一份「原亮度」的照片，用一层跟随指针的径向遮罩把它透出来——
   等于在暗场里开了一束光，照到哪里哪里的建筑才显形。不是加一个蓝色圆斑，
   而是真的把被压掉的那层画面「点」起来，所以移动时能看见楼的曲面跟着亮。

   两个层：
     .auth-spot  提亮 1.5 倍的同一张照片 + 径向遮罩（主效果）
     .auth-glow  同位置的冷蓝柔光，给边缘一点空气感，避免光斑边界太硬
   两者都只吃两个变量 --sx / --sy（百分比），由 app.js 在 pointermove 里写。
   ========================================================================= */

.auth-shell {
  --sx: 72%;
  --sy: 40%;
  --spot-r: clamp(110px, 9vw, 180px);
  isolation: isolate;
}

/* 两栏内容压到光层之上；没有这一步，光会把文字也一起洗掉 */
.auth-shell .auth-story,
.auth-shell .auth-main {
  position: relative;
  z-index: 1;
}

.auth-spot,
.auth-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.auth-shell.is-lit .auth-spot { opacity: 0.6; }
.auth-shell.is-lit .auth-glow { opacity: 1; }

/* 主光：同一张照片、同样的取景，靠遮罩决定「照到哪儿」 */
.auth-spot {
  background-image:
    linear-gradient(180deg, rgba(14, 30, 54, 0.16), rgba(8, 16, 32, 0.18)),
    url("/assets/login-tower.webp");
  background-size: cover;
  background-position: center, 50% 44%;
  background-repeat: no-repeat;
  filter: brightness(1.46) saturate(1.14) contrast(1.02);
  /* 遮罩每帧都在动：提前把这一层交给合成器，别让整页跟着重绘 */
  will-change: mask-image;
  /* 一条「长尾」的衰减曲线：0→100% 分十档连续下降，且最后 10% 只剩 7%→0 的极缓收尾。
     以前是 `#000 0% → .55 34% → 透明 68%`，只有三段线性，末端斜率突然截断，
     眼睛就会顺着那条斜率突变认出「一个圆」。档位越密、尾巴越长，越看不出边界。 */
  -webkit-mask-image: radial-gradient(
    circle var(--spot-r) at var(--sx) var(--sy),
    #000 0%,
    rgba(0, 0, 0, 0.97) 10%,
    rgba(0, 0, 0, 0.9) 20%,
    rgba(0, 0, 0, 0.8) 30%,
    rgba(0, 0, 0, 0.68) 40%,
    rgba(0, 0, 0, 0.55) 50%,
    rgba(0, 0, 0, 0.41) 60%,
    rgba(0, 0, 0, 0.28) 70%,
    rgba(0, 0, 0, 0.16) 80%,
    rgba(0, 0, 0, 0.07) 90%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle var(--spot-r) at var(--sx) var(--sy),
    #000 0%,
    rgba(0, 0, 0, 0.97) 10%,
    rgba(0, 0, 0, 0.9) 20%,
    rgba(0, 0, 0, 0.8) 30%,
    rgba(0, 0, 0, 0.68) 40%,
    rgba(0, 0, 0, 0.55) 50%,
    rgba(0, 0, 0, 0.41) 60%,
    rgba(0, 0, 0, 0.28) 70%,
    rgba(0, 0, 0, 0.16) 80%,
    rgba(0, 0, 0, 0.07) 90%,
    transparent 100%
  );
}

/* 老内核没有 mask-image：宁可不显示，也不要把整张亮图糊满一屏 */
@supports not ((mask-image: radial-gradient(#000, transparent)) or (-webkit-mask-image: radial-gradient(#000, transparent))) {
  .auth-spot { display: none; }
}

/* 冷蓝柔光：比主光更散、更淡，只负责把光斑边缘化开 */
.auth-glow {
  background: radial-gradient(
    circle calc(var(--spot-r) * 1.18) at var(--sx) var(--sy),
    rgba(139, 180, 226, 0.1) 0%,
    rgba(139, 180, 226, 0.06) 33%,
    rgba(139, 180, 226, 0.028) 58%,
    rgba(139, 180, 226, 0.01) 80%,
    transparent 100%
  );
}

/* 触屏：没有指针可跟，静态一团光反而像渲染错误，直接关掉 */
@media (hover: none), (pointer: coarse) {
  .auth-spot,
  .auth-glow { display: none; }
}

/* 用户在系统里关了动效：保留光，只是不再缓动 */
@media (prefers-reduced-motion: reduce) {
  .auth-spot,
  .auth-glow { transition: none; }
}

/* 左侧标题区的「遮光板」：光扫到文字下面时，把左栏再压回去一档。
   放在光层之后、两栏内容之前（内容 z-index:1），所以只有背景变暗，字不受影响。
   没有这块，白色大标题压在被照亮的建筑上会掉对比度。 */
.auth-veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(5, 8, 13, 0.44) 0%,
    rgba(5, 8, 13, 0.32) 24%,
    rgba(5, 8, 13, 0.14) 42%,
    rgba(5, 8, 13, 0) 54%
  );
}
@media (max-width: 1100px) {
  /* 窄屏是上下堆叠，标题在上：遮光板改成整屏压暗，别只压左边 */
  .auth-veil {
    background: linear-gradient(180deg, rgba(5, 8, 13, 0.5) 0%, rgba(5, 8, 13, 0.16) 42%, rgba(5, 8, 13, 0) 70%);
  }
}

/* 遮光板减薄之后，文字改用一层极轻的暗影托底：
   光扫到标题下面时，白字仍然立得住，但不会有「一块黑影」的痕迹。 */
.auth-story .story-body > p,
.auth-story .story-body small,
.auth-story .eyebrow {
  text-shadow: 0 1px 12px rgba(4, 8, 14, 0.85), 0 0 2px rgba(4, 8, 14, 0.6);
}
.auth-story .story-body h1 {
  text-shadow: 0 2px 22px rgba(4, 8, 14, 0.7);
}

/* 光落到卡片附近时，卡片描边跟着亮一档——否则鼠标挪到表单上，光被卡片挡住，
   会以为效果没了。只改描边和投影，不动尺寸，不会抖动。 */
.auth-form-wrap { transition: border-color 0.25s ease, box-shadow 0.25s ease; }
/* 悬停只提亮描边，不再加一圈 1px 外扩阴影：
   那圈阴影会跟内部的光弧一起看，又变成「两层边」。 */
.auth-form-wrap:hover {
  border-color: rgba(255, 255, 255, 0.18) !important;
}

/* ---------------------------------------------------------------- 卡片圆角与「绕边冷光」对齐
   问题：卡片在 ds.css 里被压成 12px 圆角，而 theme.css 那圈 conic 冷光还是
   `inset:-2px; padding:2px; border-radius:20px` —— 两套几何对不上，
   转角处光弧比卡片多外扩约 8px，看上去像多了一条错位的边、过渡不自然。
   修法：两者绑成同一套几何。光弧改成 1px、`inset:0`，正好压住卡片自身的 1px 描边
   （原来是叠在描边外面，所以出现双层边）；圆角统一 16px，转角处同心。
   顺带把 conic 里的黑色段改成透明——深色段会像污渍一样贴在卡片边外。 */
.auth-shell .auth-form-wrap {
  border-radius: 16px !important;
}
.auth-shell .auth-form-wrap::before {
  inset: 0 !important;
  padding: 1px !important;
  border-radius: 16px !important;
  background: conic-gradient(
    from var(--ang),
    rgba(0, 0, 0, 0) 0deg 230deg,
    rgba(127, 176, 255, 0.5) 266deg,
    rgba(255, 255, 255, 0.85) 292deg,
    rgba(127, 176, 255, 0.5) 318deg,
    rgba(0, 0, 0, 0) 360deg
  ) !important;
  animation-duration: 9s !important;
}

/* ============================================================================
   登录页 · 固定深色 + 回到之前的钢蓝
   ① 登录页压在一张暗色建筑照上，本来就该永远深色：用户切到浅色主题后，
      卡片仍是深色（ds.css 强制），但输入框跟着浅色令牌变成白底，
      于是出现「深色卡 + 白色输入框 + 绿色对焦圈」的拼接。这里把深色令牌
      直接钉在 .auth-shell 上，整页不再受主题影响。
   ② 绿色只属于产品内部的主操作；登录页是品牌页，用之前那版钢蓝 CTA。
   ========================================================================= */
.auth-shell {
  --bg: #0a0a0a;
  --bg-sub: #0d0d0d;
  --card: #141414;
  --card-2: #171717;
  --card-3: #232323;
  --line: rgba(255, 255, 255, 0.07);
  --line-soft: rgba(255, 255, 255, 0.05);
  --line-strong: rgba(255, 255, 255, 0.14);
  --ink: #f2f4f2;
  --ink-2: #c6ccc7;
  --ink-3: #8d948d;
  --ink-4: #737a73;
  --ink-5: #5a605a;
}

/* 主按钮：钢蓝（之前那版），保留顶部一线高光，不加外发光 */
.auth-shell .auth-main .btn.primary,
.auth-shell .auth-main .btn.primary.full {
  background: linear-gradient(180deg, #3a6a9c, #23466b) !important;
  border-color: #1c3a5a !important;
  color: #eef5fd !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 6px rgba(8, 20, 36, 0.32) !important;
}
.auth-shell .auth-main .btn.primary:hover:not(:disabled),
.auth-shell .auth-main .btn.primary.full:hover:not(:disabled) {
  background: linear-gradient(180deg, #43749f, #2a4f74) !important;
  border-color: #1c3a5a !important;
  color: #f6faff !important;
}
.auth-shell .auth-main .btn.primary:active:not(:disabled),
.auth-shell .auth-main .btn.primary.full:active:not(:disabled) {
  background: linear-gradient(180deg, #2f5c8b, #1d3c5e) !important;
}
.auth-shell .auth-main .btn.primary:disabled,
.auth-shell .auth-main .btn.primary.full:disabled {
  background: #2a323c !important;
  border-color: #333d49 !important;
  color: #78828f !important;
  box-shadow: none !important;
}

/* 输入框：深底 + 冷灰描边；聚焦用同一族的钢蓝，不再闪绿 */
.auth-shell .field input,
.auth-shell .field select,
.auth-shell .field textarea {
  background: #171717 !important;
  border-color: rgba(255, 255, 255, 0.13) !important;
  color: #eef2ef !important;
}
.auth-shell .field input:focus,
.auth-shell .field select:focus,
.auth-shell .field textarea:focus {
  border-color: rgba(122, 166, 214, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(58, 106, 156, 0.22) !important;
}
.auth-shell .field input::placeholder { color: #5f665f !important; }
.auth-shell .field > span { color: #a5aca6 !important; }

/* 链接与小标记：同一族的浅钢蓝，深底上才看得清 */
.auth-shell .auth-main a,
.auth-shell .auth-bottom a,
.auth-shell .helper-line a { color: #85aed6 !important; }
.auth-shell .auth-main a:hover { color: #a9c9e8 !important; }
.auth-shell .auth-form-wrap .eyebrow::before {
  background: #7fa6cb !important;
  box-shadow: none !important;
}

/* 磁吸：位移只走 transform，不参与布局；键盘聚焦时由脚本跳过硬位移 */
.auth-shell .field input,
.auth-shell .auth-main .btn.primary.full {
  /* transform 交给 JS 逐帧插值，这里只管配色动效；两条一起走会互相打架 */
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .auth-shell .field input,
  .auth-shell .auth-main .btn.primary.full { transition: none; }
}

/* ---------------------------------------------------------------- 登录键圆角定死
   现象：默认 9px、鼠标一进就变胶囊。原因是 ds.css 那条
   `.btn.primary, .btn.primary:hover:not(:disabled) { border-radius: 999px }`
   —— 非悬停时被 `.auth-main .btn.primary.full` 的 9px（特异性更高）压住，
   而 `:hover` 那半个选择器多两个伪类，特异性反超，于是悬停瞬间跳成胶囊。
   这里直接把登录页的主按钮钉成胶囊，各状态一致，不再变形。 */
.auth-shell .auth-main .btn.primary,
.auth-shell .auth-main .btn.primary.full {
  border-radius: 999px !important;
}
