* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f6fa; color: #1b2330; font-size: 15px; line-height: 1.5;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f4f6fa; position: relative;
  display: flex; flex-direction: column; }
#view { padding-bottom: 72px; flex: 1 0 auto; }
#icp { flex: none; text-align: center; font-size: 12px; color: #9aa4b5; padding: 10px 12px calc(84px + env(safe-area-inset-bottom)); }
#icp a { color: #9aa4b5; text-decoration: none; }
#icp #ver { color: #b3bcc9; }
#icp .sep { margin: 0 6px; color: #cdd4de; }
.hidden { display: none !important; }

/* 顶部 */
.hd { background: linear-gradient(135deg, #2b6cf6, #1a56d6); color: #fff; padding: 20px 16px 28px; border-radius: 0 0 18px 18px; }
.hd h1 { margin: 0; font-size: 20px; font-weight: 600; }
.hd p { margin: 6px 0 0; font-size: 13px; opacity: .85; }
.hd .stat-row { display: flex; gap: 10px; margin-top: 16px; }
.hd .stat { flex: 1; background: rgba(255,255,255,.16); border-radius: 12px; padding: 10px 12px; }
.hd .stat b { display: block; font-size: 22px; line-height: 1.2; }
.hd .stat span { font-size: 12px; opacity: .85; }

/* 卡片 */
.card { background: #fff; margin: 12px; padding: 14px; border-radius: 14px; box-shadow: 0 2px 10px rgba(20,40,80,.06); }
.card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.muted { color: #8a94a6; font-size: 13px; }

/* 表单 */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: #5b6675; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=tel], input[type=month], input[type=search], textarea, select {
  width: 100%; padding: 11px 12px; border: 1px solid #dfe4ec; border-radius: 10px; font-size: 15px;
  background: #fff; color: #1b2330; outline: none; appearance: none;
}
textarea { min-height: 68px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #2b6cf6; }

.btn { display: block; width: 100%; padding: 13px; border: none; border-radius: 12px; font-size: 16px;
  background: #2b6cf6; color: #fff; font-weight: 600; }
.btn:active { background: #1a56d6; }
.btn.ghost { background: #fff; color: #2b6cf6; border: 1px solid #cddcfb; }
.btn.danger { background: #fff; color: #e0433a; border: 1px solid #f2c4c1; }
.btn.small { width: auto; padding: 7px 14px; font-size: 13px; border-radius: 8px; display: inline-block; }
.btn[disabled] { opacity: .55; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* 列表 */
.list { padding: 0 12px 8px; }
.item { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: 0 2px 10px rgba(20,40,80,.06); }
.item .t { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.item .name { font-weight: 600; font-size: 15px; }
.item .sub { font-size: 12px; color: #8a94a6; margin-top: 4px; }
.item .acts { margin-top: 10px; display: flex; gap: 8px; justify-content: flex-end; }
.tag { font-size: 12px; color: #2b6cf6; background: #eaf1ff; padding: 2px 8px; border-radius: 20px; }

/* 打卡 */
.picker { border: 1px solid #dfe4ec; border-radius: 10px; padding: 12px; background: #fff; display: flex; justify-content: space-between; align-items: center; }
.picker .ph { color: #9aa4b5; }
.thumb { width: 100%; border-radius: 10px; margin-top: 10px; display: block; }
.photo-box { border: 1px dashed #c3cfdf; border-radius: 12px; padding: 22px; text-align: center; color: #8a94a6; background: #fafbfe; }

/* 记录 */
.rec { display: flex; gap: 10px; }
.rec img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; background: #eef1f6; }
.rec .info { flex: 1; min-width: 0; }
.rec .info .nm { font-weight: 600; }
.rec .info .tm { font-size: 12px; color: #8a94a6; margin-top: 3px; }
.rec .del { align-self: center; color: #c0c7d2; font-size: 18px; padding: 0 4px; }

/* tabbar */
#tabbar { position: fixed; bottom: 0; left: 0; right: 0; max-width: 480px; margin: 0 auto; display: flex;
  background: #fff; border-top: 1px solid #e8ecf3; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
#tabbar .tab { flex: 1; text-align: center; color: #8a94a6; font-size: 11px; padding: 4px 0; text-decoration: none; }
#tabbar .tab .ico { display: block; font-size: 20px; line-height: 24px; }
#tabbar .tab.on { color: #2b6cf6; font-weight: 600; }

/* 登录 */
.login-wrap { padding: 40px 20px 20px; }
.login-wrap .logo { text-align: center; margin-bottom: 26px; }
.login-wrap .logo .cir { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(135deg,#2b6cf6,#1a56d6);
  color: #fff; font-size: 30px; line-height: 64px; margin: 0 auto 10px; }
.login-wrap .logo h2 { margin: 0; font-size: 19px; }
.login-wrap .logo p { margin: 4px 0 0; font-size: 13px; color: #8a94a6; }
.switch { text-align: center; margin-top: 14px; font-size: 14px; color: #2b6cf6; }

/* 我的 */
.me { background: linear-gradient(135deg,#2b6cf6,#1a56d6); color: #fff; padding: 22px 16px 30px; border-radius: 0 0 18px 18px;
  display: flex; align-items: center; gap: 14px; }
.me .av { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.22); font-size: 22px;
  line-height: 54px; text-align: center; font-weight: 600; }
.me .nm { font-size: 18px; font-weight: 600; }
.me .ac { font-size: 13px; opacity: .85; }

/* toast / loading */
#toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: rgba(0,0,0,.78);
  color: #fff; padding: 9px 16px; border-radius: 20px; font-size: 14px; z-index: 60; max-width: 80%; text-align: center; }
#loading .mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; flex-direction: column;
  align-items: center; justify-content: center; z-index: 70; color: #fff; }
.spinner { width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 弹层 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; display: flex; align-items: flex-end; }
.modal .sheet { background: #fff; width: 100%; max-width: 480px; margin: 0 auto; border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); max-height: 78vh; display: flex; flex-direction: column; }
.sheet .sh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sheet .opts { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.opt { padding: 12px 4px; border-bottom: 1px solid #f0f3f8; }
.opt.on { color: #2b6cf6; font-weight: 600; }
.empty { text-align: center; color: #9aa4b5; padding: 40px 0; font-size: 14px; }

/* 地图 */
#map { height: 58vh; min-height: 320px; border-radius: 14px; margin: 12px; background: #eef1f6; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #5b6675; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.pop { min-width: 150px; }
.pop img { width: 100%; border-radius: 8px; margin-top: 6px; }
.pop .pt { font-weight: 600; font-size: 14px; }
.pop .ps { font-size: 12px; color: #666; }
