:root {
  --bg: #0d1015;
  --panel: #151a22;
  --card: #1b212b;
  --card-2: #222a36;
  --line: rgba(255, 255, 255, .09);
  --text: #e9eff7;
  --muted: #93a2b7;
  --accent: #ff7a1a;
  --accent-2: #ff9a4d;
  --ok: #2ecc71;
  --danger: #ff5b5b;
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; }

.hidden { display: none !important; }

/* ---------- 备案号页脚 ---------- */
.site-footer {
  margin-top: auto;
  width: 100%;
  align-self: stretch;
  padding: 18px 0 calc(6px + env(safe-area-inset-bottom, 0px)) 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(150, 162, 176, .85);
}
.site-footer a {
  color: rgba(160, 172, 186, .9);
  text-decoration: none;
  border-bottom: 1px dotted rgba(160, 172, 186, .35);
  padding-bottom: 1px;
  display: inline-block;
  margin: 0 7px;
}
.site-footer a:hover { color: #cfe3ff; }
.admin-footer { padding: 10px 0 14px 0; border-top: 1px solid var(--line); background: transparent; }

/* ---------- 登录 ---------- */
.login-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1000px 600px at 80% -10%, var(--brand-tint, rgba(255, 122, 26, .18)), transparent 60%),
    radial-gradient(800px 500px at 0% 110%, rgba(40, 120, 255, .14), transparent 60%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}

.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }

.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #ff4d1a);
  display: grid; place-items: center;
  font-weight: 800; font-size: 18px; color: #fff;
  box-shadow: 0 6px 16px rgba(255, 122, 26, .35);
}

.brand h1 { font-size: 19px; margin: 0; letter-spacing: .5px; }
.brand small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 3px; }

.login-card .desc { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 16px 0 22px; }

