/* 手机端现场采集 */
:root {
  --brand: #1b6fb3;
  --brand2: #3ea6ff;
  --ink: #1f2d3d;
  --mut: #7c8b9c;
  --line: #e3e9f0;
  --bg: #f2f5f9;
  --ok: #0f8f4d;
  --warn: #d9822b;
  --bad: #d9363e;
  --barh: 46px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

/* 顶栏 */
.mh {
  position: sticky; top: 0; z-index: 20; height: 52px;
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
  background: linear-gradient(135deg, #0e2c47, #144a72); color: #fff;
}
.mh b { font-size: 16px; letter-spacing: .5px; }
.mh .tag { font-size: 11px; background: rgba(255, 255, 255, .16); border-radius: 9px; padding: 2px 7px; }
.mh .who { margin-left: auto; font-size: 12.5px; opacity: .9; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 页签 */
.tabs {
  position: sticky; top: 52px; z-index: 19; display: flex; gap: 8px;
  padding: 9px 12px; background: #fff; border-bottom: 1px solid var(--line);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tabs a {
  flex: none; padding: 7px 14px; border-radius: 18px; font-size: 14px;
  color: #5b7086; background: #f2f6fa; border: 1px solid var(--line); text-decoration: none;
}
.tabs a.on { color: #fff; background: var(--brand); border-color: var(--brand); font-weight: 600; }

/* 表单 */
.form { padding: 12px 12px 4px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px 12px; margin-bottom: 12px; }
.card h3 { font-size: 13px; color: #93a3b3; font-weight: 500; margin: 12px 0 4px; display: flex; align-items: center; gap: 6px; }
.card h3 i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f2f5f9; }
.row:last-child { border-bottom: 0; }
.row > label { flex: none; width: 84px; font-size: 14px; color: #4a5c6e; }
.row > label em { color: var(--bad); font-style: normal; margin-left: 2px; }
.row .ctl { flex: 1; min-width: 0; }
.row.hide { display: none; }
input[type=text], input[type=number], input[type=tel], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe;
  padding: 10px 11px; font-size: 16px; color: var(--ink); font-family: inherit; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand2); background: #fff; box-shadow: 0 0 0 3px rgba(62, 166, 255, .12); }
textarea { min-height: 74px; resize: vertical; }
select { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #9aa9b7 50%), linear-gradient(135deg, #9aa9b7 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.hint { font-size: 12px; color: #9aa9b7; margin-top: 4px; line-height: 1.5; }
.hint b { color: var(--brand); font-weight: 500; }

/* 地物类型 + 图标 */
.type-pick { display: flex; align-items: center; gap: 10px; }
.type-ic { width: 34px; height: 34px; flex: none; }
.type-ic svg { display: block; width: 34px; height: 34px; }

/* 定位 */
.gps { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gps input { flex: 1; min-width: 90px; }
.gps .btn { flex: none; }
.coord { display: flex; gap: 8px; }
.coord label { flex: 1; font-size: 12px; color: #9aa9b7; }
.coord input { margin-top: 3px; }
.gps-state { font-size: 12px; color: var(--mut); margin-top: 5px; }
.gps-state.ok { color: var(--ok); }
.gps-state.bad { color: var(--bad); }

/* 照片 */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph { position: relative; padding-top: 100%; border-radius: 9px; overflow: hidden; background: #f2f6fa; border: 1px dashed #cfd9e4; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph .del { position: absolute; top: -1px; right: -1px; width: 22px; height: 22px; line-height: 20px; text-align: center; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 0 0 0 8px; font-size: 14px; cursor: pointer; }
.ph.add { display: flex; align-items: center; justify-content: center; border-style: dashed; cursor: pointer; }
.ph.add span { position: absolute; font-size: 26px; color: #9fb0c2; line-height: 1; }
.ph.add em { position: absolute; bottom: 8px; font-size: 11px; color: #9fb0c2; font-style: normal; }
.ph input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }

/* 底部条 */
.foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(16, 38, 63, .07);
}
.foot .stat { font-size: 12px; color: var(--mut); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn { border: none; border-radius: 10px; padding: 12px 18px; font-size: 15px; font-family: inherit; cursor: pointer; }
.btn.primary { background: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(27, 111, 179, .28); }
.btn.primary:active { background: #1663a3; }
.btn.ghost { background: #f2f6fa; color: #5b7086; border: 1px solid var(--line); padding: 11px 14px; font-size: 14px; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* 最近提交 */
.recent { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 0 12px 12px; overflow: hidden; }
.recent h4 { margin: 0; padding: 11px 14px; font-size: 13px; color: #4a5c6e; border-bottom: 1px solid #f2f5f9; display: flex; align-items: center; }
.recent h4 span { margin-left: auto; font-weight: 400; color: #9aa9b7; font-size: 12px; }
.rc { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #f7f9fc; }
.rc:last-child { border-bottom: 0; }
.rc .k { flex: none; font-size: 11px; color: var(--brand); background: #eaf3fd; border-radius: 6px; padding: 2px 6px; }
.rc .t { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc .d { flex: none; font-size: 11.5px; color: #9aa9b7; }
.empty { padding: 18px 14px; text-align: center; color: #9aa9b7; font-size: 13px; }

/* 提示 */
.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(10px);
  background: rgba(24, 38, 54, .92); color: #fff; font-size: 13.5px; padding: 10px 16px; border-radius: 20px;
  max-width: 84vw; text-align: center; opacity: 0; pointer-events: none; transition: .18s; z-index: 50;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 登录 */
.login {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.login[hidden] { display: none; }
.login .box { width: 100%; max-width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 18px; }
.login h2 { margin: 0 0 4px; font-size: 18px; }
.login p { margin: 0 0 16px; font-size: 12.5px; color: var(--mut); }
.login .row { border: 0; padding: 6px 0; display: block; }
.login .row > label { width: auto; display: block; margin-bottom: 5px; font-size: 13px; }
.login .cap { display: flex; gap: 8px; }
.login .cap img { width: 108px; height: 42px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.login .btn { width: 100%; margin-top: 12px; }

/* 校验与审核状态 */
.ferr { display: none; color: var(--bad); font-size: 12px; margin-top: 4px; }
.ferr.on { display: block; }
.row.bad input, .row.bad select, .row.bad textarea { border-color: #f0b4b7; background: #fff7f7; }
.rc .badge { flex: none; font-size: 11px; border-radius: 6px; padding: 2px 7px; }
.rc .badge.wait { background: #fff4e5; color: #d9822b; }
.rc .badge.ok { background: #e8f6ee; color: #0f8f4d; }
.rc .badge.bad { background: #fdecec; color: #d9363e; }
.rc .code { font-style: normal; font-size: 11px; color: #8c9cad; }
/* 入库通知 */
.notice {
  margin: 10px 12px 0; padding: 10px 12px; border-radius: 10px;
  background: #e8f6ee; border: 1px solid #bfe6cf; color: #0f6b3c;
  font-size: 13px; display: flex; align-items: center; gap: 8px;
}
.notice[hidden] { display: none; }
.notice span { flex: 1; min-width: 0; }
.notice a { flex: none; color: #0f8f4d; font-weight: 600; text-decoration: none; }