/* =============================================================================
 * GEO 企业端控制台 · 严格 1:1 复刻 geo.printouch.cn/qiye
 * 实测基线（getComputedStyle 量取，1560×940 视口）：
 *   侧栏 240 / 品牌行 49 / 分组标题 36(fs12 #999) / 菜单项 42(radius 8, 选中 #eee)
 *   顶栏 50 / 页签栏 35 / 内容区白底 padding-left 31
 *   主色 #006BE6；搜索按钮 linear-gradient(135deg,#667eea,#764ba2)
 *   重置按钮 linear-gradient(135deg,#a8c0ff,#b8d4ff)
 *   表头 48 白底 #909399；行按钮 24 高 radius 7；标签 24 高 radius 4 #f4f4f5/#909399
 *   分页 32 高 fs14，页码 radius 2，选中 #006be6 无底色
 * ========================================================================== */
:root {
  --pri: #006be6;
  --pri-d: #0059c2;
  --grad: linear-gradient(135deg, #667eea, #764ba2);
  --grad-l: linear-gradient(135deg, #a8c0ff, #b8d4ff);
  --danger: #f56c6c;
  --ok: #67c23a;
  --warn: #e6a23c;
  --txt: #1e293b;
  --txt-2: #323639;
  --txt-3: #606266;
  --txt-4: #909399;
  --line: #e4e4e7;
  --line-2: #ebeef5;
  --bg: #ffffff;
  --side-w: 240px;
  --top-h: 50px;
  --tab-h: 35px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: #fff; color: var(--txt-2);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pri); text-decoration: none; }
button { font-family: inherit; }
svg { display: block; }
.hide { display: none !important; }

/* ------------------------------ 布局 ------------------------------ */
#app { display: flex; min-height: 100vh; }

.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: #fff;
  border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30;
}
.side-brand {
  height: 49px; display: flex; align-items: center; gap: 8px; padding: 0 12px; flex: none;
}
.side-brand .logo {
  width: 28px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #4f7cff, #22c1dc);
  color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.4px; flex: none;
}
.side-brand b { font-size: 16px; font-weight: 600; color: var(--txt-2); letter-spacing: 0.2px; white-space: nowrap; }

.side-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 0 20px; }
.side-scroll::-webkit-scrollbar { width: 4px; }
.side-scroll::-webkit-scrollbar-thumb { background: #dcdfe6; border-radius: 2px; }

/* 分组标题：36 高，12px/500/#999，左侧步骤色条 */
.nav-group { margin-bottom: 4px; }
.nav-group-title {
  height: 36px; display: flex; align-items: center; gap: 6px; padding-left: 12px;
  font-size: 12px; font-weight: 500; color: #999; white-space: nowrap; letter-spacing: 0.2px;
}
.nav-group-title i { width: 3px; height: 11px; border-radius: 2px; background: #22c55e; display: none; flex: none; }
.nav-group-title.step i { display: inline-block; }
.nav-group-title.step.s1 i { background: #22c55e; }
.nav-group-title.step.s2 i { background: #3b82f6; }
.nav-group-title.step.s3 i { background: #f59e0b; }
.nav-group-title.step.s4 i { background: #8b5cf6; }

/* 菜单项：42 高，radius 8，水平 8，选中 #eee */
.nav-item {
  display: flex; align-items: center; gap: 8px; height: 42px; margin: 0 8px 2px; padding: 0 12px 0 16px;
  border-radius: 8px; color: var(--txt-2); cursor: pointer; font-size: 14px; user-select: none;
  transition: background 0.15s, color 0.15s; position: relative;
}
.nav-item:hover { background: #f5f5f5; }
.nav-item.on { background: #eee; color: var(--txt); }
.nav-item .nico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 16px; height: 16px; }
.nav-item .nico .ni { width: 16px; height: 16px; color: inherit; }
.nav-item .nico .ni path { stroke: currentColor; }
.nav-item .txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.15; }
.nav-item .badge {
  font-size: 9px; line-height: 14px; height: 14px; padding: 0 4px; border-radius: 3px; color: #fff;
  background: #f56c6c; flex: none; transform: scale(0.95); font-weight: 500;
}
.nav-item .badge.hot { background: #f56c6c; }
.nav-item .caret { width: 12px; height: 12px; color: #a8abb2; transition: transform 0.2s; flex: none; }
.nav-item.open .caret { transform: rotate(90deg); }

.nav-sub { overflow: hidden; max-height: 0; transition: max-height 0.24s ease; position: relative; }
.nav-sub.open { max-height: 420px; }
/* 二级菜单：13px 浅色 + 圆点引导，与一级明显区分 */
.nav-sub .nav-item { height: 34px; margin: 0 8px 1px; padding-left: 46px; font-size: 13px; color: #8a919c; }
.nav-sub .nav-item::before {
  content: ''; position: absolute; left: 34px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: #c8ccd4; transition: background 0.15s;
}
.nav-sub .nav-item:hover { color: var(--txt); }
.nav-sub .nav-item.on { background: #eee; color: var(--txt); font-weight: 600; }
.nav-sub .nav-item.on::before { background: var(--pri); width: 5px; height: 5px; }
/* 一级菜单：加粗加深，与二级拉开层级 */
.nav-item.nav-parent { font-weight: 600; color: var(--txt); letter-spacing: 0.2px; }
.nav-item.nav-parent .txt { font-size: 14px; }
.nav-item.nav-parent:hover { color: var(--pri); }
.nav-item.nav-parent.open { color: var(--pri); }
.nav-item.nav-parent.open .caret { color: var(--pri); }

.side-foot {
  flex: none; height: 40px; border-top: 1px solid #f2f2f2; display: flex; align-items: center;
  justify-content: space-between; padding: 0 12px;
}
.side-foot button {
  width: 24px; height: 24px; border: 0; background: transparent; color: #a8abb2; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 4px;
}
.side-foot button:hover { background: #f5f5f5; color: var(--txt-3); }

.main { flex: 1; margin-left: var(--side-w); min-width: 0; display: flex; flex-direction: column; background: #fff; }

/* ------------------------------ 顶栏 ------------------------------ */
.top {
  height: var(--top-h); background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  gap: 4px; padding: 0 16px 0 8px; position: sticky; top: 0; z-index: 20; flex: none;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: 6px; border: 0; background: transparent; color: rgba(50, 54, 57, 0.8);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.icon-btn:hover { background: #f2f3f5; color: var(--txt-2); }
.icon-btn svg { width: 18px; height: 18px; }

.warnbar {
  flex: 1; min-width: 0; height: 32px; line-height: 30px; padding: 0 34px 0 16px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: #ffecec; border: 1px solid #ffb6b6; color: #d8000c; font-size: 13px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; position: relative; margin: 0 8px;
}
.warnbar > span { display: block; white-space: nowrap; overflow: hidden; }
.warnbar b { font-weight: 600; }
.warnbar i { position: absolute; right: 10px; top: 0; font-style: normal; cursor: pointer; color: #d8000c; opacity: 0.6; }
.warnbar i:hover { opacity: 1; }

.top-right { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--txt-2); flex: none; }
/* 顶栏「进入智能体」互跳链接 */
.top-link {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px; margin-right: 2px;
  border: 1px solid #e4e7ed; border-radius: 6px; background: #fff; color: #606266;
  font-size: 12px; text-decoration: none; white-space: nowrap; transition: all .15s;
}
.top-link:hover { color: var(--pri); border-color: #bcd6fb; background: #f2f7ff; }
.chip-exp {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 15px; border-radius: 8px;
  background: var(--pri); color: #fff; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.chip-exp em {
  font-style: normal; background: rgba(255, 255, 255, 0.22); color: #fff; border-radius: 3px;
  padding: 1px 5px; font-size: 11px; font-weight: 500; line-height: 1.3;
}
.who { display: inline-flex; align-items: center; }
.who img, .who .av {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, #409eff, #006be6); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
  line-height: 1; overflow: hidden;
}

/* ------------------------------ 页签栏 ------------------------------ */
/* 步骤条 + 页签栏 一起吸顶：滚动时始终可见，不用再上滑找步骤 */
.stick-head {
  position: sticky; top: var(--top-h); z-index: 19; background: #fff; flex: none;
  box-shadow: 0 1px 0 var(--line);
}
.tabbar {
  height: var(--tab-h); background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: stretch;
  padding: 0 0 0 0; position: relative; top: auto; z-index: auto; flex: none;
}
.tabs-scroll { display: flex; align-items: stretch; overflow-x: auto; flex: 1; scrollbar-width: none; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; height: var(--tab-h); padding: 0 14px; font-size: 14px;
  color: var(--txt-3); border-right: 1px solid var(--line); cursor: pointer; white-space: nowrap; position: relative;
  background: #fff; user-select: none;
}
.tab:hover { color: var(--pri); }
.tab.on { color: var(--pri); background: #fff; }
.tab.on .tico { color: var(--pri); }
.tab.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--pri);
}
.tab i { font-style: normal; color: #c0c4cc; font-size: 13px; line-height: 1; }
.tab .tico { display: inline-flex; align-items: center; }
.tab i:hover { color: var(--danger); }
.tabbar .tab-tools { display: flex; align-items: center; gap: 2px; padding: 0 6px; border-left: 1px solid var(--line); }
.tabbar .tab-tools button {
  width: 24px; height: 24px; border: 0; background: transparent; color: #a8abb2; cursor: pointer; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
}
.tabbar .tab-tools button:hover { background: #f2f3f5; color: var(--txt-3); }

/* ------------------------------ 内容 ------------------------------ */
.view { padding: 16px 30px 48px; min-height: calc(100vh - var(--top-h) - var(--tab-h)); background: #fff; min-width: 0; max-width: 100%; overflow-x: hidden; }

.page-head { margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 16px; font-weight: 600; color: var(--txt); letter-spacing: 0.2px; }
.page-head p { margin: 4px 0 0; font-size: 13px; color: #6b7280; }

/* ------------------------------ 筛选 ------------------------------ */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 16px; }
.field { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--txt-2); }
.field > label { white-space: nowrap; font-size: 14px; color: var(--txt-2); }
.inp, .sel, .ta {
  height: 32px; border: 0; border-radius: 8px; padding: 0 11px; font-size: 14px; color: var(--txt-2);
  background: #fff; outline: none; box-shadow: 0 0 0 1px var(--line) inset; font-family: inherit;
  transition: box-shadow 0.15s;
}
.inp:focus, .sel:focus, .ta:focus { box-shadow: 0 0 0 1px var(--pri) inset; }
.inp::placeholder, .ta::placeholder { color: #a8abb2; }
.inp.w120 { width: 120px; } .inp.w160 { width: 160px; } .inp.w180 { width: 180px; }
.inp.w200 { width: 200px; } .inp.w240 { width: 240px; } .inp.w280 { width: 280px; }
.sel {
  padding-right: 26px; appearance: none; cursor: pointer; min-width: 120px;
  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='%23a8abb2' stroke-width='2.2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.ta { height: auto; min-height: 84px; padding: 7px 11px; line-height: 1.6; resize: vertical; width: 100%; }
.daterange { display: inline-flex; align-items: center; gap: 0; height: 32px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line) inset; background: #fff; padding: 0 8px; position: relative; }
.daterange input { border: 0; outline: none; height: 30px; font-size: 14px; color: var(--txt-2); background: transparent; font-family: inherit; }
.daterange .dtxt { width: 108px; cursor: pointer; }
.daterange .dtxt::placeholder { color: #a8abb2; }
.daterange .dhide { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; left: 0; bottom: 0; }
.daterange .sep { color: #a8abb2; padding: 0 6px; font-size: 12px; }
.daterange .ico { color: #a8abb2; margin-right: 4px; display: flex; }

/* ------------------------------ 按钮 ------------------------------ */
.btn {
  height: 32px; padding: 0 15px; border-radius: 8px; border: 0; background: #fff; box-shadow: 0 0 0 1px var(--line) inset;
  color: var(--txt-3); font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; gap: 5px; transition: opacity 0.15s, background 0.15s; white-space: nowrap;
}
.btn:hover { color: var(--pri); box-shadow: 0 0 0 1px #a3c6ff inset; background: #f7fbff; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: none; }
.btn.primary:hover { background: var(--grad); color: #fff; opacity: 0.9; }
.btn.lite { background: var(--grad-l); color: #333; box-shadow: none; }
.btn.lite:hover { background: var(--grad-l); color: #333; opacity: 0.9; }
.btn.danger { background: var(--danger); color: #fff; box-shadow: none; }
.btn.danger:hover { background: var(--danger); color: #fff; opacity: 0.9; }
.btn.danger-lite { background: #fef0f0; color: var(--danger); box-shadow: 0 0 0 1px #fbc4c4 inset; }
.btn.sm { height: 24px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.btn.xs { height: 22px; padding: 0 8px; font-size: 12px; border-radius: 5px; }
.btn.link { box-shadow: none; background: transparent; color: var(--pri); padding: 0 4px; height: auto; font-weight: 400; }
.btn.link:hover { background: transparent; text-decoration: underline; }
.btn.link.red { color: var(--danger); }
.btn-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-row .btn + .btn { margin-left: 0; }

/* ------------------------------ 工具栏 / 统计块 ------------------------------ */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .sp { flex: 1; }
.stat-box { border-radius: 8px; padding: 8px 16px; min-width: 120px; line-height: 1.35; }
.stat-box.blue { background: #ecf5ff; }
.stat-box.green { background: #f0f9eb; }
.stat-box.orange { background: #fdf6ec; }
.stat-box.purple { background: #f5f2ff; }
.stat-box .lb { font-size: 14px; color: var(--txt-2); }
.stat-box .vl { font-size: 20px; font-weight: 600; color: #409eff; margin-top: 2px; }
.stat-box.green .vl { color: #67c23a; }
.stat-box.orange .vl { color: #e6a23c; }
.stat-box.purple .vl { color: #7c5cfc; }

/* ------------------------------ 表格 ------------------------------ */
.tbl-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  height: 48px; background: #fff; color: var(--txt-4); font-weight: 400; text-align: left; padding: 0 12px;
  border-bottom: 1px solid var(--line-2); white-space: nowrap; font-size: 14px;
}
table.tbl th .sort { margin-left: 3px; color: #c0c4cc; font-size: 10px; vertical-align: 1px; }
table.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); color: var(--txt-2); vertical-align: middle; line-height: 1.6; white-space: nowrap; }
table.tbl td .wrap2, table.tbl td .ellipsis { white-space: normal; }
table.tbl tbody tr:hover td { background: #fafafa; }
table.tbl .c { text-align: center; }
table.tbl .r { text-align: right; }
table.tbl .nowrap { white-space: nowrap; }
.tbl .empty-row td { padding: 40px 0; text-align: center; color: var(--txt-4); font-size: 14px; border-bottom: 0; }
.cbx { width: 14px; height: 14px; accent-color: #409eff; cursor: pointer; vertical-align: -2px; }
.row-act { display: inline-flex; gap: 12px; align-items: center; }
.row-act .btn { margin: 0 !important; }
.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.wrap2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 260px; }
.strong { color: var(--txt); }
.green-t { color: #67c23a; }
.red-t { color: var(--danger); }

/* 分页 */
.pagination { display: flex; align-items: center; gap: 12px; padding: 16px 0 4px; font-size: 14px; color: var(--txt-2); flex-wrap: wrap; }
.pagination .total-l { color: var(--txt-3); }
.pagination .right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pagination .size-sel { height: 32px; min-width: 100px; }
.pagination .pg-list { display: inline-flex; align-items: center; gap: 2px; }
.pagination .pg {
  min-width: 32px; height: 32px; padding: 0 4px; border: 0; background: #fff; border-radius: 2px;
  cursor: pointer; font-size: 14px; color: var(--txt-2); font-weight: 400;
}
.pagination .pg:hover { color: var(--pri); }
.pagination .pg.on { color: var(--pri); font-weight: 500; }
.pagination .pg.more { cursor: default; color: var(--txt-4); }
.pagination .pg:disabled { color: #c0c4cc; cursor: not-allowed; }
.pagination .jump { width: 48px; height: 32px; text-align: center; border-radius: 8px; box-shadow: 0 0 0 1px var(--line) inset; border: 0; outline: none; font-size: 14px; }
/* 「前往 x 页」保持一组，避免窄屏把「页」单独折行 */
.pagination .jumpbox { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* 标签 */
.tag { display: inline-block; padding: 0 8px; border-radius: 4px; font-size: 12px; line-height: 22px; height: 24px; border: 1px solid transparent; }
.tag.blue { background: #ecf5ff; color: #409eff; border-color: #d9ecff; }
.tag.green { background: #f0f9eb; color: #67c23a; border-color: #e1f3d8; }
.tag.gray { background: #f4f4f5; color: #909399; border-color: #e4e4e7; }
.tag.red { background: #fef0f0; color: #f56c6c; border-color: #fde2e2; }
.tag.orange { background: #fdf6ec; color: #e6a23c; border-color: #faecd8; }
.tag.purple { background: #f5f2ff; color: #7c5cfc; border-color: #e7e0ff; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }

/* ------------------------------ 弹窗（Element 版式） ------------------------------ */
.mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 100; display: flex; align-items: flex-start;
  justify-content: center; overflow-y: auto; padding: 15vh 16px 40px;
}
.mask.center { align-items: center; padding: 16px; }
.dialog {
  background: #fff; border-radius: 8px; width: 600px; max-width: 100%; box-shadow: 0 12px 32px 4px rgba(0, 0, 0, 0.04),
    0 8px 20px rgba(0, 0, 0, 0.08); animation: dlgIn 0.18s ease; margin: 0 0 auto;
}
.dialog.small { width: 420px; } .dialog.mid { width: 600px; } .dialog.large { width: 820px; } .dialog.xl { width: 960px; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.dlg-h { padding: 20px 20px 12px; display: flex; align-items: flex-start; }
.dlg-h b { font-size: 16px; font-weight: 500; color: var(--txt); line-height: 24px; }
.dlg-h .x {
  margin-left: auto; width: 24px; height: 24px; border: 0; background: transparent; color: #909399; cursor: pointer;
  border-radius: 4px; display: flex; align-items: center; justify-content: center; flex: none;
}
.dlg-h .x:hover { background: #f4f4f5; color: var(--txt-3); }
.dlg-b { padding: 0 20px 10px; max-height: 64vh; overflow-y: auto; }
.dlg-f { padding: 12px 20px 20px; display: flex; justify-content: flex-end; gap: 12px; }
.form-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 18px; }
.form-row:first-child { margin-top: 4px; }
.form-row > label { text-align: right; font-size: 14px; color: var(--txt-2); line-height: 32px; word-break: break-word; }
.form-row > label.req::before { content: "*"; color: #f56c6c; margin-right: 4px; }
.form-row .ctl { min-width: 0; }
.form-row .ctl > .inp, .form-row .ctl > .sel { width: 100%; }
.form-row .tip { font-size: 12px; color: var(--txt-4); margin-top: 4px; line-height: 1.5; }
.form-row .unit { color: var(--txt-4); font-size: 12px; }
.form-row .row-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-row .radios { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; min-height: 32px; font-size: 14px; }
.form-row .radios label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--txt-2); }
.form-row .radios input, .form-row .checks input { accent-color: #409eff; }
.form-row .checks { display: flex; gap: 8px 16px; flex-wrap: wrap; min-height: 32px; align-items: center; font-size: 14px; }
.form-row .checks label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.checkgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; font-size: 14px; color: var(--txt-2); padding-top: 5px; }
.checkgrid label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* 开关：Element 尺寸 40×20 */
.sw { width: 40px; height: 20px; border-radius: 10px; background: #dcdfe6; position: relative; cursor: pointer; transition: background 0.2s; display: inline-block; vertical-align: middle; }
.sw i { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.sw.on { background: #409eff; }
.sw.on i { transform: translateX(20px); }

/* 上传 */
.upload-box {
  width: 100px; height: 100px; border: 1px dashed #cdd0d6; border-radius: 6px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; color: #8c939d; font-size: 12px; cursor: pointer; background: #fafafa;
  background-size: cover; background-position: center; overflow: hidden;
}
.upload-box:hover { border-color: var(--pri); color: var(--pri); }
.upload-line { display: flex; gap: 8px; align-items: center; }

/* ------------------------------ 工作台 ------------------------------ */
.banner {
  border-radius: 8px; padding: 22px 26px; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(105deg, #ff3b57 0%, #ff5a76 60%, #ff7d94 100%); color: #fff; position: relative; overflow: hidden;
}
.banner h2 { margin: 0 0 8px; font-size: 21px; font-weight: 700; letter-spacing: 0.5px; }
.banner p { margin: 0 0 14px; font-size: 13px; opacity: 0.95; }
.banner .go { background: #fff; color: #ff3b57; border-radius: 16px; padding: 5px 16px; font-size: 13px; font-weight: 600; border: 0; cursor: pointer; }
.banner .gift { font-size: 64px; line-height: 1; opacity: 0.9; }

.acct { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.acct h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--txt); }
.acct .row { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; font-size: 13px; color: var(--txt-3); }
.acct .row b { font-size: 14px; color: var(--txt); }
.acct .row b.blue { color: var(--pri); }
.acct .row b.green { color: #3f9c3f; }

.core { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 2.2fr; gap: 14px; align-items: center; padding: 14px 0; }
.core .k { display: flex; align-items: center; gap: 10px; }
.core .k .ic { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; }
.core .k .ic svg { width: 18px; height: 18px; }
.core .k .v { font-size: 20px; font-weight: 600; color: var(--txt); line-height: 1.1; }
.core .k .l { font-size: 12px; color: var(--txt-4); margin-top: 2px; }
.plat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.plat { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--txt-3); }
.plat .pv { font-size: 14px; font-weight: 600; color: var(--txt); }
.plat .pi { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 600; }

.metric { border-radius: 8px; padding: 14px 16px; position: relative; overflow: hidden; }
.metric .m-l { font-size: 13px; color: #475569; display: flex; align-items: center; gap: 6px; }
.metric .m-n { font-size: 26px; font-weight: 600; margin: 10px 0 4px; color: var(--txt); }
.metric .m-s { font-size: 12px; color: #64748b; display: flex; gap: 16px; }
.metric .m-s b { color: #3f9c3f; font-weight: 500; }
.metric.blue { background: linear-gradient(105deg, #fdf3ec, #fbe9db); border-left: 3px solid #f59e0b; }
.metric.sky { background: linear-gradient(105deg, #eef5ff, #e3edfd); border-left: 3px solid #3b82f6; }
.metric.green { background: linear-gradient(105deg, #eefbf1, #e2f7e8); border-left: 3px solid #22c55e; }
.metric.purple { background: linear-gradient(105deg, #f5f1ff, #ece5ff); border-left: 3px solid #8b5cf6; }

.hotq { display: flex; flex-direction: column; gap: 8px; }
.hotq .q { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #334155; }
.hotq .q i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; background: #e2e8f0; color: #64748b; font-size: 11px; display: flex; align-items: center; justify-content: center; flex: none; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; background: #f8fafc; color: #334155; font-size: 13px; }
.quick a:hover { background: #eef4ff; color: var(--pri); }
.quick a .qi { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }

/* ------------------------------ 其它 ------------------------------ */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs .t { padding: 9px 0; font-size: 14px; color: var(--txt-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs .t.on { color: var(--pri); border-bottom-color: var(--pri); font-weight: 500; }

.empty { text-align: center; color: var(--txt-4); padding: 40px 0; font-size: 14px; }
.muted { color: var(--txt-4); font-size: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.flex { display: flex; align-items: center; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
/* 网格项默认 min-width:auto，内部宽表格会把整列撑破（窄屏下栅格不收缩） */
.grid2 > *, .grid3 > *, .grid4 > * { min-width: 0; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: #fff; }
.card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.card-h b { font-size: 14px; font-weight: 600; color: var(--txt); }
.card-h .more { margin-left: auto; font-size: 12px; color: var(--pri); cursor: pointer; }

.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #f4f4f5; color: #909399;
  padding: 10px 20px; border-radius: 6px; font-size: 14px; z-index: 300; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #ebeef5; max-width: 70vw; text-align: center;
}
.toast.ok { background: #f0f9eb; color: #67c23a; border-color: #e1f3d8; }
.toast.err { background: #fef0f0; color: #f56c6c; border-color: #fde2e2; }

.boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #fff; z-index: 200; color: var(--txt-4); font-size: 14px; }
.spinner { width: 30px; height: 30px; border: 2px solid #dbeafe; border-top-color: var(--pri); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 图片/视频网格 */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.media-item { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.media-item .thumb { height: 130px; background: #f5f7fa center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #c0c4cc; }
.media-item .meta { padding: 8px 10px; font-size: 13px; color: var(--txt-2); }
.media-item .meta .sub { font-size: 12px; color: var(--txt-4); margin-top: 2px; }
.media-item .ops { padding: 0 10px 10px; display: flex; gap: 8px; }

/* 移动端：侧栏抽屉 */
.menu-btn { display: none; }
/* 侧栏遮罩（仅手机端启用，桌面端不渲染） */
.side-mask { display: none; }
@media (max-width: 1100px) {
  .side { transform: translateX(-100%); transition: transform 0.22s ease; box-shadow: 0 0 24px rgba(0, 0, 0, 0.12); }
  .side.open { transform: none; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .warnbar { display: none; }
  .core { grid-template-columns: 1fr 1fr; }
  .metric-grid, .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
  .view { padding: 12px 14px 40px; }
  .form-row { grid-template-columns: 88px minmax(0, 1fr); }
  .form-grid2 { grid-template-columns: 1fr; }
  .checkgrid { grid-template-columns: repeat(2, 1fr); }
  .quick { grid-template-columns: 1fr 1fr; }
  .top-right .chip-exp { display: none; }
  .plat-grid { grid-template-columns: repeat(4, 1fr); }
  .page-head h1 { font-size: 15px; }
  .filters { gap: 10px 12px; }
  .field { flex: 1 1 100%; }
  .field .inp, .field .sel { flex: 1; width: auto !important; min-width: 0; }
  .dialog { width: 100% !important; }
  .dialog { margin: auto 0; }
  .mask { align-items: flex-start; padding: 10vh 10px 20px; }
  .pagination .total-l { display: none; }
  .pagination .right { margin-left: 0; width: 100%; justify-content: flex-end; }
  .toolbar .stat-box { min-width: 0; }
  .banner .gift { display: none; }
}
@media (max-width: 520px) {
  .side { width: 82vw; }
  .top-right .who { display: none; }
  .core { grid-template-columns: 1fr; }
  .page-head p { font-size: 12px; }
  .form-row { grid-template-columns: 1fr; gap: 6px; }
  .form-row > label { text-align: left; line-height: 1.4; }
}

/* 工作台：热门问题气泡云 + 热门功能卡 */
.bubblebox { position: relative; height: 246px; border-radius: 8px; background: #f8fbff; overflow: hidden; }
.bubblebox .bub {
  position: absolute; transform: translate(-50%, -50%); padding: 4px 12px; border-radius: 16px; background: #fff;
  border: 1px solid #e0eaff; color: #3b5bdb; font-size: 12px; white-space: nowrap; max-width: 46%;
  overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 8px rgba(59, 91, 219, 0.06);
}
.bubblebox .bub:nth-child(2n) { color: #0ea5e9; border-color: #d6ecff; }
.bubblebox .bub:nth-child(3n) { color: #7c3aed; border-color: #e8e0ff; }
.fn-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.fn-card {
  height: 76px; border-radius: 8px; display: flex; align-items: flex-end; padding: 8px 10px; color: #fff;
  font-size: 12px; position: relative; overflow: hidden; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.fn-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.22)); }
.fn-card span { position: relative; }
.fn-card:hover { transform: translateY(-2px); transition: transform 0.15s; }
@media (max-width: 1100px) { .fn-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .fn-grid { grid-template-columns: repeat(2, 1fr); } .bubblebox { height: 200px; } }

/* 侧栏底部按钮：SVG 图标（对齐同行 « 收起 + 齿轮设置） */
.side-foot button svg { width: 16px; height: 16px; }
.side-foot button.rot svg { transform: rotate(180deg); }
/* 顶栏右侧头像：固定尺寸，避免用户名被挤成单字 */
.top-right .who { width: 28px; height: 28px; flex: none; overflow: visible; }
.top-right .who .av { width: 28px; height: 28px; flex: none; }
.top-right .who img { width: 28px; height: 28px; display: block; }

/* ============ 成片工作台：左表单 / 中预览 / 右装修（对齐同行三栏） ============ */
.studio { display: grid; grid-template-columns: minmax(380px, 1fr) 360px 290px; gap: 14px; align-items: start; }
.studio-form .form-row { display: grid; grid-template-columns: 104px 1fr; gap: 10px; align-items: start; margin-bottom: 12px; }
.studio-form .form-row > label { font-size: 14px; color: var(--txt-2); line-height: 32px; text-align: right; }
.studio-form .form-row > label.req::before { content: "*"; color: #f56c6c; margin-right: 3px; }
.studio-form .hint { font-size: 12px; color: #909399; line-height: 1.7; margin-top: 4px; }
.studio-form .counter { font-size: 12px; color: #c0c4cc; text-align: right; margin-top: 2px; }
.studio-form .with-btn { display: flex; gap: 8px; }
.studio-form .with-btn .sel, .studio-form .with-btn .inp { flex: 1; min-width: 0; }
.studio-form .cost { color: #f56c6c; font-weight: 600; line-height: 32px; }
.studio-form .cost small { color: #909399; font-weight: 400; margin-left: 6px; }

.studio-mid { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.studio-mid .mh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.studio-mid .mh b { font-size: 14px; font-weight: 600; }
.studio-mid .mh span { font-size: 12px; color: #909399; }
.phone {
  position: relative; margin: 0 auto; width: 100%; max-width: 250px; aspect-ratio: 9 / 16;
  background: #3a3a3a; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.phone .ph-empty { color: #cfcfcf; font-size: 12px; text-align: center; padding: 0 14px; line-height: 1.8; }
.phone .ph-title { position: absolute; left: 50%; top: 62%; transform: translate(-50%, -50%); color: #fff; font-size: 15px; font-weight: 700; text-shadow: 0 2px 6px rgba(0,0,0,.55); white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.phone .ph-sub { position: absolute; left: 50%; top: 70%; transform: translate(-50%, -50%); color: #fff; font-size: 11px; opacity: .92; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
/* 主/副标题可按住拖动（touch-action 关掉滚动，否则手机上拖不动） */
.phone .ph-title, .phone .ph-sub { cursor: move; touch-action: none; user-select: none; }
.phone .ph-cap { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); color: #fff; font-size: 11px; background: rgba(0,0,0,.35); padding: 1px 6px; border-radius: 3px; }
.phone .ph-tip { position: absolute; right: 6px; bottom: 6px; font-size: 10px; color: rgba(255,255,255,.65); }
.studio-mid .mfoot { font-size: 12px; color: #909399; text-align: center; margin-top: 8px; }

.paint { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.paint .ptabs { display: flex; border-bottom: 1px solid var(--line-2); }
.paint .ptabs .pt { flex: 1; text-align: center; height: 38px; line-height: 38px; font-size: 13px; color: var(--txt-3); cursor: pointer; border-right: 1px solid var(--line-2); }
.paint .ptabs .pt:last-child { border-right: 0; }
.paint .ptabs .pt.on { color: var(--pri); background: #f5f9ff; font-weight: 500; box-shadow: inset 0 -2px 0 var(--pri); }
.paint .pbody { padding: 12px; }
.paint .ptit { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.paint .ptit b { font-size: 13px; font-weight: 600; }
.paint .ptit a { font-size: 12px; cursor: pointer; }
.paint .pfield { margin-bottom: 12px; }
.paint .pfield > span { display: block; font-size: 12px; color: var(--txt-3); margin-bottom: 5px; }
.paint .pfield .ta, .paint .pfield .sel, .paint .pfield .inp { width: 100%; }
.brush-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.brush {
  height: 28px; border-radius: 4px; font-size: 11px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-weight: 600; border: 2px solid transparent; white-space: nowrap;
}
.brush.on { border-color: var(--pri); }
.brush.b1 { background: #fff; color: #111; text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000; }
.brush.b2 { background: linear-gradient(135deg, #f7d774, #e0a423); color: #6b4a00; }
.brush.b3 { background: linear-gradient(135deg, #6fb1ff, #1e6fe0); }
.brush.b4 { background: linear-gradient(135deg, #ff7b7b, #d92b2b); }
.brush.b5 { background: linear-gradient(135deg, #7ee0a0, #22a35a); }
.brush.b6 { background: linear-gradient(135deg, #b98bff, #6d28d9); }
.stepnum { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; height: 30px; }
.stepnum button { width: 28px; height: 100%; border: 0; background: #f5f7fa; color: var(--txt-3); cursor: pointer; font-size: 15px; line-height: 1; }
.stepnum input { width: 56px; height: 100%; border: 0; text-align: center; font-size: 13px; outline: none; }
.swrow { display: flex; align-items: center; gap: 8px; }
.colorpick { display: inline-flex; align-items: center; gap: 6px; }
.colorpick i { width: 22px; height: 22px; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }
.colorpick code { font-size: 12px; color: var(--txt-3); font-family: inherit; }
@media (max-width: 1400px) { .studio { grid-template-columns: minmax(380px, 1fr) 340px 280px; } }
@media (max-width: 1280px) { .studio { grid-template-columns: 1fr 380px; } .paint { grid-column: 1 / -1; } }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } .studio-form .form-row { grid-template-columns: 84px 1fr; } }

/* ============ 发布助手（网页版） ============ */
.as-tip {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px; border-radius: 8px;
  background: #f2f7ff; border: 1px solid #dbe8ff; color: #475569; font-size: 13px; line-height: 1.7;
}
.as-tip b { color: var(--pri); }
.as-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
.as-grid > * { min-width: 0; }
.as-arts { max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.as-art {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); cursor: pointer; transition: all .15s; background: #fff;
}
.as-art:hover { border-color: #bcd6fb; background: #f8fbff; }
.as-art.on { border-color: var(--pri); background: #f2f7ff; }
.as-art input { accent-color: var(--pri); flex: none; }
.as-art .tt { flex: 1; min-width: 0; font-size: 13px; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-art .meta { flex: none; font-size: 12px; color: var(--txt-3); }
.as-plats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.as-plat {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer;
  font-size: 12px; color: var(--txt-2); transition: all .15s;
  position: relative;
}
.as-plat .pi { font-size: 18px; line-height: 1; }
.as-plat:hover { border-color: #bcd6fb; background: #f8fbff; }
.as-plat.on { border-color: var(--pri); background: #f2f7ff; color: var(--pri); font-weight: 600; }
/* 平台登录状态点：灰=未打开/未知 绿=已登录 红=未登录 */
.as-plat .as-pst {
  position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%;
  background: #c3c9d1; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.as-plat .as-pst.ok { background: #34c77b; }
.as-plat .as-pst.bad { background: #f56c6c; }
.as-ops { display: flex; gap: 8px; margin: 14px 0 12px; flex-wrap: wrap; }
.as-cur { padding: 10px 12px; border-radius: 8px; background: #fafbfc; border: 1px solid var(--line); font-size: 13px; line-height: 1.7; }
.as-cur .t { color: var(--txt); margin-bottom: 4px; }
.as-cur .b { color: var(--txt-3); font-size: 12px; }
.as-report { display: flex; gap: 8px; margin-top: 12px; }
.as-stat { margin-top: 10px; font-size: 12px; color: var(--txt-3); }
.as-stat b { color: var(--pri); }
.empty-tip { padding: 28px 0; text-align: center; color: var(--txt-3); font-size: 13px; }
@media (max-width: 1100px) {
  .as-grid { grid-template-columns: 1fr; }
  .as-plats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 发布助手 - 桌面助手连接状态 */
.as-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; flex: none; }
.as-dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .16); }
.as-deskdl { margin-left: auto; color: var(--pri); font-size: 12px; text-decoration: none; white-space: nowrap; }
.as-deskdl:hover { text-decoration: underline; }
.as-tip.on { background: #f2fcf5; border-color: #cfeeda; }

/* 通用「新」标签 */
.tag-new {
  display: inline-block; padding: 0 6px; height: 18px; line-height: 18px;
  border-radius: 4px; background: #ff7a45; color: #fff; font-size: 11px;
  font-weight: 600; vertical-align: middle;
}

/* =============================================================================
 * 移动端适配 v3.2（手机 / 小平板）
 * 修复：工作台双栏被压成窄条、表格标题竖排、分页错位、顶栏不右对齐、
 *       表单标签挤压、输入框聚焦自动放大、抽屉无遮罩、弹窗超出屏幕
 * ========================================================================== */
@media (max-width: 1100px) {
  :root { --top-h: 48px; --tab-h: 40px; }
  html { -webkit-text-size-adjust: 100%; }
  body { -webkit-tap-highlight-color: transparent; }
  #app { min-height: 100dvh; }

  /* ---------- 顶栏：只留必要项，右侧靠右 ---------- */
  .top { height: 48px; padding: 0 6px; gap: 2px; }
  .top .icon-btn { width: 36px; height: 36px; border-radius: 8px; }
  .top .icon-btn svg { width: 20px; height: 20px; }
  #refreshBtn, #fsBtn, #searchBtn { display: none; }
  .top-right { margin-left: auto; gap: 2px; }
  .top-link { height: 30px; padding: 0 10px; font-size: 12px; margin-right: 0; }

  /* ---------- 页签栏：加高、可点 ---------- */
  .tab { padding: 0 12px; font-size: 13px; }
  .tabbar .tab-tools { padding: 0 2px; }
  .tabbar .tab-tools button { width: 30px; height: 30px; }

  /* ---------- 内容区 ---------- */
  .view {
    padding: 12px 12px calc(32px + env(safe-area-inset-bottom));
    min-height: calc(100dvh - var(--top-h) - var(--tab-h));
  }
  .page-head { margin-bottom: 12px; }
  .page-head h1 { font-size: 16px; }
  .card { padding: 12px; }

  /* ---------- 表格：窄屏不再压缩列宽，「一个字一行」根治 ----------
     width:max-content 让固定列宽按声明生效，可换行的标题列才不会被挤成竖排；
     超出的部分由 .tbl-wrap 横向滚动。 */
  .tbl-wrap { -webkit-overflow-scrolling: touch; }
  .tbl-wrap table.tbl { width: max-content; min-width: 100%; }
  table.tbl th { height: 42px; padding: 0 10px; font-size: 13px; }
  table.tbl td { padding: 8px 10px; font-size: 13px; }
  table.tbl td .ellipsis { max-width: 190px; min-width: 120px; }
  table.tbl td .wrap2 { max-width: 190px; min-width: 120px; }
  .row-act { gap: 8px; }

  /* ---------- 分页：整组不再拆散 ---------- */
  .pagination { padding: 12px 0 0; gap: 8px; font-size: 13px; }
  .pagination .right { width: 100%; margin-left: 0; justify-content: space-between; gap: 6px; flex-wrap: nowrap; }
  .pagination .right > .total-n { display: none; }
  .pagination .size-sel { min-width: 88px; height: 34px; flex: none; }
  .pagination .pg-list { flex: 1 1 auto; justify-content: center; min-width: 0; overflow: hidden; }
  .pagination .pg { min-width: 28px; height: 34px; }
  .pagination .jumpbox { flex: none; margin-left: 0; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
  .pagination .jump { width: 44px; height: 34px; }

  /* ---------- 表单：标签在上、控件在下，输入框 16px 防 iOS 放大 ---------- */
  .form-row, .studio-form .form-row { grid-template-columns: 1fr; gap: 5px; margin-bottom: 14px; }
  .form-row > label, .studio-form .form-row > label {
    text-align: left; line-height: 1.5; font-size: 13px; color: var(--txt-3);
  }
  .studio-form .cost { line-height: 1.6; }
  .form-grid2 { grid-template-columns: 1fr; }
  .inp, .sel, .ta, .daterange input, .stepnum input, .pagination .jump { font-size: 16px; }
  /* 兜底：页面里还有大量未加类名的原生输入框，统一 16px 才不会触发 iOS 聚焦缩放 */
  #app input:not([type="checkbox"]):not([type="radio"]),
  #app select, #app textarea { font-size: 16px; }
  #app input[type="checkbox"] { width: 18px; height: 18px; }
  .side-foot button { width: 32px; height: 32px; }
  .dlg-h .x { width: 32px; height: 32px; }
  .as-deskdl { padding: 6px 0; }
  .inp, .sel { height: 38px; }
  .btn { height: 36px; padding: 0 14px; }
  .btn.sm { height: 32px; padding: 0 12px; font-size: 12px; }
  .btn.xs { height: 30px; padding: 0 10px; font-size: 12px; }
  .inp.w120, .inp.w160, .inp.w180, .inp.w200, .inp.w240, .inp.w280 { width: 100%; }
  .field { flex: 1 1 100%; }
  .field .inp, .field .sel { flex: 1; width: 100% !important; min-width: 0; }
  /* 日期区间：两段输入自适应，不再顶出屏幕（各页面 input 类名不统一，按结构选） */
  .field .daterange { flex: 1 1 auto; min-width: 0; max-width: 100%; }
  .daterange > input { width: 0; min-width: 0; flex: 1 1 0; }
  .checkgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* ---------- 工作台：内联双栏在窄屏堆叠（banner 被压成竖条的主因） ---------- */
  .dash-top, .dash-mid { grid-template-columns: 1fr !important; }
  .banner { padding: 16px 16px 18px; border-radius: 10px; }
  .banner h2 { font-size: 17px; line-height: 1.45; margin-bottom: 6px; letter-spacing: 0; }
  .banner p { font-size: 12px; margin-bottom: 10px; }
  .banner .go { height: 30px; padding: 0 14px; font-size: 13px; }
  .acct { padding: 12px 14px; }
  /* 核心数据：三个指标横排，平台分布单独占满一行，避免手机端一屏全是数字 */
  .core { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px 0; align-items: start; }
  .core .k { gap: 8px; }
  .core .k .ic { width: 30px; height: 30px; border-radius: 7px; }
  .core .k .ic svg { width: 16px; height: 16px; }
  .core .k .v { font-size: 18px; }
  .core .k .l { font-size: 11px; line-height: 1.35; }
  .core .plat-grid { grid-column: 1 / -1; margin-top: 4px; }
  .plat-grid { grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
  .metric .m-n { font-size: 22px; }
  .metric { padding: 12px 14px; }
  .dash-mid .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric .m-l { font-size: 12px; }
  .metric .m-s { gap: 10px; font-size: 11px; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .media-item .thumb { height: 104px; }
  .bubblebox { height: 200px; }
  .bubblebox .bub { max-width: 62%; font-size: 11px; padding: 3px 10px; }

  /* ---------- 工具栏 / 统计块 ---------- */
  .toolbar { gap: 8px; }
  .toolbar .stat-box { flex: 1 1 calc(50% - 6px); min-width: 0; padding: 8px 12px; }
  .stat-box .vl { font-size: 18px; }
  .stat-box .lb { font-size: 12px; }
  .btn-row { gap: 8px; }

  /* ---------- 发布助手 ---------- */
  .as-arts { max-height: 320px; }
  .as-plats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .as-art .meta { display: none; }

  /* ---------- 手机预览 / 装修面板 ---------- */
  .studio { grid-template-columns: 1fr; }
  .studio-mid { order: -1; }
  .phone { max-width: 215px; }

  /* ---------- 弹窗：底部抽屉式，内容可滚 ---------- */
  .mask { align-items: flex-end; padding: 0; overflow: hidden; }
  .mask.center { align-items: center; padding: 12px; }
  .dialog, .dialog.small, .dialog.mid, .dialog.large, .dialog.xl {
    width: 100% !important; max-width: 100%; margin: 0; border-radius: 14px 14px 0 0;
    max-height: 92dvh; display: flex; flex-direction: column;
  }
  .mask.center .dialog, .mask.center .dialog.small, .mask.center .dialog.mid { border-radius: 12px; max-height: 88dvh; }
  .dlg-h { padding: 16px 16px 10px; }
  .dlg-b { padding: 0 16px 8px; max-height: none; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .dlg-f { padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }
  .dlg-f .btn { flex: 1; }

  /* ---------- 侧栏抽屉：遮罩 + 限宽 ---------- */
  .side { width: min(300px, 84vw); }
  .side-mask {
    display: block; position: fixed; inset: 0; z-index: 29; background: rgba(15, 23, 42, 0.42);
    opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
  }
  .side-mask.show { opacity: 1; pointer-events: auto; }
  .nav-item { height: 46px; }
  .nav-sub .nav-item { height: 40px; }
}

/* 超窄屏（iPhone SE / 320px）再收一档 */
@media (max-width: 400px) {
  .view { padding-left: 10px; padding-right: 10px; }
  .banner h2 { font-size: 16px; }
  .as-plats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .core .k .l { font-size: 10px; }
}

/* =============================================================================
 * 同行后台视觉对齐 v3.3（对标 geo.printouch.cn/qiye 实测令牌）
 * 依据：styles2.json / styles3.json 逐元素 getComputedStyle 量取
 *   主色 #006BE6（一致）｜搜索渐变 135deg #667eea→#764ba2（一致）
 *   行内删除 #f56c6c 实心 24 高 radius 7（我方原为浅红描边）
 *   页签 chrome 风格：未激活灰底、激活白底、上圆角 8
 * ========================================================================== */
@media (min-width: 1101px) { :root { --tab-h: 38px; } }

/* ---------- 页签栏：Chrome 标签式 ---------- */
.tabbar { background: #f7f8fa; padding: 0 4px; border-bottom: 1px solid #e4e4e7; }
.tabs-scroll { gap: 0; align-items: flex-end; padding-top: 4px; }
.tab {
  height: 34px; margin: 0 3px 0 0; padding: 0 14px; border-right: 0;
  border-radius: 8px 8px 0 0; background: #e7eaee; color: #4b5563; font-size: 13px;
}
.tab:hover { background: #dfe3e8; color: var(--pri); }
.tab.on { background: #fff; color: var(--pri); box-shadow: 0 -1px 0 #e4e4e7 inset; }
.tab.on::after { display: none; }
.tab i { width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.tab i:hover { background: rgba(0, 0, 0, 0.08); color: var(--danger); }
.tabbar .tab-tools { border-left: 1px solid #e4e4e7; background: #f7f8fa; }

/* ---------- 表格：行更松、行内动作按钮为实心红 ---------- */
table.tbl td { padding: 13px 12px; }
table.tbl tbody tr td { border-bottom: 1px solid #f0f1f3; }
.row-act .btn.danger-lite,
table.tbl .row-act .btn.danger-lite {
  background: #f56c6c; color: #fff; box-shadow: none; border: 0; border-radius: 7px;
}
.row-act .btn.danger-lite:hover,
table.tbl .row-act .btn.danger-lite:hover { background: #f78989; color: #fff; }

/* ---------- 页头标题更接近同行层级 ---------- */
.page-head h1 { font-size: 19px; font-weight: 600; letter-spacing: 0.2px; }
.page-head p { font-size: 13px; color: #6b7280; margin-top: 6px; }

/* ---------- 筛选/工具栏输入更松 ---------- */
.filters { gap: 12px 18px; }
.field { gap: 10px; }

/* ---------- 个人信息：左侧竖向设置菜单（对齐同行） ---------- */
.profile-wrap { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 24px; align-items: start; }
.profile-wrap .tabs {
  flex-direction: column; gap: 0; border-bottom: 0; margin-bottom: 0; overflow: visible;
  border-right: 0; padding-top: 4px;
}
.profile-wrap .tabs .t {
  padding: 11px 14px; border-bottom: 0; border-radius: 6px; font-size: 14px; color: var(--txt-3);
  margin-bottom: 2px; white-space: nowrap;
}
.profile-wrap .tabs .t:hover { background: #f5f7fa; color: var(--txt); }
.profile-wrap .tabs .t.on {
  background: #1f3a68; color: #fff; font-weight: 500; border-bottom-color: transparent;
}
.profile-body { min-width: 0; }
@media (max-width: 1100px) {
  .profile-wrap { grid-template-columns: 1fr; gap: 12px; }
  .profile-wrap .tabs { flex-direction: row; overflow-x: auto; padding-top: 0; }
  .profile-wrap .tabs .t { margin-bottom: 0; }
}

/* ---------- 主按钮分色：表单/弹窗提交 = 实心主蓝；列表搜索 = 紫渐变（同行为两套） ---------- */
.btn-row .btn.primary,
.dlg-f .btn.primary,
.card .btn.primary:not(.lite) { background: #006be6; color: #fff; box-shadow: none; }
.btn-row .btn.primary:hover,
.dlg-f .btn.primary:hover { background: #0080ff; color: #fff; }

/* ---------- 工作台 banner：立体礼盒插画位 ---------- */
.banner { min-height: 116px; }
.banner { padding-right: 40px; }
.banner .gift {
  font-size: 0; width: 150px; height: 108px; flex: none; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.banner .gift svg { width: 100%; height: 100%; }
@media (max-width: 1100px) { .banner .gift { display: none; } }


/* ---------- 建站向导：模板卡片选中态（radio 隐藏，用 :has 高亮） ---------- */
label.card:has(input[name="tpl"]:checked) {
  border-color: var(--pri) !important;
  box-shadow: 0 0 0 2px rgba(0, 107, 230, 0.16);
}
label.card:has(input[name="tpl"]) { transition: box-shadow .15s, border-color .15s; }
label.card:has(input[name="tpl"]):hover { border-color: #bcd6fb; }

/* ------------------------------ 客户留言页（v3.5） ------------------------------ */
.stat-box.red { background: #fef0f0; }
.stat-box.red .vl { color: #f56c6c; }

/* ============ 手机端步骤导航条（第一步~第四步） ============ */
.stepbar { display: none; }
@media (max-width: 1100px) {
  .stepbar {
    display: flex; gap: 8px; overflow-x: auto; padding: 8px 10px;
    background: #fff; border-bottom: 1px solid #eef1f6;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .stepbar::-webkit-scrollbar { display: none; }
  .stepbar .schip {
    flex: none; display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 16px; background: #f4f6fa; color: #4b5563;
    font-size: 12px; font-weight: 600; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  }
  .stepbar .schip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
  .stepbar .schip.s1 i { background: #22c55e; }
  .stepbar .schip.s2 i { background: #3b82f6; }
  .stepbar .schip.s3 i { background: #f59e0b; }
  .stepbar .schip.s4 i { background: #8b5cf6; }
  .stepbar .schip.on { border-color: currentColor; }
  .stepbar .schip.on.s1 { color: #16a34a; background: #f0fdf4; }
  .stepbar .schip.on.s2 { color: #2563eb; background: #eff6ff; }
  .stepbar .schip.on.s3 { color: #d97706; background: #fffbeb; }
  .stepbar .schip.on.s4 { color: #7c3aed; background: #f5f3ff; }
}
@media (min-width: 1101px) { .stepbar { display: none; } }

/* ============ 工作台首页 · 全部功能入口（左侧导航平铺） ============ */
.allnav .allnav-group { margin-bottom: 14px; }
.allnav .allnav-title {
  font-size: 12.5px; font-weight: 700; color: #475569;
  margin: 10px 2px 8px; display: flex; align-items: center; gap: 6px;
}
.allnav .allnav-title::before {
  content: ''; width: 3px; height: 13px; border-radius: 2px;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
}
.allnav .allnav-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px;
}
.allnav .allnav-item {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #eef1f6; border-radius: 10px;
  padding: 9px 10px; font-size: 12.5px; font-weight: 600; color: #334155;
  cursor: pointer; text-decoration: none; transition: .15s; overflow: hidden;
}
.allnav .allnav-item:hover { border-color: #c7d2fe; background: #f5f7ff; color: #4338ca; }
.allnav .allnav-item .nico { display: inline-flex; color: #6366f1; flex: none; }
.allnav .allnav-item span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* PC 端左侧导航常显，首页的全部功能入口重复，宽屏隐藏（手机/平板才需要） */
@media (min-width: 1101px) { .allnav { display: none; } }

/* PC 端左侧导航常显，首页的全部功能入口重复，宽屏隐藏（手机/平板才需要） */
@media (min-width: 1101px) { .allnav { display: none; } }

/* ============ 首页顶部「全部功能」标题栏 + 分组导航 ============ */
.allnav { margin: 0 0 4px; }
.allnav .allnav-head {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px;
}
.allnav .allnav-head b { font-size: 16px; color: #1e293b; }
.allnav .allnav-head .muted { font-size: 12px; }
.allnav .allnav-nav {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 0 10px;
  position: sticky; top: 0; z-index: 20; background: #fff;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.allnav .allnav-nav::-webkit-scrollbar { display: none; }
.allnav .allnav-nav a {
  flex: none; padding: 6px 14px; border-radius: 16px; font-size: 12.5px; font-weight: 700;
  color: #475569; background: #f1f5f9; text-decoration: none; transition: .15s; white-space: nowrap;
}
.allnav .allnav-nav a.on { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }

/* 首页只有手机形态才显示（PC 有左侧栏，不重复） */
@media (max-width: 1100px) {
  .allnav .allnav-title { font-size: 13px; }
}
