/* 龙翔体系文件收集 简易版 —— 手机优先样式 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --blue: #0b57d0; --blue-d: #0842a0; --ink: #1f2328; --muted: #6b7280;
  --line: #e5e7eb; --bg: #f6f7f9; --ok: #0f9d58; --warn: #b26a00; --danger: #c62828;
}
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: var(--blue); text-decoration: none; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 14px; background: var(--blue); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.topbar .brand { color: #fff; font-weight: 700; font-size: 17px; }
.topbar .who { font-size: 13px; opacity: .95; text-align: right; }
.topbar .who em { display: block; font-style: normal; font-size: 11px; opacity: .8; }

.wrap { max-width: 720px; margin: 0 auto; padding: 14px 14px 90px; }
.foot { text-align: center; color: var(--muted); font-size: 11px; padding: 10px 14px 24px; }
.flash { background: #e8f0fe; border: 1px solid #c6dafc; color: #174ea6; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.card h2 { margin: 0 0 10px; font-size: 16px; }
.card h3 { margin: 0 0 8px; font-size: 15px; }
.muted { color: var(--muted); font-size: 13px; }

label { display: block; font-size: 13px; color: #374151; margin: 10px 0 4px; font-weight: 600; }
input[type=text], input[type=tel], input[type=date], input[type=password], select, textarea {
  width: 100%; padding: 12px; font-size: 16px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; }
textarea { min-height: 68px; }

.btn { display: block; width: 100%; padding: 14px; font-size: 17px; font-weight: 700; text-align: center;
  border: 0; border-radius: 12px; background: var(--blue); color: #fff; margin-top: 14px; }
.btn:active { background: var(--blue-d); }
.btn.ghost { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn.small { padding: 9px; font-size: 14px; width: auto; display: inline-block; }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); }

.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.pick .big { display: block; padding: 22px 10px; text-align: center; background: #fff; border: 1px dashed var(--blue);
  border-radius: 14px; font-weight: 700; color: var(--blue); }
.pick .big.full { grid-column: 1 / -1; border-style: solid; background: #eef4ff; padding: 26px 12px; font-size: 19px; }
.pick .big span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 4px; }

/* 首页入口：紧凑四宫格（比原来三个大按钮小很多） */
.entries { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.entry { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 8px; text-align: center; color: var(--ink); }
.entry:active { background: #eef4ff; }
.entry b { display: block; font-size: 15px; color: var(--blue); }
.entry span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.entry.hl { border-color: #7ea8e6; background: #eef4ff; }

/* 大号文件选择按钮 */
.bigpick { display: block; padding: 24px 14px; margin: 8px 0 4px; text-align: center; cursor: pointer;
  background: #f2f7ff; border: 2px dashed #7ea8e6; border-radius: 14px; }
.bigpick:active { background: #e6efff; }
.bigpick-t { display: block; font-size: 18px; font-weight: 700; color: var(--blue); }
.bigpick-s { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 待上传文件队列 */
.queue { list-style: none; margin: 10px 0 0; padding: 0; }
.queue li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.qthumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: 0 0 auto; }
.qname { flex: 1 1 auto; font-size: 13px; word-break: break-all; }
.qdel { flex: 0 0 auto; border: 1px solid #e0b4b4; background: #fff5f5; color: #c62828; border-radius: 8px; padding: 6px 10px; font-size: 12px; }

/* 缩略图 + 放大查看层 */
.thumbimg { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; }
.viewer { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 100; flex-direction: column; }
.viewer.on { display: flex; }
.viewer-bar { display: flex; justify-content: flex-end; gap: 10px; padding: 10px 12px; }
.vbtn { background: #fff; color: #111; border: 0; border-radius: 10px; padding: 10px 14px; font-size: 14px;
  font-weight: 700; text-decoration: none; }
.viewer img { flex: 1 1 auto; object-fit: contain; width: 100%; min-height: 0; cursor: zoom-in; }
.viewer-body { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; -webkit-overflow-scrolling: touch; }
.viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.viewer-body img.zoom { max-width: none; max-height: none; width: auto; height: auto; cursor: zoom-out; }

/* 输入框 + 扫码按钮同行 */
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row input { flex: 1 1 auto; }
.scanbtn { flex: 0 0 auto; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--blue); background: #eef4ff; color: var(--blue); border-radius: 10px; }
.scanbtn svg { display: block; }

/* 摄像头扫码弹层 */
.scan-dlg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 110;
  align-items: center; justify-content: center; padding: 16px; }
.scan-dlg.on { display: flex; }
.scan-box { width: 100%; max-width: 520px; text-align: center; }
.scan-box video { width: 100%; border-radius: 12px; background: #000; max-height: 60vh; }
.scan-frame { width: 62%; aspect-ratio: 1/1; margin: -45vh auto 0; border: 2px dashed #6cd66c;
  border-radius: 12px; pointer-events: none; }
.scan-msg { color: #fff; font-size: 14px; margin: 12px 0; }
.scan-dlg .btn { background: #fff; color: #111; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.item-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #eef2ff; color: #3730a3; white-space: nowrap; }
.tag.void { background: #fdecea; color: var(--danger); }
.meta { font-size: 12px; color: var(--muted); margin-top: 3px; word-break: break-all; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumbs a { display: block; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .fbox { display: flex; align-items: center; justify-content: center; width: 84px; height: 84px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 12px; text-align: center; padding: 4px; color: var(--muted); }

/* 文档附件方块（Word/Excel/PDF）：有缩略图就显示首页图，没有就显示类型+大小 */
.thumbs .dbox { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 84px; height: 84px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #f6f8fc; text-decoration: none; }
.thumbs .dbox img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .dbox .db-ico { font-size: 15px; font-weight: 800; color: #174ea6; letter-spacing: .5px; }
.thumbs .dbox .db-txt { font-size: 11px; color: var(--muted); margin-top: 3px; }
.thumbs .dbox .db-badge { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; font-style: normal;
  text-align: center; background: rgba(11, 87, 208, .86); color: #fff; padding: 2px 0; letter-spacing: .5px; }

/* 查看层：图片模式 / 文档模式共用 */
.viewer .doconly { display: none; }
.viewer.doc .doconly { display: inline-flex; align-items: center; }
.viewer.doc .imgonly { display: none; }
.vcount { color: #fff; font-size: 14px; font-weight: 700; padding: 0 4px; min-width: 52px; justify-content: center; }
.viewer-bar { flex-wrap: wrap; row-gap: 8px; }
.vbtn:disabled { opacity: .4; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #fff;
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; text-align: center; padding: 13px 2px; font-size: 13px; color: #4b5563; font-weight: 600; }

.big-img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.kv { font-size: 13px; color: #374151; }
.kv b { display: inline-block; min-width: 76px; color: var(--muted); font-weight: 500; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

details.optmore { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.optmore summary { font-size: 13px; color: var(--muted); cursor: pointer; }
details.optmore form { margin-top: 6px; }
.filter { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter input, .filter select { font-size: 14px; padding: 9px; }

/* 乌龟图 */
.turtle-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.turtle-head .btn.small { margin-top: 0; }
.turtle-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
@media (min-width: 620px) { .turtle-grid { grid-template-columns: 1fr 1fr; } }
.tile { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fbfcfe; }
.tile-h { font-size: 12px; font-weight: 700; color: #174ea6; margin-bottom: 6px; }
.tile-b { font-size: 13px; color: #374151; white-space: pre-wrap; word-break: break-word; }

/* 入口权限页 */
.legend { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.legend li { background: #f2f7ff; border: 1px solid #dbe7fb; border-radius: 10px; padding: 7px 9px; }
.legend b { display: block; font-size: 13px; color: var(--blue); }
.legend span { font-size: 11px; color: var(--muted); }
.bulkbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 4px; }
.perm { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.perm-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.perm-h b { font-size: 15px; }
.perm-h .muted { font-size: 12px; }
.rolesel { width: auto; padding: 5px 8px; font-size: 12px; border-radius: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 6px 10px; border: 1px solid #d1d5db;
  border-radius: 999px; background: #fff; color: #4b5563; margin: 0; font-weight: 400; }
.chip input { width: 14px; height: 14px; margin: 0; }
.chip.on { background: #eef4ff; border-color: #7ea8e6; color: var(--blue); font-weight: 700; }
.chip.all.on { background: #fff8e6; border-color: #d9b64a; color: #8a6d00; }
.savebar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 12px 12px;
  margin: 10px -14px 0; box-shadow: 0 -2px 8px rgba(0,0,0,.06); }
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
