body.mobile {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  box-shadow: 0 0 24px rgba(0,0,0,0.08);
}
html:has(body.mobile) { scrollbar-width: none; }
html:has(body.mobile)::-webkit-scrollbar { display: none; width: 0; height: 0; }
body.mobile::-webkit-scrollbar { display: none; width: 0; height: 0; }

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 4px;
  font-size: 12px;
  font-weight: 600;
  background: var(--card);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 5;
}
.app-header h1 { font-size: 17px; font-weight: 700; }
.app-header .head-actions { display: flex; gap: 12px; align-items: center; }
.app-header .head-actions a { color: var(--text); }

.gradient-hero {
  background: linear-gradient(135deg, #1F6FEB 0%, #3B82F6 60%, #60A5FA 100%);
  color: #fff;
  padding: 20px 16px 56px;
}
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.hero-top .hello { font-size: 15px; opacity: .92; }
.hero-top .name { font-size: 20px; font-weight: 700; margin-top: 4px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
.search-box {
  margin-top: 16px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 24px;
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: #EAF2FF;
  font-size: 14px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 16px;
  margin-top: -36px;
  position: relative;
  z-index: 2;
}
.quick-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 6px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(31,111,235,.08);
  font-size: 12px;
  color: var(--text);
}
.quick-item .qi-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light);
}

.section { padding: 16px; }
.section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.section-head h2 { font-size: 15px; font-weight: 700; }
.section-head .more { font-size: 12px; color: var(--sub); }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(17,24,39,.05);
  margin-bottom: 12px;
  padding: 14px;
}
.todo-badge { display: flex; align-items: center; gap: 10px; }
.todo-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }
.todo-badge .t-title { font-size: 14px; font-weight: 600; flex: 1; }
.todo-badge .t-num { font-size: 18px; font-weight: 700; color: var(--primary); }
.todo-badge .t-sub { font-size: 11px; color: var(--sub); }

