/* =============================================================================
   SCEP 登录门禁样式 —— 登录页 + 站内"超时重登"浮层共用一份。
   版本：2026-10-14 首版

   为什么两个场合共用一份：超时浮层里的表单必须和登录页**长得一样**，
   否则用户会以为是某种弹窗广告或系统报错；而两份 CSS 各自演化只需要一个
   周末就会长歪。所以这里所有选择器一律以 `.auth-` 打头或落在 `[data-auth]`
   子树内，业务页加载它不会污染看板自己的样式。

   配色遵守 ui.md §3.2（同一仓库内的硬约束，不是建议）：
     * 内容区浅色底、禁用暗色系 ⇒ 表单与说明文字全部落在白/浅冰蓝上；
       深色只用在顶部那条渐变带（"深蓝渐变顶栏"正是 dash.css 承载科技感的方式）；
     * 正文对比度 ≥7:1 ⇒ --ink #0b1f3a 对白约 15:1，--muted #3b556f 对白约 7.5:1；
     * 中等饱和、禁荧光 ⇒ 光晕一律用品牌蓝的青色端，透明度压到 0.35 以下。
   ============================================================================= */

.auth-root {
  --bg: #eef4ff;
  --bg-deep: #dfeaf9;
  --panel: #ffffff;
  --panel-2: #f6faff;
  --ink: #0b1f3a;
  --ink-2: #22405f;
  --muted: #3b556f;
  --line: #cddcf3;
  --line-strong: #a8c3e8;
  --brand: #1668dc;
  --brand-deep: #0b3d91;
  --brand-ink: #072a63;
  --brand-bright: #2f9bff;
  --cyan: #13c2c2;
  --ok: #237804;
  --warn: #ad6800;
  --bad: #cf1322;
  --radius: 14px;
  --shadow-card: 0 2px 4px rgba(11, 31, 58, .06), 0 18px 48px rgba(22, 104, 220, .16);
  --shadow-pop: 0 4px 10px rgba(11, 31, 58, .10), 0 28px 70px rgba(11, 61, 145, .24);
  --font-display: "Bahnschrift", "DIN Alternate", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --font-mono: "Consolas", "Cascadia Mono", "Courier New", monospace;
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ───────────────────────────────── 登录页整页骨架 */

.auth-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 82% -8%, #dbeafe 0%, rgba(219, 234, 254, 0) 62%),
    radial-gradient(760px 520px at 4% 106%, #d5f4f4 0%, rgba(213, 244, 244, 0) 60%),
    linear-gradient(178deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
}

/* 顶部深蓝带：科技感的全部重量压在这里，正文区一寸深色都不占 */
.auth-band {
  position: relative;
  overflow: hidden;
  padding: 15px 26px 17px;
  background: linear-gradient(100deg, #062a63 0%, var(--brand-deep) 46%, #0a4fa8 78%, #0d6ac0 100%);
  color: #eaf3ff;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 3px solid var(--cyan);
}

/* 带内两层动效：斜向细网格缓慢平移 + 一道横向扫描光 */
.auth-band::before {
  content: "";
  position: absolute;
  inset: -60% -30%;
  background-image:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 15px),
    repeating-linear-gradient(25deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 26px);
  animation: authDrift 26s linear infinite;
  pointer-events: none;
}

.auth-band::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 170px;
  left: -180px;
  background: linear-gradient(90deg, rgba(47, 155, 255, 0), rgba(120, 220, 255, .26), rgba(47, 155, 255, 0));
  animation: authScan 7.5s cubic-bezier(.5, 0, .5, 1) infinite;
  pointer-events: none;
}

@keyframes authDrift { to { transform: translate3d(-15px, -26px, 0); } }
@keyframes authScan { 0% { left: -180px; } 60%, 100% { left: 116%; } }

.auth-mark {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  letter-spacing: .5px;
}

.auth-mark .glyph {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(150, 225, 255, .55);
  box-shadow: inset 0 0 14px rgba(19, 194, 194, .35);
}

.auth-mark .glyph svg { width: 20px; height: 20px; stroke: #9fe8ff; fill: none; stroke-width: 1.9; }
.auth-mark b { font-size: 19px; font-weight: 700; }
.auth-mark span { display: block; font-size: 10.5px; letter-spacing: 2.2px; color: #a8d6ff; text-transform: uppercase; }
.auth-band .band-tail {
  position: relative;
  z-index: 1;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #bfe2ff;
  text-align: right;
  line-height: 1.5;
}

/* 主区：左卡右示意面板 */
.auth-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(360px, 442px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(26px, 5vh, 64px) clamp(20px, 6vw, 72px);
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ───────────────────────────────── 登录卡 */

.auth-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 30px 30px 24px;
  animation: authRise .62s cubic-bezier(.22, .7, .3, 1) both;
}

/* 卡片顶条：dash.css 同款"卡片渐变顶条"语言，保持同一套设计体系 */
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  left: 22px; right: 22px; top: 0;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--brand), var(--cyan) 58%, var(--brand-bright));
}

