/* 惠灵敦 设备报修 —— 明亮产品风: 中性浅灰底 + 白面板; 主色取 logo 红(#E20322)只给主按钮/选中态,
   文字取 logo 黑; 「急」用琥珀色, 免得和品牌红混; 已派/处理中用蓝灰表示「有人在管了」
   字阶 13 / 15 / 17 / 20 / 25 / 31   间距 4px 栅格   圆角 8 / 16   阴影两级 */
:root {
  --bg: #F4F4F5;
  --surface: #FEFEFE;
  --sunk: #EDEDEF;
  --line: #E3E3E6;
  --ink: #141517;
  --ink-2: #4B4E55;
  --ink-3: #7A7D85;
  --pri: #E20322;
  --pri-d: #B5021B;
  --pri-l: #FDE9EB;
  --info: #2F4F7A;
  --info-l: #E8EEF6;
  --hot: #B45309;
  --hot-l: #FDF0DC;
  --ok: #2B7A4B;
  --ok-l: #E2F2E8;
  --warn: #9A6A0B;
  --warn-l: #FBF1DA;
  --r1: 8px;
  --r2: 16px;
  --sh1: 0 1px 2px rgba(20, 21, 23, .06);
  --sh2: 0 8px 24px rgba(20, 21, 23, .10);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
input, textarea, select { font-size: 16px; }   /* 小于 16px iOS 点进去会整页放大 */
button { cursor: pointer; }
a { color: var(--pri); }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px; }
.i { width: var(--s, 20px); height: var(--s, 20px); stroke-width: 1.5; flex: none; vertical-align: middle; }
[hidden] { display: none !important; }

.view { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(112px + var(--safe-b)); }

/* ---------- 顶栏 ---------- */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 8px 0 16px;
  background: rgba(254, 254, 254, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar.sub { padding-left: 4px; }
.topbar .brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; white-space: nowrap; overflow: hidden; }
.topbar .brand .mark { width: 28px; height: 28px; display: block; flex: none; }
.topbar .brand b { font-size: 17px; }
/* 整条 logo(带英文)放在抬头: 高 60 时英文约 10px 能看清; 放页头 28px 高英文只剩 5px, 看不清 */
.hero-logo { display: block; height: 60px; width: auto; aspect-ratio: 841 / 240; margin-bottom: 24px; }
.topbar h1 { flex: 1; font-size: 17px; text-align: center; padding-right: 40px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; border-radius: var(--r1); color: var(--ink-2); flex: none; text-decoration: none; }
.text-btn { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 8px; border: 0; background: none; color: var(--pri); font-size: 15px; text-decoration: none; border-radius: var(--r1); }

/* ---------- 首页抬头 ---------- */
.hero { padding: 24px 16px 8px; }
.hero h2 { font-size: 25px; }
.hero p { color: var(--ink-2); margin-top: 4px; }
.hotline { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); text-decoration: none; color: var(--ink); }
.hotline .i { color: var(--pri); --s: 22px; }
.hotline div { flex: 1; min-width: 0; }
.hotline b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.hotline small { display: block; color: var(--ink-3); font-size: 13px; }
.hotline em { font-style: normal; color: var(--pri); font-size: 15px; flex: none; }

