/* style.css — 盘转云 · 暗色控制台（Control Room）
   底色三层区分层级：#0b0e14 页面 / #11151f 面板 / #171c28 卡片
   主色荧光青 #22d3ee；数据色：琥珀(提取码) / 绿(成功) / 红(失败)
   数字、链接、ID、API Key 一律等宽（IBM Plex Mono，自托管 woff2，加载失败降级系统等宽）
   所有 class 名与旧版保持兼容，app.js 渲染模板零改动 */

/* ===== 自托管字体（latin 子集，CJK 字符走系统字体栈） ===== */
@font-face{font-family:'IBM Plex Mono'; font-style:normal; font-weight:400; font-display:swap;
  src:url('/fonts/ibm-plex-mono-400.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'IBM Plex Mono'; font-style:normal; font-weight:500; font-display:swap;
  src:url('/fonts/ibm-plex-mono-500.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'IBM Plex Mono'; font-style:normal; font-weight:600; font-display:swap;
  src:url('/fonts/ibm-plex-mono-600.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root,
:root[data-theme="dark"]{
  --bg:#0b0e14; --panel:#11151f; --panel-2:#171c28; --ink:#e6edf3; --muted:#8b98ab; --muted-2:#5b6779;
  --line:#232b3b; --line-soft:#1c2230; --hover-line:#39445c; --line-strong:#2a3346;
  --brand:#22d3ee; --brand-dim:rgba(34,211,238,.14); --brand-glow:0 0 18px rgba(34,211,238,.25); --brand-border:rgba(34,211,238,.45);
  --brand-grad-a:#0ea5c4; --brand-grad-b:#22d3ee; --btn-primary-ink:#04121a; --info:#60a5fa;
  --amber:#fbbf24; --ok:#34d399; --warn:#fbbf24; --err:#f87171;
  --radius:12px;
  --mono:'IBM Plex Mono',ui-monospace,Consolas,Menlo,monospace;
  --nav-w:220px;
  --glow-color:rgba(34,211,238,.07);
  --grid-line:rgba(255,255,255,.018);
  --inp-bg:#0d1119; --inp-bg-focus:#0b0f18;
  --chip-bg:rgba(255,255,255,.03); --tag-bg:rgba(255,255,255,.05);
  --btn-hover:rgba(255,255,255,.07); --nav-hover:rgba(255,255,255,.05);
  --nav-bg1:#10141d; --nav-bg2:#0d1118;
  --panel-glass:rgba(23,28,40,.86);
  --sb-thumb:#2a3346; --sb-thumb-hover:#39445c;
  --dot-off:#1c2230;
  --toast-bg:#1a2130; --toast-line:#2a3346;
  --card-shadow:0 24px 70px rgba(0,0,0,.55);
  color-scheme:dark;
}
:root[data-theme="light"]{
  --bg:#f3f5f9; --panel:#ffffff; --panel-2:#ffffff; --ink:#1a2233; --muted:#5b6b82; --muted-2:#8b98ab;
  --line:#dfe4ee; --line-soft:#e8ecf4; --hover-line:#c3cddd; --line-strong:#c9d2e2;
  --brand:#0891b2; --brand-dim:rgba(8,145,178,.09); --brand-glow:0 0 14px rgba(8,145,178,.16); --brand-border:rgba(8,145,178,.45);
  --brand-grad-a:#0e7490; --brand-grad-b:#0891b2; --btn-primary-ink:#ffffff; --info:#2563eb;
  --amber:#b45309; --ok:#059669; --warn:#b45309; --err:#dc2626;
  --glow-color:rgba(8,145,178,.06);
  --grid-line:rgba(20,50,90,.04);
  --inp-bg:#f8fafd; --inp-bg-focus:#ffffff;
  --chip-bg:rgba(20,50,90,.045); --tag-bg:rgba(20,50,90,.05);
  --btn-hover:rgba(20,50,90,.07); --nav-hover:rgba(20,50,90,.06);
  --nav-bg1:#ffffff; --nav-bg2:#f7f9fc;
  --panel-glass:rgba(255,255,255,.85);
  --sb-thumb:#c3cddd; --sb-thumb-hover:#a9b6c9;
  --dot-off:#dfe4ee;
  --toast-bg:#ffffff; --toast-line:#dfe4ee;
  --card-shadow:0 18px 50px rgba(30,50,90,.14);
  color-scheme:light;
}
*{box-sizing:border-box; margin:0; padding:0}
html,body{height:100%}
body{
  font-family:"Segoe UI","Microsoft YaHei",system-ui,-apple-system,sans-serif;
  background:var(--bg); color:var(--ink); font-size:14.5px; line-height:1.65;
  background-image:
    radial-gradient(1100px 420px at 18% -6%, var(--glow-color), transparent 62%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size:auto, 40px 40px, 40px 40px;
  background-attachment:fixed;
}
button{font-family:inherit; cursor:pointer}
input,select,textarea{font-family:inherit; font-size:14px; color-scheme:inherit}
a{color:var(--brand)}
:focus-visible{outline:2px solid var(--brand); outline-offset:2px}
.mono{font-family:var(--mono); font-size:12px; letter-spacing:.01em}
::selection{background:var(--brand-dim)}
/* ===== 滚动条：标准属性优先，webkit 伪元素仅在无 scrollbar-color 支持时生效 ===== */
:root{scrollbar-color:var(--sb-thumb) transparent; scrollbar-width:thin}
@supports not (scrollbar-color: auto){
  ::-webkit-scrollbar{width:9px;height:9px}
  ::-webkit-scrollbar-thumb{background:var(--sb-thumb);border-radius:9px}
  ::-webkit-scrollbar-thumb:hover{background:var(--sb-thumb-hover)}
  ::-webkit-scrollbar-track{background:transparent}
}

/* ===== 页面切换（进场动画） ===== */
.proto-page{display:none; min-height:100vh}
.proto-page.active{display:block; animation:pgIn .22s ease}
@keyframes pgIn{from{opacity:0; transform:translateY(8px)}}
body.with-nav .proto-page{padding-left:var(--nav-w)}

/* ===== 左侧竖栏 ===== */
.p-nav{
  position:fixed; top:0; left:0; bottom:0; width:var(--nav-w); z-index:40;
  display:flex; flex-direction:column; gap:2px; padding:16px 12px 14px;
  background:linear-gradient(180deg,var(--nav-bg1) 0%, var(--nav-bg2) 100%);
  border-right:1px solid var(--line-soft);
}
.p-nav .p-logo{display:flex; align-items:center; gap:10px; padding:4px 8px 18px; font-weight:700; font-size:16px; letter-spacing:.02em}
.p-nav .p-logo .mark{width:30px; height:30px; border-radius:9px; background:linear-gradient(135deg,#22d3ee,#2563eb); display:flex; align-items:center; justify-content:center; box-shadow:var(--brand-glow); flex:0 0 auto}
.p-nav .p-logo .mark svg{width:17px; height:17px}
.p-logo-txt{display:flex; flex-direction:column; line-height:1.25}
.p-logo-txt small{font-family:var(--mono); font-size:9.5px; font-weight:500; color:var(--muted-2); letter-spacing:.18em}
.nav-group{display:flex; flex-direction:column; gap:4px}
.p-nav .nav-item{
  display:flex; align-items:center; gap:11px; padding:9px 13px; border-radius:9px;
  font-size:13.5px; color:var(--muted); background:none; border:none; position:relative;
  transition:background .15s, color .15s;
}
.p-nav .nav-item svg{width:16px; height:16px; flex:0 0 auto; opacity:.8}
.p-nav .nav-item:hover{background:var(--nav-hover); color:var(--ink)}
.p-nav .nav-item.on{background:var(--brand-dim); color:var(--brand); font-weight:600}
.p-nav .nav-item.on::before{
  content:""; position:absolute; left:-12px; top:8px; bottom:8px; width:2px;
  background:var(--brand); border-radius:2px; box-shadow:0 0 8px rgba(34,211,238,.6);
}
.p-nav .spacer{flex:1}
/* 用户胶囊：头像图标 + 用户名/角色两行 + 修改密码/退出登录图标按钮 */
.p-nav .p-user{display:flex; align-items:center; gap:8px; margin:10px 8px; padding:7px 8px 7px 10px; border:1px solid var(--line); border-radius:12px; background:var(--panel-2); font-size:13px}
.p-nav .avatar{width:30px; height:30px; border-radius:9px; background:var(--ink); color:var(--bg); display:flex; align-items:center; justify-content:center; flex:0 0 auto}
.p-nav .avatar svg{width:16px; height:16px}
.p-user-info{display:flex; flex-direction:column; min-width:0; flex:1 1 auto; line-height:1.3}
.p-user-info b{font-size:13px; font-weight:600; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.p-user-info i{font-style:normal; font-size:11px; color:var(--muted)}
.pu-btn{width:28px; height:28px; border:none; background:transparent; border-radius:8px; display:flex; align-items:center; justify-content:center; color:var(--muted); cursor:pointer; flex:0 0 auto; transition:background .15s, color .15s; padding:0}
.pu-btn:hover{background:var(--nav-hover, rgba(127,127,127,.15)); color:var(--ink)}
.pu-btn svg{width:15px; height:15px}

/* ===== 主题切换按钮（深色显示太阳=切浅色，浅色显示月亮=切深色） ===== */
.theme-toggle{
  display:flex; align-items:center; gap:11px; padding:9px 13px; margin-bottom:4px;
  border-radius:9px; font-size:13.5px; color:var(--muted);
  background:none; border:1px solid var(--line-soft); cursor:pointer;
  transition:background .15s, color .15s, border-color .15s;
}
.theme-toggle svg{width:16px; height:16px; flex:0 0 auto}
.theme-toggle:hover{background:var(--nav-hover); color:var(--ink); border-color:var(--hover-line)}
[data-theme="dark"] .theme-toggle .ic-moon,
[data-theme="dark"] .theme-toggle .tt-moon{display:none}
[data-theme="light"] .theme-toggle .ic-sun,
[data-theme="light"] .theme-toggle .tt-sun{display:none}

/* ===== Login ===== */
.pg-login{display:flex; align-items:center; justify-content:center; min-height:100vh; padding:40px 20px}
.login-card{
  width:410px; background:var(--panel-glass); backdrop-filter:blur(10px);
  border:1px solid var(--line); border-radius:16px; padding:36px 34px;
  box-shadow:var(--card-shadow), 0 0 0 1px rgba(255,255,255,.02) inset;
  animation:pgIn .3s ease;
}
.login-card .lc-logo{display:flex; align-items:center; gap:11px; margin-bottom:6px}
.login-card .lc-logo .mark{width:42px; height:42px; border-radius:12px; background:linear-gradient(135deg,#22d3ee,#2563eb); display:flex; align-items:center; justify-content:center; box-shadow:var(--brand-glow)}
.login-card .lc-logo .mark svg{width:23px; height:23px}
.login-card h1{font-size:20px; letter-spacing:.02em}
.lc-tag{font-family:var(--mono); font-size:9.5px; color:var(--muted-2); letter-spacing:.18em; margin-top:2px}
.login-card .lc-sub{color:var(--muted); font-size:13px; margin-bottom:22px}
.field{margin-bottom:14px}
.field label{display:block; font-size:12.5px; color:var(--muted); margin-bottom:6px; font-weight:600; letter-spacing:.03em}
/* .inp 基础样式全局生效（背景/边框/内边距），不再依赖 .field 容器——
   否则裸放的输入框（开放 API 接口测试、授权遮罩等）会落回浏览器默认浅灰底 */
.inp{background:var(--inp-bg); color:var(--ink); border:1px solid var(--line); border-radius:9px; padding:9px 12px}
.field .inp{width:100%; transition:border-color .15s, box-shadow .15s}
.field .inp:focus{border-color:var(--brand); background:var(--inp-bg-focus); box-shadow:0 0 0 3px var(--brand-dim); outline:none}
.inp::placeholder{color:var(--muted-2)}
textarea.inp{resize:vertical; line-height:1.5}
select.inp option{background:var(--panel)}
.btn{border:1px solid var(--line); border-radius:9px; padding:9px 16px; font-size:14px; font-weight:600; background:var(--chip-bg); color:var(--ink); transition:filter .15s, background .15s, border-color .15s}
.btn:hover{filter:brightness(1.05); background:var(--btn-hover)}
.btn-primary{background:linear-gradient(135deg,var(--brand-grad-a),var(--brand-grad-b)); border-color:transparent; color:var(--btn-primary-ink); box-shadow:var(--brand-glow)}
.btn-primary:hover{background:linear-gradient(135deg,var(--brand-grad-a),var(--brand-grad-b)); filter:none; box-shadow:0 0 24px var(--brand-border)}
.btn-ghost{background:transparent; border:1px solid var(--line); color:var(--muted)}
.btn-ghost:hover{color:var(--ink); border-color:var(--hover-line)}
.btn-danger{background:rgba(248,113,113,.12); border-color:rgba(248,113,113,.35); color:var(--err)}
.btn-danger:hover{filter:none; background:rgba(248,113,113,.2); border-color:rgba(248,113,113,.5)}
.btn-sm{padding:5px 11px; font-size:12px; border-radius:7px}
.btn:disabled{opacity:.45; cursor:not-allowed}
.lc-err{display:none; background:rgba(248,113,113,.1); color:var(--err); border:1px solid rgba(248,113,113,.3); border-radius:8px; padding:8px 12px; font-size:13px; margin-bottom:12px}
.lc-demo{margin-top:16px; text-align:center; font-size:12px; color:var(--muted-2)}

/* ===== Content pages common ===== */
.pg{padding:26px 30px 46px; max-width:1240px; margin:0 auto}
.pg-head{display:flex; align-items:center; gap:14px; margin-bottom:18px}
.pg-with-act{flex-wrap:wrap}
.pg-with-act .btn{margin-left:auto}
.pg-no{font-family:var(--mono); font-size:13px; color:var(--brand); border:1px solid rgba(34,211,238,.35); border-radius:7px; padding:2px 9px; background:var(--brand-dim)}
.pg-head-txt h2{font-size:19px; letter-spacing:.02em}
.pg-head .desc{color:var(--muted); font-size:13px; margin-top:3px}
.pg-title{display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:6px; gap:14px}
.pg-title h2{font-size:19px}
.pg-title .desc{color:var(--muted); font-size:13px; margin-top:4px}
.card{
  background:linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,0) 46px), var(--panel-2);
  border:1px solid var(--line); border-radius:12px; padding:16px;
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset;
}
.callout{border:1px solid var(--line); background:var(--panel); font-size:12.5px; color:var(--muted); border-radius:0 9px 9px 0; padding:10px 14px; border-left:3px solid var(--brand)}

/* ===== Search page ===== */
.search-hero{margin:10px 0 0}
.search-bar{display:flex; gap:10px; position:relative}
.search-bar .sb-icon{position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--muted-2); width:17px; height:17px; pointer-events:none}
.search-bar .sb-icon svg{width:17px; height:17px}
.search-bar .inp{
  flex:1; border:1px solid var(--line); border-radius:11px; padding:13px 14px 13px 42px;
  font-size:14.5px; background:var(--inp-bg); color:var(--ink); transition:border-color .15s, box-shadow .15s;
}
.search-bar .inp:focus{border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-dim), var(--brand-glow); outline:none}
.search-bar .inp::placeholder{color:var(--muted-2)}
.chips{display:flex; gap:8px; justify-content:center; margin:14px 0 4px; flex-wrap:wrap}
.chip{border:1px solid var(--line); background:var(--chip-bg); color:var(--muted); border-radius:99px; padding:4px 14px; font-size:12.5px; transition:all .15s}
.chip:hover{border-color:var(--hover-line); color:var(--ink)}
.chip.on{background:var(--brand-dim); border-color:var(--brand-border); color:var(--brand); font-weight:600}
/* 搜索结果类型开关：品牌色圆点+描边=启用；灰暗空心=停用（品牌色经 --tc 注入） */
.type-switch{
  display:inline-flex; align-items:center; gap:7px; border-radius:99px; padding:5px 14px;
  font-size:12.5px; cursor:pointer; user-select:none;
  border:1px solid var(--line); background:var(--chip-bg); color:var(--muted-2);
  transition:border-color .15s, color .15s;
}
.type-switch i{
  width:8px; height:8px; border-radius:99px; flex:0 0 auto;
  background:transparent; border:1.5px solid var(--muted-2);
  transition:all .15s;
}
.type-switch:hover{border-color:var(--hover-line); color:var(--muted)}
.type-switch.on{border-color:var(--tc); color:var(--tc); font-weight:600}
.type-switch.on i{background:var(--tc); border-color:var(--tc); box-shadow:0 0 6px 0 var(--tc)}
.result-meta{display:flex; align-items:center; justify-content:space-between; margin:16px 0 10px; font-size:13px; color:var(--muted)}
.res-list{display:flex; flex-direction:column; gap:10px}
.res-card{
  position:relative; overflow:hidden;
  background:linear-gradient(180deg, rgba(255,255,255,.02), transparent 40px), var(--panel-2);
  border:1px solid var(--line); border-radius:12px; padding:12px 16px 11px 22px;
  transition:border-color .15s, transform .15s, box-shadow .2s;
  animation:cardIn .3s ease backwards;
}
.res-list .res-card:nth-child(1){animation-delay:.02s}
.res-list .res-card:nth-child(2){animation-delay:.06s}
.res-list .res-card:nth-child(3){animation-delay:.1s}
.res-list .res-card:nth-child(4){animation-delay:.14s}
.res-list .res-card:nth-child(n+5){animation-delay:.18s}
@keyframes cardIn{from{opacity:0; transform:translateY(6px)}}
/* 左侧网盘品牌色轨：默认上下留白成段，hover 时生长为通栏 */
.res-card::before{
  content:""; position:absolute; left:0; top:16px; bottom:16px; width:3px;
  border-radius:0 99px 99px 0; background:var(--rc,#64748b);
  transition:top .22s ease, bottom .22s ease;
}
.res-card:hover{
  border-color:var(--brand-border); transform:translateY(-1px);
  box-shadow:0 4px 16px rgba(0,0,0,.2);
}
.res-card:hover::before{top:0; bottom:0}
/* 头部：徽标 + 标题 + 已转存 + 日期 */
.tag{background:var(--tag-bg); border:1px solid var(--line-soft); border-radius:5px; padding:1px 7px}
.rc-head{display:flex; align-items:center; gap:10px; min-width:0}
.rc-badge{
  flex:0 0 auto; display:inline-flex; align-items:center; gap:7px;
  font-size:12px; font-weight:600; letter-spacing:.04em; font-family:var(--mono);
  color:var(--rc,#64748b);
}
.rc-badge i{
  width:7px; height:7px; border-radius:99px; background:var(--rc,#64748b);
  box-shadow:0 0 7px 0 var(--rc);
}
.rc-title{flex:1; min-width:0; font-weight:600; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rc-date{flex:0 0 auto; font-size:11.5px; color:var(--muted-2)}
/* 链接代码条：URL + 提取码 + 复制 */
.rc-link{
  display:flex; align-items:center; gap:8px; margin:9px 0 10px;
  background:var(--bg); border:1px solid var(--line-soft); border-radius:8px; padding:4px 5px 4px 10px;
}
.rc-url{flex:1; min-width:0; font-family:var(--mono); font-size:11.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rc-pwd{
  flex:0 0 auto; font-family:var(--mono); font-size:11px; font-weight:600; color:var(--amber);
  background:rgba(251,191,36,.1); border:1px solid rgba(180,83,9,.3); border-radius:5px; padding:1px 7px;
}
.rc-copy{
  flex:0 0 auto; border:1px solid transparent; background:transparent; color:var(--muted);
  border-radius:6px; padding:3px 9px; font-size:11.5px; cursor:pointer; transition:all .15s;
}
.rc-copy:hover{background:var(--brand-dim); border-color:var(--brand-border); color:var(--brand)}
/* 底部：来源 + 操作按钮 */
.rc-foot{display:flex; align-items:center; gap:10px; min-width:0}
.rc-foot .tag{flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rc-actions{display:flex; flex:0 0 auto; gap:6px; margin-left:auto}
.saved-badge{font-size:11px; color:var(--ok); background:rgba(52,211,153,.1); border:1px solid rgba(52,211,153,.3); border-radius:5px; padding:1px 8px}
/* 链接测活徽章与工具栏 */
.lc-badge{font-size:11px; color:var(--muted-2); background:rgba(148,163,184,.12); border:1px solid transparent; border-radius:5px; padding:1px 8px; flex:none}
.lc-badge.ok{color:var(--ok); background:rgba(52,211,153,.1); border-color:rgba(52,211,153,.3)}
.lc-badge.bad{color:var(--err); background:rgba(248,113,113,.1); border-color:rgba(248,113,113,.3)}
.lc-badge.locked{color:var(--amber); background:rgba(251,191,36,.1); border-color:rgba(251,191,36,.3)}
.lc-badge.checking{color:var(--muted-2); background:rgba(148,163,184,.1)}
.lc-tools{display:flex; align-items:center; gap:12px}
.lc-summary{font-size:12.5px; color:var(--muted-2)}
.lc-toggle{display:flex; align-items:center; gap:5px; font-size:12.5px; color:var(--muted); cursor:pointer; user-select:none}
.task-strip{
  display:none; margin:14px 0 12px;
  background:var(--panel-2); border:1px solid var(--brand-border); border-radius:10px;
  padding:10px 14px; font-size:13px;
}
.task-strip .bar{height:7px; background:var(--inp-bg); border-radius:99px; margin-top:7px; overflow:hidden; position:relative}
.task-strip .bar i{
  display:block; height:100%; width:0; background:linear-gradient(90deg,var(--brand),#2563eb); border-radius:99px;
  transition:width .3s; position:relative;
}
.task-strip .bar i::after{
  content:""; position:absolute; inset:0;
  background-image:linear-gradient(45deg, rgba(255,255,255,.22) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.22) 75%, transparent 75%);
  background-size:14px 14px; animation:barFlow .7s linear infinite;
}
@keyframes barFlow{to{background-position:14px 0}}
.empty-guide{max-width:640px; margin:56px auto; text-align:center; color:var(--muted)}
.empty-guide .eg-icon{font-size:42px; margin-bottom:12px; filter:grayscale(.2); opacity:.85}
.kw-samples{display:flex; gap:8px; justify-content:center; margin-top:14px; flex-wrap:wrap}
.kw-samples .chip{cursor:pointer}
.search-error{margin:0 0 10px; border-radius:10px; padding:10px 14px; font-size:13px; background:rgba(248,113,113,.08); border:1px solid rgba(248,113,113,.3); color:var(--err); display:flex; align-items:center; justify-content:space-between; gap:10px}

/* ===== Mounts page ===== */
.drive-tiles{display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:16px}
.drive-tile{
  border:1px solid var(--line); border-radius:12px; padding:13px 14px;
  background:linear-gradient(180deg, rgba(255,255,255,.02), transparent 40px), var(--panel-2);
  position:relative; transition:border-color .15s;
}
.drive-tile:hover{border-color:var(--hover-line)}
.drive-tile .dt-top{display:flex; align-items:center; gap:10px; margin-bottom:6px}
.drive-mark{width:32px; height:32px; border-radius:9px; color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center; font-size:14px; flex:0 0 auto; font-family:var(--mono)}
.drive-tile .dt-name{font-weight:700; font-size:14px}
.drive-tile .dt-auth{font-size:11.5px; color:var(--muted); margin-bottom:8px}
.drive-tile .dt-count{font-size:12px; color:var(--muted); font-family:var(--mono)}
.dt-count .ok{color:var(--ok); font-weight:600}
.dt-count .muted{color:var(--muted-2)}
.acc-list{display:flex; flex-direction:column; gap:12px}
.acc-card{
  display:flex; gap:16px; padding:15px 18px; border-radius:12px;
  background:linear-gradient(180deg, rgba(255,255,255,.02), transparent 46px), var(--panel-2);
  border:1px solid var(--line); transition:border-color .15s;
}
.acc-card:hover{border-color:var(--hover-line)}
.acc-card.disabled{opacity:.5}
.acc-main{flex:1; min-width:0}
.acc-banner{background:rgba(248,113,113,.08); border:1px solid rgba(248,113,113,.3); color:var(--err); border-radius:8px; padding:6px 10px; font-size:12.5px; margin-bottom:10px; display:flex; align-items:center; justify-content:space-between; gap:10px}
.acc-name{display:flex; align-items:center; gap:8px; font-weight:700; font-size:14.5px; flex-wrap:wrap}
.acc-id{font-family:var(--mono); font-size:11px; color:var(--muted-2)}
.st-dot{width:8px; height:8px; border-radius:50%; display:inline-block; flex:0 0 auto}
.st-dot.ok{background:var(--ok); box-shadow:0 0 7px rgba(52,211,153,.7); animation:pulse 2.4s ease infinite}
.st-dot.warn{background:var(--warn); box-shadow:0 0 7px rgba(251,191,36,.6)}
.st-dot.err{background:var(--err); box-shadow:0 0 7px rgba(248,113,113,.6); animation:pulse 1.1s ease infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.55}}
.quota{display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); margin:6px 0 9px}
.quota .qbar{flex:0 0 180px; height:6px; background:var(--inp-bg); border-radius:99px; overflow:hidden; border:1px solid var(--line-soft)}
.quota .qbar i{display:block; height:100%; background:linear-gradient(90deg,var(--brand),#2563eb); box-shadow:0 0 8px rgba(34,211,238,.4)}
.acc-rules{display:flex; flex-wrap:wrap; gap:6px; font-size:12px}
.acc-rules .tag{background:var(--chip-bg)}
.acc-ops{flex:0 0 auto; display:flex; flex-direction:column; gap:7px; justify-content:center}
.acc-ops .row{display:flex; gap:7px; justify-content:flex-end}

/* ===== Drawer (file browser) ===== */
.drawer-mask{display:none; position:fixed; inset:0; background:rgba(2,6,16,.6); backdrop-filter:blur(2px); z-index:50}
.drawer{
  display:none; position:fixed; top:0; right:0; bottom:0; width:440px; max-width:92vw;
  background:var(--panel); z-index:51; box-shadow:var(--card-shadow);
  border-left:1px solid var(--line); border-radius:14px 0 0 14px; flex-direction:column;
}
.drawer.open,.drawer-mask.open{display:flex}
.drawer .dw-head{display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--line)}
.drawer .dw-head b{font-size:15px}
.crumb{display:flex; gap:4px; font-size:12.5px; color:var(--muted); padding:10px 16px; border-bottom:1px solid var(--line); flex-wrap:wrap}
.crumb .c{cursor:pointer; color:var(--brand)}
.file-toolbar{display:flex; align-items:center; gap:8px; padding:10px 16px; border-bottom:1px solid var(--line); font-size:12.5px; color:var(--muted)}
.file-list{flex:1; overflow:auto}
.file-row{display:flex; align-items:center; gap:10px; padding:9px 16px; border-bottom:1px solid var(--line-soft); font-size:13.5px; transition:background .12s}
.file-row:hover{background:rgba(34,211,238,.05)}
.file-row .f-ic{width:26px; height:26px; border-radius:7px; display:flex; align-items:center; justify-content:center; font-size:12px; color:#fff; flex:0 0 26px}
.file-row .f-name{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.file-row .f-name.dir{cursor:pointer; color:var(--brand); font-weight:600}
.file-row .f-size{color:var(--muted); font-size:12px; flex:0 0 auto; white-space:nowrap; font-family:var(--mono)}
.dw-foot{display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-top:1px solid var(--line); background:var(--chip-bg)}
.dw-foot .sel-count{font-size:13px; color:var(--muted)}

/* ===== Modal（原生 <dialog>，showModal 提供焦点圈定 / Esc / 顶层渲染） ===== */
dialog.modal{
  position:fixed; /* 与 UA 对 :modal 的默认一致；显式声明以充当右上角关闭按钮的定位上下文 */
  width:480px; max-width:92%; max-height:min(88%, 88vh); overflow:auto;
  margin:auto; padding:20px 22px;
  background:var(--panel-2); border:1px solid var(--line-strong); border-radius:14px;
  box-shadow:0 30px 80px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.03) inset;
  animation:pgIn .2s ease;
}
dialog.modal::backdrop{background:rgba(2,6,16,.66); backdrop-filter:blur(3px)}
.modal h3{font-size:16px; margin-bottom:4px}
/* 弹窗右上角关闭按钮（openModal 统一注入） */
.m-close{
  position:absolute; top:14px; right:14px; width:28px; height:28px;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid transparent; background:transparent; border-radius:7px;
  color:var(--muted-2); cursor:pointer; transition:all .15s;
}
.m-close:hover{background:var(--chip-bg); border-color:var(--line-soft); color:var(--ink)}
.m-close svg{width:14px; height:14px}
.modal .m-sub{font-size:12.5px; color:var(--muted); margin-bottom:14px; word-break:break-all}
.m-actions{display:flex; justify-content:flex-end; gap:9px; margin-top:18px}
.radio-cards{display:grid; grid-template-columns:1fr 1fr; gap:9px}
.radio-card{border:1.5px solid var(--line); border-radius:10px; padding:10px 12px; cursor:pointer; display:flex; gap:9px; align-items:center; transition:border-color .15s, background .15s}
.radio-card:hover{border-color:var(--hover-line)}
.radio-card.on{border-color:var(--brand); background:var(--brand-dim)}
.radio-card .rc-name{font-weight:600; font-size:13.5px}
.radio-card .rc-auth{font-size:11.5px; color:var(--muted)}
.steps{display:flex; gap:6px; margin-bottom:14px; font-size:12px}
.steps .st{flex:1; text-align:center; padding:5px 0; border-radius:99px; background:var(--chip-bg); color:var(--muted-2); border:1px solid var(--line-soft)}
.steps .st.on{background:var(--brand-dim); color:var(--brand); border-color:rgba(34,211,238,.4); font-weight:700}
.steps .st.done{background:rgba(52,211,153,.1); color:var(--ok); border-color:rgba(52,211,153,.35)}
.verify-ok{background:rgba(52,211,153,.07); border:1px solid rgba(52,211,153,.3); border-radius:9px; padding:9px 12px; font-size:13px; color:var(--ok); margin-bottom:10px}
.verify-ok .qbar{height:6px; background:var(--inp-bg); border-radius:99px; overflow:hidden; margin-top:6px}
.verify-ok .qbar i{display:block; height:100%; background:var(--ok)}
.check-row{display:flex; align-items:flex-start; gap:8px; font-size:13.5px; margin:7px 0}
.check-row input{margin-top:3px; accent-color:var(--brand)}
.check-row .sub{color:var(--muted); font-size:12px}
.type-checks{display:flex; flex-wrap:wrap; gap:6px}
.type-checks .chip{cursor:pointer}
.type-checks .chip.on{background:rgba(52,211,153,.1); border-color:rgba(52,211,153,.45); color:var(--ok)}

/* ===== Settings: 搜索源 / 清理 / 缓存 ===== */
.src-status{display:flex; align-items:center; gap:8px; font-size:13px}
.test-card{display:none; margin-top:12px; border-radius:10px; padding:12px 14px; font-size:13px; border:1px solid}
.test-card.ok{display:block; background:rgba(52,211,153,.07); border-color:rgba(52,211,153,.3); color:var(--ok)}
.test-card.err{display:block; background:rgba(248,113,113,.07); border-color:rgba(248,113,113,.3); color:var(--err)}
.test-card .t-types{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px}
.test-card .t-types span{background:rgba(52,211,153,.1); border:1px solid rgba(52,211,153,.25); border-radius:5px; padding:1px 8px; font-size:12px; font-family:var(--mono)}

/* ===== Open API ===== */
.src-layout{display:grid; grid-template-columns:1.2fr .8fr; gap:16px}
.term-head{display:flex; align-items:center; gap:6px; background:#0d1119; border:1px solid var(--line-soft); border-bottom:none; border-radius:9px 9px 0 0; padding:7px 11px}
.term-head i{width:9px; height:9px; border-radius:50%; background:#39445c}
.term-head i:nth-child(1){background:rgba(248,113,113,.55)}
.term-head i:nth-child(2){background:rgba(251,191,36,.55)}
.term-head i:nth-child(3){background:rgba(52,211,153,.55)}
.term-title{font-family:var(--mono); font-size:10.5px; color:var(--muted-2); margin-left:6px; letter-spacing:.06em}
.term-body{background:#0d1119; border:1px solid var(--line-soft); border-radius:0 0 9px 9px; padding:12px; margin-top:-1px}
/* 密钥列表行（终端窗口内，固定暗色） */
.ak-row{display:flex; align-items:center; gap:10px; padding:9px 2px; border-bottom:1px dashed rgba(148,163,184,.22)}
.ak-row:last-child{border-bottom:none}
.ak-main{min-width:0; flex:1}
.ak-name{font-size:12.5px; color:#e2e8f0; display:flex; align-items:center; gap:6px}
.ak-key{font-size:12px; color:#94a3b8; cursor:pointer; margin-top:3px; word-break:break-all}
.ak-key:hover{color:#cbd5e1}
.ak-ops{display:flex; align-items:center; gap:8px; flex:none}
.ak-mode{font-size:11px; padding:2px 9px; border-radius:999px; cursor:pointer; border:1px solid rgba(148,163,184,.45); color:#94a3b8; background:transparent; white-space:nowrap}
.ak-mode.on{color:#67e8f9; border-color:rgba(103,232,249,.55)}
.term-note{font-size:12px; color:var(--muted-2); margin:10px 0 0}
.usage-num{font-size:21px; font-weight:600}
.api-doc{font-size:12.5px; color:var(--muted)}
.api-doc b{color:var(--ink)}
.api-doc code{background:rgba(34,211,238,.09); border:1px solid rgba(34,211,238,.2); color:var(--brand); border-radius:5px; padding:1px 6px; font-family:var(--mono); font-size:11.5px}
.api-doc pre{
  background:#0d1119; border:1px solid var(--line-soft); color:#9fb0c8;
  border-radius:9px; padding:12px 14px; margin:9px 0; font-family:var(--mono);
  font-size:11.5px; overflow:auto; line-height:1.55;
}
table.rt{width:100%; border-collapse:collapse; font-size:13px; margin:10px 0}
table.rt th{background:var(--chip-bg); text-align:left; font-weight:700; color:var(--muted); font-size:12px}
table.rt th,table.rt td{border:1px solid var(--line); padding:7px 10px; vertical-align:top}
table.rt td.mono{color:var(--brand); white-space:nowrap}
#apiTestKw, #apiTestId{height:40px} /* 接口测试两个输入框统一高度（mono 字号小导致第二个偏矮） */
.term-out{background:var(--inp-bg); border:1px solid var(--line-soft); border-radius:9px; padding:12px 14px; font-family:var(--mono); font-size:12px; color:var(--muted); min-height:20px; word-break:break-all}
.term-out:empty{display:none}
.term-out b{color:var(--amber)}
.term-out a{color:var(--brand)}

/* ===== Records ===== */
.stat-cards{display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:6px}
.stat-card{
  background:linear-gradient(180deg, rgba(255,255,255,.02), transparent 44px), var(--panel-2);
  border:1px solid var(--line); border-radius:12px; padding:14px 18px; cursor:pointer;
  transition:border-color .15s, box-shadow .15s, transform .15s;
}
.stat-card:hover{border-color:var(--hover-line); transform:translateY(-1px)}
.stat-card.on{border-color:var(--brand-border); box-shadow:0 0 0 1px var(--brand-border) inset, var(--brand-glow); background:linear-gradient(180deg, var(--brand-dim), transparent 60px), var(--panel-2)}
.stat-card .sc-num{font-family:var(--mono); font-size:27px; font-weight:600; color:var(--brand); line-height:1.2}
.stat-card .sc-label{font-size:12.5px; color:var(--muted); margin-top:2px}
.seg{display:inline-flex; background:var(--chip-bg); border:1px solid var(--line); border-radius:9px; padding:3px; gap:3px}
.seg-btn{border:none; background:transparent; border-radius:7px; padding:5px 14px; font-size:12.5px; font-weight:600; color:var(--muted); cursor:pointer; transition:all .15s}
.seg-btn.on{background:var(--brand-dim); color:var(--brand)}
.stat-chart-empty{text-align:center; color:var(--muted-2); padding:36px 0; font-size:13px}
.rec-filters{display:flex; gap:8px; margin:14px 0 10px; flex-wrap:wrap; align-items:center}
.rec-range{font-size:12.5px; color:var(--muted); margin-right:4px}
.rec-filters .chip{cursor:pointer}
.rec-table-wrap{background:var(--panel-2); border:1px solid var(--line); border-radius:12px; overflow:auto}
table.rec{width:100%; border-collapse:collapse; font-size:13px; min-width:760px}
table.rec th{background:var(--chip-bg); text-align:left; padding:9px 12px; font-size:12px; color:var(--muted); white-space:nowrap; letter-spacing:.04em; border-bottom:1px solid var(--line)}
table.rec td{border-top:1px solid var(--line-soft); padding:9px 12px; vertical-align:middle}
table.rec tr:hover td{background:var(--brand-dim)}
.st-pill{font-size:11px; border-radius:99px; padding:1px 9px; font-weight:600; white-space:nowrap; border:1px solid transparent}
.st-pill.ok{background:rgba(52,211,153,.1); color:var(--ok); border-color:rgba(52,211,153,.3)}
.st-pill.partial{background:rgba(251,191,36,.1); color:var(--amber); border-color:rgba(251,191,36,.3)}
.st-pill.failed{background:rgba(248,113,113,.1); color:var(--err); border-color:rgba(248,113,113,.3)}
.st-pill.run{background:rgba(96,165,250,.1); color:var(--info); border-color:rgba(96,165,250,.3)}
.share-chip{display:inline-flex; align-items:center; gap:4px; background:var(--brand-dim); color:var(--brand); border:1px solid rgba(34,211,238,.3); border-radius:6px; padding:2px 8px; font-size:12px; cursor:pointer}
.share-chip:hover{background:rgba(34,211,238,.22)}
.rec-note{font-weight:600; word-break:break-all}
.rec-sub{font-size:12px; color:var(--muted)}
/* 分页器 */
.rec-pager{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; flex-wrap:wrap}
.rec-pager:empty{display:none}
.rp-info{font-size:12.5px; color:var(--muted)}
.rp-btns{display:flex; gap:6px; align-items:center; flex-wrap:wrap}
.rp-btn{border:1px solid var(--line); background:var(--chip-bg); color:var(--muted); border-radius:7px; padding:4px 11px; font-size:12.5px; min-width:30px; text-align:center; transition:border-color .15s, color .15s}
.rp-btn:hover:not(:disabled){border-color:var(--hover-line); color:var(--ink)}
.rp-btn.on{background:var(--brand-dim); border-color:var(--brand-border); color:var(--brand); font-weight:600}
.rp-btn:disabled{opacity:.4; cursor:not-allowed}
.rp-dots{color:var(--muted-2); font-size:12px; padding:0 2px}
.fail-list{background:rgba(248,113,113,.07); border:1px solid rgba(248,113,113,.3); border-radius:8px; padding:8px 12px; font-size:12.5px; color:var(--err); margin-top:10px; max-height:180px; overflow:auto}
.fail-list li{margin:2px 0 2px 18px}

/* ===== Acquire flow (wait + QR) ===== */
.qr-tabs{display:flex; gap:8px; margin:4px 0 12px}
.qr-panel{text-align:center; padding:6px 0 4px}
.qr-wait{display:flex; align-items:center; justify-content:center; min-height:150px}
.qr-img{width:150px; height:150px; border:1px solid var(--line); border-radius:10px; background:#fff}
.acq-step{font-size:13.5px; color:var(--brand); margin-top:8px}
.acq-wait{text-align:center; padding:14px 4px 4px}
.spinner{width:52px; height:52px; margin:0 auto 16px; border-radius:50%; border:4px solid var(--dot-off); border-top-color:var(--brand); animation:spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.acq-step{font-size:14px; font-weight:600; color:var(--brand); min-height:22px}
.acq-steps{display:flex; justify-content:center; gap:6px; margin-top:14px}
.acq-dot{width:8px; height:8px; border-radius:50%; background:var(--dot-off); transition:background .3s, box-shadow .3s}
.acq-dot.on{background:var(--brand); box-shadow:0 0 7px rgba(34,211,238,.55)}
.qr-box{display:flex; gap:16px; align-items:center; justify-content:center; padding:6px 0; flex-wrap:wrap}
.qr-box canvas{border:1px solid var(--line); border-radius:10px; background:#fff}
.qr-meta{text-align:left; font-size:13px; max-width:240px}
.qr-meta .lnk{font-family:var(--mono); font-size:12px; word-break:break-all; color:var(--brand)}
.qr-title{text-align:center; font-weight:700; font-size:15px; margin-bottom:4px; word-break:break-all}
.qr-sub{text-align:center; color:var(--muted); font-size:12.5px; margin-bottom:12px}
.btn-acq{background:rgba(52,211,153,.12); border-color:rgba(52,211,153,.35); color:var(--ok)}
.btn-acq:hover{filter:none; background:rgba(52,211,153,.2)}

/* ===== 开关（Toggle Switch） ===== */
.switch{position:relative; display:inline-block; width:42px; height:23px; flex:0 0 auto; cursor:pointer}
.switch input{position:absolute; opacity:0; width:0; height:0}
.sw-slider{position:absolute; inset:0; background:var(--dot-off); border:1px solid var(--line); border-radius:99px; transition:background .18s, border-color .18s}
.sw-slider::before{content:""; position:absolute; left:2px; top:2px; width:17px; height:17px; border-radius:50%; background:var(--muted); transition:transform .18s, background .18s}
.switch input:checked + .sw-slider{background:var(--brand-dim); border-color:var(--brand-border)}
.switch input:checked + .sw-slider::before{transform:translateX(19px); background:var(--brand); box-shadow:0 0 6px rgba(34,211,238,.45)}
.switch input:focus-visible + .sw-slider{outline:2px solid var(--brand); outline-offset:2px}

/* ===== Toast ===== */
.toast-wrap{position:fixed; top:18px; right:18px; z-index:99; display:flex; flex-direction:column; gap:8px}
.toast{
  background:var(--toast-bg); color:var(--ink); border:1px solid var(--toast-line); border-left:3px solid var(--brand);
  border-radius:10px; padding:10px 16px; font-size:13.5px;
  box-shadow:var(--card-shadow); animation:tin .25s ease; max-width:380px; word-break:break-all;
}
.toast.ok{border-left-color:var(--ok)}
.toast.warn{border-left-color:var(--warn)}
.toast.err{border-left-color:var(--err)}
@keyframes tin{from{transform:translateX(20px); opacity:0}}

/* ===== 搜索流式提示条 ===== */
.stream-strip{display:flex; align-items:center; gap:8px; background:var(--panel-2); border:1px solid var(--line); border-radius:10px; padding:9px 14px; margin-bottom:10px; font-size:13px; color:var(--muted)}
.stream-strip b{color:var(--brand)}

/* ===== 搜索源管理页 ===== */
.src-kpis{display:flex; gap:10px; margin-top:12px; margin-bottom:14px; flex-wrap:wrap}
.src-kpi{flex:1 1 160px; min-width:150px; background:var(--panel-2); border:1px solid var(--line); border-radius:12px; padding:12px 16px; display:flex; align-items:center; gap:12px}
.src-kpi b{font-size:20px; color:var(--brand); white-space:nowrap}
.src-kpi>div{font-size:12.5px; color:var(--muted)}
.src-kpi-sub{display:block; font-size:11.5px; color:var(--muted-2); margin-top:2px}
.src-topbar{display:flex; align-items:center; gap:12px; margin-top:14px; flex-wrap:wrap}
.src-tools{display:flex; gap:8px; align-items:center; margin-left:auto; flex-wrap:wrap}
.src-ops{display:flex; gap:3px; flex-wrap:nowrap}
.src-ops .btn{padding:3px 8px; white-space:nowrap}
/* 测试按钮加载动画：点击后文字隐去、显示旋转圆环，完成后恢复 */
.btn.loading{color:transparent!important; pointer-events:none; position:relative}
.btn.loading::after{content:""; position:absolute; left:50%; top:50%; width:11px; height:11px; margin:-6px 0 0 -6px; border:2px solid var(--muted-2); border-top-color:var(--brand); border-radius:50%; animation:btnSpin .7s linear infinite}
@keyframes btnSpin{to{transform:rotate(360deg)}}
.src-url{max-width:340px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.src-empty{text-align:center; color:var(--muted); padding:22px 0!important}
/* 调度参数弹窗：每组一个面板（对齐参考项目排版） */
.src-panel{background:var(--chip-bg); border:1px solid var(--line); border-radius:12px; padding:14px 16px 16px; margin-top:12px}
.src-panel-head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px}
.src-panel-title{display:flex; align-items:center; gap:8px; font-weight:600; font-size:13.5px; color:var(--ink)}
.src-panel-ic{width:16px; height:16px; color:var(--brand); flex:0 0 auto}
.src-grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.src-note{font-size:12px; color:var(--muted-2); line-height:1.6; margin:0}
.lab-hint{font-weight:400; color:var(--muted-2)}
dialog.modal.modal-wide{width:720px}

/* ===== 搜索记录页 ===== */
.sl-kpis{display:grid; grid-template-columns:repeat(auto-fit,minmax(215px,1fr)); gap:10px; margin-top:12px}
.sl-kpi{
  position:relative; background:linear-gradient(180deg, rgba(255,255,255,.02), transparent 44px), var(--panel-2);
  border:1px solid var(--line); border-radius:12px; padding:13px 16px 12px;
  transition:border-color .15s;
}
.sl-kpi:hover{border-color:var(--hover-line)}
.slk-label{font-size:12.5px; color:var(--muted)}
.slk-num{font-family:var(--mono); font-size:24px; font-weight:600; margin-top:5px; line-height:1.2}
.slk-sub{font-size:11.5px; color:var(--muted-2); margin-top:2px}
.slk-num.c-cyan{color:var(--brand)}
.slk-num.c-green{color:var(--ok)}
.slk-num.c-red{color:var(--err)}
.slk-num.c-amber{color:var(--amber)}
.slk-ic{
  position:absolute; top:12px; right:12px; width:30px; height:30px; border-radius:9px;
  display:inline-flex; align-items:center; justify-content:center;
}
.slk-ic svg{width:16px; height:16px}
.slk-ic.c-cyan{background:rgba(34,211,238,.12); color:var(--brand)}
.slk-ic.c-green{background:rgba(52,211,153,.12); color:var(--ok)}
.slk-ic.c-red{background:rgba(248,113,113,.12); color:var(--err)}
.slk-ic.c-amber{background:rgba(251,191,36,.12); color:var(--amber)}
/* 筛选工具栏 */
.sl-filterbar{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:14px 0 10px}
.sl-filterbar .inp{padding:6px 10px; font-size:12.5px}
.sl-filterbar .inp:focus{box-shadow:0 0 0 2px var(--brand-dim)}
.sl-q{width:210px}
.sl-sel{width:132px}
.sl-date{width:138px}
.sl-total{margin-left:auto; font-size:12.5px; color:var(--muted)}
/* 渠道徽标：开放 API 紫色（前台 Web 复用 st-pill run 青蓝色） */
.st-pill.api{background:rgba(139,92,246,.1); color:#a78bfa; border-color:rgba(139,92,246,.3)}
/* 快捷操作：文字链接风格 */
.sl-op{background:none; border:none; cursor:pointer; font-size:12.5px; font-weight:600; padding:2px 4px; color:var(--brand)}
.sl-op:hover{text-decoration:underline}
.sl-op.block{color:var(--err); margin-left:8px}
/* 慢查询耗时高亮 */
.sl-slow{color:var(--amber); font-weight:600}
.sl-kw{word-break:break-all}
/* 词库弹窗列表（敏感词/全局广告词管理） */
.words-add-row{display:flex; gap:8px; margin-bottom:12px}
.words-add-row .inp{flex:1}
.words-list{max-height:360px; overflow:auto; border:1px solid var(--line-soft); border-radius:9px; background:var(--panel-2)}
.words-row{display:flex; align-items:center; gap:10px; padding:7px 12px; border-bottom:1px solid var(--line-soft); font-size:13px}
.words-row:last-child{border-bottom:none}
.words-row:hover{background:var(--brand-dim)}
.word-tag{border-radius:5px; padding:2px 9px; font-size:12.5px; font-weight:600; word-break:break-all}
.word-tag.tag-red{background:rgba(248,113,113,.1); color:var(--err); border:1px solid rgba(248,113,113,.3)}
.word-tag.tag-amber{background:rgba(251,191,36,.1); color:var(--amber); border:1px solid rgba(251,191,36,.3)}
@media (max-width:960px){
  dialog.modal.modal-wide{width:100%}
}

/* ===== Responsive ===== */
@media (max-width:960px){
  body.with-nav .proto-page{padding-left:0; padding-top:52px}
  .p-nav{
    position:fixed; top:0; left:0; right:0; bottom:auto; width:auto; height:52px;
    flex-direction:row; align-items:center; gap:4px; padding:0 14px;
    border-right:none; border-bottom:1px solid var(--line-soft);
  }
  .p-nav .p-logo{padding:0 10px 0 0}
  .p-logo-txt small{display:none}
  .nav-group{flex-direction:row; flex:1; overflow-x:auto}
  .p-nav .nav-item{padding:6px 10px; white-space:nowrap}
  .p-nav .nav-item svg{display:none}
  .p-nav .nav-item.on::before{left:6px; right:auto; top:auto; bottom:2px; width:auto; height:2px}
  .p-nav .p-user{border-top:none; margin:10px 6px; padding:6px}
  .p-user-info{display:none}
  .pu-btn{width:30px; height:30px}
  .drive-tiles{grid-template-columns:repeat(2,1fr)}
  .src-layout{grid-template-columns:1fr}
  .acc-card{flex-direction:column}
  .acc-ops .row{justify-content:flex-start}
  .pg{padding:18px 16px 40px}
  /* 结果卡片：窄屏时底部行换行，按钮自动靠右 */
  .res-card{padding:12px 14px 11px 20px}
  .rc-foot{flex-wrap:wrap; row-gap:8px}
  .rc-foot .tag{flex:0 0 auto; max-width:100%}
}

/* ===== 无障碍：用户偏好减少动效时停用全部动画/过渡 ===== */
@media (prefers-reduced-motion: reduce){
  *{animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important}
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*){animation:none!important}
}

/* ---------- 授权激活遮罩 ---------- */
.lic-mask{position:fixed;inset:0;background:rgba(4,7,12,.82);backdrop-filter:blur(6px);z-index:900;display:flex;align-items:center;justify-content:center;padding:20px}
.lic-card{width:400px;max-width:94vw;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:30px 30px 22px;display:flex;flex-direction:column;gap:12px;text-align:center}
.lic-mark svg{width:44px;height:44px}
.lic-card h2{font-size:19px}
.lic-desc{color:var(--muted);font-size:13px}
.lic-state{display:inline-block;align-self:center;background:rgba(251,191,36,.12);color:#fbbf24;border:1px solid rgba(251,191,36,.3);border-radius:8px;padding:5px 14px;font-size:12.5px}
.lic-err{background:rgba(248,113,113,.12);color:var(--danger);border:1px solid rgba(248,113,113,.3);border-radius:8px;padding:8px 12px;font-size:12.5px;text-align:left}
.lic-form{display:flex;gap:8px}
.lic-form .inp{flex:1;font-family:"IBM Plex Mono",monospace;letter-spacing:.5px;text-transform:uppercase}
.lic-foot{margin-top:6px;font-size:12px;color:var(--muted);display:flex;flex-direction:column;gap:6px}
.lic-hint{opacity:.8}
.lic-mini{background:var(--panel2);border:1px solid var(--line);color:var(--muted);border-radius:6px;padding:2px 9px;font-size:11.5px;cursor:pointer;margin-left:6px}
.lic-mini:hover{color:var(--txt)}

/* ---------- 更新弹窗（居中） ---------- */
.upd-modal{position:fixed;inset:0;z-index:880;display:flex;align-items:center;justify-content:center;background:rgba(4,7,12,.55);backdrop-filter:blur(4px)}
.um-card{width:360px;max-width:92vw;background:var(--panel);border:1px solid rgba(34,211,238,.4);border-radius:16px;padding:30px 28px 24px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px;box-shadow:0 18px 60px rgba(0,0,0,.5)}
.um-icon{font-size:34px;line-height:1}
.um-card h3{font-size:17px}
.um-txt{color:var(--muted);font-size:12.5px;line-height:1.8;word-break:break-word}
.um-txt b{color:var(--txt)}
.ub-forced{color:#fbbf24}
.ub-actions{display:flex;gap:8px;align-items:center;white-space:nowrap;margin-top:6px}
.ub-btn{padding:5px 14px;font-size:12.5px}

/* ---------- 更新遮罩 ---------- */
.upd-overlay{position:fixed;inset:0;background:rgba(4,7,12,.86);backdrop-filter:blur(6px);z-index:950;display:flex;align-items:center;justify-content:center}
.uo-card{width:380px;max-width:92vw;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:34px 30px;text-align:center;display:flex;flex-direction:column;gap:10px;align-items:center}
.uo-card h3{font-size:17px}
.uo-sub{color:var(--muted);font-size:12.5px;min-height:19px}
.uo-tip{color:var(--muted);font-size:11.5px;opacity:.75;margin-top:8px}
.uo-spin{width:38px;height:38px;border-radius:50%;border:3px solid rgba(34,211,238,.18);border-top-color:var(--accent);animation:updspin .9s linear infinite;margin-bottom:6px}
@keyframes updspin{to{transform:rotate(360deg)}}
/* 下载进度圆环（周长 2π×31≈194.8，起点旋转到正上方） */
.uo-ring{margin-bottom:6px}
.uo-ring-track{fill:none;stroke:rgba(34,211,238,.15);stroke-width:5}
.uo-ring-bar{fill:none;stroke:var(--accent);stroke-width:5;stroke-linecap:round;stroke-dasharray:194.8;stroke-dashoffset:194.8;transform:rotate(-90deg);transform-origin:36px 36px;transition:stroke-dashoffset .35s ease}
.uo-ring-pct{fill:var(--accent);font-size:15px;font-weight:700;text-anchor:middle;dominant-baseline:central}
.uo-ring.indet .uo-ring-bar{stroke-dasharray:42 152.8;animation:updring 1.1s linear infinite}
.uo-ring.indet .uo-ring-pct{display:none}
@keyframes updring{from{transform:rotate(-90deg)}to{transform:rotate(270deg)}}

/* ---------- 更新结果横幅 ---------- */
.upd-result{position:fixed;top:52px;left:50%;transform:translateX(-50%);z-index:870;display:flex;align-items:flex-start;gap:14px;background:var(--panel);border:1px solid rgba(52,211,153,.4);border-radius:12px;padding:13px 16px;max-width:min(640px,92vw);box-shadow:0 10px 40px rgba(0,0,0,.45)}
.upd-result.fail{border-color:rgba(248,113,113,.45)}
.ur-main{flex:1;min-width:0}
.ur-main b{font-size:13.5px}
.ur-reason{color:var(--muted);font-size:12.5px;margin-top:3px}
.ur-detail{margin-top:8px;background:var(--panel2);border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:11.5px;word-break:break-all;color:var(--muted)}
.p-ver{color:var(--muted);font-size:11px;text-align:center;padding:4px 0;opacity:.7}
