:root {
  --bg: #fff6f0;
  --bg-2: #fdeee4;
  --card: #ffffff;
  --ink: #2a211c;
  --ink-2: #5c4b41;
  --muted: #918074;
  --line: #f2e3d9;
  --brand: #ef6444;
  --brand-deep: #d24a2c;
  --brand-soft: #ffe9e2;
  --gold: #c8912f;
  --green: #3d9a6e;
  --green-soft: #e6f5ed;
  --blue: #3f7fa6;
  --danger: #d8453b;
  --shadow-sm: 0 2px 8px rgba(90, 50, 30, 0.06);
  --shadow: 0 10px 30px rgba(90, 50, 30, 0.1);
  --radius: 14px;
  --sidebar: #241b17;
  --sidebar-ink: #f6e8dd;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
img { display: block; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #e3cfc2; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------ 布局 ------------------------------ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 224px;
  flex: 0 0 224px;
  background: var(--sidebar);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  padding: 24px 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.brand .logo-row { display: flex; align-items: center; gap: 10px; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #ff9a76, #ef6444);
  display: grid; place-items: center; font-size: 17px;
}
.brand h1 { font-size: 15px; letter-spacing: 0.5px; }
.brand p { margin: 6px 0 0; font-size: 11px; color: #b39d8d; letter-spacing: 1px; }

.side-nav { padding: 10px 10px; flex: 1; overflow: auto; }
.nav-group-title { font-size: 11px; color: #8d7666; padding: 14px 12px 6px; letter-spacing: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #d9c8bb;
  cursor: pointer;
  margin-bottom: 2px;
  transition: 0.18s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, rgba(239, 100, 68, 0.9), rgba(210, 74, 44, 0.85)); color: #fff; box-shadow: 0 6px 16px rgba(239, 100, 68, 0.28); }
.nav-item .ico { width: 18px; text-align: center; font-size: 15px; }
.nav-item .txt { font-size: 13px; }
.nav-item .dot { margin-left: auto; background: #fff; color: var(--brand); border-radius: 20px; font-size: 10px; padding: 0 6px; line-height: 16px; font-weight: 700; }

.side-foot { padding: 14px 18px 18px; font-size: 11px; color: #8d7666; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.side-foot .u { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #cbb9a9; }
.side-foot .u b { font-size: 12px; }
.side-foot .avatar { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,0.12); display: grid; place-items: center; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; flex: 0 0 62px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 26px;
  background: rgba(255, 246, 240, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar .crumb { color: var(--muted); font-size: 13px; }
.topbar .crumb b { color: var(--ink); font-size: 15px; margin-right: 8px; }
.topbar .spacer { flex: 1; }

.content { padding: 22px 26px 40px; }

/* ------------------------------ 通用组件 ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); cursor: pointer; font-size: 13px;
  transition: 0.16s; white-space: nowrap;
}
.btn:hover { border-color: #e8cdbd; background: #fffaf7; }
.btn.primary { background: linear-gradient(135deg, #f9774f, var(--brand)); color: #fff; border: none; box-shadow: 0 6px 14px rgba(239, 100, 68, 0.26); }
.btn.primary:hover { filter: brightness(1.04); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: #f4cfcb; background: #fff6f5; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.mini { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* 数据管理页 */
.data-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-tbl th, .data-tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.data-tbl th { color: var(--muted); font-weight: 600; background: #fffaf6; }
.data-tbl td.num, .data-tbl th.num { text-align: right; width: 70px; font-variant-numeric: tabular-nums; }
.data-tbl code { background: #fbf0e8; padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.data-tbl .muted { color: var(--muted); font-size: 12px; }
.data-tbl .lv { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.data-tbl .lv.pure { background: #fdecea; color: #c0392b; }
.data-tbl .lv.semi { background: #fff1d9; color: #a3660f; }
.data-tbl .lv.strong { background: #e8f1ff; color: #2563a8; }
.data-tbl .lv.cfg { background: #eef0ee; color: #6b7785; }
.data-tbl th.ck, .data-tbl td.ck { width: 38px; text-align: center; }
.data-tbl td.ck input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.data-tbl .lock { display: inline-block; font-size: 11px; color: #9aa3ab; background: #eef0ee; border-radius: 4px; padding: 1px 6px; cursor: not-allowed; }
.warn-banner { background: #fff1d9; border: 1px solid #f3dca6; color: #8a5a00; padding: 10px 12px; border-radius: 8px; font-size: 12px; margin-bottom: 12px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid #fbf0e8; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 15px; }
.card-head .sub { color: var(--muted); font-size: 12px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }

.grid { display: grid; gap: 16px; }
.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat {
  padding: 18px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm);
  border: 1px solid #fbf0e8; position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -22px; top: -26px; width: 86px; height: 86px;
  border-radius: 50%; background: radial-gradient(circle, rgba(239, 100, 68, 0.12), transparent 70%);
}
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value { font-size: 28px; font-weight: 800; margin: 8px 0 4px; letter-spacing: -0.5px; }
.stat .value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat .delta { font-size: 12px; color: var(--muted); }
.stat.brand .value { color: var(--brand); }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field > label { font-size: 12px; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.field .hint { font-size: 11px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: #fffdfb; padding: 0 11px; outline: none; transition: 0.16s;
}
.textarea { height: auto; min-height: 74px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, select.input:focus { border-color: #f0a489; background: #fff; box-shadow: 0 0 0 3px rgba(239, 100, 68, 0.1); }
.switch { width: 42px; height: 24px; border-radius: 20px; background: #e9dbd2; position: relative; cursor: pointer; transition: 0.18s; flex: 0 0 auto; }
.switch.on { background: var(--brand); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: 0.18s; box-shadow: 0 1px 3px rgba(0,0,0,0.16); }
.switch.on::after { left: 21px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 5px; font-size: 11px; font-weight: 600; background: #f9efe9; color: #96603f;
}
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.orange { background: var(--brand-soft); color: var(--brand-deep); }
.tag.gray { background: #f4efec; color: var(--muted); }
.tag.gold { background: #fbf1dc; color: var(--gold); }
.tag.red { background: #fdeceb; color: var(--danger); }
.tag.blue { background: #e8f2f8; color: var(--blue); }

.table-wrap { overflow: auto; }
table.tb { width: 100%; border-collapse: collapse; }
table.tb th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 12px 14px; background: #fffaf6; white-space: nowrap;
}
table.tb td { padding: 13px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
table.tb tr:hover td { background: #fffaf7; }
table.tb .thumb { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; background: #f7ece4; }
.thumb { object-fit: cover; background: #f7ece4; }

.empty { text-align: center; padding: 50px 0; color: var(--muted); }
.empty .ico { font-size: 34px; opacity: 0.6; margin-bottom: 10px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.toolbar .grow { flex: 1; }

.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 14px 18px; }
.pager .info { color: var(--muted); font-size: 12px; margin-right: auto; }

.modal-mask { position: fixed; inset: 0; background: rgba(42, 30, 24, 0.42); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal {
  width: min(680px, 96vw); max-height: 88vh; background: #fff; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(40, 20, 10, 0.3); display: flex; flex-direction: column; overflow: hidden;
}
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 18px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.modal-head .x:hover { background: #f8eeea; }
.modal-body { padding: 20px; overflow: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: #fffaf6; }

.toast-wrap { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: rgba(42, 30, 24, 0.92); color: #fff; padding: 9px 16px; border-radius: 9px; font-size: 13px;
  box-shadow: var(--shadow); animation: pop 0.22s ease;
}
.toast.ok { background: #2f7d57; }
.toast.err { background: #b93a30; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ------------------------------ 登录 ------------------------------ */
.login-wrap { position: fixed; inset: 0; background: radial-gradient(1200px 600px at 70% -10%, #ffdfd0, transparent), var(--bg); display: grid; place-items: center; z-index: 90; }
.login-card { width: 380px; background: #fff; border-radius: 18px; padding: 32px 30px; box-shadow: var(--shadow); border: 1px solid #fdf0e8; }
.login-card .mark { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(135deg, #ff9a76, #ef6444); display: grid; place-items: center; font-size: 22px; margin-bottom: 16px; }
.login-card h2 { font-size: 20px; }
.login-card p { color: var(--muted); font-size: 12px; margin: 6px 0 22px; }
.login-card .btn { width: 100%; height: 40px; margin-top: 6px; }
.login-card .tip { margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center; }

/* ------------------------------ 装修编辑器 ------------------------------ */
.deco-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.93); backdrop-filter: blur(8px); }
.deco-bar-grp { display: flex; align-items: center; gap: 8px; }
.input.slim { height: 30px; font-size: 12px; border-radius: 8px; padding: 0 9px; }
.input.num { width: 76px; display: inline-block; }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff8a3d; box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.18); animation: dotPulse 1.5s infinite; }

.theme-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.theme-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 20px; border: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--ink-2); cursor: pointer; transition: 0.16s; }
.theme-chip .sw { width: 14px; height: 14px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.07); }
.theme-chip:hover { transform: translateY(-1px); border-color: #f3cdb6; }
.theme-chip.on { border-color: var(--brand); background: var(--brand-soft); color: #b6482a; font-weight: 700; box-shadow: 0 2px 10px rgba(239, 100, 68, 0.16); }

.score-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 16px; border: 1px solid transparent; cursor: pointer; font-size: 11.5px; transition: 0.16s; }
.score-chip b { font-size: 15px; font-weight: 800; }
.score-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.score-chip.good { background: #eaf8ef; color: #1f7a4a; border-color: #cbead7; }
.score-chip.mid { background: #fff4e2; color: #a3660f; border-color: #f7ddb9; }
.score-chip.bad { background: #ffe9e5; color: #b53a22; border-color: #fbd0c7; }

.deco-presets { padding: 12px 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.preset-hd { font-size: 13px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.preset-hd small { font-weight: 400; font-size: 11px; color: var(--muted); }
.preset-row { display: flex; gap: 10px; flex-wrap: wrap; }
.preset-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; min-width: 190px; text-align: left; padding: 9px 13px; border-radius: 12px; border: 1px solid #f4ddd0; background: linear-gradient(135deg, #fff7f2, #fdeef4); cursor: pointer; transition: 0.18s; }
.preset-card .ic { grid-row: span 2; font-size: 21px; }
.preset-card b { font-size: 12.5px; color: #7a3f22; }
.preset-card .ds { font-size: 11px; color: var(--muted); }
.preset-card:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 10px 22px rgba(190, 110, 70, 0.16); }

.deco-layout { display: grid; grid-template-columns: 268px 1fr 344px; gap: 14px; align-items: start; }
.deco-lib { background: #fff; border-radius: var(--radius); border: 1px solid #fbf0e8; box-shadow: var(--shadow-sm); position: sticky; top: 78px; overflow: hidden; }

/* 组件库：头部 / 搜索 / 分类快捷条 / 卡片区 / 统计条 */
.deco-lib .hd { padding: 11px 12px 9px; border-bottom: 1px solid var(--line); }
.lib-hd-row { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; color: var(--ink); }
.lib-hd-row b { font-weight: 700; }
.lib-total { padding: 1px 7px; border-radius: 20px; background: var(--brand-soft, #fff1e8); color: #c2603d; font-size: 10px; font-weight: 700; }
.lib-view { margin-left: auto; width: 26px; height: 24px; line-height: 1; border: 1px solid #f0dfd3; border-radius: 7px; background: #fffaf6; color: #a48f81; font-size: 13px; cursor: pointer; transition: 0.14s; }
.lib-view:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
.deco-lib .hd small { display: block; font-weight: 400; color: var(--muted); font-size: 10.5px; margin-top: 4px; }
.lib-search { position: relative; padding: 9px 12px 8px; }
.lib-search .input { width: 100%; box-sizing: border-box; padding-right: 26px; }
.lib-clear { position: absolute; right: 17px; top: 14px; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; background: #f1e2d8; color: #9b806f; font-size: 12px; line-height: 16px; cursor: pointer; }
.lib-clear:hover { background: #e9d2c2; color: var(--brand); }
.lib-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 0 12px 9px; border-bottom: 1px solid #f8eee7; }
.lib-chip { min-width: 0; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 24px; padding: 0 4px; border: 1px solid #f2e2d7; border-radius: 9px; background: #fffdfb; color: #8a7568; font-size: 10px; white-space: nowrap; overflow: hidden; cursor: pointer; transition: 0.14s; }
.lib-chip i { width: 6px; height: 6px; border-radius: 50%; }
.lib-chip b { font-weight: 700; color: #b8a294; }
.lib-chip:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.lib-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 3px 9px rgba(232, 87, 58, 0.2); }
.lib-chip.on b { color: #ffe4d8; }
.lib-chip:disabled { opacity: 0.42; cursor: default; }
.lib-body { max-height: calc(100vh - 372px); overflow: auto; padding: 2px 10px 10px; scrollbar-width: thin; }
.lib-body::-webkit-scrollbar { width: 5px; }
.lib-body::-webkit-scrollbar-thumb { background: #eeddd0; border-radius: 4px; }
.lib-group { margin-bottom: 9px; }
.lib-group-hd { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 6px; width: 100%; box-sizing: border-box; padding: 7px 4px 6px; border: 0; border-bottom: 1px dashed #f4e6dc; border-left: 3px solid var(--g, #e8573a); background: #fff; text-align: left; cursor: pointer; }
.lib-group-hd .arw { color: #c9b2a2; font-size: 12px; line-height: 1; transition: transform 0.16s; }
.lib-group-hd .gi { font-size: 11px; }
.lib-group-hd .gname { font-size: 11px; font-weight: 700; color: #7d6557; }
.lib-group-hd .gnum { margin-left: auto; padding: 1px 7px; border-radius: 20px; background: #faf1ea; color: #b99e8d; font-size: 10px; font-weight: 600; }
.lib-group-hd.static { cursor: default; }
.lib-group-hd.static .arw { color: #d8c4b6; font-size: 10px; }
.lib-group.collapsed .lib-group-hd .arw { transform: rotate(-90deg); }
.lib-group.collapsed .lib-grid { display: none; }
.lib-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 8px; }
.lib-item { display: flex; flex-direction: column; min-width: 0; border: 1px solid #f3e3da; border-radius: 10px; overflow: hidden; background: #fffdfb; cursor: pointer; transition: 0.16s; }
.lib-item:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 7px 18px rgba(200, 120, 80, 0.17); }
.lib-item.used { border-color: #f0d9c9; }
.lib-prev { position: relative; flex: 0 0 76px; height: 76px; min-height: 0; overflow: hidden; background-color: var(--dpage, #fff7f0); background-image: radial-gradient(circle at 1px 1px, rgba(190, 150, 125, 0.08) 1px, transparent 0); background-size: 9px 9px; border-bottom: 1px solid #f6e7de; }
.lib-prev .lib-thumb { width: 375px; transform: scale(0.31); transform-origin: top left; pointer-events: none; padding-bottom: 0; min-height: 0; }
.lib-prev::after { content: ''; position: absolute; z-index: 1; inset: auto 0 0 0; height: 16px; background: linear-gradient(transparent, var(--dpage, #fff7f0)); pointer-events: none; }
.lib-used { position: absolute; z-index: 2; right: 3px; top: 3px; padding: 1px 5px; border-radius: 20px; background: rgba(255, 255, 255, 0.94); border: 1px solid #efd7c6; color: #c2603d; font-size: 9px; font-weight: 700; }
.lib-add { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 20px; background: rgba(232, 87, 58, 0.92); color: #fff; font-size: 10px; font-weight: 700; text-align: center; line-height: 20px; opacity: 0; transform: translateY(6px); transition: 0.16s; }
.lib-item:hover .lib-add { opacity: 1; transform: translateY(0); }
.lib-meta { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; min-width: 0; padding: 6px 7px 2px; font-size: 11px; font-weight: 700; color: var(--ink); }
.lib-meta .ic { flex: 0 0 auto; font-size: 12px; }
.lib-meta .n { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lib-note { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; min-width: 0; padding: 0 7px 7px; font-size: 9.5px; line-height: 1.4; color: var(--muted); }
.lib-note .dot { flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: #58b57f; }
.lib-note span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lib-note.idle .dot { background: #e0a23c; }
.lib-note.idle { color: #a3660f; }
.lib-note.empty .dot { background: #d4794c; }
.lib-note.empty { color: #b5742f; }
.lib-noresult { padding: 28px 10px; text-align: center; color: var(--muted); font-size: 11.5px; }
.lib-noresult > span { display: block; font-size: 22px; margin-bottom: 8px; }
.lib-noresult .btn { margin-top: 10px; }
.lib-foot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid #f8eee7; background: #fffaf6; font-size: 10px; color: #a48f81; }
.lib-foot b { color: #c2603d; font-weight: 700; }
.lib-foot .grow { flex: 1; }

/* 紧凑列表视图：一屏可扫完所有组件 */
.lib-grid.list { grid-template-columns: 1fr; gap: 5px; }
.lib-grid.list .lib-item { flex-direction: row; align-items: center; height: 46px; border-radius: 8px; }
.lib-grid.list .lib-prev { flex: 0 0 52px; width: 52px; height: 44px; border-bottom: 0; border-right: 1px solid #f6e7de; }
.lib-grid.list .lib-prev .lib-thumb { transform: scale(0.138); }
.lib-grid.list .lib-add, .lib-grid.list .lib-prev::after, .lib-grid.list .lib-used { display: none; }
.lib-grid.list .lib-meta { flex: 1; padding: 0 6px; font-size: 11.5px; }
.lib-grid.list .lib-item.used .lib-meta::after { content: '已用'; flex: 0 0 auto; padding: 1px 5px; border-radius: 20px; background: #fdf0e8; color: #c2603d; font-size: 9px; font-weight: 700; }
.lib-grid.list .lib-note { flex: 0 0 auto; width: 12px; padding: 0 5px 0 0; font-size: 9.5px; }
.lib-grid.list .lib-note span { display: none; }

.phone-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sim-dock { width: 100%; max-width: 375px; background: #fff; border: 1px solid #fbf0e8; border-radius: 14px; box-shadow: var(--shadow-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.dock-hd { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); font-size: 12.5px; font-weight: 700; color: var(--ink); }
.dock-hd span { margin-left: auto; font-size: 11px; font-weight: 600; color: #a48f81; }
.dock-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; }
.dock-row .dl { flex: 0 0 auto; width: 56px; color: var(--muted); }
.dock-row .db { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; color: var(--ink-2); }
.dock-segbar { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: #f7ece5; }
.dock-seg { height: 24px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; font-size: 11px; color: #8a7568; cursor: pointer; transition: 0.14s; }
.dock-seg.on { background: #fff; color: var(--brand); font-weight: 700; box-shadow: 0 1px 4px rgba(150, 90, 60, 0.14); }
.dock-hint { font-size: 10.5px; color: #c0aa9c; }
.dock-foot { padding: 6px 8px; border-radius: 8px; background: #fdf6f1; font-size: 10.5px; color: var(--muted); line-height: 1.5; }
.phone {
  width: 375px; height: 720px; border-radius: 34px; background: #1e1714; padding: 10px;
  box-shadow: 0 24px 60px rgba(60, 30, 15, 0.24); position: relative;
}
.phone .notch { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); width: 92px; height: 20px; border-radius: 20px; background: #1e1714; z-index: 5; }
.phone .screen { width: 100%; height: 100%; border-radius: 26px; overflow: hidden; background: #fff7f0; position: relative; }
.phone .screen iframe { width: 100%; height: 100%; border: 0; display: block; }
.phone .statusbar { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; font-size: 11px; color: #4a3a31; font-weight: 600; background: transparent; position: relative; z-index: 4; }
.deco-hint { font-size: 12px; color: var(--muted); }

.prop-panel { background: #fff; border-radius: var(--radius); border: 1px solid #fbf0e8; box-shadow: var(--shadow-sm); position: sticky; top: 78px; max-height: calc(100vh - 100px); overflow: auto; }
.prop-hd { padding: 13px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.prop-hd b { font-size: 13px; }
.prop-hd .ops { margin-left: auto; display: flex; gap: 6px; }
.prop-body { padding: 16px; }
.prop-empty { padding: 40px 18px; text-align: center; color: var(--muted); font-size: 12px; }
.prop-tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 3; }
.prop-tab { position: relative; padding: 8px 12px; border: 0; background: transparent; font-size: 12.5px; color: var(--muted); cursor: pointer; border-radius: 9px 9px 0 0; }
.prop-tab.on { color: var(--brand); font-weight: 700; }
.prop-tab.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #ffa482, #ef6444); }
.tab-n { display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-left: 5px; padding: 0 4px; border-radius: 20px; background: #f5e3d8; color: #a48f81; font-size: 10px; font-weight: 700; }
.prop-tab.on .tab-n { background: var(--brand); color: #fff; }
.panel-ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 11px; }
.panel-note { margin-top: 12px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 11px; color: #b6a294; }
.field label .dep { margin-left: 6px; padding: 1px 5px; border-radius: 6px; background: #faf1ea; color: #c0aa9c; font-size: 10px; font-style: normal; }

.list-editor { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.le-item { padding: 10px; border-bottom: 1px solid var(--line); background: #fffdfb; }
.le-item:last-child { border-bottom: 0; }
.le-item .hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 11px; color: var(--muted); }
.le-item .hd .del { color: var(--danger); cursor: pointer; }
.le-add { padding: 9px; text-align: center; color: var(--brand); font-size: 12px; cursor: pointer; background: #fff; }
.le-add:hover { background: var(--brand-soft); }

.imgpick { display: flex; gap: 8px; align-items: center; }
.imgpick .prev {
  width: 64px; height: 64px; border-radius: 9px; border: 1px solid var(--line);
  background: #fdf4ee center/cover no-repeat; cursor: pointer; flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); font-size: 11px;
}
.imgpick .meta { flex: 1; min-width: 0; }
.imgpick .meta .input { font-size: 12px; height: 32px; }

.comp-strip { width: 100%; max-width: 375px; display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: #fff; border: 1px solid #fbf0e8; border-radius: 14px; box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.strip-hd { flex: 0 0 auto; padding-top: 4px; font-size: 11px; font-weight: 700; color: #a48f81; }
#strip-items { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.strip-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 4px; border-radius: 8px; border: 1px solid #f1e2d8; background: #fffdfb; font-size: 11px; color: #6c5a4f; cursor: grab; transition: 0.14s; }
.strip-chip .no { width: 16px; height: 16px; border-radius: 5px; background: #f7ece5; color: #a48f81; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.strip-chip:hover { border-color: var(--brand); color: var(--brand); }
.strip-chip.on { border-color: var(--brand); background: var(--brand-soft); color: #b6482a; font-weight: 700; }
.strip-chip.on .no { background: var(--brand); color: #fff; }
.strip-chip.over { border-style: dashed; transform: translateY(-1px); }

.img-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fffdfb; }
.img-row:last-of-type { border-bottom: 0; }
.img-row .prev {
  width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line); flex: 0 0 auto;
  background: #fdf4ee center/cover no-repeat; cursor: pointer; display: grid; place-items: center; color: var(--muted); font-size: 11px;
}
.img-row .del { color: var(--danger); cursor: pointer; font-size: 11px; flex: 0 0 auto; }

.smart-tip {
  margin: -2px 0 12px; padding: 9px 11px; border-radius: 9px; font-size: 11px; line-height: 1.6;
  background: linear-gradient(135deg, #fff4ec, #fdeef6); color: #a35a34; border: 1px solid #f7dcca;
}

/* ------------------------- 装修体检面板 ------------------------- */
.audit-body { padding: 14px 16px 18px; }
.audit-hd { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.audit-ring { --p: 0; position: relative; flex: 0 0 auto; width: 62px; height: 62px; border-radius: 50%; display: grid; align-content: center; justify-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), #f4e6dd 0); }
.audit-ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.audit-ring b { position: relative; font-size: 18px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.audit-ring span { position: relative; font-size: 9px; color: var(--muted); }
.audit-sum { flex: 1; min-width: 0; font-size: 11.5px; color: var(--ink-2); line-height: 1.75; }
.audit-sum .dep { font-size: 10.5px; color: #b6a294; }
.audit-item { display: flex; align-items: flex-start; gap: 9px; margin-top: 9px; padding: 10px 11px; border-radius: 11px; border: 1px solid #f3e3da; background: #fffdfb; }
.audit-item .bar { flex: 0 0 auto; width: 3px; align-self: stretch; border-radius: 3px; background: #e5d6cb; }
.audit-item .bd { flex: 1; min-width: 0; }
.audit-item .t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.audit-item .d { margin-top: 3px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.audit-item.risk { border-color: #f7d3ca; background: #fff5f3; }
.audit-item.risk .bar { background: linear-gradient(#ff8a6a, #e0431f); }
.audit-item.warn { border-color: #f7e2c4; background: #fffaef; }
.audit-item.warn .bar { background: linear-gradient(#ffc06a, #e78b16); }
.audit-item.info .bar { background: linear-gradient(#8ec9ff, #3f7fa6); }
.lv { padding: 1px 7px; border-radius: 20px; font-size: 10px; font-weight: 600; }
.lv.bad { background: #ffe1d8; color: #c0401f; }
.lv.warn { background: #fff1d9; color: #a3660f; }
.lv.tip { background: #e9f2f8; color: #3f7fa6; }
.audit-pass { margin-top: 14px; padding: 20px 12px; border: 1px dashed #bfe3cd; border-radius: 12px; background: #eef9f1; text-align: center; font-size: 12px; color: #1f7a4a; }
.audit-foot { margin-top: 12px; text-align: center; font-size: 10.5px; color: #c0aa9c; }

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(255, 138, 61, 0.05); }
}

/* ------------------------------ 其他 ------------------------------ */
.status-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.st-pending { background: #fff1e0; color: #b7701a; }
.st-accepted { background: #e8f2f8; color: #3f7fa6; }
.st-cooking { background: #ffe9e2; color: #d24a2c; }
.st-completed { background: var(--green-soft); color: var(--green); }
.st-cancelled { background: #f2eeeb; color: #918074; }

.chart { width: 100%; height: auto; display: block; }
.bar-line { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bar-line .nm { width: 86px; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-line .bar { flex: 1; height: 8px; border-radius: 8px; background: #f7e8de; overflow: hidden; }
.bar-line .bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #ffa482, #ef6444); }
.bar-line .vv { width: 62px; text-align: right; font-size: 12px; color: var(--muted); }

.mini-list { display: flex; flex-direction: column; gap: 10px; }
.mini-row { display: flex; align-items: center; gap: 10px; }
.mini-row .av { width: 34px; height: 34px; border-radius: 9px; background: #fbeade; display: grid; place-items: center; font-size: 15px; overflow: hidden; }
.mini-row .main { flex: 1; min-width: 0; }
.mini-row .t1 { font-size: 13px; font-weight: 600; }
.mini-row .t2 { font-size: 11px; color: var(--muted); }

.uploader {
  border: 1px dashed #f0d6c7; border-radius: 12px; padding: 24px; text-align: center; cursor: pointer;
  background: #fffdfb; transition: 0.16s; color: var(--muted);
}
.uploader:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.media-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.media-item img { width: 100%; height: 110px; object-fit: cover; }
.media-item .mt { padding: 8px 10px; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.media-item .mt .spacer { flex: 1; }
.media-item .mt .del { color: var(--danger); cursor: pointer; }
.media-item { position: relative; }
.media-item .pick { position: absolute; top: 6px; left: 6px; z-index: 2; background: rgba(255,255,255,.85); border-radius: 6px; padding: 2px 4px; line-height: 0; }
.media-item.sel { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }

.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.cat-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; cursor: pointer; background: #fff; color: var(--muted); transition: .14s; }
.cat-tab:hover { border-color: var(--brand); }
.cat-tab.on { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); font-weight: 700; }
.cat-tab .cnt { background: rgba(0,0,0,.06); border-radius: 10px; padding: 0 6px; font-size: 11px; }
.cat-tab .x { margin-left: 2px; color: #c9bdb2; font-size: 11px; }
.cat-tab .x:hover { color: var(--danger); }
.cat-tab .edit { margin-left: 2px; color: #c9bdb2; font-size: 11px; cursor: pointer; }
.cat-tab .edit:hover { color: var(--brand); }

.batch-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--brand-soft); border: 1px solid var(--brand); border-radius: 10px; margin-top: 12px; font-size: 13px; }
.mini-select { padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; background: #fff; }

/* 原生 select 浮层接管（逻辑见 admin/js/select.js，替代会画错位置的浏览器原生下拉） */
.sfx-layer {
  position: fixed; z-index: 160; padding: 6px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(70, 40, 25, 0.2);
  overflow: auto; max-height: 340px;
  animation: sfxIn 0.12s ease-out;
}
@keyframes sfxIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.sfx-item {
  padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.35;
  color: var(--ink-2); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sfx-item:hover, .sfx-item.cur { background: var(--brand-soft); color: var(--brand-deep); }
.sfx-item.on { background: var(--brand); color: #fff; font-weight: 600; }
.sfx-item.on:hover, .sfx-item.on.cur { background: var(--brand-deep); color: #fff; }
.sfx-item.dis { opacity: 0.4; cursor: not-allowed; background: transparent; color: var(--muted); }
.sfx-group { padding: 7px 10px 3px; font-size: 11px; letter-spacing: 0.5px; color: var(--muted); }

.tabbar { display: flex; gap: 6px; border-bottom: 1px solid var(--line); padding: 0 4px; }
.tabbar .t { padding: 9px 14px; font-size: 13px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabbar .t.on { color: var(--brand-deep); border-bottom-color: var(--brand); font-weight: 700; }

/* ------------------------------ 首页公告 ------------------------------ */
.ann-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 16px; align-items: start; }
.ann-cats { position: sticky; top: 78px; }
.ann-cat-list { padding: 8px; }
.ann-cat-tip { padding: 10px 14px 12px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); line-height: 1.6; }
.ann-cat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; border-radius: 11px; cursor: pointer; transition: 0.16s; position: relative;
}
.ann-cat-item:hover { background: #fff7f2; }
.ann-cat-item.on { background: #fff1ea; box-shadow: inset 0 0 0 1px #ffd8c7; }
.ann-cat-dot {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center;
  font-size: 15px; font-weight: 700;
}
.ann-cat-main { min-width: 0; flex: 1; }
.ann-cat-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-cat-desc { font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-cat-count { font-size: 11px; color: var(--muted); flex: 0 0 auto; }
.ann-cat-ops { display: none; gap: 6px; flex: 0 0 auto; }
.ann-cat-item:hover .ann-cat-ops { display: flex; }
.ann-cat-ops span { cursor: pointer; font-size: 12px; opacity: 0.7; }
.ann-cat-ops span:hover { opacity: 1; }

.ann-center-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ann-style-body { display: grid; grid-template-columns: minmax(0, 1fr) 274px; gap: 18px; padding: 16px 18px 18px; }
.ann-style-panel { min-width: 0; }
.ann-preview-col { display: flex; justify-content: center; align-items: flex-start; }

.ann-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ann-mode {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; cursor: pointer; text-align: center;
  background: #fffdfb; transition: 0.16s;
}
.ann-mode:hover { border-color: #f3c8b4; }
.ann-mode.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 6px 16px rgba(239, 100, 68, 0.16); }
.ann-mode-ico { font-size: 20px; }
.ann-mode-name { font-size: 13px; font-weight: 700; margin-top: 6px; }
.ann-mode-desc { font-size: 11px; color: var(--muted); margin-top: 3px; }

.ann-opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 16px; }
.ann-opt > label { font-size: 12px; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ann-opt > label b { color: var(--brand-deep); }
.ann-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fffdfb; }
.ann-seg span { padding: 7px 16px; font-size: 12px; cursor: pointer; color: var(--muted); transition: 0.14s; }
.ann-seg span.on { background: var(--brand); color: #fff; font-weight: 700; }
.ann-range { width: 100%; accent-color: var(--brand); }
.ann-themes { display: flex; align-items: center; gap: 8px; height: 32px; }
.ann-theme-dot { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); transition: 0.16s; }
.ann-theme-dot.on { box-shadow: 0 0 0 2px var(--brand); transform: scale(1.06); }
.ann-theme-name { font-size: 11px; color: var(--muted); margin-left: 2px; }

.ann-switches { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ann-sw { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fffdfb; border-bottom: 1px solid var(--line); }
.ann-sw:last-child { border-bottom: 0; }
.ann-sw-main { flex: 1; min-width: 0; }
.ann-sw-title { font-size: 12.5px; font-weight: 600; }
.ann-sw-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }

.ann-entry-row { display: flex; gap: 10px; margin-top: 14px; align-items: flex-end; }
.ann-style-tip { font-size: 11px; color: var(--muted); margin-top: 10px; }

/* 手机预览 */
.ann-phone {
  width: 244px; padding: 8px 8px 12px; border-radius: 26px; background: #1e1714;
  box-shadow: 0 18px 40px rgba(60, 30, 15, 0.2);
}
.ann-screen { width: 100%; height: 470px; border-radius: 20px; overflow: hidden; background: #fff7f0; display: flex; flex-direction: column; }
.ann-devbar { height: 26px; flex: 0 0 26px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-size: 9px; font-weight: 700; color: #3b2a33; background: rgba(255, 255, 255, 0.55); }
.ann-screen-body { flex: 1; position: relative; overflow: hidden; }

.ann-home { padding: 12px 10px; height: 100%; background: linear-gradient(170deg, #fff7f0, #fff1e8); }
.ann-home-hero { background: linear-gradient(150deg, #ffb18d, #ef6444); border-radius: 14px; padding: 14px 12px 12px; color: #fff; }
.ann-home-days { font-size: 9px; opacity: 0.9; }
.ann-home-title { font-size: 13px; font-weight: 800; margin-top: 4px; }
.ann-home-pills { display: flex; gap: 6px; margin-top: 10px; }
.ann-home-pills span { width: 46px; height: 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.32); display: block; }
.ann-home-search { height: 26px; background: #fff; border-radius: 13px; margin-top: 10px; box-shadow: 0 2px 8px rgba(150, 90, 50, 0.06); }
.ann-home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; background: #fff; border-radius: 12px; padding: 10px 8px; }
.ann-home-cell { text-align: center; }
.ann-home-cell i { display: block; width: 24px; height: 24px; border-radius: 8px; background: #ffe7dc; margin: 0 auto; }
.ann-home-cell b { display: block; height: 6px; width: 60%; background: #f2e3d9; border-radius: 4px; margin: 6px auto 0; }
.ann-home-line { height: 8px; width: 40%; background: #f2e3d9; border-radius: 5px; margin: 14px 0 8px; }
.ann-home-cards { display: flex; gap: 8px; }
.ann-home-cards > div { flex: 1; height: 92px; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(150, 90, 50, 0.06); }

.ann-mask { position: absolute; inset: 0; background: rgba(40, 22, 34, 0.44); }
.ann-mask.blur { backdrop-filter: blur(4px); }
.ann-holder { position: absolute; inset: 0; display: flex; padding: 14px; pointer-events: none; }
.ann-holder.center { align-items: center; justify-content: center; }
.ann-holder.bottom { align-items: flex-end; justify-content: center; padding-bottom: 8px; }

.ann-card { position: relative; width: 100%; max-width: 100%; max-height: 100%; overflow: auto; box-shadow: 0 18px 44px rgba(26, 14, 24, 0.34); pointer-events: auto; }
.ann-cover { height: 86px; overflow: hidden; border-radius: 12px 12px 0 0; }
.ann-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ann-card-body { padding: 15px 14px 13px; }
.ann-catpill { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 10px; font-weight: 700; margin-bottom: 8px; }
.ann-card-title { font-size: 16px; font-weight: 800; line-height: 1.35; }
.ann-card-sub { font-size: 11px; margin-top: 5px; }
.ann-card-text { font-size: 11.5px; line-height: 1.7; margin-top: 8px; opacity: 0.92; }
.ann-card-items { margin-top: 10px; }
.ann-pi { margin-top: 8px; }
.ann-pi-t { font-size: 11.5px; font-weight: 700; line-height: 1.5; }
.ann-pi-ico { margin-right: 4px; }
.ann-pi-d { font-size: 10.5px; line-height: 1.7; margin-top: 2px; }
.ann-card-tip { font-size: 10.5px; line-height: 1.6; border-radius: 8px; padding: 7px 9px; margin-top: 10px; }
.ann-card-foot { font-size: 10.5px; margin-top: 9px; font-weight: 600; }
.ann-cta { margin-top: 12px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: 0.4px; }
.ann-cta.pill { border-radius: 20px; margin: 12px 34px 0; }
.ann-x { position: absolute; right: 9px; top: 9px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, 0.28); color: #fff; display: grid; place-items: center; font-size: 11px; }

/* 横幅模式 */
.ann-bannerbar { display: flex; align-items: center; gap: 7px; margin: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid; }
.ann-banner-ico { font-size: 13px; }
.ann-banner-txt { flex: 1; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-banner-go { font-size: 10px; font-weight: 700; }

/* 公告中心模式 */
.ann-center { padding: 12px 10px; height: 100%; overflow: auto; }
.ann-center-hd { padding: 2px 2px 10px; }
.ann-center-title { font-size: 15px; font-weight: 800; }
.ann-center-sub { font-size: 10px; color: #a48f81; margin-top: 4px; }
.ann-center-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.ann-chip { flex: 0 0 auto; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.ann-center-list { display: flex; flex-direction: column; gap: 8px; }
.ann-center-item { background: #fff; border-radius: 12px; padding: 10px 11px; border: 1.5px solid transparent; box-shadow: 0 2px 10px rgba(150, 90, 50, 0.06); }
.ann-center-item-top { display: flex; align-items: center; justify-content: space-between; }
.ann-mini-pill { height: 18px; padding: 0 7px; border-radius: 9px; font-size: 9.5px; font-weight: 700; display: inline-grid; place-items: center; }
.ann-center-time { font-size: 9px; color: #a48f81; }
.ann-center-item-title { font-size: 12px; font-weight: 700; margin-top: 6px; }
.ann-center-item-sub { font-size: 10px; margin-top: 3px; line-height: 1.6; }
.ann-center-empty { text-align: center; font-size: 11px; color: #a48f81; padding: 40px 0; }

.ann-search .input { background: #fffdfb; }
.ann-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px 0; }
.ann-tab { padding: 5px 12px; border-radius: 16px; font-size: 12px; color: var(--ink-2); background: #faf1eb; cursor: pointer; transition: 0.14s; }
.ann-tab.on { background: var(--brand); color: #fff; font-weight: 700; }
.ann-tab i { font-style: normal; opacity: 0.7; font-size: 11px; margin-left: 3px; }
.ann-list { padding: 12px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.ann-item { display: flex; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fffdfb; transition: 0.16s; }
.ann-item:hover { border-color: #f4cdb9; box-shadow: var(--shadow-sm); }
.ann-item.off { opacity: 0.62; }
.ann-swatch { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; color: #fff; box-shadow: 0 6px 16px rgba(120, 60, 40, 0.16); }
.ann-it-main { flex: 1; min-width: 0; }
.ann-it-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ann-it-freq { font-size: 11px; color: var(--muted); }
.ann-it-title { font-size: 14px; font-weight: 700; margin-top: 6px; }
.ann-it-sub { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-it-meta { font-size: 11px; color: #b0a094; margin-top: 6px; }
.ann-it-ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; max-width: 240px; }

.ann-editor { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 18px; }
.ann-form { min-width: 0; }
.ann-side { border-left: 1px dashed var(--line); padding-left: 18px; }
.ann-side-hd { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.ann-side-hd b { font-size: 13px; }
.ann-side-hd span { font-size: 11px; color: var(--muted); }
.ann-side-tip { font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.ann-preview-modal { display: flex; justify-content: center; padding: 6px 0; }

@media (max-width: 1280px) {
  .ann-layout { grid-template-columns: 1fr; }
  .ann-cats { position: static; }
  .ann-style-body { grid-template-columns: 1fr; }
  .ann-preview-col { justify-content: center; }
}
@media (max-width: 820px) {
  .ann-editor { grid-template-columns: 1fr; }
  .ann-side { border-left: 0; padding-left: 0; border-top: 1px dashed var(--line); padding-top: 16px; }
  .ann-opt-grid { grid-template-columns: 1fr; }
}


.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.split > * { min-width: 0; }

.kv { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv .k { width: 92px; color: var(--muted); flex: 0 0 auto; }
.kv .v { flex: 1; }

.banner-note { background: #fff8f2; border: 1px solid #f7e2d5; border-radius: 10px; padding: 10px 12px; font-size: 12px; color: #8a6a55; line-height: 1.7; }

@media (max-width: 1320px) {
  .deco-layout { grid-template-columns: 236px 1fr; }
  .prop-panel { grid-column: 1 / -1; position: static; max-height: none; }
  .lib-body { max-height: 520px; }
  .lib-prev .lib-thumb { transform: scale(0.267); }
  .lib-grid.list .lib-prev .lib-thumb { transform: scale(0.138); }
}
@media (max-width: 1100px) {
  .deco-layout { grid-template-columns: 1fr; }
  .deco-lib, .prop-panel { position: static; max-height: none; }
  .deco-bar { position: static; }
  .lib-body { max-height: 460px; }
  .lib-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .lib-prev .lib-thumb { transform: scale(0.31); }
}
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 表格列不换行，避免分类等短列被压成竖排 */
table.tb th { white-space: nowrap; }
table.tb td:nth-child(n+2) { white-space: nowrap; }
table.tb td:first-child { min-width: 160px; }

/* 概览页窄卡片里的表格：允许换行、收紧内边距，避免横向溢出 */
table.tb.compact td { padding: 12px 10px; }
table.tb.compact td:nth-child(n+2) { white-space: normal; }
table.tb.compact td:first-child { min-width: 0; white-space: nowrap; font-size: 12px; }
table.tb.compact th { padding: 11px 10px; }

/* ------------------------------ 窄屏自适应 ------------------------------ */
@media (max-width: 980px) {
  .sidebar { width: 64px; flex-basis: 64px; }
  .brand { padding: 18px 0; text-align: center; }
  .brand h1, .brand p, .nav-group-title, .nav-item .txt, .nav-item .dot, .side-foot { display: none; }
  .side-nav { padding: 10px 6px; }
  .nav-item { justify-content: center; padding: 11px 0; gap: 0; }
  /* 手机预览等比缩小，避免撑破内容区 */
  .phone-stage { overflow: visible; }
  .phone { transform: scale(0.82); transform-origin: top center; margin-bottom: -136px; }
}
@media (max-width: 640px) {
  .phone { transform: scale(0.66); margin-bottom: -245px; }
  .deco-layout { gap: 10px; }
}

/* ------------------------- 广场顶部：左边数字 + 右边被偷记录 ------------------------- */
.pz-sum { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 460px); gap: 20px; align-items: stretch; }
.pz-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; align-content: center; }
.pz-stat { min-width: 84px; }
.pz-stat .num { font-size: 24px; font-weight: 700; line-height: 1.25; }
.pz-stat-used { cursor: pointer; border-radius: 10px; padding: 2px 8px 2px 0; transition: background 0.15s; }
.pz-stat-used:hover { background: #fff4ec; }
.pz-note { flex: 1 1 100%; max-width: 520px; line-height: 1.6; }

.pz-live { border-left: 1px solid var(--line); padding-left: 18px; display: flex; flex-direction: column; min-width: 0; }
.pz-live-hd { display: flex; align-items: center; gap: 8px; }
.pz-live-hd h4 { font-size: 13px; }
.pz-live-hd .sub { font-size: 11px; color: var(--muted); }
.pz-live-list { margin-top: 8px; }
.pz-live-row { display: flex; align-items: center; gap: 7px; padding: 6px 0; border-bottom: 1px dashed #f7ece4; font-size: 12px; }
.pz-live-row:last-child { border-bottom: 0; }
.pz-live-row .k { flex: 0 0 auto; font-size: 10px; padding: 1px 6px; border-radius: 5px; background: #fff1e6; color: #c9741f; }
.pz-live-row .k.clone { background: #eef3f8; color: #4a7a9c; }
.pz-live-row .who { flex: 0 0 auto; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink-2); }
.pz-live-row .what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.pz-live-row .t { flex: 0 0 auto; color: #bda99b; font-size: 11px; }
.pz-live-empty { padding: 18px 0; font-size: 12px; color: var(--muted); line-height: 1.8; }
.pz-live-empty span { display: block; font-size: 11px; color: #bda99b; }

/* 菜品分类筛选条（菜品与菜谱 → 公共菜谱） */
.pz-cats { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 18px 2px; }
.pz-cat { font-size: 12px; line-height: 1.6; padding: 4px 11px; border-radius: 20px; background: #faf4ef; color: #8b7a6f; border: 1px solid transparent; cursor: pointer; transition: background 0.15s, color 0.15s; }
.pz-cat span { margin-left: 5px; font-size: 11px; color: #bda99b; }
.pz-cat:hover { background: #f6ece3; }
.pz-cat.on { background: #fff1e9; border-color: #f3c9b3; color: var(--brand-deep); font-weight: 600; }
.pz-cat.on span { color: var(--brand); }

@media (max-width: 1100px) {
  .pz-sum { grid-template-columns: 1fr; gap: 14px; }
  .pz-live { border-left: 0; border-top: 1px dashed var(--line); padding-left: 0; padding-top: 12px; }
}
/* ===== 点菜单：按小程序「点餐」页的样子显示菜品（左分类栏 + 菜品卡 + 右侧手机壳） ===== */
.card-head.mn2-head { flex-wrap: wrap; row-gap: 8px; }
.card-head.mn2-head h3 { white-space: nowrap; }
.card-head.mn2-head .sub { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn2-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 306px; gap: 16px; padding: 16px 18px 18px; align-items: start; }
.mn2-menu { display: flex; gap: 12px; min-width: 0; align-items: flex-start; }
.mn2-rail { flex: 0 0 124px; background: #fbf6f1; border-radius: 14px; padding: 8px; }
.mn2-rail .it { display: flex; align-items: center; gap: 6px; padding: 8px 9px; border-radius: 10px; font-size: 12.5px; color: #8b7a6f; cursor: pointer; transition: background 0.15s, color 0.15s; }
.mn2-rail .it .i { font-size: 13px; flex: none; }
.mn2-rail .it .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn2-rail .it .n { font-size: 10.5px; color: #bda99b; flex: none; }
.mn2-rail .it:hover { background: rgba(255, 255, 255, 0.72); }
.mn2-rail .it.on { background: #fff; color: var(--brand-deep); font-weight: 700; box-shadow: 0 2px 8px rgba(120, 70, 40, 0.07); }
.mn2-rail .it.on .n { color: var(--brand); }

.mn2-cards { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-content: start; }
.mn2-card { border: 1px solid #f2e3d9; border-radius: 14px; background: #fff; overflow: hidden; cursor: pointer; transition: box-shadow 0.16s, transform 0.16s, border-color 0.16s; }
.mn2-card:hover { border-color: #f3c9b3; box-shadow: 0 10px 24px rgba(120, 70, 40, 0.09); transform: translateY(-1px); }
.mn2-cover { position: relative; height: 104px; background: #f7ede5 center/cover no-repeat; display: grid; place-items: center; }
.mn2-noimg { font-size: 11px; color: #c4ab9d; }
.mn2-bd { position: absolute; left: 8px; top: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.mn2-badge { font-size: 10px; line-height: 1.7; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.94); color: #8b7a6f; box-shadow: 0 1px 4px rgba(60, 30, 15, 0.08); }
.mn2-badge.pub { color: #4a6cf7; background: rgba(238, 243, 255, 0.96); }
.mn2-badge.ours { color: #e8573a; background: rgba(255, 240, 232, 0.96); }
.mn2-badge.mine { color: #b0654a; background: rgba(253, 238, 230, 0.96); }
.mn2-badge.off { color: #8b7a6f; background: rgba(242, 242, 242, 0.96); }
.mn2-card.is-off .mn2-cover { filter: grayscale(0.45); opacity: 0.86; }
.mn2-body { padding: 10px 11px 11px; }
.mn2-name { font-size: 13.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn2-sub { font-size: 11px; color: #a48f81; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn2-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; min-height: 16px; }
.mn2-tags i { font-style: normal; font-size: 10px; color: #b0654a; background: #fdeee6; border-radius: 5px; padding: 1px 6px; }
.mn2-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed #f5e7dd; }
.mn2-price { font-size: 14px; font-weight: 700; color: var(--brand); }
.mn2-ops { display: flex; gap: 4px; opacity: 0.55; transition: opacity 0.15s; }
.mn2-card:hover .mn2-ops { opacity: 1; }
.mn2-ops .btn.mini { padding: 3px 8px; font-size: 11px; }

.mn2-empty { grid-column: 1 / -1; padding: 42px 16px; text-align: center; }
.mn2-empty .ico { font-size: 30px; opacity: 0.5; }
.mn2-empty .t { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.mn2-empty .s { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.mn2-empty .btn { text-decoration: none; }

.mn2-side { display: flex; flex-direction: column; align-items: center; }
.mn2-side-note { margin-top: 10px; font-size: 11px; color: var(--muted); }

/* 手机壳里的点餐页 */
.mn2-phone { width: 300px; height: 552px; border-radius: 30px; background: #1e1714; padding: 8px; box-shadow: 0 18px 44px rgba(60, 30, 15, 0.22); }
.mn2-screen { width: 100%; height: 100%; border-radius: 23px; background: #fff8f3; display: flex; flex-direction: column; overflow: hidden; }
.mn2-phead { padding: 14px 12px 10px; background: linear-gradient(180deg, #fff2e8, #fff8f3); }
.mn2-ptop { display: flex; align-items: baseline; gap: 6px; }
.mn2-pshop { font-size: 14px; font-weight: 800; color: #2a211c; }
.mn2-pnote { font-size: 9.5px; color: #b09a8c; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn2-psearch { margin-top: 9px; height: 28px; border-radius: 999px; background: #fff; display: flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 11px; color: #bda99b; box-shadow: 0 2px 8px rgba(120, 70, 40, 0.05); }
.mn2-pbody { flex: 1; display: flex; min-height: 0; }
.mn2-prail { flex: 0 0 62px; overflow: auto; padding: 4px 4px 8px; }
.mn2-prail .it { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px; border-radius: 9px; font-size: 9.5px; color: #8a6a55; cursor: pointer; }
.mn2-prail .it b { font-size: 13px; font-weight: 400; }
.mn2-prail .it span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn2-prail .it.on { background: #fff; color: #e8573a; font-weight: 700; box-shadow: 0 2px 8px rgba(120, 70, 40, 0.06); }
.mn2-plist { flex: 1; min-width: 0; overflow: auto; padding: 4px 8px 8px; display: flex; flex-direction: column; }
.mn2-prow { display: flex; gap: 8px; background: #fff; border-radius: 12px; padding: 8px; margin-bottom: 8px; }
.mn2-pcover { flex: none; width: 46px; height: 46px; border-radius: 8px; background: #f5e7de center/cover no-repeat; }
.mn2-pmain { flex: 1; min-width: 0; }
.mn2-pname { font-size: 11.5px; font-weight: 700; color: #2a211c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn2-ptags { display: flex; gap: 3px; margin-top: 3px; }
.mn2-ptags i { font-style: normal; font-size: 8.5px; color: #b0654a; background: #fdeee6; border-radius: 4px; padding: 0 4px; }
.mn2-psales { font-size: 9px; color: #bda99b; margin-top: 3px; }
.mn2-pbottom { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.mn2-pbottom span { font-size: 12px; font-weight: 700; color: #e8573a; }
.mn2-padd { width: 17px; height: 17px; border-radius: 50%; background: #e8573a; color: #fff; font-size: 11px; line-height: 17px; text-align: center; font-weight: 400; }
.mn2-pempty { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 14px; text-align: center; font-size: 10.5px; color: #bda99b; line-height: 1.7; }
.mn2-pcart { height: 40px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #8a6a55; background: #fff; border-top: 1px solid #f4e7dd; }
.mn2-pmore { padding: 8px 14px 10px; font-size: 10.5px; color: #bda99b; text-align: center; background: #fff; }
/* 点菜单卡片分页条 */
.mn2-pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 0 4px; }
.mn2-pager span { font-size: 12px; color: #918074; }

@media (max-width: 1180px) {
  .mn2-wrap { grid-template-columns: 1fr; }
  .mn2-side { padding-top: 6px; }
}

/* ===== 分类图标选择器（公共分类 新增/编辑弹窗） ===== */
.ic-cur {
  width: 100%; height: 38px; padding: 0; line-height: 1; font-size: 21px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  cursor: pointer; transition: border-color 0.14s, background 0.14s;
}
.ic-cur:hover { border-color: #f0bfa6; background: #fff8f4; }
.ic-panel {
  margin-top: 12px; padding: 0 10px 10px; max-height: 300px; overflow: auto;
  border: 1px solid var(--line); border-radius: 12px; background: #fffdfb;
}
.ic-panel.flash { animation: icFlash 0.5s ease; }
@keyframes icFlash { 0% { box-shadow: 0 0 0 0 rgba(239, 100, 68, 0.28); } 100% { box-shadow: 0 0 0 10px rgba(239, 100, 68, 0); } }
.ic-phead {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 9px 0 8px; background: #fffdfb; border-bottom: 1px solid #f8ece3;
}
.ic-phead .t { font-size: 12px; color: var(--ink-2); }
.ic-phead .t .n { margin-left: 6px; color: var(--muted); font-size: 11px; }
.ic-manual { margin-left: auto; width: 148px; height: 30px; font-size: 12px; }
.ic-g { margin: 8px 2px 5px; font-size: 11px; letter-spacing: 0.5px; color: #a48f81; }
.ic-g:first-of-type { margin-top: 8px; }
.ic-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.ic-b {
  height: 32px; padding: 0; line-height: 1; font-size: 18px; cursor: pointer;
  border: 1px solid transparent; border-radius: 8px; background: #fff;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.ic-b:hover { background: #fff2ea; border-color: #f6d3c1; transform: translateY(-1px); }
.ic-b.on { background: #fdece3; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(239, 100, 68, 0.12); }
@media (max-width: 640px) {
  .ic-grid { grid-template-columns: repeat(8, 1fr); }
  .ic-manual { width: 124px; }
}
