/* 问题点上报 · H5 界面（2026 重构版）
   移动端优先，桌面端居中"应用框"；登录/注册在宽屏下为左右分栏。 */
:root {
  --green: #08b563;
  --green-d: #079a54;
  --green-l: #e9f8f0;
  --bg: #f4f7f5;
  --card: #ffffff;
  --ink: #0d2b21;
  --text: #1b2a25;
  --text2: #6b7b74;
  --text3: #a3aea9;
  --line: #e8eeeb;
  --red: #e5484d;
  --orange: #f59e4b;
  --blue: #4a76c4;
  --nav-h: 52px;
  --tab-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 12px 34px rgba(13, 43, 33, .08), 0 2px 8px rgba(13, 43, 33, .04);
  --shadow-sm: 0 2px 10px rgba(13, 43, 33, .05);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: #eaf0ed;
  background-image: radial-gradient(900px 600px at 12% 8%, rgba(8, 181, 99, .10), transparent 60%),
                    radial-gradient(800px 600px at 88% 92%, rgba(13, 90, 61, .09), transparent 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
[hidden] { display: none !important; }

/* 应用框：桌面居中，模拟一台手机；移动端满宽 */
#app {
  max-width: 520px; margin: 0 auto; min-height: 100vh;
  background: var(--bg); position: relative;
  box-shadow: 0 0 60px rgba(13, 43, 33, .10);
}

/* ---------------- 顶栏 ---------------- */
.navbar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 14px 0;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(13, 43, 33, .06);
  display: flex; align-items: center; justify-content: center;
}
.nav-title { font-size: 17px; font-weight: 650; letter-spacing: .3px; color: var(--ink); }
.nav-back, .nav-action {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px);
  height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-size: 14px;
}
.nav-back { left: 10px; width: 36px; border-radius: 50%; }
.nav-back:active { background: rgba(13, 43, 33, .06); }
.nav-action { right: 14px; padding: 0 4px; color: var(--green-d); font-weight: 500; }

.view {
  min-height: 100vh;
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 14px);
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px);
}
.view.no-nav { padding-top: 0; }
.view.no-tab { padding-bottom: 28px; }

