* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue: #2563eb;
  --blue-d: #1d4ed8;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dfe6f0;
  --bg: #eef1f6;
  --card: #ffffff;
  --good: #10b981;
  --bad: #dc2626;
  --radius: 14px;
}
/* min-height（不是 height）：height:100% 会把页面锁成一屏高，内容溢出后 #topbar 的 sticky 整体失效，
   顶栏会跟着滚走（实测滚到底时跑到屏幕上方 3944px 外）。改成 min-height 后顶栏一直吸在顶部，页面总高不变。 */
html, body { min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
.hidden { display: none !important; }
.sp { flex: 1; }
.good { color: var(--good); }
.muted { color: var(--muted); font-size: 13px; }
code { background: #eef4ff; color: var(--blue-d); padding: 1px 5px; border-radius: 5px; font-size: .92em; }

/* ---------- 启动 ---------- */
.boot {
  position: fixed; inset: 0; background: var(--bg); z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--muted); font-size: 14px;
}
.boot-spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #cbd5e1; border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 150;
  display: flex; align-items: center; justify-content: center;
}
.maskbox {
  background: #fff; border-radius: 16px; padding: 26px 34px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 14px; color: var(--muted);
}
.maskbox .boot-spin { width: 28px; height: 28px; }

/* ---------- 顶栏（两行：上行＝图标+标题+唯一按钮；下行＝密码/退出/身份） ----------
   字号刻意收小一档（高老板 2026-10-11 深夜定：不溢出但偏大也不好看）；
   标题仍按字数挂 fs2/fs3/fs4 再降一档，长工地名不会把按钮挤出去 */