/* 登录页品牌化：由后台「登录页管理」写入 CSS 变量，未设置时沿用上面的默认样式 */
.login-card .brand-mark {
  background: linear-gradient(135deg, var(--brand-accent, var(--accent)), var(--brand-accent-2, #ff4d1a));
  box-shadow: 0 6px 16px var(--brand-glow, rgba(255, 122, 26, .35));
  width: var(--brand-logo-size, 38px);
  height: var(--brand-logo-size, 38px);
  font-size: calc(var(--brand-logo-size, 38px) * .47);
}
.login-card .brand-mark.has-img { background: transparent; box-shadow: none; padding: 0; overflow: hidden; }
.login-card .brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: inherit; background: transparent; }
.login-card .brand h1 {
  font-size: var(--brand-title-size, 19px);
  font-family: var(--brand-font, inherit);
}
.login-card .brand small {
  font-size: var(--brand-sub-size, 12px);
  font-family: var(--brand-font, inherit);
}
.login-card .brand-mark { font-family: var(--brand-font, inherit); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }

.input, textarea.input, select.input {
  width: 100%;
  background: #0f141b;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.input:focus { border-color: rgba(255, 122, 26, .6); box-shadow: 0 0 0 3px rgba(255, 122, 26, .12); }

.btn {
  border: 1px solid var(--line);
  background: var(--card-2);
  border-radius: 11px;
  padding: 10px 16px;
  transition: .15s;
  font-weight: 500;
}

.btn:hover { background: #2b3442; }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 20px var(--brand-glow, rgba(255, 122, 26, .3));
}

.btn.primary:hover { filter: brightness(1.06); }
.btn.block { width: 100%; padding: 13px; }
.btn.danger { background: rgba(255, 91, 91, .12); border-color: rgba(255, 91, 91, .35); color: #ff8f8f; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.err { color: #ff8f8f; font-size: 13px; min-height: 18px; margin-top: 6px; }

/* ---------- 拍摄端 ---------- */
.app-page { min-height: 100%; display: flex; flex-direction: column; background: #07090c; overflow-x: hidden; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  gap: 6px;
  overflow: hidden;
  flex-wrap: nowrap;
}

.topbar .brand { flex: 1 1 auto; min-width: 0; max-width: 50%; }
.topbar .brand > div:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }

.topbar .who { flex: 0 1 auto; min-width: 0; max-width: 34%; font-size: 12px; color: var(--muted); text-align: right; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .who b { color: var(--text); font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; }
#logoutBtn { flex: 0 0 auto; padding: 6px 10px !important; font-size: 12px !important; }

.cam-wrap {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: 10px 12px 4px;
  background: #07090c;
}

/* 横向 4:3 取景框，高度自适应但不占满全屏 */
.cam-frame {
  position: relative;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 4 / 3;
  max-height: 46vh;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
}

#video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #000; transition: transform .08s ease-out; }

/* 取景变焦 */
.zoom-bar {
  position: absolute;
  right: 10px; bottom: 10px;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, .58);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  backdrop-filter: blur(6px);
  z-index: 6;
}
.zoom-bar.hidden { display: none; }
.zoom-btn {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: #e9eff7; font-size: 15px; line-height: 1;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.zoom-btn:active { background: rgba(255, 255, 255, .2); }
#zoomRange { width: 108px; accent-color: var(--accent); height: 22px; }
.zoom-val { font-size: 11.5px; color: #e9eff7; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

#overlay {  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: none;
}

.cam-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--muted); font-size: 13.5px; text-align: center; padding: 24px;
}

.gps-chip {
  position: absolute; top: 10px; left: 10px;
  display: flex; align-items: center; gap: 6px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 11.5px;
  color: #dfe6f0;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.dot { width: 7px; height: 7px; border-radius: 50%; background: #ffb01f; }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--danger); }

.controls {
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
}

.proj-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.proj-chip {
  flex: 1 1 auto; min-width: 0;
  background: rgba(255, 152, 0, .12);
  border: 1px solid rgba(255, 152, 0, .35);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #ffb74d;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.proj-label { font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.proj-select {
  flex: 1 1 auto; min-width: 0;
  background: #0f141b;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  color: var(--text);
}

#remark {
  width: 100%;
  resize: none;
  background: linear-gradient(180deg, rgba(255, 122, 26, .10), rgba(15, 20, 27, .92) 60%);
  border: 1.5px solid rgba(255, 122, 26, .55);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  margin-bottom: 8px;
  line-height: 1.5;
  box-shadow: 0 0 0 3px rgba(255, 122, 26, .10), inset 0 0 0 1px rgba(255, 255, 255, .04);
  transition: border-color .15s, box-shadow .15s;
}

#remark::placeholder { color: #8b98a9; }

#remark:focus {
  border-color: var(--accent-2, #ff7a1a);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, .18), inset 0 0 0 1px rgba(255, 255, 255, .06);
}

/* 备注：点击后弹出整页备注框 */
.remark-open {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 122, 26, .14), rgba(15, 20, 27, .92) 70%);
  border: 1.5px solid rgba(255, 122, 26, .6);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, .12);
  cursor: pointer;
}
.remark-open:active { box-shadow: 0 0 0 4px rgba(255, 122, 26, .22); }
.ro-label { font-size: 13px; color: #ffb683; flex: 0 0 auto; font-weight: 600; }
.ro-text { flex: 1; font-size: 14px; line-height: 1.45; color: #e7eef7; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ro-text.empty { color: #8b98a9; }
.ro-edit { flex: 0 0 auto; font-size: 12px; color: #fff; background: rgba(255, 122, 26, .55); border-radius: 10px; padding: 4px 9px; }

/* 隐藏的原始输入框（保留取值逻辑） */
.offscreen { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }

/* 整页备注 sheet */
.remark-sheet {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  background: #0a0d12;
}
.remark-sheet.hidden { display: none; }
.rs-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #0f141b;
}
.rs-title { font-size: 16px; font-weight: 700; color: var(--text); }
.rs-btn {
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  border-radius: 10px; padding: 8px 14px; font-size: 14px; cursor: pointer;
}
.rs-btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2, #ff7a1a)); border-color: transparent; color: #fff; font-weight: 600; }
.rs-btn:active { opacity: .85; }
.rs-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 16px; display: flex; flex-direction: column; gap: 14px;
}
#rsInput {
  width: 100%;
  height: 168px;
  resize: none;
  background: #121822;
  border: 1.5px solid rgba(255, 122, 26, .5);
  border-radius: 14px;
  padding: 14px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}
