/* 配色取自宁波东方理工大学官网：深红 #92071C、暖金 #FFAD46、暖灰 #9B9689、米白 #F3F2EF（2026-12-05） */
:root {
  --brand: #92071c;
  --brand-dark: #6e0515;
  --gold: #ffad46;
  --gold-soft: #fff3e1;
  --page: #f3f2ef;
  --card: #ffffff;
  --text: #1f1a17;
  --muted: #5f5a52;
  --line: #e4e1da;
  --ok: #1d6b45;
  --ok-soft: #e6f2eb;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--text); }
body { font: 17px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
button { font: inherit; }
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; background: var(--brand); color: #fff; }
.bar-mark { width: 26px; height: 26px; flex: none; }
.bar-title { font-size: 18px; font-weight: 600; letter-spacing: .5px; }
.bar-back { color: #fff; text-decoration: none; font-size: 16px; white-space: nowrap; }
main { max-width: 640px; margin: 0 auto; padding: 0 0 calc(150px + env(safe-area-inset-bottom)); }
.hint { color: var(--muted); text-align: center; padding: 48px 0; }
.card { background: var(--card); border-radius: 12px; padding: 14px 16px; margin: 0 16px 12px; }

/* 列表 */
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--card); margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: none; height: 48px; font-size: 16px; color: var(--muted); }
.tab.on { color: var(--brand); font-weight: 700; box-shadow: inset 0 -3px 0 var(--brand); }
.item { display: flex; align-items: center; gap: 12px; margin: 0 16px 10px; padding: 10px; background: var(--card); border-radius: 12px; color: inherit; text-decoration: none; }
.item-thumb { width: 68px; height: 68px; flex: none; border-radius: 8px; object-fit: cover; background: #d9d5cc; }
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-head { display: flex; align-items: center; gap: 6px; }
.item-title { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-sub { font-size: 14px; color: #3d3833; margin-top: 2px; }
.item-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.item-meta.late { color: var(--brand); font-weight: 600; }

/* 标签 */
.level { display: inline-block; flex: none; padding: 1px 8px; border-radius: 4px; font-size: 13px; font-weight: 600; background: var(--gold); color: #3a2200; }
.level.urgent { background: var(--brand); color: #fff; }
/* 状态颜色（12-05）：深红未处置、暖金处置中、绿已处置、灰退回/误报/撤回 */
.status { display: inline-block; flex: none; padding: 2px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.status.wait { background: var(--brand); color: #fff; }
.status.doing { background: var(--gold); color: #3a2200; }
.status.done { background: var(--ok); color: #fff; }
.status.gray { background: #e4e1da; color: var(--muted); }
.item { position: relative; padding-bottom: 14px; }
.item > .status { position: absolute; right: 10px; bottom: 10px; }
.item .item-body { padding-right: 76px; }
.item.late { box-shadow: inset 4px 0 0 var(--brand); }
.band { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; font-size: 14px; color: #fff; }
.band b { font-size: 17px; white-space: nowrap; }
.band span { text-align: right; }
.band.wait { background: var(--brand); border-top: 1px solid rgba(255,255,255,.18); }
.band.doing { background: var(--gold); color: #3a2200; }
.band.done { background: var(--ok); }
.band.gray { background: #8a857c; }

/* 详情：照片优先 */
.hero { position: relative; background: #2b2622; }
.hero img { display: block; width: 100%; max-height: 46vh; min-height: 200px; object-fit: cover; }
.hero-empty { height: 160px; display: flex; align-items: center; justify-content: center; color: #cfc9be; }
.hero-level { position: absolute; left: 14px; top: 14px; }
.hero-level .level { font-size: 14px; padding: 3px 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.hero-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 14px 10px; color: #fff; font-size: 12px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.head { padding: 16px 16px 10px; }
.head h1 { margin: 0; font-size: 23px; line-height: 1.3; }
.head .sub { color: #3d3833; font-size: 15px; margin-top: 4px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 16px 12px; }
.tile { background: var(--card); border-radius: 12px; padding: 10px 14px; }
.tile small { display: block; font-size: 13px; color: var(--muted); }
.tile b { font-size: 17px; }
.tile b.late { color: var(--brand); }
.note { font-size: 15px; border-left: 0; }
.rows { margin: 0; }
.row { display: flex; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; }
.row:first-child { border-top: 0; }
.row dt { color: var(--muted); width: 4.5em; flex: none; }
.row dd { margin: 0; flex: 1; word-break: break-all; }

/* 底部操作栏 */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.dock-row { display: flex; gap: 8px; }
.dock-row .btn { flex: 1; }
.btn { display: block; width: 100%; min-height: 46px; border: 0; border-radius: 12px; padding: 10px; font-size: 16px; font-weight: 600; background: var(--brand); color: #fff; }
.btn.big { min-height: 54px; font-size: 19px; letter-spacing: 2px; }
.btn.ghost { background: var(--card); color: #3d3833; border: 1px solid #cfcac0; font-weight: 500; }
.btn:active { background: var(--brand-dark); }
.btn.ghost:active { background: #f1eee8; }
.btn:disabled { opacity: .5; }

/* 完成处置面板 */
.panel h2 { font-size: 19px; margin: 0 0 10px; }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.compare figure { margin: 0; }
.compare img, .compare .ph, .compare .shoot, .compare .thumb { display: flex; width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; object-fit: cover; }
.compare .ph { align-items: center; justify-content: center; background: #ece9e3; color: var(--muted); font-size: 14px; }
.compare figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }
.shoot { align-items: center; justify-content: center; text-align: center; border: 1.5px dashed var(--brand); background: #fbf3f2; color: var(--brand); font-size: 15px; font-weight: 600; padding: 6px; }
.shoot input, .add input { display: none; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 0; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #ece9e3; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; line-height: 30px; padding: 0; }
.add { display: flex; align-items: center; justify-content: center; border: 1.5px dashed #b8b2a6; color: var(--muted); font-size: 14px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid #cfcac0; background: var(--card); color: #3d3833; font-size: 15px; }
.chip.on { border-color: var(--brand); background: #fbf3f2; color: var(--brand); font-weight: 600; }
textarea { width: 100%; min-height: 64px; font: inherit; font-size: 16px; padding: 10px; border: 1px solid #cfcac0; border-radius: 10px; resize: vertical; }
.panel-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 12px; }
.progress { height: 8px; background: #ece9e3; border-radius: 4px; overflow: hidden; margin: 10px 0; }
.progress i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }
.err { color: var(--brand); margin: 8px 0; }
.label { display: block; color: var(--muted); font-size: 14px; margin: 10px 0 6px; }
.label.strong { color: var(--text); font-weight: 600; font-size: 15px; }
.result-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.result-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.toast { position: fixed; left: 50%; bottom: 170px; transform: translateX(-50%); background: rgba(31,26,23,.92); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 15px; z-index: 10; max-width: 86vw; }
.dock[hidden], .toast[hidden] { display: none; }
.bar-back:not([hidden]) ~ .bar-mark { display: none; }

/* 位置地图（2026-12-05）：底图是地图备份的俯视图，点位名和告警点由页面叠加 */
.place-link { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--card); color: var(--brand); font-size: 15px; font-weight: 600; text-decoration: none; border: 1px solid #ead7d3; }
.place-link span { flex: 1; }
.place-link b { font-size: 20px; line-height: 1; }
.pin { width: 20px; height: 20px; flex: none; }
.map-head { padding: 14px 16px 10px; }
.map-head b { display: block; font-size: 20px; }
.map-head span { color: #3d3833; font-size: 14px; }
.map-box { position: relative; margin: 0 16px; border-radius: 12px; overflow: hidden; background: #0f1720; }
.map-inner { position: relative; }
.map-box img { display: block; width: 100%; }
.map-box.wide { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.map-box.wide .map-inner { width: 260%; }
.map-label { position: absolute; transform: translate(-50%, -135%); padding: 1px 6px; border-radius: 4px; background: rgba(15,23,32,.78); color: #f3f2ef; font-size: 11px; white-space: nowrap; pointer-events: none; }
.map-label::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #f3f2ef; }
.mk { position: absolute; width: 0; height: 0; }
.mk-dot { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); border: 3px solid var(--gold); box-sizing: border-box; animation: mk-pulse 1.6s ease-out infinite; }
.mk-dir { position: absolute; left: 0; top: -7px; width: 34px; height: 14px; transform-origin: 0 50%; }
.mk-dir::after { content: ""; position: absolute; right: 0; top: 0; border-left: 14px solid var(--gold); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.mk-dir::before { content: ""; position: absolute; left: 0; right: 12px; top: 5px; height: 4px; background: var(--gold); }
@keyframes mk-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,173,70,.75); } 100% { box-shadow: 0 0 0 18px rgba(255,173,70,0); } }
.map-legend { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 10px 16px 0; font-size: 13px; color: var(--muted); }
.lg-dot { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 50%; background: var(--brand); border: 2px solid var(--gold); vertical-align: -1px; }
.hint.small { font-size: 13px; padding: 8px 16px; text-align: left; }
