/* 公共样式：舒适新UI · 手机壳小程序观感 + 通用组件
   注意：仅视觉升级，保留全部原有类名与 id，功能逻辑不变 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  /* 暖阳橙主题（商务质感）：暖金 → 暖橙 → 深橙 */
  --c1: #fb9b3d; --c2: #f4761c; --c3: #ea5f12;
  --primary: #ee7a1c;
  --primary-dark: #d25f0c;
  --brand: #ee7a1c;
  --bg: #f7f6f3;
  --card: #ffffff;
  --text: #26201a;
  --sub: #8d8578;
  --red: #e5484d;
  --green: #12996b;
  --orange: #ef7d12;
  --purple: #8b5cf6;
  --blue: #2f7ff0;
  --border: #efeae2;
  --radius: 18px;
  --brand-soft: #fff2e4; --brand-soft2: #ffe6cc;
  --red-soft: #ffeded; --green-soft: #e4f6ee;
  --orange-soft: #fff3e4; --purple-soft: #f2ecff; --blue-soft: #e9f2ff;
  --shadow-card: 0 2px 6px rgba(80,52,20,.04), 0 12px 28px rgba(80,52,20,.07);
  --grad: linear-gradient(125deg, var(--c1) 0%, var(--c2) 52%, var(--c3) 100%);
}
body { font-family: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #dfe3ee; color: var(--text); font-size: 15px; }
svg.ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; display: block; }

/* 手机壳 */
.phone {
  width: 402px; min-height: 780px; max-width: 100%;
  margin: 24px auto; background: var(--bg); border-radius: 40px;
  box-shadow: 0 24px 60px rgba(27,34,51,.25), 0 0 0 10px #1f2430, 0 0 0 12px #3a4152;
  overflow: hidden; position: relative; display: flex; flex-direction: column; height: 820px;
}
@media (max-width: 480px) { .phone { margin: 0; border-radius: 0; box-shadow: none; height: 100vh; min-height: 0; height: 100dvh; } }

/* ===== 头部：柔和渐变 + 光斑 + 身份展示 ===== */
.app-header {
  background: var(--grad);
  color: #fff; padding: 14px 18px 22px; flex-shrink: 0;
  position: relative; overflow: hidden;
}
.app-header::before { content: ""; position: absolute; right: -50px; top: -64px; width: 180px; height: 180px;
  border-radius: 50%; background: rgba(255,255,255,.09); pointer-events: none; }
.app-header::after { content: ""; position: absolute; right: 64px; bottom: -58px; width: 120px; height: 120px;
  border-radius: 50%; background: rgba(255,255,255,.06); pointer-events: none; }
.hero-blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); pointer-events: none; }
.hero-blob.b3 { width: 54px; height: 54px; left: -18px; bottom: -20px; }

