/* H5 版小程序端：尺寸按 375 宽设计，配色沿用小程序 app.wxss */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: #e9edf5;
  color: #1f2329;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  display: flex;
  justify-content: center;
}

/* 手机外框 */
#app {
  width: 100%;
  max-width: 420px;
  min-height: 100%;
  background: #f4f6fb;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 24px rgba(31, 45, 90, .08);
}

/* 顶部导航（对应小程序 navigationBar） */
.nav {
  height: 48px;
  background: #2b6cff;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
}
.nav .back { width: 32px; font-size: 20px; cursor: pointer; }
.nav .title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.nav .right { width: 32px; text-align: right; font-size: 13px; cursor: pointer; }

/* 主体 */
.main { flex: 1; padding-bottom: 16px; overflow-x: hidden; }
.page { padding-bottom: 24px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; margin: 10px 12px; padding: 14px; box-shadow: 0 3px 10px rgba(31, 45, 90, .06); }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }

/* 行 */
.row { display: flex; align-items: flex-start; padding: 5px 0; font-size: 13.5px; }
.row .label { width: 80px; color: #8a9099; flex-shrink: 0; }
.row .value { flex: 1; color: #1f2329; word-break: break-all; }

/* 徽章 */
.badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font-size: 11px; line-height: 1.6; margin-right: 5px; }
.badge-orange { background: #fff3e6; color: #fa8c16; }
.badge-blue { background: #e8f1ff; color: #2b6cff; }
.badge-purple { background: #f3ecff; color: #722ed1; }
.badge-green { background: #eafbe6; color: #389e0d; }
.badge-red { background: #ffece8; color: #f5222d; }
.badge-gray { background: #f1f2f4; color: #8a9099; }

/* 按钮 */
.btn { display: block; width: 100%; height: 44px; line-height: 44px; border-radius: 22px; font-size: 15px; text-align: center; background: #2b6cff; color: #fff; border: none; cursor: pointer; font-family: inherit; }
.btn-sm { height: 34px; line-height: 34px; font-size: 13px; border-radius: 17px; }
.btn-gray { background: #f1f2f4; color: #5a6169; }
.btn-ghost { background: #fff; color: #2b6cff; border: 1px solid #2b6cff; }
.btn-red { background: #ff4d4f; }
.btn-green { background: #52c41a; }
.btn-block { margin: 12px; width: calc(100% - 24px); }
.btn.disabled, .btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:active { transform: scale(.985); }
.btn-line { display: flex; gap: 8px; padding: 0 12px; }
.btn-line .btn { flex: 1; }

/* 提示条 */
.alert { margin: 10px 12px 0; background: #ffece8; border-left: 4px solid #ff4d4f; border-radius: 6px; padding: 9px 10px; color: #cf1322; font-size: 13px; display: flex; align-items: center; cursor: pointer; }
.alert-info { background: #e8f1ff; border-left-color: #2b6cff; color: #1d4ed8; }
.alert .dot { width: 7px; height: 7px; border-radius: 50%; background: inherit; margin-right: 7px; flex-shrink: 0; }
.alert .dot { background: #ff4d4f; }
.alert-info .dot { background: #2b6cff; }

/* tab */
.tabs { display: flex; background: #fff; padding: 0 6px; position: sticky; top: 48px; z-index: 15; }
.tab { flex: 1; text-align: center; padding: 13px 0 11px; font-size: 14px; color: #8a9099; position: relative; cursor: pointer; }
.tab.active { color: #2b6cff; font-weight: 600; }
.tab.active::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 28px; height: 3px; border-radius: 2px; background: #2b6cff; }
.tab .num { font-size: 11px; margin-left: 3px; }

/* 工单卡片 */
.order { background: #fff; border-radius: 10px; margin: 10px 12px; padding: 13px; box-shadow: 0 3px 10px rgba(31, 45, 90, .06); border: 1px solid transparent; cursor: pointer; }
.order.overtime { border-color: #ff4d4f; background: #fffaf9; }
.order-hd { display: flex; align-items: center; justify-content: space-between; }
.order-id { font-size: 12px; color: #8a9099; }
.order-title { font-size: 15px; font-weight: 600; margin: 6px 0 5px; }
.order-meta { font-size: 12.5px; color: #6b7280; line-height: 1.7; }
.order-ft { margin-top: 7px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #a0a6ad; }
.tag-urgent { background: #ffece8; color: #f5222d; padding: 2px 6px; border-radius: 4px; font-size: 11px; }

/* 空态 */
.empty { text-align: center; color: #a0a6ad; padding: 60px 20px; font-size: 14px; }
.empty .icon { font-size: 40px; display: block; margin-bottom: 10px; }

/* 时间线 */
.tl-item { display: flex; position: relative; padding-bottom: 15px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-line { position: absolute; left: 8px; top: 15px; bottom: -3px; width: 1px; background: #e5e8ef; }
.tl-item:last-child .tl-line { display: none; }
.tl-dot { width: 18px; height: 18px; border-radius: 50%; background: #dfe3ea; color: #fff; font-size: 10px; text-align: center; line-height: 18px; flex-shrink: 0; z-index: 1; }
.tl-dot.done { background: #2b6cff; }
.tl-dot.current { background: #52c41a; }
.tl-body { flex: 1; padding-left: 10px; margin-top: -1px; }
.tl-title { font-size: 14px; font-weight: 500; }
.tl-desc { font-size: 12.5px; color: #6b7280; margin-top: 3px; line-height: 1.6; }
.tl-time { font-size: 11.5px; color: #a0a6ad; margin-top: 3px; }

/* 表单 */
.form-item { display: flex; align-items: center; padding: 13px 0; border-bottom: 1px solid #f0f2f5; }
.form-item:last-child { border-bottom: none; }
.form-item .label { width: 90px; color: #4b5563; flex-shrink: 0; font-size: 14px; }
.form-item .control { flex: 1; display: flex; justify-content: flex-end; }
.form-item input, .form-item select, .form-item textarea { flex: 1; width: 100%; text-align: right; font-size: 14px; border: none; outline: none; background: transparent; font-family: inherit; color: #1f2329; }
.form-item textarea { text-align: left; height: 80px; background: #f7f8fa; border-radius: 6px; padding: 8px; resize: none; }
.form-item.col { flex-direction: column; align-items: stretch; }
.form-item.col .label { width: auto; margin-bottom: 7px; }
.placeholder, ::placeholder { color: #c0c4cc; }
.required::before { content: "*"; color: #ff4d4f; margin-right: 3px; }
.counter { font-size: 11px; color: #c0c4cc; text-align: right; margin-top: 4px; }
.tip-line { font-size: 12px; color: #8a9099; line-height: 1.6; margin-top: 7px; }
.hint { font-size: 12px; color: #a0a6ad; text-align: center; padding: 5px 20px 15px; }

/* 首页入口 */
.hero { background: linear-gradient(135deg, #2b6cff, #5b8cff); color: #fff; padding: 28px 20px 22px; }
.hero h1 { margin: 0; font-size: 20px; font-weight: 600; }
.hero p { margin: 8px 0 0; font-size: 13px; opacity: .92; line-height: 1.6; }
.entry { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 10px; margin: 10px 12px; padding: 16px 14px; box-shadow: 0 3px 10px rgba(31, 45, 90, .06); cursor: pointer; }
.entry .ico { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.entry .ico.a { background: #e8f1ff; }
.entry .ico.b { background: #eafbe6; }
.entry .ico.c { background: #f3ecff; }
.entry .txt { flex: 1; }
.entry .t1 { font-size: 15px; font-weight: 600; }
.entry .t2 { font-size: 12.5px; color: #8a9099; margin-top: 3px; }
.entry .go { color: #c0c4cc; font-size: 16px; }

/* 用户条 */
.userbar { display: flex; align-items: center; justify-content: space-between; background: #fff; padding: 10px 13px; margin: 10px 12px 0; border-radius: 8px; }
.ub-name { font-size: 13.5px; font-weight: 600; }
.ub-logout { font-size: 12.5px; color: #f5222d; cursor: pointer; }

/* 统计格 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 12px; }
.stat { background: #fff; border-radius: 8px; padding: 10px 6px; text-align: center; box-shadow: 0 3px 10px rgba(31, 45, 90, .06); }
.stat .v { font-size: 18px; font-weight: 700; }
.stat .k { font-size: 11px; color: #8a9099; margin-top: 2px; }

/* 照片 */
.photos { display: flex; flex-wrap: wrap; gap: 8px; }
.ph { width: 82px; height: 82px; border-radius: 6px; overflow: hidden; position: relative; background: #f1f2f4; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-del { position: absolute; right: 0; top: 0; width: 22px; height: 22px; line-height: 20px; text-align: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 14px; border-bottom-left-radius: 6px; cursor: pointer; }
.ph-add { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #c6cbd4; background: #fafbfc; color: #8a9099; cursor: pointer; }
.ph-plus { font-size: 22px; line-height: 1; }
.ph-tip { font-size: 10px; margin-top: 2px; }
/* 视频角标：缩略图左下角播放三角 */
.ph-play {
  position: absolute; left: 4px; bottom: 4px; width: 20px; height: 20px;
  line-height: 20px; text-align: center; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px;
}
/* 全屏看图 / 播放视频 */
#h5-lightbox {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .82);
  display: none; align-items: center; justify-content: center; z-index: 999;
}
#h5-lightbox img, #h5-lightbox video { max-width: 92vw; max-height: 92vh; border-radius: 8px; background: #000; }

/* 底部操作栏 */
.footer-bar { position: sticky; bottom: 0; background: #fff; padding: 8px 12px; display: flex; gap: 8px; box-shadow: 0 -2px 8px rgba(31, 45, 90, .08); }
.footer-bar .btn { flex: 1; height: 42px; line-height: 42px; }

/* toast */
#toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: rgba(0, 0, 0, .78); color: #fff; padding: 9px 16px; border-radius: 18px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 99; max-width: 80%; text-align: center; }
#toast.show { opacity: 1; }

/* 加载 */
.loading { text-align: center; color: #a0a6ad; padding: 30px; font-size: 13px; }

/* 满意度评价 */
.rate-bar { display: flex; gap: 8px; margin: 10px 0 6px; }
.rate-btn { flex: 1; height: 40px; border: 1px solid #dfe4ee; border-radius: 8px; background: #fff; color: #4a5160; font-size: 14px; cursor: pointer; }
.rate-btn.active { border-color: #2b6cff; background: #eef3ff; color: #2b6cff; font-weight: 600; }
.muted { color: #8a9099; }