/* ---------------- 底部 Tab ---------------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 50;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid rgba(13, 43, 33, .07);
  display: flex;
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #98a49e; font-size: 10.5px; transition: color .18s; }
.tab svg { width: 23px; height: 23px; }
.tab.active { color: var(--green-d); font-weight: 600; }
.tab.active svg { transform: translateY(-1px); }

/* ---------------- 通用块 ---------------- */
.page { padding: 0 14px 24px; }
.card, .list {
  background: var(--card); border: 1px solid rgba(13, 43, 33, .045);
  border-radius: 16px; margin-bottom: 14px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-title { padding: 15px 16px 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .5px; color: var(--text3); }
.cell { display: flex; align-items: center; min-height: 52px; padding: 10px 16px; position: relative; }
.cell + .cell::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: var(--line); }
.cell-label { width: 92px; flex: none; color: var(--text); font-size: 14.5px; font-weight: 500; }
.cell-label.req::before { content: "*"; color: var(--red); margin-right: 3px; }
.cell-body { flex: 1; min-width: 0; }
.cell-body input, .cell-body textarea, .cell-body select {
  width: 100%; border: 0; outline: none; background: transparent;
  font-size: 15px; padding: 4px 0; resize: none;
}
.cell-body select { appearance: none; color: var(--text); }
.cell-body select:invalid, .cell-body .ph { color: var(--text3); }
.cell-body textarea { min-height: 62px; line-height: 1.5; }
.cell-body input::placeholder, .cell-body textarea::placeholder { color: var(--text3); }
.cell-arrow { width: 8px; height: 8px; border-right: 1.6px solid #c8d2cd; border-top: 1.6px solid #c8d2cd; transform: rotate(45deg); flex: none; margin-left: 6px; }
.hint { padding: 8px 16px 15px; font-size: 12px; color: var(--text3); line-height: 1.7; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, #0bc06b 0%, #079a54 100%);
  color: #fff; font-size: 15.5px; font-weight: 600; letter-spacing: .5px;
  box-shadow: 0 6px 16px rgba(7, 154, 84, .22);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: translateY(1px) scale(.995); box-shadow: 0 3px 10px rgba(7, 154, 84, .2); }
.btn[disabled] { opacity: .55; box-shadow: none; }
.btn-lg { height: 50px; margin: 20px 0 0; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: none; font-weight: 500; }
.btn-ghost:active { background: #f6f8f7; }
.btn-danger { background: linear-gradient(135deg, #f26a6e, #e5484d); box-shadow: 0 6px 16px rgba(229, 72, 77, .2); }
.btn-sm { height: 32px; font-size: 13px; border-radius: 8px; padding: 0 13px; width: auto; display: inline-flex; box-shadow: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* =================================================================
   登录 / 注册页：左侧品牌图 + 右侧表单
   ================================================================= */
.login-wrap {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  display: flex; flex-direction: column; background: #fff;
}

/* 左侧：厂区全景图 + 品牌标识（logo） */
.brand-pane {
  position: relative; overflow: hidden; flex: none; min-height: 196px;
  background: url('/assets/factory.jpg') center 42% / cover no-repeat;
  display: flex; align-items: flex-end;
}
.brand-pane::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,38,27,.50) 0%, rgba(5,38,27,.06) 38%, rgba(5,38,27,.82) 100%);
}
.brand-in { position: relative; z-index: 1; width: 100%; padding: 22px 24px 42px; color: #fff; }
.brand-logo { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; flex: none; border-radius: 13px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.38);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: 1.2px; line-height: 1.2; }
.brand-sub { font-size: 10px; opacity: .75; letter-spacing: 1.8px; margin-top: 3px; }
.brand-slogan { margin: 18px 0 0; font-size: 13px; opacity: .9; letter-spacing: .4px; }
.brand-meta { margin-top: 5px; font-size: 11px; opacity: .62; }

/* 右侧：表单区 */
.auth-pane {
  flex: 1; display: flex; align-items: flex-start; justify-content: center;
  padding: 0 18px 40px; margin-top: -24px; position: relative; z-index: 2;
}
.auth-card {
  width: 100%; max-width: 420px; background: #fff;
  border: 1px solid rgba(13, 43, 33, .05); border-radius: 22px;
  box-shadow: 0 18px 50px rgba(13, 43, 33, .13), 0 2px 8px rgba(13, 43, 33, .05);
  padding: 26px 24px 24px;
}
.auth-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 24px;
  background: #f2f5f3; border-radius: 12px;
}
.auth-tab {
  flex: 1; height: 38px; border-radius: 9px; font-size: 14.5px; font-weight: 500;
  color: var(--text2); transition: all .18s;
}
.auth-tab.on { background: #fff; color: var(--ink); font-weight: 650; box-shadow: 0 2px 8px rgba(13, 43, 33, .09); }
.auth-head { margin-bottom: 20px; }
.auth-head h2 { margin: 0 0 5px; font-size: 21px; font-weight: 700; letter-spacing: .3px; color: var(--ink); }
.auth-head p { margin: 0; font-size: 12.5px; color: var(--text3); }

.field {
  display: flex; align-items: center; height: 48px; padding: 0 13px;
  background: #f6f8f7; border: 1px solid transparent; border-radius: 12px;
  margin-bottom: 12px; transition: all .18s;
}
.field:focus-within { background: #fff; border-color: var(--green); box-shadow: 0 0 0 3px rgba(8, 181, 99, .11); }
.field .icon { width: 20px; height: 20px; margin-right: 10px; flex: none; color: #9caaa4; display: flex; align-items: center; }
.field:focus-within .icon { color: var(--green-d); }
.field input, .field select {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-size: 14.5px; height: 100%; appearance: none;
}
.field input::placeholder { color: #aab5b0; }
.field select:invalid { color: #aab5b0; }
.field .eye { width: 30px; height: 100%; display: flex; align-items: center; justify-content: center; color: #9caaa4; }
.field-2 { display: flex; gap: 10px; }
.field-2 .field { flex: 1; min-width: 0; }

.auth-switch { margin-top: 18px; text-align: center; font-size: 13px; color: var(--text2); }
.auth-switch a { color: var(--green-d); font-weight: 600; margin-left: 4px; text-decoration: none; }
.auth-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--text3); text-align: center; line-height: 1.8; }
.wx-entry { margin-top: 18px; }
.wx-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--text3); font-size: 11.5px; }
.wx-divider::before, .wx-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.wx-btn {
  margin-top: 12px; background: #fff; color: var(--green-d);
  border: 1px solid rgba(8, 181, 99, .38); box-shadow: none; font-weight: 600;
}
.wx-btn:active { background: var(--green-l); }
.field-err { color: var(--red); font-size: 12px; margin: -4px 0 12px; min-height: 0; }

/* 桌面端：品牌图 + 登录卡片拼成一张居中卡片，宽度随屏幕放大 */
@media (min-width: 900px) {
  .login-wrap {
    --shell-w: min(1240px, 90vw);
    flex-direction: row; align-items: center; justify-content: center;
    padding: 36px;
    background:
      radial-gradient(1000px 520px at 18% 12%, rgba(8, 181, 99, .10), transparent 65%),
      radial-gradient(900px 500px at 86% 92%, rgba(10, 106, 69, .10), transparent 62%),
      #f3f7f5;
  }
  .brand-pane {
    width: calc(var(--shell-w) * .46); min-height: 0;
    height: clamp(480px, 72vh, 680px); flex: none;
    border-radius: 22px 0 0 22px;
    box-shadow: 0 20px 55px rgba(13, 43, 33, .16);
  }
  .brand-in { padding: 0 40px 40px; }
  .brand-mark { width: 56px; height: 56px; border-radius: 15px; }
  .brand-mark svg { width: 30px; height: 30px; }
  .brand-name { font-size: 25px; }
  .brand-sub { font-size: 11px; }
  .brand-slogan { font-size: 18px; margin-top: 24px; line-height: 1.7; }
  .brand-meta { font-size: 12.5px; }
  .auth-pane {
    width: auto; flex: none; align-items: center; justify-content: center;
    margin-top: 0; padding: 0;
  }
  .auth-card {
    width: calc(var(--shell-w) * .54);
    max-width: none; /* 解除移动端 420px 上限，否则桌面端加宽不生效 */
    height: clamp(480px, 72vh, 680px);
    display: flex; flex-direction: column; justify-content: center;
    overflow-y: auto; border-radius: 0 22px 22px 0; border-left: 0;
    box-shadow: 0 20px 55px rgba(13, 43, 33, .10);
    padding: 40px 52px;
  }
  /* 表单内容限宽居中，卡片变宽但输入框不会被拉得过长 */
  .auth-card > * {
    flex-shrink: 0; width: 100%; max-width: 460px;
    margin-left: auto; margin-right: auto;
  }
}
/* 大屏进一步放大字号与控件，避免大片留白 */
@media (min-width: 1400px) {
  .auth-head h2 { font-size: 25px; }
  .auth-head p { font-size: 13.5px; }
  .auth-tab { height: 42px; font-size: 15px; }
  .field { height: 52px; }
  .field input, .field select { font-size: 15.5px; }
  .auth-card .btn { height: 52px; font-size: 16px; }
  .brand-name { font-size: 28px; }
  .brand-slogan { font-size: 20px; }
}
/* 矮屏时改为顶部对齐，避免内容被垂直居中裁掉 */
@media (min-width: 900px) and (max-height: 700px) {
  .login-wrap { align-items: flex-start; }
}
@media (max-width: 380px) {
  .auth-card { padding: 22px 18px 20px; }
  .brand-pane { min-height: 172px; }
}

/* ---------------- 首页 ---------------- */
.hero {
  background: linear-gradient(135deg, #0a6a45 0%, #0aa464 100%);
  color: #fff; margin: -14px -14px 14px;
  padding: 26px 20px 26px; border-radius: 0 0 24px 24px;
  position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%); }
.hero .hello { font-size: 21px; font-weight: 700; margin-bottom: 5px; position: relative; }
.hero .sub { font-size: 12.5px; opacity: .85; position: relative; }
.hero .badge { display: inline-block; margin-top: 14px; padding: 4px 12px; border-radius: 20px; background: rgba(255,255,255,.20); border: 1px solid rgba(255,255,255,.22); font-size: 11.5px; position: relative; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
/* 管理员有 5 个入口，最后一个独占一行，避免半格留白 */
.grid > .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tile {
  background: #fff; border: 1px solid rgba(13,43,33,.045); border-radius: 16px;
  padding: 18px 16px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s; text-align: left;
}
.tile:active { transform: scale(.98); }
.tile .ico { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.tile .ico svg { width: 22px; height: 22px; }
.tile .t { font-size: 14.5px; font-weight: 650; color: var(--ink); }
.tile .d { font-size: 11.5px; color: var(--text2); line-height: 1.45; }
.bg-green { background: var(--green-l); color: var(--green-d); }
.bg-blue { background: #eaf1fb; color: #4a76c4; }
.bg-orange { background: #fff2e7; color: #e18b41; }
.bg-purple { background: #f2ecfb; color: #8b63c9; }
.stat-strip { display: flex; background: #fff; border: 1px solid rgba(13,43,33,.045); border-radius: 16px; padding: 18px 0; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.stat-strip > div { flex: 1; text-align: center; position: relative; }
.stat-strip > div + div::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 1px; background: var(--line); }
.stat-strip .n { font-size: 23px; font-weight: 700; color: var(--green-d); }
.stat-strip .l { font-size: 11.5px; color: var(--text2); margin-top: 3px; }

/* ---------------- 照片上传 ---------------- */
.photo-row { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px 16px 16px; }
.photo-box { width: 76px; height: 76px; border-radius: 12px; position: relative; overflow: hidden; background: #f5f8f6; border: 1px solid var(--line); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-add { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text3); gap: 3px; border-style: dashed; border-color: #cdd8d2; }
.photo-add svg { width: 24px; height: 24px; }
.photo-add span { font-size: 11px; }
.photo-del { position: absolute; top: 0; right: 0; width: 22px; height: 22px; background: rgba(0,0,0,.6); color: #fff; border-radius: 0 0 0 10px; font-size: 14px; line-height: 20px; text-align: center; }
.photo-state { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; text-align: center; padding: 2px 0; }
.photo-state.fail { background: var(--red); }

/* ---------------- 列表项 ---------------- */
.pp-item { background: #fff; border: 1px solid rgba(13,43,33,.045); border-radius: 14px; padding: 15px 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.pp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.pp-seq { font-size: 11.5px; color: var(--blue); font-weight: 600; }
.pp-time { font-size: 11px; color: var(--text3); }
.pp-content { font-size: 14.5px; line-height: 1.6; word-break: break-all; margin-bottom: 9px; color: var(--text); }
.pp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11px; padding: 3px 9px; border-radius: 6px; background: #f1f5f3; color: #63736c; }
.tag.g { background: var(--green-l); color: var(--green-d); }
.tag.b { background: #eaf1fb; color: #4a76c4; }
.tag.o { background: #fff2e7; color: #d97a3d; }
.pp-thumbs { display: flex; gap: 6px; margin-top: 10px; }
.pp-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.pp-meta { margin-top: 9px; font-size: 11px; color: var(--text3); }
.empty { text-align: center; padding: 64px 20px; color: var(--text3); font-size: 13.5px; }
.empty svg { width: 56px; height: 56px; opacity: .3; margin-bottom: 14px; }

/* ---------------- 筛选条 ---------------- */
.filters { background: #fff; border: 1px solid rgba(13,43,33,.045); border-radius: 16px; padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #f1f5f3; font-size: 12.5px; color: #63736c; transition: all .16s; }
.chip.on { background: linear-gradient(135deg, #0bc06b, #079a54); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(7,154,84,.22); }
.filter-row { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.filter-row input, .filter-row select {
  flex: 1; min-width: 0; height: 38px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 9px; background: #fff; font-size: 13px; outline: none;
}
.filter-row input:focus, .filter-row select:focus { border-color: var(--green); }
.filter-row label { font-size: 12.5px; color: var(--text2); flex: none; }

/* ---------------- 统计卡 ---------------- */
.kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi > div { background: #fff; border: 1px solid rgba(13,43,33,.045); border-radius: 14px; padding: 16px 8px; text-align: center; box-shadow: var(--shadow-sm); }
.kpi .n { font-size: 22px; font-weight: 700; color: var(--green-d); }
.kpi .n.plain { color: var(--ink); }
.kpi .l { font-size: 11px; color: var(--text2); margin-top: 3px; }
.chart-card { background: #fff; border: 1px solid rgba(13,43,33,.045); border-radius: 16px; padding: 16px 14px 12px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0 4px; }
.chart-head h3 { margin: 0; font-size: 14.5px; font-weight: 650; color: var(--ink); }
.chart-head select { border: 1px solid var(--line); border-radius: 8px; height: 32px; padding: 0 8px; font-size: 12px; background: #fff; outline: none; }
.chart-box { width: 100%; overflow-x: auto; }
.chart-box svg { display: block; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 10px 4px 2px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #63736c; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ---------------- 管理页 ---------------- */
.admin-tools { display: flex; gap: 8px; margin-bottom: 14px; }
.admin-tools .btn { flex: 1; height: 42px; font-size: 13.5px; }
.mini-form { padding: 12px; display: flex; gap: 8px; }
.mini-form input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 11px; font-size: 13.5px; outline: none; }
.mini-form input:focus { border-color: var(--green); }
.admin-item-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line); }

/* ---------------- Toast / loading / 弹层 ---------------- */
.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 999;
  background: rgba(13, 32, 25, .9); color: #fff; padding: 12px 22px; border-radius: 12px;
  font-size: 13.5px; max-width: 78%; text-align: center; line-height: 1.6;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.loading-mask { position: fixed; inset: 0; z-index: 998; background: rgba(13, 32, 25, .28); display: flex; align-items: center; justify-content: center; }
.loading-box { background: rgba(13, 32, 25, .9); color: #fff; border-radius: 14px; padding: 18px 24px; display: flex; flex-direction: column; align-items: center; gap: 11px; font-size: 13px; }
.spinner { width: 26px; height: 26px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sheet-mask { position: fixed; inset: 0; z-index: 200; background: rgba(13, 32, 25, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; background: #fff; border-radius: 20px 20px 0 0; padding: 18px 16px calc(20px + var(--safe-b)); max-height: 76vh; overflow-y: auto; }
.sheet h3 { margin: 0 0 14px; font-size: 16px; font-weight: 650; text-align: center; }
.sheet-opt { padding: 13px 6px; text-align: center; font-size: 15px; border-bottom: 1px solid var(--line); }
.sheet-opt:active { background: #f5f8f6; }
.sheet-cancel { margin-top: 10px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--text2); }

/* =================================================================
   桌面端后台布局（≥1024px）
   底部 Tab 变左侧竖向导航，顶栏变全宽标题栏，内容区铺满屏幕。
   移动端（<1024px）完全保持原有 H5 布局不变。
   ================================================================= */
@media (min-width: 1024px) {
  :root { --side-w: 236px; --top-h: 64px; --content-w: 1440px; }

  body { background: #f4f7f5; }

  #app {
    max-width: none; margin: 0; padding-left: var(--side-w);
    box-shadow: none; background: transparent;
  }

  /* --- 左侧导航：由底部 tabbar 变形 --- */
  .tabbar {
    left: 0; top: 0; bottom: 0; right: auto;
    transform: none; width: var(--side-w); max-width: none;
    height: 100vh; padding: 0 0 20px;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 4px; z-index: 50;
    background: linear-gradient(180deg, #0d2b21 0%, #0a3a28 100%);
    border-top: 0; border-right: 1px solid rgba(255,255,255,.07);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    box-shadow: 2px 0 18px rgba(13,43,33,.10);
  }
  .tabbar::before {
    content: "质量管理平台";
    display: flex; align-items: center; height: var(--top-h);
    padding: 0 22px; margin-bottom: 14px;
    color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .6px;
    border-bottom: 1px solid rgba(255,255,255,.09);
  }
  .tabbar::after {
    content: "问题点上报 · v2.0"; margin-top: auto;
    padding: 14px 22px 0; color: rgba(255,255,255,.34); font-size: 11px;
  }
  .tab {
    flex: none; flex-direction: row; justify-content: flex-start;
    gap: 13px; height: 46px; padding: 0 18px; margin: 0 12px;
    border-radius: 10px; font-size: 14px; color: rgba(255,255,255,.62);
    transition: background .16s, color .16s;
  }
  .tab svg { width: 19px; height: 19px; }
  .tab:hover { color: #fff; background: rgba(255,255,255,.07); }
  .tab.active { color: #fff; font-weight: 600; background: rgba(11,192,107,.20); }
  .tab.active svg { transform: none; }

  /* --- 顶部标题栏 --- */
  .navbar {
    left: var(--side-w); right: 0; top: 0; transform: none;
    width: auto; max-width: none; height: var(--top-h);
    padding: 0 32px; justify-content: flex-start;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
  }
  .nav-title { font-size: 19px; font-weight: 650; }
  .nav-back { top: 16px; left: 24px; }
  .nav-action {
    top: 16px; right: 32px; height: 34px; padding: 0 14px;
    border-radius: 9px; background: var(--green-l); font-weight: 600;
  }
  .nav-action:hover { background: #d8f2e4; }

  /* --- 内容区 --- */
  .view {
    min-height: 100vh;
    padding: calc(var(--top-h) + 26px) 32px 48px;
  }
  .view.no-nav { padding-top: 26px; }
  .view.no-tab { padding-bottom: 48px; }
  .view > .page { max-width: var(--content-w); margin: 0 auto; padding: 0 0 32px; }
  .view > .hero {
    max-width: var(--content-w); margin: 0 auto 18px;
    border-radius: 20px; padding: 30px 36px;
  }
  .hero .hello { font-size: 26px; }
  .hero .sub { font-size: 14px; }
  .hero .badge { font-size: 12.5px; margin-top: 16px; }
  .hero::after { width: 300px; height: 300px; right: -80px; top: -150px; }

  /* --- 首页宫格：随宽度自动多列 --- */
  .grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
  .grid > .tile:last-child:nth-child(odd) { grid-column: auto; }
  .tile { padding: 22px 20px 20px; border-radius: 16px; gap: 10px; }
  .tile:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(13,43,33,.10); }
  .tile .ico { width: 46px; height: 46px; }
  .tile .ico svg { width: 24px; height: 24px; }
  .tile .t { font-size: 15.5px; }
  .tile .d { font-size: 12.5px; }

  .stat-strip { border-radius: 16px; padding: 22px 0; }
  .stat-strip .n { font-size: 27px; }
  .stat-strip .l { font-size: 12.5px; }

  /* --- 通用卡片 / 表单 --- */
  .card, .list, .filters, .chart-card { border-radius: 16px; margin-bottom: 16px; }
  .card-title { padding: 17px 20px 9px; font-size: 13.5px; }
  .cell { min-height: 58px; padding: 12px 20px; }
  .cell-label { width: 130px; font-size: 15px; }
  .cell-body input, .cell-body textarea, .cell-body select { font-size: 15.5px; }
  .cell + .cell::before { left: 20px; right: 20px; }
  .hint { padding: 10px 20px 17px; font-size: 12.5px; }
  .btn { height: 50px; font-size: 16px; }
  .btn-lg { height: 52px; }
  .photo-row { padding: 16px 20px 20px; gap: 12px; }
  .photo-box { width: 88px; height: 88px; }

  /* --- 列表：卡片多列排布 --- */
  #myList, #adList {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 14px; align-items: start;
  }
  #myList > .pp-item, #adList > .pp-item { margin-bottom: 0; }
  #myList > .empty, #adList > .empty { grid-column: 1 / -1; }
  #loadMore, #adMore { max-width: 260px; margin: 18px auto 0; }

  /* --- 筛选条 --- */
  .filters { padding: 18px 20px; }
  .chip { padding: 8px 18px; font-size: 13.5px; }
  .chips { gap: 10px; }
  .filter-row { max-width: 760px; gap: 10px; }
  .filter-row input, .filter-row select { height: 40px; font-size: 14px; }
  .admin-tools { gap: 12px; }
  .admin-tools .btn { flex: none; min-width: 170px; }
  .kpi { gap: 14px; }
  .kpi > div { padding: 20px 12px; border-radius: 16px; }
  .kpi .n { font-size: 27px; }

  /* --- 统计页：图表两列 --- */
  #stBody {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px; align-items: start;
  }
  #stBody > .kpi, #stBody > .hint, #stBody > .empty, #stBody > .filters { grid-column: 1 / -1; }
  #stBody > .kpi { margin-bottom: 0; }
  #stBody > .chart-card { margin-bottom: 0; }
  .chart-card { padding: 20px 20px 16px; }
  .chart-box svg { max-width: 560px; margin: 0 auto; }

  /* --- 弹层在桌面端改为居中对话框 --- */
  .sheet-mask { align-items: center; }
  .sheet { max-width: 480px; border-radius: 18px; padding: 20px 20px 22px; max-height: 72vh; }
}

/* 平板 / 小桌面：仍用 H5 布局，但加宽应用框 */
@media (min-width: 700px) and (max-width: 1023px) {
  #app { max-width: 760px; }
  .navbar, .tabbar { max-width: 760px; }
  .grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .grid > .tile:last-child:nth-child(odd) { grid-column: auto; }
  .sheet { max-width: 600px; }
}
