* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #10241c;
  --muted: #6a7a70;
  --line: #dce6df;
  --bg: #eef3ee;
  --card: #fff;
  --green: #176a38;
  --red: #d9363f;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
body { font-family: var(--font); color: var(--ink); background: var(--bg); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
[hidden] { display: none !important; }

.bar {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 22px 28px; background: #0a2b1f; color: #fff;
}
.bar h1 { font-size: 26px; }
.bar p, .bar-links, .back { color: rgba(255,255,255,.72); font-size: 14px; }
.bar-links { display: flex; align-items: center; gap: 14px; }
.back { display: inline-block; margin-bottom: 8px; }
.bar-links button {
  border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 8px; padding: 8px 12px;
}

.login-wrap { min-height: 60vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(420px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px 24px;
}
.login-card h2 { margin-bottom: 8px; }
.login-card p { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.login-card input, .lookup input {
  width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font-size: 16px;
}

#spotPick { padding: 24px 28px 40px; }
.spot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.spot-card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; min-height: 150px;
}
.spot-card:hover { border-color: #176a38; box-shadow: 0 10px 24px rgba(14,46,32,.08); }
.spot-card .ico { font-size: 28px; }
.spot-card h2 { font-size: 20px; margin: 8px 0 4px; }
.spot-card p { color: var(--muted); font-size: 13px; }
.spot-card .meta { margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--green); }

#gateBox { padding: 22px 28px 40px; max-width: 860px; }
.lookup { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 18px; }
.lookup label { display: block; font-weight: 700; margin-bottom: 8px; }
.lookup-row { display: flex; gap: 10px; }
.lookup-row input { flex: 1; height: 56px; font-size: 20px; letter-spacing: .5px; }
.list-title { font-size: 16px; margin: 22px 0 12px; }

.visit {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 12px;
}
.visit .name { font-size: 26px; font-weight: 800; }
.visit .phone { font-size: 18px; font-weight: 700; color: #14532d; margin: 4px 0 12px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; background: #f7faf7; border-radius: 12px; padding: 12px 14px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { font-weight: 700; font-size: 15px; }
.warn { margin: 12px 0; padding: 10px 12px; border-radius: 10px; font-weight: 700; }
.warn.bad { background: #fdeaea; color: #d9363f; }
.warn.ok { background: #e2f5e9; color: #176a38; }
.warn.note { background: #fdeed3; color: #9a3412; }
.ops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.empty { color: var(--muted); padding: 16px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px;
  padding: 12px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, #1d9c56, #0e9f8f); color: #fff; }
.btn-outline { background: #fff; color: var(--green); border: 1px solid #9bd6af; }
.btn-danger { background: #fff; color: var(--red); border: 1px solid #f0b9bd; }
.btn-block { width: 100%; height: 46px; }
.pay { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pay.unpaid { background: #fdeaea; color: #d9363f; }
.pay.paid { background: #e2f5e9; color: #176a38; }
.pay.free { background: #eef3ee; color: #5b6b62; }

.toast-box { position: fixed; right: 20px; top: 20px; z-index: 30; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #10241c; color: #fff; padding: 10px 14px; border-radius: 10px; }
.toast-success { background: #176a38; }
.toast-error { background: #d9363f; }

@media (max-width: 720px) {
  .bar, #spotPick, #gateBox { padding-left: 16px; padding-right: 16px; }
  .lookup-row { flex-direction: column; }
  .facts { grid-template-columns: 1fr; }
  .visit .name { font-size: 22px; }
}