#rsInput:focus { border-color: var(--accent-2, #ff7a1a); box-shadow: 0 0 0 4px rgba(255, 122, 26, .16); }
.rs-hint { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.tip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.tip-chip {
  border: 1px solid rgba(255, 122, 26, .45);
  background: rgba(255, 122, 26, .12);
  color: #ffd9bf;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
}
.tip-chip:active { background: rgba(255, 122, 26, .3); color: #fff; }
.tip-chip mark { background: none; color: #fff; font-weight: 700; }
.tip-chip .tip-use { font-size: 11.5px; color: #9fb0c4; margin-left: 4px; }
.rs-add { display: flex; gap: 10px; align-items: center; padding-bottom: 8px; }
.rs-add .input { flex: 1; min-width: 0; font-size: 15px; }
.rs-add .rs-btn { flex: 0 0 auto; }
.shoot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.side-btn {
  flex: 0 0 74px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card-2);
  font-size: 12.5px;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}

.shoot {
  flex: 0 0 auto;
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: linear-gradient(135deg, var(--accent), #ff4d1a);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .1);
  transition: .12s;
}

.shoot:active { transform: scale(.94); }
.shoot.busy { opacity: .55; pointer-events: none; }

.mine { padding: 14px; border-top: 1px solid var(--line); background: var(--bg); }

.mine h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
}

.mine h3 span { color: var(--muted); font-size: 12px; font-weight: 400; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}

.thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 我的照片：按日期分组 */
.mine-day { margin-bottom: 16px; }
.mine-day h4 {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 8px; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .2px;
}
.mine-day h4 b { color: var(--text); font-weight: 600; margin-right: 6px; }

.thumb .meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, .8));
  padding: 14px 6px 5px;
  font-size: 10.5px;
  color: #e6edf6;
  line-height: 1.35;
}

.empty-tip { color: var(--muted); font-size: 13px; text-align: center; padding: 22px 0; }

/* 预览确认弹层 */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, .82);
  display: flex; flex-direction: column;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.modal .modal-img { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.modal img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.modal .modal-actions { display: flex; gap: 12px; padding-top: 14px; }
.modal .modal-actions .btn { flex: 1; padding: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 92px;
  transform: translateX(-50%);
  background: rgba(20, 26, 34, .95);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 22px;
  font-size: 13px;
  z-index: 60;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  max-width: 86vw;
  text-align: center;
}

.toast.ok { border-color: rgba(46, 204, 113, .45); }
.toast.err { border-color: rgba(255, 91, 91, .45); }

/* ---------- 照片预览（带返回） ---------- */
.pv-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #05070a;
  display: flex;
  flex-direction: column;
  animation: pvIn .16s ease-out;
}
.pv-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-top, 0px)) 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: rgba(10, 14, 19, .96);
  border-bottom: 1px solid var(--line);
}
.pv-back {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 122, 24, .5);
  background: rgba(255, 122, 24, .14);
  color: #ffb066;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pv-back:active { background: rgba(255, 122, 24, .26); }