@keyframes authRise {
  from { opacity: 0; transform: translate3d(0, 22px, 0) scale(.985); }
  to { opacity: 1; transform: none; }
}

.auth-eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 2.6px;
  color: var(--brand-deep);
  text-transform: uppercase;
}

.auth-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: .6px;
  color: var(--ink);
  font-weight: 700;
}

.auth-sub {
  margin: 0 0 22px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.auth-field { margin-bottom: 15px; }

.auth-field > label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .6px;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.auth-input-wrap { position: relative; display: flex; align-items: center; }

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 42px 12px 40px;
  font-size: 15.5px;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color .16s, box-shadow .16s, background .16s;
  letter-spacing: .3px;
}

.auth-input.mono { font-family: var(--font-mono); letter-spacing: 1.6px; }
.auth-input::placeholder { color: #7d94ab; letter-spacing: 0; font-family: var(--font-body); }

.auth-input:hover { border-color: var(--line-strong); }

.auth-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(22, 104, 220, .14), 0 0 18px rgba(47, 155, 255, .22);
}

/* 输入框左侧图标槽 + 右侧"显示口令"按钮 */
.auth-input-wrap .ico {
  position: absolute;
  left: 13px;
  width: 17px; height: 17px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 1.8;
  pointer-events: none;
  opacity: .85;
}

.auth-peek {
  position: absolute;
  right: 8px;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
}

.auth-peek:hover { background: #e8f1fd; color: var(--brand-deep); }
.auth-peek:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.auth-peek svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.auth-peek .eye-off { display: none; }
.auth-peek[aria-pressed="true"] .eye-on { display: none; }
.auth-peek[aria-pressed="true"] .eye-off { display: block; }

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 18px;
  min-height: 20px;
}

.auth-hint { font-size: 12px; color: var(--warn); font-weight: 700; }
.auth-hint[hidden] { display: none; }

/* 提交按钮：深蓝→亮蓝的横向流，按下时整条光带被推过去 */
.auth-submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 3.4px;
  background: linear-gradient(96deg, var(--brand-ink), var(--brand) 52%, #1287d6);
  box-shadow: 0 6px 18px rgba(11, 61, 145, .28);
  transition: transform .12s, box-shadow .18s, filter .18s;
}

.auth-submit::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -40%;
  width: 40%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .30), rgba(255, 255, 255, 0));
  transform: translateX(-140%);
}

.auth-submit:hover { box-shadow: 0 9px 26px rgba(11, 61, 145, .34); filter: saturate(1.08); }
.auth-submit:hover::after { transform: translateX(360%); transition: transform .78s ease; }
.auth-submit:active { transform: translateY(1px) scale(.996); }
.auth-submit:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.auth-submit[disabled] { cursor: progress; opacity: .72; }

.auth-msg {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid transparent;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.auth-msg[hidden] { display: none; }
.auth-msg svg { width: 16px; height: 16px; flex: none; margin-top: 1px; stroke-width: 1.9; fill: none; }
.auth-msg.err { color: #8a0f1b; background: #fdf0f1; border-color: #f3c8cc; }
.auth-msg.err svg { stroke: var(--bad); }
.auth-msg.info { color: var(--brand-ink); background: #eef5ff; border-color: #c7ddf7; }
.auth-msg.info svg { stroke: var(--brand); }

/* 口令错时整卡抖一下：错误提示在键盘流里容易被跳过，动效补一次注意 */
.auth-shake { animation: authShake .42s cubic-bezier(.36, .07, .19, .97); }

@keyframes authShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-7px, 0, 0); }
  40%, 60% { transform: translate3d(7px, 0, 0); }
}

.auth-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.72;
  color: var(--muted);
}

.auth-note b { color: var(--ink-2); }
.auth-note code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: #eaf2fd;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--brand-ink);
}

/* ───────────────────────────────── 右侧示意面板 */

.auth-side { display: flex; flex-direction: column; gap: 18px; animation: authRise .78s .1s cubic-bezier(.22, .7, .3, 1) both; }

.auth-panel {
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px 20px 16px;
  backdrop-filter: blur(2px);
}

.auth-panel h2 {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .8px;
  color: var(--ink);
  font-weight: 700;
}

