/* ============================================================
   VisionClick 登录 / 注册 / 找回密码 专用美化（v1.3.20）
   仅 login.html 引入，不影响 admin / dashboard / index
   设计语言：
   - 轮廓透明：毛玻璃面板（backdrop blur + 半透明描边 + 顶部流光细线）
   - 哑光流光：低饱和 pastel 渐变；字符用 background-clip:text 做流动动画
   - 图标按钮：内联 SVG 引用 #vcGrad 渐变描边，主按钮居中胶囊
   ============================================================ */

:root {
  --glass-1: rgba(31, 33, 41, .58);
  --glass-2: rgba(16, 17, 23, .52);
  --glass-line: rgba(255, 255, 255, .10);
  --glass-line-strong: rgba(255, 255, 255, .17);
  --ink: #e8ecf5;
  --ink-dim: #9aa3b5;
  --grad-a: #9dc0ff;   /* 哑光蓝 */
  --grad-b: #86dcc2;   /* 哑光青 */
  --grad-c: #bcaef2;   /* 哑光紫 */
}

/* ---------- 背景：哑光极光，缓慢流动 ---------- */
body {
  background:
    radial-gradient(1100px 620px at 14% 8%,   rgba(94, 164, 255, .10), transparent 60%),
    radial-gradient(880px 520px  at 86% 16%,  rgba(86, 212, 178, .09), transparent 60%),
    radial-gradient(1000px 700px at 52% 104%, rgba(150, 124, 226, .10), transparent 62%),
    var(--bg);
  min-height: 100vh;
}
body::before {
  content: ""; position: fixed; inset: -18%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(36% 28% at 24% 28%, rgba(94, 164, 255, .17), transparent 62%),
    radial-gradient(32% 26% at 76% 20%, rgba(86, 212, 178, .14), transparent 62%),
    radial-gradient(38% 32% at 50% 84%, rgba(150, 124, 226, .15), transparent 64%);
  filter: blur(26px);
  animation: vcAurora 30s ease-in-out infinite alternate;
}
@keyframes vcAurora {
  0%   { transform: translate3d(-2%,   -1%, 0) scale(1); }
  50%  { transform: translate3d(2.5%,  2%,  0) scale(1.07); }
  100% { transform: translate3d(-1.5%, 2.5%,0) scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .grad-text   { animation: none; }
}

/* ---------- 顶栏 / 页脚：更透的轮廓 ---------- */
.nav {
  background: rgba(14, 15, 19, .48);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.brand .dot { box-shadow: 0 0 12px rgba(94, 164, 255, .55); }
.footer {
  text-align: center; color: var(--ink-dim); font-size: 12px;
  padding: 26px 0 34px; border: none; background: none;
}

/* ---------- 毛玻璃面板 ---------- */
.panel {
  background: linear-gradient(165deg, var(--glass-1), var(--glass-2));
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .07);
  padding: 30px 28px 26px;
  position: relative; overflow: hidden;
}
/* 顶部一道流光细线，呼应「哑光流光」 */
.panel::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent,
    rgba(157, 192, 255, .60), rgba(134, 220, 194, .50),
    rgba(188, 174, 242, .50), transparent);
}

/* ---------- 标题：图标 + 流光渐变字符 ---------- */
.panel h2 {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 6px; font-size: 22px; letter-spacing: .5px;
}
.panel .sub { color: var(--ink-dim); font-size: 13px; margin: 0 0 20px; }
.grad-text {
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-c), var(--grad-a));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: vcFlow 9s linear infinite;
}
@keyframes vcFlow { to { background-position: -300% 0; } }

/* ---------- 面板顶部品牌区（美化 panel） ---------- */
.panel-brand { text-align: center; margin-bottom: 20px; }
.brand-badge {
  width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-c));
  box-shadow: 0 10px 26px rgba(94, 164, 255, .28), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.brand-badge svg { width: 28px; height: 28px; stroke: rgba(10, 20, 32, .82); }
