:root {
  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-2: #fbfbfe;
  --text: #1f2433;
  --muted: #7b8194;
  --border: #e9ebf2;
  --border-strong: #dcdfe9;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-grad: linear-gradient(135deg, #6366f1, #8b5cf6);
  --accent-soft: #eef0ff;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --ok: #10b981;
  --ok-soft: #ecfdf5;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px rgba(16, 24, 40, .06);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 图标 ---------- */
.icon {
  width: 1em; height: 1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
/* 实心图标：用于 fill 设计的图标（如复制链接），颜色跟随文字色 */
.icon.fill { fill: currentColor; stroke: none; }
.logo-badge {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(99, 102, 241, .35);
}
.logo-badge .icon { width: 19px; height: 19px; stroke: #fff; }

/* ---------- 顶部导航 ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 28px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 18px; letter-spacing: .2px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.nav .links { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.nav .links a { padding: 8px 13px; border-radius: 9px; color: var(--text); }
.nav .links a:hover { background: var(--accent-soft); text-decoration: none; }
/* 头像 */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; overflow: hidden; flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-xs { width: 30px; height: 30px; font-size: 12px; }
.avatar-sm { width: 36px; height: 36px; font-size: 14px; }
.avatar-md { width: 44px; height: 44px; font-size: 16px; }

/* 未登录：图标按钮 */
.nav .links .icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--text); border: 1px solid var(--border-strong); background: var(--surface);
  transition: background .15s, color .15s, border-color .15s;
}
.nav .links .icon-btn .icon { width: 19px; height: 19px; }
.nav .links .icon-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* 头像下拉二级菜单 */
.user-menu { position: relative; }
.user-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 8px 4px 4px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text); font: inherit;
  transition: background .15s, border-color .15s;
}
.user-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.user-btn .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .18s; }
.user-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.at-name { font-size: 14px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 226px; z-index: 60;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); padding: 8px;
}
.menu[hidden] { display: none; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-id { min-width: 0; }
.menu-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-role { font-size: 12px; color: var(--muted); }
.menu-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border: none; background: none; cursor: pointer;
  border-radius: 10px; color: var(--text); font: inherit; font-size: 14px; text-align: left;
  transition: background .14s, color .14s;
}
.menu-item .icon { width: 18px; height: 18px; color: var(--muted); }
.menu-item:hover { background: var(--accent-soft); text-decoration: none; }
.menu-item:hover .icon { color: var(--accent); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .icon { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger-soft); }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* 轻提示 */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 12px);
  background: #1f2433; color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: #0f9d67; }
.toast.err { background: var(--danger); }

/* ---------- 容器 ---------- */
main { max-width: 920px; margin: 0 auto; padding: 34px 20px 72px; }
.wrap-wide { max-width: 1120px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 22px; }
.card h2 { margin: 0 0 4px; font-size: 17px; }
.card .sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