.hero-top { display: flex; align-items: flex-start; justify-content: space-between; position: relative; z-index: 2; }
.hero-user { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar {
  width: 46px; height: 46px; border-radius: 15px; flex-shrink: 0;
  background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800; color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.hi { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hi .greet { font-size: 11.5px; opacity: .85; display: flex; align-items: center; gap: 4px; }
.hi .greet svg.ic { width: 13px; height: 13px; }
.app-header .title { font-size: 18px; font-weight: 800; letter-spacing: .3px; line-height: 1.2;
  display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-badge { font-size: 10.5px; font-weight: 700; background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.35); padding: 2px 8px; border-radius: 20px; letter-spacing: .3px; flex-shrink: 0; }
.app-header .sub { font-size: 11.5px; opacity: .9; margin-top: 8px; display: flex; align-items: center; gap: 6px;
  position: relative; z-index: 2; }
.app-header .sub svg.ic { width: 14px; height: 14px; }
.header-actions { display: flex; gap: 8px; position: relative; z-index: 2; flex-shrink: 0; }
.header-btn { position: relative; width: 36px; height: 36px; border-radius: 12px;
  background: rgba(255,255,255,.17); border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .15s; }
.header-btn svg.ic { width: 18px; height: 18px; }
.header-btn:active { transform: scale(.9); }
.header-btn.logout { background: rgba(239,75,91,.35); border-color: rgba(255,255,255,.3); }
/* 顶部栏：切换角色外置 + 九宫格聚合菜单（尺寸不变、名字不挤） */
.hdr-actions { display: flex; gap: 8px; position: relative; z-index: 20; flex-shrink: 0; }
.header-btn.grid-btn { background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.35); }
.header-btn.grid-btn svg.grid-ic { width: 19px; height: 19px; fill: currentColor; stroke: none; }
.header-btn.grid-btn.open { background: rgba(255,255,255,.32); transform: scale(.94); }
.header-btn.switch-btn { background: rgba(255,255,255,.3); }
.header-btn.switch-btn svg.ic { width: 19px; height: 19px; }
.voice-mini { position: absolute; bottom: -2px; right: -2px; width: 10px; height: 10px; border-radius: 50%;
  background: #ffd166; border: 2px solid var(--c2); }
/* 九宫格下拉菜单（fixed 定位，不受 header overflow 裁切） */
.grid-menu { position: fixed; z-index: 101; width: 190px; background: #fff; border-radius: 16px;
  box-shadow: 0 12px 34px rgba(0,0,0,.22); padding: 7px; display: none; animation: gmPop .16s ease-out;
  color: #374151; }
.grid-menu.show { display: block; }
@keyframes gmPop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.grid-menu::before { content: ""; position: absolute; top: -7px; right: 14px; width: 14px; height: 14px;
  background: #fff; transform: rotate(45deg); border-radius: 3px; }
.gm-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px;
  cursor: pointer; font-size: 14px; position: relative; transition: background .12s; }
.gm-item:active { background: #fff4e8; }
.gm-item .ico { width: 30px; height: 30px; border-radius: 9px; background: #fff2e4; color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gm-item .ico svg { width: 17px; height: 17px; }
.gm-item .mt { flex: 1; font-weight: 600; }
.gm-item .mb { background: #ee7a1c; color: #fff; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px;
  border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.gm-item.danger { color: #e34b5b; }
.gm-item.danger .ico { background: #fdecee; color: #e34b5b; }
.gm-sep { height: 1px; background: #f0f1f2; margin: 4px 8px; }
.badge-dot { position: absolute; top: -6px; right: -6px; background: #fff; color: var(--c1);
  font-size: 10px; min-width: 17px; height: 17px; border-radius: 9px; display: flex; align-items: center;
  justify-content: center; padding: 0 4px; font-weight: 800;
  box-shadow: 0 1px 5px rgba(0,0,0,.2); border: 2px solid var(--c2); }

.app-body { flex: 1; overflow-y: auto; padding: 6px 13px 94px; -webkit-overflow-scrolling: touch; }
.app-body::-webkit-scrollbar { display: none; }

/* 底部导航：毛玻璃 + SVG 图标 + 选中指示条 */
.tabbar { position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,.93); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; padding: 9px 0 calc(12px + env(safe-area-inset-bottom, 0px)); flex-shrink: 0; z-index: 20; }
.tabbar .tab { flex: 1; text-align: center; color: var(--sub); font-size: 10.5px; cursor: pointer;
  position: relative; transition: color .18s; display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 600; }
.tabbar .tab .ico { width: 44px; height: 30px; border-radius: 15px; display: flex; align-items: center;
  justify-content: center; transition: background .2s, transform .18s; }
.tabbar .tab .ico svg.ic { width: 21px; height: 21px; transition: stroke-width .2s; }
.tabbar .tab.active { color: var(--primary); }
.tabbar .tab.active .ico { background: var(--brand-soft); transform: translateY(-1px); }
.tabbar .tab.active .ico svg.ic { stroke-width: 2.3; }
.tabbar .tab.active::before { content: ""; position: absolute; top: -9px; width: 22px; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--primary); }
.tabbar .tab:active .ico { transform: scale(.92); }
.tabbar .tab .mini-badge { position: absolute; top: 0; left: calc(50% + 8px); background: var(--red); color:#fff;
  font-size: 9px; min-width: 15px; height: 15px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; padding: 0 3px; font-weight: 700; border: 1.5px solid #fff; }

/* 卡片 */
.card { background: var(--card); border-radius: var(--radius); padding: 15px; margin-bottom: 12px;
  box-shadow: var(--shadow-card); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; margin-bottom: 12px; }
.stat-grid.cols3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid.cols4 { grid-template-columns: repeat(4, 1fr); gap: 8px; }
/* 安装端看板：四个关键指标一排，紧凑商务 */
.stat-grid.quick4 .stat-box { padding: 12px 8px 11px; border-radius: 14px; text-align: center; }
.stat-grid.quick4 .ico-box { width: 28px; height: 28px; border-radius: 9px; margin: 0 auto 8px; }
.stat-grid.quick4 .ico-box svg.ic { width: 15px; height: 15px; }
.stat-grid.quick4 .num { font-size: 22px; }
.stat-grid.quick4 .lbl { justify-content: center; font-size: 10.5px; margin-top: 6px; gap: 2px; white-space: normal; line-height: 1.3; }
.stat-box { background: #fff; border-radius: var(--radius); padding: 14px 14px 13px; box-shadow: var(--shadow-card); }
.stat-box .ico-box { width: 32px; height: 32px; border-radius: 11px; display: flex; align-items: center;
  justify-content: center; margin-bottom: 10px; }
.stat-box .ico-box svg.ic { width: 17px; height: 17px; }
.ico-box.brand { background: var(--brand-soft); color: var(--primary); }
.ico-box.red { background: var(--red-soft, #ffedf0); color: var(--red); }
.ico-box.green { background: var(--green-soft, #e7f8f1); color: var(--green); }
.ico-box.orange { background: var(--orange-soft, #fff4e3); color: var(--orange); }
.ico-box.purple { background: var(--purple-soft, #f1ebff); color: var(--purple); }
.ico-box.blue { background: var(--blue-soft, #e8f2ff); color: var(--blue); }
.stat-box .num { font-size: 25px; font-weight: 800; color: var(--primary); letter-spacing: -.5px; line-height: 1; }
.stat-box .num.red { color: var(--red); } .stat-box .num.green { color: var(--green); }
.stat-box .num.orange { color: var(--orange); }
.stat-box .lbl { font-size: 11.5px; color: var(--sub); margin-top: 7px; display: flex; align-items: center; gap: 5px; }
.trend { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 20px; }
.trend.up { color: var(--green); background: var(--green-soft, #e7f8f1); }
.trend.down { color: var(--red); background: var(--red-soft, #ffedf0); }

/* 表单 */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 13px; color: var(--text); margin-bottom: 6px; font-weight: 600; }
.field label .req { color: var(--red); margin-left: 3px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: 12px; padding: 11px 12px;
  font-size: 15px; background: #fff; color: var(--text); outline: none; appearance: none;
}
.field textarea { min-height: 70px; resize: none; }
.field select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%238a93a8' fill='none' stroke-width='1.6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(238,122,28,.14); }
.err-tip { color: var(--red); font-size: 12px; margin-top: 4px; display: none; }
.form-row { margin-bottom: 10px; }
.form-row label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 4px; }
.form-row input, .form-row select {
  width: 100%; box-sizing: border-box; border: 1.5px solid var(--border); border-radius: 12px;
  height: 42px; padding: 0 12px; font-size: 14px; line-height: 40px; background: #fff; outline: none;
  -webkit-appearance: none; appearance: none; }
.form-row input:disabled { background: #f5f6fa; color: var(--sub); }
.form-row input:focus, .form-row select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(238,122,28,.14); }
/* 日期控件：统一高度与边框，避免原生控件边框外扩/高度不一致 */
.form-row input[type="date"] { position: relative; padding-right: 34px; }
.form-row input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; margin: 0; padding: 0; cursor: pointer; opacity: .65; }
.form-row input[type="date"]::-webkit-datetime-edit { line-height: 40px; }
.form-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a8' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.btn { width: 100%; border: none; border-radius: 14px; padding: 13px; font-size: 16px; font-weight: 700;
  background: var(--grad); color: #fff; cursor: pointer;
  box-shadow: 0 8px 20px rgba(238,122,28,.26); transition: transform .15s, opacity .15s; }
.btn:active { opacity: .92; transform: scale(.98); }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); box-shadow: none; }
.btn.sm { padding: 8px 13px; font-size: 13px; width: auto; border-radius: 10px; box-shadow: none; }
.btn.danger { background: var(--red); box-shadow: 0 4px 14px rgba(239,75,91,.3); }

/* 订单卡片 */
.order-card { background: #fff; border-radius: var(--radius); padding: 13px 14px; margin-bottom: 11px;
  box-shadow: var(--shadow-card); position: relative; }
.order-card.warn { border-left: 3px solid var(--red); }
.order-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.order-no { font-size: 12px; color: var(--sub); }
.status-tag { font-size: 10.5px; padding: 4px 10px; border-radius: 20px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.status-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.st-待分配 { background: #fff4e3; color: #e07c26; } .st-待使用 { background: #e8f2ff; color: var(--blue); }
.st-进行中 { background: #e8f2ff; color: var(--blue); } .st-成交 { background: #e7f8f1; color: var(--green); }
.st-爽约 { background: #ffedf0; color: var(--red); } .st-待定 { background: #f1ebff; color: var(--purple); }
.st-失败 { background: #ffedf0; color: #d23c3c; } .st-无效 { background: #eef0f5; color: var(--sub); }
.st-已驳回 { background: #fdeaea; color: #c2410c; }
.order-line { font-size: 13.5px; color: var(--text); margin: 3px 0; display: flex; gap: 6px; }
.order-line .k { color: var(--sub); flex-shrink: 0; }
/* 安装备注历史（多条 / 时间 / 删除） */
.note-hist { margin-top: 8px; }
.note-hist-t { font-weight: 700; font-size: 12.5px; margin-bottom: 6px; color: var(--text); }
.note-hist-item { position: relative; background: #fff8f0; border: 1px solid #f6ddc2; border-radius: 10px;
  padding: 7px 10px; margin-bottom: 6px; font-size: 12.5px; line-height: 1.6; word-break: break-all; }
.note-hist-item.deleted { background: #f5f5f5; border-color: #e5e5e5; }
.note-hist-item.deleted .note-hist-txt { text-decoration: line-through; color: var(--sub); }
.note-hist-meta { font-size: 10.5px; color: var(--sub); margin-top: 3px; }
.note-hist-del { position: absolute; top: 6px; right: 7px; font-size: 10.5px; color: var(--red);
  background: #fff; border: 1px solid #f3b9b9; border-radius: 6px; padding: 1px 7px; cursor: pointer; }
.flag-red { display: inline-block; background: var(--red); color: #fff; font-size: 10px; border-radius: 5px;
  padding: 2px 6px; margin-left: 6px; vertical-align: 1px; font-weight: 600; }
.flag-sup { display: inline-block; background: #c2410c; color: #fff; font-size: 10px; border-radius: 5px; padding: 2px 6px; margin-left: 4px; font-weight: 600; }
.order-actions { display: flex; gap: 8px; margin-top: 9px; }
.order-actions a, .order-actions button {
  text-decoration: none; font-size: 13px; padding: 7px 14px; border-radius: 10px; cursor: pointer; border: none;
  background: var(--brand-soft); color: var(--primary); flex-shrink: 0; font-weight: 600;
}
.order-actions a.dial { background: #e7f8f1; color: var(--green); }
.order-actions button.warn-btn { background: #ffedf0; color: var(--red); }
.order-actions button.gray-btn { background: #eef0f5; color: var(--sub); }

/* 筛选条 */
.filter-bar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.filter-bar select, .filter-bar input { border: 1.5px solid var(--border); border-radius: 11px; padding: 8px 10px;
  font-size: 13px; background: #fff; outline: none; flex: 1; min-width: 0; }
.filter-bar select { flex: 0 0 auto; }
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--primary); }
.filter-bar.tight { flex-wrap: nowrap; align-items: center; }
.filter-bar.tight .chip-row { flex: 1; margin-bottom: 0; padding-bottom: 0; }
.filter-bar.tight .chip { padding: 6px 11px; font-size: 12px; }
.filter-bar.tight select { flex: 0 0 104px; font-size: 12px; padding: 6px 7px; }
.filter-bar.tight select.expand { flex: 1; min-width: 0; }
/* 安装端接单页分组：上下两行 chip */
.grp-wrap .filter-bar.tight { margin-bottom: 8px; flex-wrap: nowrap; align-items: center; }
.grp-wrap .chip { padding: 6px 11px; font-size: 12px; }
.grp-wrap #groupChips2 { margin-bottom: 12px; }
.grp-wrap .chip-follow.active { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 4px 12px rgba(242,145,12,.3); }
.grp-wrap .chip-sup.active { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 4px 12px rgba(239,75,91,.3); }

/* 通知 */
.notif-item { background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 9px; display: flex; gap: 10px;
  box-shadow: var(--shadow-card); }
.notif-item.unread { border-left: 3px solid var(--primary); }
.notif-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; }
.notif-item.read .dot { background: var(--border); }
.notif-item .txt { font-size: 13.5px; line-height: 1.5; }
.notif-item .time { font-size: 11px; color: var(--sub); margin-top: 3px; }

/* toast / 弹窗 */
#toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(27,34,51,.94);
  color: #fff; padding: 12px 22px; border-radius: 14px; font-size: 14px; z-index: 999; display: none; max-width: 80%;
  text-align: center; line-height: 1.5; animation: toastIn .18s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%,-50%) scale(.9); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
.modal-mask { position: fixed; inset: 0; background: rgba(15,20,35,.52); z-index: 100; display: none;
  align-items: center; justify-content: center; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal { background: #fff; border-radius: 20px; padding: 20px; width: 86%; max-width: 380px;
  animation: modalIn .2s ease-out; max-height: 86vh; overflow-y: auto; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 16px; margin-bottom: 14px; }
.modal .modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal .modal-actions button { flex: 1; padding: 11px; border-radius: 12px; border: none; font-size: 15px; cursor: pointer; transition: transform .15s; font-weight: 600; }
.modal .modal-actions button:active { transform: scale(.97); }
.modal .modal-actions .cancel { background: #eef0f5; color: var(--text); }
.modal .modal-actions .ok { background: var(--primary); color: #fff; }
.empty { text-align: center; color: var(--sub); padding: 40px 0; font-size: 13px; }
.section-title { font-size: 14px; font-weight: 800; margin: 4px 0 11px; color: var(--text);
  display: flex; align-items: center; gap: 8px; }
.section-title .ic { width: 17px; height: 17px; color: var(--primary); flex-shrink: 0; }
/* 卡片标题图标 */
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-h .t { font-size: 14.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.card-h .t .ic { width: 17px; height: 17px; color: var(--primary); }
.card-h .more { font-size: 11.5px; color: var(--primary); font-weight: 600; display: flex; align-items: center; gap: 3px; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { padding: 7px 14px; border-radius: 20px; background: #fff; color: var(--sub); font-size: 13px;
  border: 1px solid var(--border); cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: all .15s; }
.chip:active { transform: scale(.95); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600;
  box-shadow: 0 4px 12px rgba(238,122,28,.26); }
.link { color: var(--primary); }

/* ===== 紧凑订单卡（坐席端 / 安装端）===== */
.order-card.compact { padding: 13px 14px; margin-bottom: 11px; border-radius: var(--radius); }
.o-row { font-size: 12px; line-height: 1.45; color: var(--text); display: flex; align-items: center;
  gap: 6px; margin: 6px 0 0; min-width: 0; }
.o-row .k { color: var(--sub); flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; }
.o-row .ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; }
.o-top .status-tag { flex-shrink: 0; }
.o-no { font-size: 12px; color: var(--sub); display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px; row-gap: 2px; min-width: 0; flex: 1; }
.o-no .ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-no b { color: var(--text); font-size: 12.5px; font-weight: 600; }
/* 预约时间：红色加粗、完整换行展示不被遮挡 */
.appt-time { color: var(--red); font-weight: 800; font-size: 13px; line-height: 1.35;
  white-space: normal; overflow-wrap: anywhere; }
/* 订单号保留在结构中但不展示（将来需要恢复，删掉本条即可） */
.oid-hidden { display: none !important; }
.o-phone { font-weight: 700; font-size: 13.5px; letter-spacing: .3px; }
/* 图标拨号按钮：紧跟号码后面 */
.dial-ico { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 8px; background: #e7f8f1; color: var(--green); text-decoration: none; font-size: 13px;
  flex-shrink: 0; margin-left: 2px; transition: transform .12s; }
.dial-ico:active { transform: scale(.9); }
/* 听录音按钮 */
.rec-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 5px 10px;
  border-radius: 9px; cursor: pointer; border: none; background: var(--brand-soft); color: var(--primary); flex-shrink: 0; font-weight: 600; }
.rec-btn.rec-warn { background: #fff4e3; color: #e07c26; }
.rec-btn.rec-done { background: #e7f8f1; color: var(--green); }
.rec-box { margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 8px; }
.rec-item { background: #f7f8fc; border-radius: 10px; padding: 7px 9px; margin-bottom: 6px; }
.rec-tip { font-size: 11px; margin-top: 3px; }
/* 迷你操作按钮 */
.o-actions { display: flex; gap: 7px; margin-top: 11px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--border); }
.o-actions a, .o-actions button {
  text-decoration: none; font-size: 11.5px; padding: 5px 11px; border-radius: 9px; cursor: pointer; border: none;
  background: var(--brand-soft); color: var(--primary); flex-shrink: 0; transition: transform .12s; font-weight: 600; }
.o-actions a:active, .o-actions button:active { transform: scale(.93); }
.o-actions a.dial, .o-actions a.dial-t { background: #e7f8f1; color: var(--green); }
.o-actions button.warn-btn { background: #ffedf0; color: var(--red); }
.o-actions button.gray-btn { background: #eef0f5; color: var(--sub); }
.o-flags { font-size: 10.5px; }
/* 历史工单：提交/完结时间与操作按钮分栏，清晰对齐 */
.hist-times { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--border);
  font-size: 11px; color: var(--sub); display: flex; flex-wrap: wrap; gap: 4px 14px; line-height: 1.5; }

/* ===== 内部沟通：会话与气泡 ===== */
.chat-card { display: flex; gap: 11px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }
.chat-card:last-child { border-bottom: none; }
.cav { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, var(--c1), var(--c2)); }
/* 内部沟通：多色方形头像（按成员区分，商务柔和） */
.cav.c1 { background: linear-gradient(135deg, #f7a94b, #ee7a1c); }
.cav.c2 { background: linear-gradient(135deg, #5aa9f5, #3f7fe0); }
.cav.c3 { background: linear-gradient(135deg, #4fc79b, #16a879); }
.cav.c4 { background: linear-gradient(135deg, #b187f0, #8b5cf6); }
.cav.c5 { background: linear-gradient(135deg, #f07f8c, #e5484d); }
.cinfo { flex: 1; min-width: 0; }
.cinfo .cn { font-size: 13.5px; font-weight: 700; display: flex; justify-content: space-between; }
.cinfo .cn .tm { font-size: 10.5px; color: var(--sub); font-weight: 400; }
.cinfo .cm { font-size: 11.5px; color: var(--sub); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-row { display: flex; gap: 9px; margin-bottom: 13px; align-items: flex-end; }
.bubble-row.me { flex-direction: row-reverse; }
.bub { max-width: 74%; font-size: 12.5px; line-height: 1.6; padding: 10px 13px; border-radius: 14px; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.05); word-break: break-all; white-space: pre-wrap; }

/* ===== 微信式语音条：声波图标 + 时长，气泡紧贴内容、随时长缓慢变长，点击播放声波亮起 ===== */
.vbar { display:inline-flex; align-items:center; gap:7px; height:21.6px; width:fit-content; max-width:100%; cursor:pointer; user-select:none; -webkit-user-select:none; }
.vbar-play { flex-shrink:0; width:17px; height:14px; display:flex; align-items:center; justify-content:center; }
.vico { display:block; }
.vico-w1, .vico-w2 { opacity:.45; }
.vbar.playing .vico-w1 { animation:vicoWave .7s ease-in-out infinite; }
.vbar.playing .vico-w2 { animation:vicoWave .7s ease-in-out .16s infinite; }
.vbar-dur { font-size:12px; opacity:.92; flex-shrink:0; font-weight:500; }
/* 未听语音红点：气泡右上角（微信同款） */
.vbar-dot { position:absolute; top:2px; right:-4px; width:8px; height:8px; border-radius:50%; background:#fa5151; box-shadow:0 0 0 2px rgba(255,255,255,.85); }
@keyframes vicoWave { 0%,100%{ opacity:.35 } 50%{ opacity:1 } }

/* ===== 安装端接单卡片：图标按钮组（默认收起，点卡片展开）+ 地址省略 ===== */
.addr-short .more { color: #b9b0a2; }
/* 默认收起：按钮组隐藏，只留一行展开提示 */
.act-bar { display:none; gap:4px; margin-top:11px; padding-top:10px; border-top:1px dashed var(--border); align-items:stretch; }
.order-card.opened .act-bar { display:flex; }
/* 图标 + 2~3字 横向排列，5个按钮平分一行，紧凑分隔 */
.act-wrap { display:flex; flex:1; min-width:0; }
.act-btn { flex:1; min-width:0; display:flex; flex-direction:row; align-items:center; justify-content:center; gap:3px;
  padding:8px 2px; border-radius:9px; border:none; cursor:pointer; font-weight:700;
  font-size:10.5px; line-height:1; white-space:nowrap; background:#f6f5f2; color:#6b6358; transition:transform .12s,background .15s; }
.act-btn:active { transform:scale(.94); }
.act-btn .ic { width:13px; height:13px; flex-shrink:0; }
/* 录音按钮三态：未听红 / 断听橙 / 已听绿 */
.act-btn.rec-unheard { background:#ffeded; color:#e5484d; }
.act-btn.rec-half { background:#fff3e4; color:#e07c26; }
.act-btn.rec-done { background:#e4f6ee; color:#12996b; }
.act-btn.discuss { background:var(--brand-soft); color:var(--primary); }
/* 收起态提示行 */
.act-hint { display:flex; align-items:center; justify-content:center; gap:3px; margin-top:8px; padding-top:7px;
  border-top:1px dashed var(--border); font-size:10px; color:#b4ac9e; }
.order-card.opened .act-hint { display:none; }
.act-hint .ic { width:12px; height:12px; }

/* ===== 手机端体验增强 ===== */
.rec-btn, .dial-ico { transition: transform .12s; }

@media (max-width: 480px) {
  body { background: var(--bg); }
  .stat-box .num { font-variant-numeric: tabular-nums; }
  .order-card.compact { border: 1px solid rgba(237,240,247,.9); box-shadow: 0 1px 2px rgba(27,34,51,.03), 0 3px 10px rgba(27,34,51,.05); }
  /* iPhone 底部安全区：内容不再被 tabbar 遮挡 */
  .app-body { padding-bottom: calc(94px + env(safe-area-inset-bottom, 0px)); }
}
