/* 百花里物业 · 移动端扫码页面 */
:root {
  --green: #0f5b4a;
  --green-deep: #093b30;
  --green-soft: #e6efe9;
  --mint: #cfe3d7;
  --cream: #f7f6f0;
  --paper: #ffffff;
  --ink: #173a32;
  --muted: #6c7e77;
  --line: #e3e8e1;
  --accent: #dd7f36;
  --accent-soft: #fbeee2;
  --red: #b8443a;
  --red-soft: #fbe9e7;
  --radius: 22px;
  --shadow: 0 18px 44px rgba(12, 59, 46, 0.09);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 380px at 82% -8%, rgba(15, 91, 74, 0.10), transparent 68%),
    linear-gradient(180deg, #eff4ee 0%, var(--cream) 42%, #f7f6f0 100%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 16px; }
button { cursor: pointer; }
img { max-width: 100%; }
.shell { max-width: 560px; margin: 0 auto; padding: 0 20px 56px; }

/* ---------- 顶栏 ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 12px; max-width: 560px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.02em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, #13705a, var(--green-deep));
  color: #f7f3e8; font-family: "Songti SC", "STSong", serif; font-size: 21px; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 14px rgba(9,59,48,.18);
}
.brand-sub { display: block; font-size: 10px; color: var(--muted); letter-spacing: .06em; font-weight: 600; margin-top: 1px; }
.top-link { font-size: 13px; color: var(--green); font-weight: 600; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid var(--line); }

/* ---------- 首页 ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 28px 24px 24px;
  background:
    radial-gradient(240px 180px at 100% 0%, rgba(226, 131, 60, .28), transparent 70%),
    linear-gradient(150deg, #0d5545 0%, #09362b 100%);
  color: #f4f1e7; box-shadow: 0 24px 50px rgba(9, 54, 43, .24);
}
.hero::after {
  content: ""; position: absolute; right: -58px; bottom: -86px; width: 220px; height: 220px;
  border: 1px solid rgba(247, 243, 232, .16); border-radius: 50%;
}
.hero::before {
  content: ""; position: absolute; right: -14px; bottom: -42px; width: 140px; height: 140px;
  border: 1px solid rgba(247, 243, 232, .12); border-radius: 50%;
}
.hero-eyebrow { font-size: 10px; letter-spacing: .22em; color: #e9b285; font-weight: 700; }
.hero h1 { margin: 12px 0 10px; font-size: 30px; line-height: 1.25; letter-spacing: -.02em; font-weight: 700; }
.hero p { margin: 0; color: rgba(244,241,231,.72); font-size: 13px; line-height: 1.7; max-width: 300px; }
.hero-meta { display: flex; gap: 18px; margin-top: 22px; position: relative; z-index: 1; }
.hero-meta div { font-size: 11px; color: rgba(244,241,231,.58); }
.hero-meta strong { display: block; color: #f4f1e7; font-size: 13px; margin-top: 3px; font-weight: 600; }
.hero-call { position: absolute; right: 22px; top: 24px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); display: grid; place-items: center; background: rgba(255,255,255,.08); backdrop-filter: blur(6px); }
.hero-call svg { width: 18px; height: 18px; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 30px 2px 14px; }
.section-head h2 { font-size: 17px; margin: 0; letter-spacing: -.01em; }
.section-head span { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.service-card {
  position: relative; overflow: hidden; background: rgba(255,255,255,.85); border: 1px solid rgba(227,232,225,.9);
  border-radius: var(--radius); padding: 18px 16px 16px; min-height: 136px; box-shadow: 0 8px 22px rgba(12,59,46,.04);
  transition: transform .18s ease, box-shadow .18s ease;
}
.service-card:active { transform: scale(.985); }
.service-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); margin-bottom: 18px; }
.service-icon svg { width: 21px; height: 21px; }
.service-card h3 { margin: 0 0 5px; font-size: 15px; }
.service-card p { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.5; }
.service-card .arrow { position: absolute; right: 15px; top: 17px; color: #b7c5bf; font-size: 15px; }
.service-card.warm .service-icon { background: var(--accent-soft); color: #b96824; }
.service-card.full { grid-column: 1 / -1; min-height: 96px; display: flex; align-items: center; gap: 14px; padding: 16px; }
.service-card.full .service-icon { margin: 0; flex: 0 0 auto; }
.service-card.full h3 { margin-bottom: 3px; }
.service-card.full .arrow { top: 50%; transform: translateY(-50%); }

.notice { display: flex; gap: 10px; margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.55); border: 1px dashed #d7dfd6; color: #53665f; font-size: 12px; line-height: 1.65; }
.notice b { color: var(--green); font-weight: 700; }
.staff-strip { margin-top: 22px; border-radius: 18px; background: #103f34; color: #eae7dc; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.staff-strip h3 { margin: 0 0 4px; font-size: 14px; }
.staff-strip p { margin: 0; font-size: 11px; color: rgba(234,231,220,.62); }
.staff-strip span.badge { flex: 0 0 auto; font-size: 11px; border: 1px solid rgba(234,231,220,.28); padding: 8px 11px; border-radius: 999px; }
.foot { text-align: center; color: #899a93; font-size: 10px; letter-spacing: .06em; margin-top: 30px; line-height: 1.8; }

/* ---------- 表单页 ---------- */
.page-head { margin: 10px 0 18px; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.page-head h1 { margin: 8px 0 8px; font-size: 27px; letter-spacing: -.02em; line-height: 1.25; }
.page-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.gate-chip { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 7px 12px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 600; }
.gate-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: #2c9571; box-shadow: 0 0 0 4px rgba(44,149,113,.12); }
.form-card { background: rgba(255,255,255,.92); border: 1px solid rgba(227,232,225,.95); border-radius: var(--radius); padding: 20px 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.form-card-title { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; font-size: 13px; font-weight: 700; }
.form-card-title .idx { width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; background: var(--green); color: #fff; font-size: 10px; letter-spacing: .02em; }
.field { margin-bottom: 17px; }
.field:last-child { margin-bottom: 0; }
.field > label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: #334f46; margin-bottom: 8px; }
.field > label em { font-style: normal; color: #9aaba4; font-weight: 400; font-size: 10px; }
.field .hint { font-size: 10px; color: #93a39c; margin-top: 6px; line-height: 1.5; }
.input, .select, .textarea {
  width: 100%; border: 1px solid #dfe6de; background: #fbfcf9; border-radius: 14px; color: var(--ink);
  padding: 13px 14px; outline: none; transition: border-color .15s, background .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: #aab7b1; }
.input:focus, .select:focus, .textarea:focus { border-color: #7eab99; background: #fff; box-shadow: 0 0 0 4px rgba(15,91,74,.08); }
.input.plate { font-size: 24px; font-weight: 700; letter-spacing: .14em; text-align: center; padding: 14px; text-transform: uppercase; }
.textarea { min-height: 104px; resize: vertical; line-height: 1.65; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236c7e77' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.counter { display: flex; align-items: center; border: 1px solid #dfe6de; border-radius: 14px; background: #fbfcf9; overflow: hidden; }
.counter button { width: 46px; height: 46px; border: 0; background: transparent; font-size: 20px; color: var(--green); }
.counter span { flex: 1; text-align: center; font-weight: 700; font-size: 16px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; background: #eef2ec; border-radius: 13px; padding: 4px; gap: 4px; }
.segmented button { border: 0; background: transparent; padding: 9px; border-radius: 10px; font-size: 12px; color: var(--muted); font-weight: 600; }
.segmented button.active { background: #fff; color: var(--green); box-shadow: 0 2px 8px rgba(12,59,46,.08); }
.segmented button.active.warm { color: #b96824; }
.agree { display: flex; gap: 9px; align-items: flex-start; margin: 16px 2px 18px; font-size: 11px; color: #71837c; line-height: 1.6; }
.agree input { appearance: none; width: 18px; height: 18px; flex: 0 0 auto; border: 1.4px solid #bccbc4; border-radius: 5px; margin: 0; background: #fff; position: relative; }
.agree input:checked { background: var(--green); border-color: var(--green); }
.agree input:checked::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(42deg); }
.agree b { color: var(--green); font-weight: 600; }
.btn {
  width: 100%; border: 0; border-radius: 15px; min-height: 52px; padding: 13px 18px; font-size: 15px; font-weight: 700;
  background: var(--green); color: #fff; letter-spacing: .02em; box-shadow: 0 12px 24px rgba(15,91,74,.2);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: translateY(1px) scale(.995); box-shadow: 0 6px 14px rgba(15,91,74,.16); }
.btn:disabled { opacity: .55; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--green); border: 1px solid #cfdad2; box-shadow: none; }
.btn.warm { background: var(--accent); box-shadow: 0 12px 24px rgba(221,127,54,.2); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.submit-area { padding-top: 4px; }
.form-note { text-align: center; font-size: 10px; color: #93a39c; margin: 14px 0 0; line-height: 1.7; }
.error-box { display: none; margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: var(--red-soft); color: var(--red); font-size: 12px; line-height: 1.5; }
.error-box.show { display: block; }

/* ---------- 成功页 ---------- */
.success-card { background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 30px 22px 22px; text-align: center; box-shadow: var(--shadow); margin-top: 12px; }
.check-ring { width: 74px; height: 74px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; margin: 0 auto 18px; position: relative; }
.check-ring::after { content: ""; position: absolute; inset: -7px; border: 1px solid #dbe8df; border-radius: 50%; }
.check-ring svg { width: 34px; height: 34px; color: var(--green); }
.success-card h1 { font-size: 24px; margin: 0 0 8px; letter-spacing: -.02em; }
.success-card > p { color: var(--muted); font-size: 12px; margin: 0 0 22px; line-height: 1.7; }
.ticket { border: 1px dashed #cdd9d0; border-radius: 16px; padding: 16px; text-align: left; background: #fafbf7; margin-bottom: 16px; }
.ticket .t-label { font-size: 10px; color: #8b9a93; letter-spacing: .12em; }
.ticket .t-value { font-size: 20px; font-weight: 700; letter-spacing: .06em; color: var(--green); margin-top: 4px; font-variant-numeric: tabular-nums; }
.ticket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #e6ebe4; }
.ticket-grid div span { display: block; font-size: 10px; color: #8b9a93; margin-bottom: 4px; }
.ticket-grid div b { font-size: 12px; font-weight: 600; }
.rule-note { background: var(--accent-soft); color: #9a5a24; border-radius: 14px; padding: 13px 14px; font-size: 11px; line-height: 1.65; text-align: left; margin-bottom: 18px; }
.success-actions { display: grid; gap: 9px; }

/* ---------- 查询 / 时间线 ---------- */
.query-result { margin-top: 18px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.status-pending { background: #fff2e2; color: #a8621e; }
.status-accepted { background: #e7f0fb; color: #2f6da8; }
.status-done { background: #e4f2e9; color: #217a55; }
.status-cancelled { background: #f1f0ee; color: #7c7f7b; }
.detail-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; margin-bottom: 12px; box-shadow: 0 8px 20px rgba(12,59,46,.04); }
.detail-card h3 { margin: 0 0 12px; font-size: 14px; }
.detail-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #f0f2ed; font-size: 12px; }
.detail-row:last-child { border-bottom: 0; }
.detail-row span { color: var(--muted); flex: 0 0 auto; }
.detail-row b { font-weight: 600; text-align: right; word-break: break-all; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 24px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px #e5efe9; }
.timeline li::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 1px; background: #e2e9e2; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline h4 { margin: 0 0 4px; font-size: 12px; font-weight: 700; }
.timeline p { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.6; }
.timeline time { display: block; font-size: 10px; color: #a0ada7; margin-top: 4px; }
.photo-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photo-grid img { width: 74px; height: 74px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* ---------- 上传 ---------- */
.uploader { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.upload-item { position: relative; aspect-ratio: 1; border-radius: 13px; overflow: hidden; background: #eef2ec; border: 1px solid #e0e7df; }
.upload-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-item .del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(23,58,50,.72); color: #fff; font-size: 13px; line-height: 1; }
.upload-add { aspect-ratio: 1; border: 1px dashed #c7d4cb; border-radius: 13px; background: #fafbf7; display: grid; place-items: center; color: #8fa199; font-size: 10px; gap: 5px; }
.upload-add svg { width: 20px; height: 20px; }
.upload-loading { position: absolute; inset: 0; background: rgba(255,255,255,.7); display: grid; place-items: center; font-size: 10px; color: var(--green); }

/* ---------- 弹层 ---------- */
dialog.sheet { border: 0; border-radius: 22px; padding: 0; width: min(420px, calc(100vw - 36px)); background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(9,54,43,.28); }
dialog.sheet::backdrop { background: rgba(9,40,33,.45); backdrop-filter: blur(3px); }
.sheet-body { padding: 22px 20px 18px; }
.sheet-body h3 { margin: 0 0 8px; font-size: 17px; }
.sheet-body p { margin: 0 0 16px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.sheet-actions { display: flex; gap: 9px; }
.sheet-actions .btn { min-height: 46px; font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px); background: #123f35; color: #fff; font-size: 12px; padding: 11px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: all .22s ease; z-index: 99; max-width: 88vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.loading-line { height: 2px; background: linear-gradient(90deg, transparent, var(--green), transparent); background-size: 50% 100%; animation: slide 1.1s linear infinite; border-radius: 2px; margin-bottom: 14px; display: none; }
.loading-line.show { display: block; }
@keyframes slide { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ---------- 巡逻引导 ---------- */
.patrol-hero { background: linear-gradient(150deg, #0d5545, #09362b); border-radius: 26px; padding: 26px 22px; color: #f4f1e7; margin-top: 10px; position: relative; overflow: hidden; }
.patrol-hero .pin { width: 48px; height: 48px; border-radius: 16px; background: rgba(255,255,255,.1); display: grid; place-items: center; margin-bottom: 18px; }
.patrol-hero h1 { margin: 0 0 8px; font-size: 24px; }
.patrol-hero p { margin: 0; font-size: 12px; color: rgba(244,241,231,.7); line-height: 1.7; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 16px 34px; font-size: 12px; color: #4e625b; line-height: 1.65; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.steps li:last-child { padding-bottom: 0; }
.code-box { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; background: #f3f6f1; border: 1px dashed #cdd8d0; border-radius: 10px; padding: 9px 12px; font-size: 13px; letter-spacing: .12em; color: var(--green); text-align: center; margin-top: 10px; }

@media (min-width: 640px) {
  .shell { padding-bottom: 40px; }
  .service-grid { gap: 14px; }
  .hero { padding: 34px 30px 28px; }
  .hero h1 { font-size: 34px; }
}
@media print {
  body { background: #fff; }
  .topbar, .foot, .btn, .no-print { display: none !important; }
}
