/* ==========================================================================
   管理端外壳 · 浅色紫主题（对齐参考站 #783efd）
   编辑器 #viewEdit 内部保持深色，局部变量覆盖
   ========================================================================== */

:root {
  --bg: #f2f3f5;
  --panel: #ffffff;
  --panel2: #f6f4ff;
  --line: #ebeef5;
  --txt: #1f2329;
  --dim: #979797;
  --pri: #783efd;
  --pri2: #9d6bff;
  --ok: #35d07f;
  --warn: #ffa300;
  --err: #f05858;
}

/* ---------- 全局 ---------- */
body { background: var(--bg); color: var(--txt); }
button { background: #fff; border: 1px solid var(--line); color: var(--txt); border-radius: 6px; }
button:hover { border-color: var(--pri); color: var(--pri); }
button.pri { background: var(--pri); border-color: var(--pri); color: #fff; font-weight: 500; }
button.pri:hover { background: #8a56ff; color: #fff; }
button.ghost { background: #fff; border-color: var(--pri); color: var(--pri); }
button.ghost:hover { background: #f6f0ff; }
button.danger { border-color: #ffd6d6; color: var(--err); background: #fff; }
button.danger:hover { background: #fff1f1; border-color: var(--err); }
input, select, textarea { background: #fff; border: 1px solid var(--line); border-radius: 6px; }
input:focus, select:focus, textarea:focus { border-color: var(--pri); }
a { color: var(--pri); }
.tag { background: #f7f8fa; border: 1px solid var(--line); color: var(--dim); }
.tag.ok { color: #12b76a; border-color: #c7f0da; background: #f2fdf7; }
.tag.off { color: #f04438; border-color: #ffd5d2; background: #fff5f4; }

/* ---------- 顶栏 ---------- */
#app { display: grid; grid-template-rows: 56px 1fr; height: 100%; }
#topbar {
  display: flex; align-items: center; gap: 10px; padding: 0 18px;
  background: #fff; border-bottom: 1px solid var(--line);
}
#topbar .brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; color: var(--txt); }
#topbar .brand i {
  width: 26px; height: 26px; border-radius: 7px; display: inline-block;
  background: linear-gradient(135deg, #783efd, #b18cff);
}
#topbar .who { color: var(--dim); font-size: 14px; }
#topbar .sp { flex: 1; }
#topbar button { padding: 6px 12px; font-size: 14px; }
.nbSelect {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: #4e5969; font-size: 14px; max-width: 260px;
}
.nbSelect span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nbSelect svg { width: 14px; height: 14px; fill: none; stroke: #9aa3af; stroke-width: 2; flex: none; }

/* ---------- 外壳 ---------- */
#shell { display: grid; grid-template-columns: 200px 1fr; min-height: 0; overflow: hidden; }
#sidenav {
  background: #fff; border-right: 1px solid var(--line);
  padding: 10px 10px; display: flex; flex-direction: column; gap: 2px; overflow: auto;
}
#sidenav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 6px; color: #4e5969;
  text-decoration: none; font-size: 14px; transition: .12s;
}
#sidenav a svg {
  width: 17px; height: 17px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; opacity: .85;
}
#sidenav a:hover { background: #f7f4ff; color: var(--pri); }
#sidenav a.on { background: #ede4ff; color: var(--pri); font-weight: 600; }
#sidenav a.on svg { opacity: 1; }
#content { overflow: auto; padding: 16px 18px 40px; background: var(--bg); min-height: 0; }

/* ---------- 页面通用 ---------- */
.page { display: none; }
.page.on { display: block; }
.subview { display: none; }
.subview.on { display: block; }
.ptitle { font-size: 20px; font-weight: 600; margin: 0 0 14px; color: var(--txt); }
.tipbar {
  background: #e7e8ff; color: #4a4be0; border-radius: 6px;
  padding: 9px 14px; font-size: 14px; margin-bottom: 14px; line-height: 1.6;
}
.tipbar a { color: #4a4be0; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs .tab {
  padding: 9px 20px; border-radius: 6px; background: #fff; border: 1px solid var(--line);
  color: #4e5969; font-size: 14px; cursor: pointer;
}
.tabs .tab.on { background: var(--pri); border-color: var(--pri); color: #fff; font-weight: 600; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 16px 18px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.card.p0 { padding: 0; overflow: hidden; }
.card h3 { font-size: 14.5px; margin-bottom: 12px; font-weight: 600; color: var(--txt); }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row > * { min-width: 0; }
.f { display: block; font-size: 14px; color: #4e5969; margin-bottom: 6px; }
.sp { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hint { font-size: 12.5px; color: var(--dim); line-height: 1.7; }
.field { margin-bottom: 12px; }

/* ---------- 数据表格 ---------- */
table.dt { width: 100%; border-collapse: collapse; }
table.dt thead th {
  background: #ffffff; color: #909399; font-weight: 500; font-size: 14px;
  padding: 14px 12px; text-align: center; border-bottom: 1px solid var(--line);
}
/* 机位图 / 硬件变更 / 云管智屏：深蓝字 + 淡紫底（原版实测） */
#viewList table.dt thead th,
#viewHardware table.dt thead th,
#viewScreen table.dt thead th {
  background: #fafaff; color: #0f136b;
}
table.dt tbody td {
  padding: 15px 12px; text-align: center; font-size: 14px; color: var(--txt);
  border-bottom: 1px solid #f5f6f8;
}
table.dt tbody tr:last-child td { border-bottom: 0; }
table.dt tbody tr:hover td { background: #faf8ff; }
table.dt td .op { color: var(--pri); cursor: pointer; background: none; border: 0; padding: 0 6px; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
table.dt td .op svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
table.dt td .op:hover { text-decoration: none; opacity: .8; }
table.dt td .op.danger { color: var(--err); }
/* 名称 / 投屏IP 列的编辑图标：原版是灰蓝色 */
table.dt td .cell-name .op,
table.dt td .op[data-act="rename"],
table.dt td .op[data-act="specify"] { color: #8c939d; padding: 0 2px; }
table.dt td .cell-name .op:hover,
table.dt td .op[data-act="rename"]:hover,
table.dt td .op[data-act="specify"]:hover { color: var(--pri); opacity: 1; }
table.dt td .opPill {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 8px;
  background: #7b4fe8; border: 0; color: #fff; border-radius: 4px;
  padding: 5px 12px; font-size: 14px; cursor: pointer;
}
table.dt td .opPill svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
table.dt td .opPill:hover { background: #8a60f0; }
table.dt .cell-name { display: inline-flex; align-items: center; gap: 6px; }
table.dt .cell-name b { font-weight: 400; }
.empty-cell { padding: 60px 0; text-align: center; color: var(--dim); font-size: 13.5px; }

/* 开关 */
.sw { position: relative; display: inline-block; width: 40px; height: 22px; vertical-align: middle; }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sw i { position: absolute; inset: 0; background: #dcdfe6; border-radius: 11px; transition: .2s; pointer-events: none; }
.sw i::after {
  content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.sw input:checked + i { background: var(--pri); }
.sw input:checked + i::after { transform: translateX(18px); }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 8px 4px; color: #4e5969; font-size: 14px; }
.pager button { padding: 4px 10px; min-width: 30px; background: #fff; border: 1px solid #e3e5e8; border-radius: 4px; color: #4e5969; cursor: pointer; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager button.pgNum.on { background: #f0edff; border-color: #d9cfff; color: #7b4fe8; }
.pager .pgSize { height: 28px; padding: 0 6px; border: 1px solid #e3e5e8; border-radius: 4px; color: #4e5969; width: auto; }
#viewEdit .pager .pgSize { background: #fff; color: #4e5969; }
.pager .pgInput { width: 44px; height: 28px; text-align: center; border: 1px solid #e3e5e8; border-radius: 4px; color: #4e5969; }

/* 产品下载卡片（原版黑色卡片） */
.dlGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dlCard {
  background: #0d0d0d; border-radius: 8px; padding: 26px 24px 24px;
  color: #fff; display: flex; flex-direction: column; min-height: 392px;
}
.dlIcon {
  width: 54px; height: 54px; border-radius: 10px; background: #fff;
  margin: 0 auto 16px; display: flex; align-items: center; justify-content: center;
}
.dlIcon svg { width: 26px; height: 26px; fill: none; stroke: #1a1a1a; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dlCard h3 { text-align: center; font-size: 18.72px; font-weight: 600; margin: 0 0 22px; color: #fff; }
.dlMeta { font-size: 14px; line-height: 1.95; color: #e6e6e6; }
.dlBtn {
  margin-top: auto; align-self: center; border: 0; cursor: pointer;
  background: linear-gradient(90deg, #ffd9ef 0%, #d9ecff 55%, #d6fff4 100%);
  color: #1a1a1a; border-radius: 6px; padding: 8px 30px; font-size: 14px;
}
.dlBtn:hover { filter: brightness(.96); }
@media (max-width: 1280px) { .dlGrid { grid-template-columns: repeat(2, 1fr); } }

/* 空态 */
.empty { text-align: center; padding: 60px 0 40px; color: var(--dim); }
.empty .emptyIcon { font-size: 48px; opacity: .25; margin-bottom: 10px; }
.empty .emptyOps { margin-top: 20px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   编辑器：全屏 + 深色画布（形态对齐原版：白顶栏图标按钮 / 96px 左栏 / 无右栏 / 无底栏）
   ========================================================================== */
#viewEdit {
  position: fixed; inset: 0; z-index: 60;
  --bg: #272b31; --panel: #101827; --panel2: #16203a; --line: #22304a;
  --txt: #dbe6f7; --dim: #8392ad; --pri: #2b7cff; --pri2: #4fc8ff;
  --ok: #35d07f; --warn: #ffa300; --err: #ff5d6c;
  background: var(--bg); color: var(--txt);
  grid-template-rows: 52px minmax(0, 1fr);
  grid-template-columns: 100px 1fr;
}
#viewEdit.on { display: grid; }

/* ---------- 调整属性条（原版：顶栏下方横向一条，选中元素时出现） ---------- */
#propBar {
  position: absolute; left: 100px; top: 52px; z-index: 55;
  background: #fff; border: 1px solid #f6f7f9; border-radius: 0 0 4px 4px;
  padding: 0; color: #4e5969; font-size: 14px;
  box-shadow: 0 2px 12px 0 rgba(255, 255, 255, .3);
  display: flex; flex-direction: column;
  min-width: 443px; width: auto; box-sizing: border-box;
}

#propBar.hide { display: none; }
#propBar .pbHead {
  height: 27px; padding: 4px 8px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; color: #4e5969;
}
#propBar #pbBody {
  height: 35px; padding: 4px 8px; box-sizing: border-box;
  display: flex; align-items: center; gap: 8px; overflow: visible;
}
#propBar .field { display: flex; align-items: center; gap: 6px; }
#propBar .field .f { font-size: 14px; color: #4e5969; white-space: nowrap; }
#propBar .field input, #propBar .field select {
  width: 80px !important; min-width: 80px; max-width: 80px;
  height: 26px !important; box-sizing: border-box;
  font-size: 14px; padding: 0 10px; margin: 0;
  border: 1px solid #e0e1e2; border-radius: 2px; color: #333; background: #fff;
}
#propBar .field { flex: none; }
#propBar .pbUp { height: 26px; padding: 0 12px; }

.pbHead i { font-style: normal; cursor: pointer; color: #c0c6d0; font-size: 14px; padding: 0 4px; }
.pbHead i:hover { color: #2b7cff; }
.pbBody {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 5px 12px; overflow-y: auto; max-height: 96px;
}
.pbBody.hide { display: none; }
.pbBody::-webkit-scrollbar { width: 6px; height: 6px; }
.pbBody::-webkit-scrollbar-thumb { background: #d8dde5; border-radius: 3px; }

/* 属性条里的字段：横排紧凑 */
#pbBody .mini { display: flex; gap: 10px; grid-template-columns: none; }
#pbBody .mini > div, #pbBody .field {
  display: inline-flex; align-items: center; gap: 5px; margin: 0;
}
#pbBody .field label,
#pbBody .mini label,
#pbBody .f {
  display: inline-block; margin: 0; font-size: 12px; color: #4e5969;
  white-space: nowrap; line-height: 1;
}
#viewEdit #pbBody input,
#viewEdit #pbBody select,
#viewEdit #pbBody textarea {
  height: 26px; width: 86px; border: 1px solid #dcdfe6; border-radius: 2px;
  background: #fff; color: #333; font-size: 12px; padding: 0 6px; outline: none;
}
#viewEdit #pbBody input[type=color] { width: 40px; padding: 2px; height: 24px; }
#viewEdit #pbBody textarea { width: 200px; height: 26px; line-height: 24px; resize: none; }
#viewEdit #pbBody input:focus,
#viewEdit #pbBody select:focus,
#viewEdit #pbBody textarea:focus { border-color: #2b7cff; }
#pbBody .chk { margin: 0; font-size: 12px; white-space: nowrap; }
#pbBody .hint { display: none; }
#pbBody button { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 2px; }
#pbBody .pbUp {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px;
  border: 1px solid var(--pri); border-radius: 2px; color: var(--pri);
  font-size: 12px; cursor: pointer; white-space: nowrap;
}
#pbBody .pbUp:hover { background: #f2ecff; }

/* 选中元素：原版是四角青色方块 + 顶部旋转手柄，无虚线框 */
#cLayer .edHandle {
  position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  background: #4fc8ff; border: 1px solid #fff; border-radius: 0;
  box-shadow: 0 0 3px rgba(0, 0, 0, .45);
}
#cLayer .edHandle-nw { left: 0; top: 0; cursor: nwse-resize; }
#cLayer .edHandle-ne { left: 100%; top: 0; cursor: nesw-resize; }
#cLayer .edHandle-se { left: 100%; top: 100%; cursor: nwse-resize; }
#cLayer .edHandle-sw { left: 0; top: 100%; cursor: nesw-resize; }
/* 四边中点：默认透明，鼠标靠近选中框才显示（原版也是拖动边缘改尺寸） */
#cLayer .edHandle.edge { opacity: 0; transition: opacity .12s; }
#cLayer #edHandles:hover .edHandle.edge { opacity: 1; }
#cLayer .edHandle-n { left: 50%; top: 0; cursor: ns-resize; }
#cLayer .edHandle-e { left: 100%; top: 50%; cursor: ew-resize; }
#cLayer .edHandle-s { left: 50%; top: 100%; cursor: ns-resize; }
#cLayer .edHandle-w { left: 0; top: 50%; cursor: ew-resize; }
#cLayer .edRotate {
  position: absolute; left: 50%; top: 0; width: 20px; height: 20px;
  margin: -30px 0 0 -10px; display: flex; align-items: center; justify-content: center;
  cursor: grab;
}
#cLayer .edRotate:active { cursor: grabbing; }
#cLayer .cel.sel { outline: none; }
#cLayer .cel.flash { animation: celFlash .8s ease; }
@keyframes celFlash { 0%, 100% { filter: none; } 40% { filter: brightness(1.9) drop-shadow(0 0 10px #4fc8ff); } }

/* 素材选择器 */
#viewEdit .matGrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
#viewEdit .matCell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 62px; border: 1px solid #e3e5e8; border-radius: 2px; cursor: pointer; background: #fafbfc;
}
#viewEdit .matCell:hover { border-color: #2b7cff; }
#viewEdit .matCell.on { border-color: #2b7cff; background: #f0f6ff; box-shadow: inset 0 0 0 1px #2b7cff; }
#viewEdit .matIcon { font-size: 22px; line-height: 1; }
#viewEdit .matName { font-size: 11px; color: #666; margin-top: 4px; }

/* 图片占位框上的「添加图片」 */
#cLayer .elPickImg { transition: .15s; }
#cLayer .elPickImg:hover { background: rgba(43,124,255,.3) !important; }

/* 元素浮动工具条（原版 .computer-top-nav） */
#cLayer .computer-top-nav { gap: 2px; }
#cLayer .elBarBtn {
  width: 24px; height: 24px; margin: 1px auto; border-radius: 3px;
  background: #dfe3e8 center/14px 14px no-repeat; cursor: pointer;
}
#cLayer .elBarBtn:hover { background-color: #cfd5dd; }
#cLayer .elBarBtn[data-k="skin"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M8 3l4 2 4-2 4 3-2 4h-2v11H8V10H6L4 6l4-3z'/></svg>"); }
#cLayer .elBarBtn[data-k="color"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M12 3a9 9 0 100 18c1 0 2-.8 2-2 0-.5-.2-1-.5-1.4-.3-.4-.5-.9-.5-1.3 0-1 .8-1.8 1.8-1.8H17a4 4 0 004-4c0-4.4-4-7.5-9-7.5zM6.5 12a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3-4a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm5 0a1.5 1.5 0 110-3 1.5 1.5 0 010 3z'/></svg>"); }
#cLayer .elBarBtn[data-k="del"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M7 8h10l-1 12H8L7 8zm3-4h4l1 2h4v2H5V6h4l1-2z'/></svg>"); }
#cLayer .elBarBtn[data-k="size"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M3 19L8 5h2l5 14h-2l-1.2-4H6.2L5 19H3zm4-6h4l-2-6-2 6zm9 6v-9h-2V8h5v2h-2v9h-1z'/></svg>"); }
#cLayer .elBarBtn[data-k="lw"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M3 6h18v2H3zM3 11h18v3H3zM3 16h18v4H3z'/></svg>"); }
#cLayer .elBarBtn[data-k="family"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M4 4h16v3h-6.2v13h-3.6V7H4V4z'/><rect x='4' y='19' width='16' height='2'/></svg>"); }
#cLayer .elBarBtn[data-k="setting"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M4 6h10v2H4zm12 0h4v2h-4zM4 11h4v2H4zm6 0h10v2H10zM4 16h12v2H4zm14 0h2v2h-2z'/><circle cx='16' cy='7' r='2'/><circle cx='8' cy='12' r='2'/><circle cx='18' cy='17' r='2'/></svg>"); }
#cLayer .elBarBtn[data-k="copy"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M8 3h11v13h-3V6H8V3zM5 7h11v14H5V7z'/></svg>"); }
#cLayer .elBarBtn[data-k="excel"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M4 4h16v16H4V4zm2 3v3h4V7H6zm6 0v3h6V7h-6zM6 12v3h4v-3H6zm6 0v3h6v-3h-6zM6 17v1h4v-1H6zm6 0v1h6v-1h-6z'/></svg>"); }
#cLayer .elBarBtn[data-k="bold"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M7 4h6a4 4 0 010 8H7V4zm0 10h7a4 4 0 010 8H7v-8z'/></svg>"); }
#cLayer .elBarBtn[data-k="italic"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M9 4h8v2h-3l-3 12h3v2H6v-2h3l3-12H9V4z'/></svg>"); }
#cLayer .elBarBtn[data-k="underline"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M6 4h3v9a3 3 0 006 0V4h3v9a6 6 0 01-12 0V4zM5 20h14v2H5z'/></svg>"); }
#cLayer .elBarBtn[data-k="strike"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b7cff'><path d='M3 11h18v2H3zM7 7a5 5 0 019 3h-3a2 2 0 10-3 1.7L9 9.6A5 5 0 017 7zm10 10a5 5 0 01-9-3h3a2 2 0 103-1.7l1 2.1A5 5 0 0117 17z'/></svg>"); }

/* 文本元素的浮动条是横向、位于元素上方（原版 txt-bar） */
#cLayer .computer-top-nav.horiz {
  flex-direction: row !important; width: auto !important;
  padding: 3px 4px !important;
}
#cLayer .computer-top-nav.horiz .elBarBtn { margin: 0 1px !important; }

/* 换肤面板 */
#viewEdit .skinPickGrid {
  /* 原版实测：7 列、单格 62×43、面板 610×269 */
  display: grid; grid-template-columns: repeat(7, 62px); gap: 4px;
  max-height: 269px; overflow-y: auto; justify-content: center;
}
#viewEdit .skinPickCell {
  display: flex; align-items: center; justify-content: center;
  width: 62px; height: 43px; box-sizing: border-box;
  border: 1px solid #e3e5e8; border-radius: 2px; background: #fff;
  cursor: pointer; color: #8c8c8c; padding: 3px;
}
#viewEdit .skinPickCell svg { width: 100%; height: 100%; fill: currentColor; }
#viewEdit .skinPickCell:hover { border-color: #2b7cff; color: #2b7cff; }
#viewEdit .skinPickCell.on { border-color: #2b7cff; background: #f0f6ff; box-shadow: inset 0 0 0 1px #2b7cff; color: #2b7cff; }

/* 右键菜单（原版 #designer_contextmenu） */
#viewEdit .ctxMenu {
  position: absolute; z-index: 300; background: #fff; border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .28); padding: 5px 0; min-width: 216px;
}
#viewEdit .ctxItem {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 14px; height: 32px; font-size: 14px; color: #2b7cff; cursor: pointer; white-space: nowrap;
}
#viewEdit .ctxItem:hover { background: #f0f6ff; }
#viewEdit .ctxItem em { font-style: normal; font-size: 12px; color: #8c939d; margin-left: 18px; }
#cLayer .cel.locked { cursor: default; }

/* 字体选择 */
#viewEdit .ydFamList { display: flex; flex-direction: column; gap: 6px; }
#viewEdit .ydFamRow {
  height: 34px; line-height: 34px; padding: 0 12px; border: 1px solid #e3e5e8;
  border-radius: 2px; font-size: 14px; color: #333; cursor: pointer; background: #fafbfc;
}
#viewEdit .ydFamRow:hover { border-color: #2b7cff; }
#viewEdit .ydFamRow.on { border-color: #2b7cff; background: #f0f6ff; color: #2b7cff; }

/* 调色板（原版 .color_picker：8 列 × 5 行 = 40 色） */
#viewEdit .colorPicker {
  position: absolute; z-index: 320; background: #fff; border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .28); padding: 6px; display: flex; gap: 0;
}
#viewEdit .cpCol { display: flex; flex-direction: column; }
#viewEdit .cCell {
  width: 20px; height: 20px; cursor: pointer; position: relative;
  border-right: 1px solid #fff; border-bottom: 1px solid #fff;
}
#viewEdit .cCell:hover { outline: 1px solid #2b7cff; outline-offset: -1px; }
#viewEdit .cCell.selected { box-shadow: inset 0 0 0 2px #2b7cff; }

/* 线宽列表（原版：13px ~ 1px，每行带对应粗细的线） */
#viewEdit .lwList { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
#viewEdit .lwRow {
  display: flex; align-items: center; gap: 10px; padding: 4px 8px;
  cursor: pointer; border-radius: 3px; position: relative;
}
#viewEdit .lwRow:hover { background: #f0f6ff; }
#viewEdit .lwNum { width: 34px; font-size: 14px; color: #333; text-align: right; }
#viewEdit .lwRow.on .lwNum { color: #2b7cff; }
#viewEdit .lwBar { flex: 1; background: #333; border-radius: 1px; }
#viewEdit .lwTick { position: absolute; left: -2px; color: #2b7cff; font-style: normal; font-size: 12px; }

/* 扁元素（线条）两端的居中控制点 */
#cLayer .edHandle.thin { opacity: 1; }

/* 暗色模式：原版点一下整个界面变深（body #f6f7f9 → #202127） */
body.dark-mode { background: #202127; }
body.dark-mode #topbar { background: #2a2b32; border-bottom-color: #3a3b44; }
body.dark-mode #topbar .brand { color: #e8ecf5; }
body.dark-mode #sidenav { background: #24252c; }
body.dark-mode #sidenav a { color: #9aa3b5; }
body.dark-mode #sidenav a.on { background: #33344a; color: #b39bff; }
body.dark-mode #content { background: #202127; }
body.dark-mode .page .ptitle { color: #e8ecf5; }
body.dark-mode .card { background: #2a2b32; border-color: #3a3b44; }
body.dark-mode table.dt th { background: #303139; color: #b7becd; border-color: #3a3b44; }
body.dark-mode table.dt td { color: #d4dae6; border-color: #33343c; }
body.dark-mode table.dt tr:hover td { background: #2f3038; }
body.dark-mode .tabs .tab { background: #2a2b32; color: #9aa3b5; }
body.dark-mode .tabs .tab.on { background: var(--pri); color: #fff; }
body.dark-mode .tipbar { background: #2c2d4a; color: #a9b6ff; }
body.dark-mode #editBar { background: #2a2b32; border-bottom-color: #3a3b44; }
body.dark-mode #editBar .tb-btn { color: #c8cfdd; }
body.dark-mode #propBar { background: #2a2b32; color: #c8cfdd; }
body.dark-mode #rails { background: #24252c; }
body.dark-mode #rails button { color: #9aa3b5; }
body.dark-mode #rails button:hover { background: #2f3038; }
body.dark-mode #rails button.on { background: #34354a; color: #b39bff; }
body.dark-mode #canvasWrap { background: #202127; }

/* ---------- 顶栏（白底，图标在上文字在下） ---------- */
#editBar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 0;
  padding: 0 10px; background: #fff; border-bottom: 1px solid #e8eaef;
  color: #1f2329; overflow: hidden;
}
#editBar::-webkit-scrollbar { height: 0; }
.tbScroll {
  display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0;
  overflow-x: auto; overflow-y: hidden;
}
.tbScroll::-webkit-scrollbar { height: 0; }
.tbRight { display: flex; align-items: center; gap: 3px; flex: none; padding-left: 6px; }
#editBar .tbBrand {
  display: flex; align-items: center; gap: 7px; flex: none;
  padding: 0 14px 0 6px; font-weight: 700; font-size: 14.5px; color: #1f2329;
}
#editBar .tbBrand i {
  width: 24px; height: 24px; border-radius: 7px; display: inline-block;
  background: linear-gradient(135deg, #783efd 30%, #b18cff);
}
#viewEdit #editBar .tb-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; min-width: 56px; height: 46px; padding: 3px 7px; flex: none;
  background: transparent; border: 0; border-radius: 6px; color: #4e5969;
  font-size: 10.5px; line-height: 1.15; cursor: pointer;
}
#editBar .tb-btn svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
#editBar .tb-btn span { white-space: nowrap; }
#viewEdit #editBar .tb-btn:hover { background: #f4f0ff; color: #783efd; }
#editBar .tb-btn .pill {
  background: #2b7cff; color: #fff; font-size: 11.5px;
  padding: 6px 10px; border-radius: 4px; white-space: nowrap;
}
#viewEdit #editBar .tb-btn:hover .pill { background: #468dff; color: #fff; }
#editBar .tb-btn.icon-only { min-width: 44px; }
#editBar .tb-sep { width: 1px; height: 26px; background: #e8eaef; margin: 0 4px; flex: none; }
#editBar .sp { flex: 1; min-width: 8px; }
#editBar .tb-res { min-width: 112px; padding: 2px 4px; gap: 1px; }
#editBar .tb-res svg { width: 15px; height: 15px; }
#editBar .tb-res .lb { font-size: 10.5px; line-height: 1; }
#editBar .resSub {
  font-style: normal; font-weight: 400; font-size: 10px; line-height: 1.1;
  color: #4e5969; white-space: nowrap; letter-spacing: -.2px;
}
#editBar .tb-size { display: flex; align-items: center; gap: 5px; padding: 0 6px; flex: none; color: #6b7280; }
#editBar .tb-size svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
#seatSizeRange { width: 76px; accent-color: #2b7cff; }
#viewEdit #editBar #btnExit {
  height: 32px; padding: 0 14px; border: 1px solid #e8eaef; border-radius: 6px;
  background: #fff; color: #4e5969; font-size: 14px; flex: none;
}
#viewEdit #editBar #btnExit:hover { border-color: #783efd; color: #783efd; }
#viewEdit #editBar #btnSave {
  height: 32px; padding: 0 22px; border: 0; border-radius: 6px;
  background: #2b7cff; color: #fff; font-size: 14px; font-weight: 500; flex: none;
}
#viewEdit #editBar #btnSave:hover { background: #468dff; color: #fff; }

/* ---------- 左侧组件栏（100px / 每项 75×62 / 图标 14×14，对齐原版实测值） ---------- */
#viewEdit #rails {
  grid-row: 2; grid-column: 1;
  background: #fff; border-right: 1px solid #e8eaef;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  padding: 8px 0 24px; overflow-y: auto; overflow-x: hidden;
}
#viewEdit #rails::-webkit-scrollbar { width: 0; }
#viewEdit #rails button {
  width: 75px; height: 62px; margin-bottom: 12px; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; font-size: 14px; line-height: 19px; color: rgb(81, 86, 96);
  background: transparent; border: 0; border-radius: 0; flex: none;
}
#viewEdit #rails .railIcon {
  display: block; width: 14px; height: 14px;
  background-size: contain; background-position: 50% 50%; background-repeat: no-repeat;
  opacity: .85;
}
#viewEdit #rails .railText { font-size: 14px; line-height: 19px; }
#viewEdit #rails button:hover { color: #2b7cff; }
#viewEdit #rails button:hover .railIcon { opacity: 1; }
#viewEdit #rails button.armed { color: #2b7cff; background: #eef5ff; }

/* 新放置元素闪烁提示 */
#cLayer .cel.flash { outline: 2px solid #2b7cff; outline-offset: 2px; }
@keyframes flashPulse {
  0% { box-shadow: 0 0 0 0 rgba(43, 124, 255, .55); }
  100% { box-shadow: 0 0 0 14px rgba(43, 124, 255, 0); }
}
#cLayer .cel.flash { animation: flashPulse .8s ease-out; }

/* ---------- 画布 ---------- */
#viewEdit #canvasWrap {
  grid-row: 2; grid-column: 2; position: relative; min-height: 0; overflow: auto;
  display: flex; align-items: flex-start; justify-content: flex-start; padding: 0;
  background: #272b31;
  background-image:
    repeating-linear-gradient(48deg, rgba(255, 255, 255, .014) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-48deg, rgba(255, 255, 255, .010) 0 1px, transparent 1px 9px);
}
#viewEdit #stageBox { box-shadow: 0 16px 44px rgba(0, 0, 0, .5); border-radius: 2px; }
#viewEdit #stage { background: #272b31; }

/* ---------- 缩放浮层 ---------- */
#zoomDock {
  position: absolute; right: 16px; bottom: 14px; z-index: 20;
  display: flex; align-items: center; gap: 4px; padding: 4px 10px;
  background: rgba(16, 24, 39, .9); border: 1px solid #2b3a52; border-radius: 20px;
  color: #93a3bd; font-size: 11.5px; backdrop-filter: blur(4px);
}
#viewEdit #zoomDock button {
  background: transparent; border: 0; color: #cfe1ff; font-size: 14px;
  padding: 1px 7px; border-radius: 4px; cursor: pointer;
}
#viewEdit #zoomDock button:hover { background: #1e2b42; color: #fff; }
#zoomDock input[type=range] { width: 84px; accent-color: #2b7cff; }
#zoomDock #stZoom { min-width: 34px; text-align: right; }

/* ---------- 右侧属性抽屉（默认收起，选中滑出） ---------- */
#viewEdit #side {
  position: absolute; top: 52px; right: 0; bottom: 0; width: 300px; z-index: 30;
  background: #101827; border-left: 1px solid #22304a;
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .18s ease;
  box-shadow: -10px 0 26px rgba(0, 0, 0, .38);
}
#viewEdit #side.open { transform: none; }
#sideHead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; height: 42px; border-bottom: 1px solid #22304a;
  font-size: 14px; color: #dbe6f7; flex: none;
}
#viewEdit #sideHead button {
  background: transparent; border: 0; color: #8392ad; font-size: 19px;
  line-height: 1; padding: 0 4px; cursor: pointer;
}
#viewEdit #sideHead button:hover { color: #fff; }
#sideOps { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid #22304a; flex: none; }
#viewEdit #sideOps button {
  flex: 1; padding: 6px 0; font-size: 12px; border-radius: 5px;
  background: #16203a; border: 1px solid #22304a; color: #c3d0e3; cursor: pointer;
}
#viewEdit #sideOps button:hover { border-color: #2b7cff; color: #cfe1ff; }
#viewEdit #sideOps #btnDel:hover { border-color: #ff5d6c; color: #ff9aa5; }

