/* FlexFlow 极简工具箱 · 公共样式(所有工具页共享) */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 14px/1.65 "Segoe UI", "Microsoft YaHei", sans-serif; background: #0d1220; color: #e8ecf4; min-height: 100vh; }
a { color: #4f8cff; text-decoration: none; }

/* ---------- 顶栏 ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 13px 26px; background: rgba(13,18,32,.94); backdrop-filter: blur(8px); border-bottom: 1px solid #1d2537; }
.brand { font-size: 16px; font-weight: 700; }
.brand span { color: #4f8cff; }
.brand-sub { font-size: 12px; color: #8b94a7; }
.spacer { flex: 1; }
.privacy { font-size: 11.5px; color: #4ec98a; }
.topbar a.plink { font-size: 13px; color: #8b94a7; padding: 6px 12px; border-radius: 8px; }
.topbar a.plink:hover { color: #e8ecf4; background: #1a2233; }

.wrap { max-width: 980px; margin: 0 auto; padding: 26px 20px 70px; }
.crumb { font-size: 12.5px; color: #8b94a7; margin-bottom: 8px; }
.crumb a { color: #8b94a7; }
.crumb a:hover { color: #4f8cff; }
h1 { font-size: 21px; margin-bottom: 6px; }
.lead { font-size: 13px; color: #8b94a7; margin-bottom: 20px; line-height: 1.7; }

/* ---------- 索引页工具卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { display: block; padding: 18px; background: #141b2b; border: 1px solid #232c41; border-radius: 14px; transition: all .15s; }
.card:hover { border-color: #4f8cff; background: #17203a; transform: translateY(-2px); }
.card .ico { font-size: 26px; margin-bottom: 8px; }
.card .nm { font-size: 15px; font-weight: 600; color: #e8ecf4; margin-bottom: 4px; }
.card .ds { font-size: 12.5px; color: #8b94a7; line-height: 1.6; }
.cat-title { font-size: 13px; font-weight: 600; color: #4f8cff; margin: 26px 0 12px; letter-spacing: .5px; }
.cat-title:first-child { margin-top: 0; }

/* ---------- 面板 ---------- */
.panel { background: #141b2b; border: 1px solid #232c41; border-radius: 14px; padding: 20px 22px; margin-bottom: 16px; }
.hint { font-size: 12.5px; color: #8b94a7; margin-bottom: 12px; }
.hint.inline { margin: 0; }

/* ---------- 拖拽区 ---------- */
.drop { border: 2px dashed #31405f; border-radius: 14px; padding: 42px 20px; text-align: center; color: #8b94a7; cursor: pointer; transition: all .15s; }
.drop:hover, .drop.over { border-color: #4f8cff; background: rgba(79,140,255,.06); color: #e8ecf4; }
.drop .big { font-size: 38px; margin-bottom: 8px; }

/* ---------- 表单控件 ---------- */
select, input[type=text], input[type=number], input[type=password], textarea {
  background: #0f1420; color: #e8ecf4; border: 1px solid #31405f; border-radius: 8px;
  padding: 9px 11px; font-size: 13.5px; outline: none; font-family: inherit;
}
select:focus, input:focus, textarea:focus { border-color: #4f8cff; }
textarea { width: 100%; resize: vertical; }
input[type=color] { width: 34px; height: 32px; padding: 2px; background: #0f1420; border: 1px solid #31405f; border-radius: 8px; cursor: pointer; }
input[type=range] { width: 130px; accent-color: #4f8cff; vertical-align: middle; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.row:last-child { margin-bottom: 0; }
.row label { font-size: 12.5px; color: #8b94a7; white-space: nowrap; }
.row label.ck { display: flex; align-items: center; gap: 5px; cursor: pointer; color: #cdd6e4; }
input[type=checkbox] { width: auto; accent-color: #4f8cff; }
.sep { width: 1px; height: 20px; background: #232c41; }

/* ---------- 按钮 ---------- */
.btn { padding: 9px 18px; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(135deg,#4f8cff,#3a6fe0); border: none; border-radius: 9px; cursor: pointer; }
.btn:hover { opacity: .9; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: #232c41; font-weight: 400; }
.btn.link { background: none; padding: 4px 6px; color: #4f8cff; font-weight: 400; }
.mini { padding: 7px 14px; font-size: 12.5px; color: #fff; background: #2b5bd7; border: none; border-radius: 8px; cursor: pointer; }
.mini:disabled { opacity: .45; cursor: not-allowed; }
.mini.ghost { background: #232c41; }
.mini.danger { background: #a32b2b; }

/* ---------- 文件/结果条目 ---------- */
.item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #0f1420; border: 1px solid #232c41; border-radius: 10px; margin-bottom: 10px; }
.item img.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #1a2233; flex-shrink: 0; }
.item .idx { width: 22px; text-align: center; font-size: 12px; color: #8b94a7; flex-shrink: 0; }
.item .info { flex: 1; min-width: 0; }
.item .nm { font-size: 13px; color: #e8ecf4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .st { font-size: 12px; color: #8b94a7; margin-top: 2px; }
.item .st b.ok { color: #4ec98a; }
.item .st b.warn { color: #ffb14e; }
.item .ops { display: flex; gap: 6px; flex-shrink: 0; }
.bar { height: 5px; border-radius: 3px; background: #232c41; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: #4f8cff; }

/* ---------- 输出 ---------- */
.out { background: #0f1420; border: 1px solid #232c41; border-radius: 10px; padding: 14px; font: 12.5px/1.7 Consolas, monospace; white-space: pre-wrap; word-break: break-all; color: #cdd6e4; max-height: 420px; overflow: auto; }
.err { color: #ff7b72; font-size: 12.5px; min-height: 18px; margin-top: 8px; }
.okc { color: #4ec98a; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; align-items: center; }
.kv label { color: #8b94a7; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #0f1420; border: 1px solid #232c41; border-radius: 10px; padding: 12px 14px; }
.stat .v { font-size: 20px; font-weight: 700; color: #4f8cff; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 12px; color: #8b94a7; margin-top: 2px; }

/* ---------- 预览 ---------- */
.preview-box { background: #0f1420; border: 1px solid #232c41; border-radius: 12px; padding: 14px; text-align: center; }
.preview-box img { max-width: 100%; max-height: 340px; border-radius: 8px; }
#qrCanvas, canvas.qr { background: #fff; border-radius: 10px; max-width: 100%; }

/* ---------- 页脚 ---------- */
.site-foot { border-top: 1px solid #1d2537; margin-top: 20px; }
.site-foot .inner { max-width: 980px; margin: 0 auto; padding: 20px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 12.5px; color: #8b94a7; }
.site-foot a { color: #aab3c5; }
.site-foot a:hover { color: #4f8cff; }
.site-foot .wx { font-family: Consolas, monospace; font-weight: 600; color: #aab3c5; user-select: all; }
.site-foot .fs { opacity: .45; }