.tabs {
  display: flex;
  background: var(--card);
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
  margin-bottom: 12px;
}
.tabs span {
  flex: 1; text-align: center;
  font-size: 13px;
  padding: 8px 0;
  border-radius: 8px;
  color: var(--sub);
}
.tabs span.active { background: var(--primary); color: #fff; font-weight: 600; }

.asset-item { display: flex; gap: 12px; }
.asset-thumb {
  width: 64px; height: 64px;
  border-radius: 10px;
  background: linear-gradient(135deg, #DBEAFE, #EFF6FF);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.asset-thumb.big { width: 100%; height: 160px; border-radius: var(--radius); margin-bottom: 12px; }
.asset-body { flex: 1; min-width: 0; }
.asset-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.asset-meta { font-size: 12px; color: var(--sub); line-height: 1.9; }
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}
.tag.ok { background: #E7F6EC; color: var(--success); }
.tag.warn { background: #FEF3E2; color: var(--warn); }
.tag.err { background: #FDE8E8; color: var(--danger); }
.tag.info { background: var(--primary-light); color: var(--primary); }
.tag.gray { background: #F1F2F4; color: var(--sub); }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.form-group .field {
  background: #F7F8FA;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  color: var(--text);
}
.form-group .field.placeholder { color: #9CA3AF; }
.form-group .field.row { display: flex; justify-content: space-between; align-items: center; }
.form-group .field.row .arrow { color: #C0C4CC; }

.btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 13px 0;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: #F1F2F4; color: var(--sub); }

.map-block {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #E9EEF6;
  height: 320px;
  margin-bottom: 12px;
}
.map-block .map-lines { position: absolute; inset: 0; }
.map-block .road-h { position: absolute; left: 0; right: 0; height: 22px; background: #fff; }
.map-block .road-v { position: absolute; top: 0; bottom: 0; width: 22px; background: #fff; }
.map-block .road-w { position: absolute; left: 0; right: 0; height: 10px; background: #D9E2EF; }
.map-block .road-v2 { position: absolute; top: 0; bottom: 0; width: 10px; background: #D9E2EF; }
.map-block .river { position: absolute; right: -10%; top: 20%; width: 60px; height: 60%; background: #BFD8F2; transform: rotate(20deg); }
.map-pin {
  position: absolute;
  display: flex; flex-direction: column; align-items: center;
}
.map-pin .pin {
  width: 14px; height: 14px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--danger);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.map-pin .pin-label {
  margin-top: 8px;
  background: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  white-space: nowrap;
}
.map-pin .pin.blue { background: var(--primary); }
.map-pin .pin.green { background: var(--success); }
.map-ctrl {
  position: absolute;
  right: 12px; top: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.map-ctrl span {
  width: 34px; height: 34px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--sub);
}
.map-user {
  position: absolute;
  left: 50%; bottom: 24%;
  transform: translateX(-50%);
  width: 18px; height: 18px;
  background: var(--primary);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(31,111,235,.25);
}

.photo-timeline { position: relative; padding-left: 18px; }
.photo-timeline::before {
  content: "";
  position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; margin-bottom: 16px; }
.tl-item::before {
  content: "";
  position: absolute; left: -18px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}
.tl-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.tl-head .tl-date { color: var(--sub); font-weight: 400; font-size: 12px; }
.tl-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tl-photos .ph {
  aspect-ratio: 1;
  border-radius: 8px;
  background: linear-gradient(135deg, #DBEAFE, #EFF6FF);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 11px;
  overflow: hidden;
}
.tl-photos .ph.more { background: #F1F2F4; color: var(--sub); }

.list-menu { background: var(--card); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.list-menu .menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.list-menu .menu-item:last-child { border-bottom: none; }
.list-menu .mi-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
}
.list-menu .mi-text { flex: 1; }
.list-menu .mi-arrow { color: #C0C4CC; font-size: 12px; }

.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  z-index: 10;
}
.tabbar a {
  flex: 1;
  text-align: center;
  padding: 4px 0;
  font-size: 11px;
  color: var(--sub);
}
.tabbar a.active { color: var(--primary); font-weight: 600; }
.tabbar a .tb-icon { display: block; margin: 0 auto 2px; }

.page-body { padding-bottom: 72px; }
.content-pad { padding: 16px; }

.login-page {
  background: linear-gradient(160deg, #1F6FEB 0%, #3B82F6 55%, #BFD8F2 100%);
  min-height: 100vh;
}
.login-card-zone { padding: 60px 28px 0; }
.login-logo {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: #fff;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.login-title { text-align: center; color: #fff; margin: 18px 0 30px; }
.login-title h1 { font-size: 22px; font-weight: 700; }
.login-title p { font-size: 13px; opacity: .85; margin-top: 6px; }
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 26px 22px;
  box-shadow: 0 12px 40px rgba(12,52,140,.25);
}
.login-input {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  margin-bottom: 14px;
  color: #9CA3AF;
  font-size: 14px;
}
.login-input .placeholder { color: #C2C8D0; }
.login-links { display: flex; justify-content: space-between; font-size: 13px; color: var(--primary); margin-top: 14px; }
.login-foot { text-align: center; color: rgba(255,255,255,.8); font-size: 12px; margin-top: 34px; }

.detail-hero { background: var(--card); padding: 16px; margin-bottom: 12px; }
.detail-title { font-size: 18px; font-weight: 700; margin: 12px 0 4px; }
.detail-code { font-size: 12px; color: var(--sub); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-cell { background: #F7F8FA; border-radius: 10px; padding: 10px 12px; }
.info-cell .k { font-size: 11px; color: var(--sub); margin-bottom: 3px; }
.info-cell .v { font-size: 13px; font-weight: 600; }
.info-cell.full { grid-column: 1 / -1; }

.msg-item { display: flex; gap: 12px; align-items: flex-start; }
.msg-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.msg-icon.warn { background: #FEF3E2; }
.msg-icon.info { background: var(--primary-light); }
.msg-icon.err { background: #FDE8E8; }
.msg-body { flex: 1; }
.msg-title { font-size: 14px; font-weight: 600; }
.msg-title .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); margin-right: 6px; }
.msg-desc { font-size: 12px; color: var(--sub); margin-top: 3px; line-height: 1.6; }
.msg-time { font-size: 11px; color: #B0B6BF; margin-top: 4px; }

.checkin-status { display: flex; align-items: center; gap: 8px; }
.checkin-status .ci-ring {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.checkin-status .ci-ring.on { border-color: var(--primary); background: var(--primary); }
.checkin-status .ci-ring.on::after { content: ""; display: block; width: 6px; height: 3px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); margin: 2px auto; }
.checkin-status span { font-size: 13px; }
.checkin-status.ok span { color: var(--success); font-weight: 600; }

.upload-zone {
  border: 2px dashed #C6D8F8;
  border-radius: var(--radius);
  background: #F4F8FE;
  padding: 22px;
  text-align: center;
  color: var(--primary);
  font-size: 13px;
}
.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.upload-grid .up-item { aspect-ratio: 1; border-radius: 8px; background: linear-gradient(135deg, #DBEAFE, #EFF6FF); position: relative; }
.upload-grid .up-item .del {
  position: absolute; right: 4px; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff;
  font-size: 10px; line-height: 16px; text-align: center;
}
.upload-grid .up-add {
  aspect-ratio: 1; border-radius: 8px;
  border: 1px dashed #B9CCEA;
  display: flex; align-items: center; justify-content: center;
  color: #9DB6DD; font-size: 22px;
}

.contract-item { display: flex; gap: 12px; }
.contract-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: #FEF3E2; color: var(--warn);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contract-body { flex: 1; min-width: 0; }
.contract-name { font-size: 14px; font-weight: 600; }
.contract-meta { font-size: 12px; color: var(--sub); margin-top: 3px; line-height: 1.7; }
.file-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.file-row .f-icon { color: var(--primary); flex-shrink: 0; }
.file-row .f-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .f-size { color: var(--sub); font-size: 11px; }
.file-row .f-preview { color: var(--primary); font-size: 12px; font-weight: 600; }

.float-btn {
  position: fixed;
  right: calc(50% - 210px + 16px);
  bottom: 84px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(31,111,235,.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 9;
}
@media (max-width: 480px) {
  .float-btn { right: 16px; }
}