.section-title {
  font-size: 15px; font-weight: 700; margin: 0 0 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.empty { color: var(--muted); text-align: center; padding: 32px 0; font-size: 14px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- 首页 Hero + 特性 ---------- */
.hero {
  background: var(--accent-grad); color: #fff; border-radius: 18px;
  padding: 38px 34px; box-shadow: 0 18px 40px rgba(99, 102, 241, .28);
  position: relative; overflow: hidden; margin-bottom: 22px;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.hero::before {
  content: ""; position: absolute; right: 60px; bottom: -90px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
.hero h1 { margin: 0 0 10px; font-size: 30px; position: relative; z-index: 1; }
.hero p { margin: 0; opacity: .92; max-width: 560px; position: relative; z-index: 1; }
.hero .hero-actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .btn-ghost-light {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; background: rgba(255, 255, 255, .16);
  color: #fff; font-weight: 500; border: 1px solid rgba(255, 255, 255, .35);
}
.hero .btn-ghost-light:hover { background: rgba(255, 255, 255, .26); text-decoration: none; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .f-ico {
  width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.feature .f-ico .icon { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 4px; font-size: 15px; }
.feature p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- 上传拖拽区 ---------- */
.drop {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  padding: 44px 20px; text-align: center; cursor: pointer; color: var(--muted);
  transition: border-color .15s, background .15s; position: relative;
}
.drop:hover, .drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.drop .drop-ico {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.drop .drop-ico .icon { width: 28px; height: 28px; }
.drop .title { color: var(--text); font-size: 16px; font-weight: 600; }
.drop .hint { font-size: 13px; margin-top: 6px; }

/* ---------- 表单 ---------- */
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=number], input[type=url], select {
  width: 100%; padding: 11px 13px; font-size: 14px; font-family: var(--font);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .14);
}
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.row.switch-row { flex-wrap: wrap; gap: 24px; }
.row.switch-row > * { flex: 0 0 auto; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.check input { width: auto; }

/* ---------- 滑动开关（开启 / 关闭） ---------- */
.switch-field { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer; }
.switch-field .sw-label { white-space: nowrap; }
.switch { position: relative; display: inline-flex; flex: none; }
.switch input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer; z-index: 3;
}
.sw-track {
  position: relative; display: block; width: 58px; height: 28px;
  border-radius: 999px; background: #cbd0dd; transition: background .22s ease;
}
.sw-track::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .28);
  transition: transform .22s ease; z-index: 2;
}
.sw-on, .sw-off {
  position: absolute; top: 0; height: 100%; display: flex; align-items: center;
  font-size: 11px; font-weight: 600; letter-spacing: .5px; transition: opacity .2s ease;
}
.sw-on { left: 8px; opacity: 0; color: #fff; }
.sw-off { right: 8px; opacity: 1; color: #5b6076; }
.switch input:checked + .sw-track { background: var(--accent); }
.switch input:checked + .sw-track::before { transform: translateX(30px); }
.switch input:checked + .sw-track .sw-on { opacity: 1; }
.switch input:checked + .sw-track .sw-off { opacity: 0; }
.switch input:focus-visible + .sw-track { box-shadow: 0 0 0 3px var(--accent-soft); }
.input-icon { position: relative; }
.input-icon > .icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); width: 18px; height: 18px; pointer-events: none;
}
.input-icon input { padding-left: 40px; padding-right: 44px; }
.input-icon .pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border: none; background: transparent;
  color: var(--muted); cursor: pointer; border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.input-icon .pw-toggle:hover { color: var(--text); background: rgba(16, 24, 40, .06); }
.input-icon .pw-toggle .icon { width: 18px; height: 18px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer; background: var(--accent-grad);
  color: #fff; transition: transform .1s, opacity .15s, box-shadow .15s;
  box-shadow: 0 6px 16px rgba(99, 102, 241, .25);
}
.btn:hover { opacity: .94; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn.secondary { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn.ghost { background: transparent; color: var(--accent); box-shadow: none; }
.btn.danger { background: #fff; color: var(--danger); border-color: #f3c9c9; }
/* 小操作按钮：悬浮立体风格 */
.btn.sm {
  padding: 7px 13px; font-size: 13px; border-radius: 9px;
  box-shadow: 0 2px 6px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}
.btn.sm:hover {
  opacity: 1; transform: translateY(-2px);
  box-shadow: 0 7px 16px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.7);
}
.btn.sm:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0,0,0,.14), inset 0 2px 4px rgba(0,0,0,.10);
}
.btn.sm.secondary:hover { background: #f7f8fc; }
.btn.sm.danger:hover {
  background: var(--danger-soft);
  box-shadow: 0 7px 16px rgba(255,77,79,.24), inset 0 1px 0 rgba(255,255,255,.7);
}
.btn.block { width: 100%; margin-top: 18px; }

/* ---------- 进度 ---------- */
.progress { margin-top: 18px; display: none; }
.progress .bar { height: 9px; background: #eef0f5; border-radius: 99px; overflow: hidden; }
.progress .bar > i { display: block; height: 100%; width: 0%; background: var(--accent-grad); transition: width .12s; }
.progress .label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- 结果 / 提示 ---------- */
.result { display: none; margin-top: 18px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); text-align: center; }
.result .code-label { color: var(--muted); font-size: 13px; }
.result .code {
  font-size: 30px; font-weight: 700; letter-spacing: 4px; text-align: center;
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 4px 0 14px;
}
.linkbox { display: flex; gap: 10px; align-items: stretch; margin-top: 4px; }
.linkbox input {
  flex: 1; min-width: 0; font-size: 13px; padding: 11px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .2px; border-radius: 999px;
  background: linear-gradient(180deg, #fbfcfe, #f2f5fa);
  border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: inset 0 1px 3px rgba(16, 24, 40, .06);
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.linkbox input:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft), inset 0 1px 2px rgba(16, 24, 40, .04);
}
.linkbox .btn { border-radius: 999px; }
#copyBtn .icon { width: 16px; height: 16px; }
.msg { margin-top: 14px; font-size: 14px; padding: 11px 13px; border-radius: var(--radius-sm); display: none; }
.msg.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #b6ebd2; }
.msg.err { background: var(--danger-soft); color: var(--danger); border: 1px solid #f6caca; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tbody tr:hover { background: var(--surface-2); }
td .actions { display: flex; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; background: #f1f2f7; color: var(--muted); }
.badge.lock { background: var(--accent-soft); color: var(--accent); }
.badge.admin { background: #fdf0d5; color: #b45309; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: #fee2e2; color: #b91c1c; }

/* ---------- 统计卡（数据可视化） ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 14px;
  transition: transform .16s, box-shadow .16s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.s-ico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.s-ico .icon { width: 23px; height: 23px; stroke: #fff; }
.s-ico.a { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.s-ico.b { background: linear-gradient(135deg, #10b981, #059669); }
.s-ico.c { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.s-ico.d { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.stat .n { font-size: 24px; font-weight: 700; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- 可视化区块 ---------- */
.viz-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.viz-card { margin-top: 16px; }
.viz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.viz-head h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.viz-head h2 .icon { width: 17px; height: 17px; color: var(--accent); }
.viz-head .sub { color: var(--muted); font-size: 13px; flex: none; }
.viz-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; }

/* 存储占用进度条 */
.meter { height: 12px; border-radius: 99px; background: #eef0f7; overflow: hidden; }
.meter-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #6366f1, #8b5cf6); transition: width .5s ease; }
.meter-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.meter-legend b { color: var(--text); font-weight: 600; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.violet { background: #6366f1; }
.dot.green { background: #10b981; }
.dot.blue { background: #3b82f6; }
.meter-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }

/* 柱状图（近 7 天趋势） */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 168px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; gap: 6px; }
.bar-val { font-size: 12px; color: var(--muted); height: 16px; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.bar {
  width: 100%; min-height: 4px; border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #a5b4fc, #6366f1);
  transition: height .5s ease;
}
.bar.today { background: linear-gradient(180deg, #8b5cf6, #6366f1); box-shadow: 0 6px 16px rgba(99, 102, 241, .35); }
.bar-lbl { font-size: 12px; color: var(--muted); }
.bar-lbl.today { color: var(--accent); font-weight: 600; }

/* 横向条形图（类型分布 / 用户排行） */
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 6px; }
.hbar-lbl { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-val { color: var(--muted); flex: none; }
.hbar-track { height: 9px; border-radius: 99px; background: #eef0f7; overflow: hidden; }
.hbar-fill { height: 100%; width: 0; border-radius: 99px; background: var(--accent-grad); transition: width .5s ease; }

/* 系统信息 */
.sys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sys-item {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.sys-item .s-ico { width: 44px; height: 44px; border-radius: 12px; }
.sys-n { font-size: 17px; font-weight: 700; line-height: 1.3; }
.sys-l { color: var(--muted); font-size: 12.5px; }
.sys-foot { margin-top: 14px; font-size: 12.5px; color: var(--muted); word-break: break-all; }

/* 最近文件表格 */
.fname { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 文件类型徽章 / 预览缩略图 */
.frow { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; }
.frow .fname-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fcell { display: inline-flex; flex: none; }
.fbadge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border-radius: 10px;
  font-size: 11px; font-weight: 800; letter-spacing: .3px; color: #fff;
  background: #9aa3b2; flex: none; box-sizing: border-box; overflow: hidden;
}
.fbadge.img  { background: linear-gradient(145deg, #4facfe, #2d7ff9); }
.fbadge.vid  { background: linear-gradient(145deg, #a06bff, #7c3aed); }
.fbadge.aud  { background: linear-gradient(145deg, #ffb24d, #f97316); }
.fbadge.pdf  { background: linear-gradient(145deg, #ff6b6b, #e53935); }
.fbadge.doc  { background: linear-gradient(145deg, #4d8bff, #2f6fed); }
.fbadge.xls  { background: linear-gradient(145deg, #36c98a, #16a34a); }
.fbadge.ppt  { background: linear-gradient(145deg, #ff8a5c, #ea580c); }
.fbadge.zip  { background: linear-gradient(145deg, #b08968, #8b5e3c); }
.fbadge.txt  { background: linear-gradient(145deg, #94a3b8, #64748b); }
.fbadge.code { background: linear-gradient(145deg, #5b6472, #3f4654); }
.fbadge.file { background: linear-gradient(145deg, #9aa3b2, #6b7280); }
/* 固定格子尺寸，避免缩略图隐藏后容器塌陷导致徽章溢出压住文件名 */
.fcell.img { position: relative; width: 40px; height: 40px; flex: none; }
/* 徽章作为底层占位：缩略图加载失败时露出，成功时被缩略图覆盖 */
.fcell.img .fbadge { position: absolute; inset: 0; z-index: 0; }
.fcell.img .fthumb {
  position: relative; z-index: 1;
  width: 40px; height: 40px; border-radius: 10px; object-fit: cover;
  display: block; background: #eef1f6;
}

/* ---------- 模态框（修改密码） ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(24, 24, 27, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-bg.show { display: flex; }
.modal {
  background: linear-gradient(180deg, #ffffff, #f6f7fb);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 18px; padding: 28px; width: 380px; max-width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95),
    0 24px 60px rgba(24, 24, 27, .28), 0 8px 18px rgba(24, 24, 27, .14);
  animation: modalPop .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
/* ---------- 立体确认弹窗 ---------- */
.cfm-modal { width: 400px; }
.cfm-head { display: flex; align-items: center; gap: 13px; margin-bottom: 10px; }
.cfm-badge {
  flex: none; width: 44px; height: 44px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-grad);
  box-shadow: 0 8px 18px rgba(99, 102, 241, .38), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.cfm-badge.danger {
  background: linear-gradient(145deg, #ff6b6b, #e53935);
  box-shadow: 0 8px 18px rgba(229, 57, 53, .38), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.cfm-modal .cfm-title { margin: 0; font-size: 17px; font-weight: 700; }
.cfm-text { margin: 0 0 2px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.cfm-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.modal h3 { margin: 0 0 18px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.modal h3 .icon { color: var(--accent); width: 22px; height: 22px; }
.modal .tabs { display: flex; gap: 18px; margin-bottom: 16px; }
.modal .tabs span { cursor: pointer; color: var(--muted); padding-bottom: 5px; font-weight: 500; }
.modal .tabs span.active { color: var(--text); border-bottom: 2px solid var(--accent); }

/* 编辑用户弹窗 */
.ue-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ---------- 头像预览 / 裁剪 ---------- */
.ac-bg { z-index: 60; }
.ac-bg .modal { padding: 0; overflow: hidden; }
.ac-bg .ac-ico {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.ac-cam { width: 20px; height: 20px; flex: none; }
.ac-edit { width: 470px; }
.ac-crop { width: 500px; }
.ac-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.ac-title { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; color: var(--text); }
.ac-title .ac-ico { width: 20px; height: 20px; color: var(--accent); }
.ac-x {
  border: 0; background: none; cursor: pointer; color: var(--muted);
  font-size: 22px; line-height: 1; padding: 0 6px; border-radius: 8px;
}
.ac-x:hover { color: var(--text); background: var(--surface-2); }
.ac-body { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 24px 20px; }
.ac-preview {
  width: 118px; height: 118px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--accent-grad); color: #fff; font-size: 42px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--surface); box-shadow: 0 6px 22px rgba(99, 102, 241, .22);
}
.ac-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-hint { margin-top: 10px; font-size: 13px; color: var(--muted); }
.ac-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}
/* 裁剪区（基于 cropperjs：完整图片 + 可拖动裁剪框） */
.ac-crop .crop-wrap { display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 0; }
.ac-crop .crop-box {
  position: relative; width: 100%; height: 312px; box-sizing: border-box;
  padding: 12px; border-radius: 16px; overflow: hidden;
  background: #1f2a3d; border: 1px solid #e8ecf5;
}
.ac-crop .crop-box > img { display: block; max-width: 100%; }
.ac-crop .crop-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 8px; color: #b9c2d4; font-size: 13px;
}
/* 裁剪框视觉：白边 + 四角 L 形手柄 + 三分参考线 + 框外遮罩 */
.ac-crop .cropper-view-box { outline: 1px solid #fff; outline-color: #fff; border-radius: 0; }
.ac-crop .cropper-modal { background-color: #0b1220; opacity: .5; }
.ac-crop .cropper-face { background-color: transparent; opacity: 0; }
.ac-crop .cropper-line { background-color: transparent; }
.ac-crop .cropper-dashed { border-color: rgba(255, 255, 255, .45); border-style: solid; opacity: 1; }
.ac-crop .cropper-point {
  width: 16px; height: 16px; background-color: transparent; border: 0 solid #fff;
  border-radius: 0; box-shadow: none; opacity: 1;
}
.ac-crop .cropper-point.point-nw { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.ac-crop .cropper-point.point-ne { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.ac-crop .cropper-point.point-sw { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.ac-crop .cropper-point.point-se { bottom: -1px; right: -1px; opacity: 1; border-bottom-width: 2px; border-right-width: 2px; }
.ac-crop .cropper-point.point-se::before { display: none; }
.ac-crop .cropper-point.point-n, .ac-crop .cropper-point.point-s { width: 18px; height: 4px; margin-left: -9px; background-color: #fff; }
.ac-crop .cropper-point.point-n { top: -2px; }
.ac-crop .cropper-point.point-s { bottom: -2px; }
.ac-crop .cropper-point.point-e, .ac-crop .cropper-point.point-w { width: 4px; height: 18px; margin-top: -9px; background-color: #fff; }
.ac-crop .cropper-point.point-e { right: -2px; }
.ac-crop .cropper-point.point-w { left: -2px; }
/* 工具栏 / 角度矫正：浅色卡片风格 */
.ac-tools {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #f7f9ff; border: 1px solid #eaeefb; border-radius: 12px; padding: 7px 10px;
}
.ac-tools-left { display: flex; gap: 8px; }
.ac-tool {
  width: 30px; height: 30px; border: 0; border-radius: 9px; cursor: pointer;
  background: #fff; color: #5b6b8c; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(31, 42, 72, .08);
  transition: background .15s, color .15s, transform .15s;
}
.ac-tool:hover { background: var(--accent-grad); color: #fff; transform: translateY(-1px); }
.ac-ratio { margin-left: auto; font-size: 12px; color: #8b93a7; letter-spacing: .3px; }
.ac-tilt {
  display: flex; align-items: center; gap: 10px;
  background: #f7f9ff; border: 1px solid #eaeefb; border-radius: 12px; padding: 2px 12px;
}
.ac-tilt-label { flex: none; font-size: 12.5px; color: #5b6b8c; }
.ac-tilt input[type="range"] { flex: 1; min-width: 80px; accent-color: var(--accent); }
.ac-tilt-val { flex: none; width: 52px; text-align: right; font-size: 12px; color: #8b93a7; font-variant-numeric: tabular-nums; }
.ac-zero { border: 0; background: none; cursor: pointer; color: var(--accent); font-size: 13px; padding: 2px 4px; flex: none; }
.ac-zero:hover { text-decoration: underline; }
.ac-tip {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 0 2px 2px; font-size: 12px; line-height: 1.65; color: var(--muted);
}
.ac-tip .ac-ico { width: 15px; height: 15px; margin-top: 2px; color: var(--accent); flex: none; }

/* ---------- 专属登录页 ---------- */
.auth-wrap { min-height: 100vh; display: flex; }
.auth-aside {
  flex: 1.1; background: var(--accent-grad); color: #fff;
  padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-aside::after {
  content: ""; position: absolute; right: -80px; bottom: -80px;
  width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .10);
}
.auth-aside::before {
  content: ""; position: absolute; left: -60px; top: -60px;
  width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.auth-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; position: relative; z-index: 1; color: inherit; text-decoration: none; cursor: pointer; transition: opacity .15s; }
.auth-brand:hover { opacity: .85; text-decoration: none; }
.auth-brand-mobile { display: none; color: var(--text); margin-bottom: 22px; }
.auth-brand .logo-badge { width: 44px; height: 44px; border-radius: 12px; }
.auth-brand .logo-badge .icon { width: 24px; height: 24px; }
.auth-aside h1 { font-size: 34px; line-height: 1.25; margin: 0 0 14px; position: relative; z-index: 1; }
.auth-aside p.lead { opacity: .92; font-size: 15px; max-width: 420px; position: relative; z-index: 1; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; position: relative; z-index: 1; }
.auth-points li { display: flex; align-items: center; gap: 13px; font-size: 15px; }
.auth-points .p-ico { width: 40px; height: 40px; border-radius: 11px; background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center; }
.auth-points .p-ico .icon { width: 20px; height: 20px; stroke: #fff; }
.auth-foot { font-size: 13px; opacity: .8; position: relative; z-index: 1; }

.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.auth-card { width: 380px; max-width: 100%; }
.auth-card .auth-head { text-align: center; margin-bottom: 26px; }
.auth-card .auth-head h2 { margin: 0 0 6px; font-size: 24px; }
.auth-card .auth-head p { margin: 0; color: var(--muted); font-size: 14px; }
.auth-card .input-icon { margin-top: 16px; }
.auth-card .input-icon:first-of-type { margin-top: 8px; }
.auth-card .tabs { display: flex; gap: 24px; justify-content: center; margin-bottom: 22px; }
.auth-card .tabs span { cursor: pointer; color: var(--muted); padding-bottom: 6px; font-weight: 600; }
.auth-card .tabs span.active { color: var(--text); border-bottom: 2px solid var(--accent); }
.auth-hint { font-size: 12px; color: var(--muted); text-align: center; margin-top: 18px; }

/* ---------- 后台：左侧菜单布局 ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex: none; background: #15162b; color: #c9cbe0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side-brand {
  display: flex; align-items: center; gap: 11px; padding: 20px 22px;
  font-size: 18px; font-weight: 700; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.side-brand .logo-badge { width: 36px; height: 36px; border-radius: 10px; }
.side-brand .logo-badge .icon { width: 20px; height: 20px; stroke: #fff; }
.side-nav { padding: 16px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: 10px; color: #c9cbe0; font-size: 14px; font-weight: 500; cursor: pointer;
  text-decoration: none; transition: background .15s, color .15s;
}
.side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.active { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 20px rgba(99, 102, 241, .35); }
.side-nav a .icon { width: 19px; height: 19px; }
.side-foot { padding: 16px; border-top: 1px solid rgba(255, 255, 255, .07); display: flex; flex-direction: column; gap: 6px; }
.side-foot a { display: flex; align-items: center; gap: 10px; color: #c9cbe0; font-size: 13px; padding: 8px 12px; border-radius: 9px; text-decoration: none; }
.side-foot a:hover { background: rgba(255, 255, 255, .06); color: #fff; }

.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10;
}
.admin-top .at-title { font-size: 18px; font-weight: 700; }
.admin-top .at-user { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.admin-top .at-user .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.admin-content { padding: 26px 28px 60px; }
.tab-pane { display: block; }
.tab-pane[hidden] { display: none; }

.guard-box {
  max-width: 460px; margin: 12vh auto; text-align: center; padding: 40px 30px;
}
.guard-box .g-ico { width: 64px; height: 64px; border-radius: 18px; background: var(--danger-soft); color: var(--danger); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.guard-box .g-ico .icon { width: 32px; height: 32px; }

/* ---------- P2P ---------- */
.p2p-box { max-width: 560px; margin: 0 auto; }
.log {
  background: #0f1117; color: #d4d4d8; border-radius: 12px; padding: 16px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  height: 220px; overflow-y: auto; margin-top: 18px; white-space: pre-wrap;
}

/* ---------- 提取页 ---------- */
.extract-card { max-width: 520px; margin: 30px auto; }
.extract-ico {
  width: 62px; height: 62px; border-radius: 50%; background: var(--ok-soft);
  color: var(--ok); display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.extract-ico .icon { width: 30px; height: 30px; }
.extract-card h2.extract-title { font-size: 23px; margin: 0 0 6px; }

/* ---------- 上传历史 ---------- */
#historyCard .hist-head { text-align: center; padding: 4px 0 22px; }
#historyCard .hist-ico {
  width: 62px; height: 62px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
#historyCard .hist-ico .icon { width: 30px; height: 30px; }
#historyCard h2.hist-title { font-size: 23px; margin: 0 0 6px; }
#historyCard table th {
  background: var(--surface-2); color: var(--muted);
  font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0;
}
#historyCard .hist-actions { text-align: center; margin-top: 22px; }
#historyCard .hist-clear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: none;
  border-radius: 14px; cursor: pointer; color: var(--text);
  background: linear-gradient(145deg, #ffffff, #eef0f4);
  box-shadow: 0 4px 10px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
#historyCard .hist-clear:hover {
  transform: translateY(-3px);
  background: linear-gradient(145deg, #ffffff, #ffe7e7);
  box-shadow: 0 9px 20px rgba(255,77,79,.30), inset 0 1px 0 rgba(255,255,255,.9);
}
#historyCard .hist-clear:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0,0,0,.14), inset 0 2px 5px rgba(0,0,0,.10);
}
#historyCard .clear-svg { width: 22px; height: 22px; }
#historyCard .actions { align-items: center; }
#historyCard .row-del {
  flex: none; width: 34px; height: 34px; padding: 0; border: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--danger); border-radius: 9px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.7);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
#historyCard .row-del .del-svg { width: 18px; height: 18px; }
#historyCard .row-del:hover {
  background: var(--danger-soft); transform: translateY(-2px);
  box-shadow: 0 7px 16px rgba(255,77,79,.24), inset 0 1px 0 rgba(255,255,255,.7);
}
#historyCard .row-del:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0,0,0,.14), inset 0 2px 4px rgba(0,0,0,.10);
}
#historyCard .row-copy {
  flex: none; width: 34px; height: 34px; padding: 0; border: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--text); border-radius: 9px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.7);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
#historyCard .row-copy .icon { width: 18px; height: 18px; }
#historyCard .row-copy:hover {
  background: #f2f3f7; transform: translateY(-2px);
  box-shadow: 0 7px 16px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.7);
}
#historyCard .row-copy:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0,0,0,.14), inset 0 2px 4px rgba(0,0,0,.10);
}

/* ---------- 页脚 ---------- */
.site-foot {
  padding: 30px 20px 38px; text-align: center;
  background: var(--bg); color: var(--muted);
  border-top: 1px solid var(--border);
}
.site-foot .sf-brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 17px; color: var(--text);
}
.site-foot .sf-brand .icon { width: 20px; height: 20px; color: var(--accent); }
.site-foot .sf-desc { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.site-foot .sf-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.site-foot .sf-note b { color: var(--accent); font-weight: 600; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .viz-row { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .sys-grid { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-brand-mobile { display: inline-flex; }
  .admin-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side-brand { border-bottom: none; }
  .side-nav { flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .side-foot { flex-direction: row; border-top: none; }
  .admin-top { position: static; }
}

/* ---------- 用户管理：表格与控件美化 ---------- */
#tab-users > .card { padding: 24px 24px 20px; }
#tab-users .row label { margin: 0 0 6px; }
#usersBody { margin-top: 6px; overflow-x: auto; }
#usersBody table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
#usersBody thead th {
  text-align: left; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; letter-spacing: .2px; color: var(--muted);
  padding: 10px 14px; background: var(--surface-2);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
#usersBody thead th:first-child { border-left: 1px solid var(--border); border-top-left-radius: 10px; }
#usersBody thead th:last-child { border-right: 1px solid var(--border); border-top-right-radius: 10px; }
#usersBody tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
#usersBody tbody tr:last-child td { border-bottom-color: transparent; }
#usersBody tbody tr { transition: background .15s; }
#usersBody tbody tr:hover { background: #fafbff; }
#usersBody tbody td:nth-child(2) { font-weight: 600; }
#usersBody .avatar-xs { border: 1px solid var(--border); }
#usersBody .actions { display: flex; gap: 8px; align-items: center; }
#usersBody .btn.sm { padding: 7px 12px; border-radius: 9px; white-space: nowrap; }
#usersBody .btn .icon { width: 14px; height: 14px; }
#usersBody .btn .del-svg { width: 15px; height: 15px; flex: none; }
.del-svg { width: 16px; height: 16px; flex: none; vertical-align: -2px; }
.cam-svg { width: 16px; height: 16px; flex: none; }
.menu-item .cam-svg { width: 18px; height: 18px; }

/* 小号滑动开关（表格内状态） */
.switch.sm .sw-track { width: 50px; height: 24px; }
.switch.sm .sw-track::before { width: 18px; height: 18px; }
.switch.sm input:checked + .sw-track::before { transform: translateX(26px); }
.switch.sm .sw-on, .switch.sm .sw-off { font-size: 10px; }
.switch.sm .sw-on { left: 7px; }
.switch.sm .sw-off { right: 7px; }