.topbar { position: sticky; top: 0; z-index: 60; background: var(--blue); color: #fff; padding: 9px 16px 10px; }
.tb-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-row1 { margin-bottom: 6px; }
.tb-row2 { gap: 14px; }
.logo { font-size: 21px; flex: 0 0 auto; line-height: 1.1; }
/* 文字块都要能收缩，否则长工地名/长称呼会把按钮挤走 */
.tb-title { font-size: 24px; font-weight: 800; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.topbar.fs2 .logo { font-size: 19px; } .topbar.fs2 .tb-title { font-size: 21px; }
.topbar.fs3 .logo { font-size: 17px; } .topbar.fs3 .tb-title { font-size: 19px; }
.topbar.fs4 .logo { font-size: 16px; } .topbar.fs4 .tb-title { font-size: 17px; }
/* 身份（项目经理端 · 138****1147）：纯文字，和旁边「密码/退出」一样大，没有胶囊底 */
.tb-who {
  flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 700; color: #fff; opacity: .95;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3;
}
.tb-who:empty { display: none; }
/* 纯文字动作（密码 / 退出）：只有字能点，没有任何按钮样子 */
.tlink {
  border: none; background: none; font: inherit; font-size: 14px; font-weight: 700; color: #fff;
  opacity: .95; cursor: pointer; padding: 2px 0; white-space: nowrap; flex: 0 0 auto; line-height: 1.3;
}
.tlink:active { opacity: .55; }
/* 顶栏里唯一的按钮（管理端 / 切换工地）：整条顶栏就它带底色，动作最突出 */
.tbtn {
  border: none; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; white-space: nowrap;
  background: rgba(255,255,255,.24); color: #fff; padding: 7px 14px; border-radius: 999px;
  flex: 0 0 auto; margin-left: auto; line-height: 1.3;
  box-shadow: 0 1px 3px rgba(15,23,42,.12);
}
.tbtn:active { background: rgba(255,255,255,.36); }
/* 标题缩小时按钮跟着缩，别把标题挤没 */
.topbar.fs2 .tbtn { font-size: 14px; padding: 6px 12px; }
.topbar.fs3 .tbtn { font-size: 13px; padding: 6px 11px; }
.topbar.fs4 .tbtn { font-size: 12.5px; padding: 5px 10px; }

/* ---------- 布局 ---------- */
#views { padding-bottom: 96px; }
.pad { max-width: 560px; margin: 0 auto; padding: 16px; }
.pad.wide { max-width: 1180px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px;
}
.card h3 { font-size: 16px; margin-bottom: 5px; }
.card.warn { border-color: #fecaca; background: #fff7f7; }
.card.warn h3 { color: var(--bad); }

.login-head { text-align: center; padding: 26px 0 20px; }
.login-logo {
  width: 60px; height: 60px; border-radius: 17px; background: var(--blue); color: #fff;
  font-size: 29px; display: flex; align-items: center; justify-content: center; margin: 0 auto 13px;
}
.login-head h2 { font-size: 21px; }
.login-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* ---------- 表单 ---------- */
.seg { display: flex; background: #f1f5f9; border-radius: 11px; padding: 3px; margin-bottom: 16px; }
.seg button {
  flex: 1; border: none; background: transparent; font: inherit; font-size: 14px; font-weight: 700;
  color: var(--muted); padding: 8px; border-radius: 9px; cursor: pointer;
}
.seg button.on { background: #fff; color: var(--blue); box-shadow: 0 1px 4px rgba(15,23,42,.09); }

.fld { display: block; margin-bottom: 13px; }
.fld span { display: block; font-size: 12.5px; font-weight: 700; color: #475569; margin-bottom: 5px; }
input, select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 13px;
  font: inherit; font-size: 15px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: none; border-color: var(--blue); }
.fld-err { color: var(--bad); font-size: 12.5px; min-height: 18px; margin: -8px 0 8px; }
.row { display: flex; gap: 9px; margin-bottom: 13px; }
.row input { flex: 1; }
.row .btn { width: auto; flex: 0 0 auto; white-space: nowrap; padding: 11px 15px; font-size: 14px; }

.btn {
  border: none; font: inherit; font-weight: 800; font-size: 15.5px; border-radius: 12px;
  padding: 13px 18px; cursor: pointer; width: 100%; transition: .15s;
}
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:active { background: var(--blue-d); }
.btn.ghost { background: #fff; color: var(--blue); border: 1.5px solid #bcd2f7; }
.btn.wechat { background: #07c160; color: #fff; }
.btn:disabled { background: #cbd5e1 !important; color: #f8fafc !important; cursor: not-allowed; border-color: #cbd5e1 !important; }
.or { text-align: center; margin: 15px 0; position: relative; }
.or::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.or span { position: relative; background: #fff; padding: 0 10px; color: #94a3b8; font-size: 12px; }
.tip { font-size: 12px; color: #94a3b8; text-align: center; margin-top: 8px; }
.err { color: var(--bad); font-size: 13px; min-height: 20px; margin-top: 10px; }

/* ---------- 上传 ---------- */
.upload-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; }
.upload-head h2 { font-size: 19px; }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 14px; }
.pickbtn {
  background: #fff; border: 1.5px dashed #bcd2f7; border-radius: 15px; cursor: pointer;
  padding: 20px 6px; font: inherit; color: var(--blue-d); display: flex; flex-direction: column;
  align-items: center; gap: 6px; font-weight: 800; font-size: 14px;
}
.pickbtn:active { background: #eff6ff; border-color: var(--blue); }
.pickbtn .ic { font-size: 28px; line-height: 1; }
.hint {
  font-size: 12.5px; color: var(--muted); background: #eef4ff; border-radius: 10px;
  padding: 9px 12px; margin-bottom: 14px;
}
.hint b { color: var(--blue-d); }
.sechead {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 9px;
}
.linkbtn { border: none; background: none; font: inherit; font-size: 13px; color: var(--blue); cursor: pointer; font-weight: 700; }

/* 页面顶部那条「左边控制、右边返回」的行：返回按钮贴右，省下一整行高度 */
.navrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.navrow .nl { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* 返回类按钮：短款大按钮（浅蓝底 + 蓝边 + 蓝粗字）。以前只有那几个字能点，现在整条都能点 */
.backbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 10px 16px; border-radius: 11px;
  background: #e8effd; color: var(--blue-d); border: 1.5px solid #a9c4f7;
  font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(15,23,42,.07); flex: 0 0 auto;
}
.backbtn:active { background: #d6e4fc; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(5, 1fr); } }
.cell { position: relative; border-radius: 11px; overflow: hidden; background: #e2e8f0; aspect-ratio: 1; }
.cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cell .del {
  position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(15,23,42,.68); color: #fff; font-size: 13px; font-weight: 800; border: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer; line-height: 1;
}
.cell .tag {
  position: absolute; left: 4px; top: 4px; font-size: 9.5px; font-weight: 800;
  background: rgba(15,23,42,.6); color: #fff; border-radius: 5px; padding: 1px 6px;
}
.cell .tag.ok { background: rgba(16,185,129,.92); }
.cell .nm {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 9.5px; color: #fff;
  background: linear-gradient(transparent, rgba(15,23,42,.82)); padding: 9px 4px 3px;
  text-align: center; font-family: ui-monospace, Consolas, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.empty { text-align: center; color: #94a3b8; font-size: 13.5px; padding: 40px 0; }
.empty span { font-size: 12px; }

/* ---------- 工地管理（老板端） ---------- */
.pm-card { padding: 15px 16px; }
.pm-top { display: flex; align-items: center; gap: 9px; }
/* 工地排序手柄：↑↓ 挪一格（顺序决定施工员端「我的工地」的先后） */
.pm-mv { flex: 0 0 auto; display: flex; gap: 3px; }
.pm-mv .mvbtn { width: 30px; padding: 5px 0; text-align: center; font-size: 13px; line-height: 1; }
.pm-mv .mvbtn:disabled { opacity: .32; }
.pm-name { font-size: 16px; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.pm-badge {
  flex: 0 0 auto; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
}
.pm-badge.on { background: #e8f2ff; color: var(--blue); }
.pm-badge.off { background: #eef1f6; color: #64748b; }
.pm-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pm-acts .mini { padding: 8px 13px; font-size: 13px; }

.mini.danger { color: #b91c1c; border-color: #fecaca; background: #fff7f7; }
.mini.danger:active { background: #fee2e2; }
.mini:disabled { opacity: .45; cursor: not-allowed; background: #f6f8fb; color: #94a3b8; border-color: var(--line); }
.pm-note { font-size: 12px; color: #94a3b8; margin-top: 10px; line-height: 1.6; }
.popup-actions { margin-top: 18px; }
.tabs { display: flex; gap: 7px; }
.tab {
  border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13.5px; font-weight: 700;
  color: var(--muted); padding: 7px 16px; border-radius: 999px; cursor: pointer;
}
.tab.on { background: var(--blue); border-color: var(--blue); color: #fff; }

.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #fff;
  border-top: 1px solid #e5eaf3; padding: 12px 16px 16px;
  box-shadow: 0 -6px 22px rgba(15,23,42,.07);
}
.bottombar .sum {
  display: flex; justify-content: space-between; font-size: 13px; color: #475569;
  margin-bottom: 9px; max-width: 560px; margin-left: auto; margin-right: auto;
}
.bottombar .sum b { color: var(--ink); }
.bottombar .btn { max-width: 560px; display: block; margin: 0 auto; }

/* ---------- 进度 ---------- */
.ring { text-align: center; padding: 26px 0 6px; }
.ring-num { font-size: 44px; font-weight: 800; color: var(--blue); letter-spacing: -.03em; }
.ring-lb { font-size: 13.5px; color: var(--muted); }
.bar { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin: 16px 0 20px; }
.bar > i { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .3s; }
.uplist { display: flex; flex-direction: column; gap: 8px; }
.uprow {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e8eef8;
  border-radius: 11px; padding: 8px 11px;
}
.uprow img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex: 0 0 38px; }
.uprow .info { flex: 1; min-width: 0; }
.uprow .fn { font-size: 12px; font-weight: 700; font-family: ui-monospace, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uprow .meta { font-size: 10.5px; color: #94a3b8; }
.uprow .st { font-size: 11.5px; font-weight: 800; flex: 0 0 auto; color: #cbd5e1; }
.uprow .st.ing { color: var(--blue); }
.uprow .st.ok { color: var(--good); }
.uprow .st.fail { color: var(--bad); }
.uprow .st.skip { color: #B45309; }
.prog-actions { margin-top: 20px; }

/* ---------- 我上传的 ---------- */
.bar2 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.daygroup { margin-bottom: 20px; }
.daygroup.closed { margin-bottom: 9px; }   /* 收起的天只有一行，不用留那么大的空 */
.dayhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.dayhead .d { font-size: 15px; font-weight: 800; }
.dayhead .c { font-size: 12.5px; color: #94a3b8; }

/* ---------- 列表按天折叠（v20261016e） ---------- */
/* 折叠栏整行可点：点一下展开／收起那天。桌面有 hover、手机有按下的反馈，
   div 而不是 button 是因为管理端栏里还要塞「全选这天 / 下载这天」两个真按钮（按钮不能套按钮）。 */
.dayhead.fold {
  cursor: pointer; user-select: none; margin: 0 0 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 11px; background: #f8fafc;
  transition: background .14s, border-color .14s;
}
.dayhead.fold:hover { background: #f1f5f9; border-color: #cbd5e1; }
.dayhead.fold:active { background: #e2e8f0; }
.dayhead.fold:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.dayhead.fold.on { background: #fff; border-color: #dbe3ec; }
.dayhead .caret { display: inline-block; font-size: 11px; color: #94a3b8; transition: transform .16s; }
.dayhead.fold.on .caret { transform: rotate(90deg); color: var(--blue); }
/* 折叠栏右侧：告诉用户这一行能点（v20261016g）——展开的日子写「点击折叠」，收起的写「点击展开」 */
.dayhead .foldhint { margin-left: auto; font-size: 12px; color: #94a3b8; white-space: nowrap; }
/* 「全选这天 / 下载这天」：v20261016g 起挪出折叠栏、单独一行左对齐 —— 这两个按钮不常用，
   留在栏里会跟「点栏开合」抢位置，容易误点到下载 */
.dayacts { display: flex; gap: 7px; margin: 7px 0 8px 2px; }
/* 上传者头像组：只画姓氏首字，纯文字不占流量 —— 让经理一眼看出这几天谁在干活、谁好几天没传 */
.dayhead .avs { display: inline-flex; align-items: center; }
.dayhead .avs .av {
  width: 22px; height: 22px; margin-left: -6px; border: 2px solid #f8fafc; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-style: normal; font-weight: 700; color: #fff; background: #94a3b8;
}
.dayhead.fold.on .avs .av { border-color: #fff; }
.dayhead .avs .av:first-child { margin-left: 0; }
.dayhead .avs .av:nth-child(2) { background: #60a5fa; }
.dayhead .avs .av:nth-child(3) { background: #34d399; }
.dayhead .avs .av:nth-child(4) { background: #fbbf24; }
.dayhead .avs .av.more { background: #e2e8f0; color: #64748b; }
/* 展开的那天超过 30 张时，底下那行「展开全部 N 张」 */
.morebtn {
  display: block; width: 100%; margin-top: 10px; padding: 9px; cursor: pointer;
  border: 1px dashed var(--line); border-radius: 10px; background: #fff; color: var(--blue);
  font: inherit; font-size: 13.5px; font-weight: 700;
}
.morebtn:hover { background: #f8fafc; }
.morebtn:active { background: #eff6ff; }

/* ---------- 管理端 ---------- */
.adm-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 13px; }
.adm-head .adm-tabs { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
.adm-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 13px; }
.adm-tabs .tb {
  border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13.5px; font-weight: 700;
  color: #475569; padding: 7px 16px; border-radius: 999px; cursor: pointer;
}
.adm-tabs .tb.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.adm-tools { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.mini {
  border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13.5px; color: #475569;
  padding: 8px 12px; border-radius: 10px; cursor: pointer; width: auto;
}
/* 「＋ 上传照片」：占原来「搜文件名」的位置。这是列表页最常用的动作，所以做成主色按钮 */
#btnAdmUpload { flex: 0 0 auto; background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
#btnAdmUpload:active { background: var(--blue-d); border-color: var(--blue-d); }
#btnAdmUpload.disabled { background: #f1f5f9; border-color: var(--line); color: #94a3b8; }
#admDate { flex: 0 0 auto; }
.adm-stat {
  font-size: 13px; color: var(--muted); background: #f8fafd; border: 1px solid var(--line);
  border-radius: 11px; padding: 10px 14px; margin-bottom: 14px; display: flex; gap: 18px; flex-wrap: wrap;
}
.adm-stat b { color: var(--ink); }
.masonry { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 9px; }
.ph { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; cursor: pointer; background: #e2e8f0; transition: .15s; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15,23,42,.16); }
.ph .fn {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; color: #fff;
  background: linear-gradient(transparent, rgba(15,23,42,.84)); padding: 10px 5px 4px;
  text-align: center; font-family: ui-monospace, Consolas, monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ph .ck {
  position: absolute; right: 5px; top: 5px; width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid rgba(255,255,255,.92); background: rgba(15,23,42,.34);
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; font-weight: 800;
}
.ph.sel { outline: 3px solid var(--blue); outline-offset: -3px; }
.ph.sel .ck { background: var(--blue); border-color: var(--blue); }
.ph .who {
  position: absolute; left: 4px; top: 4px; font-size: 9.5px; font-weight: 800;
  background: rgba(15,23,42,.62); color: #fff; border-radius: 5px; padding: 1px 6px;
}
.actbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #fff;
  border-top: 1px solid #e5eaf3; padding: 12px 16px 16px; display: flex; align-items: center; gap: 11px;
  box-shadow: 0 -6px 22px rgba(15,23,42,.07);
}
.actbar > span { font-size: 14px; font-weight: 700; }
.solid {
  border: none; font: inherit; font-weight: 800; font-size: 14px; border-radius: 11px;
  padding: 11px 20px; cursor: pointer; background: var(--blue); color: #fff;
}
.solid.gray { background: #f1f5f9; color: var(--muted); }
/* 底部操作条上的「删除选中」：红字红底（危险操作，别和分享/下载混在一起看不清） */
.solid.danger { background: #fee2e2; color: #b91c1c; }

/* ---------- 选中照片：底部操作条 + 分享 ---------- */
/* 手机上按钮平分剩余宽度，四五个按钮也不会挤出屏幕 */
.actbar { gap: 8px; }
.actbar > span { flex: 0 0 auto; }
.actbar .solid { flex: 1 1 0; padding: 10px 8px; font-size: 13px; white-space: nowrap; }
.bar2-r { display: flex; align-items: center; gap: 10px; }
/* 施工员照片页：进入「选择」后格子右上出现勾选圈（沿用老板端那套观感） */
.cell .ck {
  position: absolute; right: 4px; top: 4px; width: 21px; height: 21px; border-radius: 7px;
  border: 2px solid rgba(255,255,255,.92); background: rgba(15,23,42,.34);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; font-weight: 800;
}
.cell.sel { outline: 3px solid var(--blue); outline-offset: -3px; }
.cell.sel .ck { background: var(--blue); border-color: var(--blue); }
.cell[data-msel] { cursor: pointer; }
.cell[data-msel]:active { transform: scale(.97); }
.cell[data-msel]:hover img { opacity: .88; }

/* ---------- 项目经理端首页：工地信息统计 ---------- */
/* 多个工地时的切换胶囊（只有一个工地时整块隐藏） */
.pick-site { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 13px; }
.pick-site .tb {
  border: 1.5px solid var(--line); background: #fff; color: #475569; font: inherit;
  font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 999px; cursor: pointer;
}
.pick-site .tb.on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* 工地名称大卡：一行 = 「当前工地」小标签 + 工地名 + 使用中徽标；📢 靠右 */
.site-hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-d) 100%);
  border-radius: var(--radius); padding: 17px 20px; color: #fff; margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(37,99,235,.22);
}
.site-hero .sh-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.site-hero .sh-lb { font-size: 12.5px; opacity: .85; font-weight: 700; letter-spacing: .04em; flex: 0 0 auto; }
.site-hero .sh-name { font-size: 21px; font-weight: 800; line-height: 1.35; min-width: 0; flex: 0 1 auto; word-break: break-all; }
.site-hero .sh-name .sh-badge {
  display: inline-block; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.22);
  padding: 3px 10px; border-radius: 999px; margin-left: 8px; vertical-align: 3px;
}
/* 工地名旁边的 📢 圆钮：靠右，落在「使用中」与卡片右边界之间；只有老板（并且选了具体工地）看得见 */
.sh-note-btn {
  border: none; cursor: pointer; flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 50%; margin-left: auto; margin-right: 22px;
  background: rgba(255,255,255,.24); color: #fff; font-size: 17px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.sh-note-btn:active { background: rgba(255,255,255,.4); }

/* 统计方块 */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 14px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px 14px; position: relative; overflow: hidden;
}
.stat .st-lb { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.stat .st-num { font-size: 30px; font-weight: 800; line-height: 1.25; margin-top: 3px; letter-spacing: -.01em; }
.stat .st-num .u { font-size: 14px; font-weight: 700; color: var(--muted); margin-left: 3px; }
.stat .st-sub { font-size: 12px; color: #94a3b8; margin-top: 2px; }
/* 中国习惯：涨红、跌绿 */
.stat .st-num.up { color: var(--bad); }
.stat .st-num.down { color: var(--good); }
.stat .st-num.flat { color: var(--ink); }
.stat.total { border-left: 4px solid var(--blue); }
.stat.delta { border-left: 4px solid var(--bad); }
.stat.delta.is-flat { border-left-color: #cbd5e1; }
.stat.delta.is-down { border-left-color: var(--good); }
.stat .ic { position: absolute; right: 12px; top: 10px; font-size: 21px; opacity: .16; }

/* 本工地的人 */
.sec-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.sec-h h3 { font-size: 15.5px; }
.sec-h .cnt {
  font-size: 12px; font-weight: 800; color: var(--blue); background: #e8f2ff;
  padding: 3px 10px; border-radius: 999px;
}
.mem-list { margin-top: 4px; }
/* 人员通讯录：工地分组卡里的小字说明 + 复制按钮 */
.grp-sub { font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.mem .mi-num .mini { padding: 7px 12px; font-size: 12.5px; }
.mem { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.mem:last-child { border-bottom: none; padding-bottom: 2px; }
.mem .av {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff; background: var(--blue);
}
.mem .av.g2 { background: #7c3aed; }
.mem .av.g3 { background: #0891b2; }
.mem .av.g4 { background: #db2777; }
.mem .mi { flex: 1 1 auto; min-width: 0; }
.mem .mi-name { font-size: 14.5px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.mem .mi-name .tagme {
  font-size: 10px; font-weight: 800; background: #e8f2ff; color: var(--blue);
  padding: 2px 7px; border-radius: 999px;
}
.mem .mi-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
/* 通讯录：登录时间单独一行（以前和账号挤在一起容易看漏） */
.mem .mi-login { font-size: 11.5px; color: #7c8f85; margin-top: 2px; }
.mem .mi-login b { color: var(--blue); }
.mem .mi-num { flex: 0 0 auto; text-align: right; }
.mem .mi-num b { font-size: 17px; font-weight: 800; color: var(--ink); }
.mem .mi-num span { font-size: 11.5px; color: var(--muted); display: block; margin-top: -3px; }

/* 空状态 + 底部入口 */
.empty-soft { text-align: center; color: #94a3b8; font-size: 13.5px; padding: 22px 0; }
.empty-soft .big { font-size: 26px; display: block; margin-bottom: 6px; opacity: .55; }
.page-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 4px; }
.pa-btn {
  border: none; font: inherit; font-size: 14.5px; font-weight: 800; border-radius: 12px;
  padding: 13px 10px; cursor: pointer; width: 100%; transition: .15s;
}
.pa-btn.pri { background: var(--blue); color: #fff; }
.pa-btn.pri:active { background: var(--blue-d); }
.pa-btn.gho { background: #fff; color: var(--blue); border: 1.5px solid #bcd2f7; }

/* ---------- 大图 ---------- */
.lb { position: fixed; inset: 0; background: rgba(15,23,42,.88); z-index: 120; display: flex; align-items: center; justify-content: center; padding: 18px; }
.lb-box { background: #fff; border-radius: 16px; overflow: hidden; max-width: 940px; width: 100%; display: flex; flex-direction: column; max-height: 94vh; }
.lb-imgwrap { background: #0f172a; position: relative; display: flex; align-items: center; justify-content: center; min-height: 200px; overflow: hidden; touch-action: none; }
/* touch-action:none 是关键一步 —— 不让浏览器把双指当成"整页缩放/下拉刷新"抢走，
   否则 iOS 上捏合会连带整页一起放大；缩放平移全部由 app.js 的 initLbZoom() 自己处理 */
.lb-imgwrap img { max-width: 100%; max-height: 66vh; display: block; transform-origin: 50% 50%; user-select: none; -webkit-user-drag: none; }
.lb-imgwrap.zoomed { cursor: grab; }
.lb-imgwrap.dragging { cursor: grabbing; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.92); border: none; cursor: pointer; font-size: 20px; font-weight: 800;
  color: var(--ink); display: flex; align-items: center; justify-content: center;
}
.lb-nav.l { left: 12px; }
.lb-nav.r { right: 12px; }
.lb-info { padding: 14px 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lb-fn { font-family: ui-monospace, Consolas, monospace; font-size: 15px; font-weight: 800; color: var(--blue-d); }
.lb-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.lb-btn { border: none; background: #f1f5f9; color: #475569; font: inherit; font-size: 13.5px; font-weight: 700; padding: 9px 16px; border-radius: 10px; cursor: pointer; }
.lb-btn.primary { background: var(--blue); color: #fff; }
/* 删除是危险操作：红字红底，和「下载 / 关闭」明显区分开，避免误点 */
.lb-btn.danger { background: #fee2e2; color: #b91c1c; }
.lb-btn.danger:active { background: #fecaca; }
/* 备注：跟删除并用一套浅底，但用蓝色区分「这是改名字，不是删东西」 */
.lb-btn.tag { background: #eaf3ff; color: var(--blue-d); }
.lb-btn.tag:active { background: #dbe9fe; }
.tag-preview {
  margin: 10px 0 0; font-size: 12.5px; color: var(--muted);
  font-family: ui-monospace, Consolas, monospace; word-break: break-all; line-height: 1.5;
}
.lb-note { font-size: 12.5px; color: #b45309; }
.lb-status {
  position: absolute; left: 0; right: 0; bottom: 10px; text-align: center;
  color: #e2e8f0; font-size: 13px; font-weight: 700; padding: 0 16px; pointer-events: none;
}

/* 可点开大图的缩略图：给出「能点」的视觉提示 */
.cell[data-open], .cell[data-pick] { cursor: pointer; }
.cell[data-open]:active, .cell[data-pick]:active { transform: scale(.97); }
.cell[data-open]:hover img, .cell[data-pick]:hover img { opacity: .88; }

/* ---------- 加入工地（分享链接） ---------- */
.join-proj { font-size: 14px; margin: 12px 0 6px; color: #334155; }
.join-proj b { color: var(--blue-d); font-size: 16.5px; font-weight: 800; }

/* ---------- 我的工地（一人多工地时选一个） ---------- */
.projlist { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.projcard {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid #e5eaf3; background: #fff; border-radius: 14px; padding: 16px;
  font: inherit; text-align: left; cursor: pointer;
}
.projcard:active { background: #f8fafc; }
.projcard .pc-name { font-size: 15px; font-weight: 800; color: #0f172a; }
/* 「进入上传」：带底纹的胶囊（和全站返回按钮同一套视觉），比纯文字醒目、好点 */
.projcard .pc-go {
  font-size: 14px; font-weight: 800; color: var(--blue); flex: 0 0 auto; white-space: nowrap;
  background: #e8effd; border: 1.5px solid #a9c4f7; border-radius: 999px; padding: 7px 13px; line-height: 1.2;
}
.projcard.pc2 { flex-direction: column; align-items: stretch; gap: 9px; }
.projcard.pc2 .pc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }

/* ---------- 公告条（施工员工地列表 + 工地信息页共用） ----------
   行距 --lh（老板定 1.5 倍 = 2.4）；换行后每行前面自动带一个 ▸ 小图标，
   第一行用自己选的类型图标（📢/🔔/⚠️…），不再重复加 ▸ */
.pcn {
  display: block; font-size: 13px; background: #f2fbf6; border: 1px solid #d9efe4;
  border-radius: 10px; padding: 9px 12px; text-align: left; word-break: break-word;
  color: #3f6b58; line-height: var(--lh, 2.4);
}
.pcn .nl-1 { display: block; font-weight: 800; }
.pcn .nl-i { display: block; padding-left: 15px; position: relative; }
.pcn .nl-i::before { content: "▸"; position: absolute; left: 1px; color: #7aa896; font-size: .9em; }

/* 工地信息页底部的公告区（放在「查看全部照片 ｜ 工地管理」下面） */
.sd-note { margin-top: 13px; }
.sd-note-h { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 800; color: #3f6b58; margin-bottom: 7px; }
.sd-note-h .mini { margin-left: auto; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 300;
  background: rgba(15,23,42,.93); color: #fff; padding: 11px 20px; border-radius: 11px;
  font-size: 14px; max-width: 86vw; text-align: center;
}

/* ---------- 工地管理页里的分享链接行 ---------- */
.share-row {
  margin-top: 11px; padding: 11px 12px;
  background: #f7faff; border: 1px solid #dbe6f8; border-radius: 12px;
}
.share-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.share-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share-url {
  flex: 1 1 200px; min-width: 0; margin: 0; padding: 9px 11px;
  background: #fff; border: 1px solid #dbe6f8; border-radius: 9px;
  font-family: ui-monospace, Consolas, monospace; font-size: 12.5px;
  color: var(--blue-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.share-copy { flex: 0 0 auto; background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 800; }
.share-copy:disabled { opacity: .45; cursor: not-allowed; background: #cbd5e1; border-color: #cbd5e1; color: #f8fafc; }

/* ---------- 二级分段（验证码登录里的 手机号 / 邮箱） ---------- */
.seg.sub { background: #fff; border: 1px solid var(--line); padding: 3px; margin-bottom: 14px; }
.seg.sub button { font-size: 13px; padding: 7px 0; }

/* ---------- 弹窗（设置登录密码） ---------- */
.modalbox {
  background: #fff; border-radius: 16px; padding: 22px 22px 18px;
  width: min(92vw, 390px); max-height: 88vh; overflow: auto; text-align: left;
}
.mb-title { font-size: 17px; margin-bottom: 6px; }
.mb-sub { font-size: 12.5px; color: var(--muted); line-height: 1.65; margin-bottom: 8px; word-break: break-all; }
#pwdWho { color: var(--blue-d); font-weight: 700; }
.mb-actions { display: flex; gap: 9px; margin-top: 6px; }
.mb-actions .btn { flex: 1; width: auto; padding: 12px 10px; font-size: 15px; }
/* 项目信息（公告栏）输入框：可写多行 */
.mb-area {
  width: 100%; border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 13px;
  font: inherit; font-size: 15px; line-height: 1.6; resize: vertical; min-height: 108px; color: var(--ink);
}
.mb-area:focus { outline: none; border-color: var(--blue); }
.mb-foot { display: flex; align-items: center; gap: 9px; margin-top: 6px; }
.mb-count { font-size: 11.5px; color: #94a3b8; font-variant-numeric: tabular-nums; }

/* 写公告时选的「图标」和「文字颜色」（点一下即生效，存进 note / note_color） */
.pick-lb { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 12px; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.icon-pick button {
  border: 1.5px solid var(--line); background: #fff; border-radius: 11px; padding: 7px 11px;
  font: inherit; font-size: 13px; font-weight: 700; color: #475569; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.icon-pick button.on { border-color: var(--blue); background: #eaf3ff; color: var(--blue-d); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.color-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.color-pick .cbtn {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px 5px 7px;
  font: inherit; font-size: 13px; font-weight: 700; color: #475569; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.color-pick .cbtn i { width: 15px; height: 15px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.color-pick .cbtn.on { border-color: var(--blue); background: #eaf3ff; color: var(--blue-d); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }

/* ---------- 绑定工地页：角色区分 ---------- */
.onb-owner-entry { text-align: center; margin: 18px 0 6px; }
.onb-owner-entry .linkbtn { font-size: 13px; color: var(--muted); font-weight: 600; }
.onb-owner-entry .linkbtn:hover { color: var(--blue); }
.role-note {
  margin: 12px 0 0; padding: 9px 12px; border-radius: 9px;
  background: #f1f5fb; color: var(--muted); font-size: 12.5px; line-height: 1.7;
}
.role-note b { color: var(--blue-d); }
.onb-notice {
  margin: 0 0 14px; padding: 12px 14px; border-radius: 11px;
  background: #fff7e6; border: 1px solid #ffe0a3; color: #8a5a00;
  font-size: 13px; line-height: 1.75;
}
#onbCreateCard .btn.ghost { margin-top: 10px; }

/* 版本号小字：登录页底部 + 工地照片页底部 */
.verline {
  margin: 18px 0 6px; text-align: center;
  color: var(--muted); font-size: 12px; letter-spacing: .3px; opacity: .75;
}
.verline .verNo { font-variant-numeric: tabular-nums; }

/* ---------- 从通讯录选人（弹层 + 已选标签） ---------- */
.pick-box { max-height: 86vh; overflow: hidden; display: flex; flex-direction: column; }
.pick-box #pickSearch {
  margin: 10px 0 2px; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; width: 100%;
}
.pick-list { overflow-y: auto; flex: 1; margin: 6px 0 8px; border-top: 1px solid var(--line); }
.pick-row { display: flex; align-items: center; gap: 11px; padding: 11px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick-row:active { background: #f4f7fb; }
.pick-row input[type=checkbox] { width: 19px; height: 19px; flex: none; accent-color: var(--blue); }
.pr-main { flex: 1; min-width: 0; }
.pr-name { font-size: 14.5px; }
.pr-sub { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row.off { opacity: .52; cursor: not-allowed; }
.pick-empty { padding: 20px 2px; color: var(--muted); font-size: 13px; text-align: center; }
.pick-box .mb-actions { align-items: center; }
.pick-box .mb-actions .btn { flex: none; width: auto; padding: 10px 18px; font-size: 14.5px; }

/* 新建工地卡片里的「从通讯录选人」 */
.pick-entry { margin: 2px 0 14px; }
.pick-entry .hint { margin-top: 7px; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  background: #eaf3ff; color: var(--blue-d); border-radius: 999px; font-size: 12.5px;
}
.chip .chip-x { cursor: pointer; opacity: .55; font-size: 15px; line-height: 1; }
.chip .chip-x:hover { opacity: 1; }
#joinNameField.locked input,
#joinPhoneField.locked input { background: #f1f5fb; color: var(--muted); }

/* ---------- 密码框的「👁 显示 / 隐藏」（登录 / 注册 / 改密码 / 重置密码共用） ---------- */
.pwd-wrap { position: relative; display: block; }
.pwd-wrap input { padding-right: 46px; }
.pwd-wrap .eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 34px; border: none; background: transparent; cursor: pointer;
  font-size: 17px; line-height: 1; color: #94a3b8; border-radius: 8px; padding: 0;
}
.pwd-wrap .eye:active { background: #eef2f7; }
.pwd-wrap .eye.on { color: var(--blue); }
.fld.locked .pwd-wrap input { background: #f1f5fb; color: var(--muted); }

/* ---------- 项目公告：多条编辑 ---------- */
.note-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.note-item { border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px 10px; background: #fbfcfe; }
.ni-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ni-no { font-size: 12px; font-weight: 700; color: var(--muted); }
.ni-del {
  margin-left: auto; border: none; background: transparent; font: inherit; font-size: 12.5px;
  color: #b91c1c; cursor: pointer; padding: 3px 6px; border-radius: 7px;
}
.ni-del:active { background: #fee2e2; }
.ni-icons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.ni-ic {
  width: 32px; height: 30px; border: 1.5px solid var(--line); background: #fff; border-radius: 9px;
  font-size: 15px; line-height: 1; cursor: pointer; padding: 0;
}
.ni-ic.on { border-color: var(--blue); background: #eaf3ff; box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.note-item .ni-text { min-height: 74px; font-size: 15px; }
.mini.wide { width: 100%; margin-top: 8px; }

/* 字号调节：A− 缩小 / A+ 放大 */
.size-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.size-val { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 项目里程碑（仅项目经理）：弹层输入 + 信息页时间线 */
.ms-in {
  width: 100%; border: 1.5px solid var(--line); border-radius: 11px; padding: 10px 13px;
  font: inherit; font-size: 15px; color: var(--ink); margin-top: 8px; background: #fff;
}
.ms-in:focus { outline: none; border-color: var(--blue); }
.mb-area.ms-rm { min-height: 62px; }
.ms-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ms-chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px;
  font: inherit; font-size: 13px; font-weight: 700; color: #475569; cursor: pointer;
}
.ms-chip:active { border-color: var(--blue); background: #eaf3ff; color: var(--blue-d); }
.ms-tip { margin: -2px 0 12px; }
.ms-item { display: flex; align-items: flex-start; gap: 11px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.ms-item:last-child { border-bottom: none; }
.ms-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); margin-top: 5px; box-shadow: 0 0 0 3px #eaf3ff; }
.ms-body { flex: 1; min-width: 0; }
.ms-line { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.ms-date { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ms-title { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.ms-remark { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; word-break: break-all; }
.ms-acts { flex: 0 0 auto; display: flex; gap: 2px; }
.ms-acts button { border: none; background: none; font: inherit; font-size: 14px; padding: 4px 6px; cursor: pointer; opacity: .55; border-radius: 8px; }
.ms-acts button:active { opacity: 1; background: #f1f5fb; }

/* 页面上的公告：多条时一段一块，中间一条虚线分开 */
.nb-item + .nb-item { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(122,168,150,.45); }
.pcn .nl-1 { font-size: 1.06em; }

/* 成员行里的 🔑（给某个施工员重置密码） */
.mem .mi-key { flex: 0 0 auto; padding: 6px 9px; font-size: 14px; }