.pv-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pv-save {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
}
.pv-body {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px;
  overflow: hidden;
}
.pv-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.pv-hint {
  flex: 0 0 auto;
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px)) 12px;
  text-align: center;
  font-size: 13px;
  color: rgba(160, 172, 186, .8);
}
@keyframes pvIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 上传成功 大绿勾 ---------- */
.ok-flash {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(4, 6, 9, .55);
  backdrop-filter: blur(2px);
  pointer-events: none;
  animation: okFade .18s ease-out;
}
.ok-flash .ok-ring {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(46, 204, 113, .22), rgba(46, 204, 113, .06) 70%);
  border: 4px solid #2ecc71;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(46, 204, 113, .5), inset 0 0 26px rgba(46, 204, 113, .35);
  animation: okPop .38s cubic-bezier(.2, 1.4, .4, 1) both;
}
.ok-flash .ok-tick {
  font-size: 96px;
  line-height: 1;
  color: #2ecc71;
  font-weight: 800;
  transform: translateY(-4px);
  text-shadow: 0 0 18px rgba(46, 204, 113, .6);
}
.ok-flash .ok-text {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #d7ffe6;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}
.ok-flash .ok-sub { font-size: 15px; color: rgba(230, 245, 236, .8); }

@keyframes okPop {
  from { transform: scale(.55); opacity: .4; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes okFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 后台 ---------- */
.admin-page { min-height: 100vh; display: flex; flex-direction: column; }

.admin-top {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}

.admin-top .stat { color: var(--muted); font-size: 12.5px; }
.admin-top .spacer { flex: 1; }

.tabs { display: flex; gap: 6px; background: #0f141b; padding: 4px; border-radius: 10px; border: 1px solid var(--line); }

.tabs button {
  border: 0; background: transparent; color: var(--muted);
  padding: 7px 16px; border-radius: 8px; font-size: 13px;
}

.tabs button.active { background: var(--card-2); color: var(--text); font-weight: 600; }

.admin-body { flex: 1; display: flex; min-height: 0; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow-y: auto;
  padding: 12px 10px;
}

.sidebar .side-title {
  font-size: 12px; color: var(--muted);
  padding: 4px 8px 10px;
  display: flex; justify-content: space-between; align-items: center;
}

.user-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 2px;
  transition: .12s;
}

.user-item:hover { background: rgba(255, 255, 255, .05); }
.user-item.active { background: rgba(255, 122, 26, .13); box-shadow: inset 0 0 0 1px rgba(255, 122, 26, .35); }

.avatar {
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 9px;
  background: var(--card-2);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: #c9d4e3;
}

.avatar.all { background: linear-gradient(135deg, var(--accent), #ff4d1a); color: #fff; }

.user-item .u-name { font-size: 13.5px; line-height: 1.25; }
.user-item .u-sub { font-size: 11px; color: var(--muted); }

.user-item .u-count { margin-left: auto; font-size: 11.5px; color: var(--muted); }

.main { flex: 1; min-width: 0; padding: 14px 18px 40px; overflow-y: auto; }

.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.filters input[type=date], .filters input[type=search] {
  background: #0f141b; border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 10px; font-size: 13px; outline: none;
}

.filters input[type=search] { flex: 1; min-width: 160px; }

.filters .chip {
  font-size: 12.5px; color: var(--muted);
}

.actionbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.actionbar .sel { color: var(--muted); font-size: 13px; margin-right: 4px; }
.actionbar .sel b { color: var(--accent-2); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 12px;
}

.pcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: .15s;
}

.pcard.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255, 122, 26, .35); }

.pcard .pic { position: relative; aspect-ratio: 4 / 3; background: #000; cursor: zoom-in; }
.pcard .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pcard .check {
  position: absolute; top: 8px; left: 8px;
  width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, .55);
  background: rgba(0, 0, 0, .45);
  display: grid; place-items: center; font-size: 12px; color: #fff;
}
.pcard.selected .check { background: var(--accent); border-color: var(--accent); }

.pcard .info { padding: 8px 10px 10px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.pcard .info .t { color: var(--text); font-weight: 600; font-size: 12.5px; }
.pcard .info .r { color: var(--accent-2); word-break: break-all; }
.pcard .info .c { font-variant-numeric: tabular-nums; }
.pcard .info .pj { display: inline-block; margin: 2px 0 2px; padding: 1px 6px; border-radius: 4px; background: rgba(255,152,0,0.14); color: #ffb74d; font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.date-group { margin-bottom: 22px; }
.date-group h4 {
  margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.date-group h4::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* 用户管理 / 设置表格 */
.panel-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 18px;
}

.panel-box h3 { margin: 0 0 14px; font-size: 15px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 12.5px; }

.row-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; align-items: end; }
.row-form .field.wide { grid-column: span 2; min-width: 240px; }

.hint { color: var(--muted); font-size: 12.5px; line-height: 1.7; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.form-grid.three { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* 备份数据管理 */
.bk-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 12px; }
.bk-table td { font-variant-numeric: tabular-nums; }
.bk-date { font-weight: 600; }
.bk-tag { display: inline-block; padding: 1px 8px; border-radius: 8px; font-size: 11.5px; background: rgba(255, 255, 255, .06); color: var(--muted); margin-left: 6px; }
.bk-empty { color: var(--muted); font-size: 13px; padding: 18px 8px; }

.sub-sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.sub-sec h4 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }

/* ---------- 登录页管理（后台）---------- */
.brand-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }@media (max-width: 1100px) { .brand-editor { grid-template-columns: minmax(0, 1fr); } }

.color-pick {
  width: 46px; height: 40px; padding: 3px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; flex: 0 0 auto;
}

.brand-preview { position: sticky; top: 12px; }
.bp-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; letter-spacing: .3px; }
.bp-card {
  background: #0d1015;
  border: 1px solid #232936;
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  overflow: hidden;
}
.bp-brand { display: flex; align-items: center; gap: 11px; }
.bp-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, #ff7a1a, #ff4d1a);
  font-weight: 800; font-size: 18px; color: #fff;
  box-shadow: 0 6px 16px rgba(255, 122, 26, .35);
}
.bp-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bp-mark.has-img { background: transparent; box-shadow: none; }
.bp-brand h1 { margin: 0; font-size: 19px; color: #e9edf5; letter-spacing: .5px; line-height: 1.25; word-break: break-word; }
.bp-brand small { display: block; color: #8b93a7; font-size: 12px; margin-top: 3px; }
.bp-desc { color: #8b93a7; font-size: 13px; line-height: 1.7; margin: 14px 0 16px; }
.bp-field { font-size: 12px; color: #8b93a7; margin: 10px 0 6px; }
.bp-input { height: 34px; border-radius: 10px; background: #151a23; border: 1px solid #232936; }
.bp-btn {
  margin-top: 16px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
  background: linear-gradient(135deg, #ff7a1a, #ff4d1a);
}

.switch { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); }

.dialog-mask {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0, 0, 0, .65);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}

.dialog {
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}

.dialog h3 { margin: 0 0 16px; font-size: 16px; }
.ud-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

@media (max-width: 560px) {
  .ud-grid { grid-template-columns: 1fr; }
}

/* 大图查看 */
.viewer { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .92); display: flex; flex-direction: column; padding: 16px; }
.viewer .viewer-img { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .viewer-bar { display: flex; align-items: center; gap: 10px; padding-top: 10px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }

/* 目录选择器 */
.dir-list { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.dir-row { display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: 13.5px; }
.dir-row:last-child { border-bottom: 0; }
.dir-row:hover { background: rgba(255, 138, 40, .12); }
.dir-row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-empty { padding: 18px 12px; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 860px) {
  .admin-body { flex-direction: column; }
  .sidebar { width: 100%; flex: 0 0 auto; max-height: 190px; border-right: 0; border-bottom: 1px solid var(--line); }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
}
/* 后台：备注常用词编辑 */
.tip-edit-list { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.tip-row { display: flex; align-items: center; gap: 6px; }
.tip-row .input { width: 138px; padding: 7px 9px; }
.tip-row .btn { padding: 7px 10px; font-size: 12.5px; }

/* ---------- 登录页：项目人员信息采集入口（独立入口框） ---------- */
.entry-box {
  width: 100%;
  max-width: 400px;
  margin-top: 14px;
}
.id-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 122, 26, .55);
  background: rgba(255, 122, 26, .06);
  text-decoration: none;
  color: var(--text);
  transition: background .15s, border-color .15s;
}
.id-entry:hover { background: rgba(255, 122, 26, .14); border-color: var(--accent); }
.entry-title { font-size: 15px; font-weight: 700; }
.entry-sub { flex: 1; font-size: 11.5px; color: var(--muted); }
.entry-go { font-size: 13px; color: var(--accent); white-space: nowrap; }
/* ---------- 后台「人员分组」管理 ---------- */
.tg-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.tgroup { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(255, 255, 255, .02); }
.tg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tg-head b { font-size: 13.5px; color: #e9eff7; }
.tg-count { font-size: 12px; color: var(--muted); }
.tg-input { width: 190px; padding: 6px 9px; font-size: 12.5px; }
.tg-body { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tg-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 10px; border-radius: 14px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  font-size: 12.5px; color: #dbe4ef;
}
.tg-chip button {
  border: none; background: rgba(0, 0, 0, .25); color: #ff9a9a; cursor: pointer;
  width: 17px; height: 17px; border-radius: 50%; line-height: 1; font-size: 12px; padding: 0;
}
.tg-chip button:hover { background: rgba(255, 90, 90, .35); color: #fff; }
.tg-empty { font-size: 12.5px; color: var(--muted); }

.tg-chip .tg-edit { color: #9ec5ff; }
.tg-chip .tg-edit:hover { background: rgba(120, 170, 255, .35); color: #fff; }