/* ---------- 表单分段 ---------- */
.sec { margin-top: 24px; }
.sec-h { display: flex; align-items: center; gap: 8px; padding: 0 16px 8px; }
.sec-h .n { width: 22px; height: 22px; border-radius: 50%; background: var(--pri); color: #fff; font-size: 13px; display: grid; place-items: center; font-weight: 600; flex: none; }
.sec-h h3 { font-size: 17px; }
.panel { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .panel { border: 1px solid var(--line); border-radius: var(--r2); } }
.row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row > label, .row > .lab { width: 76px; flex: none; color: var(--ink-2); }
.row input, .row select { flex: 1; min-width: 0; height: 40px; border: 0; background: none; padding: 0; outline: none; }
.row input::placeholder, textarea::placeholder { color: #9AA3B2; }
.row .req::after { content: " *"; color: var(--pri); }
.row.err { background: var(--pri-l); }
.row.err > label { color: var(--pri-d); }
.block-field { padding: 12px 16px 16px; border-bottom: 1px solid var(--line); }
.block-field:last-child { border-bottom: 0; }
.block-field > .lab { display: block; color: var(--ink-2); margin-bottom: 8px; }
.block-field.err { background: var(--pri-l); }
.block-field.err > .lab { color: var(--pri-d); }
textarea { width: 100%; min-height: 72px; resize: vertical; border: 1px solid var(--line); border-radius: var(--r1); padding: 8px 12px; background: #fff; outline: none; line-height: 1.6; }
textarea:focus, .row:focus-within { border-color: var(--pri); }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

.thumb { border-radius: var(--r1); background: var(--sunk); flex: none; display: grid; place-items: center; color: var(--ink-3); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 拍照: 一张没有时是一个大按钮, 点了直接开相机 */
.shoot { display: grid; gap: 8px; }
.shoot-btn { position: relative; overflow: hidden; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 168px; padding: 16px;
  border: 1.5px dashed #E9A3AD; border-radius: var(--r2); background: var(--pri-l); color: var(--pri); text-align: center; cursor: pointer; }
.shoot-btn b { font-size: 20px; color: var(--pri-d); margin-top: 4px; }
.shoot-btn small { font-size: 13px; color: var(--ink-2); }
.shoot-alt { position: relative; overflow: hidden; justify-self: center; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; color: var(--ink-2); font-size: 15px; cursor: pointer; }
.shoot input, .shoot-alt input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.block-field.err .shoot-btn { border-color: var(--pri); border-style: solid; }
.sec-h .sec-note { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.chip.urgent { margin-top: 12px; }
.chip.urgent[aria-pressed="true"] { border-color: var(--hot); background: var(--hot-l); color: var(--hot); }

/* 多选 chip */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 15px; display: inline-flex; align-items: center; gap: 4px; }
.chip[aria-pressed="true"] { border-color: var(--pri); background: var(--pri-l); color: var(--pri-d); font-weight: 500; }
.chip[aria-pressed="true"] .i { --s: 16px; }


/* 照片 */
.photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ph-item { position: relative; aspect-ratio: 1; border-radius: var(--r1); overflow: hidden; background: var(--sunk); }
.ph-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-item .del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(20, 21, 23, .6); color: #fff; display: grid; place-items: center; padding: 0; }
.ph-item .del .i { --s: 14px; stroke-width: 2; }
.ph-item.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); animation: shine 1.2s infinite; }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.ph-add { aspect-ratio: 1; border: 1px dashed #C3CAD6; border-radius: var(--r1); background: #fff; color: var(--ink-3); display: grid; place-content: center; justify-items: center; gap: 2px; font-size: 13px; position: relative; overflow: hidden; }
.ph-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ph-add .i { --s: 24px; }
.ph-add.alt { border-style: solid; border-color: var(--line); background: var(--sunk); }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 20px; border-radius: var(--r1); border: 1px solid var(--pri); background: var(--pri); color: #fff; font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .15s ease-out; }
.btn:hover { background: var(--pri-d); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--sunk); }
.btn.danger { background: #fff; color: var(--pri); border-color: #F3B5BE; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; height: 48px; font-size: 17px; }
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 12px 16px calc(12px + var(--safe-b)); background: rgba(254, 254, 254, .96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bottom-bar > div { max-width: 528px; margin: 0 auto; display: flex; gap: 8px; }
.bottom-bar .btn { flex: 1; }

/* ---------- 状态 ---------- */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; background: var(--sunk); color: var(--ink-2); }
.pill.new { background: var(--pri-l); color: var(--pri-d); }
.pill.assigned, .pill.working { background: var(--info-l); color: var(--info); }
.pill.done { background: var(--ok-l); color: var(--ok); }
.pill.hot { background: var(--hot-l); color: var(--hot); }

/* 进度页 */
.status-head { padding: 24px 16px; }
.status-head .no { display: flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.status-head .no button { border: 0; background: none; color: var(--pri); padding: 4px; display: inline-flex; font-size: 13px; }
.status-head h2 { font-size: 25px; margin-top: 4px; }
.status-head p { color: var(--ink-2); margin-top: 4px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; }
.steps li { list-style: none; position: relative; text-align: center; font-size: 13px; color: var(--ink-3); padding-top: 20px; }
.steps li::before { content: ""; position: absolute; top: 4px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #C9D0DB; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: #C9D0DB; }
.steps li:first-child::after { display: none; }
.steps li.on { color: var(--ink); font-weight: 500; }
.steps li.on::before, .steps li.on::after { background: var(--pri); }
.steps { padding: 0; margin-bottom: 0; }

.tech-card { display: flex; align-items: center; gap: 12px; padding: 16px; }
.tech-card .av { width: 44px; height: 44px; border-radius: 50%; background: var(--pri-l); color: var(--pri); display: grid; place-items: center; flex: none; }
.tech-card .who { flex: 1; min-width: 0; }
.tech-card .who b { display: block; }
.tech-card .who small { color: var(--ink-3); font-size: 13px; }

.kv { padding: 8px 16px; }
.kv > div { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { width: 64px; flex: none; color: var(--ink-3); }
.kv dd { margin: 0; flex: 1; min-width: 0; word-break: break-all; }
.kv .gallery { margin-top: 8px; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gallery a { aspect-ratio: 1; border-radius: var(--r1); overflow: hidden; background: var(--sunk); display: block; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }

.timeline { padding: 16px; list-style: none; margin: 0; }
.timeline li { position: relative; padding: 0 0 16px 20px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: #C9D0DB; }
.timeline li::after { content: ""; position: absolute; left: 3px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li:first-child::before { background: var(--pri); }
.timeline .t { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.timeline .t b { color: var(--ink-2); font-weight: 500; margin-right: 4px; }
.timeline .x { margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.timeline .gallery { margin-top: 8px; }
.timeline li.private .x { color: var(--ink-2); }
.tag { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--warn); background: var(--warn-l); border-radius: 4px; padding: 0 6px; margin-left: 4px; vertical-align: 1px; }
.tag .i { --s: 12px; }

.rate { padding: 16px; }
.rate h3 { font-size: 17px; }
.rate .seg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.rate .seg3 button { height: 64px; border: 1px solid var(--line); border-radius: var(--r1); background: #fff; display: grid; place-content: center; justify-items: center; gap: 2px; color: var(--ink-2); }
.rate .seg3 button[aria-pressed="true"] { border-color: var(--pri); background: var(--pri-l); color: var(--pri-d); }
.rate .seg3 .i { --s: 24px; }

/* 我的报修 */
.list { display: grid; }
.list a { display: grid; gap: 4px; padding: 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--surface); }
.list a:last-child { border-bottom: 0; }
.list .top { display: flex; align-items: center; gap: 8px; }
.list .top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.list .meta { font-size: 13px; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; }

/* 空 / 加载 / 出错 */
.empty { padding: 48px 24px; text-align: center; color: var(--ink-3); }
.empty .i { --s: 40px; color: #B6BECB; }
.empty b { display: block; color: var(--ink-2); font-size: 17px; margin-top: 12px; font-weight: 500; }
.empty p { margin-top: 4px; }
.empty .btn { margin-top: 16px; }
.skeleton { padding: 24px 16px; display: grid; gap: 12px; }
.skeleton i { display: block; height: 16px; border-radius: 4px; background: linear-gradient(90deg, var(--sunk), #F6F8FA, var(--sunk)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
.skeleton i:nth-child(1) { width: 40%; height: 24px; }
.skeleton i:nth-child(3) { width: 70%; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.done-box { padding: 48px 24px 24px; text-align: center; }
.done-box .i { --s: 56px; color: var(--ok); stroke-width: 1.25; }
.done-box h2 { font-size: 25px; margin-top: 12px; }
.done-box .no { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--r1); background: var(--surface); border: 1px solid var(--line); font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.done-box .no button { border: 0; background: none; color: var(--pri); font-size: 13px; padding: 4px; }
.done-box p { color: var(--ink-2); margin: 16px auto 0; max-width: 30em; }

.foot { padding: 32px 16px 0; text-align: center; color: var(--ink-3); font-size: 13px; }

/* ---------- 弹层 ---------- */
.toast { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); z-index: 50; max-width: 80vw; padding: 12px 16px; border-radius: var(--r1); background: rgba(20, 21, 23, .88); color: #fff; font-size: 15px; text-align: center; }
.mask { position: fixed; inset: 0; z-index: 40; background: rgba(20, 21, 23, .45); display: grid; place-items: center; padding: 24px; animation: fade .15s ease-out backwards; }
.dialog { width: 100%; max-width: 320px; background: var(--surface); border-radius: var(--r2); overflow: hidden; box-shadow: var(--sh2); }
.dialog-body { padding: 24px 20px 20px; text-align: center; }
.dialog-body h3 { font-size: 17px; margin-bottom: 8px; }
.dialog-body p { color: var(--ink-2); white-space: pre-wrap; }
.dialog-acts { display: flex; border-top: 1px solid var(--line); }
.dialog-acts button { flex: 1; height: 48px; border: 0; background: none; font-size: 17px; color: var(--ink-2); }
.dialog-acts button + button { border-left: 1px solid var(--line); }
.dialog-acts .ok { color: var(--pri); font-weight: 600; }
.sheet-mask { place-items: end center; padding: 0; }
.sheet { width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r2) var(--r2) 0 0; animation: up .2s ease-out backwards; padding-bottom: var(--safe-b); }
.sheet-h { display: flex; align-items: center; gap: 8px; padding: 12px 8px 12px 16px; border-bottom: 1px solid var(--line); }
.sheet-h h3 { flex: 1; font-size: 17px; }
.sheet-b { overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
.sheet-b.flush { padding: 0; }
.sheet-f { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.sheet-f .btn { flex: 1; }
.search { display: flex; align-items: center; gap: 8px; margin: 12px 16px; padding: 0 12px; height: 40px; border-radius: var(--r1); background: var(--sunk); color: var(--ink-3); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; height: 100%; color: var(--ink); }
.input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r1); background: #fff; outline: none; }
.input:focus { border-color: var(--pri); }
.form { display: grid; gap: 16px; }
.field label { display: block; color: var(--ink-2); margin-bottom: 6px; font-size: 15px; }
.field .input, .field select, .field textarea { width: 100%; }
.field select { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r1); background: #fff; }

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
