/* 视觉方向：「展柜工坊」——墨黑 + 黄铜，暖白纸面，像一张干净的工单 / 货运单。
   数字用 Bahnschrift（Windows）/ DIN（苹果），工业感、等宽对齐；中文用系统字体（服务器在国内，不依赖 Google Fonts）。 */
:root {
  --paper: #f5f3ee; --surface: #ffffff; --sunken: #efece5;
  --ink: #16191b; --ink-2: #3a3f43; --muted: #63696d; --faint: #72787c;
  --line: #e6e2d9; --line-2: #d8d3c7;
  --brass: #89672e; --brass-2: #c9a45c; --brass-soft: #f5ecd9;
  --ok: #2e7d4f; --ok-soft: #e4f2e9;
  --warn: #8c5800; --warn-soft: #fdf1d8;
  --bad: #c0362c; --bad-soft: #fcebe9;
  --info: #2b5c8a; --info-soft: #e6eef6;
  --r-sm: 8px; --r: 14px; --r-lg: 18px;
  --sh-1: 0 1px 0 rgba(22,25,27,.04), 0 1px 3px rgba(22,25,27,.06);
  --sh-2: 0 2px 4px rgba(22,25,27,.04), 0 8px 24px rgba(22,25,27,.08);
  --num: "Bahnschrift", "DIN Alternate", "DIN Condensed", "Roboto Condensed", "Segoe UI", sans-serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --side: 236px;
  font-size: 15px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0; letter-spacing: -.01em; font-weight: 700; }