.auth-panel .p-sub { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.auth-panel .p-sub .fake { color: var(--warn); font-weight: 700; }

/* 96 格时段尺：一格一格亮过去，页面里最"活着"的东西 */
.auth-slots {
  display: flex;
  gap: 2.5px;
  height: 30px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.auth-slots i {
  flex: 1;
  border-radius: 1.5px;
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
  opacity: .17;
  animation: authSlot 5.4s linear infinite;
}

@keyframes authSlot {
  0%, 100% { opacity: .15; }
  6% { opacity: .92; }
  22% { opacity: .3; }
}

.auth-curve { position: relative; }
.auth-curve svg { display: block; width: 100%; height: auto; }

/* 曲线自绘：dasharray 用一条比路径长的定值，配合 scale 无关的视觉长度足够 */
.auth-curve .trace {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: authDraw 2.4s .3s cubic-bezier(.4, .1, .3, 1) forwards;
}

.auth-curve .fill { animation: authFill 1.1s 2.1s ease forwards; opacity: 0; }

@keyframes authDraw { to { stroke-dashoffset: 0; } }
@keyframes authFill { to { opacity: 1; } }

.auth-kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px 14px;
  margin-top: 6px;
}

.auth-kv div {
  border-left: 3px solid var(--brand);
  padding: 2px 0 2px 10px;
  background: linear-gradient(90deg, #f0f6ff, rgba(240, 246, 255, 0));
}

.auth-kv dt { font-size: 11.5px; color: var(--muted); letter-spacing: .4px; }
.auth-kv dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .4px;
}
.auth-kv dd small { font-size: 11.5px; font-weight: 400; color: var(--muted); letter-spacing: 0; }

.auth-foot {
  padding: 12px 26px 16px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: space-between;
  border-top: 1px solid rgba(168, 195, 232, .5);
  background: rgba(255, 255, 255, .5);
}

.auth-foot .mono { font-family: var(--font-mono); }

/* ───────────────────────────────── 超时重登浮层（业务页里盖上来） */

.auth-lock {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(900px 520px at 70% 10%, rgba(219, 234, 254, .92), rgba(219, 234, 254, 0) 70%),
    rgba(238, 244, 255, .93);
  backdrop-filter: blur(7px) saturate(1.05);
  animation: authFade .3s ease both;
  overflow: auto;
}

.auth-lock[hidden] { display: none; }

@keyframes authFade { from { opacity: 0; } to { opacity: 1; } }

.auth-lock .auth-card {
  width: min(430px, 100%);
  box-shadow: var(--shadow-pop);
  animation: authRise .42s cubic-bezier(.22, .7, .3, 1) both;
}

.auth-lock .auth-title { font-size: 25px; }
.auth-lock .auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding: 4px 11px 4px 8px;
  border-radius: 999px;
  background: #fff4e0;
  border: 1px solid #f0d4a4;
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
}

.auth-lock .auth-badge svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* 顶部会话倒计时胶囊（还在线时挂着） */
.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(150, 200, 245, .6);
  background: rgba(255, 255, 255, .14);
  color: #dff0ff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .4px;
  white-space: nowrap;
}

.auth-chip .led {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ee08a;
  box-shadow: 0 0 0 0 rgba(78, 224, 138, .75);
  animation: authLed 2.4s ease-out infinite;
}

.auth-chip.low { color: #ffe1b8; border-color: rgba(255, 196, 120, .6); }
.auth-chip.low .led { background: #ffc46a; box-shadow: 0 0 0 0 rgba(255, 196, 106, .75); }

/* 作者层的 display 会盖掉 [hidden] 的 UA 规则 —— 这条不写，登录页在脚本
   还没填文本之前就顶着一个空胶囊（10-14 截图里 web 页就是这么露出来的）。 */
.auth-chip[hidden] { display: none; }

@keyframes authLed {
  0% { box-shadow: 0 0 0 0 rgba(78, 224, 138, .7); }
  70% { box-shadow: 0 0 0 7px rgba(78, 224, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(78, 224, 138, 0); }
}

.auth-chip button {
  border: 0;
  background: rgba(255, 255, 255, .16);
  color: inherit;
  font: inherit;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.auth-chip button:hover { background: rgba(255, 255, 255, .3); }

/* 深色顶栏上的用户标识（业务页顶栏注入） */
.auth-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #dcecff;
  font-family: var(--font-body);
}

.auth-user .who {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(150, 200, 245, .42);
}

.auth-user a { color: #9fd2ff; text-decoration: none; font-size: 12px; }
.auth-user a:hover { text-decoration: underline; }

/* ───────────────────────────────── 响应式与降级 */

@media (max-width: 1000px) {
  .auth-main { grid-template-columns: minmax(0, 480px); justify-content: center; }
  .auth-side { order: 2; }
}

@media (max-width: 560px) {
  .auth-band { padding: 12px 16px 14px; flex-wrap: wrap; }
  .auth-band .band-tail { display: none; }
  .auth-card { padding: 22px 18px 18px; }
  .auth-title { font-size: 25px; }
  .auth-main { padding: 20px 14px; gap: 20px; }
  .auth-foot { padding: 12px 16px; }
}

/* 减少动效偏好：全部循环动画停掉，静态版式依然完整可读 */
@media (prefers-reduced-motion: reduce) {
  .auth-band::before, .auth-band::after, .auth-slots i, .auth-curve .trace, .auth-curve .fill,
  .auth-card, .auth-side, .auth-chip .led, .auth-lock { animation: none !important; }
  .auth-curve .trace { stroke-dashoffset: 0; }
  .auth-curve .fill { opacity: 1; }
  .auth-slots i { opacity: .55; }
}

/* 打印（有人会打印登录页存档…）：去背景带、留表单 */
@media print {
  .auth-band, .auth-side, .auth-foot { display: none; }
  .auth-page { background: #fff; }
}
