:root {
  --bg: #f5f7fb; --card: #fff; --ink: #111827; --muted: #6b7280;
  --line: #e5e7eb; --primary: #4f46e5; --ok: #059669; --danger: #dc2626;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
           max(24px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.app { max-width: 560px; margin: 0 auto; }
.view { display: block; }
.hidden { display: none !important; }
.brand { font-size: 26px; margin: 28px 0 4px; letter-spacing: .5px; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(17,24,39,.04);
}
.card h2 { font-size: 16px; margin: 0 0 6px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 12px; }
.ok { color: var(--ok); font-size: 13px; margin: 10px 0 0; word-break: break-all; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 0; }
input {
  width: 100%; margin-top: 6px; padding: 12px; font-size: 16px; color: var(--ink);
  background: #fbfcfe; border: 1px solid var(--line); border-radius: 10px; min-height: 46px;
}
input:focus { outline: 2px solid rgba(79,70,229,.35); border-color: var(--primary); }
button { font: inherit; cursor: pointer; touch-action: manipulation; }
.btn {
  min-height: 46px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 600;
}
.btn.primary { width: 100%; margin-top: 14px; background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.big { width: 100%; margin-top: 16px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn:active { transform: translateY(1px); }
.bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tag {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; color: var(--muted); background: #eef2f7; border: 1px solid var(--line);
}
.accounts { list-style: none; margin: 0 0 12px; padding: 0; }
.accounts li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.accounts li:last-child { border-bottom: 0; }
.acc-main { min-width: 0; }
.acc-name { font-weight: 600; }
.acc-meta { font-size: 12px; color: var(--muted); }
.acc-meta b { color: var(--primary); font-weight: 600; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: #d1d5db; transition: .16s;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; transition: .16s;
}
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.row { display: flex; gap: 8px; align-items: flex-end; }
.row input { flex: 1; }
.row .btn { width: auto; margin: 0; }
.tabs { display: flex; gap: 8px; margin: 12px 0 4px; }
.tab {
  flex: 1; min-height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: #fbfcfe; color: var(--muted); font-weight: 600;
}
.tab.active { background: #eef2ff; border-color: var(--primary); color: var(--primary); }
.loc-box { margin-top: 14px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; background: #fbfcfe; }
.loc-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.loc-value { margin: 8px 0 0; font-size: 13px; color: var(--ink); word-break: break-all; }
.logs { list-style: none; margin: 0; padding: 0; }
.logs li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.logs li:last-child { border-bottom: 0; }
.logs .fail { color: var(--danger); }
.logs .pass { color: var(--ok); }
.logs .empty { color: var(--muted); }
.modal { position: fixed; inset: 0; background: rgba(17,24,39,.5); display: flex; align-items: flex-end; z-index: 20; }
.sheet {
  width: 100%; max-height: 92vh; overflow-y: auto; background: var(--card);
  border-radius: 16px 16px 0 0; padding: 16px max(16px, env(safe-area-inset-right))
  calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
#campus { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); touch-action: manipulation; }
#campus text { font-size: 13px; fill: #111827; font-family: inherit; }
.coord-row { display: flex; gap: 10px; }
.coord-row label { flex: 1; }
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: rgba(17,24,39,.92); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: 13px; max-width: 86vw; text-align: center; z-index: 30;
}
code { background: #eef2f7; padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* 备案页脚（管局核验时首页需要能看到备案号） */
.foot {
  max-width: 560px; margin: 20px auto 0; padding-top: 14px;
  border-top: 1px solid var(--line); text-align: center;
  font-size: 12px; line-height: 1.8; color: var(--muted);
}
.foot p { margin: 4px 0; }
.foot a { color: var(--muted); }