.brand-name { font-size: 15px; color: var(--ink); letter-spacing: .5px; font-weight: 600; }

/* ---------- 面板底部统一切换：登录 / 注册 / 找回密码，始终同一行 ---------- */
.form-switch {
  display: flex; gap: 6px; margin-top: 22px; padding: 5px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
}
.fs-item {
  flex: 1; text-align: center; padding: 9px 10px; border-radius: 10px;
  cursor: pointer; color: var(--ink-dim); border: 1px solid transparent;
  font-size: 14px; transition: .18s; user-select: none; text-decoration: none;
}
.fs-item:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.fs-item.active {
  color: #fff;
  background: linear-gradient(160deg, rgba(78, 161, 255, .18), rgba(56, 211, 159, .13));
  border-color: rgba(140, 190, 255, .34);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .09);
}

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-dim); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, .05);
  color: var(--ink); font-size: 14px; outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.field input::placeholder { color: rgba(154, 163, 181, .55); }
.field input:focus {
  border-color: rgba(157, 192, 255, .50);
  box-shadow: 0 0 0 3px rgba(94, 164, 255, .14);
  background: rgba(255, 255, 255, .07);
}

/* 验证码行 */
.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-row .iwrap { flex: 1; }
.captcha-img {
  display: inline-flex; border-radius: 10px; overflow: hidden; flex: none;
  border: 1px solid var(--glass-line); background: rgba(0, 0, 0, .28);
}
.captcha-img svg { display: block; }

/* 带左侧图标的输入框（参考图风格：图标内嵌，输入框更精致） */
.iwrap { position: relative; }
.iwrap .in-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; pointer-events: none; opacity: .9;
}
.iwrap input { padding-left: 40px; }

/* ---------- 按钮：图标 + 居中 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--glass-line-strong);
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  color: var(--ink); cursor: pointer; font-size: 14px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .16s, box-shadow .16s, border-color .16s, filter .16s;
}
.btn:hover {
  border-color: rgba(157, 192, 255, .45);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .30);
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* 主按钮：哑光流光渐变胶囊，居中 */
.btn-primary {
  display: flex; width: fit-content; min-width: 250px;
  margin: 22px auto 2px; padding: 12px 28px;
  font-weight: 700; font-size: 15px; color: #0a1420;
  background: linear-gradient(120deg, var(--grad-a) 0%, var(--grad-b) 55%, var(--grad-c) 130%);
  border: none;
  box-shadow: 0 12px 30px rgba(94, 164, 255, .24), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 16px 36px rgba(94, 164, 255, .30), inset 0 1px 0 rgba(255, 255, 255, .50);
}
.btn-primary .ico { stroke: rgba(10, 20, 32, .82); }   /* 亮底上用深色图标 */
.btn-center { display: flex; width: fit-content; margin: 10px auto 0; }

/* 图标尺寸 */
.ico    { width: 18px; height: 18px; flex: none; }
.ico-sm { width: 15px; height: 15px; flex: none; }
.ico-lg { width: 22px; height: 22px; flex: none; }

/* ---------- 注册结果区 ---------- */
.section-title { font-size: 13px; color: var(--ink-dim); margin: 4px 0 8px; font-weight: 600; letter-spacing: .5px; }
.box {
  display: block; padding: 11px 13px; border-radius: 12px;
  background: rgba(0, 0, 0, .32);
  border: 1px dashed var(--glass-line-strong);
  color: var(--grad-b);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px; word-break: break-all;
}
.muted { color: var(--ink-dim); font-size: 13px; }

/* 登录：按钮下方一行纯文字链（去注册 · 找回密码，无按钮背景） */
.form-links {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 14px; font-size: 13px;
}
.form-links a { color: var(--ink-dim); cursor: pointer; text-decoration: none; transition: color .16s; }
.form-links a:hover { color: var(--ink); text-decoration: underline; }
.dot-sep { color: var(--ink-dim); opacity: .45; user-select: none; }

