/* 老板端 / 大神端 H5 样式（移动端优先，不依赖任何外部库） */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body.h5 {
  font: 15px/1.65 -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #1a1b26; background: #f4f4f8;
  padding-bottom: 76px;
}
a { color: inherit; text-decoration: none; }

.h5-top {
  background: linear-gradient(135deg, var(--primary), #3b0764);
  color: #fff; padding: 14px 16px 18px;
  border-radius: 0 0 var(--radius) var(--radius);
}
.h5-top-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.h5-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.h5-logo {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.h5-brand strong { display: block; font-size: 15px; }
.h5-slogan { display: block; font-size:12px; opacity: .8; }
.h5-nick, .h5-login {
  font-size: 12px; padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.18); white-space: nowrap;
}

.h5-notice {
  display: flex; align-items: center; gap: 8px; margin: -10px 12px 10px; padding: 9px 12px;
  background: #fff; border-radius: 12px; box-shadow: 0 4px 14px rgba(23,10,60,.08);
  font-size: 12px; color: #4b5563; overflow: hidden;
}
.h5-notice-tag {
  flex: 0 0 auto; background: rgba(124,58,237,.12); color: var(--primary);
  padding: 1px 6px; border-radius: 6px; font-size:12px;
}
.h5-notice-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.h5-wrap { padding: 0 12px 20px; }
.h5-flash { margin: 10px 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.h5-flash-success { background: #e7f7ee; color: #14663a; }
.h5-flash-error { background: #fdecec; color: #a11d1d; }
.h5-flash-info { background: #eef2ff; color: #3730a3; }

.h5-card {
  background: #fff; border-radius: var(--radius); padding: 14px;
  margin: 12px 0; box-shadow: 0 2px 10px rgba(20,10,60,.06);
}
.h5-card h2 { font-size: 15px; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.h5-card h2 .more { font-size: 12px; color: #5b6572; font-weight: 400; }

.h5-banner {
  border-radius: var(--radius); padding: 18px; color: #fff; margin: 12px 0;
  background: linear-gradient(120deg, var(--primary), var(--accent));
}
.h5-banners {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 2px 2px 6px; margin: 12px 0 2px;
  /* 轮播卡片：一屏一张，左右滑动看下一张（下面 .h5-banner 是 100% 宽） */
  scroll-padding-left: 2px;
}
.h5-banners::-webkit-scrollbar { display: none; }
.h5-banners { scrollbar-width: none; }
.h5-banners .h5-banner {
  /*
   * 以前是 86% 宽 + 居中吸附：在 420~470px 的手机上，第二张卡只露出小半张、
   * 文字被裁一半，看着像版式坏了（客户反馈的「UI 有问题」）。
   * 改成一屏一张（100%）+ 左侧吸附，滑过去就是一整张。
   */
  flex: 0 0 100%; margin: 0; scroll-snap-align: start; min-height: 108px;
}
.h5-banners .h5-banner img {
  height: 108px; object-fit: cover; border-radius: var(--radius) var(--radius) 8px 8px;
  margin: -18px -18px 12px; width: calc(100% + 36px);
}
/* 标题和说明都单行省略：再长也不会把卡片撑破或压到下一张上 */
.h5-banner strong {
  display: block; font-size: 17px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.h5-banner span {
  display: block; font-size: 12px; opacity: .9; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.h5-games { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; }
.h5-games a {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 999px; background: #fff;
  font-size: 13px; color: #4b5563; box-shadow: 0 1px 4px rgba(20,10,60,.06);
}
.h5-games a.on { background: var(--primary); color: #fff; }

.h5-svc { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #f1f1f5; }
.h5-svc:first-of-type { border-top: 0; }
.h5-svc-main { flex: 1; min-width: 0; }
.h5-svc-main strong { display: block; font-size: 14px; }
.h5-svc-main span { font-size: 12px; color: #5b6572; }
.h5-price { color: #e11d48; font-weight: 600; font-size: 15px; white-space: nowrap; }
.h5-price small { font-weight: 400; color: #5b6572; font-size:12px; }

.h5-booster {
  display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #f1f1f5;
}
.h5-booster:first-of-type { border-top: 0; }
.h5-avatar {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
  /* 两字简称（陪练 / 代练 / 开黑 / 教学）要稳稳一行放得下，不能折行 */
  font-size: 13px; line-height: 1; white-space: nowrap; overflow: hidden;
}
.h5-booster-main { flex: 1; min-width: 0; }
.h5-booster-main strong { font-size: 14px; }
.h5-booster-main p { margin: 2px 0 0; font-size: 12px; color: #5b6572; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h5-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.h5-tag { font-size:12px; color: #6d28d9; background: rgba(124,58,237,.1); padding: 2px 7px; border-radius: 6px; }
.h5-tag.warn { color: #b45309; background: rgba(245,158,11,.14); }
.h5-tag.live { color: #047857; background: rgba(16,185,129,.14); }

.h5-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid #f1f1f5; font-size: 13px; }
.h5-row:first-of-type { border-top: 0; }
.h5-row .k { color: #5b6572; }
.h5-row .v { text-align: right; }

.h5-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 16px; border-radius: 12px; border: 0; font: inherit;
  background: var(--primary); color: #fff; cursor: pointer;
}
.h5-btn.ghost { background: #f3f4f6; color: #374151; }
.h5-btn.line { background: #fff; color: var(--primary); border: 1px solid rgba(124,58,237,.35); }
.h5-btn.danger { background: #e11d48; }
.h5-btn.block { width: 100%; }
.h5-btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 9px; }
.h5-btn[disabled] { opacity: .55; }

.h5-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/*
 * "下拉框 + 按钮" 挤在一行（大神工作台的接单状态切换）
 *
 * 以前是 <select class="h5-field" style="flex:1">：.h5-field 的输入框样式只写在
 * label.h5-field 上，裸 select 拿到的是浏览器默认外观，和整站风格不一致，
 * 窄屏下还会被按钮挤变形。这里给它一套对齐规则（按钮跟下拉框底部对齐）。
 */
.h5-inline-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.h5-inline-form label.h5-field { flex: 1; margin: 0; }
.h5-inline-form .h5-btn { flex: 0 0 auto; }

/*
 * 提示文字默认是"贴着上面控件"（负上边距，为了跟着输入框走）。
 * 但它跟在按钮行 / 表单后面时，负边距会压到按钮或输入框上 ——
 * 大神工作台那句「好评率越高，派单越优先…」和登录页的「演示通道…」
 * 在手机上就是这么叠在一起的（客户截图里能看到）。这两种位置改成正间距。
 */
.h5-actions + .h5-hint,
.h5-inline-form + .h5-hint,
.h5-card > form + .h5-hint,
.h5-card > .h5-divider + .h5-hint { margin-top: 10px; }

label.h5-field { display: block; margin: 0 0 12px; font-size: 13px; color: #4b5563; }
label.h5-field input, label.h5-field select, label.h5-field textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; color: #1a1b26;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
}
.h5-hint { font-size: 12px; color: #5b6572; margin: -6px 0 12px; }

.h5-timeline { list-style: none; margin: 0; padding: 0; }
.h5-timeline li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid #ede9fe; margin-left: 5px; }
.h5-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.h5-timeline li::before {
  content: ''; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--primary);
}
.h5-timeline strong { font-size: 13px; }
.h5-timeline span { display: block; font-size: 12px; color: #5b6572; }
.h5-timeline p { margin: 4px 0 0; font-size: 13px; color: #374151; }

.h5-chat { max-height: 340px; overflow-y: auto; padding: 4px 0; }
.h5-msg { display: flex; margin-bottom: 10px; }
.h5-msg .bubble { max-width: 76%; padding: 8px 11px; border-radius: 12px; background: #f3f4f6; font-size: 13px; }
.h5-msg.mine { justify-content: flex-end; }
.h5-msg.mine .bubble { background: var(--primary); color: #fff; }
.h5-msg.system { justify-content: center; }
.h5-msg.system .bubble { background: transparent; color: #5b6572; font-size: 12px; max-width: 100%; text-align: center; }
.h5-msg .who { font-size:12px; color: #5b6572; margin-bottom: 3px; }
.h5-chat-form { display: flex; gap: 8px; margin-top: 10px; }
.h5-chat-form input { flex: 1; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px; font: inherit; }

.h5-tab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eef0f4;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.h5-tab a { flex: 1; text-align: center; font-size: 12px; color: #5b6572; padding: 6px 0; }
.h5-tab a.on { color: var(--primary); font-weight: 600; }

.h5-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(17,24,39,.9); color: #fff; font-size: 13px;
  padding: 9px 14px; border-radius: 10px; z-index: 60;
}

/* ═══════════════ 电脑端（≥900px）═══════════════
 * 手机版是"整屏铺满"写的，电脑上会拉成一条纸带（客户 2026-10-01 反馈"电脑端布局不合适"）。
 * 纯 CSS 覆盖、不动 HTML：内容收进 960px 画布居中，底部 tab 收成同宽的圆角条。
 */
@media (min-width: 900px) {
  .h5-top-in,
  .h5-wrap,
  .h5-tab { max-width: 960px; margin-left: auto; margin-right: auto; }
  .h5-wrap { padding: 20px 0 32px; }
  .h5-tab { border-radius: 12px 12px 0 0; }
}

.h5-stats { display: flex; gap: 10px; margin: 12px 0; }
.h5-stats .item { flex: 1; background: #fff; border-radius: 12px; padding: 12px; text-align: center; }
.h5-stats .num { font-size: 18px; font-weight: 600; }
.h5-stats .lbl { font-size:12px; color: #5b6572; }

.h5-empty { text-align: center; color: #5b6572; font-size: 13px; padding: 26px 10px; }
.h5-st-warn { color: #b45309; }
.h5-st-info { color: #2563eb; }
.h5-st-live { color: #059669; }
.h5-st-ok { color: #047857; }
.h5-st-muted { color: #5b6572; }
.h5-divider { height: 1px; background: #f1f1f5; margin: 12px 0; }
.h5-muted { color: #5b6572; font-size: 12px; }
