/* ==========================================================================
   售后服务评价系统 · 设计系统
   配色：石墨灰 + 品牌蓝；圆角 12px；单一强调色
   ========================================================================== */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #0b1220;
  --ink-2: #334155;
  --muted: #6b7686;
  --faint: #9aa4b2;
  --line: #e5e8ee;
  --line-strong: #d5dae3;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff4ff;
  --ok: #0f9d63;
  --ok-soft: #e9f9f1;
  --warn: #b45309;
  --warn-soft: #fdf5e7;
  --bad: #d92d20;
  --bad-soft: #feefee;
  --star: #f59e0b;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, .05);
  --shadow-md: 0 8px 24px -12px rgba(11, 18, 32, .18);
  --shadow-lg: 0 24px 60px -28px rgba(11, 18, 32, .3);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { letter-spacing: -.02em; }
img { max-width: 100%; }

/* ============================ 管理后台骨架 ============================ */

.app { display: flex; min-height: 100vh; }

.side {
  width: 236px; flex: none; background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 18px; font-weight: 700; font-size: 15px; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.side-brand .mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
}
.side-nav { padding: 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px; color: var(--ink-2);
  font-size: 14px; transition: .14s;
}
.side-nav a:hover { background: #f3f5f9; color: var(--ink); }
.side-nav a.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.side-nav a .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .45; }
.side-nav a.on .dot { opacity: 1; }
.side-foot { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.side-foot .who { font-size: 12.5px; color: var(--muted); flex: 1; }
.side-foot button {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer;
}
.side-foot button:hover { border-color: var(--line-strong); color: var(--bad); }

.main { flex: 1; min-width: 0; padding: 28px 32px 72px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; margin: 0; font-weight: 700; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

/* ================================ 卡片 ================================ */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card-title { font-size: 14px; font-weight: 650; margin: 0 0 14px; color: var(--ink); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.kpi .k { font-size: 12px; color: var(--muted); letter-spacing: .01em; }
.kpi .v { font-size: 27px; font-weight: 700; margin-top: 6px; letter-spacing: -.03em; line-height: 1.15; }
.kpi .v small { font-size: 13px; font-weight: 500; color: var(--faint); letter-spacing: 0; }

.grid2 { display: grid; grid-template-columns: 1.08fr .92fr; gap: 16px; }

/* 维度条 / 分数条 */
.bars .bar-row { display: grid; grid-template-columns: 78px 1fr 40px; gap: 12px; align-items: center; margin-bottom: 13px; font-size: 13px; }
.track { height: 7px; background: #eef1f6; border-radius: 99px; overflow: hidden; display: block; }
.fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #93b4fb, var(--brand)); }
.scores { display: grid; gap: 12px; }
.score-row { display: grid; grid-template-columns: 96px 1fr 26px; gap: 12px; align-items: center; font-size: 13px; color: var(--ink-2); }

/* 趋势柱 */
.trend { display: flex; align-items: flex-end; gap: 3px; height: 128px; }
.trend .b { flex: 1; min-height: 3px; background: #dbe4f5; border-radius: 3px 3px 0 0; transition: background .15s; }
.trend .b:hover { background: var(--brand); }

/* 列表流 */
.feed { padding: 12px 0; border-bottom: 1px solid #f1f3f7; }
.feed:last-child { border-bottom: 0; }
.feed-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 13.5px; }
.feed-body { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.55; }
.feed-time { font-size: 11.5px; color: var(--faint); margin-top: 5px; }

/* ================================ 表格 ================================ */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 12px;
  letter-spacing: .03em;
  padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--surface-2);
}
td { padding: 12px 14px; border-bottom: 1px solid #f1f3f7; vertical-align: top; color: var(--ink-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfe; }
td strong { color: var(--ink); }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.7;
}
.b-ok { background: var(--ok-soft); color: #067a4b; }
.b-mid { background: var(--warn-soft); color: var(--warn); }
.b-bad { background: var(--bad-soft); color: var(--bad); }
.b-gray { background: #f1f3f7; color: #55606f; }
.b-brand { background: var(--brand-soft); color: var(--brand-dark); }

.pager { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 16px; font-size: 13px; }
.pager a, .pager span.cur {
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink-2);
}
.pager span.cur { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; font-size: 13.5px; }
.muted { color: var(--muted); }

/* ================================ 表单 ================================ */

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }

input[type=text], input[type=password], input[type=date], input[type=datetime-local],
input[type=number], input[type=tel], select, textarea {
  border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 11px;
  font: inherit; font-size: 14px; background: #fff; color: var(--ink);
  min-width: 0; transition: border-color .14s, box-shadow .14s;
}
input[readonly] { background: var(--surface-2); color: var(--muted); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #93b4fb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
textarea { resize: vertical; width: 100%; }

.check-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 4px 0 16px; cursor: pointer; }

/* 按钮 */
.btn {
  border: 0; border-radius: 9px; padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap; transition: background .14s, box-shadow .14s;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn.ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); border-color: #c3cad6; color: var(--ink); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; font-weight: 500; }
.btn-block { width: 100%; }
.ghost-link { font-size: 13px; color: var(--muted); }
.ghost-link:hover { color: var(--brand); }

/* 提示条 */
.alert { padding: 11px 13px; border-radius: 10px; font-size: 13.5px; margin-bottom: 18px; }
.alert.err { background: var(--bad-soft); color: #b42318; border: 1px solid #fbd5d1; }
.alert.ok { background: var(--ok-soft); color: #067a4b; border: 1px solid #bfe9d4; }
.alert code { background: rgba(255,255,255,.7); padding: 1px 5px; border-radius: 4px; }
.hint { display: block; font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.hint-inline { font-size: 11.5px; color: var(--faint); margin-left: 6px; font-weight: 400; }
.req { color: var(--bad); margin-left: 3px; }

/* 标签页 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 10px 14px; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--brand); border-color: var(--brand); font-weight: 600; }

/* ============================ 公开页外壳 ============================ */

.pub { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 28px 20px; }
.pub > .sheet { margin: auto; }

.sheet {
  width: 100%; max-width: 640px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; box-shadow: var(--shadow-lg);
}
.sheet-wide { max-width: 860px; padding: 0; }
.sheet h1 { font-size: 21px; margin: 0 0 6px; font-weight: 700; }
.sheet .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.done-icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok);
  display: grid; place-items: center; font-size: 26px; margin: 0 auto 16px; font-weight: 700;
}

/* ======================== 内部提交页（分组表单） ======================== */

.form-head {
  background: linear-gradient(135deg, #0b1220 0%, #16233c 55%, #1e3a6b 100%);
  color: #fff; padding: 26px 30px 22px; border-radius: 15px 15px 0 0;
}
.fh-top { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  display: grid; place-items: center; font-weight: 800; font-size: 17px;
}
.fh-text { min-width: 0; }
.fh-text h1 { color: #fff; font-size: 19px; margin: 0; }
.fh-text p { color: rgba(255,255,255,.66); font-size: 12.5px; margin: 4px 0 0; }
.form-head .ghost-link { color: rgba(255,255,255,.7); margin-left: auto; }
.form-head .ghost-link:hover { color: #fff; }

.steps { list-style: none; display: flex; gap: 8px; margin: 20px 0 0; padding: 0; }
.steps li {
  flex: 1; display: flex; align-items: center; gap: 7px; font-size: 12.5px;
  color: rgba(255,255,255,.55); background: rgba(255,255,255,.06);
  padding: 9px 10px; border-radius: 9px; white-space: nowrap;
}
.steps li i {
  width: 17px; height: 17px; border-radius: 50%; background: rgba(255,255,255,.14);
  display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 700; flex: none;
}
.steps li.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.steps li.on i { background: #fff; color: var(--ink); }

.form-body { padding: 26px 30px 24px; }
.fsec { margin-bottom: 26px; }
.fsec + .fsec { border-top: 1px solid #f1f3f7; padding-top: 24px; }
.fsec-title {
  font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 13px;
  display: flex; align-items: center; gap: 8px; letter-spacing: .02em;
}
.fsec-title::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--brand); }
.fsec-tip { font-size: 11px; font-weight: 500; color: var(--muted); background: #f1f3f7; padding: 1px 8px; border-radius: 99px; }

.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.type-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff;
  cursor: pointer; position: relative; transition: .15s;
}
.type-card input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tc-badge {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: #f1f3f7; color: var(--ink-2);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.tc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tc-body b { font-size: 14px; color: var(--ink); font-weight: 650; }
.tc-body em { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.tc-tick {
  margin-left: auto; width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: var(--brand); color: #fff; display: none; place-items: center; font-size: 11px;
}
.type-card:hover { border-color: #c3d3f7; background: #fbfcff; }
.type-card.on { border-color: var(--brand); background: var(--brand-soft); }
.type-card.on .tc-tick { display: grid; }
.type-card.on .tc-badge { background: var(--brand); color: #fff; }

.dyn-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dyn-fields .field { margin: 0; }
.dyn-fields .span2 { grid-column: 1 / -1; }

.form-body input[type=text], .form-body input[type=tel], .form-body input[type=number],
.form-body input[type=date], .form-body input[type=datetime-local],
.form-body select, .form-body textarea {
  background: var(--surface-2); border: 1.5px solid transparent;
  padding: 11px 13px; border-radius: 9px; font-size: 14.5px; width: 100%;
}
.form-body input:focus, .form-body select:focus, .form-body textarea:focus {
  background: #fff; border-color: #93b4fb; outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-body textarea { min-height: 88px; line-height: 1.6; }
.form-body .field-label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-bottom: 7px; display: block; }

.submit-bar { position: sticky; bottom: 0; z-index: 5; padding: 16px 0 4px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 40%); }
.submit-bar .btn-block { padding: 14px; font-size: 15.5px; border-radius: 11px; box-shadow: 0 12px 24px -12px rgba(37,99,235,.6); }
.submit-note { text-align: center; font-size: 11.5px; color: var(--faint); margin: 10px 0 0; }

.blank-state { text-align: center; padding: 48px 12px; }
.blank-icon { font-size: 28px; color: #c3d3f7; margin-bottom: 12px; }
.blank-state h2 { font-size: 16px; margin: 0 0 8px; }
.blank-state p { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

/* ========================== 客户评价页 ========================== */

.rv-wrap { width: 100%; max-width: 620px; margin: auto; }

.rv-head { text-align: center; margin-bottom: 20px; }
.rv-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted); margin-bottom: 14px;
}
.rv-brand .mark {
  width: 26px; height: 26px; border-radius: 8px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.rv-head h1 { font-size: 22px; margin: 0 0 6px; font-weight: 700; }
.rv-head p { color: var(--muted); font-size: 13px; margin: 0; }

.rv-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-md); overflow: hidden;
}

.rv-service { padding: 18px 22px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.rv-service dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.rv-service dt { font-size: 11.5px; color: var(--faint); margin-bottom: 2px; }
.rv-service dd { margin: 0; font-size: 13.5px; color: var(--ink-2); word-break: break-word; }
.rv-service .span2 { grid-column: 1 / -1; }

.rv-body { padding: 8px 22px 4px; }
.q { padding: 18px 0; border-bottom: 1px solid #f1f3f7; }
.q:last-child { border-bottom: 0; }
.q-title { font-size: 14.5px; font-weight: 600; color: var(--ink); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.q-hint { font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.q-body { margin-top: 12px; }

.progress { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.progress .bar { flex: 1; height: 4px; background: #e9edf4; border-radius: 99px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 99px; transition: width .25s; }

/* 星标评分 */
.stars { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.stars label { position: relative; cursor: pointer; line-height: 1; }
.stars label input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.stars label span { font-size: 34px; color: #dfe4ec; transition: color .12s, transform .12s; display: block; padding: 0 2px; }
.stars:not(.readonly) label:hover span { transform: scale(1.06); }
.stars label.on span { color: var(--star); }
.stars .star-tip { font-style: normal; font-size: 12.5px; color: var(--muted); margin-left: 10px; min-width: 64px; }

.rv-submit { padding: 18px 22px 22px; background: var(--surface); border-top: 1px solid var(--line); }
.rv-submit .btn { padding: 14px; font-size: 15.5px; border-radius: 11px; }
.rv-note { text-align: center; font-size: 11.5px; color: var(--faint); margin: 10px 0 0; }

/* 单选药丸 */
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill { position: relative; cursor: pointer; }
.radio-pill input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.radio-pill span {
  display: inline-block; padding: 9px 15px; border: 1px solid var(--line-strong);
  border-radius: 999px; font-size: 13.5px; background: #fff; color: var(--ink-2);
}
.radio-pill input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }

/* ============================ 二维码结果页 ============================ */

.qr-box { display: flex; gap: 24px; align-items: center; justify-content: center; margin: 24px 0; flex-wrap: wrap; }
.qr-box img {
  width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px; background: #fff; box-shadow: var(--shadow-sm);
}
.qr-meta { text-align: left; display: grid; gap: 10px; font-size: 13.5px; min-width: 180px; }
.qr-meta span { display: block; font-size: 11.5px; color: var(--faint); }
.link-row { display: flex; gap: 8px; align-items: center; }
.link-row input { flex: 1; font-size: 12.5px; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* ============================ 其他小组件 ============================ */

.info {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 16px; margin: 0 0 22px; text-align: left;
}
.info dt { font-size: 11.5px; color: var(--faint); margin-bottom: 2px; }
.info dd { margin: 0; font-size: 13.5px; color: var(--ink-2); word-break: break-word; }
.info .span2 { grid-column: 1 / -1; }
.info-flat { background: transparent; border: 0; padding: 0; margin: 0; }

.type-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.item-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.item-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid #f1f3f7; font-size: 13.5px; }
.item-row:last-child { border-bottom: 0; }
.item-row.off { opacity: .55; }
.item-label em { font-style: normal; color: var(--muted); font-size: 11.5px; margin-left: 8px; }

/* 登录 */
.login-card { width: 100%; max-width: 400px; margin: auto; }
.login-card .mark-lg {
  width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 17px; margin-bottom: 16px;
}

/* ============================== 响应式 ============================== */

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .side {
    width: 100%; height: auto; position: sticky; top: 0; z-index: 20;
    border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center;
  }
  .side-brand { border-bottom: 0; padding: 12px 16px; }
  .side-nav { flex-direction: row; overflow-x: auto; padding: 8px; gap: 4px; scrollbar-width: none; flex: 1; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a { white-space: nowrap; padding: 8px 11px; font-size: 13px; }
  .side-nav a .dot { display: none; }
  .side-foot { border-top: 0; padding: 8px 12px; }
  .side-foot .who { display: none; }
  .main { padding: 20px 16px 56px; }
}

@media (max-width: 640px) {
  .kpis, .kpis--5 { grid-template-columns: 1fr; }
  .pub { padding: 14px 12px calc(24px + env(safe-area-inset-bottom)); }
  .sheet { padding: 20px; border-radius: 14px; }
  .form-head { padding: 20px 18px 16px; border-radius: 13px 13px 0 0; }
  .form-body { padding: 20px 16px 16px; }
  .dyn-fields, .rv-service dl, .info { grid-template-columns: 1fr; }

  /* 服务事项：始终一行，超出宽度横向滑动而不是换行 */
  .type-grid {
    display: grid; grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: minmax(98px, 1fr);
    gap: 8px; overflow-x: auto; padding-bottom: 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .type-grid::-webkit-scrollbar { display: none; }
  .type-card {
    flex-direction: column; align-items: center; text-align: center;
    gap: 6px; padding: 12px 8px 14px; position: relative; min-height: 92px;
  }
  .tc-badge { width: 26px; height: 26px; font-size: 11.5px; border-radius: 8px; }
  .tc-body { align-items: center; gap: 2px; }
  .tc-body b { font-size: 12.5px; line-height: 1.3; }
  .tc-body em { display: none; }
  .tc-tick { position: absolute; right: 6px; bottom: 6px; margin: 0; width: 16px; height: 16px; font-size: 9px; }

  /* 单选选项：两列，阅读更紧凑 */
  .radio-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .radio-pill span { width: 100%; text-align: center; padding: 10px 8px; font-size: 13px; }

  /* 评价题更紧凑 */
  .q { padding: 15px 0; }
  .q-title { font-size: 14px; line-height: 1.5; }
  .q-hint { font-size: 11px; }
  .q-body { margin-top: 10px; }
  .stars { gap: 2px; }
  .stars label span { font-size: 29px; padding: 0 1px; }
  .stars .star-tip { min-width: 0; width: 100%; margin: 6px 0 0; font-size: 12px; }
  .progress { font-size: 11.5px; }

  /* iOS 输入框字号小于 16px 会自动放大页面 */
  input[type=text], input[type=password], input[type=date], input[type=datetime-local],
  input[type=number], input[type=tel], select, textarea {
    font-size: 16px; padding: 11px 12px;
  }
  .btn { font-size: 15px; }

  .steps li { font-size: 10.5px; padding: 8px 6px; gap: 5px; }
  .steps li i { width: 15px; height: 15px; font-size: 9.5px; }
  .fh-text h1 { font-size: 17px; }
  .rv-head h1 { font-size: 19px; }
  .qr-box img { width: 180px; height: 180px; }
  .page-head h1 { font-size: 18px; }
}

@media print {
  .side, .actions, .link-row, .submit-bar, .rv-submit, .hint { display: none !important; }
  body { background: #fff; }
  .sheet, .rv-card { box-shadow: none; border: 0; }
}

/* ---------- 补充：公开页通用控件 ---------- */
.pub-bg {
  background:
    radial-gradient(900px 420px at 50% -10%, #e9eefc 0%, rgba(244,245,247,0) 70%),
    var(--bg);
}
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row input[type=text] { flex: 1; width: auto; }
.input-row .btn { flex: none; }
.rv-body input, .rv-body select, .rv-body textarea { width: 100%; }
.rv-body input, .rv-body select { padding: 11px 13px; }
.rv-body textarea { min-height: 84px; line-height: 1.6; }
.q-body .stars { margin-top: 2px; }

/* ---------- 后台表单栅格 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.form-grid .field { margin: 0; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- 多选组 ---------- */
.check-group { border-radius: 10px; transition: box-shadow .2s; }
.check-group.invalid { box-shadow: 0 0 0 2px #f3b4ae; padding: 6px; }

/* ---------- 配置页二级标签 ---------- */
.tabs { align-items: center; }
.tabs-sub { margin-top: -8px; border-bottom: 0; }
.tabs-tail { margin-left: auto; padding: 0 4px; font-size: 13px; }

/* ---------- 品牌签名：公司 + 理念 ---------- */
.fh-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .16em; font-weight: 600;
  color: rgba(255,255,255,.52); margin-bottom: 6px;
}
.fh-brand em { font-style: normal; color: rgba(255,255,255,.85); }
.brand-sep { display: block; width: 12px; height: 1px; background: rgba(255,255,255,.32); }
.rv-brand { gap: 8px; }
.rv-brand em { font-style: normal; color: var(--faint); }
.rv-brand .dot { display: block; width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

@media (max-width: 640px) {
  .fh-brand { font-size: 10.5px; letter-spacing: .12em; margin-bottom: 4px; }
  .rv-brand { flex-wrap: wrap; justify-content: center; row-gap: 4px; }
}

/* ---------- 品牌标：支持文字或图片 ---------- */
.brand-mark img, .mark-lg img, .side-brand .mark img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: inherit; }
.side-brand .mark, .brand-mark, .mark-lg { overflow: hidden; }
img.mark { display: block; object-fit: contain; background: transparent; }
.brand-mark img { border-radius: 8px; }

/* ---------- 图形 logo 的显示容器 ---------- */
.brand-mark img, .side-brand .mark img, .mark-lg img, .rv-brand .mark img {
  background: #fff;
}
.brand-mark img { border-radius: 9px; padding: 2px; }
.side-brand .mark img { border-radius: 8px; padding: 2px; }
.mark-lg img { border-radius: 12px; padding: 3px; }
.rv-brand .mark img { border-radius: 7px; padding: 1px; }

/* ---------- 横版 logo ---------- */
.brand-lockup {
  display: block; flex: none;
  height: 48px; width: auto; max-width: 200px;
  box-sizing: border-box; object-fit: contain;
  background: #fff; border-radius: 10px; padding: 6px 10px;
}
.rv-logo { display: block; height: 40px; width: auto; max-width: 220px; margin: 0 auto 10px; }
.rv-slogan { text-align: center; font-size: 11px; letter-spacing: .18em; color: var(--faint); margin-bottom: 14px; }

@media (max-width: 640px) {
  .brand-lockup { height: 40px; max-width: 150px; padding: 4px 8px; }
  .rv-logo { height: 34px; max-width: 180px; }
  .rv-slogan { margin-bottom: 12px; }
}

/* ---------- 报表页 ---------- */
.kpis--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.preset-row { display: flex; gap: 6px; flex-wrap: wrap; }
.preset {
  padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px;
  font-size: 13px; color: var(--ink-2); background: #fff; text-decoration: none;
}
.preset:hover { border-color: #c3d3f7; color: var(--brand); }
.preset.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }

.caliber { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.caliber div { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.caliber b { display: block; color: var(--ink); font-size: 13px; margin-bottom: 2px; }

.matrix th.sticky-col, .matrix td.sticky-col {
  position: sticky; left: 0; z-index: 2; background: #fff;
  box-shadow: 1px 0 0 var(--line);
}
.matrix th.sticky-col { background: var(--surface-2); }
.matrix td, .matrix th { white-space: nowrap; text-align: center; }
.matrix td.sticky-col, .matrix th.sticky-col { text-align: left; }

@media (max-width: 1100px) {
  .kpis--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .kpis--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .caliber { grid-template-columns: 1fr; }
}

/* ---------- 折叠区块 ---------- */
.fold {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 20px; margin-top: 16px; box-shadow: var(--shadow-sm);
}
.fold summary {
  cursor: pointer; padding: 16px 0; font-size: 14px; font-weight: 650; color: var(--ink);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "展开"; font-size: 12px; font-weight: 400; color: var(--muted); }
.fold[open] summary::after { content: "收起"; }
.fold > *:not(summary) { margin-bottom: 16px; }

/* ---------- 可点击下钻 ---------- */
.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover { color: var(--brand); }
.plain-link:hover strong { color: var(--brand); }
a.feed-link { display: block; color: inherit; text-decoration: none; border-radius: 8px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
a.feed-link:hover { background: #fafbfe; }
a.feed-link:hover .feed-time { color: var(--brand); }

/* ---------- 分组表头 ---------- */
.group-row td { background: #f8fafc; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.group-tag {
  display: inline-block; min-width: 18px; padding: 0 6px; margin-right: 2px;
  border-radius: 5px; background: var(--brand-soft); color: var(--brand-dark);
  font-size: 11.5px; font-weight: 700; text-align: center;
}
.matrix th.group-head { border-left: 2px solid var(--line); }
.matrix th.group-head:first-of-type { border-left: 0; }