/* 注册 / 找回密码：按钮与文字链同行（按钮实心骨架，文字链无背景纯文字） */
.form-row {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 22px; flex-wrap: wrap;
}
.form-row .btn-primary { margin: 0; }   /* 取消主按钮 auto 居中，跟随行内排列 */
.link-inline {
  font-size: 13px; color: var(--ink-dim); cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: color .16s;
}
.link-inline:hover { color: var(--ink); text-decoration: underline; }

/* ============ 登录：滑动拼图验证码（替代文字验证码） ============ */
/* 触发按钮：未验证为普通态，已验证转为绿色对勾 */
.slide-trigger { width: 100%; justify-content: flex-start; }
.slide-trigger.ok {
  border-color: rgba(56, 211, 159, .55);
  background: linear-gradient(160deg, rgba(56, 211, 159, .20), rgba(56, 211, 159, .08));
  color: #9ff3d4;
}
.slide-trigger.ok .ico { stroke: #9ff3d4; }

/* 弹窗遮罩（冒泡） */
.slide-mask {
  position: fixed; inset: 0; z-index: 60;
  display: none; align-items: center; justify-content: center;
  background: rgba(8, 9, 13, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: slideFade .18s ease-out;
}
@keyframes slideFade { from { opacity: 0; } to { opacity: 1; } }
.slide-pop {
  width: fit-content; max-width: 94vw;
  padding: 18px 18px 20px;
  border-radius: 18px;
  background: linear-gradient(165deg, var(--glass-1), var(--glass-2));
  border: 1px solid var(--glass-line-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(22px) saturate(1.35); -webkit-backdrop-filter: blur(22px) saturate(1.35);
}
.slide-pop.shake { animation: slideShake .4s; }
@keyframes slideShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-9px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); } 80% { transform: translateX(4px); }
}
.slide-pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.slide-pop-title { font-size: 14px; color: var(--ink); font-weight: 600; }
.slide-close {
  width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .05);
  color: var(--ink-dim); font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.slide-close:hover { color: var(--ink); border-color: var(--glass-line-strong); }

/* 拼图画布 */
.slide-canvas {
  position: relative; overflow: hidden;
  border-radius: 12px; border: 1px solid var(--glass-line);
  background: #0c0e14;
}
.slide-bg, .slide-piece { position: absolute; inset: 0; }
.slide-bg svg, .slide-piece svg { width: 100%; height: 100%; display: block; }
.slide-piece { pointer-events: none; will-change: transform; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); }
.slide-tip {
  margin: 10px 2px 12px; font-size: 13px; color: var(--ink-dim); text-align: center;
}
.slide-tip.err { color: #ff9a9a; }

/* 滑动轨道 */
.slide-track {
  position: relative; height: 42px; border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--glass-line);
  overflow: hidden; touch-action: none;
}
.slide-fill {
  position: absolute; left: 0; top: 0; height: 100%; width: 0;
  background: linear-gradient(90deg, rgba(78,161,255,.35), rgba(56,211,159,.35));
}
.slide-handle {
  position: absolute; top: 3px; left: 0; width: 40px; height: 34px;
  border-radius: 999px; cursor: grab; touch-action: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--grad-a), var(--grad-c));
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
  color: #0a1420; font-size: 18px; font-weight: 700; user-select: none;
}
.slide-handle:active { cursor: grabbing; }
.slide-arrow { pointer-events: none; }

/* ---------- 邮箱验证状态条（注册：替代原「安全验证」按钮） ---------- */
.mail-state {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 12px;
  border: 1px dashed var(--glass-line-strong);
  background: rgba(255, 255, 255, .04);
  color: var(--ink-dim); font-size: 13px; line-height: 1.5;
}
.mail-state .ico { flex: none; }
.mail-state-text { word-break: break-all; }
.mail-state.ok {
  border-style: solid; border-color: rgba(56, 211, 159, .55);
  background: linear-gradient(160deg, rgba(56, 211, 159, .18), rgba(56, 211, 159, .07));
  color: #9ff3d4;
}
.mail-state.ok .ico { stroke: #9ff3d4; }

