/* 代理版/管理版全屏登录页：独立深色风格，默认不随面板日间/夜间主题切换。
   所有样式都在 .login-gate 作用域内，绝不影响面板主体。
   主题按钮只改本层 data-lg-theme，不碰面板的 html[data-theme]。 */
.login-gate {
  --lg-bg:#050505; --lg-surface:#0b0b0b; --lg-surface2:#101010; --lg-line:#262626;
  --lg-ink:#f2f2f2; --lg-ink2:#b8b8b8; --lg-dim:#7d7d7d; --lg-faint:#4d4d4d;
  --lg-hi:#ececec; --lg-accent:#c8f24a; --lg-accent-soft:rgba(200,242,74,.12); --lg-danger:#ff7a7a;
  --lg-mono:'JetBrains Mono',ui-monospace,Menlo,Consolas,monospace;
  --lg-disp:'Space Grotesk','Arial Narrow',Arial,sans-serif;
  --lg-sans:system-ui,-apple-system,'Microsoft YaHei','PingFang SC',sans-serif;
  position:fixed; inset:0; z-index:9999; overflow:auto;
  background:var(--lg-bg); color:var(--lg-ink);
  font:14px/1.5 var(--lg-sans); -webkit-font-smoothing:antialiased;
  box-sizing:border-box; transition:background .3s,color .3s;
}
.login-gate[data-lg-theme="light"] {
  --lg-bg:#f3f5ee; --lg-surface:#fff; --lg-surface2:#fafbf6; --lg-line:#dcdfd0;
  --lg-ink:#14170d; --lg-ink2:#3d4430; --lg-dim:#6a7259; --lg-faint:#9aa289;
  --lg-hi:#14170d; --lg-accent:#7aa816; --lg-accent-soft:rgba(122,168,22,.12); --lg-danger:#c0392b;
}
.login-gate[hidden] { display:none !important; }
/* 首帧防闪：head 内联脚本同步置 gate=open，登录层立刻可见、面板主体不可见。 */
html[data-gate="open"] .sidebar,
html[data-gate="open"] .content { visibility:hidden !important; }
html[data-gate="open"] .login-gate[hidden] { display:block !important; }
/* 管理版登录层：不注册、不在本机保存密码。 */
.login-gate[data-mode="admin"] .lg-reg,
.login-gate[data-mode="admin"] .lg-checks { display:none !important; }
.login-gate *, .login-gate *::before, .login-gate *::after { box-sizing:border-box; }
.login-gate button, .login-gate input { font:inherit; color:inherit; }
.login-gate .lg-wrap {
  max-width:1600px; margin:0 auto; border-left:1px solid var(--lg-line); border-right:1px solid var(--lg-line);
  min-height:100vh; display:flex; flex-direction:column; background:var(--lg-bg);
}

/* 顶栏 */
.login-gate .lg-bar { display:flex; align-items:stretch; height:62px; border-bottom:1px solid var(--lg-line); flex:none; padding:0 clamp(18px,3vw,44px); }
.login-gate .lg-brand { display:flex; align-items:center; gap:13px; flex:1; min-width:0; letter-spacing:.16em; font-weight:600; font-size:13px; white-space:nowrap; overflow:hidden; }
.login-gate .lg-mark { width:32px; height:32px; border:1px solid var(--lg-accent); display:grid; place-items:center; color:var(--lg-accent); font:700 12px var(--lg-mono); transform:rotate(-45deg); flex:none; }
.login-gate .lg-mark span { transform:rotate(45deg); }
.login-gate .lg-cell { display:flex; align-items:center; gap:8px; padding:0 18px; border-left:1px solid var(--lg-line); letter-spacing:.08em; white-space:nowrap; font:11px var(--lg-mono); color:var(--lg-dim); }
.login-gate .lg-dot { width:7px; height:7px; background:var(--lg-accent); display:inline-block; animation:lgBlink 1.4s steps(2) infinite; }
@keyframes lgBlink{50%{opacity:.25}}
.login-gate .lg-theme { align-self:center; border:1px solid var(--lg-line); background:transparent; color:var(--lg-dim); padding:7px 12px; cursor:pointer; font:11px var(--lg-mono); letter-spacing:.06em; }
.login-gate .lg-theme:hover { color:var(--lg-accent); border-color:var(--lg-accent); }