/* 弹窗保持浅色 */
#modal .card, #modalBox { background: #fff; color: var(--txt); }
#modalBox { width: 420px; border-radius: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.22); }
#modalTitle { color: #7b4fe8; font-weight: 500; border-bottom: 0; padding: 18px 20px 6px; font-size: 15px; display: flex; align-items: center; justify-content: space-between; }
#modalTitle .modal-x { font-style: normal; font-size: 19px; color: #bbb; cursor: pointer; line-height: 1; }
#modalTitle .modal-x:hover { color: #888; }
#modalBody { padding: 6px 20px 14px; }
#modalBody input { border-radius: 4px; }
#modalFoot { border-top: 0; padding: 4px 20px 18px; }
#modalFoot .pri, #modalFoot #modalOk { background: #7b4fe8; border-color: #7b4fe8; color: #fff; }
#modalFoot .pri:hover, #modalFoot #modalOk:hover { background: #8a60f0; color: #fff; }
#toast { background: #1f2329; border-color: #1f2329; color: #fff; }

/* ==========================================================================
   编辑器内弹窗（形态对齐原版：白卡 / 无遮罩 / 左上定位 / 底部确定取消）
   ========================================================================== */
.ydlg {
  position: absolute; z-index: 210; background: #fff; color: #333;
  border-radius: 3px; box-shadow: 0 2px 14px rgba(0, 0, 0, .22);
  font-size: 12px;
}
.ydlg-hd { height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-size: 18px; color: #333; box-sizing: border-box;}
.ydlg-hd .ydlg-x { font-style: normal; font-size: 19px; color: #bbb; cursor: pointer; line-height: 1; }
.ydlg-hd .ydlg-x:hover { color: #888; }
.ydlg-bd { padding: 2px 20px 6px; max-height: 66vh; overflow: auto; }
.ydlg-ft { display: flex; justify-content: center; gap: 16px; padding: 0 16px; height: 59px; box-sizing: border-box;}
#viewEdit .ydlg-ft button { padding: 7px 28px; border-radius: 2px; font-size: 14px; cursor: pointer; }
#viewEdit .ydlg-ft .ok { background: #2b7cff; border: 1px solid #2b7cff; color: #fff; }
#viewEdit .ydlg-ft .ok:hover { background: #468dff; color: #fff; }
#viewEdit .ydlg-ft .cancel { background: #fff; border: 1px solid #d9d9d9; color: #666; }
#viewEdit .ydlg-ft .cancel:hover { border-color: #bbb; color: #333; background: #fff; }

/* 4 列网格（设置背景 / 设置相框） */
.ydGrid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ydUp {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: 100px; background: #f2f3f5; border: 1px solid #e3e5e8; border-radius: 2px;
  cursor: pointer; text-align: center;
}
.ydUp span { font-size: 12px; color: #666; }
.ydUp em { font-size: 11px; color: #999; font-style: normal; }
.ydUp:hover { border-color: #2b7cff; }
.ydThumb { height: 100px; border-radius: 2px; cursor: pointer; position: relative; border: 1px solid #e3e5e8; }
.ydThumb.on { border-color: #2b7cff; }
.ydThumb.on::after { content: '✓'; position: absolute; right: 5px; bottom: 2px; color: #2b7cff; font-size: 14px; font-weight: 700; }
.ydFrame { height: 100px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; background: #3a3f47; border-radius: 2px; }
.ydFrame i { display: block; width: 74px; height: 74px; border-style: solid; }
.ydFrame.on::after { content: '✓'; position: absolute; right: 5px; bottom: 1px; color: #2b7cff; font-size: 14px; font-weight: 700; }

/* 设置电脑 */
.ydRadio { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #666; margin: 4px 0 10px; cursor: pointer; }
.ydRadio i { width: 13px; height: 13px; border: 1px solid #c8cace; border-radius: 50%; display: inline-block; position: relative; transition: .15s; }
.ydRadio.on i { border-color: #2b7cff; }
.ydRadio.on i::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: #2b7cff; }
.ydUpRow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ydUpCell { text-align: center; position: relative; }
.ydUpBox {
  display: flex; align-items: center; justify-content: center;
  height: 70px; background: #f7f8fa; border: 1px solid #e3e5e8; border-radius: 2px;
  color: #999; font-size: 12px; cursor: pointer;
  pointer-events: none; opacity: .55;
}
.ydUpBox.enabled { pointer-events: auto; opacity: 1; }
.ydUpBox.enabled:hover { border-color: #2b7cff; }
.ydUpBox.has { border-color: #2b7cff; }
.ydUpCell span { display: block; margin-top: 6px; font-size: 12px; color: #666; }
.ydSub { margin: 14px 0 8px; font-size: 12px; color: #333; }
.ydSkinGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ydSkin {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  padding: 8px 6px; border: 1px solid #e3e5e8; border-radius: 2px;
  background: #fff; cursor: pointer; position: relative;
}
.ydSkin img { width: 100%; height: 32px; object-fit: contain; display: block; }
.ydSkin.on { border-color: #2b7cff; }
.ydSkin.on::after { content: '✓'; position: absolute; right: 4px; bottom: 0; color: #2b7cff; font-size: 14px; font-weight: 700; }

/* 顶栏下拉（显示设置 / 提醒设置） */
.ydmenu { width: 208px; padding: 6px 0; }
.ydChk {
  display: block; padding: 11px 18px 11px 36px; font-size: 12px; color: #333;
  cursor: pointer; position: relative;
}
.ydChk::before {
  content: ''; position: absolute; left: 16px; top: 50%; margin-top: -6px;
  width: 12px; height: 12px; border: 1px solid #c8cace; border-radius: 2px; background: #fff;
}
.ydChk.on::before { background: #2b7cff; border-color: #2b7cff; }
.ydChk.on::after {
  content: '✓'; position: absolute; left: 17px; top: 50%; margin-top: -8px;
  color: #fff; font-size: 11px; line-height: 14px;
}
.ydChk:hover { background: #f5f7fa; }
.ydRow { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; font-size: 12px; color: #333; }
.ydRow a { color: #2b7cff; cursor: pointer; font-size: 12px; text-decoration: none; }
.ydRow:hover { background: #f5f7fa; }
.ydSep { height: 1px; background: #eef0f3; margin: 4px 0; }

/* 表单（批量调整机器号 / 设置机号字体） */
.ydForm { display: grid; grid-template-columns: 136px 1fr; gap: 10px; align-items: center; padding-top: 8px; }
.ydForm > label { text-align: right; font-size: 12px; color: #666; white-space: nowrap; }
.ydForm .ctl { display: flex; align-items: center; gap: 6px; }
.ydForm .ctl i { color: #999; font-style: normal; }
.ydForm .ctl.two input { width: 104px; }
#viewEdit .ydForm input, #viewEdit .ydForm select {
  height: 30px; border: 1px solid #dcdfe6; border-radius: 2px; background: #fff;
  color: #333; font-size: 12px; padding: 0 8px; width: 100%; outline: none;
}
#viewEdit .ydForm input:focus, #viewEdit .ydForm select:focus { border-color: #2b7cff; }
#viewEdit .ydForm input.ydColor { width: 52px; padding: 2px; height: 26px; }
.ydRed { color: #f5222d; font-size: 12px; text-align: center; padding: 10px 0 2px; }

/* 管理端按钮尺寸（原版实测 60x38，字号 14px） */
#content button {
  height: 32px; padding: 0 16px; font-size: 14px; border-radius: 4px;
}
/* 表格行内操作按钮：20px 高，透明底，紫字 */
#content table.dt tbody td button:not(.opPill) {
  height: 20px; padding: 0 8px; border: 0; background: transparent;
  color: #783efd; font-size: 14px; min-width: 54px;
}
#content table.dt tbody td button.opPill {
  height: 32px; padding: 0 16px; border: 0; border-radius: 16px;
  background: #7f7fd5; color: #fff; font-size: 14px; min-width: 156px;
}
#content table.dt tbody td button.danger { color: #f54b4b; }
#content table.dt tbody td button:hover { text-decoration: underline; }
#content button.ghost { background: #fff; border: 1px solid #7f7fd5; color: #7f7fd5; }
#content button.ghost:hover { background: #f4f4fc; }
#content button.pri { background: #7f7fd5; border: 1px solid #7f7fd5; color: #fff; }
#content button.pri:hover { background: #6f6fc8; }
#content .card .row button { margin-right: 10px; }

/* 顶栏头像（原版右上角） */
#topbar .avatar {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 0 6px; height: 32px; border-radius: 4px;
}
#topbar .avatar:hover { background: #f2f3f5; }
#topbar .avatar i {
  width: 26px; height: 26px; border-radius: 50%; display: block;
  background: linear-gradient(135deg, #a98bff, #783efd);
  position: relative;
}
#topbar .avatar i::after {
  content: ''; position: absolute; left: 50%; top: 6px; width: 9px; height: 9px;
  margin-left: -4.5px; border-radius: 50%; background: #fff;
}
#topbar .avatar .caret {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid #8c939d;
}

/* 淡紫底按钮（原版「创建新的桌面」） */
#content button.soft { background: #e3def7; border: 1px solid #e3def7; color: #7459d9; }
#content button.soft:hover { background: #d8d0f2; }
/* 外网/内网地址按钮宽度（原版 151px） */
#content #btnOuterUrl, #content #btnInnerUrl { min-width: 151px; }
#content #btnScreenOuter, #content #btnScreenInner { min-width: 165px; }
/* 分页（原版：共N条 / 10条/页 / 页码 34x34 / 前往 输入 页） */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 0; font-size: 14px; color: #606266; }
.pager .pgNum { width: 34px !important; height: 34px !important; min-width: 34px !important; max-width: 34px; padding: 0 !important; font-size: 14px; color: #606266; background: transparent; border: 0; box-sizing: border-box; }
.pager .pgNum.on { background: #7f7fd5; border: 0; color: #fff; }
.pager .pgPrev, .pager .pgNext { width: 34px; height: 34px; padding: 0; font-size: 14px; color: #606266; background: transparent; border: 0; }
.pager .pgSize { height: 34px; padding: 0 6px; border: 1px solid #e3e5e8; border-radius: 4px; color: #606266; font-size: 14px; width: auto; }
.pager .pgInput { width: 44px; height: 34px; text-align: center; border: 1px solid #e3e5e8; border-radius: 4px; color: #606266; font-size: 14px; }

/* 状态示例换肤：模板选择 */
#viewEdit .tplGrid { display: flex; flex-direction: column; gap: 10px; }
#viewEdit .tplCell { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid #e3e5e8; border-radius: 4px; cursor: pointer; background: #fafbfc; }
#viewEdit .tplCell:hover { border-color: #7f7fd5; }
#viewEdit .tplCell.on { border-color: #7f7fd5; background: #f4f4fc; box-shadow: inset 0 0 0 1px #7f7fd5; }
#viewEdit .tplPrev { display: flex; gap: 8px; }
#viewEdit .tplName { font-size: 13px; color: #4e5969; }

/* 网吧状态设置：12 个模板缩略图（4 列 × 3 行，每个 100×78） */
#viewEdit .statTplGrid { display: grid; grid-template-columns: repeat(4, 100px); gap: 20px; }
#viewEdit .statTpl {
  width: 100px; height: 78px; border: 2px solid transparent; border-radius: 4px;
  cursor: pointer; overflow: hidden; background: #f7f8fa;
  display: flex; align-items: center; justify-content: center;
}
#viewEdit .statTpl img { width: 100%; height: 100%; object-fit: contain; display: block; }
#viewEdit .statTpl:hover { border-color: #a5a5e0; }
#viewEdit .statTpl.on { border-color: #7f7fd5; background: #f4f4fc; }

/* 图形设置：8 种形状 */
#viewEdit .shapeRow { display: flex; gap: 8px; flex-wrap: wrap; }
#viewEdit .shapeCell {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #e3e5e8; border-radius: 3px; cursor: pointer; background: #fff;
}
#viewEdit .shapeCell:hover { border-color: #ff8200; }
#viewEdit .shapeCell.on { border-color: #ff8200; background: #fff7ef; }
/* 表格模板 8 个（221x59） */
#viewEdit .tplGridWrap { display: grid; grid-template-columns: repeat(2, 221px); gap: 14px; justify-content: center; }
#viewEdit .tblTpl { width: 221px; height: 63px; border: 2px solid #e3e5e8; border-radius: 4px; overflow: hidden; cursor: pointer; background: #f7f8fa; }
#viewEdit .tblTpl img { width: 100%; height: 100%; object-fit: contain; display: block; }
#viewEdit .tblTpl:hover { border-color: #7f7fd5; }
#viewEdit .tblTpl.on { border-color: #7f7fd5; }
/* 游戏占比模板 3 个（246x146） */
#viewEdit .tplGridWrap3 { display: flex; gap: 16px; justify-content: center; }
#viewEdit .gdTpl { width: 246px; height: 146px; border: 2px solid #e3e5e8; border-radius: 4px; overflow: hidden; cursor: pointer; background: #f7f8fa; }
#viewEdit .gdTpl img { width: 100%; height: 100%; object-fit: contain; display: block; }
#viewEdit .gdTpl:hover { border-color: #7f7fd5; }
#viewEdit .gdTpl.on { border-color: #7f7fd5; }
/* 显示器统计分区表 */
#viewEdit .areaBox { }
#viewEdit .areaTable { width: 100%; }
#viewEdit .areaTable th { background: #fafaff; color: #0f136b; font-size: 14px; padding: 10px; }
#viewEdit .areaTable td { font-size: 14px; padding: 10px; text-align: center; color: #4e5969; }

/* ===== 各设置弹窗内容区高度按原版（54 + 内容 + 59） ===== */
#viewEdit .ydlg.dlg-shape    .ydlg-bd { height: 139px; box-sizing: border-box; }
#viewEdit .ydlg.dlg-desk     .ydlg-bd { height: 142px; box-sizing: border-box; }
#viewEdit .ydlg.dlg-table    .ydlg-bd { height: 458px; box-sizing: border-box; }
#viewEdit .ydlg.dlg-gamedata .ydlg-bd { height: 369px; box-sizing: border-box; }
#viewEdit .ydlg.dlg-config   .ydlg-bd { height: 523px; box-sizing: border-box; }
#viewEdit .ydlg.dlg-clock    .ydlg-bd { height: 230px; box-sizing: border-box; }

/* 各弹窗内部行距收紧（原版 4~7 行装进固定高度） */
#viewEdit .dlg-shape .ydForm label,
#viewEdit .dlg-desk .ydForm label,
#viewEdit .dlg-clock .ydForm label { line-height: 30px; height: 30px; }
#viewEdit .dlg-shape .ydForm > div,
#viewEdit .dlg-desk .ydForm > div,
#viewEdit .dlg-clock .ydForm > div { min-height: 30px; }

/* 表格模板：2 列 × 4 行，单卡 235×100 */
#viewEdit .tplGridWrap { display: grid; grid-template-columns: repeat(2, 235px); gap: 15px; justify-content: center; }
#viewEdit .tblTpl { width: 235px; height: 100px; border: 2px solid #e3e5e8; border-radius: 4px; overflow: hidden; cursor: pointer; background: #f7f8fa; }
/* 游戏占比：2 列换行，单卡 246×146 */
#viewEdit .tplGridWrap3 { display: flex; flex-wrap: wrap; gap: 20px; justify-content: flex-start; max-width: 520px; }
#viewEdit .gdTpl { width: 246px; height: 146px; }

/* 多选对齐条（原版：横向 8 个图标，浮在选中区域上方） */
#cLayer .computer-top-nav.alignbar { gap: 2px; }
#cLayer .computer-top-nav.alignbar .elBarBtn {
  width: 26px; height: 26px; margin: 0 1px; border-radius: 3px;
  background: transparent; display: flex; align-items: center; justify-content: center;
}
#cLayer .computer-top-nav.alignbar .elBarBtn:hover { background: #dfe3e8; }

/* 天气换肤：12 个模板图（4 列 × 3 行） */
#viewEdit .wthGrid { display: grid; grid-template-columns: repeat(4, 130px); gap: 14px; justify-content: center; }
#viewEdit .wthTpl { width: 130px; height: 82px; border: 2px solid #e3e5e8; border-radius: 4px; overflow: hidden; cursor: pointer; background: #f7f8fa; }
#viewEdit .wthTpl img { width: 100%; height: 100%; object-fit: contain; display: block; }
#viewEdit .wthTpl:hover { border-color: #7f7fd5; }
#viewEdit .wthTpl.on { border-color: #7f7fd5; background: #f4f4fc; }
/* 日历换肤：时间格式模板 */
#viewEdit .calGrid { display: grid; grid-template-columns: repeat(4, 145px); gap: 12px; justify-content: center; }
#viewEdit .calTpl { width: 145px; height: 88px; border: 2px solid #e3e5e8; border-radius: 4px; cursor: pointer; background: #2b2f38; color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; }
#viewEdit .calTpl:hover { border-color: #7f7fd5; }
#viewEdit .calTpl.on { border-color: #7f7fd5; background: #3a3f4a; }
#viewEdit .calPrev { width: 100%; }

#viewEdit .pinGrid { display: grid; grid-template-columns: repeat(4, 62px); gap: 10px; justify-content: center; }
#viewEdit .pinCell { width: 62px; height: 62px; border: 2px solid #e3e5e8; border-radius: 4px; cursor: pointer; background: #fff; display: flex; align-items: center; justify-content: center; }
#viewEdit .pinCell:hover { border-color: #ff8200; }
#viewEdit .pinCell.on { border-color: #ff8200; background: #fff7ef; }
#viewEdit .pinMask { width: 40px; height: 40px; }
#viewEdit .fireGrid { display: grid; grid-template-columns: repeat(6, 82px); gap: 10px; justify-content: center; }
#viewEdit .fireCell { width: 82px; height: 72px; border: 2px solid #e3e5e8; border-radius: 4px; cursor: pointer; background: #fff; display: flex; align-items: center; justify-content: center; }
#viewEdit .fireCell img { max-width: 100%; max-height: 100%; object-fit: contain; }
#viewEdit .fireCell:hover { border-color: #7f7fd5; }
#viewEdit .fireCell.on { border-color: #7f7fd5; background: #f4f4fc; }
#viewEdit .fireMask { width: 46px; height: 46px; }
#viewEdit .sampleGrid { display: grid; grid-template-columns: repeat(6, 66px); gap: 8px; justify-content: center; }
#viewEdit .sampleCell { width: 66px; height: 48px; border: 2px solid #e3e5e8; border-radius: 4px; cursor: pointer; background: #f7f8fa; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
#viewEdit .sampleCell img { max-width: 48px; max-height: 32px; object-fit: contain; }
#viewEdit .sampleCell .sUp { font-size: 10px; color: #8c939d; }
#viewEdit .sampleCell:hover { border-color: #7f7fd5; }
#viewEdit .sampleCell.on { border-color: #7f7fd5; background: #f4f4fc; }

/* ===== 微调：按原版实测校正 ===== */
/* 分页：34×34 透明底（原版） */
.pager .pgNum, .pager .pgPrev, .pager .pgNext {
  flex: 0 0 34px !important;      /* flex 子项会被拉伸，必须禁用 */
  width: 34px !important; height: 34px !important; min-width: 34px !important;
  max-width: 34px; padding: 0 !important; background: transparent !important;
  border: 0 !important; box-sizing: border-box; font-size: 14px; color: #606266;
}
.pager .pgNum.on { background: #7f7fd5 !important; color: #fff !important; }
/* 行内操作按钮：原版固定 54px 宽 */
#content table.dt tbody td button:not(.opPill) {
  min-width: 54px; padding: 0 4px; white-space: nowrap;
}
#viewDesktop button.pri { background: #7459d9; border-color: #7459d9; }
#viewDesktop button.pri:hover { background: #6647c9; }
/* 下载页卡片标题：inline-block，不要撑满 */
#viewDownload .dlCard h3, #viewDownload .dlTitle, #viewDownload h3 {
  display: inline-block; width: auto;
}

/* 「我的桌面」页：按钮高 38（原版实测），「创建桌面」是灰字下拉入口 */
#viewDesktop button, #viewDesktop .deskBtn { height: 38px; }
#viewDesktop #btnDeskCreate {
  background: #fff; border: 0; color: #979797; cursor: default;
  padding: 0 16px; font-size: 14px;      /* 原版 88px 宽 = 4 字 + 左右各 16px */
}
#viewDesktop #btnDeskCreate:hover { background: #fff; }
#viewDesktop #btnDeskPart {
  background: #fff; border: 0; color: #4e5969; padding: 0 8px;
}

/* 弹窗内表格统一深色文字（原来继承弹窗浅色，显示不清） */
#viewEdit .ydlg table.dt tbody td,
#viewEdit .ydlg .areaTable tbody td { color: #4e5969; }
#viewEdit .ydlg table.dt thead th { color: #0f136b; }
#viewEdit .ydlg .empty-cell { color: #9aa3af; }

/* 分区表里的删除按钮保持红色 */
#viewEdit .areaTable td .op.danger,
#viewEdit .areaTable tbody td button.danger,
#viewEdit .ydlg table.dt tbody td .danger {
  color: #f54b4b !important; background: transparent; border: 0;
}
#viewEdit .areaTable td .op {
  background: transparent; border: 0; cursor: pointer; font-size: 14px;
  padding: 0 4px; min-width: 0;
}

/* ============================================================
   机位翻转：游戏中时机号与游戏图标交替显示（原版效果）
   0-45%   正面（机号）
   50-95%  背面（游戏图标）
   100%    转回正面，无缝衔接
   ============================================================ */
@keyframes seatFlip {
  0%,   42%  { transform: rotateX(0deg); }
  50%,  92%  { transform: rotateX(180deg); }
  100%       { transform: rotateX(360deg); }
}

/* ============================================================
   开关（layui 风格胶囊式）：保存面板、设置面板都用这个
   ============================================================ */
.ydSwitch {
  position: relative; display: inline-block;
  width: 52px; height: 28px; flex-shrink: 0;
  background: #d2d2d2; border-radius: 14px;
  cursor: pointer; transition: background .2s;
  vertical-align: middle;
}
.ydSwitch::after {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.ydSwitch:hover::after { box-shadow: 0 1px 5px rgba(0,0,0,.28); }
.ydSwitch.on { background: #1e9fff; }
.ydSwitch.on::after { left: 26px; }
.ydSwitch.disabled { opacity: .5; cursor: default; }

/* 开关行：开关 + 文字 */
.ydSwitchRow {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; user-select: none;
}
.ydSwitchRow .lbl { font-size: 14px; color: #303133; line-height: 1.5; }
.ydSwitchRow .sub { font-size: 12px; color: #999; margin-top: 3px; }