h2 { font-size: 1rem; margin: 0; font-weight: 700; letter-spacing: .01em; }
h3 { font-size: .78rem; margin: 1.1rem 0 .5rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.loading { padding: 4rem; text-align: center; color: var(--muted); }

/* ============ 导航：桌面左侧栏 / 手机顶栏 ============ */
.topbar { background: var(--ink); color: #e9e6df; z-index: 20; }
.topbar:empty { display: none; }
.topbar .brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; font-weight: 700; letter-spacing: .02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(140deg, var(--brass-2), var(--brass)); display: grid; place-items: center; color: var(--ink); font-family: var(--num); font-weight: 700; font-size: 15px; flex: none; }
.brand small { display: block; font-weight: 400; font-size: .72rem; color: #9da1a3; letter-spacing: .04em; }
.brand-copy { min-width:0; }
.brand-name { display:flex; flex-wrap:wrap; column-gap:.35em; line-height:1.45; }
.brand-name > span { white-space:nowrap; }
.topbar nav a { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: #b9bcbd; padding: .55rem .75rem; border-radius: 10px; font-size: .95rem; }
.topbar nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.topbar nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.topbar nav a.on { color: #fff; background: rgba(201,164,92,.16); box-shadow: inset 2px 0 0 var(--brass-2); }
.topbar nav a.on svg { color: var(--brass-2); opacity: 1; }
.tb-user { display: flex; align-items: center; gap: .6rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #2c3134; color: var(--brass-2); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.tb-user .who { font-size: .85rem; line-height: 1.3; min-width: 0; }
.tb-user .who span { display: block; color: #8d9194; font-size: .75rem; }
.tb-btn { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #d8d5ce; border-radius: 8px; padding: .25rem .6rem; cursor: pointer; font-size: .8rem; }
.tb-btn:hover { background: rgba(255,255,255,.14); color: #fff; }

@media (min-width: 1024px) {
  .topbar { position: fixed; inset: 0 auto 0 0; width: var(--side); display: flex; flex-direction: column; padding: 1.25rem .9rem 1rem; }
  .topbar .brand { padding: 0 .4rem 1.5rem; }
  .topbar .brand-name { flex-direction:column; }
  .topbar nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
  .tb-user { border-top: 1px solid rgba(255,255,255,.08); padding: .9rem .4rem 0; }
  .tb-user .who { flex: 1; }
  body.has-nav main { margin-left: var(--side); }
}
@media (max-width: 1023px) {
  .topbar { position: sticky; top: 0; display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem; padding-top: max(.55rem, env(safe-area-inset-top)); }
  .topbar .brand small { display: none; }
  .topbar nav { display: flex; gap: .15rem; flex: 1; justify-content: flex-end; overflow-x: auto; }
  .topbar nav a { padding: .4rem .6rem; font-size: .9rem; }
  .topbar nav a span.lbl { display: none; }
  .topbar nav a.on { box-shadow: none; }
  .tb-user .who, .tb-user .avatar { display: none; }
}

/* 右上角个人信息栏 */
.appbar:empty { display: none; }
.appbar { position: sticky; top: 0; z-index: 15; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.appbar-inner { display: flex; align-items: center; gap: .6rem; padding: .55rem 2rem; max-width: 1240px; }
.userchip { display: flex; align-items: center; gap: .55rem; text-decoration: none; padding: .25rem .7rem .25rem .3rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; min-width: 0; }
.userchip:hover { border-color: var(--line-2); background: #fcfbf8; }
.userchip .avatar { background: var(--ink); color: var(--brass-2); width: 30px; height: 30px; }
.userchip .who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.userchip .who b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.role { font-size: .72rem; font-weight: 600; color: var(--muted); }
.role-owner { color: var(--brass); } .role-sales { color: var(--info); } .role-installer { color: var(--ok); }
.btn.logout { border-color: #e9b9b3; color: var(--bad); background: #fff; font-weight: 600; }
.btn.logout:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (min-width: 1024px) { body.has-nav .appbar { margin-left: var(--side); } }
@media (max-width: 1023px) {
  .appbar { position: static; }
  .appbar-inner { padding: .45rem .9rem; }
  .userchip .who b { max-width: 130px; }
}

main { max-width: 1240px; padding: 1.75rem 2rem 5rem; }
body:not(.has-nav) main { max-width: none; padding: 0; }
@media (min-width: 1024px) { body.has-nav main { max-width: calc(1240px + var(--side)); } }
.page-head { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head .spacer, .grow { flex: 1; }
.eyebrow { font-size: .78rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; margin-bottom: .2rem; }
.eyebrow .code { font-family: var(--num); letter-spacing: .04em; color: var(--ink-2); text-transform: none; }

/* ============ 基础组件 ============ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); padding: 1.25rem 1.35rem; margin-bottom: 1.1rem; }
.card-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.card-head h2 { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--line-2); background: var(--surface); padding: .5rem 1rem; border-radius: 10px; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; min-height: 40px; font-weight: 500; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { border-color: #bdb7a8; background: #fcfbf8; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #2a2f32; }
.btn.brass { background: var(--brass); border-color: var(--brass); color: #fff; }
.btn.brass:hover { background: #95732f; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--sunken); }
.btn.danger { color: var(--bad); }
.btn.small { padding: .25rem .7rem; min-height: 32px; font-size: .86rem; border-radius: 8px; }
.btn.big { min-height: 56px; font-size: 1.1rem; width: 100%; border-radius: 14px; font-weight: 600; }
.btn:disabled { opacity: .45; cursor: default; }
.link { background: none; border: 0; color: var(--info); cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px; text-align: left; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.row { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.right { text-align: right; }
.hidden { display: none !important; }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--sunken); color: var(--ink-2); white-space: nowrap; line-height: 1.6; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brass { background: var(--brass-soft); color: #7f6128; }
.badge.grey { background: var(--sunken); color: var(--muted); }
.alert { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem 1rem; border-radius: 12px; margin-bottom: .9rem; font-size: .92rem; border: 1px solid transparent; }
.alert.bad { background: var(--bad-soft); color: var(--bad); border-color: #f4cbc6; }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: #f2dfb2; }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: #c6e4d1; }

/* ============ 表单 ============ */
label.f { display: block; margin-bottom: .9rem; }
label.f > span, .f-label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: .3rem; font-weight: 500; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=tel], input:not([type]), select, textarea {
  width: 100%; padding: .55rem .75rem; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; min-height: 42px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(168,131,63,.16); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.seg { display: inline-flex; background: var(--sunken); border-radius: 10px; padding: 3px; gap: 2px; }
.seg label { padding: .35rem 1rem; cursor: pointer; border-radius: 8px; user-select: none; color: var(--muted); font-weight: 500; }
.seg input { display: none; }
.seg label:has(input:checked) { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .15rem 1rem; }
.checks label { display: flex; gap: .55rem; align-items: flex-start; padding: .35rem 0; cursor: pointer; }
.checks input[type=checkbox], input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.checks input[type=checkbox] { margin-top: .2rem; }
.qty-row { display: flex; align-items: center; gap: .5rem; }
.qty-row input[type=number] { width: 76px; min-height: 34px; padding: .2rem .5rem; }

/* 需求表单 */
.form-nav { position: sticky; top: 52px; z-index: 5; display: flex; gap: .35rem; overflow-x: auto; padding: .6rem 0; margin-bottom: .6rem; background: var(--paper); }
.form-nav a { text-decoration: none; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: .85rem; white-space: nowrap; color: var(--ink-2); }
.form-nav a:hover { border-color: var(--brass); color: var(--ink); }
.field { display: grid; grid-template-columns: minmax(180px, 32%) 1fr; gap: .4rem 1.25rem; padding: .85rem 0; border-top: 1px solid var(--line); align-items: start; }
.field:first-of-type { border-top: 0; }
.field-head { display: flex; align-items: flex-start; gap: .5rem; padding-top: .55rem; }
.field-head .lbl { font-weight: 600; font-size: .92rem; flex: 1; }
.field-body { min-width: 0; }
.pend-toggle { font-size: .74rem; border: 1px dashed var(--line-2); color: var(--faint); background: transparent; border-radius: 999px; padding: .05rem .55rem; cursor: pointer; white-space: nowrap; font-weight: 600; }
.pend-toggle:hover { border-color: var(--warn); color: var(--warn); }
.pend-toggle.on { background: var(--warn-soft); border: 1px solid #efd59c; color: var(--warn); }
.field .note-in { margin-top: .45rem; min-height: 36px; font-size: .9rem; background: #fcfbf8; }
.group-hint { display: flex; gap: .6rem; background: var(--brass-soft); color: #6f5523; padding: .7rem .9rem; border-radius: 12px; font-size: .88rem; margin-bottom: .6rem; }
.save-bar { position: sticky; bottom: 0; z-index: 6; display: flex; gap: .75rem; align-items: center; padding: .85rem 1.1rem; margin-top: 1rem; background: rgba(22,25,27,.94); color: #fff; border-radius: 14px; box-shadow: var(--sh-2); backdrop-filter: blur(6px); }
.save-bar .btn.brass { min-width: 140px; }

/* ============ 需求模块配色（编辑和查看共用） ============ */
[data-g=basic]    { --g: #3a3f43; --g-soft: #f0efec; --g-line: #d9d6cf; }
[data-g=site]     { --g: #2b6cb0; --g-soft: #eaf2fb; --g-line: #c3d8f0; }
[data-g=unload]   { --g: #b7791f; --g-soft: #fdf3e1; --g-line: #f0d9a8; }
[data-g=carry]    { --g: #2f855a; --g-soft: #e8f5ee; --g-line: #bfe0cc; }
[data-g=cabinets] { --g: #6b46c1; --g-soft: #f1ecfb; --g-line: #d6c8f2; }
[data-g=scope]    { --g: #a8833f; --g-soft: #f7efdf; --g-line: #e8d6b0; }
.gcard { padding: 0; overflow: hidden; border-color: var(--g-line); border-left: 5px solid var(--g); }
.gcard-head { display: flex; align-items: center; gap: .7rem; padding: .85rem 1.25rem; background: var(--g-soft); border-bottom: 1px solid var(--g-line); }
.gcard-head h2 { flex: 1; color: var(--g); font-size: 1.05rem; }
.gnum { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--g); color: #fff; font-family: var(--num); font-weight: 700; font-size: .95rem; flex: none; }
.gcard-body { padding: .4rem 1.25rem 1.1rem; }
.gcard .group-hint { margin-top: .8rem; }
.form-nav a[data-g] { border-color: var(--g-line); color: var(--g); background: var(--g-soft); font-weight: 600; }
.form-nav a[data-g]:hover { border-color: var(--g); }
.form-nav a .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--g); margin-right: .35rem; }
/* 模块附图 */
.gphotos { margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed var(--g-line, var(--line)); }
.gphotos-head { display: flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 700; color: var(--g, var(--ink)); margin-bottom: .55rem; }
.gphotos-head .muted { font-weight: 400; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .55rem; }
.photo { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--sunken); cursor: pointer; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .doc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; padding: .4rem; font-size: .72rem; color: var(--muted); text-align: center; word-break: break-all; }
.photo .doc b { font-family: var(--num); font-size: .95rem; color: var(--ink-2); text-transform: uppercase; }
.photo .rm { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(22,25,27,.75); color: #fff; cursor: pointer; font-size: .8rem; line-height: 1; }
.photo .rm:hover { background: var(--bad); }
.photo .tag { position: absolute; left: 4px; bottom: 4px; font-size: .66rem; padding: .05rem .4rem; border-radius: 6px; background: rgba(22,25,27,.72); color: #fff; }
.photo.pending { opacity: .75; border-style: dashed; }
.photo-add { aspect-ratio: 1; border-radius: 10px; border: 2px dashed var(--g-line, var(--line-2)); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; cursor: pointer; color: var(--g, var(--muted)); font-size: .8rem; font-weight: 600; text-align: center; padding: .3rem; }
.photo-add:hover { background: var(--g-soft, var(--sunken)); border-color: var(--g, var(--brass)); }
.photo-add input { display: none; }
/* 查看页的模块分区 */
.spec-block { border: 1px solid var(--g-line); border-left: 4px solid var(--g); border-radius: 12px; margin-bottom: .8rem; overflow: hidden; }
.spec-block .spec-head { display: flex; align-items: center; gap: .55rem; padding: .55rem .9rem; background: var(--g-soft); color: var(--g); font-weight: 700; font-size: .92rem; }
.spec-block .spec-head .gnum { width: 22px; height: 22px; font-size: .8rem; border-radius: 6px; }
.spec-block .spec-body { padding: .2rem .9rem .7rem; }
.spec-block .gphotos { margin-top: .6rem; padding-top: .6rem; }

/* ============ 需求展示（规格单） ============ */
.spec-group { margin-top: 1.2rem; }
.spec-group:first-child { margin-top: 0; }
.spec-title { display: flex; align-items: center; gap: .5rem; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); font-weight: 700; margin-bottom: .45rem; }
.spec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.kv { display: grid; grid-template-columns: minmax(140px, 42%) 1fr; margin: 0; }
.kv dt, .kv dd { padding: .42rem 0; border-bottom: 1px dashed var(--line); margin: 0; }
.kv dt { color: var(--muted); font-size: .88rem; padding-right: .75rem; }
.kv dd { word-break: break-word; font-weight: 500; }
.kv dd.pend { color: var(--warn); }
.kv .nt { color: var(--muted); font-size: .85rem; font-weight: 400; }

/* ============ 看板 ============ */
.pipeline { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 1.1rem; box-shadow: var(--sh-1); }
.pipeline a { background: var(--surface); padding: .8rem 1rem; text-decoration: none; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.pipeline a:hover { background: #fcfbf8; }
.pipeline a.on { background: var(--ink); color: #fff; }
.pipeline a.on .k { color: #b9bcbd; }
.pipeline .v { font-family: var(--num); font-size: 1.7rem; line-height: 1.1; font-weight: 600; }
.pipeline .k { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: inline-flex; gap: 2px; background: var(--sunken); padding: 3px; border-radius: 12px; max-width: 100%; overflow-x: auto; }
.tabs a { padding: .42rem 1.1rem; border-radius: 9px; text-decoration: none; color: var(--muted); white-space: nowrap; font-weight: 500; }
.tabs a .cnt { font-family: var(--num); margin-left: .35rem; color: var(--faint); }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.toolbar { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; margin-bottom: 1.1rem; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; width: 100%; }
.filters > * { min-width: 0; min-height: 38px; font-size: .9rem; }
.filters input[name=q] { grid-column: span 2; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.05rem 1.15rem 1rem; color: inherit; text-decoration: none; box-shadow: var(--sh-1); transition: box-shadow .18s, transform .18s, border-color .18s; }
.pcard:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: var(--line-2); }
.pcard.alert-edge { box-shadow: inset 3px 0 0 var(--bad), var(--sh-1); }
.pcard-top { display: flex; align-items: center; gap: .5rem; }
.pcard .code { font-family: var(--num); font-size: .82rem; color: var(--muted); letter-spacing: .04em; flex: 1; }
.pcard .title { font-weight: 700; font-size: 1.12rem; margin: .35rem 0 .1rem; line-height: 1.35; }
.pcard .meta { color: var(--muted); font-size: .87rem; }
.pcard .tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .7rem; }
.pcard-foot { display: flex; align-items: flex-end; gap: 1rem; margin-top: .9rem; padding-top: .85rem; border-top: 1px dashed var(--line); }
.pcard-foot .m { display: flex; flex-direction: column; min-width: 0; }
.pcard-foot .m .k { font-size: .74rem; color: var(--muted); }
.pcard-foot .m .v { font-family: var(--num); font-size: 1.15rem; font-weight: 600; }
.pcard-foot .m .v.pos { color: var(--ok); }
.stagebar { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; margin-top: .75rem; }
.stagebar i { height: 4px; border-radius: 2px; background: var(--sunken); }
.stagebar i.done { background: var(--ink-2); }
.stagebar i.cur { background: var(--brass); }
.stagebar.lost i.done, .stagebar.lost i.cur { background: var(--faint); }
.eta { display: inline-flex; align-items: baseline; gap: .3rem; font-size: .86rem; color: var(--ink-2); }
.eta b { font-family: var(--num); font-size: 1.05rem; }
.eta.soon b { color: var(--warn); }
.eta.past b { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 4rem 1rem; border: 1px dashed var(--line-2); border-radius: var(--r); background: rgba(255,255,255,.4); }
.empty .icon { font-size: 2rem; opacity: .4; display: block; margin-bottom: .4rem; }

/* ============ 项目详情 ============ */
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 1.35rem 1.5rem 1.2rem; margin-bottom: 1.2rem; }
.hero-top { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.hero-top .grow { min-width: 220px; }
.hero-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: .9rem; font-size: .9rem; color: var(--muted); }
.hero-meta b { color: var(--ink); font-weight: 600; }
.stepper { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin-top: 1.2rem; counter-reset: s; }
.stepper button { position: relative; background: none; border: 0; padding: 1.35rem .2rem 0; text-align: center; font-size: .78rem; color: var(--faint); cursor: default; line-height: 1.3; }
.stepper button::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: var(--line); }
.stepper button::after { content: ""; position: absolute; top: 2px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; border: 2px solid var(--line-2); box-sizing: border-box; }
.stepper button.done { color: var(--ink-2); }
.stepper button.done::before { background: var(--ink-2); }
.stepper button.done::after { background: var(--ink-2); border-color: var(--ink-2); }
.stepper button.cur { color: var(--ink); font-weight: 700; }
.stepper button.cur::before { background: linear-gradient(90deg, var(--ink-2) 50%, var(--line) 50%); }
.stepper button.cur::after { width: 16px; height: 16px; margin-left: -8px; top: 0; background: var(--brass); border-color: #fff; box-shadow: 0 0 0 2px var(--brass); }
.stepper.clickable button { cursor: pointer; }
.stepper.clickable button:hover { color: var(--ink); }
.stepper.lost button.done::after, .stepper.lost button.cur::after { background: var(--faint); border-color: var(--faint); box-shadow: none; }
.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.detail > .col { min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 1rem; border: 1px solid var(--line); }
.stat { background: #fcfbf8; padding: .75rem .9rem; display: flex; flex-direction: column; min-width: 0; }
.stat .v { font-family: var(--num); font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.stat .v.pos { color: var(--ok); }
.stat .k { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inst-block { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; margin-bottom: .8rem; }
.inst-block-head { display: flex; align-items: center; gap: .6rem; }
.inst-block-head .nm { font-weight: 700; flex: 1; }
.quote-box { border-radius: 12px; padding: .9rem 1rem; margin-top: .7rem; background: #fcfbf8; border: 1px solid var(--line); }
.quote-box.flagged { border-color: #f1c2bc; background: #fffaf9; }
.quote-box.adopted { border-color: #bfdcc9; background: #f8fcf9; }
.quote-box .big { font-family: var(--num); font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.confirm-line { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .55rem; padding: .45rem .7rem; border-radius: 9px; font-size: .86rem; font-weight: 600; background: var(--sunken); color: var(--muted); }
.confirm-line.ok { background: var(--ok-soft); color: var(--ok); }
.confirm-line.warn { background: var(--warn-soft); color: var(--warn); }
.quote-meta { display: flex; gap: .4rem 1.1rem; flex-wrap: wrap; font-size: .86rem; color: var(--muted); margin-top: .45rem; }
.quote-meta b { color: var(--ink); font-weight: 600; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th, table.t td { padding: .55rem .45rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.t th { color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
table.t td.num, table.t th.num { text-align: right; font-family: var(--num); white-space: nowrap; }
table.t tr.voided td { color: var(--faint); text-decoration: line-through; }
table.t tr.total td { border-bottom: 0; border-top: 2px solid var(--ink); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.progress { height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; margin: .4rem 0 .2rem; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.att { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.att:first-child { border-top: 0; padding-top: 0; }
.att .fn { flex: 1; min-width: 160px; word-break: break-all; }
.file-ic { width: 44px; height: 44px; border-radius: 10px; background: var(--sunken); display: grid; place-items: center; font-family: var(--num); font-size: .7rem; font-weight: 700; color: var(--muted); flex: none; text-transform: uppercase; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--sunken); flex: none; }
.upload-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; padding: .8rem; background: var(--sunken); border-radius: 12px; }
.changes { padding: 0; margin: 0; list-style: none; }
.changes li { position: relative; padding: .5rem 0 .5rem 1.1rem; font-size: .88rem; border-left: 2px solid var(--line); margin-left: .3rem; }
.changes li::before { content: ""; position: absolute; left: -5px; top: .85rem; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
details > summary { cursor: pointer; color: var(--ink-2); font-weight: 600; list-style: none; display: flex; align-items: center; gap: .4rem; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "›"; display: inline-block; transition: transform .15s; font-size: 1.1rem; color: var(--muted); }
details[open] > summary::before { transform: rotate(90deg); }

/* ============ 登录 ============ */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--ink); color: #e9e6df; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(201,164,92,.25); box-shadow: 0 0 0 60px rgba(201,164,92,.04), 0 0 0 120px rgba(201,164,92,.03); }
.login-art h2 { font-size: 2.1rem; line-height: 1.25; font-weight: 700; max-width: 14em; color: #fff; text-wrap:balance; }
.login-art .hero-phrase { display:inline-block; white-space:nowrap; }
.login-art h2 em { font-style: normal; color: var(--brass-2); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.login-box { width: 100%; max-width: 360px; }
.login-box h1 { margin-bottom: .3rem; }
.login-box .sub { color: var(--muted); margin-bottom: 1.8rem; }
@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; }
  .login-art { padding: 1.5rem 1.25rem; }
  .login-art h2 { font-size: 1.4rem; margin-top: 1rem; }
  .login-art::after { width: 220px; height: 220px; right: -80px; bottom: -80px; }
}

/* ============ 安装队手机端 ============ */
.inst-hero { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 1.15rem 1.25rem; margin-bottom: 1rem; position: relative; overflow: hidden; }
.inst-hero .code { font-family: var(--num); color: #9da1a3; font-size: .82rem; letter-spacing: .05em; }
.inst-hero h1 { color: #fff; font-size: 1.35rem; margin: .15rem 0 .8rem; }
.inst-hero .countdown { display: flex; align-items: baseline; gap: .4rem; }
.inst-hero .countdown b { font-family: var(--num); font-size: 2.6rem; line-height: 1; color: var(--brass-2); font-weight: 600; }
.inst-hero .scope { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .92rem; color: #cfccc5; }
.inst-status { font-family: var(--num); font-size: 1.3rem; font-weight: 600; }
.inst-status.todo { color: var(--brass); }
.bigform input[type=text], .bigform input[type=date], .bigform input[type=number], .bigform input:not([type]) { min-height: 54px; font-size: 1.15rem; border-radius: 12px; }
.bigform .money-in { font-family: var(--num); font-size: 1.8rem !important; font-weight: 600; letter-spacing: .02em; }
.step-label { display: flex; align-items: center; gap: .55rem; font-weight: 600; margin-bottom: .45rem; font-size: .98rem; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--brass-2); font-family: var(--num); font-size: .88rem; flex: none; }
.file-drop { display: flex; flex-direction: column; align-items: center; gap: .2rem; border: 2px dashed var(--line-2); border-radius: 14px; padding: 1.3rem 1rem; text-align: center; background: #fcfbf8; cursor: pointer; transition: border-color .15s, background .15s; }
.file-drop:hover { border-color: var(--brass); background: var(--brass-soft); }
.file-drop input { display: none; }
.file-drop .ic { font-size: 1.8rem; line-height: 1; }
.file-drop .fname { display: block; margin-top: .25rem; font-weight: 600; word-break: break-all; color: var(--ok); }
.item-row { display: grid; grid-template-columns: 1fr 110px 40px; gap: .4rem; margin-bottom: .45rem; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .7rem 1.2rem; border-radius: 12px; z-index: 50; max-width: calc(100% - 2rem); box-shadow: var(--sh-2); font-weight: 500; }
.toast.err { background: var(--bad); }

@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; }
  .field { grid-template-columns: 1fr; gap: .3rem; }
  .field-head { padding-top: 0; }
}
@media (max-width: 640px) {
  main { padding: 1rem .9rem 5rem; }
  h1 { font-size: 1.35rem; }
  .card { padding: 1rem; border-radius: 12px; }
  .hero { padding: 1rem; }
  .cards { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { border-bottom: 0; padding-bottom: 0; font-size: .8rem; }
  .kv dd { padding-top: .1rem; }
  .stepper { grid-template-columns: repeat(8, 1fr); }
  .stepper button { font-size: 0; padding-top: 1.1rem; }
  .stepper button.cur { font-size: .74rem; white-space: nowrap; overflow: visible; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .save-bar { margin: 1rem -.9rem 0; border-radius: 0; }
}

/* ============ 界面精修：同一套工单语言，清晰的层级与触屏操作 ============ */
:root { --side: 224px; --r: 16px; --sh-1: 0 2px 5px rgba(22,25,27,.025); }
html { scroll-padding-top: 130px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.topbar nav a { min-height: 46px; border-radius: 9px; transition: background .18s, color .18s; }
.topbar nav a.on { background: #343229; }
.sidebar-note { padding: 1.2rem .7rem .2rem; border-top: 1px solid #36393b; color: #b5b7b5; font-size: .8rem; }
.sidebar-note small { display: block; margin-top: .45rem; color: #a4a8a7; font-family: var(--num); font-size: .75rem; }
.appbar-inner { min-height: 72px; max-width: none; padding: .7rem 2.4rem; gap: .8rem; }
.appbar-context { display: flex; align-items: center; gap: .8rem; font-size: .84rem; color: var(--muted); }
.appbar-context b { color: var(--ink-2); font-weight: 500; border-left: 1px solid var(--line-2); padding-left: .8rem; }
.userchip { border-color: transparent; background: transparent; gap: .6rem; padding-right: .6rem; min-height: 44px; }
.userchip .who { gap: 3px; }
.btn.logout { border-color: var(--line); color: var(--ink-2); background: var(--surface); font-weight: 500; }
.btn.logout:hover { background: var(--bad-soft); border-color: #e9b9b3; color: var(--bad); }
.btn, .btn.small { min-height: 44px; }
.btn { padding: .6rem 1.05rem; transition: background .18s, border-color .18s, box-shadow .18s; }
.btn.primary { box-shadow: 0 2px 3px #16191b12; }
.btn.primary:hover { background: #343a3c; border-color: #343a3c; }
.btn:active { transform: none; }
.btn:disabled { cursor: wait; }
main { padding: 2rem 2.4rem 5rem; }
.page-head { margin-bottom: 1.65rem; }
.page-head h1 { font-size: 1.85rem; letter-spacing: -.035em; }
.page-sub { margin: .5rem 0 0; color: var(--muted); font-size: .9rem; }
.page-actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.board-head { align-items: center; }
.board-head .eyebrow { color: var(--brass); font-size: .73rem; margin-bottom: .5rem; letter-spacing: .1em; }
.pipeline { gap: .9rem; background: transparent; border: 0; overflow: visible; box-shadow: none; margin-bottom: 1.75rem; }
.pipeline a { border: 1px solid var(--line); border-radius: 13px; padding: 1.1rem 1.25rem; box-shadow: var(--sh-1); transition: border-color .18s, background .18s; }
.pipeline a:hover { border-color: var(--brass); background: #fffdf8; }
.pipeline-heading { display: flex; align-items: center; gap: .5rem; justify-content: space-between; }
.pipeline .k { color: var(--ink-2); font-size: .86rem; white-space: normal; }
.pipeline-step { font-family: var(--num); font-size: .75rem; color: var(--brass); background: var(--brass-soft); border-radius: 6px; padding: .15rem .38rem; }
.pipeline-number { display: flex; align-items: baseline; gap: .6rem; margin-top: .8rem; }
.pipeline-number > span:last-child { font-size: .75rem; color: var(--muted); }
.pipeline .v { font-size: 2rem; letter-spacing: -.04em; }
.pipeline a.on { background: #292c2c; border-color: #292c2c; color: white; }
.pipeline a.on .k, .pipeline a.on .pipeline-number > span:last-child { color: #dbddd8; }
.toolbar { gap: 1rem; margin-bottom: 1.25rem; }
.board-tabs { display: flex; width: 100%; align-items: center; gap: 1rem; justify-content: space-between; }
.tabs { padding: 4px; gap: 4px; background: #eae7e0; border-radius: 11px; }
.tabs a { min-height: 40px; display: flex; align-items: center; justify-content: center; padding: .5rem 1.1rem; font-size: .9rem; border-radius: 8px; }
.result-count { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .75rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.search-row { display: flex; align-items: center; gap: .5rem; flex: 1 1 320px; }
.search-field { flex: 1; min-width: 0; }
.search-field input { background: #fcfbf8; min-height: 44px; }
.search-row .btn { font-size: .88rem; }
.filter-details { display: contents; }
.filter-details > summary { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem .85rem; border: 1px solid var(--line-2); border-radius: 10px; font-size: .88rem; font-weight: 500; }
.filter-details[open] > summary { background: var(--brass-soft); border-color: #d8c8a5; color: #6f5523; }
.filter-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 5px; background: var(--ink); color: white; font: .8rem var(--num); }
.filter-details:not([open]) > .filter-fields { display: none; }
.filter-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); width: 100%; gap: .85rem; padding-top: 1rem; border-top: 1px solid var(--line); order: 4; }
.filter-fields label.f { margin: 0; min-width: 0; }
.filter-fields .f > span { font-size: .78rem; }
.clear-filters { min-height: 44px; display: flex; align-items: center; font-size: .85rem; color: var(--brass); text-underline-offset: 3px; }
.cards { gap: 1.1rem; }
.pcard { padding: 1.25rem; border-radius: 15px; }
.pcard:hover { transform: none; border-color: #bca578; box-shadow: 0 5px 16px #16191b09; }
.pcard .title { margin: .65rem 0 .35rem; font-size: 1.18rem; }
.pcard .meta { line-height: 1.65; }
.pcard .tags { gap: .45rem; margin-top: .85rem; }
.pcard-top { align-items: flex-start; flex-wrap: wrap; }
.pcard .code { padding-top: 2px; }
.pcard-foot { margin-top: 1.15rem; padding-top: 1rem; border-top-style: solid; }
.pcard-foot .m .k { font-size: .76rem; margin-bottom: .2rem; }
.pcard-foot .m .v { font-size: 1.3rem; }
.project-card .tags { margin-bottom: 1rem; }
.project-card .pcard-foot { margin-top: auto; }
.project-card .stagebar:last-of-type { margin-bottom: 1rem; }
.stagebar { gap: 4px; margin-top: 1rem; }
.stagebar i { height: 3px; }
.badge { padding: .16rem .6rem; font-size: .77rem; white-space: normal; }
.empty { padding: 3.5rem 1.5rem; background: #fff; border-style: solid; }
.empty h2 { color: var(--ink); margin-top: .8rem; }
.empty p { font-size: .9rem; margin-bottom: 1.4rem; }
.empty-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; background: var(--sunken); border-radius: 12px; color: var(--brass); }
.empty-icon svg { width: 24px; height: 24px; }
.card { padding: 1.4rem; }
.card-head { padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.gcard { padding: 0; }
.hero { padding: 1.5rem; }
.hero-meta { gap: .65rem 1.4rem; }
.stepper button { min-height: 56px; }
.stat { padding: 1rem; }
.stat .k { white-space: normal; font-size: .8rem; margin-bottom: .35rem; }
.stat .v { font-size: 1.6rem; }
.form-nav { top: 72px; }
.form-nav a { min-height: 40px; display: inline-flex; align-items: center; }
.pend-toggle { min-height: 32px; color: var(--muted); }
.field-head { align-items: center; }
label.f > .step-label { display: flex; font-size: 1rem; color: var(--ink); gap: .65rem; margin-bottom: .6rem; }
.file-drop { position: relative; background: #faf8f2; border: 1px dashed #b7a581; padding: 1.25rem; }
.file-drop input { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop:focus-within { outline: 3px solid var(--brass); outline-offset: 3px; }
.file-drop .ic { color: var(--brass); display: flex; margin-bottom: .4rem; }
.file-drop .ic svg { width: 28px; height: 28px; }
.inst .inst-hero { padding: 1.4rem; }
.inst .inst-hero h1 { margin-top: .4rem; }
.inst .card-head { margin-bottom: 1.1rem; }
.inst .bigform details > summary { min-height: 44px; font-size: .88rem; line-height: 1.6; }
.inst .bigform .f { margin-bottom: 1.2rem; }
.login-box { max-width: 390px; padding: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-2); }
.login-art h2 { line-height: 1.5; }
.login-art .small { color: #b7b5b0 !important; }
@media (min-width: 1024px) {
  .topbar { padding: 1.6rem .85rem 1.25rem; }
  .topbar .brand { padding-bottom: 2rem; }
  .topbar nav { gap: .35rem; }
  body.has-nav main { max-width: 1600px; }
}
@media (max-width: 1023px) {
  .sidebar-note { display: none; }
  .appbar-inner { min-height: 62px; padding: .55rem 1.25rem; }
  .appbar-context span { display: none; }
  .appbar-context b { border: 0; padding: 0; }
  main { padding: 1.5rem 1.25rem 5rem; }
  .form-nav { top: 64px; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 125px; }
  .topbar { padding: .65rem 1rem; min-height: 56px; }
  .topbar .brand { font-size: .95rem; }
  .topbar nav { position: fixed; inset: auto 0 0; display: flex; justify-content: space-around; padding: .4rem .6rem max(.4rem, env(safe-area-inset-bottom)); gap: .5rem; border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -3px 12px #16191b05; overflow: visible; }
  .topbar nav a { flex: 1; flex-direction: column; justify-content: center; gap: .2rem; padding: .4rem .1rem; min-height: 52px; color: var(--muted); font-size: .7rem; }
  .topbar nav a span.lbl { display: block; }
  .topbar nav a.on { color: #75561e; background: var(--brass-soft); }
  .topbar nav a.on svg { color: #75561e; }
  .topbar nav a:hover { color: var(--ink); background: var(--sunken); }
  .topbar nav a.on:hover { background: var(--brass-soft); }
  .appbar-inner { min-height: 62px; padding: .45rem .85rem; gap: .5rem; justify-content: flex-end; }
  .appbar-context { display: none; }
  .userchip { margin-right: auto; order: -1; padding: 0; border-radius: 8px; gap: .45rem; }
  .userchip .who b { font-size: .8rem; max-width: 100px; }
  .btn.logout { padding: .45rem .65rem; font-size: .8rem; }
  .btn.logout span { display: inline; }
  .appbar .btn.ghost { padding: .45rem .55rem; min-width: 44px; }
  main { padding: 1.25rem 1rem calc(6rem + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 1.25rem; gap: 1rem; }
  .page-head h1 { font-size: 1.55rem; }
  .board-head .grow { flex-basis: 100%; }
  .page-sub { font-size: .85rem; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .pipeline { gap: .6rem; margin-bottom: 1.25rem; }
  .pipeline a { padding: .85rem 1rem; }
  .pipeline .k { font-size: .8rem; }
  .pipeline .v { font-size: 1.65rem; }
  .pipeline-step { font-size: .7rem; }
  .pipeline-number { margin-top: .45rem; }
  .pipeline-number > span:last-child { font-size: .72rem; }
  .board-tabs { gap: .5rem; flex-wrap: wrap; }
  .tabs { width: 100%; }
  .tabs a { flex: 1; padding: .45rem .6rem; min-height: 44px; }
  .result-count { margin-left: .2rem; font-size: .8rem; }
  .filters { padding: .75rem; gap: .6rem; }
  .search-row { flex-basis: 100%; }
  .filter-details > summary { flex: 1; }
  .filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .filter-fields input, .filter-fields select { font-size: 16px; padding: .5rem; min-height: 44px; }
  .search-field input { font-size: 16px; }
  .pcard { padding: 1.15rem; }
  .pcard .title { font-size: 1.12rem; }
  .pcard .meta { font-size: .84rem; overflow-wrap: anywhere; }
  .pcard-foot { gap: .7rem; }
  .pcard-foot .m .v { font-size: 1.25rem; }
  .card { padding: 1.1rem; }
  .gcard { padding: 0; }
  .card-head { gap: .5rem; flex-wrap: wrap; }
  .hero { padding: 1.1rem; }
  .hero-top { gap: .45rem; }
  .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem .2rem; }
  .stepper button, .stepper button.cur { font-size: .72rem; min-height: 52px; white-space: normal; padding: 1.4rem .2rem .15rem; }
  .save-bar { bottom: calc(76px + env(safe-area-inset-bottom)); margin: 1rem 0 0; border-radius: 12px; display: grid; grid-template-columns: 1fr 1fr; padding: .75rem; gap: .5rem; }
  .save-bar .grow { grid-column: 1 / -1; font-size: .76rem; line-height: 1.4; }
  .save-bar .btn.brass { min-width: 0; }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .pend-toggle { min-height: 44px; }
  .item-row { grid-template-columns: minmax(0, 1fr) 90px 44px; }
  .inst .inst-hero { padding: 1.2rem; }
  .inst .inst-hero .countdown b { font-size: 2.1rem; }
  .login-page { min-height: 100dvh; grid-template-rows: auto 1fr; }
  .login-art { gap: 1rem; padding: 1.4rem; }
  .login-art h2 { font-size: 1.35rem; margin: 0; }
  .login-form { align-items: flex-start; padding: 1.4rem 1rem 2rem; }
  .login-box { padding: 1.5rem; }
  .login-box input { font-size: 16px; min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* 订单背景及需求确认 */
.order-status,.pending-panel { padding:1.15rem 1.3rem; margin-bottom:1.2rem; border:1px solid var(--line-2); border-radius:14px; background:#fff; }
.order-status { border-left:4px solid var(--info); display:grid; gap:.4rem; }
.order-status.signed { border-left-color:var(--ok); background:#f4faf6; }
.order-status span { font-size:1.08rem; font-weight:650; }
.order-status small,.field-help { color:var(--muted); font-size:.82rem; }
.order-tag { color:var(--info); font-size:.82rem; margin:.3rem 0; }
.pending-panel { background:var(--warn-soft); border-color:#e7cf9d; }
.pending-panel p { margin:.5rem 0; font-size:.86rem; }
.pending-list { display:flex; flex-wrap:wrap; gap:.5rem; }
.pending-list a,.pending-list button { display:inline-flex; align-items:center; padding:.6rem .8rem; min-height:44px; color:#69470a; border:1px solid #cbb178; background:white; border-radius:8px; font:inherit; text-decoration:none; cursor:pointer; }
.field-help { margin-top:.4rem; }
.field[id], dt[id] { scroll-margin-top:145px; }
.seg label { min-height:44px; display:inline-flex; align-items:center; position:relative; }
.seg input { display:block; position:absolute; opacity:0; width:1px; height:1px; }
.seg label:focus-within { outline:2px solid var(--brass); outline-offset:2px; }
.field:focus-within { background:#fffdf7; }

#field_order_status { background:#f1f6fb; border:1px solid #b8cee2; border-radius:10px; padding:1rem; margin:.8rem 0; }
#field_order_status .lbl { color:#234f73; }

/* 安装工作台：同一份业务数据，桌面完整展开，手机顺序阅读。 */
.installer-project, .installation-page { width:100%; max-width:none; }
.installer-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,400px); gap:1.4rem; align-items:start; }
.installer-main, .installer-aside, .installation-documents, .installation-summary { min-width:0; }
.installation-entry { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1.1rem 1.3rem; margin-bottom:1rem; border:1px solid var(--brass); border-radius:var(--r-lg); background:var(--brass-soft, #f7f1e3); text-decoration:none; color:var(--ink); }
.installation-entry b { display:block; font-size:1.1rem; }
.installation-entry small { display:block; margin-top:.3rem; color:var(--muted); }
.address-card { display:flex; gap:1rem; align-items:center; flex-wrap:wrap; background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:1.1rem 1.3rem; margin-bottom:1rem; }
.address-card .grow { min-width:180px; }
.address-text { white-space:pre-wrap; overflow-wrap:anywhere; font-weight:600; line-height:1.7; }
.installation-date-row { display:flex; align-items:center; flex-wrap:wrap; gap:.75rem; width:100%; border-top:1px solid var(--line); padding-top:1rem; }
.address-actions, .project-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.address-actions .btn, .project-actions .btn { min-height:44px; }
.address-card.compact { border:0; border-top:1px solid var(--line); border-radius:0; padding:.9rem 0 0; margin-top:1rem; font-size:.88rem; }
.address-card.compact .address-actions { width:100%; }
.project-title { display:block; text-decoration:none; color:var(--ink); }
.inst .pcard .project-actions { margin-top:.8rem; }
.installation-layout { display:grid; grid-template-columns:320px minmax(0,1fr); gap:1.4rem; align-items:start; }
.installation-summary .address-actions { width:100%; }
.installation-summary .kv { grid-template-columns:1fr; }
.installation-summary .kv dt { padding-bottom:.15rem; border-bottom:0; }
.installation-summary .kv dd { padding-top:0; margin:0; }
.document-intro p { line-height:1.7; }
.document-upload { display:grid; grid-template-columns:1fr 2fr; gap:.8rem 1rem; align-items:end; padding-top:1rem; border-top:1px solid var(--line); }
.document-upload .f { margin:0; min-width:0; }
.document-upload input[type=file] { max-width:100%; }
.document-upload p { grid-column:1 / -1; margin:0; }
.document-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:1rem; }
.document-tile { border:1px solid var(--line); border-radius:12px; overflow:hidden; min-width:0; }
.document-preview { width:100%; aspect-ratio:4/3; display:flex; align-items:center; justify-content:center; border:0; background:#f0efeb; cursor:pointer; overflow:hidden; }
.document-preview img { width:100%; height:100%; object-fit:contain; }
.document-ext { text-transform:uppercase; font-family:var(--num); font-size:2rem; color:var(--brass); }
.document-caption { padding:.85rem; }
.document-caption b { display:block; overflow-wrap:anywhere; font-size:.95rem; }
.document-caption small { display:block; color:var(--muted); font-size:.75rem; margin:.4rem 0; }
.document-caption .project-actions { margin-top:.7rem; }
.address-dialog { width:min(90vw,520px); border:1px solid var(--line); border-radius:16px; padding:1.5rem; }
.address-dialog textarea { width:100%; min-height:100px; margin-bottom:1rem; }
.address-dialog::backdrop { background:#0008; }
.image-dialog { width:min(95vw,1400px); max-height:94vh; padding:1rem; border:0; border-radius:14px; }
.image-dialog::backdrop { background:#111c; }
.image-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.8rem; }
.image-dialog-head b { overflow-wrap:anywhere; min-width:0; }
.image-dialog img { display:block; width:100%; max-height:78vh; object-fit:contain; }
@media (max-width:1199px) {
  .installer-layout { grid-template-columns:1fr; }
  .installer-aside { order:-1; }
  .installation-layout { grid-template-columns:1fr; }
}
@media (max-width:640px) {
  .address-card { padding:1rem; }
  .address-actions { width:100%; }
  .address-actions .btn { flex:1; }
  .document-upload { grid-template-columns:1fr; }
  .document-grid { grid-template-columns:1fr; }
}

#installationDocuments { scroll-margin-top:145px; }

/* 显式操作、完整地址与文件资料 */
#qCard, #installerNote { scroll-margin-top:145px; }
.project-quick-actions { display:flex; flex-wrap:wrap; gap:.75rem; margin:0 0 1.2rem; }
.project-quick-actions .btn { min-height:48px; }
#field_address { background:#f6faf8; border:1px solid #c9dcd3; border-radius:10px; padding:1rem; margin:.8rem 0; }
#field_address textarea { min-height:100px; }
.address-text, .kv dd { overflow-wrap:anywhere; white-space:pre-wrap; }
.installer-note-read, .invite-identity { padding:1rem; margin:.8rem 0 1rem; border-radius:10px; background:var(--sunken); line-height:1.7; }
.installer-note-read p { white-space:pre-wrap; overflow-wrap:anywhere; }
.profile-page { max-width:760px; }
.document-dialog { width:min(96vw,1400px); max-height:94vh; padding:1rem; border:0; border-radius:14px; }
.document-dialog::backdrop { background:#111c; }
.document-dialog .image-dialog-head { position:sticky; top:-1rem; padding:.5rem 0; background:white; z-index:2; }
.preview-image { display:block; width:100%; max-height:78vh; object-fit:contain; }
.pdf-frame { width:100%; height:70vh; border:1px solid var(--line); }
.preview-table th, .preview-table td { min-width:100px; max-width:350px; white-space:pre-wrap; overflow-wrap:anywhere; }
.document-dialog .table-wrap { max-height:65vh; overflow:auto; }
@media(max-width:640px) { .project-quick-actions .btn { flex:1; } .image-dialog-head { flex-wrap:wrap; } }

.pdf-toolbar { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; padding:.7rem 0; }
.pdf-surface { overflow:auto; max-height:72vh; width:100%; min-height:200px; background:#e7e7e7; }
.pdf-surface canvas { display:block; background:white; margin:4px auto; }

/* 多项工作与服务统一编号，长句续行对齐正文。 */
.numbered-items { list-style:decimal outside; margin:.35rem 0 0; padding-left:1.8em; white-space:normal; font-size:1rem; line-height:1.7; }
.numbered-items li { padding-left:.3em; margin:.35rem 0; overflow-wrap:anywhere; }
.numbered-items li::marker { font-weight:700; color:var(--brass); font-variant-numeric:tabular-nums; }
.inst-hero .scope .numbered-items { color:#fff; font-weight:600; }
.inst-hero .scope .numbered-items li::marker { color:var(--brass-2); }
.kv .numbered-items { margin-top:0; margin-bottom:0; }
.assignment-scope { color:var(--ink-2); }

.quote-changes { padding-left:1.5rem; margin:.8rem 0 0; }
.quote-changes li { padding-left:.2rem; margin:.8rem 0; overflow-wrap:anywhere; }
.quote-changes li div { margin:.3rem 0; white-space:pre-wrap; }
.quote-changes small { display:block; margin-top:.4rem; }
#quoteRequirementChanges { display:block; }
#quoteRequirementChanges h3 { margin:.8rem 0 .3rem; font-size:1rem; }

.stepper:not(.clickable) button:disabled { opacity:1; }

.preview-video { display:block; width:100%; max-height:72vh; background:#111; }
.payment-note { white-space:pre-wrap; overflow-wrap:anywhere; }

.invite-link-row { margin-top:.5rem; flex-wrap:wrap; gap:.5rem; }
.invite-link-row input { min-width:0; width:100%; font-size:.8rem; }
.invite-created { border-color:var(--brass); }