/* 两栏 */
.login-gate .lg-row3 { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(380px,.65fr); flex:1; border-bottom:1px solid var(--lg-line); }
.login-gate .lg-col { border-right:1px solid var(--lg-line); min-width:0; }
.login-gate .lg-col:last-child { border-right:0; }

/* 左：功能轮播 */
.login-gate .lg-show { min-width:0; border-right:1px solid var(--lg-line); display:flex; flex-direction:column; padding:clamp(24px,3vw,46px) clamp(24px,3.4vw,56px) 26px; overflow:hidden; position:relative; background:radial-gradient(ellipse at 20% 10%,var(--lg-accent-soft),transparent 55%); }
.login-gate .lg-kicker { display:flex; justify-content:space-between; font:11px var(--lg-mono); letter-spacing:.16em; color:var(--lg-dim); text-transform:uppercase; }
.login-gate .lg-kicker b { color:var(--lg-ink); font-weight:500; }
.login-gate .lg-vp { flex:1; min-height:400px; display:flex; align-items:center; overflow:hidden; }
.login-gate .lg-track { display:flex; width:100%; transition:transform .65s cubic-bezier(.22,.61,.36,1); }
.login-gate .lg-slide { min-width:100%; display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:clamp(18px,2vw,36px); align-items:center; opacity:.25; transform:scale(.97); transition:opacity .5s,transform .5s; padding:0 2px; }
.login-gate .lg-slide.active { opacity:1; transform:none; }
.login-gate .lg-snum { font:700 clamp(58px,7vw,104px)/1 var(--lg-mono); color:transparent; -webkit-text-stroke:1px var(--lg-faint); letter-spacing:-.06em; margin-bottom:6px; }
.login-gate .lg-stag { display:inline-block; font:11px var(--lg-mono); letter-spacing:.14em; color:var(--lg-accent); border:1px solid var(--lg-accent); padding:4px 9px; margin-bottom:16px; text-transform:uppercase; }
.login-gate .lg-slide h1 { font:600 clamp(26px,3vw,44px)/1.16 var(--lg-sans); letter-spacing:-.02em; margin:0 0 16px; }
.login-gate .lg-slide h1 em { font-style:normal; color:var(--lg-accent); }
.login-gate .lg-slide p { margin:0; color:var(--lg-ink2); font-size:14px; line-height:1.85; max-width:30ch; }
.login-gate .lg-slide ul { list-style:none; padding:0; margin:22px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
.login-gate .lg-slide ul li { font:11px var(--lg-mono); color:var(--lg-dim); border:1px solid var(--lg-line); padding:6px 10px; letter-spacing:.04em; }

/* 动态图容器 */
.login-gate .lg-viz { height:clamp(260px,27vw,360px); border:1px solid var(--lg-line); background:var(--lg-surface); position:relative; overflow:hidden; display:grid; place-items:center; padding:12px; }
.login-gate .lg-viz::before { content:""; position:absolute; inset:0; background-image:linear-gradient(var(--lg-line) 1px,transparent 1px),linear-gradient(90deg,var(--lg-line) 1px,transparent 1px); background-size:34px 34px; opacity:.22; pointer-events:none; }
.login-gate .lg-vlabel { position:absolute; left:14px; top:12px; font:10px var(--lg-mono); letter-spacing:.14em; color:var(--lg-dim); z-index:2; }
.login-gate .lg-vstatus { position:absolute; right:14px; bottom:12px; font:10px var(--lg-mono); letter-spacing:.12em; color:var(--lg-dim); z-index:2; display:flex; align-items:center; gap:7px; }
.login-gate .lg-viz svg { width:100%; height:100%; position:relative; z-index:1; }

/* 图0 资源库卡片：两列横排，透明无边框叠在网格底图上；标题不折行、标签不压标题 */
/* 容器本身也去掉黑底和边框，直接融进 lg-show 底图 */
.login-gate .lg-viz-res { border:0; background:transparent; padding:32px 10px 14px; }
.login-gate .lg-viz-res::before { display:none; }
.login-gate .lg-viz-res .lg-vlabel { left:12px; top:9px; }
.login-gate .lg-viz-res .lg-vstatus { right:12px; top:9px; bottom:auto; }
.login-gate .lg-res-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 14px; width:100%; position:relative; z-index:2; }
.login-gate .lg-res-card { border:0; background:transparent; padding:6px 8px 6px 11px; position:relative; opacity:0; transform:translateY(8px); }
.login-gate .lg-slide.active .lg-res-card { animation:lgResCard .5s ease forwards; animation-delay:calc(var(--i)*.08s + .15s); }
@keyframes lgResCard{to{opacity:1;transform:none}}
.login-gate .lg-res-card::before { content:""; position:absolute; left:0; top:2px; bottom:2px; width:2px; background:var(--lg-accent); opacity:.85; }
.login-gate .lg-res-top { display:flex; align-items:center; gap:8px; min-width:0; }
.login-gate .lg-res-ico { width:24px; height:24px; display:grid; place-items:center; border:1px solid var(--lg-line); color:var(--lg-accent); flex:none; }
.login-gate .lg-res-ico svg { width:15px; height:15px; }
.login-gate .lg-res-card b { font:600 13px/1.3 var(--lg-sans); color:var(--lg-ink); white-space:nowrap; }
.login-gate .lg-res-bot { display:flex; align-items:center; justify-content:space-between; gap:6px; margin-top:7px; }
.login-gate .lg-res-card small { font:10px var(--lg-mono); color:var(--lg-dim); letter-spacing:.02em; white-space:nowrap; }
.login-gate .lg-res-card em { flex:none; font:9px var(--lg-mono); font-style:normal; letter-spacing:.06em; padding:2px 5px; }
.login-gate .lg-res-card em.free { color:var(--lg-accent); border:1px solid var(--lg-accent); }
.login-gate .lg-res-card em.paid { color:var(--lg-danger); border:1px solid var(--lg-danger); }

/* 图1 K线 */
.login-gate .lg-cline { fill:none; stroke:var(--lg-accent); stroke-width:2; stroke-dasharray:1400; stroke-dashoffset:1400; }
.login-gate .lg-slide.active .lg-cline { animation:lgDraw 3.4s ease forwards; }
@keyframes lgDraw{to{stroke-dashoffset:0}}
.login-gate .lg-carea { fill:url(#lgAreaG); opacity:0; }
.login-gate .lg-slide.active .lg-carea { animation:lgFade 1.4s .5s ease forwards; }
@keyframes lgFade{to{opacity:.5}}
.login-gate .lg-candle { opacity:0; }
.login-gate .lg-slide.active .lg-candle { animation:lgCIn .5s ease forwards; animation-delay:calc(var(--i)*.11s + .2s); }
@keyframes lgCIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.login-gate .lg-volbar { transform-origin:center bottom; transform:scaleY(0); }
.login-gate .lg-slide.active .lg-volbar { animation:lgVol 3s ease-in-out infinite alternate; animation-delay:calc(var(--i)*.08s); }
@keyframes lgVol{to{transform:scaleY(1)}}

/* 图2 监控卡片 */
.login-gate .lg-mon-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; width:100%; position:relative; z-index:2; }
.login-gate .lg-mon-card { border:1px solid var(--lg-line); background:var(--lg-surface2); padding:12px 13px; position:relative; overflow:hidden; }
.login-gate .lg-mon-card::after { content:""; position:absolute; left:0; bottom:0; height:2px; width:var(--w,60%); background:var(--lg-accent); }
.login-gate .lg-mc-t { font:10px var(--lg-mono); letter-spacing:.1em; color:var(--lg-dim); display:flex; justify-content:space-between; align-items:center; }
.login-gate .lg-mc-v { font:600 clamp(16px,1.7vw,24px) var(--lg-mono); margin:8px 0 2px; letter-spacing:-.02em; }
.login-gate .lg-mc-v.up { color:var(--lg-accent); }
.login-gate .lg-mc-v.dn { color:var(--lg-danger); }
.login-gate .lg-mc-s { font:10px var(--lg-mono); color:var(--lg-dim); }
.login-gate .lg-pulse { width:6px; height:6px; border-radius:50%; background:var(--lg-accent); animation:lgBlink 1.8s infinite; }
.login-gate .lg-mon-card:nth-child(2) .lg-pulse{animation-delay:.4s}.login-gate .lg-mon-card:nth-child(3) .lg-pulse{animation-delay:.8s}
.login-gate .lg-mon-card:nth-child(4) .lg-pulse{animation-delay:1.2s}.login-gate .lg-mon-card:nth-child(5) .lg-pulse{animation-delay:1.6s}.login-gate .lg-mon-card:nth-child(6) .lg-pulse{animation-delay:2s}

/* 图3 授权环 */
.login-gate .lg-ring { fill:none; stroke:var(--lg-line); stroke-width:1.4; stroke-dasharray:5 7; transform-box:fill-box; transform-origin:center; animation:lgSpin 18s linear infinite; }
.login-gate .lg-ring2 { animation-duration:12s; animation-direction:reverse; }
@keyframes lgSpin{to{transform:rotate(360deg)}}
.login-gate .lg-shield { fill:none; stroke:var(--lg-accent); stroke-width:2; filter:drop-shadow(0 0 8px var(--lg-accent-soft)); }
.login-gate .lg-auth-badge { font:10px var(--lg-mono); fill:var(--lg-accent); }
.login-gate .lg-flow-line { fill:none; stroke:var(--lg-accent); stroke-width:1.2; stroke-dasharray:3 6; animation:lgDash2 2.4s linear infinite; opacity:.7; }
@keyframes lgDash2{to{stroke-dashoffset:-36}}
.login-gate .lg-flow-dot { fill:var(--lg-accent); }
.login-gate .lg-chk { stroke:var(--lg-accent); stroke-width:2; fill:none; opacity:0; }
.login-gate .lg-slide.active .lg-chk { animation:lgChkIn .4s .9s ease forwards; }
@keyframes lgChkIn{from{opacity:0;stroke-dasharray:20}to{opacity:1;stroke-dasharray:20}}

/* 图4 中继拓扑 */
.login-gate .lg-torbit { fill:none; stroke:var(--lg-line); stroke-width:1; stroke-dasharray:3 6; animation:lgDash2 8s linear infinite; }
.login-gate .lg-torbit2 { animation-duration:11s; animation-direction:reverse; }
.login-gate .lg-tnode { fill:var(--lg-surface); stroke:var(--lg-dim); stroke-width:1.5; }
.login-gate .lg-tnode.hot { stroke:var(--lg-accent); fill:var(--lg-accent-soft); }
.login-gate .lg-tcore { fill:var(--lg-surface); stroke:var(--lg-accent); stroke-width:2; }
.login-gate .lg-tpulse { fill:none; stroke:var(--lg-accent); stroke-width:1; transform-box:fill-box; transform-origin:center; animation:lgPulse 2.6s ease-out infinite; }
.login-gate .lg-tpulse.d2 { animation-delay:1.3s; }
@keyframes lgPulse{from{transform:scale(.4);opacity:.8}to{transform:scale(2.1);opacity:0}}
.login-gate .lg-tlbl { font:9px var(--lg-mono); fill:var(--lg-dim); text-anchor:middle; }
.login-gate .lg-tcap { font:9px var(--lg-mono); fill:var(--lg-accent); text-anchor:middle; letter-spacing:1.2px; }
.login-gate .lg-tspin { transform-box:fill-box; transform-origin:center; animation:lgSpin 14s linear infinite; }
.login-gate .lg-tpath { fill:none; stroke:transparent; stroke-width:1; }
.login-gate .lg-pkt { fill:var(--lg-accent); filter:drop-shadow(0 0 5px var(--lg-accent)); }

/* 轮播控件 */
.login-gate .lg-cbar { display:flex; align-items:center; gap:16px; padding-top:18px; border-top:1px solid var(--lg-line); margin-top:14px; }
.login-gate .lg-dots { display:flex; gap:7px; flex:1; }
.login-gate .lg-dots button { width:26px; height:3px; border:0; background:var(--lg-line); cursor:pointer; padding:0; position:relative; overflow:hidden; }
.login-gate .lg-dots button i { position:absolute; inset:0; background:var(--lg-accent); transform:scaleX(0); transform-origin:left; }
.login-gate .lg-dots button.on i { transform:scaleX(1); }
.login-gate .lg-dots button.on i.run { animation:lgProgress 5s linear forwards; }
@keyframes lgProgress{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.login-gate .lg-arrow { width:30px; height:30px; border:1px solid var(--lg-line); background:transparent; color:var(--lg-dim); cursor:pointer; flex:none; }
.login-gate .lg-arrow:hover { color:var(--lg-accent); border-color:var(--lg-accent); }
.login-gate .lg-count { font:11px var(--lg-mono); color:var(--lg-dim); letter-spacing:.1em; flex:none; }

/* 右：登录表单 */
.login-gate .lg-login { padding:clamp(26px,3vw,48px) clamp(26px,3vw,52px); display:flex; flex-direction:column; background:var(--lg-surface); }
.login-gate .lg-form-inner { width:100%; max-width:380px; margin:auto 0; }
.login-gate .lg-tag { display:flex; justify-content:space-between; font:11px var(--lg-mono); letter-spacing:.16em; color:var(--lg-dim); margin-bottom:26px; }
.login-gate .lg-tag b { color:var(--lg-ink); font-weight:500; }
.login-gate .lg-lead { font:600 clamp(22px,2vw,28px)/1.3 var(--lg-sans); letter-spacing:-.02em; margin:0 0 6px; }
.login-gate .lg-sub { color:var(--lg-dim); font-size:12px; margin:0 0 30px; }
.login-gate .lg-field { border:1px solid var(--lg-line); display:flex; align-items:center; margin-bottom:12px; transition:border-color .2s; }
.login-gate .lg-field:focus-within { border-color:var(--lg-accent); }
.login-gate .lg-field label { padding:0 13px; color:var(--lg-dim); border-right:1px solid var(--lg-line); align-self:stretch; display:flex; align-items:center; font:11px var(--lg-mono); letter-spacing:.08em; min-width:78px; text-transform:uppercase; }
.login-gate .lg-field input { flex:1; min-width:0; background:none; border:0; padding:15px 12px; outline:0; font-size:14px; }
.login-gate .lg-field input::placeholder { color:var(--lg-faint); }
.login-gate .lg-checks { display:flex; gap:22px; margin:4px 0 18px; }
.login-gate .lg-rem { display:flex; align-items:center; gap:9px; cursor:pointer; color:var(--lg-dim); font-size:12px; user-select:none; }
.login-gate .lg-rem input { position:absolute; opacity:0; pointer-events:none; }
.login-gate .lg-rem i { width:16px; height:16px; border:1px solid var(--lg-line); display:grid; place-items:center; flex:none; transition:.15s; }
.login-gate .lg-rem input:checked+i { background:var(--lg-accent); border-color:var(--lg-accent); }
.login-gate .lg-rem input:checked+i::after { content:""; width:8px; height:4px; border-left:2px solid #000; border-bottom:2px solid #000; transform:rotate(-45deg) translate(1px,-1px); }
.login-gate .lg-rem:hover { color:var(--lg-ink); }
.login-gate .lg-form { display:flex; flex-direction:column; }
.login-gate .lg-go { margin-top:2px; width:100%; padding:16px; background:var(--lg-accent); color:#000; border:0; cursor:pointer; font-weight:700; letter-spacing:.18em; transition:transform .2s,filter .2s; }
.login-gate .lg-go:hover { transform:translateY(-2px); filter:brightness(1.1); }
.login-gate .lg-go:disabled { opacity:.6; cursor:default; transform:none; }
.login-gate .lg-err { min-height:18px; margin:10px 0 0; color:var(--lg-danger); font-size:12px; }
.login-gate .lg-reg { margin-top:14px; text-align:center; font-size:12px; color:var(--lg-dim); }
.login-gate .lg-reg a { color:var(--lg-ink); text-decoration:none; border-bottom:1px solid var(--lg-line); padding-bottom:2px; cursor:pointer; }
.login-gate .lg-reg a:hover { color:var(--lg-accent); border-color:var(--lg-accent); }
.login-gate .lg-note { margin-top:32px; padding-top:18px; border-top:1px solid var(--lg-line); color:var(--lg-faint); font-size:11px; line-height:1.8; }

/* 注册弹窗 */
.login-gate .lg-dialog { width:min(440px,92vw); padding:0; border:1px solid var(--lg-line); background:var(--lg-surface); color:var(--lg-ink); font:13px/1.5 var(--lg-sans); }
.login-gate .lg-dialog::backdrop { background:rgba(0,0,0,.72); backdrop-filter:blur(3px); }
.login-gate .lg-dialog form { padding:24px 26px 26px; display:flex; flex-direction:column; }
.login-gate .lg-dialog-head { display:flex; justify-content:space-between; align-items:center; padding-bottom:14px; border-bottom:1px solid var(--lg-line); }
.login-gate .lg-dialog-head h3 { margin:0; font:600 16px var(--lg-sans); letter-spacing:.04em; }
.login-gate .lg-dialog-x { background:none; border:0; color:var(--lg-dim); font-size:16px; cursor:pointer; }
.login-gate .lg-dialog-x:hover { color:var(--lg-ink); }
.login-gate .lg-dialog-note { color:var(--lg-dim); font-size:12px; margin:14px 0 18px; }
.login-gate .lg-dialog label { display:block; color:var(--lg-dim); font-size:12px; margin-bottom:12px; letter-spacing:.04em; }
.login-gate .lg-dialog label small { color:var(--lg-faint); }
.login-gate .lg-dialog label input { display:block; width:100%; margin-top:6px; padding:12px; background:var(--lg-bg); border:1px solid var(--lg-line); color:var(--lg-ink); outline:0; font-size:14px; }
.login-gate .lg-dialog label input:focus { border-color:var(--lg-accent); }
.login-gate .lg-dialog .lg-go { margin-top:6px; }
.login-gate .captcha-q { display:inline-block; min-width:92px; padding:3px 8px; border-radius:6px; background:var(--lg-bg); border:1px solid var(--lg-line); font-family:monospace; font-weight:600; color:var(--lg-accent); }
.login-gate .lg-dialog label .btn-small { display:inline-block; width:auto; margin:0 0 0 6px; padding:6px 10px; }
.login-gate .lg-dialog [data-email-code-row][hidden] { display:none !important; }
.login-gate .lg-code-row { display:flex; gap:8px; align-items:stretch; margin-top:6px; }
.login-gate .lg-code-row input { flex:1; min-width:0; margin-top:0; }
.login-gate .lg-code-row .btn-small { flex:0 0 auto; margin:0; padding:0 12px; white-space:nowrap; }
.login-gate .lg-code-row .btn-small:disabled { opacity:.55; cursor:not-allowed; }

/* 忘记密码入口：与记住/自动登录同排，右对齐 */
.login-gate .lg-checks { align-items:center; }
.login-gate .lg-forgot { margin-left:auto; color:var(--lg-dim); font-size:12px; text-decoration:none; border-bottom:1px solid var(--lg-line); padding-bottom:2px; cursor:pointer; }
.login-gate .lg-forgot:hover { color:var(--lg-accent); border-color:var(--lg-accent); }

/* 紧凑弹窗：两列网格 + 收紧间距，单屏容纳不滚动 */
.login-gate .lg-dialog.lg-dialog-compact { width:min(520px,94vw); }
.login-gate .lg-dialog.lg-dialog-compact form { padding:18px 22px 20px; gap:0; }
.login-gate .lg-dialog.lg-dialog-compact .lg-dialog-head { padding-bottom:10px; }
.login-gate .lg-dialog.lg-dialog-compact .lg-dialog-note { margin:10px 0 14px; line-height:1.5; }
.login-gate .lg-dialog.lg-dialog-compact label { margin-bottom:10px; }
.login-gate .lg-dialog.lg-dialog-compact label input { margin-top:4px; padding:9px 11px; }
.login-gate .lg-dialog.lg-dialog-compact .lg-fgrid { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; }
.login-gate .lg-dialog.lg-dialog-compact .lg-captcha-line { margin-bottom:10px; }
.login-gate .lg-dialog.lg-dialog-compact .lg-code-row { margin:-2px 0 10px; }
.login-gate .lg-dialog.lg-dialog-compact .lg-go { padding:11px; margin-top:2px; }
.login-gate .lg-dialog.lg-dialog-compact .captcha-q { min-width:76px; }
@media (max-width:560px) { .login-gate .lg-dialog.lg-dialog-compact { width:96vw; } }

@media (max-width:1100px) {
  .login-gate .lg-row3 { grid-template-columns:1fr; }
  .login-gate .lg-show { border-right:0; border-bottom:1px solid var(--lg-line); }
  .login-gate .lg-slide { grid-template-columns:1fr 1fr; }
  .login-gate .lg-login { border-top:1px solid var(--lg-line); }
}
@media (max-width:700px) {
  .login-gate .lg-slide { grid-template-columns:1fr; }
  .login-gate .lg-slide ul { display:none; }
  .login-gate .lg-viz { height:230px; }
  .login-gate .lg-viz-res { padding:28px 6px 26px; }
  .login-gate .lg-res-grid { gap:6px; }
  .login-gate .lg-res-card { padding:7px 8px; }
  .login-gate .lg-res-top { gap:5px; }
  .login-gate .lg-res-ico { width:20px; height:20px; }
  .login-gate .lg-res-ico svg { width:13px; height:13px; }
  .login-gate .lg-res-card b { font-size:11px; }
  .login-gate .lg-res-bot { margin-top:5px; }
  .login-gate .lg-res-card small { font-size:9px; }
  .login-gate .lg-res-card em { font-size:8px; padding:1px 3px; }
  .login-gate .lg-cell { display:none; }
  .login-gate .lg-form-inner { margin:20px auto; }
}

/* ---------- 验证码行控件跟随登录层主题（两档通用） ---------- */
/* 忘记密码弹窗的邮箱验证码行是独立 span.lg-code-row，不在 label 内，
   原 .lg-dialog label input 选择器匹配不到 → 显示浏览器默认白框。
   这里直接按登录层 token 上色，日间/夜间都正确。 */
.login-gate .lg-dialog .lg-code-row input {
  background:var(--lg-bg); border:1px solid var(--lg-line);
  color:var(--lg-ink); outline:0; padding:9px 11px; font-size:14px;
}
.login-gate .lg-dialog .lg-code-row input::placeholder { color:var(--lg-faint); }
.login-gate .lg-dialog .lg-code-row input:focus { border-color:var(--lg-accent); }

/* 登录层内的小按钮（换一题 / 发送验证码）统一用登录层 token，
   不用面板 --panel/--text —— 面板主题与登录页主题独立，串色会变灰。 */
.login-gate .btn.btn-small {
  background:var(--lg-surface2); border:1px solid var(--lg-line);
  color:var(--lg-accent); border-radius:3px;
}
.login-gate .btn.btn-small:hover:not(:disabled) {
  border-color:var(--lg-accent); background:var(--lg-accent-soft);
}
/* 禁用态保留足够对比度，别让"发送验证码"三个字糊在底色里 */
.login-gate .lg-code-row .btn-small:disabled { opacity:.78; }

/* Chrome 自动填充强制浅底：用 inset 巨阴影盖掉，文字用登录层前景色。
   登录主表框在 --lg-surface 上，弹窗输入框在 --lg-bg 上，分别贴合。 */
.login-gate input:-webkit-autofill,
.login-gate input:-webkit-autofill:hover,
.login-gate input:-webkit-autofill:focus {
  -webkit-text-fill-color:var(--lg-ink);
  caret-color:var(--lg-ink);
  transition:background-color 5000s ease-in-out 0s;
}
.login-gate .lg-field input:-webkit-autofill { -webkit-box-shadow:0 0 0 1000px var(--lg-surface) inset; }
.login-gate .lg-dialog input:-webkit-autofill { -webkit-box-shadow:0 0 0 1000px var(--lg-bg) inset; }
